Commit e144ab7b authored by Kean Johnston's avatar Kean Johnston
Browse files

[3107] Merge branch 'trac3107'

parents 070f123a 32e3681b
......@@ -68,6 +68,13 @@ AC_CHECK_DECL([__SUNPRO_CC], [SUNCXX="yes"], [SUNCXX="no"])
AC_CHECK_DECL([__clang__], [CLANGPP="yes"], [CLANGPP="no"])
AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
dnl Determine if weare using GNU sed
GNU_SED=no
$SED --version 2> /dev/null | grep -q GNU
if test $? -eq 0; then
GNU_SED=yes
fi
# Linker options
# check -R, "-Wl,-R" or -rpath (we share the AX function defined in
......@@ -105,9 +112,12 @@ AC_DEFUN([BIND10_CXX_TRY_FLAG], [
AC_MSG_RESULT([$bind10_cxx_flag])
])
CXX_VERSION="unknown"
# SunStudio compiler requires special compiler options for boost
# (http://blogs.sun.com/sga/entry/boost_mini_howto)
if test "$SUNCXX" = "yes"; then
CXX_VERSION=`$CXX -V 2> /dev/null | head -1`
CXXFLAGS="$CXXFLAGS -library=stlport4 -features=tmplife -features=tmplrefstatic"
MULTITHREADING_FLAG="-mt"
fi
......@@ -120,7 +130,8 @@ fi
# we suppress this particular warning. Note that it doesn't weaken checks
# on the source code.
if test "$CLANGPP" = "yes"; then
B10_CXXFLAGS="$B10_CXXFLAGS -Qunused-arguments"
CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
B10_CXXFLAGS="$B10_CXXFLAGS -Qunused-arguments"
fi
BIND10_CXX_TRY_FLAG([-Wno-missing-field-initializers],
......@@ -129,6 +140,7 @@ AC_SUBST(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# gcc specific settings:
if test "X$GXX" = "Xyes"; then
CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
B10_CXXFLAGS="$B10_CXXFLAGS -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
case "$host" in
*-solaris*)
......@@ -718,6 +730,21 @@ then
BOTAN_INCLUDES="-I`${BOTAN_CONFIG} --prefix`/include ${BOTAN_INCLUDES}"
fi
fi
dnl Determine the Botan version
AC_MSG_CHECKING([Botan version])
cat > conftest.cpp << EOF
#include <botan/version.h>
AUTOCONF_BOTAN_VERSION=BOTAN_VERSION_MAJOR . BOTAN_VERSION_MINOR . BOTAN_VERSION_PATCH
EOF
BOTAN_VERSION=`$CPP $CPPFLAGS $BOTAN_INCLUDES conftest.cpp | grep '^AUTOCONF_BOTAN_VERSION=' | $SED -e 's/^AUTOCONF_BOTAN_VERSION=//' -e 's/[[ ]]//g' -e 's/"//g' 2> /dev/null`
if test -z "$BOTAN_VERSION"; then
BOTAN_VERSION="unknown"
fi
$RM -f conftest.cpp
AC_MSG_RESULT([$BOTAN_VERSION])
# botan-config script (and the way we call pkg-config) returns -L and -l
# as one string, but we need them in separate values
BOTAN_LDFLAGS=
......@@ -814,6 +841,7 @@ if test "$MYSQL_CONFIG" != "" ; then
MYSQL_CPPFLAGS=`$MYSQL_CONFIG --cflags`
MYSQL_LIBS=`$MYSQL_CONFIG --libs`
MYSQL_VERSION=`$MYSQL_CONFIG --version`
AC_SUBST(MYSQL_CPPFLAGS)
AC_SUBST(MYSQL_LIBS)
......@@ -892,6 +920,20 @@ AC_LINK_IFELSE(
AC_MSG_ERROR([Needs log4cplus library])]
)
dnl Determine the log4cplus version, used mainly for config.report.
AC_MSG_CHECKING([log4cplus version])
cat > conftest.cpp << EOF
#include <log4cplus/version.h>
AUTOCONF_LOG4CPLUS_VERSION=LOG4CPLUS_VERSION_STR
EOF
LOG4CPLUS_VERSION=`$CPP $CPPFLAGS conftest.cpp | grep '^AUTOCONF_LOG4CPLUS_VERSION=' | $SED -e 's/^AUTOCONF_LOG4CPLUS_VERSION=//' -e 's/[[ ]]//g' -e 's/"//g' 2> /dev/null`
if test -z "$LOG4CPLUS_VERSION"; then
LOG4CPLUS_VERSION="unknown"
fi
$RM -f conftest.cpp
AC_MSG_RESULT([$LOG4CPLUS_VERSION])
CPPFLAGS=$CPPFLAGS_SAVED
LIBS=$LIBS_SAVED
......@@ -971,6 +1013,7 @@ AC_SUBST(MULTITHREADING_FLAG)
GTEST_LDFLAGS=
GTEST_LDADD=
DISTCHECK_GTEST_CONFIGURE_FLAG=
GTEST_VERSION="unknown"
if test "x$enable_gtest" = "xyes" ; then
......@@ -1026,6 +1069,7 @@ if test "$gtest_path" != "no" ; then
GTEST_INCLUDES=`${GTEST_CONFIG} --cppflags`
GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
GTEST_LDADD=`${GTEST_CONFIG} --libs`
GTEST_VERSION=`${GTEST_CONFIG} --version`
GTEST_FOUND="true"
else
AC_MSG_WARN([Unable to locate Google Test gtest-config.])
......@@ -1560,39 +1604,69 @@ cat > config.report << END
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Package:
Name: $PACKAGE_NAME
Version: $PACKAGE_VERSION
C++ Compiler: $CXX
Flags:
DEFS: $DEFS
CPPFLAGS: $CPPFLAGS
CXXFLAGS: $CXXFLAGS
LDFLAGS: $LDFLAGS
B10_CXXFLAGS: $B10_CXXFLAGS
OS Family: $OS_TYPE
dnl includes too
Python: ${PYTHON_INCLUDES}
${PYTHON_CXXFLAGS}
${PYTHON_LDFLAGS}
${PYTHON_LIB}
Boost: ${BOOST_INCLUDES}
Botan: ${BOTAN_INCLUDES}
${BOTAN_LDFLAGS}
${BOTAN_LIBS}
Log4cplus: ${LOG4CPLUS_INCLUDES}
${LOG4CPLUS_LIBS}
SQLite: $SQLITE_CFLAGS
$SQLITE_LIBS
Name: ${PACKAGE_NAME}
Version: ${PACKAGE_VERSION}
OS Family: ${OS_TYPE}
Using GNU sed: ${GNU_SED}
C++ Compiler:
CXX: ${CXX}
CXX_VERSION: ${CXX_VERSION}
DEFS: ${DEFS}
CPPFLAGS: ${CPPFLAGS}
CXXFLAGS: ${CXXFLAGS}
LDFLAGS: ${LDFLAGS}
B10_CXXFLAGS: ${B10_CXXFLAGS}
Python:
PYTHON_VERSION: ${PYTHON_VERSION}
PYTHON_INCLUDES: ${PYTHON_INCLUDES}
PYTHON_CXXFLAGS: ${PYTHON_CXXFLAGS}
PYTHON_LDFLAGS: ${PYTHON_LDFLAGS}
PYTHON_LIB: ${PYTHON_LIB}
Boost:
BOOST_VERSION: ${BOOST_VERSION}
BOOST_INCLUDES: ${BOOST_INCLUDES}
Botan:
BOTAN_VERSION: ${BOTAN_VERSION}
BOTAN_INCLUDES: ${BOTAN_INCLUDES}
BOTAN_LDFLAGS: ${BOTAN_LDFLAGS}
BOTAN_LIBS: ${BOTAN_LIBS}
Log4cplus:
LOG4CPLUS_VERSION: ${LOG4CPLUS_VERSION}
LOG4CPLUS_INCLUDES: ${LOG4CPLUS_INCLUDES}
LOG4CPLUS_LIBS: ${LOG4CPLUS_LIBS}
SQLite:
SQLITE_VERSION: ${SQLITE_VERSION}
SQLITE_CFLAGS: ${SQLITE_CFLAGS}
SQLITE_LIBS: ${SQLITE_LIBS}
END
# Avoid confusion on DNS/DHCP and only mention MySQL if it
# were specified on the command line.
if test "$MYSQL_CPPFLAGS" != "" ; then
cat >> config.report << END
MySQL: $MYSQL_CPPFLAGS
$MYSQL_LIBS
MySQL:
MYSQL_VERSION: ${MYSQL_VERSION}
MYSQL_CPPFLAGS: ${MYSQL_CPPFLAGS}
MYSQL_LIBS: ${MYSQL_LIBS}
END
fi
if test "$enable_gtest" != "no"; then
cat >> config.report << END
GTest:
GTEST_VERSION: ${GTEST_VERSION}
GTEST_INCLUDES: ${GTEST_INCLUDES}
GTEST_LDFLAGS: ${GTEST_LDFLAGS}
GTEST_LDADD: ${GTEST_LDADD}
GTEST_SOURCE: ${GTEST_SOURCE}
END
fi
......
......@@ -185,6 +185,20 @@ CXXFLAGS="$CXXFLAGS_SAVED"
AC_SUBST(BOOST_INCLUDES)
dnl Determine the Boost version, used mainly for config.report.
AC_MSG_CHECKING([Boost version])
cat > conftest.cpp << EOF
#include <boost/version.hpp>
AUTOCONF_BOOST_LIB_VERSION=BOOST_LIB_VERSION
EOF
BOOST_VERSION=`$CPP $CPPFLAGS conftest.cpp | grep '^AUTOCONF_BOOST_LIB_VERSION=' | $SED -e 's/^AUTOCONF_BOOST_LIB_VERSION=//' -e 's/_/./g' -e 's/"//g' 2> /dev/null`
if test -z "$BOOST_VERSION"; then
BOOST_VERSION="unknown"
fi
$RM -f conftest.cpp
AC_MSG_RESULT([$BOOST_VERSION])
CPPFLAGS="$CPPFLAGS_SAVED"
AC_LANG_RESTORE
])dnl AX_BOOST_FOR_BIND10
......@@ -13,8 +13,25 @@ dnl in PATH.
AC_DEFUN([AX_SQLITE3_FOR_BIND10], [
PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.3.9,
have_sqlite="yes",
have_sqlite="no (sqlite3 not detected)")
[have_sqlite="yes"
dnl Determine the SQLite version, used mainly for config.report.
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="${CPPFLAGS} $SQLITE_CFLAGS"
AC_MSG_CHECKING([SQLite version])
cat > conftest.c << EOF
#include <sqlite3.h>
AUTOCONF_SQLITE_VERSION=SQLITE_VERSION
EOF
SQLITE_VERSION=`$CPP $CPPFLAGS conftest.c | grep '^AUTOCONF_SQLITE_VERSION=' | $SED -e 's/^AUTOCONF_SQLITE_VERSION=//' -e 's/"//g' 2> /dev/null`
if test -z "$SQLITE_VERSION"; then
SQLITE_VERSION="unknown"
fi
$RM -f conftest.c
AC_MSG_RESULT([$SQLITE_VERSION])
CPPFLAGS="$CPPFLAGS_SAVED"
],have_sqlite="no (sqlite3 not detected)")
# Check for sqlite3 program
AC_PATH_PROG(SQLITE3_PROGRAM, sqlite3, no)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment