Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
4e7c7bab
Commit
4e7c7bab
authored
Sep 22, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config_brpc.sh supports mac
parent
29fc94eb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
config_brpc.sh
config_brpc.sh
+22
-10
No files found.
config_brpc.sh
View file @
4e7c7bab
if
[
-z
"
$BASH
"
]
;
then
SYSTEM
=
$(
uname
-s
)
if
[
"
$SYSTEM
"
=
"Darwin"
]
;
then
ECHO
=
echo
SO
=
dylib
LDD
=
"otool -L"
if
[
"
$(
getopt
-V
)
"
=
" --"
]
;
then
>
&2
$ECHO
"gnu-getopt must be installed and used"
exit
1
fi
else
if
[
-z
"
$BASH
"
]
;
then
ECHO
=
echo
else
ECHO
=
'echo -e'
fi
SO
=
so
LDD
=
ldd
fi
# NOTE: This requires GNU getopt. On Mac OS X and FreeBSD, you have to install this
# separately; see below.
TEMP
=
`
getopt
-o
v:
--long
headers:,libs:,cc:,cxx:,with-glog
-n
'config_brpc'
--
"
$@
"
`
WITH_GLOG
=
0
...
...
@@ -50,7 +62,7 @@ if [ -z "$HDRS_IN" ] || [ -z "$LIBS_IN" ]; then
fi
find_dir_of_lib
()
{
local
lib
=
$(
find
${
LIBS_IN
}
-name
"lib
${
1
}
.a"
-o
-name
"lib
${
1
}
.
so
"
|
head
-n1
)
local
lib
=
$(
find
${
LIBS_IN
}
-name
"lib
${
1
}
.a"
-o
-name
"lib
${
1
}
.
$SO
"
|
head
-n1
)
if
[
!
-z
"
$lib
"
]
;
then
dirname
$lib
fi
...
...
@@ -128,8 +140,8 @@ append_linking $PROTOBUF_LIB protobuf
LEVELDB_LIB
=
$(
find_dir_of_lib_or_die leveldb
)
# required by leveldb
if
[
-f
$LEVELDB_LIB
/libleveldb.a
]
;
then
if
[
-f
$LEVELDB_LIB
/libleveldb.
so
]
;
then
if
ldd
$LEVELDB_LIB
/libleveldb.so
|
grep
-q
libsnappy
;
then
if
[
-f
$LEVELDB_LIB
/libleveldb.
$SO
]
;
then
if
$LDD
$LEVELDB_LIB
/libleveldb.
$SO
|
grep
-q
libsnappy
;
then
SNAPPY_LIB
=
$(
find_dir_of_lib snappy
)
REQUIRE_SNAPPY
=
"yes"
fi
...
...
@@ -247,8 +259,8 @@ if [ -z "$TCMALLOC_LIB" ]; then
else
append_to_output_libs
"
$TCMALLOC_LIB
"
" "
if
[
-f
$TCMALLOC_LIB
/libtcmalloc_and_profiler.a
]
;
then
if
[
-f
$TCMALLOC_LIB
/libtcmalloc.
so
]
;
then
ldd
$TCMALLOC_LIB
/libtcmalloc.so
>
libtcmalloc.deps
if
[
-f
$TCMALLOC_LIB
/libtcmalloc.
$SO
]
;
then
$LDD
$TCMALLOC_LIB
/libtcmalloc.
$SO
>
libtcmalloc.deps
if
grep
-q
libunwind libtcmalloc.deps
;
then
TCMALLOC_REQUIRE_UNWIND
=
"yes"
REQUIRE_UNWIND
=
"yes"
...
...
@@ -283,8 +295,8 @@ if [ $WITH_GLOG != 0 ]; then
else
append_to_output_libs
"
$GLOG_LIB
"
" "
if
[
-f
$GLOG_LIB
/libglog.a
]
;
then
if
[
-f
"
$GLOG_LIB
/libglog.
so
"
]
;
then
ldd
$GLOG_LIB
/libglog.so
>
libglog.deps
if
[
-f
"
$GLOG_LIB
/libglog.
$SO
"
]
;
then
$LDD
$GLOG_LIB
/libglog.
$SO
>
libglog.deps
if
grep
-q
libunwind libglog.deps
;
then
GLOG_REQUIRE_UNWIND
=
"yes"
REQUIRE_UNWIND
=
"yes"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment