Fix for BOOST_SED_CPP for gcc-5.
authorTim King <taking@cs.nyu.edu>
Thu, 16 Jul 2015 18:49:51 +0000 (20:49 +0200)
committerTim King <taking@cs.nyu.edu>
Mon, 20 Jul 2015 20:27:56 +0000 (13:27 -0700)
config/boost.m4

index 80a696881884bc43a49e295afe6055ffd7c7bea4..da49c5ebed2179f3d05e0099d1e96001ec83272c 100644 (file)
@@ -72,7 +72,8 @@ dnl boost_cv_lib_version='1_37\r' for instance, which breaks
 dnl everything else.
 dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK
 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
-  tr -d '\r' |
+  grep -v "^#" |
+  tr -d '\r\n ' |
   $SED -n -e "$1" >conftest.i 2>&1],
   [$3],
   [$4])
@@ -206,7 +207,7 @@ AC_LANG_POP([C++])dnl
   AC_CACHE_CHECK([for Boost's header version],
     [boost_cv_lib_version],
     [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl
-     _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}],
+     _BOOST_SED_CPP([/^boost-lib-version=/{s///;s/\"//g;p;q;}],
                     [#include <boost/version.hpp>
 boost-lib-version = BOOST_LIB_VERSION],
     [boost_cv_lib_version=`cat conftest.i`])])