Commit e0d7c52a authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

Merge branch 'master' into trac1708

Conflicts:
	ChangeLog
	doc/guide/bind10-guide.html
	doc/guide/bind10-guide.txt
	doc/guide/bind10-messages.html
	src/bin/dhcp4/main.cc
	src/bin/dhcp6/Makefile.am
	src/bin/dhcp6/tests/Makefile.am
parents e1d0d73d ab4d2090
......@@ -35,3 +35,4 @@ TAGS
/coverage-cpp-html
/dns++.pc
/report.info
/logger_lockfile
451. [func] tomek
459. [func] tomek
b10-dhcp6: DHCPv6 server component is now integrated into
BIND10 framework. It can be started from BIND10 (using bindctl)
and can receive commands. The only supported command for now
......@@ -7,6 +7,66 @@
b10-dhcp6: Command line-switch '-s' to disable msgq was added.
(Trac #1708, git tbd)
458. [build]* jinmei
BIND 10 now relies on Boost offset_ptr, which caused some new
portability issues. Such issues are detected at ./configure time.
If ./configure stops due to this, try the following workaround:
- If it's about the use of mutable for a reference with clang++,
upgrade Boost version to 1.44 or higher, or try a different
compiler (e.g. g++ generally seems to be free from this issue)
- If it's about the use of "variadic templates", specify
--without-werror so the warning won't be promoted to an error.
Specifying BOOST_NO_USER_CONFIG in CXXFLAGS may also work
(which would be the case if Boost is installed via pkgsrc)
(Trac #2147, git 30061d1139aad8716e97d6b620c259752fd0a3cd)
457. [build]* muks
BIND 10 library names now have a "b10-" prefix. This is to avoid
clashes with other similarly named libraries on the system.
(Trac #2071, git ac20a00c28069804edc0a36050995df52f601efb)
456. [build]* muks
BIND 10 now compiles against log4cplus-1.1.0 (RC releases)
also. Note: some older versions of log4cplus don't work any more;
known oldest workable version is 1.0.4. Thanks to John Lumby for
sending a patch.
(Trac #2169, git 7d7e5269d57451191c0aef1b127d292d3615fe2c)
455. [func]* vorner
The server now uses newer API for data sources. This would be an
internal change, however, the data sources are now configured
differently. Please, migrate your configuration to the top-level
"data_sources" module.
(Trac #1976, git 0d4685b3e7603585afde1b587cbfefdfaf6a1bb3)
454. [bug] jelte
b10-cfgmgr now loads its configuration check plugins directly from
the plugin search path, as opposed to importing them from the
general python system module path list; this prevents naming
conflicts with real python modules.
(Trac #2119, git 2f68d7ac5c3c7cc88a3663191113eece32d46a3d)
453. [bug] jelte
b10-auth no longer tries to send DDNS UPDATE messages to b10-ddns if
b10-ddns is not running. Sending an UPDATE to BIND 10 that is not
configured to run DDNS will now result in a response with rcode
NOTIMP instead of SERVFAIL.
(Trac #1986, git bd6b0a5ed3481f78fb4e5cb0b18c7b6e5920f9f8)
452. [func]* muks
isc-sysinfo: An initial implementation of the isc-sysinfo tool
is now available. It gathers and outputs system information which
can be used by future tech support staff.
(Trac #2062, git 144e80212746f8d55e6a59edcf689fec9f32ae95)
451. [bug] muks, jinmei
libdatasrc: the database-based data source now correctly returns
glue records on (not under) a zone cut, such as in the case where
the NS name of an NS record is identical to its owner name. (Note:
libdatasrc itself doesn't judge what kind of record type can be a
"glue"; it's the caller's responsibility.)
(Trac #1771, git 483f1075942965f0340291e7ff7dae7806df22af)
450. [func]* tomek
b10-dhcp4: DHCPv4 server component is now integrated into
BIND10 framework. It can be started from BIND10 (using bindctl)
......@@ -286,8 +346,8 @@ bind10-devel-20120329 released on March 29, 2012
407. [build] haikuo
Remove "--enable-boost-threads" switch in configure command. This
thread lock mechanism is useless for bind10 and causes performance
hits.
thread lock mechanism is useless for bind10 and causes performance
hits.
(Trac #1680, git 9c4d0cadf4adc802cc41a2610dc2c30b25aad728)
406. [bug] muks
......@@ -783,26 +843,26 @@ bind10-devel-20120119 released on January 19, 2012
(Trac #1350, git cc20ff993da1ddb1c6e8a98370438b45a2be9e0a)
336. [func] jelte
libdns++ (and its python wrapper) now includes a class Serial, for
SOA SERIAL comparison and addition. Operations on instances of this
class follow the specification from RFC 1982.
Rdata::SOA::getSerial() now returns values of this type (and not
libdns++ (and its python wrapper) now includes a class Serial, for
SOA SERIAL comparison and addition. Operations on instances of this
class follow the specification from RFC 1982.
Rdata::SOA::getSerial() now returns values of this type (and not
uint32_t).
(Trac #1278, git 2ae72d76c74f61a67590722c73ebbf631388acbd)
335. [bug]* jelte
The DataSourceClientContainer class that dynamically loads
datasource backend libraries no longer provides just a .so file name
to its call to dlopen(), but passes it an absolute path. This means
that it is no longer an system implementation detail that depends on
[DY]LD_LIBRARY_PATH which file is chosen, should there be multiple
options (for instance, when test-running a new build while a
The DataSourceClientContainer class that dynamically loads
datasource backend libraries no longer provides just a .so file name
to its call to dlopen(), but passes it an absolute path. This means
that it is no longer an system implementation detail that depends on
[DY]LD_LIBRARY_PATH which file is chosen, should there be multiple
options (for instance, when test-running a new build while a
different version is installed).
These loadable libraries are also no longer installed in the default
library path, but in a subdirectory of the libexec directory of the
These loadable libraries are also no longer installed in the default
library path, but in a subdirectory of the libexec directory of the
target ($prefix/libexec/[version]/backends).
This also removes the need to handle b10-xfin and b10-xfrout as
'special' hardcoded components, and they are now started as regular
This also removes the need to handle b10-xfin and b10-xfrout as
'special' hardcoded components, and they are now started as regular
components as dictated by the configuration of the boss process.
(Trac #1292, git 83ce13c2d85068a1bec015361e4ef8c35590a5d0)
......@@ -947,12 +1007,12 @@ bind10-devel-20111128 released on November 28, 2011
(Trac #1228, git 31d5a4f66b18cca838ca1182b9f13034066427a7)
314. [bug] jelte
b10-xfrin would previously initiate incoming transfers upon
receiving NOTIFY messages from any address (if the zone was
known to b10-xfrin, and using the configured address). It now
only starts a transfer if the source address from the NOTIFY
packet matches the configured master address and port. This was
really already fixed in release bind10-devel-20111014, but there
b10-xfrin would previously initiate incoming transfers upon
receiving NOTIFY messages from any address (if the zone was
known to b10-xfrin, and using the configured address). It now
only starts a transfer if the source address from the NOTIFY
packet matches the configured master address and port. This was
really already fixed in release bind10-devel-20111014, but there
were some deferred cleanups to add.
(Trac #1298, git 1177bfe30e17a76bea6b6447e14ae9be9e1ca8c2)
......@@ -966,7 +1026,7 @@ bind10-devel-20111128 released on November 28, 2011
(Trac #1329, git 1aa233fab1d74dc776899df61181806679d14013)
312. [func] jelte
Added an initial framework for doing system tests using the
Added an initial framework for doing system tests using the
cucumber-based BDD tool Lettuce. A number of general steps are
included, for instance running bind10 with specific
configurations, sending queries, and inspecting query answers. A
......@@ -1344,7 +1404,7 @@ bind10-devel-20110705 released on July 05, 2011
(Trac #710, git dae1d2e24f993e1eef9ab429326652f40a006dfb)
257. [bug] y-aharen
Fixed a bug an instance of IntervalTimerImpl may be destructed
Fixed a bug an instance of IntervalTimerImpl may be destructed
while deadline_timer is holding the handler. This fix addresses
occasional failure of IntervalTimerTest.destructIntervalTimer.
(Trac #957, git e59c215e14b5718f62699ec32514453b983ff603)
......@@ -2014,7 +2074,7 @@ bind10-devel-20110120 released on January 20, 2011
(Trac #513, git 285c5ee3d5582ed6df02d1aa00387f92a74e3695)
151. [bug] smann
lib/log/dummylog.h:
lib/log/dummylog.h:
lib/log/dummylog.cc: Modify dlog so that it takes an optional
2nd argument of type bool (true or false). This flag, if
set, will cause the message to be printed whether or not
......@@ -2322,11 +2382,11 @@ bind10-devel-20101201 released on December 01, 2010
104. [bug] jerry
bin/zonemgr: zonemgr should be attempting to refresh expired zones.
(Trac #336, r3139)
103. [bug] jerry
lib/python/isc/log: Fixed an issue with python logging,
python log shouldn't die with OSError. (Trac #267, r3137)
102. [build] jinmei
Disable threads in ASIO to minimize build time dependency.
(Trac #345, r3100)
......@@ -2361,7 +2421,7 @@ bind10-devel-20101201 released on December 01, 2010
it can be customized; Make sure --disable-static works.
(Trac #325, r2976)
bind10-devel-20100917 released on September 17, 2010
bind10-devel-20100917 released on September 17, 2010
95. [doc] jreed
Add b10-zonemgr manual page. Update other docs to introduce
......@@ -2414,14 +2474,14 @@ bind10-devel-20100917 released on September 17, 2010
reason. (Trac #296, r2761)
87. [func] zhanglikun
lib/python/isc/notifyout: Add the feature of notify-out, when
lib/python/isc/notifyout: Add the feature of notify-out, when
zone axfr/ixfr finishing, the server will notify its slaves.
(Trac #289, svn r2737)
86. [func] jerry
bin/zonemgr: Added zone manager module. The zone manager is one
of the co-operating processes of BIND10, which keeps track of
timers and other information necessary for BIND10 to act as a
bin/zonemgr: Added zone manager module. The zone manager is one
of the co-operating processes of BIND10, which keeps track of
timers and other information necessary for BIND10 to act as a
slave. (Trac #215, svn r2737)
85. [build]* jinmei
......@@ -2434,7 +2494,7 @@ bind10-devel-20100917 released on September 17, 2010
bind10-devel-20100812 released on August 12, 2010
84. [bug] jinmei, jerry
This is a quick fix patch for the issue: AXFR fails half the
This is a quick fix patch for the issue: AXFR fails half the
time because of connection problems. xfrout client will make
a new connection every time. (Trac #299, svn r2697)
......@@ -2484,7 +2544,7 @@ bind10-devel-20100812 released on August 12, 2010
(Trac #256, r2549)
77. [func] zhanglikun
Make error message be more friendly when running cmdctl and it's
Make error message be more friendly when running cmdctl and it's
already running (listening on same port)(Trac #277, r2540)
76. [bug] jelte
......@@ -2540,8 +2600,8 @@ bind10-devel-20100701 released on July 1, 2010
68. [func] zhanglikun
Add options -c (--certificate-chain) to bindctl. Override class
HTTPSConnection to support server certificate validation.
Add support to cmdctl.spec file, now there are three configurable
items for cmdctl: 'key_file', 'cert_file' and 'accounts_file',
Add support to cmdctl.spec file, now there are three configurable
items for cmdctl: 'key_file', 'cert_file' and 'accounts_file',
all of them can be changed in runtime.
(Trac #127, svn r2357)
......@@ -2561,7 +2621,7 @@ bind10-devel-20100701 released on July 1, 2010
section; this, among other things, will prevent multiple copies
of the same CNAME from showing up when there's a loop. (Trac #69,
svn r2350)
65. [func] shentingting
Various loadzone improvements: allow optional comment for
$TTL, allow optional origin and comment for $INCLUDE, allow
......@@ -2582,7 +2642,7 @@ bind10-devel-20100701 released on July 1, 2010
63. [func] shane
Added initial support for setuid(), using the "-u" flag. This will
be replaced in the future, but for now provides a reasonable
be replaced in the future, but for now provides a reasonable
starting point.
(Trac #180, svn r2330)
......@@ -2631,17 +2691,17 @@ bind10-devel-20100701 released on July 1, 2010
(Trac #224, svn r2103)
53. [bug] zhanglikun
bin/bindctl: Generate a unique session ID by using
socket.gethostname() instead of socket.gethostbyname(),
since the latter one could make bindctl stall if its own
bin/bindctl: Generate a unique session ID by using
socket.gethostname() instead of socket.gethostbyname(),
since the latter one could make bindctl stall if its own
host name can't be resolved.
(Trac #228, svn r2096)
52. [func] zhanglikun
bin/xfrout: When xfrout is launched, check whether the
socket file is being used by one running xfrout process,
if it is, exit from python. If the file isn't a socket file
or nobody is listening, it will be removed. If it can't
socket file is being used by one running xfrout process,
if it is, exit from python. If the file isn't a socket file
or nobody is listening, it will be removed. If it can't
be removed, exit from python.
(Trac #151, svn r2091)
......@@ -2654,7 +2714,7 @@ bind10-devel-20100602 released on June 2, 2010
(Trac #223)
50. [bug] zhanglikun
bin/xfrin: a regression in xfrin: it can't communicate with
bin/xfrin: a regression in xfrin: it can't communicate with
a remote server. (Trac #218, svn r2038)
49. [func]* jelte
......
......@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
# ^^^^^^^^ This has to be the first line and cannot come later in this
# Makefile.am due to some bork in some versions of autotools.
SUBDIRS = compatcheck doc src tests
SUBDIRS = compatcheck doc . src tests
USE_LCOV=@USE_LCOV@
LCOV=@LCOV@
GENHTML=@GENHTML@
......@@ -427,3 +427,9 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dns++.pc
CLEANFILES = $(abs_top_builddir)/logger_lockfile
if HAVE_GTEST_SOURCE
noinst_LIBRARIES = libgtest.a
libgtest_a_CXXFLAGS = $(GTEST_INCLUDES) $(AM_CXXFLAGS)
nodist_libgtest_a_SOURCES = $(GTEST_SOURCE)/src/gtest-all.cc
endif
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT(bind10-devel, 20120405, bind10-dev@isc.org)
AC_INIT(bind10-devel, 20120712, bind10-dev@isc.org)
AC_CONFIG_SRCDIR(README)
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])dnl be backward compatible
......@@ -454,20 +454,30 @@ AC_SUBST(PYCOVERAGE)
AC_SUBST(PYCOVERAGE_RUN)
AC_SUBST(USE_PYCOVERAGE)
enable_gtest="no"
GTEST_INCLUDES=
AC_ARG_WITH([gtest-source],
[AS_HELP_STRING([--with-gtest-source=PATH],
[location of the Googletest source, defaults to /usr/src/gtest])],
[enable_gtest="yes" ; GTEST_SOURCE="$withval"],
[GTEST_SOURCE="/usr/src/gtest"])
AC_ARG_WITH([gtest],
[AS_HELP_STRING([--with-gtest=PATH],
[specify a path to gtest header files (PATH/include) and library (PATH/lib)])],
[gtest_path="$withval"; enable_gtest="yes"], [gtest_path="no"])
AC_ARG_WITH(lcov,
[ --with-lcov[=PROGRAM] enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
AC_ARG_WITH(gtest,
[ --with-gtest=PATH specify a path to gtest header files (PATH/include) and library (PATH/lib)],
gtest_path="$withval", gtest_path="no")
USE_LCOV="no"
if test "$lcov" != "no"; then
# force gtest if not set
if test "$gtest_path" = "no"; then
if test "$enable_gtest" = "no"; then
# AC_MSG_ERROR("lcov needs gtest for test coverage report")
AC_MSG_NOTICE([gtest support is now enabled, because used by coverage tests])
gtest_path="yes"
enable_gtest="yes"
fi
if test "$lcov" != "yes"; then
LCOV=$lcov
......@@ -799,6 +809,17 @@ AC_TRY_COMPILE([
CPPFLAGS_BOOST_THREADCONF="-DBOOST_DISABLE_THREADS=1"],
[AC_MSG_RESULT(yes)])
# Boost offset_ptr is required in one library (not optional right now), and
# it's known it doesn't compile on some platforms, depending on boost version,
# its local configuration, and compiler.
AC_MSG_CHECKING([Boost offset_ptr compiles])
AC_TRY_COMPILE([
#include <boost/interprocess/offset_ptr.hpp>
],,
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([Failed to compile a required header file. Try upgrading Boost to 1.44 or higher (when using clang++) or specifying --without-werror. See the ChangeLog entry for Trac no. 2147 for more details.])])
CPPFLAGS="$CPPFLAGS_SAVES $CPPFLAGS_BOOST_THREADCONF"
AC_SUBST(BOOST_INCLUDES)
......@@ -813,98 +834,138 @@ AC_SUBST(MULTITHREADING_FLAG)
#
# Check availability of gtest, which will be used for unit tests.
#
if test "$gtest_path" != "no"
then
DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest=\"$gtest_path\""
if test "$gtest_path" != "yes"; then
GTEST_PATHS=$gtest_path
if test -x "${gtest_path}/bin/gtest-config" ; then
GTEST_CONFIG="${gtest_path}/bin/gtest-config"
fi
else
AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
fi
if test -x "${GTEST_CONFIG}" ; then :
# using cppflags instead of cxxflags
GTEST_INCLUDES=`${GTEST_CONFIG} --cppflags`
GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
GTEST_LDADD=`${GTEST_CONFIG} --libs`
GTEST_FOUND="true"
else
AC_MSG_WARN([Unable to locate Google Test gtest-config.])
if test -z "${GTEST_PATHS}" ; then
GTEST_PATHS="/usr /usr/local"
fi
GTEST_FOUND="false"
fi
if test "${GTEST_FOUND}" != "true"; then
GTEST_FOUND="false"
for dir in $GTEST_PATHS; do
if test -f "$dir/include/gtest/gtest.h"; then
GTEST_INCLUDES="-I$dir/include"
GTEST_LDFLAGS="-L$dir/lib"
GTEST_LDADD="-lgtest"
GTEST_FOUND="true"
# There is no gtest-config script on this
# system, which is supposed to inform us
# whether we need pthreads as well (a
# gtest compile-time option). So we still
# need to test that manually.
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTEST_INCLUDES"
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $GTEST_LDFLAGS"
LIBS_SAVED=$LIBS
LIBS="$LIBS $GTEST_LDADD"
AC_MSG_CHECKING([Checking whether gtest tests need pthreads])
# First try to compile without pthreads
AC_TRY_LINK([
#include <gtest/gtest.h>
],[
int i = 0;
char* c = NULL;
::testing::InitGoogleTest(&i, &c);
return (0);
],
[ AC_MSG_RESULT(no) ],
[
LIBS="$SAVED_LIBS $GTEST_LDADD $PTHREAD_LDFLAGS"
# Now try to compile with pthreads
AC_TRY_LINK([
#include <gtest/gtest.h>
],[
int i = 0;
char* c = NULL;
::testing::InitGoogleTest(&i, &c);
return (0);
],
[ AC_MSG_RESULT(yes)
GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
],
# Apparently we can't compile it at all
[ AC_MSG_ERROR(unable to compile with gtest) ])
])
CPPFLAGS=$CPPFLAGS_SAVED
LDFLAGS=$LDFLAGS_SAVED
LIBS=$LIBS_SAVED
break
fi
done
fi
if test "${GTEST_FOUND}" != "true"; then
AC_MSG_ERROR([Cannot find gtest in: $GTEST_PATHS])
fi
else
GTEST_INCLUDES=
GTEST_LDFLAGS=
GTEST_LDADD=
DISTCHECK_GTEST_CONFIGURE_FLAG=
GTEST_LDFLAGS=
GTEST_LDADD=
# TODO: set DISTCHECK_GTEST_CONFIGURE_FLAG for --with-gtest too
DISTCHECK_GTEST_CONFIGURE_FLAG=
if test "x$enable_gtest" = "xyes" ; then
if test -n "$with_gtest_source" ; then
if test "x$GTEST_SOURCE" = "xyes" ; then
AC_MSG_CHECKING([for gtest source])
# If not specified, try some common paths.
GTEST_SOURCE=
for d in /usr/src/gtest /usr/local /usr/pkg /opt /opt/local ; do
if test -f $d/src/gtest-all.cc -a $d/src/gtest_main.cc; then
GTEST_SOURCE=$d
AC_MSG_RESULT([$GTEST_SOURCE])
break
fi
done
if test -z $GTEST_SOURCE ; then
AC_MSG_ERROR([no gtest source but it was selected])
fi
else
AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc]
[$GTEST_SOURCE/src/gtest_main.cc],
[have_gtest_source=yes],
[AC_MSG_ERROR([no gtest source at $GTEST_SOURCE])])
fi
have_gtest_source=yes
GTEST_LDFLAGS="\$(top_builddir)/libgtest.a"
DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest-source=$GTEST_SOURCE"
GTEST_INCLUDES="-I$GTEST_SOURCE -I$GTEST_SOURCE/include"
# See $GTEST_SOURCE/include/gtest/internal/gtest-port.h
# about GTEST_HAS_PTHREAD.
case "$host" in
*-solaris*|*-linux*|*-hpux*)
GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
;;
esac
fi
if test "$gtest_path" != "no" ; then
if test "$gtest_path" != "yes"; then
GTEST_PATHS=$gtest_path
if test -x "${gtest_path}/bin/gtest-config" ; then
GTEST_CONFIG="${gtest_path}/bin/gtest-config"
fi
else
AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
fi
if test -x "${GTEST_CONFIG}" ; then :
# using cppflags instead of cxxflags
GTEST_INCLUDES=`${GTEST_CONFIG} --cppflags`
GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
GTEST_LDADD=`${GTEST_CONFIG} --libs`
GTEST_FOUND="true"
else
AC_MSG_WARN([Unable to locate Google Test gtest-config.])
if test -z "${GTEST_PATHS}" ; then
GTEST_PATHS="/usr /usr/local"
fi
GTEST_FOUND="false"
fi
if test "${GTEST_FOUND}" != "true"; then
GTEST_FOUND="false"
for dir in $GTEST_PATHS; do
if test -f "$dir/include/gtest/gtest.h"; then
GTEST_INCLUDES="-I$dir/include"
GTEST_LDFLAGS="-L$dir/lib"
GTEST_LDADD="-lgtest"
GTEST_FOUND="true"
# There is no gtest-config script on this
# system, which is supposed to inform us
# whether we need pthreads as well (a
# gtest compile-time option). So we still
# need to test that manually.
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTEST_INCLUDES"
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $GTEST_LDFLAGS"
LIBS_SAVED=$LIBS
LIBS="$LIBS $GTEST_LDADD"
AC_MSG_CHECKING([Checking whether gtest tests need pthreads])
# First try to compile without pthreads
AC_TRY_LINK([
#include <gtest/gtest.h>
],[
int i = 0;
char* c = NULL;
::testing::InitGoogleTest(&i, &c);
return (0);
],
[ AC_MSG_RESULT(no) ],
[
LIBS="$SAVED_LIBS $GTEST_LDADD $PTHREAD_LDFLAGS"
# Now try to compile with pthreads
AC_TRY_LINK([
#include <gtest/gtest.h>
],[
int i = 0;
char* c = NULL;
::testing::InitGoogleTest(&i, &c);
return (0);
],
[ AC_MSG_RESULT(yes)
GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
],
# Apparently we can't compile it at all
[ AC_MSG_ERROR(unable to compile with gtest) ])
])
CPPFLAGS=$CPPFLAGS_SAVED
LDFLAGS=$LDFLAGS_SAVED
LIBS=$LIBS_SAVED
break
fi
done
fi
if test "${GTEST_FOUND}" != "true"; then
AC_MSG_ERROR([Cannot find gtest in: $GTEST_PATHS])
fi
fi
fi
AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no")
AM_CONDITIONAL(HAVE_GTEST, test $enable_gtest != "no")
AM_CONDITIONAL(HAVE_GTEST_SOURCE, test "X$have_gtest_source" = "Xyes")
AC_SUBST(DISTCHECK_GTEST_CONFIGURE_FLAG)
AC_SUBST(GTEST_INCLUDES)
AC_SUBST(GTEST_LDFLAGS)
AC_SUBST(GTEST_LDADD)
AC_SUBST(GTEST_SOURCE)
dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes, no)
......@@ -1018,6 +1079,7 @@ AC_CONFIG_FILES([Makefile
src/bin/msgq/tests/Makefile
src/bin/auth/Makefile
src/bin/auth/tests/Makefile
src/bin/auth/tests/testdata/Makefile
src/bin/auth/benchmarks/Makefile