philipp / rpms / dhcp

Forked from rpms/dhcp 4 years ago
Clone

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

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