Commit cbba4ee6 authored by Francis Dupont's avatar Francis Dupont

[master] Merged trac5057 (configure vs gtest-1.8.0)

parents 28ce6245 72961fc6
...@@ -34,7 +34,7 @@ AC_PROG_CXX ...@@ -34,7 +34,7 @@ AC_PROG_CXX
# Check for exact Kea version. # Check for exact Kea version.
AC_MSG_CHECKING(whether this is a tarball or git source) AC_MSG_CHECKING(whether this is a tarball or git source)
if test -d "${srcdir}/.git"; then if test -d "${srcdir}/.git"; then
KEA_SRCID="git `(cd "${top_srcdir}";git rev-parse HEAD)`" KEA_SRCID="git `(cd "${top_srcdir}";git rev-parse HEAD)`"
AC_MSG_RESULT("git") AC_MSG_RESULT("git")
else else
KEA_SRCID="tarball" KEA_SRCID="tarball"
...@@ -46,15 +46,15 @@ AC_DEFINE_UNQUOTED([EXTENDED_VERSION], ["${KEA_SRCID}"], [Extended Kea version]) ...@@ -46,15 +46,15 @@ AC_DEFINE_UNQUOTED([EXTENDED_VERSION], ["${KEA_SRCID}"], [Extended Kea version])
# Find a separator for path_replacer # Find a separator for path_replacer
for sep in "+" "," ";" "&" "__NONE__"; do for sep in "+" "," ";" "&" "__NONE__"; do
if `pwd | grep -q $sep`; then continue; fi if `pwd | grep -q $sep`; then continue; fi
if `echo ${prefix} | grep -q $sep`; then continue; fi if `echo ${prefix} | grep -q $sep`; then continue; fi
if `echo ${sysconfdir} | grep -q $sep`; then continue; fi if `echo ${sysconfdir} | grep -q $sep`; then continue; fi
if `echo ${localstatedir} | grep -q $sep`; then continue; fi if `echo ${localstatedir} | grep -q $sep`; then continue; fi
SEP=$sep SEP=$sep
break break
done done
if test "$sep" = "__NONE__"; then if test "$sep" = "__NONE__"; then
AC_MSG_ERROR([can't find a separator character in '+,;&' for the path_replacer shell script]) AC_MSG_ERROR([can't find a separator character in '+,;&' for the path_replacer shell script])
fi fi
AC_SUBST(SEP) AC_SUBST(SEP)
...@@ -131,7 +131,7 @@ long v = __cplusplus; ...@@ -131,7 +131,7 @@ long v = __cplusplus;
EOF EOF
CXX_STANDARD=`$CXX $CXXFLAGS -E -o - conftest.cpp | grep '^long v = ' | $SED -e 's/^long v = //' -e 's/[[^0-9]]*$//' 2> /dev/null` CXX_STANDARD=`$CXX $CXXFLAGS -E -o - conftest.cpp | grep '^long v = ' | $SED -e 's/^long v = //' -e 's/[[^0-9]]*$//' 2> /dev/null`
if test -z "$CXX_STANDARD"; then if test -z "$CXX_STANDARD"; then
CXX_STANDARD="unknown" CXX_STANDARD="unknown"
fi fi
AC_MSG_RESULT([$CXX_STANDARD]) AC_MSG_RESULT([$CXX_STANDARD])
...@@ -208,16 +208,16 @@ AC_SUBST(WARNING_GCC_44_STRICT_ALIASING_CFLAG) ...@@ -208,16 +208,16 @@ AC_SUBST(WARNING_GCC_44_STRICT_ALIASING_CFLAG)
case "$host" in case "$host" in
*-solaris*) *-solaris*)
MULTITHREADING_FLAG=-pthreads MULTITHREADING_FLAG=-pthreads
# In Solaris, IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need -Wno-missing-braces # In Solaris, IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need -Wno-missing-braces
KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-missing-braces" KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-missing-braces"
;; ;;
*-apple-darwin*) *-apple-darwin*)
MULTITHREADING_FLAG= MULTITHREADING_FLAG=
;; ;;
*) *)
MULTITHREADING_FLAG=-pthread MULTITHREADING_FLAG=-pthread
;; ;;
esac esac
KEA_CXXFLAGS="$KEA_CXXFLAGS $MULTITHREADING_FLAG" KEA_CXXFLAGS="$KEA_CXXFLAGS $MULTITHREADING_FLAG"
...@@ -243,7 +243,7 @@ AC_ARG_WITH(werror, ...@@ -243,7 +243,7 @@ AC_ARG_WITH(werror,
yes) with_werror=1 ;; yes) with_werror=1 ;;
no) with_werror=0 ;; no) with_werror=0 ;;
-*) with_werror=1; werror_extras=${withval} ;; -*) with_werror=1; werror_extras=${withval} ;;
*) AC_MSG_ERROR(bad value ${withval} for --with-werror) ;; *) AC_MSG_ERROR(bad value ${withval} for --with-werror) ;;
esac], esac],
[with_werror=0]) [with_werror=0])
...@@ -260,10 +260,10 @@ if test $with_werror = 1; then ...@@ -260,10 +260,10 @@ if test $with_werror = 1; then
# "unused private members", causing a false positive. # "unused private members", causing a false positive.
AC_TRY_COMPILE([namespace { struct Foo {}; } AC_TRY_COMPILE([namespace { struct Foo {}; }
namespace isc {struct Bar {Foo foo_;};} ],, namespace isc {struct Bar {Foo foo_;};} ],,
[AC_MSG_RESULT(no) [AC_MSG_RESULT(no)
werror_ok=1 werror_ok=1
KEA_CXXFLAGS="$KEA_CXXFLAGS -Werror"], KEA_CXXFLAGS="$KEA_CXXFLAGS -Werror"],
[AC_MSG_RESULT(yes)]) [AC_MSG_RESULT(yes)])
CXXFLAGS="$CXXFLAGS_SAVED" CXXFLAGS="$CXXFLAGS_SAVED"
fi fi
...@@ -274,24 +274,24 @@ fi ...@@ -274,24 +274,24 @@ fi
# https://svn.boost.org/trac/boost/ticket/3477 # https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag. # But older GCC compilers don't have the flag.
KEA_CXX_TRY_FLAG([-Wno-missing-field-initializers], KEA_CXX_TRY_FLAG([-Wno-missing-field-initializers],
[KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-missing-field-initializers"]) [KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-missing-field-initializers"])
if test "X$CLANGPP" = "Xyes"; then if test "X$CLANGPP" = "Xyes"; then
# This is to workaround unused variables tcout and tcerr in # This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h and unused parameters from some of the # log4cplus's streams.h and unused parameters from some of the
# Boost headers. # Boost headers.
KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-unused-variable -Wno-unused-parameter" KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-unused-variable -Wno-unused-parameter"
fi fi
# Add the extras at the very last # Add the extras at the very last
# Note it can be used to re-enable a (fatal) warning # Note it can be used to re-enable a (fatal) warning
for extra in $werror_extras; do for extra in $werror_extras; do
KEA_CXX_TRY_FLAG([$extra], KEA_CXX_TRY_FLAG([$extra],
[KEA_CXXFLAGS="$KEA_CXXFLAGS $extra"], [KEA_CXXFLAGS="$KEA_CXXFLAGS $extra"],
[AC_MSG_ERROR([$CXX does not support $extra"])]) [AC_MSG_ERROR([$CXX does not support $extra"])])
done done
fi dnl GXX = yes fi dnl GXX = yes
# allow building programs with static link. we need to make it selective # allow building programs with static link. we need to make it selective
# because loadable modules cannot be statically linked. # because loadable modules cannot be statically linked.
...@@ -304,10 +304,10 @@ AM_COND_IF([USE_STATIC_LINK], [AC_DEFINE([USE_STATIC_LINK], [1], [Was Kea static ...@@ -304,10 +304,10 @@ AM_COND_IF([USE_STATIC_LINK], [AC_DEFINE([USE_STATIC_LINK], [1], [Was Kea static
# Check validity about some libtool options # Check validity about some libtool options
if test $enable_static_link = yes -a $enable_static = no; then if test $enable_static_link = yes -a $enable_static = no; then
AC_MSG_ERROR([--enable-static-link requires --enable-static]) AC_MSG_ERROR([--enable-static-link requires --enable-static])
fi fi
if test $enable_static_link = no -a $enable_shared = no; then if test $enable_static_link = no -a $enable_shared = no; then
AC_MSG_ERROR([--disable-static-link requires --enable-shared]) AC_MSG_ERROR([--disable-static-link requires --enable-shared])
fi fi
# OS dependent configuration # OS dependent configuration
...@@ -315,48 +315,48 @@ kea_undefined_pthread_behavior=no ...@@ -315,48 +315,48 @@ kea_undefined_pthread_behavior=no
case "$host" in case "$host" in
*-solaris*) *-solaris*)
# Solaris requires special definitions to get some standard libraries # Solaris requires special definitions to get some standard libraries
# (e.g. getopt(3)) available with common used header files. # (e.g. getopt(3)) available with common used header files.
CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__" CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
# "now" binding is necessary to prevent deadlocks in C++ static initialization code # "now" binding is necessary to prevent deadlocks in C++ static initialization code
LDFLAGS="$LDFLAGS -z now" LDFLAGS="$LDFLAGS -z now"
# Destroying locked mutexes, condition variables being waited # Destroying locked mutexes, condition variables being waited
# on, etc. are undefined behavior on Solaris, so we set it as # on, etc. are undefined behavior on Solaris, so we set it as
# such here. # such here.
kea_undefined_pthread_behavior=yes kea_undefined_pthread_behavior=yes
;; ;;
*-apple-darwin*) *-apple-darwin*)
# Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use # Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use
# (RFC2292 or RFC3542). # (RFC2292 or RFC3542).
CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542" CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542"
# In OS X 10.9 (and possibly any future versions?) pthread_cond_destroy # In OS X 10.9 (and possibly any future versions?) pthread_cond_destroy
# doesn't work as documented, which makes some of unit tests fail. # doesn't work as documented, which makes some of unit tests fail.
AC_MSG_CHECKING([OS X versions where destroying locked locks do not fail]) AC_MSG_CHECKING([OS X versions where destroying locked locks do not fail])
AC_TRY_COMPILE( AC_TRY_COMPILE(
[#include <Availability.h>], [#include <Availability.h>],
[#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED [#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#error " OS X >= 10.9" #error " OS X >= 10.9"
#endif #endif
#endif #endif
return 1;], return 1;],
[AC_MSG_RESULT([OS X < 10.9])], [AC_MSG_RESULT([OS X < 10.9])],
[AC_MSG_RESULT([OS X >= 10.9]) [AC_MSG_RESULT([OS X >= 10.9])
kea_undefined_pthread_behavior=yes]) kea_undefined_pthread_behavior=yes])
;; ;;
*-freebsd*) *-freebsd*)
# On FreeBSD10.1 pthread_cond_destroy doesn't work as documented, which # On FreeBSD10.1 pthread_cond_destroy doesn't work as documented, which
# causes the CondVarTest.destroyWhileWait test to fail. According to the # causes the CondVarTest.destroyWhileWait test to fail. According to the
# pthread_cond_destroy documentation for FreeBSD, this function should # pthread_cond_destroy documentation for FreeBSD, this function should
# return EBUSY error when there is a thread waiting for the conditional # return EBUSY error when there is a thread waiting for the conditional
# variable, whereas this function returned success code. We treat it here # variable, whereas this function returned success code. We treat it here
# as an undefined behavior. Also note that this issue was only visible # as an undefined behavior. Also note that this issue was only visible
# when gtest 1.7 was in use, because the previous versions of gtest # when gtest 1.7 was in use, because the previous versions of gtest
# didn't seem to have support for the death tests on FreeBSD. As a # didn't seem to have support for the death tests on FreeBSD. As a
# result, the test was not executed and the error didn't occur. # result, the test was not executed and the error didn't occur.
kea_undefined_pthread_behavior=yes kea_undefined_pthread_behavior=yes
;; ;;
esac esac
if [ test $kea_undefined_pthread_behavior = "yes" ]; then if [ test $kea_undefined_pthread_behavior = "yes" ]; then
AC_DEFINE([HAS_UNDEFINED_PTHREAD_BEHAVIOR], [1], [Does this platform have some undefined pthreads behavior?]) AC_DEFINE([HAS_UNDEFINED_PTHREAD_BEHAVIOR], [1], [Does this platform have some undefined pthreads behavior?])
...@@ -372,9 +372,9 @@ fi ...@@ -372,9 +372,9 @@ fi
# of that version of Solaris. # of that version of Solaris.
case "$host" in case "$host" in
*-solaris2.10) *-solaris2.10)
AC_DEFINE([HAVE_BROKEN_GET_IPV6_USE_MIN_MTU], [1], AC_DEFINE([HAVE_BROKEN_GET_IPV6_USE_MIN_MTU], [1],
[Define to 1 if getsockopt(IPV6_USE_MIN_MTU) does not work]) [Define to 1 if getsockopt(IPV6_USE_MIN_MTU) does not work])
;; ;;
esac esac
m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3.4 python3.3 python3.2 python3.1 python3]) m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3.4 python3.3 python3.2 python3.1 python3])
...@@ -383,31 +383,31 @@ AC_HELP_STRING([--with-pythonpath=PATH], ...@@ -383,31 +383,31 @@ AC_HELP_STRING([--with-pythonpath=PATH],
[specify an absolute path to python executable when automatic version check (incorrectly) fails]), [specify an absolute path to python executable when automatic version check (incorrectly) fails]),
[python_path="$withval"], [python_path="auto"]) [python_path="$withval"], [python_path="auto"])
if test "$python_path" = auto; then if test "$python_path" = auto; then
AM_PATH_PYTHON([3.1],,[PYTHON=no]) AM_PATH_PYTHON([3.1],,[PYTHON=no])
else else
# Older versions of automake can't handle python3 well. This is an # Older versions of automake can't handle python3 well. This is an
# in-house workaround for them. # in-house workaround for them.
PYTHON=$python_path PYTHON=$python_path
AC_SUBST(PYTHON) AC_SUBST(PYTHON)
PYTHON_PREFIX='${prefix}' PYTHON_PREFIX='${prefix}'
AC_SUBST(PYTHON_PREFIX) AC_SUBST(PYTHON_PREFIX)
PYTHON_EXEC_PREFIX='$(exec_prefix)' PYTHON_EXEC_PREFIX='$(exec_prefix)'
AC_SUBST(PYTHON_EXEC_PREFIX) AC_SUBST(PYTHON_EXEC_PREFIX)
PYTHON_VERSION=[`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`] PYTHON_VERSION=[`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`]
if test `echo "$PYTHON_VERSION >= 3.1" | bc` != 1 ; then if test `echo "$PYTHON_VERSION >= 3.1" | bc` != 1 ; then
AC_MSG_ERROR(["Python version too old: $PYTHON_VERSION, need 3.1 or higher"]) AC_MSG_ERROR(["Python version too old: $PYTHON_VERSION, need 3.1 or higher"])
fi fi
AC_SUBST(PYTHON_VERSION) AC_SUBST(PYTHON_VERSION)
PYTHON_PLATFORM=`$PYTHON -c "import sys; print(sys.platform)"` PYTHON_PLATFORM=`$PYTHON -c "import sys; print(sys.platform)"`
AC_SUBST(PYTHON_PLATFORM) AC_SUBST(PYTHON_PLATFORM)
pythondir='${prefix}/lib/python'$PYTHON_VERSION'/site-packages' pythondir='${prefix}/lib/python'$PYTHON_VERSION'/site-packages'
AC_SUBST(pythondir) AC_SUBST(pythondir)
pkgpythondir='${pythondir}/'$PACKAGE pkgpythondir='${pythondir}/'$PACKAGE
AC_SUBST(pkgpythondir) AC_SUBST(pkgpythondir)
pyexecdir='${exec_prefix}/lib/python'$PYTHON_VERSION'/site-packages' pyexecdir='${exec_prefix}/lib/python'$PYTHON_VERSION'/site-packages'
AC_SUBST(pyexecdir) AC_SUBST(pyexecdir)
pkgpyexecdir='${pyexecdir}/'$PACKAGE pkgpyexecdir='${pyexecdir}/'$PACKAGE
AC_SUBST(pkgpyexecdir) AC_SUBST(pkgpyexecdir)
fi fi
# produce PIC unless we disable shared libraries. need this for python bindings. # produce PIC unless we disable shared libraries. need this for python bindings.
...@@ -509,43 +509,43 @@ AC_ARG_WITH([gtest-source], ...@@ -509,43 +509,43 @@ AC_ARG_WITH([gtest-source],
[enable_gtest="yes" ; GTEST_SOURCE="$withval"]) [enable_gtest="yes" ; GTEST_SOURCE="$withval"])
AC_ARG_WITH([gtest], AC_ARG_WITH([gtest],
[AS_HELP_STRING([--with-gtest=PATH], [AS_HELP_STRING([--with-gtest=PATH],
[specify a path to gtest header files (PATH/include) and library (PATH/lib)])], [specify a path to gtest header files (PATH/include) and library (PATH/lib)])],
[gtest_path="$withval"; enable_gtest="yes"], [gtest_path="no"]) [gtest_path="$withval"; enable_gtest="yes"], [gtest_path="no"])
AC_ARG_WITH(lcov, AC_ARG_WITH(lcov,
[ --with-lcov[=PROGRAM] enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no") [ --with-lcov[=PROGRAM] enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
USE_LCOV="no" USE_LCOV="no"
if test "$lcov" != "no"; then if test "$lcov" != "no"; then
# force gtest if not set # force gtest if not set
if test "$enable_gtest" = "no"; then if test "$enable_gtest" = "no"; then
# AC_MSG_ERROR("lcov needs gtest for test coverage report") # AC_MSG_ERROR("lcov needs gtest for test coverage report")
AC_MSG_NOTICE([gtest support is now enabled, because used by coverage tests]) AC_MSG_NOTICE([gtest support is now enabled, because used by coverage tests])
enable_gtest="yes" enable_gtest="yes"
fi fi
if test "$lcov" != "yes"; then if test "$lcov" != "yes"; then
LCOV=$lcov LCOV=$lcov
else else
AC_PATH_PROG([LCOV], [lcov]) AC_PATH_PROG([LCOV], [lcov])
fi fi
if test -x "${LCOV}"; then if test -x "${LCOV}"; then
USE_LCOV="yes" USE_LCOV="yes"
else else
AC_MSG_ERROR([Cannot find lcov.]) AC_MSG_ERROR([Cannot find lcov.])
fi fi
# is genhtml always in the same directory? # is genhtml always in the same directory?
GENHTML=`echo "$LCOV" | ${SED} s/lcov$/genhtml/` GENHTML=`echo "$LCOV" | ${SED} s/lcov$/genhtml/`
if test ! -x $GENHTML; then if test ! -x $GENHTML; then
AC_MSG_ERROR([genhtml not found, needed for lcov]) AC_MSG_ERROR([genhtml not found, needed for lcov])
fi fi
# GCC specific? # GCC specific?
CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage" CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
LIBS=" $LIBS -lgcov" LIBS=" $LIBS -lgcov"
AC_SUBST(CPPFLAGS) AC_SUBST(CPPFLAGS)
AC_SUBST(LIBS) AC_SUBST(LIBS)
AC_SUBST(LCOV) AC_SUBST(LCOV)
AC_SUBST(GENHTML) AC_SUBST(GENHTML)
fi fi
AC_SUBST(USE_LCOV) AC_SUBST(USE_LCOV)
...@@ -728,7 +728,7 @@ then ...@@ -728,7 +728,7 @@ then
AUTOCONF_BOTAN_VERSION=BOTAN_VERSION_MAJOR . BOTAN_VERSION_MINOR . BOTAN_VERSION_PATCH AUTOCONF_BOTAN_VERSION=BOTAN_VERSION_MAJOR . BOTAN_VERSION_MINOR . BOTAN_VERSION_PATCH
EOF EOF
CRYPTO_VERSION=`$CPP $CPPFLAGS $CRYPTO_INCLUDES conftest.cpp | grep '^AUTOCONF_BOTAN_VERSION=' | $SED -e 's/^AUTOCONF_BOTAN_VERSION=//' -e 's/[[ ]]//g' -e 's/"//g' 2> /dev/null` CRYPTO_VERSION=`$CPP $CPPFLAGS $CRYPTO_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 "$CRYPTO_VERSION"; then if test -z "$CRYPTO_VERSION"; then
CRYPTO_VERSION="unknown" CRYPTO_VERSION="unknown"
fi fi
...@@ -777,16 +777,16 @@ EOF ...@@ -777,16 +777,16 @@ EOF
CRYPTO_LIBS="" CRYPTO_LIBS=""
CRYPTO_LDFLAGS="" CRYPTO_LDFLAGS=""
CRYPTO_RPATH="" CRYPTO_RPATH=""
if test "x$ac_header_preproc" = "xyes"; then if test "x$ac_header_preproc" = "xyes"; then
AC_MSG_RESULT([ AC_MSG_RESULT([
botan/botan.h was found but is unusable. The most common cause of this problem botan/botan.h was found but is unusable. The most common cause of this problem
is attempting to use an updated C++ compiler with older C++ libraries, such as is attempting to use an updated C++ compiler with older C++ libraries, such as
the version of Botan that comes with your distribution. If you have updated the version of Botan that comes with your distribution. If you have updated
your C++ compiler we highly recommend that you use support libraries such as your C++ compiler we highly recommend that you use support libraries such as
Boost and Botan that were compiled with the same compiler version.]) Boost and Botan that were compiled with the same compiler version.])
else else
AC_MSG_RESULT([Missing required header files.]) AC_MSG_RESULT([Missing required header files.])
fi] fi]
) )
CPPFLAGS=$CPPFLAGS_SAVED CPPFLAGS=$CPPFLAGS_SAVED
LIBS=$LIBS_SAVED LIBS=$LIBS_SAVED
...@@ -1119,15 +1119,15 @@ elif test "${log4cplus_path}" != "yes" ; then ...@@ -1119,15 +1119,15 @@ elif test "${log4cplus_path}" != "yes" ; then
LOG4CPLUS_LIBS="-L${log4cplus_path}/lib" LOG4CPLUS_LIBS="-L${log4cplus_path}/lib"
else else
# If not specified, try some common paths. # If not specified, try some common paths.
log4cplusdirs="/usr /usr/local /usr/pkg /opt /opt/local" log4cplusdirs="/usr /usr/local /usr/pkg /opt /opt/local"
for d in $log4cplusdirs for d in $log4cplusdirs
do do
if test -f $d/include/log4cplus/logger.h; then if test -f $d/include/log4cplus/logger.h; then
LOG4CPLUS_INCLUDES="-I$d/include" LOG4CPLUS_INCLUDES="-I$d/include"
LOG4CPLUS_LIBS="-L$d/lib -L$d/lib64" LOG4CPLUS_LIBS="-L$d/lib -L$d/lib64"
break break
fi fi
done done
fi fi
LOG4CPLUS_LIBS="$LOG4CPLUS_LIBS -llog4cplus" LOG4CPLUS_LIBS="$LOG4CPLUS_LIBS -llog4cplus"
...@@ -1159,7 +1159,7 @@ cat > conftest.cpp << EOF ...@@ -1159,7 +1159,7 @@ cat > conftest.cpp << EOF
AUTOCONF_LOG4CPLUS_VERSION=LOG4CPLUS_VERSION_STR AUTOCONF_LOG4CPLUS_VERSION=LOG4CPLUS_VERSION_STR
EOF 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` 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 if test -z "$LOG4CPLUS_VERSION"; then
LOG4CPLUS_VERSION="unknown" LOG4CPLUS_VERSION="unknown"
fi fi
...@@ -1226,6 +1226,9 @@ if test "x$enable_gtest" = "xyes" ; then ...@@ -1226,6 +1226,9 @@ if test "x$enable_gtest" = "xyes" ; then
AC_MSG_ERROR([no gtest source but it was selected]) AC_MSG_ERROR([no gtest source but it was selected])
fi fi
else else
if test ! -d $GTEST_SOURCE/src -a -d $GTEST_SOURCE/googletest; then
GTEST_SOURCE=$GTEST_SOURCE/googletest
fi
AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc] AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc]
[$GTEST_SOURCE/src/gtest_main.cc], [$GTEST_SOURCE/src/gtest_main.cc],
[have_gtest_source=yes], [have_gtest_source=yes],
...@@ -1264,6 +1267,10 @@ if test "x$enable_gtest" = "xyes" ; then ...@@ -1264,6 +1267,10 @@ if test "x$enable_gtest" = "xyes" ; then
GTEST_FOUND="false" GTEST_FOUND="false"
for dir in $GTEST_PATHS; do for dir in $GTEST_PATHS; do
if test -f "$dir/include/gtest/gtest.h"; then if test -f "$dir/include/gtest/gtest.h"; then
if ! test -f "$dir/lib/libgtests.a"; then
AC_MSG_WARN([Found Google Test include but not the library in $dir.])
continue
fi
GTEST_INCLUDES="-I$dir/include" GTEST_INCLUDES="-I$dir/include"
GTEST_LDFLAGS="-L$dir/lib" GTEST_LDFLAGS="-L$dir/lib"
GTEST_LDADD="-lgtest" GTEST_LDADD="-lgtest"
......
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