philipp / rpms / dhcp

Forked from rpms/dhcp 4 years ago
Clone

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

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