Blame SOURCES/dhcp-4.2.5-remove-bind.patch

c8bb8f
diff -up dhcp-4.2.5b1/client/Makefile.am.remove-bind dhcp-4.2.5b1/client/Makefile.am
c8bb8f
--- dhcp-4.2.5b1/client/Makefile.am.remove-bind	2012-12-05 02:17:38.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/client/Makefile.am	2012-12-17 16:20:58.692538252 +0100
c8bb8f
@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c
c8bb8f
 		   scripts/netbsd scripts/nextstep scripts/openbsd \
c8bb8f
 		   scripts/solaris scripts/openwrt
c8bb8f
 dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
c8bb8f
-		 ../bind/lib/libdns.a ../bind/lib/libisc.a
c8bb8f
+		 $(BIND9_LIBDIR) -ldns-export -lisc-export
c8bb8f
 man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
c8bb8f
 EXTRA_DIST = $(man_MANS)
c8bb8f
 
c8bb8f
diff -up dhcp-4.2.5b1/common/tests/Makefile.am.remove-bind dhcp-4.2.5b1/common/tests/Makefile.am
c8bb8f
--- dhcp-4.2.5b1/common/tests/Makefile.am.remove-bind	2012-12-05 02:17:38.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/common/tests/Makefile.am	2012-12-17 16:20:58.693538239 +0100
c8bb8f
@@ -13,8 +13,8 @@ ATF_TESTS += alloc_unittest
c8bb8f
 alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
c8bb8f
 alloc_unittest_LDADD = $(ATF_LDFLAGS)
c8bb8f
 alloc_unittest_LDADD += ../libdhcp.a  \
c8bb8f
-	../../omapip/libomapi.a ../../bind/lib/libdns.a \
c8bb8f
-        ../../bind/lib/libisc.a
c8bb8f
+	../../omapip/libomapi.a \
c8bb8f
+	 $(BIND9_LIBDIR) -ldns-export -lisc-export
c8bb8f
 
c8bb8f
 check: $(ATF_TESTS)
c8bb8f
 	atf-run | atf-report
c8bb8f
diff -up dhcp-4.2.5b1/configure.ac.remove-bind dhcp-4.2.5b1/configure.ac
c8bb8f
--- dhcp-4.2.5b1/configure.ac.remove-bind	2012-12-05 02:18:44.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/configure.ac	2012-12-17 16:20:58.693538239 +0100
c8bb8f
@@ -581,20 +581,37 @@ AC_CHECK_MEMBER(struct msghdr.msg_contro
c8bb8f
 libbind=
c8bb8f
 AC_ARG_WITH(libbind,
c8bb8f
 	AC_HELP_STRING([--with-libbind=PATH],
c8bb8f
-		       [bind includes and libraries are in PATH 
c8bb8f
-		        (default is ./bind)]),
c8bb8f
+		       [bind includes are in PATH 
c8bb8f
+		        (default is ./bind/includes)]),
c8bb8f
 	use_libbind="$withval", use_libbind="no")
c8bb8f
 case "$use_libbind" in 
c8bb8f
+yes|no)
c8bb8f
+	libbind="\${top_srcdir}/bind/include"
c8bb8f
+	;;
c8bb8f
+*)
c8bb8f
+	libbind="$use_libbind"
c8bb8f
+	;;
c8bb8f
+esac
c8bb8f
+
c8bb8f
+BIND9_LIBDIR='-L$(top_builddir)/bind/lib'
c8bb8f
+AC_ARG_WITH(libbind-libs,
c8bb8f
+	AC_HELP_STRING([--with-libbind-libs=PATH],
c8bb8f
+		       [bind9 export libraries are in PATH]),
c8bb8f
+		       [libbind_libs="$withval"], [libbind_libs='no'])
c8bb8f
+case "$libbind_libs" in
c8bb8f
 yes)
c8bb8f
-	libbind="\${top_srcdir}/bind"
c8bb8f
+	AC_MSG_ERROR([Specify path to bind9 libraries])
c8bb8f
 	;;
c8bb8f
 no)
c8bb8f
-	libbind="\${top_srcdir}/bind"
c8bb8f
+	BUNDLED_BIND=yes
c8bb8f
 	;;
c8bb8f
 *)
c8bb8f
-	libbind="$use_libbind"
c8bb8f
+	BIND9_LIBDIR="-L$libbind_libs"
c8bb8f
+	BUNDLED_BIND=no
c8bb8f
 	;;
c8bb8f
 esac
c8bb8f
+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
c8bb8f
+AC_SUBST([BIND9_LIBDIR])
c8bb8f
 
c8bb8f
 # OpenLDAP support.
