BIND 10 trac1526, updated. d2c410cd67c37b1f27bb7121ecc7aa273df02015 [trac1526] check for clock_gettime in -lrt
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Dec 22 17:39:06 UTC 2011
The branch, trac1526 has been updated
via d2c410cd67c37b1f27bb7121ecc7aa273df02015 (commit)
from a2120b04405184479b27b52d30cab38903b6f83c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d2c410cd67c37b1f27bb7121ecc7aa273df02015
Author: Jeremy C. Reed <jreed at ISC.org>
Date: Thu Dec 22 11:37:51 2011 -0600
[trac1526] check for clock_gettime in -lrt
Remove the OS detection from this branch. It will be part of different
branch (1237).
(I will test on MacOS X shortly.)
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 35 ++++-------------------------------
tests/tools/perfdhcp/Makefile.am | 7 ++-----
2 files changed, 6 insertions(+), 36 deletions(-)
-----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 7ecb92c..838738b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -369,36 +369,6 @@ AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
-# Detect OS type (it may be used to do OS-specific things, e.g.
-# interface detection in DHCP)
-AC_MSG_CHECKING(OS family)
-system=`uname -s`
-case $system in
- Linux)
- OS_TYPE="Linux"
- CPPFLAGS="$CPPFLAGS -DOS_LINUX"
- ;;
- Darwin | FreeBSD | NetBSD | OpenBSD)
- OS_TYPE="BSD"
- CPPFLAGS="$CPPFLAGS -DOS_BSD"
- ;;
- Solaris)
- OS_TYPE="Solaris"
- CPPFLAGS="$CPPFLAGS -DOS_SOLARIS"
- ;;
- *)
- OS_TYPE="Unknown"
- AC_MSG_WARN("Unsupported OS: uname returned $system")
- ;;
-esac
-AC_MSG_RESULT($OS_TYPE)
-
-AM_CONDITIONAL(OS_LINUX, test $OS_TYPE = Linux)
-AM_COND_IF([OS_LINUX], [AC_DEFINE([OS_LINUX], [1], [Running on Linux?])])
-AM_CONDITIONAL(OS_BSD, test $OS_TYPE = BSD)
-AM_COND_IF([OS_BSD], [AC_DEFINE([OS_BSD], [1], [Running on BSD?])])
-AM_CONDITIONAL(OS_SOLARIS, test $OS_TYPE = Solaris)
-AM_COND_IF([OS_SOLARIS], [AC_DEFINE([OS_SOLARIS], [1], [Running on Solaris?])])
AC_MSG_CHECKING(for sa_len in struct sockaddr)
AC_TRY_COMPILE([
@@ -861,6 +831,10 @@ EV_SET(NULL, 0, 0, 0, 0, 0, udata);],
])
fi
+CLOCK_GETTIME_LDFLAGS=
+AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_GETTIME_LDFLAGS=-lrt], [])
+AC_SUBST([CLOCK_GETTIME_LDFLAGS])
+
# /dev/poll issue: ASIO uses /dev/poll by default if it's available (generally
# the case with Solaris). Unfortunately its /dev/poll specific code would
# trigger the gcc's "missing-field-initializers" warning, which would
@@ -1171,7 +1145,6 @@ Flags:
CXXFLAGS: $CXXFLAGS
LDFLAGS: $LDFLAGS
B10_CXXFLAGS: $B10_CXXFLAGS
- OS Family: $OS_TYPE
dnl includes too
Python: ${PYTHON_INCLUDES}
${PYTHON_CXXFLAGS}
diff --git a/tests/tools/perfdhcp/Makefile.am b/tests/tools/perfdhcp/Makefile.am
index 13471f9..bbad595 100644
--- a/tests/tools/perfdhcp/Makefile.am
+++ b/tests/tools/perfdhcp/Makefile.am
@@ -2,14 +2,11 @@ SUBDIRS = .
AM_CXXFLAGS = $(B10_CXXFLAGS)
-AM_LDFLAGS = -lm
+AM_LDFLAGS = $(CLOCK_GETTIME_LDFLAGS)
+AM_LDFLAGS += -lm
if USE_STATIC_LINK
AM_LDFLAGS += -static
endif
-if OS_LINUX
-AM_LDFLAGS += -lrt
-endif
-
pkglibexec_PROGRAMS = perfdhcp
perfdhcp_SOURCES = perfdhcp.c
More information about the bind10-changes
mailing list