Fix test for Boost version / presence
[m4-moved-to-github.git] / boost.m4
index 1331a84..0540465 100644 (file)
--- a/boost.m4
+++ b/boost.m4
@@ -32,7 +32,7 @@ AC_DEFUN([ID_BOOST],
                if test -d "$b"; then
                    BOOST_LIB="-L$b"
                fi
-            fi
+            done
            BOOST_CPPFLAGS="-I${with_boost}/include"
            if test ! -f "${with_boost}/include/boost/version.hpp"; then
                for b in ${with_boost}/include/boost-*; do
@@ -57,7 +57,8 @@ AC_DEFUN([ID_BOOST],
 version_is:BOOST_VERSION
 ]])])
            BOOST_GOT_VERSION=`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP version_is 2>/dev/null | cut -d ":" -f2`
-           if test "$BOOST_GOT_VERSION" = "BOOST_VERSION"; then
+           if test -z "$BOOST_GOT_VERSION" -o \
+               "$BOOST_GOT_VERSION" = "BOOST_VERSION"; then
                AC_MSG_RESULT([no])
                AC_MSG_ERROR([Boost development libraries required])
            fi