]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
rebased on #39300 for HP-UX make
authorFrancis Dupont <fdupont@isc.org>
Thu, 16 Apr 2015 21:47:32 +0000 (23:47 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 16 Apr 2015 21:47:32 +0000 (23:47 +0200)
README
configure
configure.ac
util/Makefile.bind.in

diff --git a/README b/README
index 2e0aff01169315228a4d3da9d32766ee70b80655..2a6293ff8f209e7ef10f27a1037f69905ac74cd7 100644 (file)
--- a/README
+++ b/README
@@ -199,6 +199,10 @@ If you get errors on a system not mentioned above, you will need
 to do some programming or debugging on your own to get the DHCP
 Distribution working.
 
+If you cross compile you have to follow the instructions from
+the BIND README, in particular you must set the BUILD_CC
+environment variable.
+
                   INSTALLING THE DHCP DISTRIBUTION
 
 Once you have successfully gotten the DHCP Distribution to build, you
index 72862d21c1d5538640a74b093b2b526f8ce5f397..e7ed8e0c82616bb8742bb2154459cdc775d4fdba 100755 (executable)
--- a/configure
+++ b/configure
@@ -639,6 +639,8 @@ RANLIB
 EGREP
 GREP
 CPP
+CROSS_COMPILING_FALSE
+CROSS_COMPILING_TRUE
 BINDCONFIG
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
@@ -4449,6 +4451,17 @@ fi
 
 # We can have some flags to pass to bind configure
 BINDCONFIG=
+if test "$cross_compiling" = "yes"; then
+       BINDCONFIG="--host=$host"
+fi
+
+ if test "$cross_compiling" = "yes"; then
+  CROSS_COMPILING_TRUE=
+  CROSS_COMPILING_FALSE='#'
+else
+  CROSS_COMPILING_TRUE='#'
+  CROSS_COMPILING_FALSE=
+fi
 
 
 # POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
@@ -6988,6 +7001,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
+  as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 if test -z "${BIND_ATF_TRUE}" && test -z "${BIND_ATF_FALSE}"; then
   as_fn_error $? "conditional \"BIND_ATF\" was never defined.
index 9f81078d4711d0c42df49f15f29df8484a25cc65..612aeca9515a1a5ec6874c7bb7f224b6b11cd039 100644 (file)
@@ -34,7 +34,11 @@ fi
 
 # We can have some flags to pass to bind configure
 BINDCONFIG=
+if test "$cross_compiling" = "yes"; then
+       BINDCONFIG="--host=$host"
+fi
 AC_SUBST(BINDCONFIG)
+AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
 
 # POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
 # parts of the IPv6 Advanced Socket API as a result.  This is stupid
index bd784c60d94f7ddbc3b0de4ce67ea4152d1f48ed..109a7987d1313cebe016036373fbb9afabd3329a 100644 (file)
@@ -78,13 +78,35 @@ atf:
                 cp -rp atf ${binddir}) ;                             \
        fi
 
-bind2:
+@CROSS_COMPILING_FALSE@bind2: bind2-noguest
+@CROSS_COMPILING_TRUE@bind2: bind2-hostgen
+
+bind2-noguest:
+# Build and install the export libraries
+# No need to do anything if we already have something installed.
+       @if test -d ${binddir}/lib ; then                                    \
+               echo Bind export libraries already installed ;               \
+       else                                                                 \
+               echo Building BIND Export libraries - this takes some time. ;\
+               (cd ${bindsrcdir}/lib/export ;                               \
+                 echo building in `pwd` ;                                   \
+                 MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ;          \
+                                                                             \
+               echo Installing BIND Export libraries to ${binddir}. ;       \
+               (cd ${bindsrcdir}/lib/export ;                               \
+                 MAKE=${GMAKE} ${GMAKE} install > ${binddir}/install.log) ; \
+       fi
+
+bind2-hostgen:
 # Build and install the export libraries
 # No need to do anything if we already have something installed.
        @if test -d ${binddir}/lib ; then                                    \
                echo Bind export libraries already installed ;               \
        else                                                                 \
                echo Building BIND Export libraries - this takes some time. ;\
+               (cd ${bindsrcdir}/lib/export/dns ; \
+                echo building gen using ${BUILD_CC} in `pwd` ; \
+                MAKE=${GMAKE} ${GMAKE} CC=${BUILD_CC} CFLAGS=${BUILD_CFLAGS} CPPFLAGS=${BUILD_CPPFLAGS} LDFLAGS=${BUILD_LDFLAGS} LIBS=${BUILD_LIBS} gen >> ${binddir}/build.log) ; \
                (cd ${bindsrcdir}/lib/export ;                               \
                  echo building in `pwd` ;                                   \
                  MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ;          \