]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Finished merge of rt39318 (install embedded bind9 includes and libs)
authorFrancis Dupont <fdupont@isc.org>
Thu, 6 Oct 2016 08:23:24 +0000 (10:23 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 6 Oct 2016 08:23:24 +0000 (10:23 +0200)
RELNOTES
configure
configure.ac
util/Makefile.bind.in

index 1c0c21e4c229ea52122e2d47733e9367434b3828..c387dfdd781564216a3859a9d3c0327f6605479a 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -126,6 +126,14 @@ by Eric Young (eay@cryptsoft.com).
   the issue; and Norm for suggesting a solution.
   [ISC-Bugs #41358]
 
+- Added --enable-bind-install to install embedded bind includes and
+  libraries. Default is to not install them (it was the previous
+  behavior). If you'd like to change the includedir and/or libdir
+  installation directories to something different than for ISC DHCP
+  you must pass them using the --with-bind-extra-config configuration
+  arguments.
+  [ISC-Bugs #39318]
+
                        Changes since 4.3.0 (bug fixes)
 
 - Tidy up several small tickets.
index 20abe13fd63a8a310aec4936fc8d0e99f521a6a3..5fce52b771a5765a319e5933a9aed4273d4f0864 100755 (executable)
--- a/configure
+++ b/configure
@@ -627,6 +627,8 @@ LTLIBOBJS
 LIBOBJS
 LDAP_CFLAGS
 LDAP_LIBS
+INSTALL_BIND_FALSE
+INSTALL_BIND_TRUE
 HAVE_BINDDIR_FALSE
 HAVE_BINDDIR_TRUE
 DISTCHECK_LIBBIND_CONFIGURE_FLAG
@@ -785,6 +787,7 @@ enable_epoll
 enable_devpoll
 with_bind_extra_config
 with_libbind
+enable_bind_install
 with_ldap
 with_ldapcrypto
 with_ldap_gssapi
@@ -1451,6 +1454,7 @@ Optional Features:
   --enable-kqueue         use BSD kqueue (default is no)
   --enable-epoll          use Linux epoll (default is no)
   --enable-devpoll        use /dev/poll (default is no)
+  --enable-bind-install   install bind includes and libraries (default is no).
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -6983,6 +6987,24 @@ else
 fi
 
 
+# Check whether --enable-bind_install was given.
+if test "${enable_bind_install+set}" = set; then :
+  enableval=$enable_bind_install;
+fi
+
+if test "$enable_bind_install" = "yes" -a "$use_libbind" != "no"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-bind-install does nothing when --with-libbind is set" >&5
+$as_echo "$as_me: WARNING: --enable-bind-install does nothing when --with-libbind is set" >&2;}
+fi
+ if test "$enable_bind_install" = "yes"; then
+  INSTALL_BIND_TRUE=
+  INSTALL_BIND_FALSE='#'
+else
+  INSTALL_BIND_TRUE='#'
+  INSTALL_BIND_FALSE=
+fi
+
+
 # OpenLDAP support.
 
 # Check whether --with-ldap was given.
@@ -7516,6 +7538,10 @@ if test -z "${HAVE_BINDDIR_TRUE}" && test -z "${HAVE_BINDDIR_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_BINDDIR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${INSTALL_BIND_TRUE}" && test -z "${INSTALL_BIND_FALSE}"; then
+  as_fn_error $? "conditional \"INSTALL_BIND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
index eb2a28a23ee2ec37494d387dbfed92939c2759a7..7f199a8462621c18d41ce597d878b928e5a2d763 100644 (file)
@@ -798,6 +798,13 @@ AC_SUBST(BINDLIBISCDIR)
 AC_SUBST(DISTCHECK_LIBBIND_CONFIGURE_FLAG)
 AM_CONDITIONAL(HAVE_BINDDIR, test "$use_libbind" = "no")
 
+AC_ARG_ENABLE(bind_install,
+       AS_HELP_STRING([--enable-bind-install],[install bind includes and libraries (default is no).]))
+if test "$enable_bind_install" = "yes" -a "$use_libbind" != "no"; then
+       AC_MSG_WARN([--enable-bind-install does nothing when --with-libbind is set])
+fi
+AM_CONDITIONAL(INSTALL_BIND, test "$enable_bind_install" = "yes")
+
 # OpenLDAP support.
 AC_ARG_WITH(ldap,
     AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),
index 47711db9d7caea004281999b4ea82d7f57194363..b98e2bee33c758b1069b113ed9f6a20697b0ac48 100644 (file)
 binddir=@BINDDIR@
 bindsrcdir=@BINDSRCDIR@
 
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
 bindconfig = --without-openssl --without-libxml2 --without-libjson \
        --without-gssapi --disable-threads \
-       --prefix=${binddir} \
+       --includedir=@includedir@ --libdir=@libdir@ \
        @BINDIOMUX@ @BINDCONFIG@ --enable-full-report
 
-@BIND_ATF_FALSE@cleandirs = ./lib ./include ./share
-@BIND_ATF_TRUE@cleandirs = ./lib ./include /share ./atf
+@BIND_ATF_FALSE@cleandirs = ./lib ./include
+@BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf
 cleanfiles = ./configure.log ./build.log ./install.log
 
+bindlibs = isc dns isccfg irs
+installdirs = includedir=${binddir}/include libdir=${binddir}/lib
+
 @BIND_ATF_FALSE@all: bind1 bind2
 @BIND_ATF_TRUE@all: bind1 atf bind2
 
 bind1:
 # Extract the source from the tarball, if it hasn't been already.
-       @if test -d ${bindsrcdir} ; then                    \
-               echo ${bindsrcdir} already unpacked... ;    \
-       else                                                \
-               gunzip -c bind.tar.gz | tar xf - ;          \
+       @if test -d ${bindsrcdir} ; then                  \
+               echo ${bindsrcdir} already unpacked... ;  \
+       else                                              \
+               gunzip -c bind.tar.gz | tar xf - ;        \
        fi
 
 # Configure the libraries
@@ -55,13 +61,13 @@ bind1:
 
 atf:
 # Build and copy the ATF support if not yet installed.
-       @if test -d ./atf ; then                                      \
-               echo ATF support already installed ;                  \
-       else                                                          \
-               echo Building ATF support ;                           \
-               (cd ${bindsrcdir}/unit;                               \
-                $(MAKE) atf > ${binddir}/build.log ;                 \
-                cp -rp atf ${binddir}) ;                             \
+       @if test -d ./atf ; then                      \
+               echo ATF support already installed ;  \
+       else                                          \
+               echo Building ATF support ;           \
+               (cd ${bindsrcdir}/unit;               \
+                $(MAKE) atf > ${binddir}/build.log ; \
+                cp -rp atf ${binddir}) ;             \
        fi
 
 bind2:
@@ -71,21 +77,42 @@ bind2:
                echo Bind libraries already installed ;                \
        else                                                           \
                echo Building BIND libraries - this takes some time. ; \
-               (cd ${bindsrcdir}/lib ;                                \
-                 echo building in `pwd` ;                             \
-                 $(MAKE) >> ${binddir}/build.log) ;                   \
-                                                                       \
+               for libdir in ${bindlibs} ; do                         \
+                (cd ${bindsrcdir}/lib/$$libdir ;                      \
+                 echo Building $$libdir library in `pwd` ;            \
+                 $(MAKE) >> ${binddir}/build.log) ;                   \
+               done ;                                                 \
+                                                                      \
                echo Installing BIND libraries to ${binddir}. ;        \
-               (cd ${bindsrcdir}/lib ;                                \
-                 $(MAKE) install > ${binddir}/install.log) ;          \
+               for libdir in ${bindlibs} ; do                         \
+                (cd ${bindsrcdir}/lib/$$libdir ;                      \
+                 $(MAKE) ${installdirs} install >>                    \
+                  ${binddir}/install.log) ;                           \
+               done ;                                                 \
        fi
 
 clean:
        @echo Cleaning BIND library.
        rm -rf ${bindsrcdir} ${cleandirs} ${cleanfiles}
 
+@INSTALL_BIND_FALSE@install:
+@INSTALL_BIND_TRUE@install: install-bind
+@INSTALL_BIND_FALSE@uninstall:
+@INSTALL_BIND_TRUE@uninstall: uninstall-bind
+
+install-bind: all
+       @for libdir in ${bindlibs} ; do   \
+        (cd ${bindsrcdir}/lib/$$libdir ; \
+         $(MAKE) install) ;              \
+        done
+
+uninstall-bind: all
+       @for libdir in ${bindlibs} ; do   \
+        (cd ${bindsrcdir}/lib/$$libdir ; \
+         $(MAKE) uninstall) ;            \
+        done
+
 # Include the following so that this Makefile is happy when the parent
 # tries to use them.
 
-check distdir distclean dvi install installcheck uninstall:
-
+check distdir distclean dvi installcheck: