summaryrefslogtreecommitdiff
path: root/m4/ax_boost_thread.m4
diff options
context:
space:
mode:
authorMikael Lepistö <mikael.lepisto@tut.fi>2007-07-24 22:47:57 +0200
committerPeter Simons <simons@cryp.to>2007-07-24 22:47:57 +0200
commit50a6547372d5b3d2a12871e9dc0581b1b1ec0caf (patch)
tree1cfcfc60bda5439e21d35eaec59c0eb45a7fe94f /m4/ax_boost_thread.m4
parent30d8ba946f8251ad943d58680c3790599bd134cf (diff)
downloadautoconf-archive-50a6547372d5b3d2a12871e9dc0581b1b1ec0caf.tar.gz
ax_boost*.m4: fix library detection when compiling with -pedantic
When running the Boost macros with the "-pedantic" compiler switch, they fail. It seems that the problem is a multiply defined "main" function in the generated test program. I changed the call to AC_CHECK_LIB to use "exit" instead of "main", which seems to work reliably.
Diffstat (limited to 'm4/ax_boost_thread.m4')
-rw-r--r--m4/ax_boost_thread.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/m4/ax_boost_thread.m4 b/m4/ax_boost_thread.m4
index 77fbf21..f11e0a2 100644
--- a/m4/ax_boost_thread.m4
+++ b/m4/ax_boost_thread.m4
@@ -20,7 +20,7 @@
#
# LAST MODIFICATION
#
-# 2007-07-18
+# 2007-07-24
#
# COPYLEFT
#
@@ -106,12 +106,12 @@ AC_DEFUN([AX_BOOST_THREAD],
for ax_lib in $BN $BN-mt $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-mt lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
- AC_CHECK_LIB($ax_lib, main, [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
+ AC_CHECK_LIB($ax_lib, exit, [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
[link_thread="no"])
done
else
for ax_lib in $ax_boost_user_thread_lib $BN-$ax_boost_user_thread_lib; do
- AC_CHECK_LIB($ax_lib, main,
+ AC_CHECK_LIB($ax_lib, exit,
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
[link_thread="no"])
done