<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">When trying to build pdns-3.4.8, I encountered a problem during boost version detection, which looked something like this when ./configure (with all options I wanted, run)<br>
<br>
...<br>
pdns: checking for Boost headers version >= 1.35.0... /usr/include<br>
pdns: checking for Boost's header version...<br>
pdns: configure: error: invalid value: boost_major_version=''<br>
...<br>
<br>
<br>
I think I tracked down the cause of this to m4/boost.m4<br>
<br>
See this section of code in m4/boost.m4:<br>
<br>
...<br>
---- cut here ----<br>
dnl # 1 "conftest.cc"                                                           <br>
dnl # 1 "<built-in>"                                                            <br>
dnl # 1 "<command-line>"                                                        <br>
dnl # 1 "conftest.cc"                                                           <br>
dnl # 1 "/opt/local/include/boost/version.hpp" 1 3                              <br>
dnl # 2 "conftest.cc" 2                                                         <br>
dnl boost-lib-version =                                                         <br>
dnl # 2 "conftest.cc" 3                                                         <br>
dnl                    "1_56"                                                   <br>
dnl                                                                             <br>
dnl So get rid of the # lines, and glue the remaining ones together.            <br>
(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |<br>
  grep -v '#' |                                                                 <br>
  tr -d '\r' |<br>
  tr -s '\n' ' ' |<br>
  $SED -n -e "$1" >conftest.i 2>&1],<br>
  [$3],<br>
  [$4])<br>
rm -rf conftest*<br>
AC_LANG_POP([C++])dnl                                                           <br>
])# _BOOST_SED_CPP                                                              <br>
<br>
# BOOST_REQUIRE([VERSION], [ACTION-IF-NOT-FOUND])     <br>
---- cut here ----<br>
...<br>
<br>
Notice the line:<br>
"rm -rf conftest*"<br>
<br>
This removes not only "conftest.$ac_ext" but also removes "conftest.i"<br>
<br>
But we still need "conftest.i" later in the script in this section:<br>
<br>
...<br>
---- cut here ----<br>
  AC_CACHE_CHECK([for Boost's header version],<br>
    [boost_cv_lib_version],<br>
    [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl                                 <br>
     _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]],<br>
                    [#include <boost/version.hpp>                               <br>
boost-lib-version = BOOST_LIB_VERSION],<br>
    [boost_cv_lib_version=`cat conftest.i`])])<br>
---- cut here ----<br>
...<br>
<br>
Without "conftest.i" present, the detected version ends up being '' (empty)<br>
<br>
A suggested change?<br>
<br>
---- cut here ----<br>
--- pdns-3.4.8-orig/m4/boost.m4 2016-02-02 20:31:19.000000000 +0000<br>
+++ pdns-3.4.8/m4/boost.m4      2016-02-19 06:11:51.832492331 +0000<br>
@@ -94,12 +94,10 @@<br>
   $SED -n -e "$1" >conftest.i 2>&1],<br>
   [$3],<br>
   [$4])<br>
-rm -rf conftest*<br>
+rm -rf conftest.$ac_ext<br>
 AC_LANG_POP([C++])dnl<br>
 ])# _BOOST_SED_CPP<br>
 <br>
-<br>
-<br>
 # BOOST_REQUIRE([VERSION], [ACTION-IF-NOT-FOUND])<br>
 # -----------------------------------------------<br>
 # Look for Boost.  If version is given, it must either be a literal of the form<br>
@@ -229,6 +227,7 @@<br>
                     [#include <boost/version.hpp><br>
 boost-lib-version = BOOST_LIB_VERSION],<br>
     [boost_cv_lib_version=`cat conftest.i`])])<br>
+    rm -rf conftest.*<br>
     # e.g. "134" for 1_34_1 or "135" for 1_35<br>
     boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'`<br>
     case $boost_major_version in #(<br>
---- cut here ----<br>
<br>
<br>
Feedback welcome.<br>
<br>
Hope this helps,<br>
-ME<br>
<br>
<br>
<br>
</div>
</body>
</html>