File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -207,10 +207,8 @@ case $host in
207
207
fi
208
208
209
209
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
210
- TESTDEFS="-DBOOST_TEST_DYN_LINK"
211
210
;;
212
211
*)
213
- TESTDEFS="-DBOOST_TEST_DYN_LINK"
214
212
;;
215
213
esac
216
214
@@ -345,6 +343,24 @@ if test x$use_tests = xyes; then
345
343
346
344
347
345
AX_BOOST_UNIT_TEST_FRAMEWORK
346
+
347
+ dnl Determine if -DBOOST_TEST_DYN_LINK is needed
348
+ AC_MSG_CHECKING ( [ for dynamic linked boost test] )
349
+ TEMP_LIBS="$LIBS"
350
+ LIBS="$LIBS $BOOST_UNIT_TEST_FRAMEWORK_LIB"
351
+ TEMP_CPPFLAGS="$CPPFLAGS"
352
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
353
+ AC_LINK_IFELSE ( [ AC_LANG_SOURCE ( [
354
+ #define BOOST_TEST_DYN_LINK
355
+ #define BOOST_TEST_MAIN
356
+ #include <boost/test/unit_test.hpp>
357
+
358
+ ] ) ] ,
359
+ [ AC_MSG_RESULT ( yes ) ]
360
+ [ TESTDEFS="$TESTDEFS -DBOOST_TEST_DYN_LINK"] ,
361
+ [ AC_MSG_RESULT ( no ) ] )
362
+ LIBS="$TEMP_LIBS"
363
+ CPPFLAGS="$TEMP_CPPFLAGS"
348
364
fi
349
365
350
366
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
You can’t perform that action at this time.
0 commit comments