[nemiver] Update boost m4 macro definitions.
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Update boost m4 macro definitions.
- Date: Sun, 9 Jan 2011 23:22:02 +0000 (UTC)
commit 653f8305ff78d409aba4bc5b25e4092eadb84930
Author: Dodji Seketeli <dodji seketeli org>
Date: Sun Jan 9 22:03:33 2011 +0100
Update boost m4 macro definitions.
* m4/ax_boost_test_exec_monitor.m4: Update to new upstream
version.
* m4/ax_boost_unit_test_framework.m4: Likewise.
m4/ax_boost_test_exec_monitor.m4 | 140 +++++++++++++++++-------------------
m4/ax_boost_unit_test_framework.m4 | 130 ++++++++++++++++-----------------
2 files changed, 130 insertions(+), 140 deletions(-)
---
diff --git a/m4/ax_boost_test_exec_monitor.m4 b/m4/ax_boost_test_exec_monitor.m4
index 44a1039..61f105d 100644
--- a/m4/ax_boost_test_exec_monitor.m4
+++ b/m4/ax_boost_test_exec_monitor.m4
@@ -1,4 +1,6 @@
-##### http://autoconf-archive.cryp.to/ax_boost_test_exec_monitor.html
+# ==============================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_boost_test_exec_monitor.html
+# ==============================================================================
#
# SYNOPSIS
#
@@ -6,10 +8,9 @@
#
# DESCRIPTION
#
-# Test for Test_Exec_Monitor library from the Boost C++ libraries.
-# The macro requires a preceding call to AX_BOOST_BASE. Further
-# documentation is available at
-# <http://randspringer.de/boost/index.html>.
+# Test for Test_Exec_Monitor library from the Boost C++ libraries. The
+# macro requires a preceding call to AX_BOOST_BASE. Further documentation
+# is available at <http://randspringer.de/boost/index.html>.
#
# This macro calls:
#
@@ -19,18 +20,17 @@
#
# HAVE_BOOST_TEST_EXEC_MONITOR
#
-# LAST MODIFICATION
+# LICENSE
#
-# 2007-03-07
+# Copyright (c) 2008 Dodji Seketeli <dodji seketeli org>
+# Copyright (c) 2008 Thomas Porschberg <thomas randspringer de>
#
-# COPYLEFT
-#
-# Copyright (c) 2007 Dodji Seketeli <dodji seketeli org>
-# based on the work of Thomas Porschberg <thomas randspringer de>.
-#
-# Copying and distribution of this file, with or without
-# modification, are permitted in any medium without royalty provided
-# the copyright notice and this notice are preserved.
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 18
AC_DEFUN([AX_BOOST_TEST_EXEC_MONITOR],
[
@@ -46,7 +46,7 @@ AC_DEFUN([AX_BOOST_TEST_EXEC_MONITOR],
ax_boost_user_test_exec_monitor_lib=""
else
want_boost="yes"
- ax_boost_user_test_exec_monitor_lib="$withval"
+ ax_boost_user_test_exec_monitor_lib="$withval"
fi
],
[want_boost="yes"]
@@ -65,83 +65,75 @@ AC_DEFUN([AX_BOOST_TEST_EXEC_MONITOR],
AC_CACHE_CHECK(whether the Boost::Test_Exec_Monitor library is available,
ax_cv_boost_test_exec_monitor,
[AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ %:@include <boost/test/test_tools.hpp>]],
- [[int i=1 ; BOOST_REQUIRE(i==1); ; return 0;]]),
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ %:@include <boost/test/test_tools.hpp>]],
+ [[int i=1 ; BOOST_REQUIRE(i==1); ; return 0;]])],
ax_cv_boost_test_exec_monitor=yes, ax_cv_boost_test_exec_monitor=no)
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_test_exec_monitor" = "xyes"; then
AC_DEFINE(HAVE_BOOST_TEST_EXEC_MONITOR,,[define if the Boost::Test_Exec_Monitor library is available])
- BN=boost_test_exec_monitor
- BN2=boost_prg_exec_monitor
+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+
if test "x$ax_boost_user_test_exec_monitor_lib" = "x"; then
- saved_ldflags="${LDFLAGS}"
- for ax_lib in $BN $BN2 $BN-mt $BN2-mt $BN-mt-s \
- $BN2-mt-s $BN-s $BN2-s $BN-$CC \
- $BN2-$CC $BN-$CC-mt $BN2-$CC-mt \
- $BN-$CC-mt-s $BN2-$CC-mt-s \
- $BN-$CC-s $BN2-$CC-s lib$BN \
- lib$BN2 lib$BN-$CC lib$BN2-$CC \
- lib$BN-$CC-mt lib$BN2-$CC-mt \
- lib$BN-$CC-mt-s lib$BN2-$CC-mt-s \
- lib$BN-$CC-s lib$BN2-$CC-s \
- $BN-mgw $BN2-mgw $BN-mgw-mt \
- $BN2-mgw-mt $BN-mgw-mt-s \
- $BN2-mgw-mt-s $BN-mgw-s \
- $BN2-mgw-s ; do
- LDFLAGS="${LDFLAGS} ${BOOST_UNIT_TEST_FRAMEWORK_LIB} -l$ax_lib"
- AC_CACHE_CHECK(Boost::TestExecMonitor library linkage,
- ax_cv_boost_test_exec_monitor_link,
- [AC_LANG_PUSH([C++])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[ %:@include <boost/test/test_tools.hpp>
- int test_main(int argc, char * argv[]) {
- BOOST_REQUIRE(1==1) ;
- return 0;
- }
- ]],
- [[ return 0;]])],
- link_test_exec_monitor="yes",link_test_exec_monitor="no")
- AC_LANG_POP([C++])
- ])
- LDFLAGS="${saved_ldflags}"
+ saved_ldflags="${LDFLAGS}"
+
+ for monitor_library in `ls $BOOSTLIBDIR/libboost_test_exec_monitor*.so* $BOOSTLIBDIR/libboost_test_exec_monitor*.a* 2>/dev/null` ; do
+ if test -r $monitor_library ; then
+ libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_test_exec_monitor.*\)\.so.*$;\1;' -e 's;^lib\(boost_test_exec_monitor.*\)\.a*$;\1;'`
+ ax_lib=${libextension}
+ link_test_exec_monitor="yes"
+ else
+ link_test_exec_monitor="no"
+ fi
if test "x$link_test_exec_monitor" = "xyes"; then
- BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib ${BOOST_UNIT_TEST_FRAMEWORK_LIB}"
+ BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"
AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
break
fi
done
+ if test "x$link_test_exec_monitor" != "xyes"; then
+ for libextension in `ls $BOOSTLIBDIR/boost_test_exec_monitor*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_test_exec_monitor.*\)\.dll.*$;\1;' -e 's;^\(boost_test_exec_monitor.*\)\.a*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"; AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB) link_test_exec_monitor="yes"; break],
+ [link_test_exec_monitor="no"])
+ done
+ fi
+
else
- saved_ldflags="${LDFLAGS}"
- for ax_lib in $ax_boost_user_test_exec_monitor_lib $BN-$ax_boost_user_test_exec_monitor_lib; do
- LDFLAGS="${LDFLAGS} -l$ax_lib"
- AC_CACHE_CHECK(Boost::TestExecMonitor library linkage,
- ax_cv_boost_test_exec_monitor_link,
- [AC_LANG_PUSH([C++])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[ %:@include <boost/test/test_tools.hpp>
- int test_main( int argc, char * argv[] ) {
- BOOST_REQUIRE(1==1) ;
- return 0;
- }
- ]],
- [[ return 0;]])],
- link_test_exec_monitor="yes",link_test_exec_monitor="no")
- AC_LANG_POP([C++])
- ])
- LDFLAGS="${saved_ldflags}"
- if test "x$link_test_exec_monitor" = "xyes"; then
- BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"
- AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
- break
- fi
+ link_test_exec_monitor="no"
+ saved_ldflags="${LDFLAGS}"
+ for ax_lib in boost_test_exec_monitor-$ax_boost_user_test_exec_monitor_lib $ax_boost_user_test_exec_monitor_lib ; do
+ if test "x$link_test_exec_monitor" = "xyes"; then
+ break;
+ fi
+ for monitor_library in `ls $BOOSTLIBDIR/lib${ax_lib}.so* $BOOSTLIBDIR/lib${ax_lib}.a* 2>/dev/null` ; do
+ if test -r $monitor_library ; then
+ libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_test_exec_monitor.*\)\.so.*$;\1;' -e 's;^lib\(boost_test_exec_monitor.*\)\.a*$;\1;'`
+ ax_lib=${libextension}
+ link_test_exec_monitor="yes"
+ else
+ link_test_exec_monitor="no"
+ fi
+
+ if test "x$link_test_exec_monitor" = "xyes"; then
+ BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"
+ AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
+ break
+ fi
+ done
done
fi
- if test "x$link_test_exec_monitor" = "xno"; then
+ if test "x$ax_lib" = "x"; then
+ AC_MSG_ERROR(Could not find a version of the library!)
+ fi
+ if test "x$link_test_exec_monitor" != "xyes"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
fi
])
diff --git a/m4/ax_boost_unit_test_framework.m4 b/m4/ax_boost_unit_test_framework.m4
index 6072b51..c8e823d 100644
--- a/m4/ax_boost_unit_test_framework.m4
+++ b/m4/ax_boost_unit_test_framework.m4
@@ -1,4 +1,6 @@
-##### http://autoconf-archive.cryp.to/ax_boost_unit_test_framework.html
+# ================================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html
+# ================================================================================
#
# SYNOPSIS
#
@@ -6,10 +8,9 @@
#
# DESCRIPTION
#
-# Test for Unit_Test_Framework library from the Boost C++ libraries.
-# The macro requires a preceding call to AX_BOOST_BASE. Further
-# documentation is available at
-# <http://randspringer.de/boost/index.html>.
+# Test for Unit_Test_Framework library from the Boost C++ libraries. The
+# macro requires a preceding call to AX_BOOST_BASE. Further documentation
+# is available at <http://randspringer.de/boost/index.html>.
#
# This macro calls:
#
@@ -19,17 +20,16 @@
#
# HAVE_BOOST_UNIT_TEST_FRAMEWORK
#
-# LAST MODIFICATION
+# LICENSE
#
-# 2006-12-28
+# Copyright (c) 2008 Thomas Porschberg <thomas randspringer de>
#
-# COPYLEFT
-#
-# Copyright (c) 2006 Thomas Porschberg <thomas randspringer de>
-#
-# Copying and distribution of this file, with or without
-# modification, are permitted in any medium without royalty provided
-# the copyright notice and this notice are preserved.
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 17
AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
[
@@ -45,7 +45,7 @@ AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
ax_boost_user_unit_test_framework_lib=""
else
want_boost="yes"
- ax_boost_user_unit_test_framework_lib="$withval"
+ ax_boost_user_unit_test_framework_lib="$withval"
fi
],
[want_boost="yes"]
@@ -64,76 +64,74 @@ AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available,
ax_cv_boost_unit_test_framework,
[AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ %:@include <boost/test/unit_test.hpp>]],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ %:@include <boost/test/unit_test.hpp>]],
[[using boost::unit_test::test_suite;
- test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]]),
+ test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]])],
ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no)
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available])
- BN=boost_unit_test_framework
+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+
if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then
- saved_ldflags="${LDFLAGS}"
- for ax_lib in $BN $BN-mt $BN-mt-s $BN-s \
- $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
- lib$BN 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
- LDFLAGS="${LDFLAGS} -l$ax_lib"
- AC_CACHE_CHECK(Boost::UnitTestFramework library linkage,
- ax_cv_boost_unit_test_framework_link,
- [AC_LANG_PUSH([C++])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[ %:@include <boost/test/unit_test.hpp>
- using boost::unit_test::test_suite;
- test_suite* init_unit_test_suite( int argc, char * argv[] ) {
- test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" );
- return test;
- }
- ]],
- [[ return 0;]])],
- link_unit_test_framework="yes",link_unit_test_framework="no")
- AC_LANG_POP([C++])
- ])
- LDFLAGS="${saved_ldflags}"
+ saved_ldflags="${LDFLAGS}"
+ for monitor_library in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.so* $BOOSTLIBDIR/libboost_unit_test_framework*.a* 2>/dev/null` ; do
+ if test -r $monitor_library ; then
+ libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
+ ax_lib=${libextension}
+ link_unit_test_framework="yes"
+ else
+ link_unit_test_framework="no"
+ fi
- if test "x$link_unit_test_framework" = "xyes"; then
+ if test "x$link_unit_test_framework" = "xyes"; then
BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
break
- fi
+ fi
done
+ if test "x$link_unit_test_framework" != "xyes"; then
+ for libextension in `ls $BOOSTLIBDIR/boost_unit_test_framework*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_unit_test_framework.*\)\.dll.*$;\1;' -e 's;^\(boost_unit_test_framework.*\)\.a*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break],
+ [link_unit_test_framework="no"])
+ done
+ fi
else
- saved_ldflags="${LDFLAGS}"
- for ax_lib in $ax_boost_user_unit_test_framework_lib $BN-$ax_boost_user_unit_test_framework_lib; do
- LDFLAGS="${LDFLAGS} -l$ax_lib"
- AC_CACHE_CHECK(Boost::UnitTestFramework library linkage,
- ax_cv_boost_unit_test_framework_link,
- [AC_LANG_PUSH([C++])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[ %:@include <boost/test/unit_test.hpp>
- using boost::unit_test::test_suite;
- test_suite* init_unit_test_suite( int argc, char * argv[] ) {
- test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" );
- return test;
- }
- ]],
- [[ return 0;]])],
- link_unit_test_framework="yes",link_unit_test_framework="no")
- AC_LANG_POP([C++])
- ])
- LDFLAGS="${saved_ldflags}"
- if test "x$link_unit_test_framework" = "xyes"; then
- BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
- AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
- break
- fi
+ link_unit_test_framework="no"
+ saved_ldflags="${LDFLAGS}"
+ for ax_lib in boost_unit_test_framework-$ax_boost_user_unit_test_framework_lib $ax_boost_user_unit_test_framework_lib ; do
+ if test "x$link_unit_test_framework" = "xyes"; then
+ break;
+ fi
+ for unittest_library in `ls $BOOSTLIBDIR/lib${ax_lib}.so* $BOOSTLIBDIR/lib${ax_lib}.a* 2>/dev/null` ; do
+ if test -r $unittest_library ; then
+ libextension=`echo $unittest_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
+ ax_lib=${libextension}
+ link_unit_test_framework="yes"
+ else
+ link_unit_test_framework="no"
+ fi
+
+ if test "x$link_unit_test_framework" = "xyes"; then
+ BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
+ AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+ break
+ fi
+ done
done
fi
- if test "x$link_unit_test_framework" = "xno"; then
+ if test "x$ax_lib" = "x"; then
+ AC_MSG_ERROR(Could not find a version of the library!)
+ fi
+ if test "x$link_unit_test_framework" != "xyes"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
fi
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]