Use AC_LANG_SOURCE instead of AC_LANG_PROGRAM for unit lib test
[m4-moved-to-github.git] / boost.m4
index cdf6c64..64e6ecc 100644 (file)
--- a/boost.m4
+++ b/boost.m4
@@ -81,14 +81,14 @@ int x = BOOST_VERSION;
                        BOOST_TEST_LIB=""
                        for l in boost_unit_test_framework-mt boost_unit_test_framework; do
                            LIBS="${saveLIBS} -l${l}"
-                           AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                           AC_LINK_IFELSE([AC_LANG_SOURCE([[
 #define BOOST_TEST_DYN_LINK
+#define BOOST_AUTO_TEST_MAIN
 #include <boost/test/auto_unit_test.hpp>
 BOOST_AUTO_TEST_CASE( t ) 
 {
     BOOST_CHECK(1);
 }
-]],[[ 
 ]])],[
                              BOOST_TEST_LIB="-l${l}"
                              break