summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in1
-rw-r--r--client/Makefile.am6
-rw-r--r--client/Makefile.in10
-rw-r--r--client/tests/Makefile.am10
-rw-r--r--client/tests/Makefile.in12
-rw-r--r--common/Makefile.in1
-rw-r--r--common/tests/Makefile.am18
-rw-r--r--common/tests/Makefile.in58
-rwxr-xr-xconfigure23
-rw-r--r--configure.ac23
-rw-r--r--dhcpctl/Makefile.am10
-rw-r--r--dhcpctl/Makefile.in20
-rw-r--r--includes/Makefile.in1
-rw-r--r--omapip/Makefile.am6
-rw-r--r--omapip/Makefile.in12
-rw-r--r--relay/Makefile.am6
-rw-r--r--relay/Makefile.in10
-rw-r--r--server/Makefile.am8
-rw-r--r--server/Makefile.in14
-rw-r--r--server/tests/Makefile.am12
-rw-r--r--server/tests/Makefile.in13
-rw-r--r--tests/Makefile.in1
22 files changed, 165 insertions, 110 deletions
diff --git a/Makefile.in b/Makefile.in
index 585d24db..5a0d5595 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -243,6 +243,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
diff --git a/client/Makefile.am b/client/Makefile.am
index 85645af8..1c604f6a 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -4,14 +4,16 @@
# production code. Sadly, we are not there yet.
SUBDIRS = . tests
+BINDLIBDIR = @BINDDIR@/lib
+
dist_sysconf_DATA = dhclient.conf.example
sbin_PROGRAMS = dhclient
dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
scripts/netbsd scripts/nextstep scripts/openbsd \
scripts/solaris scripts/openwrt
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../bind/lib/libirs.a \
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
EXTRA_DIST = $(man_MANS)
diff --git a/client/Makefile.in b/client/Makefile.in
index df7aae0f..a6590829 100644
--- a/client/Makefile.in
+++ b/client/Makefile.in
@@ -108,8 +108,8 @@ am_dhclient_OBJECTS = clparse.$(OBJEXT) dhclient.$(OBJEXT) \
dhc6.$(OBJEXT)
dhclient_OBJECTS = $(am_dhclient_OBJECTS)
dhclient_DEPENDENCIES = ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -251,6 +251,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -351,14 +352,15 @@ top_srcdir = @top_srcdir@
# directory. That eliminates any discrepancies between tested code and
# production code. Sadly, we are not there yet.
SUBDIRS = . tests
+BINDLIBDIR = @BINDDIR@/lib
dist_sysconf_DATA = dhclient.conf.example
dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
scripts/netbsd scripts/nextstep scripts/openbsd \
scripts/solaris scripts/openwrt
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../bind/lib/libirs.a \
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
EXTRA_DIST = $(man_MANS)
diff --git a/client/tests/Makefile.am b/client/tests/Makefile.am
index a16d5891..77fb4dac 100644
--- a/client/tests/Makefile.am
+++ b/client/tests/Makefile.am
@@ -1,7 +1,9 @@
SUBDIRS = .
+BINDLIBDIR = @BINDDIR@/lib
+
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
-AM_CPPFLAGS += -I$(top_srcdir)/bind/include -I$(top_srcdir)
+AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
AM_CPPFLAGS += -DCLIENT_PATH='"."'
@@ -16,9 +18,9 @@ info:
DHCPSRC = ../clparse.c ../dhc6.c ../dhclient.c
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
- $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \
- $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \
- $(top_builddir)/bind/lib/libisc.a
+ $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a
ATF_TESTS =
if HAVE_ATF
diff --git a/client/tests/Makefile.in b/client/tests/Makefile.in
index 255fcf42..82daa79a 100644
--- a/client/tests/Makefile.in
+++ b/client/tests/Makefile.in
@@ -223,6 +223,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -318,15 +319,16 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = .
+BINDLIBDIR = @BINDDIR@/lib
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes \
- -I$(top_srcdir)/bind/include -I$(top_srcdir) \
- -DLOCALSTATEDIR='"."' -DCLIENT_PATH='"."'
+ -I@BINDDIR@/include -I$(top_srcdir) -DLOCALSTATEDIR='"."' \
+ -DCLIENT_PATH='"."'
EXTRA_DIST = Atffile duid0_test.txt duid1_test.txt duid2_test.txt duid3_test.txt
DHCPSRC = ../clparse.c ../dhc6.c ../dhclient.c
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
- $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \
- $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \
- $(top_builddir)/bind/lib/libisc.a
+ $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a
ATF_TESTS = $(am__append_1)
@HAVE_ATF_TRUE@duid_unittests_SOURCES = $(DHCPSRC) duid_unittest.c
diff --git a/common/Makefile.in b/common/Makefile.in
index ed6b44ee..7c49bed2 100644
--- a/common/Makefile.in
+++ b/common/Makefile.in
@@ -257,6 +257,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
index 32e055c1..34748fea 100644
--- a/common/tests/Makefile.am
+++ b/common/tests/Makefile.am
@@ -1,5 +1,7 @@
SUBDIRS = .
+BINDLIBDIR = @BINDDIR@/lib
+
AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
EXTRA_DIST = Atffile
@@ -13,26 +15,26 @@ ATF_TESTS += alloc_unittest dns_unittest misc_unittest ns_name_unittest
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
alloc_unittest_LDADD = $(ATF_LDFLAGS)
alloc_unittest_LDADD += ../libdhcp.a \
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
+ ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
dns_unittest_LDADD = $(ATF_LDFLAGS)
dns_unittest_LDADD += ../libdhcp.a \
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
+ ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
misc_unittest_LDADD = $(ATF_LDFLAGS)
misc_unittest_LDADD += ../libdhcp.a \
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
+ ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
ns_name_unittest_LDADD += ../libdhcp.a \
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
+ ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
check: $(ATF_TESTS)
sh ${top_srcdir}/tests/unittest.sh
diff --git a/common/tests/Makefile.in b/common/tests/Makefile.in
index 2ed8f532..7b648a4b 100644
--- a/common/tests/Makefile.in
+++ b/common/tests/Makefile.in
@@ -111,9 +111,9 @@ alloc_unittest_OBJECTS = $(am_alloc_unittest_OBJECTS)
am__DEPENDENCIES_1 =
@HAVE_ATF_TRUE@alloc_unittest_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@HAVE_ATF_TRUE@ ../libdhcp.a ../../omapip/libomapi.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libirs.a ../../bind/lib/libdns.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisccfg.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisc.a
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisccfg.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisc.a
am__dns_unittest_SOURCES_DIST = dns_unittest.c \
$(top_srcdir)/tests/t_api_dhcp.c
@HAVE_ATF_TRUE@am_dns_unittest_OBJECTS = dns_unittest.$(OBJEXT) \
@@ -121,9 +121,9 @@ am__dns_unittest_SOURCES_DIST = dns_unittest.c \
dns_unittest_OBJECTS = $(am_dns_unittest_OBJECTS)
@HAVE_ATF_TRUE@dns_unittest_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@HAVE_ATF_TRUE@ ../libdhcp.a ../../omapip/libomapi.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libirs.a ../../bind/lib/libdns.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisccfg.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisc.a
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisccfg.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisc.a
am__misc_unittest_SOURCES_DIST = misc_unittest.c \
$(top_srcdir)/tests/t_api_dhcp.c
@HAVE_ATF_TRUE@am_misc_unittest_OBJECTS = misc_unittest.$(OBJEXT) \
@@ -131,9 +131,9 @@ am__misc_unittest_SOURCES_DIST = misc_unittest.c \
misc_unittest_OBJECTS = $(am_misc_unittest_OBJECTS)
@HAVE_ATF_TRUE@misc_unittest_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@HAVE_ATF_TRUE@ ../libdhcp.a ../../omapip/libomapi.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libirs.a ../../bind/lib/libdns.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisccfg.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisc.a
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisccfg.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisc.a
am__ns_name_unittest_SOURCES_DIST = ns_name_test.c \
$(top_srcdir)/tests/t_api_dhcp.c
@HAVE_ATF_TRUE@am_ns_name_unittest_OBJECTS = ns_name_test.$(OBJEXT) \
@@ -141,9 +141,9 @@ am__ns_name_unittest_SOURCES_DIST = ns_name_test.c \
ns_name_unittest_OBJECTS = $(am_ns_name_unittest_OBJECTS)
@HAVE_ATF_TRUE@ns_name_unittest_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@HAVE_ATF_TRUE@ ../libdhcp.a ../../omapip/libomapi.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libirs.a ../../bind/lib/libdns.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisccfg.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisc.a
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisccfg.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisc.a
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -261,6 +261,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -356,33 +357,34 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = .
+BINDLIBDIR = @BINDDIR@/lib
AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
EXTRA_DIST = Atffile
ATF_TESTS = $(am__append_1)
@HAVE_ATF_TRUE@alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
@HAVE_ATF_TRUE@alloc_unittest_LDADD = $(ATF_LDFLAGS) ../libdhcp.a \
-@HAVE_ATF_TRUE@ ../../omapip/libomapi.a ../../bind/lib/libirs.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libdns.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisccfg.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisc.a
+@HAVE_ATF_TRUE@ ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libdns.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisccfg.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisc.a
@HAVE_ATF_TRUE@dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
@HAVE_ATF_TRUE@dns_unittest_LDADD = $(ATF_LDFLAGS) ../libdhcp.a \
-@HAVE_ATF_TRUE@ ../../omapip/libomapi.a ../../bind/lib/libirs.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libdns.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisccfg.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisc.a
+@HAVE_ATF_TRUE@ ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libdns.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisccfg.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisc.a
@HAVE_ATF_TRUE@misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
@HAVE_ATF_TRUE@misc_unittest_LDADD = $(ATF_LDFLAGS) ../libdhcp.a \
-@HAVE_ATF_TRUE@ ../../omapip/libomapi.a ../../bind/lib/libirs.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libdns.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisccfg.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisc.a
+@HAVE_ATF_TRUE@ ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libdns.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisccfg.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisc.a
@HAVE_ATF_TRUE@ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
@HAVE_ATF_TRUE@ns_name_unittest_LDADD = $(ATF_LDFLAGS) ../libdhcp.a \
-@HAVE_ATF_TRUE@ ../../omapip/libomapi.a ../../bind/lib/libirs.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libdns.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisccfg.a \
-@HAVE_ATF_TRUE@ ../../bind/lib/libisc.a
+@HAVE_ATF_TRUE@ ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libdns.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisccfg.a \
+@HAVE_ATF_TRUE@ $(BINDLIBDIR)/libisc.a
all: all-recursive
.SUFFIXES:
diff --git a/configure b/configure
index 3325472b..661a3c72 100755
--- a/configure
+++ b/configure
@@ -627,6 +627,7 @@ LTLIBOBJS
LIBOBJS
LDAP_CFLAGS
LDAP_LIBS
+BINDDIR
ac_prefix_program
HAVE_ATF_FALSE
HAVE_ATF_TRUE
@@ -6644,7 +6645,7 @@ $as_echo "#define VLAN_TCI_PRESENT 1" >>confdefs.h
fi
-libbind=
+BINDDIR=
# Check whether --with-libbind was given.
if test "${with_libbind+set}" = set; then :
@@ -6655,20 +6656,28 @@ fi
case "$use_libbind" in
yes)
- libbind="\${top_srcdir}/bind"
+ BINDDIR="\${top_srcdir}/bind"
;;
no)
- libbind="\${top_srcdir}/bind"
+ BINDDIR="\${top_srcdir}/bind"
;;
*)
- libbind="$use_libbind"
+ BINDDIR="$use_libbind"
if test ! -d "bind"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: empty bind directory" >&5
-$as_echo "$as_me: WARNING: empty bind directory" >&2;}
+ # no bind directory, create it with a fake Makefile.in
+ # (AC_CONFIG_FILES and top Makefile refer to it so
+ # it must exits)
+ mkdir bind
+ cat > bind/Makefile.in << EOF
+# placeholder
+all check clean distclean distdir install uninstall:
+
+EOF
fi
;;
esac
+
# OpenLDAP support.
# Check whether --with-ldap was given.
@@ -6976,7 +6985,7 @@ fi
CFLAGS="$CFLAGS $STD_CWARNINGS"
# Try to add the bind include directory
-CFLAGS="$CFLAGS -I$libbind/include"
+CFLAGS="$CFLAGS -I$BINDDIR/include"
case "$host" in
*-darwin*)
diff --git a/configure.ac b/configure.ac
index 5dd966f9..39c0a28a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -611,25 +611,34 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci,
[AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])]
,, [#include <linux/if_packet.h>])
-libbind=
+BINDDIR=
AC_ARG_WITH(libbind,
AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
(default is ./bind)]),
use_libbind="$withval", use_libbind="no")
case "$use_libbind" in
yes)
- libbind="\${top_srcdir}/bind"
+ BINDDIR="\${top_srcdir}/bind"
;;
no)
- libbind="\${top_srcdir}/bind"
+ BINDDIR="\${top_srcdir}/bind"
;;
*)
- libbind="$use_libbind"
+ BINDDIR="$use_libbind"
if test ! -d "bind"; then
- AC_MSG_WARN(empty bind directory)
- fi
+ # no bind directory, create it with a fake Makefile.in
+ # (AC_CONFIG_FILES and top Makefile refer to it so
+ # it must exits)
+ mkdir bind
+ cat > bind/Makefile.in << EOF
+# placeholder
+all check clean distclean distdir install uninstall:
+
+EOF
+ fi
;;
esac
+AC_SUBST(BINDDIR)
# OpenLDAP support.
AC_ARG_WITH(ldap,
@@ -707,7 +716,7 @@ fi
CFLAGS="$CFLAGS $STD_CWARNINGS"
# Try to add the bind include directory
-CFLAGS="$CFLAGS -I$libbind/include"
+CFLAGS="$CFLAGS -I$BINDDIR/include"
case "$host" in
*-darwin*)
diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
index dfa47095..ceb0de12 100644
--- a/dhcpctl/Makefile.am
+++ b/dhcpctl/Makefile.am
@@ -1,3 +1,5 @@
+BINDLIBDIR = @BINDDIR@/lib
+
bin_PROGRAMS = omshell
lib_LIBRARIES = libdhcpctl.a
noinst_PROGRAMS = cltest
@@ -6,12 +8,12 @@ EXTRA_DIST = $(man_MANS)
omshell_SOURCES = omshell.c
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
cltest_SOURCES = cltest.c
cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
diff --git a/dhcpctl/Makefile.in b/dhcpctl/Makefile.in
index 4fc4f08d..96725abd 100644
--- a/dhcpctl/Makefile.in
+++ b/dhcpctl/Makefile.in
@@ -146,13 +146,15 @@ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
am_cltest_OBJECTS = cltest.$(OBJEXT)
cltest_OBJECTS = $(am_cltest_OBJECTS)
cltest_DEPENDENCIES = libdhcpctl.a ../common/libdhcp.a \
- ../omapip/libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a
am_omshell_OBJECTS = omshell.$(OBJEXT)
omshell_OBJECTS = $(am_omshell_OBJECTS)
omshell_DEPENDENCIES = libdhcpctl.a ../common/libdhcp.a \
- ../omapip/libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -225,6 +227,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -319,19 +322,20 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+BINDLIBDIR = @BINDDIR@/lib
lib_LIBRARIES = libdhcpctl.a
man_MANS = omshell.1 dhcpctl.3
EXTRA_DIST = $(man_MANS)
omshell_SOURCES = omshell.c
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
cltest_SOURCES = cltest.c
cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
all: all-am
diff --git a/includes/Makefile.in b/includes/Makefile.in
index dc73402a..deb0ac80 100644
--- a/includes/Makefile.in
+++ b/includes/Makefile.in
@@ -180,6 +180,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
diff --git a/omapip/Makefile.am b/omapip/Makefile.am
index 8237de0e..446a5941 100644
--- a/omapip/Makefile.am
+++ b/omapip/Makefile.am
@@ -1,3 +1,5 @@
+BINDLIBDIR = @BINDDIR@/lib
+
lib_LIBRARIES = libomapi.a
noinst_PROGRAMS = svtest
@@ -10,6 +12,6 @@ man_MANS = omapi.3
EXTRA_DIST = $(man_MANS)
svtest_SOURCES = test.c
-svtest_LDADD = libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
diff --git a/omapip/Makefile.in b/omapip/Makefile.in
index daa0fced..b3cdff84 100644
--- a/omapip/Makefile.in
+++ b/omapip/Makefile.in
@@ -149,9 +149,9 @@ libomapi_a_OBJECTS = $(am_libomapi_a_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
am_svtest_OBJECTS = test.$(OBJEXT)
svtest_OBJECTS = $(am_svtest_OBJECTS)
-svtest_DEPENDENCIES = libomapi.a ../bind/lib/libirs.a \
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a \
- ../bind/lib/libisc.a
+svtest_DEPENDENCIES = libomapi.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -222,6 +222,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -316,6 +317,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+BINDLIBDIR = @BINDDIR@/lib
lib_LIBRARIES = libomapi.a
libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
errwarn.c listener.c dispatch.c generic.c support.c \
@@ -325,8 +327,8 @@ libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
man_MANS = omapi.3
EXTRA_DIST = $(man_MANS)
svtest_SOURCES = test.c
-svtest_LDADD = libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
all: all-am
diff --git a/relay/Makefile.am b/relay/Makefile.am
index 198d5cd6..3060eca4 100644
--- a/relay/Makefile.am
+++ b/relay/Makefile.am
@@ -1,10 +1,12 @@
+BINDLIBDIR = @BINDDIR@/lib
+
AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
sbin_PROGRAMS = dhcrelay
dhcrelay_SOURCES = dhcrelay.c
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
man_MANS = dhcrelay.8
EXTRA_DIST = $(man_MANS)
diff --git a/relay/Makefile.in b/relay/Makefile.in
index eb2632b8..27dd989d 100644
--- a/relay/Makefile.in
+++ b/relay/Makefile.in
@@ -104,8 +104,8 @@ PROGRAMS = $(sbin_PROGRAMS)
am_dhcrelay_OBJECTS = dhcrelay.$(OBJEXT)
dhcrelay_OBJECTS = $(am_dhcrelay_OBJECTS)
dhcrelay_DEPENDENCIES = ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -203,6 +203,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -297,11 +298,12 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+BINDLIBDIR = @BINDDIR@/lib
AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
dhcrelay_SOURCES = dhcrelay.c
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+ $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+ $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
man_MANS = dhcrelay.8
EXTRA_DIST = $(man_MANS)
diff --git a/server/Makefile.am b/server/Makefile.am
index 2d7cba43..54feedf7 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -4,6 +4,8 @@
# production code. Sadly, we are not there yet.
SUBDIRS = . tests
+BINDLIBDIR = @BINDDIR@/lib
+
AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
dist_sysconf_DATA = dhcpd.conf.example
@@ -14,9 +16,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
dhcpd_CFLAGS = $(LDAP_CFLAGS)
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
- ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a \
- $(LDAP_LIBS)
+ ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a $(LDAP_LIBS)
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
EXTRA_DIST = $(man_MANS)
diff --git a/server/Makefile.in b/server/Makefile.in
index 246c0de8..9778464f 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -117,9 +117,9 @@ am_dhcpd_OBJECTS = dhcpd-dhcpd.$(OBJEXT) dhcpd-dhcp.$(OBJEXT) \
dhcpd_OBJECTS = $(am_dhcpd_OBJECTS)
am__DEPENDENCIES_1 =
dhcpd_DEPENDENCIES = ../common/libdhcp.a ../omapip/libomapi.a \
- ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a \
- ../bind/lib/libisc.a $(am__DEPENDENCIES_1)
+ ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a $(am__DEPENDENCIES_1)
dhcpd_LINK = $(CCLD) $(dhcpd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
@@ -267,6 +267,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -367,6 +368,7 @@ top_srcdir = @top_srcdir@
# directory. That eliminates any discrepancies between tested code and
# production code. Sadly, we are not there yet.
SUBDIRS = . tests
+BINDLIBDIR = @BINDDIR@/lib
AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
dist_sysconf_DATA = dhcpd.conf.example
dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
@@ -375,9 +377,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
dhcpd_CFLAGS = $(LDAP_CFLAGS)
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
- ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a \
- $(LDAP_LIBS)
+ ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a $(LDAP_LIBS)
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
EXTRA_DIST = $(man_MANS)
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 84ae202b..2c644bfa 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -1,7 +1,9 @@
SUBDIRS = .
+BINDLIBDIR = @BINDDIR@/lib
+
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
-AM_CPPFLAGS += -I$(top_srcdir)/bind/include -I$(top_srcdir)
+AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
EXTRA_DIST = Atffile
@@ -17,10 +19,10 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpars.c ../db.c ../class.c \
../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
- $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \
- $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \
- $(top_builddir)/bind/lib/libisc.a
+DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
+ $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a
ATF_TESTS =
if HAVE_ATF
diff --git a/server/tests/Makefile.in b/server/tests/Makefile.in
index 1c794f98..a4fa2adb 100644
--- a/server/tests/Makefile.in
+++ b/server/tests/Makefile.in
@@ -283,6 +283,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -378,19 +379,19 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = .
+BINDLIBDIR = @BINDDIR@/lib
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes \
- -I$(top_srcdir)/bind/include -I$(top_srcdir) \
- -DLOCALSTATEDIR='"."'
+ -I@BINDDIR@/include -I$(top_srcdir) -DLOCALSTATEDIR='"."'
EXTRA_DIST = Atffile
DHCPSRC = ../dhcp.c ../bootp.c ../confpars.c ../db.c ../class.c \
../failover.c ../omapi.c ../mdb.c ../stables.c ../salloc.c \
../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
- $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \
- $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \
- $(top_builddir)/bind/lib/libisc.a
+DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
+ $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+ $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+ $(BINDLIBDIR)/libisc.a
ATF_TESTS = $(am__append_1)
@HAVE_ATF_TRUE@dhcpd_unittests_SOURCES = $(DHCPSRC) simple_unittest.c
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d96ac680..22a5ea0a 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -175,6 +175,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
+BINDDIR = @BINDDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@