summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2015-04-17 16:48:42 +0200
committerFrancis Dupont <fdupont@isc.org>2015-04-17 16:48:42 +0200
commit28fc08f6586686151ab46ab998d3b69ed4d00260 (patch)
tree590099bfff59660890552fffbc185e087f30e627
parent0fb9c8a1a27f0ae78da3e475e5c4f1eac46e3f24 (diff)
downloadisc-dhcp-28fc08f6586686151ab46ab998d3b69ed4d00260.tar.gz
checkpoint (seems to work, need regen)
-rw-r--r--Makefile.am2
-rw-r--r--client/Makefile.am11
-rw-r--r--common/Makefile.am2
-rw-r--r--configure.ac22
4 files changed, 16 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am
index f9134dd5..2d239f0f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,7 @@ 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
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/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/configure.ac b/configure.ac
index a5937ac8..0dbd75f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -596,6 +596,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)]),
@@ -603,24 +604,23 @@ 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
- mkdir bind
- cat > bind/Makefile.in << EOF
-# placeholder
-all check clean distclean distdir install uninstall:
-
-EOF
+ mkdir $srcdir/bind
+ echo "# placeholder" > $srcdir/bind/Makefile.in
fi
;;
esac
AC_SUBST(BINDDIR)
+AC_SUBST(BINDSRCDIR)
# OpenLDAP support.
AC_ARG_WITH(ldap,
@@ -654,8 +654,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*)
@@ -666,7 +666,7 @@ AC_C_FLEXIBLE_ARRAY_MEMBER
AC_CONFIG_FILES([
Makefile
- bind/Makefile
+ $srcdir/bind/Makefile
client/Makefile
client/tests/Makefile
common/Makefile
@@ -683,7 +683,7 @@ AC_CONFIG_FILES([
])
AC_OUTPUT
-sh util/bindvar.sh
+(cd $srcdir; sh util/bindvar.sh)
cat > config.report << END