c8bb8f
 AC_ARG_WITH(ldap,
c8bb8f
@@ -631,7 +648,7 @@ fi
c8bb8f
 CFLAGS="$CFLAGS $STD_CWARNINGS"
c8bb8f
 
c8bb8f
 # Try to add the bind include directory
c8bb8f
-CFLAGS="$CFLAGS -I$libbind/include"
c8bb8f
+CFLAGS="$CFLAGS -I$libbind"
c8bb8f
 
c8bb8f
 AC_C_FLEXIBLE_ARRAY_MEMBER
c8bb8f
 
c8bb8f
diff -up dhcp-4.2.5b1/dhcpctl/Makefile.am.remove-bind dhcp-4.2.5b1/dhcpctl/Makefile.am
c8bb8f
--- dhcp-4.2.5b1/dhcpctl/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/dhcpctl/Makefile.am	2012-12-17 16:20:58.693538239 +0100
c8bb8f
@@ -6,10 +6,10 @@ EXTRA_DIST = $(man_MANS)
c8bb8f
 
c8bb8f
 omshell_SOURCES = omshell.c
c8bb8f
 omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
c8bb8f
-	        ../bind/lib/libdns.a ../bind/lib/libisc.a
c8bb8f
+	        $(BIND9_LIBDIR) -ldns-export -lisc-export
c8bb8f
 
c8bb8f
 libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
c8bb8f
 
c8bb8f
 cltest_SOURCES = cltest.c
c8bb8f
 cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
c8bb8f
-	       ../bind/lib/libdns.a ../bind/lib/libisc.a
c8bb8f
\ No newline at end of file
c8bb8f
+	       $(BIND9_LIBDIR) -ldns-export -lisc-export
c8bb8f
diff -up dhcp-4.2.5b1/Makefile.am.remove-bind dhcp-4.2.5b1/Makefile.am
c8bb8f
--- dhcp-4.2.5b1/Makefile.am.remove-bind	2012-12-05 02:17:38.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/Makefile.am	2012-12-17 16:20:58.693538239 +0100
c8bb8f
@@ -22,7 +22,13 @@ EXTRA_DIST = RELNOTES LICENSE \
c8bb8f
 	     bind/Makefile bind/bind.tar.gz bind/version.tmp \
c8bb8f
 	     common/tests/Atffile server/tests/Atffile
c8bb8f
 
c8bb8f
-SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
c8bb8f
+if BUNDLED_BIND
c8bb8f
+SUBDIRS = bind
c8bb8f
+else
c8bb8f
+SUBDIRS = 
c8bb8f
+endif
c8bb8f
+
c8bb8f
+SUBDIRS += includes tests common dst omapip client dhcpctl relay server
c8bb8f
 
c8bb8f
 nobase_include_HEADERS = dhcpctl/dhcpctl.h
c8bb8f
 
c8bb8f
diff -up dhcp-4.2.5b1/omapip/Makefile.am.remove-bind dhcp-4.2.5b1/omapip/Makefile.am
c8bb8f
--- dhcp-4.2.5b1/omapip/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/omapip/Makefile.am	2012-12-17 16:20:58.693538239 +0100
c8bb8f
@@ -10,5 +10,5 @@ man_MANS = omapi.3
c8bb8f
 EXTRA_DIST = $(man_MANS)
c8bb8f
 
c8bb8f
 svtest_SOURCES = test.c
c8bb8f
-svtest_LDADD = libomapi.a ../bind/lib/libdns.a ../bind/lib/libisc.a
c8bb8f
+svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
c8bb8f
 
c8bb8f
diff -up dhcp-4.2.5b1/relay/Makefile.am.remove-bind dhcp-4.2.5b1/relay/Makefile.am
c8bb8f
--- dhcp-4.2.5b1/relay/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/relay/Makefile.am	2012-12-17 16:20:58.694538225 +0100
c8bb8f
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
c8bb8f
 sbin_PROGRAMS = dhcrelay
c8bb8f
 dhcrelay_SOURCES = dhcrelay.c
c8bb8f
 dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
c8bb8f
-		 ../bind/lib/libdns.a ../bind/lib/libisc.a
c8bb8f
+		 $(BIND9_LIBDIR) -ldns-export -lisc-export
c8bb8f
 man_MANS = dhcrelay.8
c8bb8f
 EXTRA_DIST = $(man_MANS)
c8bb8f
 
c8bb8f
diff -up dhcp-4.2.5b1/server/Makefile.am.remove-bind dhcp-4.2.5b1/server/Makefile.am
c8bb8f
--- dhcp-4.2.5b1/server/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/server/Makefile.am	2012-12-17 16:20:58.694538225 +0100
c8bb8f
@@ -14,8 +14,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
c8bb8f
 
c8bb8f
 dhcpd_CFLAGS = $(LDAP_CFLAGS)
c8bb8f
 dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
c8bb8f
-	      ../dhcpctl/libdhcpctl.a ../bind/lib/libdns.a \
c8bb8f
-	      ../bind/lib/libisc.a
c8bb8f
+	      ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
c8bb8f
 
c8bb8f
 man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
c8bb8f
 EXTRA_DIST = $(man_MANS)
c8bb8f
diff -up dhcp-4.2.5b1/server/tests/Makefile.am.remove-bind dhcp-4.2.5b1/server/tests/Makefile.am
c8bb8f
--- dhcp-4.2.5b1/server/tests/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
c8bb8f
+++ dhcp-4.2.5b1/server/tests/Makefile.am	2012-12-17 16:26:01.093346768 +0100
c8bb8f
@@ -18,8 +18,7 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
c8bb8f
           ../ldap.c ../ldap_casa.c ../dhcpd.c
c8bb8f
 
c8bb8f
 DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a    \
c8bb8f
-          $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libdns.a \
c8bb8f
-          $(top_builddir)/bind/lib/libisc.a
c8bb8f
+          $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
c8bb8f
 
c8bb8f
 ATF_TESTS =
c8bb8f
 TESTS =