]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: fool autoreconf to do a recursive reconfiguration
authorVincent Bernat <vincent@bernat.im>
Wed, 16 Sep 2015 20:15:25 +0000 (22:15 +0200)
committerVincent Bernat <vincent@bernat.im>
Wed, 16 Sep 2015 20:17:44 +0000 (22:17 +0200)
We just redefine AC_CONFIG_SUBDIRS to our own empty version. autoreconf
will see this during the tracing step and will automatically reconfigure
libevent and libnl as well. This may unbreak people relying on tool
trying to regen configure without using the "autogen.sh" script.

Fix #133 (with a bit of luck)

autogen.sh
m4/config_subdirs.m4

index 13b53906fe5ea8182a06510ae752e7083db423cf..b3176842b7627034f999bca0ed8bed57305f8887 100755 (executable)
@@ -62,19 +62,14 @@ EOF
 }
 
 
-SUBDIRS=""
-for dir in *; do
-    [ -d "$dir" ] || continue
-    [ -f "$dir"/configure.ac ] || [ -f "$dir"/configure.in ] || continue
-    SUBDIRS="$SUBDIRS $dir"
-done
-
 echo "autogen.sh: start libtoolize to get ltmain.sh"
 ${LIBTOOLIZE} --copy --force
 echo "autogen.sh: reconfigure with autoreconf"
-${AUTORECONF} -vif --no-recursive -I m4 . $SUBDIRS || {
+${AUTORECONF} -vif -I m4 || {
     echo "autogen.sh: autoreconf has failed ($?), let's do it manually"
-    for dir in $PWD $SUBDIRS; do
+    for dir in $PWD *; do
+        [ -d "$dir" ] || continue
+        [ -f "$dir"/configure.ac ] || [ -f "$dir"/configure.in ] || continue
        echo "autogen.sh: configure `basename $dir`"
        (cd "$dir" && ${ACLOCAL} -I m4 ${ACLOCAL_FLAGS})
         (cd "$dir" && check_pkg_config)
index 7e3697f3362491f1e6c75181e2426e15b797f26d..a9952adbaf70dd92dace19757a6692930412319b 100644 (file)
@@ -6,6 +6,7 @@
 # to call that late enough.
 
 AC_DEFUN([lldp_CONFIG_SUBDIRS], [
+  AC_CONFIG_SUBDIRS([$1])
   ac_sub_configure_args=
   ac_prev=
   eval "set x $ac_configure_args"
@@ -96,3 +97,6 @@ AC_DEFUN([lldp_CONFIG_SUBDIRS], [
   _AS_ECHO([$ac_msg])
   cd "$ac_popdir"
 ])
+
+# Dummy AC_CONFIG_SUBDIRS for autoreconf tracing
+AC_DEFUN([AC_CONFIG_SUBDIRS], [])