Commit ffe6e32f authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

Merge branch 'master' of ssh://git.kea.isc.org/git/kea

parents 0334eed6 9783d9cd
819. [build] marcin
Renamed variables in the configure.ac so as their names do not
refer to BIND10 project. As a result of renaming the B10_CXXFLAGS
to KEA_CXXFLAGS in configure.ac all dependent Makefiles had to
be updated in the tree. The AX_BOOST_FOR_BIND10 macro has been
renamed to AX_BOOST_FOR_KEA.
(Trac #3507, git 6616b1c0ad0a78e11bca9395fafb8efdba8d8b9c)
818. [func] tomek
DHCPv4, DHCPv6 and DDNS components now report their versions.
(Trac #3508, git 3f46c74ffa0ea1197e1fa62cb2f6580931be35f3)
......
......@@ -92,7 +92,7 @@ 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
dnl Determine if we are using GNU sed
GNU_SED=no
$SED --version 2> /dev/null | grep GNU > /dev/null 2>&1
if test $? -eq 0; then
......@@ -106,9 +106,9 @@ fi
AX_ISC_RPATH
# Compiler dependent settings: define some mandatory CXXFLAGS here.
# We also use a separate variable B10_CXXFLAGS. This will (and should) be
# We also use a separate variable KEA_CXXFLAGS. This will (and should) be
# used as the default value for each specific AM_CXXFLAGS:
# AM_CXXFLAGS = $(B10_CXXFLAGS)
# AM_CXXFLAGS = $(KEA_CXXFLAGS)
# AM_CXXFLAGS += ... # add module specific flags
# We need this so that we can disable some specific compiler warnings per
# module basis; since AM_CXXFLAGS are placed before CXXFLAGS, and since
......@@ -117,23 +117,23 @@ AX_ISC_RPATH
# "override" the default.
# This may be used to try linker flags.
AC_DEFUN([BIND10_CXX_TRY_FLAG], [
AC_DEFUN([KEA_CXX_TRY_FLAG], [
AC_MSG_CHECKING([whether $CXX supports $1])
bind10_save_CXXFLAGS="$CXXFLAGS"
kea_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $1"
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void){ return 0;}])],
[bind10_cxx_flag=yes], [bind10_cxx_flag=no])
CXXFLAGS="$bind10_save_CXXFLAGS"
[kea_cxx_flag=yes], [kea_cxx_flag=no])
CXXFLAGS="$kea_save_CXXFLAGS"
if test "x$bind10_cxx_flag" = "xyes"; then
if test "x$kea_cxx_flag" = "xyes"; then
ifelse([$2], , :, [$2])
else
ifelse([$3], , :, [$3])
fi
AC_MSG_RESULT([$bind10_cxx_flag])
AC_MSG_RESULT([$kea_cxx_flag])
])
CXX_VERSION="unknown"
......@@ -155,22 +155,22 @@ fi
# on the source code.
if test "$CLANGPP" = "yes"; then
CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
B10_CXXFLAGS="$B10_CXXFLAGS -Qunused-arguments"
KEA_CXXFLAGS="$KEA_CXXFLAGS -Qunused-arguments"
fi
BIND10_CXX_TRY_FLAG([-Wno-missing-field-initializers],
KEA_CXX_TRY_FLAG([-Wno-missing-field-initializers],
[WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG="-Wno-missing-field-initializers"])
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"
KEA_CXXFLAGS="$KEA_CXXFLAGS -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
case "$host" in
*-solaris*)
MULTITHREADING_FLAG=-pthreads
# In Solaris, IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need -Wno-missing-braces
B10_CXXFLAGS="$B10_CXXFLAGS -Wno-missing-braces"
KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-missing-braces"
;;
*)
MULTITHREADING_FLAG=-pthread
......@@ -195,7 +195,7 @@ werror_ok=0
# translation unit. For these versions we have to disable -Werror.
if test $with_werror = 1; then
CXXFLAGS_SAVED="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $B10_CXXFLAGS -Werror"
CXXFLAGS="$CXXFLAGS $KEA_CXXFLAGS -Werror"
AC_MSG_CHECKING(for in-TU anonymous namespace breakage)
# We use struct, not class, here, because some compilers complain about
# "unused private members", causing a false positive.
......@@ -203,7 +203,7 @@ if test $with_werror = 1; then
namespace isc {struct Bar {Foo foo_;};} ],,
[AC_MSG_RESULT(no)
werror_ok=1
B10_CXXFLAGS="$B10_CXXFLAGS -Werror"],
KEA_CXXFLAGS="$KEA_CXXFLAGS -Werror"],
[AC_MSG_RESULT(yes)])
CXXFLAGS="$CXXFLAGS_SAVED"
fi
......@@ -224,13 +224,13 @@ if test $enable_static_link = yes -a $enable_static = no; then
AC_MSG_ERROR([--enable-static-link requires --enable-static])
fi
if test $enable_shared = no; then
AC_MSG_ERROR([BIND 10 requires shared libraries to be built])
AC_MSG_ERROR([Kea requires shared libraries to be built])
fi
# OS dependent configuration
SET_ENV_LIBRARY_PATH=no
ENV_LIBRARY_PATH=LD_LIBRARY_PATH
bind10_undefined_pthread_behavior=no
kea_undefined_pthread_behavior=no
case "$host" in
*-solaris*)
......@@ -242,7 +242,7 @@ case "$host" in
# Destroying locked mutexes, condition variables being waited
# on, etc. are undefined behavior on Solaris, so we set it as
# such here.
bind10_undefined_pthread_behavior=yes
kea_undefined_pthread_behavior=yes
;;
*-apple-darwin*)
# Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use
......@@ -263,7 +263,7 @@ case "$host" in
#endif
#endif
return 1;
}],[bind10_undefined_pthread_behavior=yes],[],[])
}],[kea_undefined_pthread_behavior=yes],[],[])
# libtool doesn't work perfectly with Darwin: libtool embeds the
# final install path in dynamic libraries and our loadable python
......@@ -287,7 +287,7 @@ esac
AM_CONDITIONAL(SET_ENV_LIBRARY_PATH, test $SET_ENV_LIBRARY_PATH = yes)
AC_SUBST(SET_ENV_LIBRARY_PATH)
AC_SUBST(ENV_LIBRARY_PATH)
if [ test $bind10_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?])
fi
......@@ -341,10 +341,10 @@ fi
# produce PIC unless we disable shared libraries. need this for python bindings.
if test $enable_shared != "no" -a "X$GXX" = "Xyes"; then
B10_CXXFLAGS="$B10_CXXFLAGS -fPIC"
KEA_CXXFLAGS="$KEA_CXXFLAGS -fPIC"
fi
AC_SUBST(B10_CXXFLAGS)
AC_SUBST(KEA_CXXFLAGS)
# Checks for libraries.
......@@ -1007,7 +1007,7 @@ LIBS=$LIBS_SAVED
#
# Configure Boost header path
#
AX_BOOST_FOR_BIND10
AX_BOOST_FOR_KEA
# Boost offset_ptr is required in one library and not optional right now, so
# we unconditionally fail here if it doesn't work.
if test "$BOOST_OFFSET_PTR_WOULDFAIL" = "yes" -a "$werror_ok" = 1; then
......@@ -1518,7 +1518,7 @@ C++ Compiler:
CPPFLAGS: ${CPPFLAGS}
CXXFLAGS: ${CXXFLAGS}
LDFLAGS: ${LDFLAGS}
B10_CXXFLAGS: ${B10_CXXFLAGS}
KEA_CXXFLAGS: ${KEA_CXXFLAGS}
END
if test "$PYTHON" != "no" ; then
......
EXTRA_DIST = ax_boost_for_bind10.m4
EXTRA_DIST = ax_boost_for_kea.m4
dnl @synopsis AX_BOOST_FOR_BIND10
dnl @synopsis AX_BOOST_FOR_KEA
dnl
dnl Test for the Boost C++ header files intended to be used within BIND 10
dnl
......@@ -37,7 +37,7 @@ dnl causes segfaults in offset_ptr implementation when
dnl compiled by GCC with optimisations enabled.
dnl See ticket no. 3025 for details.
AC_DEFUN([AX_BOOST_FOR_BIND10], [
AC_DEFUN([AX_BOOST_FOR_KEA], [
AC_LANG_SAVE
AC_LANG([C++])
......@@ -203,4 +203,4 @@ AC_MSG_RESULT([$BOOST_VERSION])
CPPFLAGS="$CPPFLAGS_SAVED"
AC_LANG_RESTORE
])dnl AX_BOOST_FOR_BIND10
])dnl AX_BOOST_FOR_KEA
......@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
......
......@@ -32,7 +32,7 @@ CLEANFILES = $(builddir)/interfaces.txt $(builddir)/logger_lockfile
DISTCLEANFILES = d2_process_tests.sh
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
......
......@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
......
......@@ -33,7 +33,7 @@ CLEANFILES += *.json *.log
DISTCLEANFILES = dhcp4_process_tests.sh
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
......
......@@ -5,7 +5,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/cc -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
......
......@@ -31,7 +31,7 @@ CLEANFILES += *.json *.log
DISTCLEANFILES = dhcp6_process_tests.sh
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
......
......@@ -166,12 +166,14 @@ run_conditional() {
### Script starts here ###
# Configure logger to log messages into the file.
# Do not set destination if the B10_LOGGER_DESTINATION is set,
# Do not set destination if the KEA_LOGGER_DESTINATION is set,
# because a unit test could have set this to some other location.
# @todo Rely on the Kea configuration file once #3427 is done.
if [ -z ${B10_LOGGER_DESTINATION} ]; then
# Note that when the configuration is applied this location may be
# altered and only the handful of initial messages will be logged
# to the default file.
if [ -z ${KEA_LOGGER_DESTINATION} ]; then
prefix=@prefix@
export B10_LOGGER_DESTINATION=@localstatedir@/@PACKAGE@/kea.log
export KEA_LOGGER_DESTINATION=@localstatedir@/@PACKAGE@/kea.log
fi
command=${1}
......
......@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/log -I$(top_builddir)/src/lib/log
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
......
......@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += -I$(srcdir)/.. -I$(builddir)/..
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(abs_srcdir)/testdata\"
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -2,7 +2,7 @@ SUBDIRS = . tests
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -2,7 +2,7 @@ CLEANFILES = *.gcno *.gcda
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -2,7 +2,7 @@ SUBDIRS = . tests
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
......
......@@ -6,7 +6,7 @@ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES)
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_srcdir)/src/hooks/dhcp/user_chk/tests\"
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
......
......@@ -6,7 +6,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/asiolink -I$(top_builddir)/src/lib/asiolink
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/util -I$(top_builddir)/src/lib/util
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
CLEANFILES = *.gcno *.gcda asiodns_messages.h asiodns_messages.cc s-messages
......@@ -36,7 +36,7 @@ nodist_libkea_asiodns_la_SOURCES = asiodns_messages.cc asiodns_messages.h
EXTRA_DIST = asiodns_messages.mes
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
# B10_CXXFLAGS)
# KEA_CXXFLAGS)
libkea_asiodns_la_CXXFLAGS = $(AM_CXXFLAGS)
libkea_asiodns_la_CPPFLAGS = $(AM_CPPFLAGS)
libkea_asiodns_la_LIBADD = $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
......
......@@ -4,7 +4,7 @@ AM_CPPFLAGS += -I$(top_builddir)/src/lib/dns -I$(top_srcdir)/src/bin
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc -I$(top_builddir)/src/lib/util
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(srcdir)/testdata\"
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_STATIC_LINK
AM_LDFLAGS = -static
......@@ -39,7 +39,7 @@ run_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libkea-asiodns.la
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
# B10_CXXFLAGS)
# KEA_CXXFLAGS)
run_unittests_CXXFLAGS = $(AM_CXXFLAGS)
if USE_GXX
run_unittests_CXXFLAGS += -Wno-unused-parameter
......
......@@ -3,7 +3,7 @@ SUBDIRS = . tests
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
CLEANFILES = *.gcno *.gcda
......@@ -35,7 +35,7 @@ libkea_asiolink_la_SOURCES += udp_socket.h
libkea_asiolink_la_SOURCES += local_socket.h local_socket.cc
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
# B10_CXXFLAGS)
# KEA_CXXFLAGS)
libkea_asiolink_la_CXXFLAGS = $(AM_CXXFLAGS)
libkea_asiolink_la_CPPFLAGS = $(AM_CPPFLAGS)
libkea_asiolink_la_LIBADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
......
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