dhcp/dhcp-remove-bind.patch

195 lines
8.2 KiB
Diff
Raw Normal View History

2015-03-05 18:36:52 +00:00
diff -up dhcp-4.3.2/client/Makefile.am.remove-bind dhcp-4.3.2/client/Makefile.am
--- dhcp-4.3.2/client/Makefile.am.remove-bind 2015-02-26 20:35:43.000000000 +0100
+++ dhcp-4.3.2/client/Makefile.am 2015-03-05 19:01:27.748586948 +0100
2014-07-10 17:01:31 +00:00
@@ -10,8 +10,8 @@ dhclient_SOURCES = clparse.c dhclient.c
2013-12-20 15:13:52 +00:00
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 \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
EXTRA_DIST = $(man_MANS)
2015-03-05 18:36:52 +00:00
diff -up dhcp-4.3.2/common/tests/Makefile.am.remove-bind dhcp-4.3.2/common/tests/Makefile.am
--- dhcp-4.3.2/common/tests/Makefile.am.remove-bind 2015-02-26 20:35:43.000000000 +0100
+++ dhcp-4.3.2/common/tests/Makefile.am 2015-03-05 19:03:51.316530568 +0100
2015-02-08 17:31:39 +00:00
@@ -13,14 +13,14 @@ ATF_TESTS += alloc_unittest dns_unittest
2013-12-20 15:13:52 +00:00
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 \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
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
2014-07-10 17:01:31 +00:00
+ ../../omapip/libomapi.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2014-07-10 17:01:31 +00:00
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
misc_unittest_LDADD = $(ATF_LDFLAGS)
2015-03-05 18:36:52 +00:00
@@ -31,8 +31,8 @@ misc_unittest_LDADD += ../libdhcp.a \
2015-02-08 17:31:39 +00:00
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 \
2014-07-10 17:01:31 +00:00
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
2013-12-20 15:13:52 +00:00
+ ../../omapip/libomapi.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
2015-03-05 18:36:52 +00:00
check: $(ATF_TESTS)
sh ${top_srcdir}/tests/unittest.sh
diff -up dhcp-4.3.2/configure.ac.remove-bind dhcp-4.3.2/configure.ac
--- dhcp-4.3.2/configure.ac.remove-bind 2015-02-26 20:51:28.000000000 +0100
+++ dhcp-4.3.2/configure.ac 2015-03-05 19:01:27.756586833 +0100
@@ -582,20 +582,37 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.t
2013-12-20 15:13:52 +00:00
libbind=
AC_ARG_WITH(libbind,
- AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
- (default is ./bind)]),
+ AS_HELP_STRING([--with-libbind=PATH],[bind includes are in PATH
+ (default is ./bind/includes)]),
use_libbind="$withval", use_libbind="no")
case "$use_libbind" in
+yes|no)
+ libbind="\${top_srcdir}/bind/include"
+ ;;
+*)
+ libbind="$use_libbind"
+ ;;
+esac
+
+BIND9_LIBDIR='-L$(top_builddir)/bind/lib'
+AC_ARG_WITH(libbind-libs,
+ AC_HELP_STRING([--with-libbind-libs=PATH],
+ [bind9 export libraries are in PATH]),
+ [libbind_libs="$withval"], [libbind_libs='no'])
+case "$libbind_libs" in
yes)
- libbind="\${top_srcdir}/bind"
+ AC_MSG_ERROR([Specify path to bind9 libraries])
;;
no)
- libbind="\${top_srcdir}/bind"
+ BUNDLED_BIND=yes
;;
*)
- libbind="$use_libbind"
+ BIND9_LIBDIR="-L$libbind_libs"
+ BUNDLED_BIND=no
;;
esac
+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
+AC_SUBST([BIND9_LIBDIR])
# OpenLDAP support.
AC_ARG_WITH(ldap,
2015-03-05 18:36:52 +00:00
@@ -630,7 +647,7 @@ fi
2013-12-20 15:13:52 +00:00
CFLAGS="$CFLAGS $STD_CWARNINGS"
# Try to add the bind include directory
-CFLAGS="$CFLAGS -I$libbind/include"
+CFLAGS="$CFLAGS -I$libbind"
case "$host" in
*-darwin*)
2015-03-05 18:36:52 +00:00
diff -up dhcp-4.3.2/dhcpctl/Makefile.am.remove-bind dhcp-4.3.2/dhcpctl/Makefile.am
--- dhcp-4.3.2/dhcpctl/Makefile.am.remove-bind 2015-02-26 20:35:43.000000000 +0100
+++ dhcp-4.3.2/dhcpctl/Makefile.am 2015-03-05 19:01:27.756586833 +0100
2013-12-20 15:13:52 +00:00
@@ -6,12 +6,9 @@ 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
-
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
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
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2015-03-05 18:36:52 +00:00
diff -up dhcp-4.3.2/Makefile.am.remove-bind dhcp-4.3.2/Makefile.am
--- dhcp-4.3.2/Makefile.am.remove-bind 2015-02-26 20:35:43.000000000 +0100
+++ dhcp-4.3.2/Makefile.am 2015-03-05 19:01:27.757586819 +0100
2014-07-10 17:01:31 +00:00
@@ -25,7 +25,13 @@ EXTRA_DIST = RELNOTES LICENSE \
bind/Makefile bind/bind.tar.gz bind/version.tmp \
common/tests/Atffile server/tests/Atffile
-SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
+if BUNDLED_BIND
+SUBDIRS = bind
+else
+SUBDIRS =
+endif
+
+SUBDIRS += includes tests common dst omapip client dhcpctl relay server
nobase_include_HEADERS = dhcpctl/dhcpctl.h
2015-03-05 18:36:52 +00:00
diff -up dhcp-4.3.2/omapip/Makefile.am.remove-bind dhcp-4.3.2/omapip/Makefile.am
--- dhcp-4.3.2/omapip/Makefile.am.remove-bind 2015-02-26 20:35:43.000000000 +0100
+++ dhcp-4.3.2/omapip/Makefile.am 2015-03-05 19:01:27.757586819 +0100
2013-12-20 15:13:52 +00:00
@@ -10,6 +10,5 @@ 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 \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2015-03-05 18:36:52 +00:00
diff -up dhcp-4.3.2/relay/Makefile.am.remove-bind dhcp-4.3.2/relay/Makefile.am
--- dhcp-4.3.2/relay/Makefile.am.remove-bind 2015-02-26 20:35:43.000000000 +0100
+++ dhcp-4.3.2/relay/Makefile.am 2015-03-05 19:01:27.757586819 +0100
2013-12-20 15:13:52 +00:00
@@ -3,8 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
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
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
man_MANS = dhcrelay.8
EXTRA_DIST = $(man_MANS)
2015-03-05 18:36:52 +00:00
diff -up dhcp-4.3.2/server/Makefile.am.remove-bind dhcp-4.3.2/server/Makefile.am
--- dhcp-4.3.2/server/Makefile.am.remove-bind 2015-02-26 20:35:43.000000000 +0100
+++ dhcp-4.3.2/server/Makefile.am 2015-03-05 19:01:27.757586819 +0100
2013-12-20 15:13:52 +00:00
@@ -13,10 +13,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
dhcpv6.c mdb6.c ldap.c ldap_casa.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
-
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
EXTRA_DIST = $(man_MANS)
2015-03-05 18:36:52 +00:00
diff -up dhcp-4.3.2/server/tests/Makefile.am.remove-bind dhcp-4.3.2/server/tests/Makefile.am
--- dhcp-4.3.2/server/tests/Makefile.am.remove-bind 2015-03-05 19:01:27.757586819 +0100
+++ dhcp-4.3.2/server/tests/Makefile.am 2015-03-05 19:02:51.949380907 +0100
2013-12-20 15:13:52 +00:00
@@ -18,9 +18,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
../ldap.c ../ldap_casa.c ../dhcpd.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
2015-03-05 18:36:52 +00:00
+ $(top_builddir)/dhcpctl/libdhcpctl.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
ATF_TESTS =
2015-03-05 18:36:52 +00:00
if HAVE_ATF