Fix autogen.sh
authorJohn Dennis <jdennis@redhat.com>
Thu, 24 Mar 2011 15:59:37 +0000 (11:59 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 25 Mar 2011 10:11:12 +0000 (11:11 +0100)
The script is invoked with -e which causes the script to exit
immediately if a subshell command enclosed in parentheses
has a non-zero exit status. The command

  grep "^AC_CONFIG_HEADER" configure.in > /dev/null

returns non-zero for many of the subdirs which causes the autogen.sh
script to immediately exit. In fact it exits on the very first
subdirectory (src/modules/rlm_sql) prematurely aborting the entire
operation.

autogen.sh

index 9cba642..20887a8 100755 (executable)
@@ -16,6 +16,6 @@ mysubdirs=`echo $mysubdirs`
 for F in $mysubdirs
 do
        echo "Configuring in $F..."
-       (cd $F && grep "^AC_CONFIG_HEADER" configure.in > /dev/null && autoheader -I$parentdir)
+       (cd $F && grep "^AC_CONFIG_HEADER" configure.in > /dev/null || exit 0; autoheader -I$parentdir)
        (cd $F && autoconf -I$parentdir)
 done