From b41cea300e5210970a30fa261afac5290dfc3d00 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 16 Sep 2015 22:15:25 +0200 Subject: [PATCH] build: fool autoreconf to do a recursive reconfiguration 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 | 13 ++++--------- m4/config_subdirs.m4 | 4 ++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/autogen.sh b/autogen.sh index 13b53906..b3176842 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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) diff --git a/m4/config_subdirs.m4 b/m4/config_subdirs.m4 index 7e3697f3..a9952adb 100644 --- a/m4/config_subdirs.m4 +++ b/m4/config_subdirs.m4 @@ -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], []) -- 2.39.5