]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Added make tool and pkg-config tests to configure script
authorThomas Markwalder <tmark@isc.org>
Thu, 7 Jan 2016 14:53:39 +0000 (09:53 -0500)
committerThomas Markwalder <tmark@isc.org>
Thu, 7 Jan 2016 14:53:39 +0000 (09:53 -0500)
    Merges in rt40371.

16 files changed:
Makefile.in
RELNOTES
client/Makefile.in
client/tests/Makefile.in
common/Makefile.in
common/tests/Makefile.in
configure
configure.ac
dhcpctl/Makefile.in
includes/Makefile.in
omapip/Makefile.in
relay/Makefile.in
server/Makefile.in
server/tests/Makefile.in
tests/Makefile.in
util/bindvar.sh

index 5a0d5595b9bd8cb371a2629a71dfacd9ebf2fd12..59b219c6cba8574c19ff685c68acdc3f0e7e0b14 100644 (file)
@@ -327,6 +327,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 500314d3f95328cd78acf9f09d51264b9099b6cd..aa72b1b888026c69e58c5f24320942a65e2c6a57 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -136,6 +136,13 @@ by Eric Young (eay@cryptsoft.com).
   to the usage string.  This may be disabled by editing includes/site.h.
   [ISC-Bugs #40321]
 
+- The configure script will now exit with an error message if it cannot find
+  a GNU-style make tool (needed when building BIND libraries) or pkg-config
+  (needed to locate ATF used for building unit tests). Prior to this the
+  script would exit indicating success causing subsequent attempts to build
+  the software to fail.
+  [ISC-Bugs #40371]
+
                        Changes since 4.3.3b1
 - None
 
@@ -182,7 +189,7 @@ by Eric Young (eay@cryptsoft.com).
   [ISC-Buts #39019]
 
 - Write out the DUID server id on startup in all cases, previously if it
-  was read in from server-duid option in the config or lease files for 
+  was read in from server-duid option in the config or lease files for
   DHCPv4 it would not be written to the new lease file.
   [ISC-Bugs #37791]
 
@@ -232,7 +239,7 @@ by Eric Young (eay@cryptsoft.com).
   declaring the lease file corrupt and incorrectly skipping over the subsequent
   entry in the file.  The server will now emit a log message indicating that
   no pool was found for the address (or prefix) and correctly resume parsing
-  with the next entry in the lease file.  Our thanks to Michal Žejdl for 
+  with the next entry in the lease file.  Our thanks to Michal Žejdl for
   reporting the issue.
   [ISC-Bugs #39314]
 
index a659082973442ade3ec5f76751ee6af6294d1fbf..cfc2f5cc584c017ab4afa003d5725100ca3a3829 100644 (file)
@@ -335,6 +335,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 82daa79a2a9b9f19471fdd075afc40cf2fcb02cb..840d85c9103393d2ef6a13ea2d3062f034c50b0d 100644 (file)
@@ -307,6 +307,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 7c49bed2a0a866d7a3495090454c4ade3ab73c17..0a60686f0bea1302e2a63af343b539d1a886475e 100644 (file)
@@ -341,6 +341,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 7b648a4b94d490da06be8f3c570fbb9a8cd0b95b..5bfe96cd1278eaa9e1a6c49425ecb8d217f42677 100644 (file)
@@ -345,6 +345,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 08dfc51b8b1e0c41f07c41e3ce2caa7a453fc009..fc9fc6480b4d7c2bc5ee21b98aa95eae429da439 100755 (executable)
--- a/configure
+++ b/configure
@@ -631,6 +631,7 @@ BINDDIR
 ac_prefix_program
 HAVE_ATF_FALSE
 HAVE_ATF_TRUE
+pkgcfg_found
 ATF_BIN
 ATF_LDFLAGS
 ATF_CFLAGS
@@ -5525,6 +5526,46 @@ elif test "$atf_path" != "no" ; then
     if test "$atf_pcp" = "" ; then
         as_fn_error $? "Unable to find atf files in location specified" "$LINENO" 5
     else
+        # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_pkgcfg_found+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$pkgcfg_found"; then
+  ac_cv_prog_pkgcfg_found="$pkgcfg_found" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_pkgcfg_found="pkg-config"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+pkgcfg_found=$ac_cv_prog_pkgcfg_found
+if test -n "$pkgcfg_found"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgcfg_found" >&5
+$as_echo "$pkgcfg_found" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+        if test "$pkgcfg_found" = ""; then
+            as_fn_error $? "Could not locate ATF, pkg-config not installed" "$LINENO" 5
+        fi
         ATF_CFLAGS="`PKG_CONFIG_PATH=$atf_pcp pkg-config --cflags atf-c` -DUNIT_TEST"
         ATF_LDFLAGS="`PKG_CONFIG_PATH=$atf_pcp pkg-config --libs atf-c`"
         if  test -f $atf_pcp/atf-sh.pc ; then
@@ -8498,6 +8539,9 @@ fi
 
 
 sh util/bindvar.sh
+if test $? -ne 0; then
+    as_fn_error $? "*** util/bindvar.sh failed" "$LINENO" 5
+fi
 
 cat > config.report << END
 
index b6bf9c875e35df5a1399facfc57d37d8f9604e14..9fe247ca27027b147b643fd4bdaab59531943c8a 100644 (file)
@@ -9,11 +9,11 @@ AM_INIT_AUTOMAKE([foreign])
 # change the timestamps on the code, like checking it into a cvs
 # tree, could trigger a rebuild of the infrastructure files which
 # might fail if they don't have the correct tools.
-AM_MAINTAINER_MODE 
+AM_MAINTAINER_MODE
 
 AC_CANONICAL_HOST
 
-# We want to turn on warnings if we are using gcc and the user did 
+# We want to turn on warnings if we are using gcc and the user did
 # not specify CFLAGS. The autoconf check for the C compiler sets the
 # CFLAGS if gcc is used, so we will save it before we run that check.
 SAVE_CFLAGS="$CFLAGS"
@@ -51,9 +51,9 @@ AC_PROG_RANLIB
 AC_CONFIG_HEADERS([includes/config.h])
 
 # we sometimes need to know byte order for building packets
-AC_C_BIGENDIAN(AC_SUBST(byte_order, BIG_ENDIAN), 
+AC_C_BIGENDIAN(AC_SUBST(byte_order, BIG_ENDIAN),
               AC_SUBST(byte_order, LITTLE_ENDIAN))
-AC_DEFINE_UNQUOTED([DHCP_BYTE_ORDER], [$byte_order], 
+AC_DEFINE_UNQUOTED([DHCP_BYTE_ORDER], [$byte_order],
                   [Define to BIG_ENDIAN for MSB (Motorola or SPARC CPUs)
                    or LITTLE_ENDIAN for LSB (Intel CPUs).])
 
@@ -135,7 +135,7 @@ AC_ARG_ENABLE(dhcpv6,
 # DHCPv6 is on by default, so define if it is not explicitly disabled.
 if test "$enable_dhcpv6" != "no"; then
     enable_dhcpv6="yes"
-       AC_DEFINE([DHCPv6], [1], 
+       AC_DEFINE([DHCPv6], [1],
                  [Define to 1 to include DHCPv6 support.])
 fi
 
@@ -251,6 +251,10 @@ elif test "$atf_path" != "no" ; then
     if test "$atf_pcp" = "" ; then
         AC_MSG_ERROR([Unable to find atf files in location specified])
     else
+        AC_CHECK_PROG([pkgcfg_found],[pkg-config],[pkg-config],[])
+        if test "$pkgcfg_found" = ""; then
+            AC_MSG_ERROR([Could not locate ATF, pkg-config not installed])
+        fi
         ATF_CFLAGS="`PKG_CONFIG_PATH=$atf_pcp pkg-config --cflags atf-c` -DUNIT_TEST"
         ATF_LDFLAGS="`PKG_CONFIG_PATH=$atf_pcp pkg-config --libs atf-c`"
         if  test -f $atf_pcp/atf-sh.pc ; then
@@ -294,7 +298,7 @@ esac
 
 # Allow specification of alternate state files
 AC_ARG_WITH(srv-lease-file,
-       AS_HELP_STRING([--with-srv-lease-file=PATH],[File for dhcpd leases 
+       AS_HELP_STRING([--with-srv-lease-file=PATH],[File for dhcpd leases
                        (default is LOCALSTATEDIR/db/dhcpd.leases)]),
        AC_DEFINE_UNQUOTED([_PATH_DHCPD_DB], ["$withval"],
                           [File for dhcpd leases.]))
@@ -324,7 +328,7 @@ fi
 AC_MSG_RESULT($with_srv_lease_file)
 
 AC_ARG_WITH(srv6-lease-file,
-       AS_HELP_STRING([--with-srv6-lease-file=PATH],[File for dhcpd6 leases 
+       AS_HELP_STRING([--with-srv6-lease-file=PATH],[File for dhcpd6 leases
                        (default is LOCALSTATEDIR/db/dhcpd6.leases)]),
        AC_DEFINE_UNQUOTED([_PATH_DHCPD6_DB], ["$withval"],
                           [File for dhcpd6 leases.]))
@@ -354,7 +358,7 @@ fi
 AC_MSG_RESULT($with_srv6_lease_file)
 
 AC_ARG_WITH(cli-lease-file,
-       AS_HELP_STRING([--with-cli-lease-file=PATH],[File for dhclient leases 
+       AS_HELP_STRING([--with-cli-lease-file=PATH],[File for dhclient leases
                        (default is LOCALSTATEDIR/db/dhclient.leases)]),
        AC_DEFINE_UNQUOTED([_PATH_DHCLIENT_DB], ["$withval"],
                           [File for dhclient leases.]))
@@ -384,7 +388,7 @@ fi
 AC_MSG_RESULT($with_cli_lease_file)
 
 AC_ARG_WITH(cli6-lease-file,
-       AS_HELP_STRING([--with-cli6-lease-file=PATH],[File for dhclient6 leases 
+       AS_HELP_STRING([--with-cli6-lease-file=PATH],[File for dhclient6 leases
                        (default is LOCALSTATEDIR/db/dhclient6.leases)]),
        AC_DEFINE_UNQUOTED([_PATH_DHCLIENT6_DB], ["$withval"],
                           [File for dhclient6 leases.]))
@@ -486,20 +490,20 @@ AC_CHECK_HEADER(linux/filter.h, DO_LPF=1, ,
 ])
 if test -n "$DO_LPF"
 then
-       AC_DEFINE([HAVE_LPF], [1], 
+       AC_DEFINE([HAVE_LPF], [1],
                  [Define to 1 to use the Linux Packet Filter interface code.])
 else
        AC_CHECK_HEADER(sys/dlpi.h, DO_DLPI=1)
        if test -n "$DO_DLPI"
        then
-               AC_DEFINE([HAVE_DLPI], [1], 
+               AC_DEFINE([HAVE_DLPI], [1],
                          [Define to 1 to use DLPI interface code.])
        else
                AC_CHECK_HEADER(net/bpf.h, DO_BPF=1)
                if test -n "$DO_BPF"
                then
                        AC_DEFINE([HAVE_BPF], [1],
-                                 [Define to 1 to use the 
+                                  [Define to 1 to use the
                                   Berkeley Packet Filter interface code.])
                fi
        fi
@@ -553,8 +557,8 @@ AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
 AC_SEARCH_LIBS(socket, [socket])
 AC_SEARCH_LIBS(inet_ntoa, [nsl])
 
-AC_SEARCH_LIBS(inet_aton, [socket nsl], , 
-       AC_DEFINE([NEED_INET_ATON], [1], 
+AC_SEARCH_LIBS(inet_aton, [socket nsl], ,
+       AC_DEFINE([NEED_INET_ATON], [1],
                  [Define to 1 if the inet_aton() function is missing.]))
 
 # Check for a standalone regex library.
@@ -567,12 +571,12 @@ AC_SEARCH_LIBS(if_nametoindex, [ipv6])
 
 # check for /dev/random (declares HAVE_DEV_RANDOM)
 AC_CHECK_FILE(/dev/random,
-       AC_DEFINE([HAVE_DEV_RANDOM], [1], 
+       AC_DEFINE([HAVE_DEV_RANDOM], [1],
                  [Define to 1 if you have the /dev/random file.]))
 
 # see if there is a "sa_len" field in our interface information structure
 AC_CHECK_MEMBER(struct sockaddr.sa_len,
-       AC_DEFINE([HAVE_SA_LEN], [], 
+       AC_DEFINE([HAVE_SA_LEN], [],
                  [Define to 1 if the sockaddr structure has a length field.]),
        ,
        [#include <sys/socket.h>])
@@ -583,13 +587,13 @@ AC_CHECK_SIZEOF(struct iaddr *, , [
 #include <stdio.h>
 ])
 
-# Solaris does not have the msg_control or msg_controlen members 
+# Solaris does not have the msg_control or msg_controlen members
 # in the msghdr structure unless you define:
 #
 #   _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, and __EXTENSIONS__
-# 
+#
 # See the "standards" man page for details.
-# 
+#
 # We check for the msg_control member, and if it is not found, we check
 # again with the appropriate defines added to the CFLAGS. (In order to
 # do this we have to remove the check from the cache, which is what the
@@ -599,7 +603,7 @@ AC_CHECK_MEMBER(struct msghdr.msg_control,,
         CFLAGS="$CFLAGS -D__EXTENSIONS__"
         unset ac_cv_member_struct_msghdr_msg_control
         AC_CHECK_MEMBER(struct msghdr.msg_control,,
-               [AC_MSG_ERROR([Missing msg_control member in 
+               [AC_MSG_ERROR([Missing msg_control member in
                               msg_control structure.])],
                [
 #include <sys/types.h>
@@ -617,10 +621,10 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci,
 
 BINDDIR=
 AC_ARG_WITH(libbind,
-       AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH 
+       AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
                        (default is ./bind)]),
        use_libbind="$withval", use_libbind="no")
-case "$use_libbind" in 
+case "$use_libbind" in
 yes)
        BINDDIR="\${top_srcdir}/bind"
        ;;
@@ -749,6 +753,9 @@ AC_CONFIG_FILES([
 AC_OUTPUT
 
 sh util/bindvar.sh
+if test $? -ne 0; then
+    AC_MSG_ERROR([*** util/bindvar.sh failed])
+fi
 
 cat > config.report << END
 
index 96725abdd707a20eb0fc12c88f42452dd8315400..37481015b97e862aa62679836c6c377df892c99f 100644 (file)
@@ -311,6 +311,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index deb0ac806f76cdf2e89484582c982ef07d63eb56..1c1a590c031d879a219a9846cb502f74113967c6 100644 (file)
@@ -264,6 +264,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index b3cdff842304e947bd3ec6221d64241f74d5aff8..ae49faac71ddfe3f76d31a098aa89ed25d024360 100644 (file)
@@ -306,6 +306,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 27dd989d1569978d4604dc35b68c55a822a88c02..9a0451fee5a57c8d9f60ffc6b706be9f984cc770 100644 (file)
@@ -287,6 +287,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 9778464f2b30f6bc9d07d3b08848037ea24cbeca..dc880e7d8f0d9eb50f53aeb202bd9311147158ff 100644 (file)
@@ -351,6 +351,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index a4fa2adbde491b80942126bc35abbd72942d5dc5..9c37fc50d183dfa231360a4f2c4b35d5748a148f 100644 (file)
@@ -367,6 +367,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 22a5ea0a56748921ac163f0aa59cef9c03f580e8..792a21869ae72b7b1ef474322cfa839d5cfe4347 100644 (file)
@@ -259,6 +259,7 @@ mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
+pkgcfg_found = @pkgcfg_found@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
index 30ecd906d03b3551dd172cb597852d49df3f717c..184a4cc08f54bbfce301b063d9f1feddc2ccc9d0 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009,2015  Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -20,6 +20,9 @@
 # use by the bind/Makefile, we do this to minimize portability
 # concerns.
 
+# Bind requires a GNU style make to compile, if we can't find one
+# exit with a non-zero status, otherwise exit with success (i.e. 0)
+
 binddir=`pwd`
 gmake=
 for x in gmake gnumake make; do
@@ -29,7 +32,15 @@ for x in gmake gnumake make; do
        fi
 done
 
+if [ -z $gmake ]
+then
+    echo "$0: Building Bind requires a GNU style make tool and none were found in your path. We tried gmake, gnumake, and make."
+    exit 1
+fi
+
 cat <<EOF > bind/bindvar.tmp
 binddir=$binddir/bind
 GMAKE=$gmake
 EOF
+
+exit 0