summaryrefslogtreecommitdiff
blob: 7a4d3ae83aca45af5eb5386179f0473a882a2c78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 configure.ac | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 033621f..87e129a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -550,13 +550,14 @@ dnl check for boost thread library
 AC_LANG_PUSH([C++])
 LDFLAGS_save=$LDFLAGS
 CXXFLAGS_save=$CXXFLAGS
+LIBS_save=$LIBS
 boost_thread_found='no'
 if test "$BOOST_DIR" != '' ; then
 	CXXFLAGS="-I$BOOST_DIR/include $CXXFLAGS"
 fi
 if test "$BOOST_DIR" = '' && test "$boost_thread_found" = 'no' ; then
-	bthread_lib='-lboost_thread-mt'
-	LDFLAGS="$LDFLAGS_save $bthread_lib"
+	bthread_lib='-lboost_thread-mt -lboost_system'
+	LIBS="$LIBS_save $bthread_lib"
 	AC_LINK_IFELSE(
 		[AC_LANG_PROGRAM(
 			[# include <boost/thread.hpp>],
@@ -568,7 +569,7 @@ if test "$BOOST_DIR" = '' && test "$boost_thread_found" = 'no' ; then
 fi
 if test "$BOOST_DIR" != '' && test "$boost_thread_found" = 'no' ; then
 	bthread_lib="$BOOST_DIR/lib/libboost_thread-mt.so"
-	LDFLAGS="$LDFLAGS_save $bthread_lib"
+	LIBS="$LIBS_save $bthread_lib"
 	AC_LINK_IFELSE(
 		[AC_LANG_PROGRAM(
 			[# include <boost/thread.hpp>],
@@ -580,7 +581,7 @@ if test "$BOOST_DIR" != '' && test "$boost_thread_found" = 'no' ; then
 fi
 if test "$BOOST_DIR" != '' && test "$boost_thread_found" = 'no' ; then
 	bthread_lib="$BOOST_DIR/lib/libboost_thread-mt.a"
-	LDFLAGS="$LDFLAGS_save $bthread_lib"
+	LIBS="$LIBS_save $bthread_lib"
 	AC_LINK_IFELSE(
 		[AC_LANG_PROGRAM(
 			[# include <boost/thread.hpp>],
@@ -591,8 +592,8 @@ if test "$BOOST_DIR" != '' && test "$boost_thread_found" = 'no' ; then
 	)
 fi
 if test "$BOOST_DIR" = '' && test "$boost_thread_found" = 'no' ; then
-	bthread_lib='-lboost_thread'
-	LDFLAGS="$LDFLAGS_save $bthread_lib"
+	bthread_lib='-lboost_thread -lboost_system'
+	LIBS="$LIBS_save $bthread_lib"
 	AC_LINK_IFELSE(
 		[AC_LANG_PROGRAM(
 			[# include <boost/thread.hpp>],
@@ -604,7 +605,7 @@ if test "$BOOST_DIR" = '' && test "$boost_thread_found" = 'no' ; then
 fi
 if test "$BOOST_DIR" != '' && test "$boost_thread_found" = 'no' ; then
 	bthread_lib="$BOOST_DIR/lib/libboost_thread.so"
-	LDFLAGS="$LDFLAGS_save $bthread_lib"
+	LIBS="$LIBS_save $bthread_lib"
 	AC_LINK_IFELSE(
 		[AC_LANG_PROGRAM(
 			[# include <boost/thread.hpp>],
@@ -616,7 +617,7 @@ if test "$BOOST_DIR" != '' && test "$boost_thread_found" = 'no' ; then
 fi
 if test "$BOOST_DIR" != '' && test "$boost_thread_found" = 'no' ; then
 	bthread_lib="$BOOST_DIR/lib/libboost_thread.a"
-	LDFLAGS="$LDFLAGS_save $bthread_lib"
+	LIBS="$LIBS_save $bthread_lib"
 	AC_LINK_IFELSE(
 		[AC_LANG_PROGRAM(
 			[# include <boost/thread.hpp>],
@@ -636,6 +637,7 @@ else
 fi
 LDFLAGS=$LDFLAGS_save
 CXXFLAGS=$CXXFLAGS_save
+LIBS=$LIBS_save
 AC_LANG_POP([C++])
 #
 dnl --------------------------------------------------------------------------