Link C modules with libpthread under Unix systems
Specify -pthread option which should be universally supported under
non-{MSW,Mac} platforms by now and which is required under Linux to link
the tests using boost::shared_ptr<>, which uses pthread_mutex_xxx().
This commit is contained in:
parent
e78c8f39ed
commit
e45d8f94fc
1 changed files with 18 additions and 7 deletions
25
configure.ac
25
configure.ac
|
|
@ -2434,20 +2434,31 @@ fi
|
|||
|
||||
AC_SUBST(RBIN)
|
||||
|
||||
# C module on Mac OS X tweaks
|
||||
#----------------------------------------------------------------
|
||||
# Nothing to look for in C case, just define some variables
|
||||
#----------------------------------------------------------------
|
||||
|
||||
# Some tweaks for creating shared modules.
|
||||
C_SO='$(SO)'
|
||||
|
||||
case $host in
|
||||
*-*-darwin*)
|
||||
C_LDSHARED="cc -dynamiclib"
|
||||
CXX_LDSHARED="g++ -dynamiclib"
|
||||
*-*-darwin*)
|
||||
C_LDFLAGS='-dynamiclib'
|
||||
C_SO=".dylib"
|
||||
;;
|
||||
*-*-cygwin* | *-*-mingw*)
|
||||
# Nothing special to do.
|
||||
;;
|
||||
*)
|
||||
C_LDSHARED='$(LDSHARED)'
|
||||
CXX_LDSHARED='$(CXXSHARED)'
|
||||
C_SO='$(SO)'
|
||||
# This is needed for linking with Boost which uses mutexes and does no
|
||||
# harm in all the other cases.
|
||||
C_LDFLAGS='-pthread'
|
||||
;;
|
||||
esac
|
||||
|
||||
C_LDSHARED="\$(LDSHARED) $C_LDFLAGS"
|
||||
CXX_LDSHARED="\$(CXXSHARED) $C_LDFLAGS"
|
||||
|
||||
AC_SUBST(C_LDSHARED)
|
||||
AC_SUBST(CXX_LDSHARED)
|
||||
AC_SUBST(C_SO)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue