summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2016-10-06 16:15:35 +0200
committerFrancis Dupont <fdupont@isc.org>2016-10-06 16:15:35 +0200
commitd113bc2ca69a6f6a33139c3708a4ea6818605b69 (patch)
treeb9461aab0a1c8ceef996db075ec85b87fee42fc8
parent13e5cc6cbe83ac7cd9285a54e870e4f8ab16a604 (diff)
downloadisc-dhcp-d113bc2ca69a6f6a33139c3708a4ea6818605b69.tar.gz
Half fixed recovering (no space handling) (unfinished)
-rw-r--r--common/Makefile.am.in2
-rwxr-xr-xconfigure23
-rw-r--r--configure.ac21
-rw-r--r--configure.ac+lt7
-rw-r--r--configure.ac-base19
-rw-r--r--configure.ac-lt21
-rw-r--r--dhcpctl/Makefile.am.in4
-rw-r--r--omapip/Makefile.am.in2
-rwxr-xr-xre-conf8
-rw-r--r--tests/Makefile.am.in2
-rw-r--r--util/lt.pl1
11 files changed, 77 insertions, 33 deletions
diff --git a/common/Makefile.am.in b/common/Makefile.am.in
index b168a0ba..f403f0f3 100644
--- a/common/Makefile.am.in
+++ b/common/Makefile.am.in
@@ -1,7 +1,7 @@
AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
AM_CFLAGS = $(LDAP_CFLAGS)
-noinst_LIBRARIES = libdhcp.@A@
+lib_@DHLIBS@ = libdhcp.@A@
libdhcp_@A@_SOURCES = alloc.c bpf.c comapi.c conflex.c ctrace.c dhcp4o6.c \
discover.c dispatch.c dlpi.c dns.c ethernet.c execute.c \
fddi.c icmp.c inet.c lpf.c memory.c nit.c ns_name.c \
diff --git a/configure b/configure
index 8442d5e2..c3a7a24f 100755
--- a/configure
+++ b/configure
@@ -629,6 +629,7 @@ LDAP_CFLAGS
LDAP_LIBS
BINDLT
A
+DHLIBS
INSTALL_BIND_FALSE
INSTALL_BIND_TRUE
HAVE_BINDDIR_FALSE
@@ -7032,23 +7033,29 @@ if test "${enable_libtool+set}" = set; then :
enableval=$enable_libtool; want_libtool="$enableval"
fi
-if test "$want_libtool" = "yes"; then
+
+
if test "$want_libtool" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: legacy configure is used but libtool is enabled. Trying to recover..." >&5
$as_echo "$as_me: WARNING: legacy configure is used but libtool is enabled. Trying to recover..." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: legacy configure is used but libtool is enabled. Trying to recover..." >&5
-$as_echo "$as_me: WARNING: legacy configure is used but libtool is enabled. Trying to recover..." >&2;}
- cd $srcdir; exec ./re-conf $ac_configure_args
- cd $srcdir; exec ./re-conf $ac_configure_args
- as_fn_error $? "Recovering failed" "$LINENO" 5
+ # dequote $ac_configure_args
+ eval "set my_configure_args $ac_configure_args"
+ shift
+ re_configure_args=
+ for a; do
+ re_configure_args="$re_configure_args $a"
+ done
+ cd $srcdir; exec ./re-conf $re_configure_args
as_fn_error $? "Recovering failed" "$LINENO" 5
fi
-fi
-A=a
+
+DHLIBS=LIBRARIES
A=a
+
+
# OpenLDAP support.
# Check whether --with-ldap was given.
diff --git a/configure.ac b/configure.ac
index 338879b4..abd8ab61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -825,18 +825,25 @@ BINDLT=
AC_ARG_ENABLE(libtool,
AS_HELP_STRING([--enable-libtool],[use GNU libtool for dynamic shared libraries (default is $default_libtool).]),
want_libtool="$enableval")
-if test "$want_libtool" = "yes"; then
+
+
if test "$want_libtool" = "yes"; then
AC_MSG_WARN([legacy configure is used but libtool is enabled. Trying to recover...])
- AC_MSG_WARN([legacy configure is used but libtool is enabled. Trying to recover...])
- cd $srcdir; exec ./re-conf $ac_configure_args
- cd $srcdir; exec ./re-conf $ac_configure_args
- AC_MSG_ERROR([Recovering failed])
+ # dequote $ac_configure_args
+ eval "set my_configure_args $ac_configure_args"
+ shift
+ re_configure_args=
+ for a; do
+ re_configure_args="$re_configure_args $a"
+ done
+ cd $srcdir; exec ./re-conf $re_configure_args
AC_MSG_ERROR([Recovering failed])
fi
-fi
-A=a
+
+DHLIBS=LIBRARIES
A=a
+
+AC_SUBST(DHLIBS)
AC_SUBST(A)
AC_SUBST(BINDLT)
diff --git a/configure.ac+lt b/configure.ac+lt
index c64738fb..dccf2f66 100644
--- a/configure.ac+lt
+++ b/configure.ac+lt
@@ -62,7 +62,6 @@ AC_SUBST(BINDCONFIG)
# Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
AC_USE_SYSTEM_EXTENSIONS
-AC_PROG_RANLIB
AC_PATH_PROG(AR, ar)
AC_SUBST(AR)
@@ -829,11 +828,17 @@ BINDLT=
AC_ARG_ENABLE(libtool,
AS_HELP_STRING([--enable-libtool],[use GNU libtool for dynamic shared libraries (default is $default_libtool).]),
want_libtool="$enableval")
+
if test "$want_libtool" = "no"; then
AC_MSG_ERROR([libtool configure is used but libtool is disabled?])
fi
+
+DHLIBS=LTLIBRARIES
A=la
BINDLT=--with-libtool
+
+
+AC_SUBST(DHLIBS)
AC_SUBST(A)
AC_SUBST(BINDLT)
diff --git a/configure.ac-base b/configure.ac-base
index d973fd4a..4b109ced 100644
--- a/configure.ac-base
+++ b/configure.ac-base
@@ -64,7 +64,9 @@ AC_SUBST(BINDCONFIG)
# Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
AC_USE_SYSTEM_EXTENSIONS
+@BEGIN WITHOUT LIBTOOL
AC_PROG_RANLIB
+@END WITHOUT LIBTOOL
AC_PATH_PROG(AR, ar)
AC_SUBST(AR)
@@ -833,21 +835,36 @@ BINDLT=
AC_ARG_ENABLE(libtool,
AS_HELP_STRING([--enable-libtool],[use GNU libtool for dynamic shared libraries (default is $default_libtool).]),
want_libtool="$enableval")
+
@BEGIN WITH LIBTOOL
if test "$want_libtool" = "no"; then
AC_MSG_ERROR([libtool configure is used but libtool is disabled?])
fi
+
+DHLIBS=LTLIBRARIES
A=la
BINDLT=--with-libtool
@END WITH LIBTOOL
+
@BEGIN WITHOUT LIBTOOL
if test "$want_libtool" = "yes"; then
AC_MSG_WARN([legacy configure is used but libtool is enabled. Trying to recover...])
- cd $srcdir; exec ./re-conf $ac_configure_args
+ # dequote $ac_configure_args
+ eval "set my_configure_args $ac_configure_args"
+ shift
+ re_configure_args=
+ for a; do
+ re_configure_args="$re_configure_args $a"
+ done
+ cd $srcdir; exec ./re-conf $re_configure_args
AC_MSG_ERROR([Recovering failed])
fi
+
+DHLIBS=LIBRARIES
A=a
@END WITHOUT LIBTOOL
+
+AC_SUBST(DHLIBS)
AC_SUBST(A)
AC_SUBST(BINDLT)
diff --git a/configure.ac-lt b/configure.ac-lt
index 338879b4..abd8ab61 100644
--- a/configure.ac-lt
+++ b/configure.ac-lt
@@ -825,18 +825,25 @@ BINDLT=
AC_ARG_ENABLE(libtool,
AS_HELP_STRING([--enable-libtool],[use GNU libtool for dynamic shared libraries (default is $default_libtool).]),
want_libtool="$enableval")
-if test "$want_libtool" = "yes"; then
+
+
if test "$want_libtool" = "yes"; then
AC_MSG_WARN([legacy configure is used but libtool is enabled. Trying to recover...])
- AC_MSG_WARN([legacy configure is used but libtool is enabled. Trying to recover...])
- cd $srcdir; exec ./re-conf $ac_configure_args
- cd $srcdir; exec ./re-conf $ac_configure_args
- AC_MSG_ERROR([Recovering failed])
+ # dequote $ac_configure_args
+ eval "set my_configure_args $ac_configure_args"
+ shift
+ re_configure_args=
+ for a; do
+ re_configure_args="$re_configure_args $a"
+ done
+ cd $srcdir; exec ./re-conf $re_configure_args
AC_MSG_ERROR([Recovering failed])
fi
-fi
-A=a
+
+DHLIBS=LIBRARIES
A=a
+
+AC_SUBST(DHLIBS)
AC_SUBST(A)
AC_SUBST(BINDLT)
diff --git a/dhcpctl/Makefile.am.in b/dhcpctl/Makefile.am.in
index dc44e1ad..e94deb23 100644
--- a/dhcpctl/Makefile.am.in
+++ b/dhcpctl/Makefile.am.in
@@ -1,5 +1,5 @@
bin_PROGRAMS = omshell
-lib_LIBRARIES = libdhcpctl.@A@
+lib_@DHLIBS@ = libdhcpctl.@A@
noinst_PROGRAMS = cltest
man_MANS = omshell.1 dhcpctl.3
EXTRA_DIST = $(man_MANS)
@@ -11,7 +11,7 @@ omshell_LDADD = libdhcpctl.@A@ ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
@BINDLIBISCDIR@/libisc.@A@
-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
+libdhcpctl_@A@_SOURCES = dhcpctl.c callback.c remote.c
cltest_SOURCES = cltest.c
cltest_LDADD = libdhcpctl.@A@ ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
diff --git a/omapip/Makefile.am.in b/omapip/Makefile.am.in
index bf1dd09b..177b73f5 100644
--- a/omapip/Makefile.am.in
+++ b/omapip/Makefile.am.in
@@ -1,4 +1,4 @@
-lib_LIBRARIES = libomapi.@A@
+lib_@DHLIBS@ = libomapi.@A@
noinst_PROGRAMS = svtest
libomapi_@A@_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
diff --git a/re-conf b/re-conf
index 2a776fdb..e6d8d6cd 100755
--- a/re-conf
+++ b/re-conf
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2016 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
@@ -14,7 +14,9 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# called by the configure place-holder
+# called by the legacy configure when libtool is enabled
cp configure.ac+lt configure.ac
-autoreconf -i && ./configure $*
+autoreconf -i
+echo Reconfiguring with $*
+./configure $*
diff --git a/tests/Makefile.am.in b/tests/Makefile.am.in
index 25f490bb..1ef67097 100644
--- a/tests/Makefile.am.in
+++ b/tests/Makefile.am.in
@@ -28,6 +28,6 @@ EXTRA_DIST = failover/dhcp-1.cf failover/dhcp-2.cf failover/new-failover \
AM_CPPFLAGS = -I..
-check_LIBRARIES = libt_api.@A@
+check_@DHLIBS@ = libt_api.@A@
libt_api_@A@_SOURCES = t_api.c t_api_dhcp.c
diff --git a/util/lt.pl b/util/lt.pl
index da493826..eed17fe3 100644
--- a/util/lt.pl
+++ b/util/lt.pl
@@ -118,7 +118,6 @@ foreach $line (<STDIN>) {
$escaped += 1;
next;
} else {
- print $line. "\n";
$included += 1;
}
}