summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2016-02-09 13:49:00 +0100
committerFrancis Dupont <fdupont@isc.org>2016-02-09 13:49:00 +0100
commitf704712ed7efb723face26e109de7041261546f5 (patch)
tree98a890dfd14ace2cb64c48de2619b0f2d0e33550
parent68b5d3956b90e15a7999fd922e7a83bd10f119a6 (diff)
parent6ab6361c52a8435b69865ea342b3c9aefde9ad9e (diff)
downloadisc-dhcp-f704712ed7efb723face26e109de7041261546f5.tar.gz
Finished merge of t39262 (DHCP build from another directory)
-rw-r--r--Makefile.am13
-rw-r--r--Makefile.in51
-rw-r--r--RELNOTES5
-rw-r--r--client/Makefile.am11
-rw-r--r--client/Makefile.in13
-rw-r--r--client/tests/Makefile.am13
-rw-r--r--client/tests/Makefile.in37
-rw-r--r--common/Makefile.am2
-rw-r--r--common/Makefile.in4
-rw-r--r--common/tests/Makefile.am8
-rw-r--r--common/tests/Makefile.in32
-rwxr-xr-xconfigure30
-rw-r--r--configure.ac35
-rw-r--r--dhcpctl/Makefile.in2
-rw-r--r--includes/Makefile.in2
-rw-r--r--omapip/Makefile.in2
-rw-r--r--relay/Makefile.in2
-rw-r--r--server/Makefile.in2
-rw-r--r--server/tests/Makefile.am8
-rw-r--r--server/tests/Makefile.in32
-rw-r--r--tests/Makefile.in2
-rw-r--r--util/Makefile.bind.in9
22 files changed, 215 insertions, 100 deletions
diff --git a/Makefile.am b/Makefile.am
index f9134dd5..1700e282 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,18 @@ EXTRA_DIST = RELNOTES LICENSE \
bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
common/tests/Atffile server/tests/Atffile
-SUBDIRS = bind includes tests common omapip client dhcpctl relay server
+SUBDIRS = @BINDSRCDIR@ includes tests common omapip client dhcpctl relay server
nobase_include_HEADERS = dhcpctl/dhcpctl.h
+#
+# distcheck tuning
+#
+
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_ATF_CONFIGURE_FLAG@
+
+distcheck-hook:
+ chmod u+w $(distdir)/bind
+
+distclean-local:
+ rm -f config.report
diff --git a/Makefile.in b/Makefile.in
index 2a235812..7a916c76 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -89,6 +89,11 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(top_srcdir)/doc/devel/doxyfile.in $(nobase_include_HEADERS) \
+ README compile config.guess config.sub depcomp install-sh \
+ missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -100,7 +105,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/includes/config.h
-CONFIG_CLEAN_FILES = bind/Makefile doc/devel/doxyfile
+CONFIG_CLEAN_FILES = doc/devel/doxyfile
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -245,6 +250,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -253,6 +259,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -363,8 +370,13 @@ EXTRA_DIST = RELNOTES LICENSE \
bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
common/tests/Atffile server/tests/Atffile
-SUBDIRS = bind includes tests common omapip client dhcpctl relay server
+SUBDIRS = @BINDSRCDIR@ includes tests common omapip client dhcpctl relay server
nobase_include_HEADERS = dhcpctl/dhcpctl.h
+
+#
+# distcheck tuning
+#
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_ATF_CONFIGURE_FLAG@
all: all-recursive
.SUFFIXES:
@@ -392,8 +404,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
-bind/Makefile: $(top_builddir)/config.status $(top_srcdir)/bind/Makefile.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
doc/devel/doxyfile: $(top_builddir)/config.status $(top_srcdir)/doc/devel/doxyfile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-nobase_includeHEADERS: $(nobase_include_HEADERS)
@@ -657,6 +667,7 @@ distcheck: dist
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
@@ -760,7 +771,8 @@ clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
+distclean-am: clean-am distclean-generic distclean-local \
+ distclean-tags
dvi: dvi-recursive
@@ -828,17 +840,18 @@ uninstall-am: uninstall-nobase_includeHEADERS
am--refresh check check-am clean clean-cscope clean-generic \
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-generic distclean-tags \
- distcleancheck distdir distuninstallcheck dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-nobase_includeHEADERS \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-am uninstall uninstall-am uninstall-nobase_includeHEADERS
+ distcheck distclean distclean-generic distclean-local \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man \
+ install-nobase_includeHEADERS install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-nobase_includeHEADERS
.PRECIOUS: Makefile
@@ -848,6 +861,12 @@ uninstall-am: uninstall-nobase_includeHEADERS
#
Makefile:
+distcheck-hook:
+ chmod u+w $(distdir)/bind
+
+distclean-local:
+ rm -f config.report
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/RELNOTES b/RELNOTES
index f71dcf5c..aa7d0419 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -207,6 +207,11 @@ by Eric Young (eay@cryptsoft.com).
incorrectly parse the new flags value from the omapi message.
[ISC-Bugs #31179]
+- ISC DHCP can now be configured and built from a directory other than
+ the top level source directory. Note that "make distcheck" uses this
+ feature.
+ [ISC-Bugs #39262]
+
Changes since 4.3.3b1
- None
diff --git a/client/Makefile.am b/client/Makefile.am
index 1c604f6a..2cb83d80 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -6,6 +6,9 @@ SUBDIRS = . tests
BINDLIBDIR = @BINDDIR@/lib
+AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
+ -DLOCALSTATEDIR='"$(localstatedir)"'
+
dist_sysconf_DATA = dhclient.conf.example
sbin_PROGRAMS = dhclient
dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
@@ -16,11 +19,3 @@ 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)
-
-dhclient.o: dhclient.c
- $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
-
-dhc6.o: dhc6.c
- $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
diff --git a/client/Makefile.in b/client/Makefile.in
index d1674686..59597f0f 100644
--- a/client/Makefile.in
+++ b/client/Makefile.in
@@ -253,6 +253,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -261,6 +262,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -355,6 +357,9 @@ top_srcdir = @top_srcdir@
# production code. Sadly, we are not there yet.
SUBDIRS = . tests
BINDLIBDIR = @BINDDIR@/lib
+AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
+ -DLOCALSTATEDIR='"$(localstatedir)"'
+
dist_sysconf_DATA = dhclient.conf.example
dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
@@ -862,14 +867,6 @@ uninstall-man: uninstall-man5 uninstall-man8
.PRECIOUS: Makefile
-dhclient.o: dhclient.c
- $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
-
-dhc6.o: dhc6.c
- $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/client/tests/Makefile.am b/client/tests/Makefile.am
index 77fb4dac..da69ea92 100644
--- a/client/tests/Makefile.am
+++ b/client/tests/Makefile.am
@@ -34,7 +34,18 @@ duid_unittests_LDADD = $(ATF_LDFLAGS)
duid_unittests_LDADD += $(DHCPLIBS)
check: $(ATF_TESTS)
- sh ${top_srcdir}/tests/unittest.sh
+ -cp -n $(top_srcdir)/client/tests/Atffile Atffile
+ -cp -n $(top_srcdir)/client/tests/duid0_test.txt duid0_test.txt
+ -cp -n $(top_srcdir)/client/tests/duid1_test.txt duid1_test.txt
+ -cp -n $(top_srcdir)/client/tests/duid2_test.txt duid2_test.txt
+ -cp -n $(top_srcdir)/client/tests/duid3_test.txt duid3_test.txt
+ sh ${top_builddir}/tests/unittest.sh
+
+distclean-local:
+ @if test $(top_srcdir) != ${top_builddir}; then \
+ rm -f Atffile duid0_test.txt duid1_test.txt; \
+ rm -f duid2_test.txt duid3_test.txt; \
+ fi
endif
diff --git a/client/tests/Makefile.in b/client/tests/Makefile.in
index 1a741b12..a17bf101 100644
--- a/client/tests/Makefile.in
+++ b/client/tests/Makefile.in
@@ -225,6 +225,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -233,6 +234,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -633,6 +635,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@HAVE_ATF_FALSE@distclean-local:
clean: clean-recursive
clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
@@ -641,7 +644,7 @@ distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
+ distclean-local distclean-tags
dvi: dvi-recursive
@@ -705,15 +708,16 @@ uninstall-am:
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-checkPROGRAMS clean-generic cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags tags-am uninstall uninstall-am
+ distclean-local distclean-tags distdir dvi dvi-am html html-am \
+ info info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
.PRECIOUS: Makefile
@@ -725,7 +729,18 @@ info:
@echo "ATF_LIBS=$(ATF_LIBS)"
@HAVE_ATF_TRUE@check: $(ATF_TESTS)
-@HAVE_ATF_TRUE@ sh ${top_srcdir}/tests/unittest.sh
+@HAVE_ATF_TRUE@ -cp -n $(top_srcdir)/client/tests/Atffile Atffile
+@HAVE_ATF_TRUE@ -cp -n $(top_srcdir)/client/tests/duid0_test.txt duid0_test.txt
+@HAVE_ATF_TRUE@ -cp -n $(top_srcdir)/client/tests/duid1_test.txt duid1_test.txt
+@HAVE_ATF_TRUE@ -cp -n $(top_srcdir)/client/tests/duid2_test.txt duid2_test.txt
+@HAVE_ATF_TRUE@ -cp -n $(top_srcdir)/client/tests/duid3_test.txt duid3_test.txt
+@HAVE_ATF_TRUE@ sh ${top_builddir}/tests/unittest.sh
+
+@HAVE_ATF_TRUE@distclean-local:
+@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
+@HAVE_ATF_TRUE@ rm -f Atffile duid0_test.txt duid1_test.txt; \
+@HAVE_ATF_TRUE@ rm -f duid2_test.txt duid3_test.txt; \
+@HAVE_ATF_TRUE@ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/common/Makefile.am b/common/Makefile.am
index eddef058..c579719a 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
AM_CFLAGS = $(LDAP_CFLAGS)
noinst_LIBRARIES = libdhcp.a
diff --git a/common/Makefile.in b/common/Makefile.in
index 82dff563..a8d3c651 100644
--- a/common/Makefile.in
+++ b/common/Makefile.in
@@ -258,6 +258,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -266,6 +267,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -353,7 +355,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
AM_CFLAGS = $(LDAP_CFLAGS)
noinst_LIBRARIES = libdhcp.a
libdhcp_a_SOURCES = alloc.c bpf.c comapi.c conflex.c ctrace.c discover.c \
diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
index 34748fea..f8d6b0e2 100644
--- a/common/tests/Makefile.am
+++ b/common/tests/Makefile.am
@@ -37,7 +37,13 @@ ns_name_unittest_LDADD += ../libdhcp.a \
$(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
check: $(ATF_TESTS)
- sh ${top_srcdir}/tests/unittest.sh
+ -cp -n $(top_srcdir)/common/tests/Atffile Atffile
+ sh ${top_builddir}/tests/unittest.sh
+
+distclean-local:
+ @if test $(top_srcdir) != ${top_builddir}; then \
+ rm -f Atffile; \
+ fi
endif
diff --git a/common/tests/Makefile.in b/common/tests/Makefile.in
index fa488a21..7d730ef4 100644
--- a/common/tests/Makefile.in
+++ b/common/tests/Makefile.in
@@ -263,6 +263,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -271,6 +272,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -670,6 +672,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@HAVE_ATF_FALSE@distclean-local:
clean: clean-recursive
clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
@@ -678,7 +681,7 @@ distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
+ distclean-local distclean-tags
dvi: dvi-recursive
@@ -744,21 +747,28 @@ uninstall-am:
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-checkPROGRAMS clean-generic cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags tags-am uninstall uninstall-am
+ distclean-local distclean-tags distdir dvi dvi-am html html-am \
+ info info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
.PRECIOUS: Makefile
@HAVE_ATF_TRUE@check: $(ATF_TESTS)
-@HAVE_ATF_TRUE@ sh ${top_srcdir}/tests/unittest.sh
+@HAVE_ATF_TRUE@ -cp -n $(top_srcdir)/common/tests/Atffile Atffile
+@HAVE_ATF_TRUE@ sh ${top_builddir}/tests/unittest.sh
+
+@HAVE_ATF_TRUE@distclean-local:
+@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
+@HAVE_ATF_TRUE@ rm -f Atffile; \
+@HAVE_ATF_TRUE@ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/configure b/configure
index 7efe476b..e0616f85 100755
--- a/configure
+++ b/configure
@@ -627,8 +627,10 @@ LTLIBOBJS
LIBOBJS
LDAP_CFLAGS
LDAP_LIBS
+BINDSRCDIR
BINDDIR
ac_prefix_program
+DISTCHECK_ATF_CONFIGURE_FLAG
HAVE_ATF_FALSE
HAVE_ATF_TRUE
pkgcfg_found
@@ -5526,6 +5528,7 @@ fi
# Testing section
+DISTCHECK_ATF_CONFIGURE_FLAG=
atf_path="no"
# Check whether --with-atf was given.
@@ -5542,16 +5545,18 @@ else
fi
if test "$atf_path" = "bind" ; then
+ DISTCHECK_ATF_CONFIGURE_FLAG="--with-atf=bind"
atf_pcp="bind"
atf_path="\${top_srcdir}/bind/atf"
ATF_CFLAGS="-I$atf_path/include -DUNIT_TEST"
ATF_LDFLAGS="-L$atf_path/lib -latf-c"
- ATF_BIN=`pwd`/bind/atf/bin
+ ATF_BIN=`cd $srcdir; pwd`/bind/atf/bin
BINDCONFIG="$BINDCONFIG --with-atf"
elif test "$atf_path" != "no" ; then
+ DISTCHECK_ATF_CONFIGURE_FLAG="--with-atf=$atf_path"
# Config path for pkg-config
atf_pcp=""
if test "$atf_path" != "yes" ; then
@@ -5652,6 +5657,7 @@ $as_echo "#define HAVE_ATF 1" >>confdefs.h
fi
+
###
### Path fun. Older versions of DHCP were installed in /usr/sbin, so we
### need to look there and potentially overwrite by default (but not if
@@ -6703,6 +6709,8 @@ fi
# figure out pointer size
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -I$srcdir"
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -6740,6 +6748,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+CFLAGS="$SAVE_CFLAGS"
# Solaris does not have the msg_control or msg_controlen members
# in the msghdr structure unless you define:
@@ -6790,6 +6799,7 @@ fi
BINDDIR=
+BINDSRCDIR=
# Check whether --with-libbind was given.
if test "${with_libbind+set}" = set; then :
@@ -6801,13 +6811,15 @@ fi
case "$use_libbind" in
yes)
BINDDIR="\${top_srcdir}/bind"
+ BINDSRCDIR="\${top_srcdir}/bind"
;;
no)
BINDDIR="\${top_srcdir}/bind"
+ BINDSRCDIR="\${top_srcdir}/bind"
;;
*)
BINDDIR="$use_libbind"
- if test ! -d "bind"; then
+ if test ! -d "$srcdir/bind"; then
# no bind directory, create it with a fake Makefile.in
# (AC_CONFIG_FILES and top Makefile refer to it so
# it must exits)
@@ -6822,6 +6834,7 @@ EOF
esac
+
# OpenLDAP support.
# Check whether --with-ldap was given.
@@ -7128,8 +7141,8 @@ fi
# AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc).
CFLAGS="$CFLAGS $STD_CWARNINGS"
-# Try to add the bind include directory
-CFLAGS="$CFLAGS -I$BINDDIR/include"
+# Try to add the bind and dhcp include directories
+CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include"
case "$host" in
*-darwin*)
@@ -7179,7 +7192,7 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
fi
-ac_config_files="$ac_config_files Makefile bind/Makefile client/Makefile client/tests/Makefile common/Makefile common/tests/Makefile dhcpctl/Makefile includes/Makefile omapip/Makefile relay/Makefile server/Makefile tests/Makefile tests/unittest.sh server/tests/Makefile doc/devel/doxyfile"
+ac_config_files="$ac_config_files Makefile $srcdir/bind/Makefile client/Makefile client/tests/Makefile common/Makefile common/tests/Makefile dhcpctl/Makefile includes/Makefile omapip/Makefile relay/Makefile server/Makefile tests/Makefile tests/unittest.sh server/tests/Makefile doc/devel/doxyfile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -7926,7 +7939,7 @@ do
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"includes/config.h") CONFIG_HEADERS="$CONFIG_HEADERS includes/config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "bind/Makefile") CONFIG_FILES="$CONFIG_FILES bind/Makefile" ;;
+ "$srcdir/bind/Makefile") CONFIG_FILES="$CONFIG_FILES $srcdir/bind/Makefile" ;;
"client/Makefile") CONFIG_FILES="$CONFIG_FILES client/Makefile" ;;
"client/tests/Makefile") CONFIG_FILES="$CONFIG_FILES client/tests/Makefile" ;;
"common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;;
@@ -8628,10 +8641,7 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-sh util/bindvar.sh
-if test $? -ne 0; then
- as_fn_error $? "*** util/bindvar.sh failed" "$LINENO" 5
-fi
+(cd $srcdir; sh util/bindvar.sh)
cat > config.report << END
diff --git a/configure.ac b/configure.ac
index 5664827a..9351150a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -219,22 +219,25 @@ fi
# Testing section
+DISTCHECK_ATF_CONFIGURE_FLAG=
atf_path="no"
AC_ARG_WITH([atf],
AS_HELP_STRING([--with-atf=PATH],[specify location where atf was installed (or "bind")]),
[atf_path="$withval"])
AM_CONDITIONAL(BIND_ATF, test "$atf_path" = "bind")
if test "$atf_path" = "bind" ; then
+ DISTCHECK_ATF_CONFIGURE_FLAG="--with-atf=bind"
atf_pcp="bind"
atf_path="\${top_srcdir}/bind/atf"
ATF_CFLAGS="-I$atf_path/include -DUNIT_TEST"
ATF_LDFLAGS="-L$atf_path/lib -latf-c"
- ATF_BIN=`pwd`/bind/atf/bin
+ ATF_BIN=`cd $srcdir; pwd`/bind/atf/bin
AC_SUBST(ATF_CFLAGS)
AC_SUBST(ATF_LDFLAGS)
AC_SUBST(ATF_BIN)
BINDCONFIG="$BINDCONFIG --with-atf"
elif test "$atf_path" != "no" ; then
+ DISTCHECK_ATF_CONFIGURE_FLAG="--with-atf=$atf_path"
# Config path for pkg-config
atf_pcp=""
if test "$atf_path" != "yes" ; then
@@ -286,6 +289,7 @@ fi
AM_CONDITIONAL(HAVE_ATF, test "$atf_pcp" != "")
AM_COND_IF([HAVE_ATF], [AC_DEFINE([HAVE_ATF], [1], [ATF framework specified?])])
+AC_SUBST(DISTCHECK_ATF_CONFIGURE_FLAG)
###
### Path fun. Older versions of DHCP were installed in /usr/sbin, so we
@@ -618,10 +622,13 @@ AC_CHECK_MEMBER(struct sockaddr.sa_len,
[#include <sys/socket.h>])
# figure out pointer size
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -I$srcdir"
AC_CHECK_SIZEOF(struct iaddr *, , [
#include "includes/inet.h"
#include <stdio.h>
])
+CFLAGS="$SAVE_CFLAGS"
# Solaris does not have the msg_control or msg_controlen members
# in the msghdr structure unless you define:
@@ -656,6 +663,7 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci,
,, [#include <linux/if_packet.h>])
BINDDIR=
+BINDSRCDIR=
AC_ARG_WITH(libbind,
AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
(default is ./bind)]),
@@ -663,18 +671,20 @@ AC_ARG_WITH(libbind,
case "$use_libbind" in
yes)
BINDDIR="\${top_srcdir}/bind"
+ BINDSRCDIR="\${top_srcdir}/bind"
;;
no)
BINDDIR="\${top_srcdir}/bind"
+ BINDSRCDIR="\${top_srcdir}/bind"
;;
*)
BINDDIR="$use_libbind"
- if test ! -d "bind"; then
+ if test ! -d "$srcdir/bind"; then
# 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
+ mkdir $srcdir/bind
+ cat > $srcdir/bind/Makefile.in << EOF
# placeholder
all check clean distclean distdir install uninstall:
@@ -683,6 +693,7 @@ EOF
;;
esac
AC_SUBST(BINDDIR)
+AC_SUBST(BINDSRCDIR)
# OpenLDAP support.
AC_ARG_WITH(ldap,
@@ -759,8 +770,8 @@ fi
# AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc).
CFLAGS="$CFLAGS $STD_CWARNINGS"
-# Try to add the bind include directory
-CFLAGS="$CFLAGS -I$BINDDIR/include"
+# Try to add the bind and dhcp include directories
+CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include"
case "$host" in
*-darwin*)
@@ -771,7 +782,7 @@ AC_C_FLEXIBLE_ARRAY_MEMBER
AC_CONFIG_FILES([
Makefile
- bind/Makefile
+ $srcdir/bind/Makefile
client/Makefile
client/tests/Makefile
common/Makefile
@@ -788,10 +799,12 @@ AC_CONFIG_FILES([
])
AC_OUTPUT
-sh util/bindvar.sh
-if test $? -ne 0; then
- AC_MSG_ERROR([*** util/bindvar.sh failed])
-fi
+(cd $srcdir
+ sh util/bindvar.sh
+ if test $? -ne 0; then
+ AC_MSG_ERROR([*** util/bindvar.sh failed])
+ fi
+)
cat > config.report << END
diff --git a/dhcpctl/Makefile.in b/dhcpctl/Makefile.in
index 763e80e9..47ccd2c5 100644
--- a/dhcpctl/Makefile.in
+++ b/dhcpctl/Makefile.in
@@ -228,6 +228,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -236,6 +237,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
diff --git a/includes/Makefile.in b/includes/Makefile.in
index 18942e75..0d1f9f4f 100644
--- a/includes/Makefile.in
+++ b/includes/Makefile.in
@@ -182,6 +182,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -190,6 +191,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
diff --git a/omapip/Makefile.in b/omapip/Makefile.in
index 9615daa7..0bb975d7 100644
--- a/omapip/Makefile.in
+++ b/omapip/Makefile.in
@@ -223,6 +223,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -231,6 +232,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
diff --git a/relay/Makefile.in b/relay/Makefile.in
index 43033977..bfacfc05 100644
--- a/relay/Makefile.in
+++ b/relay/Makefile.in
@@ -205,6 +205,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -213,6 +214,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
diff --git a/server/Makefile.in b/server/Makefile.in
index 25f39c08..9b755232 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -269,6 +269,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -277,6 +278,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 2c644bfa..65a9f740 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -51,7 +51,13 @@ leaseq_unittests_SOURCES = $(DHCPSRC) leaseq_unittest.c
leaseq_unittests_LDADD = $(DHCPLIBS) $(ATF_LDFLAGS)
check: $(ATF_TESTS)
- sh ${top_srcdir}/tests/unittest.sh
+ -cp -n $(top_srcdir)/server/tests/Atffile Atffile
+ sh ${top_builddir}/tests/unittest.sh
+
+distclean-local:
+ @if test $(top_srcdir) != ${top_builddir}; then \
+ rm -f Atffile; \
+ fi
endif
diff --git a/server/tests/Makefile.in b/server/tests/Makefile.in
index 8a5049f2..0306a730 100644
--- a/server/tests/Makefile.in
+++ b/server/tests/Makefile.in
@@ -285,6 +285,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -293,6 +294,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -952,6 +954,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@HAVE_ATF_FALSE@distclean-local:
clean: clean-recursive
clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
@@ -960,7 +963,7 @@ distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
+ distclean-local distclean-tags
dvi: dvi-recursive
@@ -1024,15 +1027,16 @@ uninstall-am:
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-checkPROGRAMS clean-generic cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags tags-am uninstall uninstall-am
+ distclean-local distclean-tags distdir dvi dvi-am html html-am \
+ info info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
.PRECIOUS: Makefile
@@ -1044,7 +1048,13 @@ info:
@echo "ATF_LIBS=$(ATF_LIBS)"
@HAVE_ATF_TRUE@check: $(ATF_TESTS)
-@HAVE_ATF_TRUE@ sh ${top_srcdir}/tests/unittest.sh
+@HAVE_ATF_TRUE@ -cp -n $(top_srcdir)/server/tests/Atffile Atffile
+@HAVE_ATF_TRUE@ sh ${top_builddir}/tests/unittest.sh
+
+@HAVE_ATF_TRUE@distclean-local:
+@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
+@HAVE_ATF_TRUE@ rm -f Atffile; \
+@HAVE_ATF_TRUE@ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/Makefile.in b/tests/Makefile.in
index b09d23b1..fccf568f 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -176,6 +176,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
BINDDIR = @BINDDIR@
+BINDSRCDIR = @BINDSRCDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -184,6 +185,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DISTCHECK_ATF_CONFIGURE_FLAG = @DISTCHECK_ATF_CONFIGURE_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
diff --git a/util/Makefile.bind.in b/util/Makefile.bind.in
index 109a7987..495e3919 100644
--- a/util/Makefile.bind.in
+++ b/util/Makefile.bind.in
@@ -123,12 +123,5 @@ clean:
# Include the following so that this Makefile is happy when the parent
# tries to use them.
-distdir:
+check distdir distclean dvi install installcheck uninstall:
-distclean:
-
-install:
-
-check:
-
-uninstall: