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)
|
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
|
case $host in
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
C_LDSHARED="cc -dynamiclib"
|
C_LDFLAGS='-dynamiclib'
|
||||||
CXX_LDSHARED="g++ -dynamiclib"
|
|
||||||
C_SO=".dylib"
|
C_SO=".dylib"
|
||||||
;;
|
;;
|
||||||
|
*-*-cygwin* | *-*-mingw*)
|
||||||
|
# Nothing special to do.
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
C_LDSHARED='$(LDSHARED)'
|
# This is needed for linking with Boost which uses mutexes and does no
|
||||||
CXX_LDSHARED='$(CXXSHARED)'
|
# harm in all the other cases.
|
||||||
C_SO='$(SO)'
|
C_LDFLAGS='-pthread'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
C_LDSHARED="\$(LDSHARED) $C_LDFLAGS"
|
||||||
|
CXX_LDSHARED="\$(CXXSHARED) $C_LDFLAGS"
|
||||||
|
|
||||||
AC_SUBST(C_LDSHARED)
|
AC_SUBST(C_LDSHARED)
|
||||||
AC_SUBST(CXX_LDSHARED)
|
AC_SUBST(CXX_LDSHARED)
|
||||||
AC_SUBST(C_SO)
|
AC_SUBST(C_SO)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue