From a3de0bd3571fd657ee534c88ef3d229268226795 Mon Sep 17 00:00:00 2001 From: Milosz Tanski Date: Wed, 18 Jun 2014 08:04:47 -0400 Subject: [PATCH] Fixes for new AC/AM errors. --- Makefile.am | 2 +- m4/ax_boost_program_options.m4 | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2ebf4d59..b0d3837c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -412,7 +412,7 @@ noinst_PROGRAMS= \ mordor/examples/tunnel \ mordor/examples/udpstats -if BOOST_PROGRAM_OPTIONS +if HAVE_BOOST_PROGRAM_OPTIONS noinst_PROGRAMS += mordor/examples/wget endif diff --git a/m4/ax_boost_program_options.m4 b/m4/ax_boost_program_options.m4 index ad2ac1ea..29953ea7 100644 --- a/m4/ax_boost_program_options.m4 +++ b/m4/ax_boost_program_options.m4 @@ -29,7 +29,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 20 +#serial 22 AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS], [ @@ -61,27 +61,27 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS], LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS AC_CACHE_CHECK([whether the Boost::Program_Options library is available], - ax_cv_boost_program_options, - [AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include - ]], - [[boost::program_options::options_description generic("Generic options"); - return 0;]])], - ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no) - AC_LANG_POP([C++]) + ax_cv_boost_program_options, + [AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[@%:@include ]], + [[boost::program_options::options_description generic("Generic options");]])], + ax_cv_boost_program_options=yes, + ax_cv_boost_program_options=no) + AC_LANG_POP([C++]) ]) if test "$ax_cv_boost_program_options" = yes; then AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available]) BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` if test "x$ax_boost_user_program_options_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a*$;\1;'` ; do + for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do ax_lib=${libextension} AC_CHECK_LIB($ax_lib, exit, [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break], [link_program_options="no"]) done if test "x$link_program_options" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a*$;\1;'` ; do + for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do ax_lib=${libextension} AC_CHECK_LIB($ax_lib, exit, [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break], @@ -105,5 +105,5 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS], CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" fi - AM_CONDITIONAL(BOOST_PROGRAM_OPTIONS, test "x[$]ax_cv_boost_program_options" = xyes) +AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS, test "$ax_cv_boost_program_options" = yes) ])