summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2016-10-21 09:51:12 +0200
committerFrancis Dupont <fdupont@isc.org>2016-10-21 09:51:12 +0200
commit6077a4bba8481ae0914cdc7a7ccf0ac05fcdedfe (patch)
tree75b48348e1e0226394f4484d6e6091721d8f91a4 /configure.ac
parent047719bc0e959be62793296e4dfda848a8144e1d (diff)
parent236c987c1af90bccece379ee0f85e8b9c2561c1f (diff)
downloadisc-dhcp-6077a4bba8481ae0914cdc7a7ccf0ac05fcdedfe.tar.gz
Merged rt29402c (footprint/libtool)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac95
1 files changed, 89 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 2a1cc150..b4d5bc3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
AC_INIT([DHCP],[4.4.0-dev],[dhcp-users@isc.org])
+
# we specify "foreign" to avoid having to have the GNU mandated files,
# like AUTHORS, COPYING, and such
AM_INIT_AUTOMAKE([foreign])
@@ -784,10 +785,15 @@ no)
if test ! -d "$use_libbind"; then
AC_MSG_ERROR([Cannot find bind directory at $use_libbind])
fi
- if test ! -d "$use_libbind/include"; then
+ if test ! -d "$use_libbind/include" -o \
+ ! -f "$use_libbind/include/isc/buffer.h"
+ then
AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include])
fi
- if test ! -d "$use_libbind/lib"; then
+ if test ! -d "$use_libbind/lib" -o \
+ \( ! -f "$use_libbind/lib/libisc.a" -a \
+ ! -f "$use_libbind/lib/libisc.la" \)
+ then
AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib])
fi
BINDDIR="$use_libbind"
@@ -808,12 +814,84 @@ AC_SUBST(BINDLIBISCDIR)
AC_SUBST(DISTCHECK_LIBBIND_CONFIGURE_FLAG)
AM_CONDITIONAL(HAVE_BINDDIR, test "$use_libbind" = "no")
+#
+# GNU libtool support
+#
+case "$build_os" in
+ sunos*)
+ # Just set the maximum command line length for sunos
+ # as it otherwise takes a exceptionally long time to
+ # work it out. Required for libtool.
+
+ lt_cv_sys_max_cmd_len=4096
+ ;;
+esac
+
+want_libtool="no"
+
+BINDLT=
+DISTCHECK_LIBTOOL_CONFIGURE_FLAG=
+AC_ARG_ENABLE(libtool,
+ AS_HELP_STRING([--enable-libtool],
+[use GNU libtool for dynamic shared libraries (default is no).]),
+ want_libtool="$enableval")
+
+if test "$use_libbind" != "no"; then
+ if test "$want_libtool" = "yes" -a \
+ ! -f "$use_libbind/lib/libisc.la"
+ then
+ AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib])
+ fi
+ if test "$want_libtool" = "no" -a \
+ ! -f "$use_libbind/lib/libisc.a"
+ then
+ AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib])
+ fi
+fi
+
+
+if test "$want_libtool" = "yes"; then
+ AC_MSG_WARN([legacy configure is used but libtool is enabled. Trying to recover...])
+ # expand $ac_configure_args
+ eval "set my_configure_args $ac_configure_args"
+ shift
+ cd $srcdir; exec ./config+lt "$@"
+ AC_MSG_ERROR([Recovering failed])
+fi
+
+DHLIBS=LIBRARIES
+A=a
+
+AC_SUBST(DHLIBS)
+AC_SUBST(A)
+AC_SUBST(BINDLT)
+AC_SUBST(DISTCHECK_LIBTOOL_CONFIGURE_FLAG)
+
+# quoting in Makefile.am.in
+Q=@
+AC_SUBST(Q)
+
+# install bind includes and libraries
+
+want_install_bind="no"
+if test "$want_libtool" = "yes"; then
+ want_install_bind="yes"
+fi
+if test "$use_libbind" != "no"; then
+ want_install_bind="no"
+fi
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])
+ AS_HELP_STRING([--enable-bind-install],
+[install bind includes and libraries (default is no).]),
+ want_install_bind="$enableval")
+if test "$want_install_bind" = "yes"; then
+ if test "$use_libbind" != "no"; then
+ AC_MSG_WARN([--enable-bind-install does nothing when --with-libbind is set])
+ fi
+elif test "$want_libtool" = "yes" -a "$use_libbind" = "no"; then
+ AC_MSG_WARN([embedded dynamic bind libraries must be installed])
fi
-AM_CONDITIONAL(INSTALL_BIND, test "$enable_bind_install" = "yes")
+AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes")
# OpenLDAP support.
AC_ARG_WITH(ldap,
@@ -910,13 +988,17 @@ AC_CONFIG_FILES([
Makefile
client/Makefile
client/tests/Makefile
+ common/Makefile.am
common/Makefile
common/tests/Makefile
+ dhcpctl/Makefile.am
dhcpctl/Makefile
includes/Makefile
+ omapip/Makefile.am
omapip/Makefile
relay/Makefile
server/Makefile
+ tests/Makefile.am
tests/Makefile
tests/unittest.sh
server/tests/Makefile
@@ -924,6 +1006,7 @@ AC_CONFIG_FILES([
])
AC_OUTPUT
+
if test "$enable_dhcpv4o6" = "yes"; then
DHCP_VERSIONS="DHCPv4, DHCPv6 and DHCPv4-over-DHCPv6"
elif test "$enable_dhcpv6" != "no"; then