common/autoconf/autogen.sh

changeset 664
15c1642967c9
parent 571
7a3c6ffdf1fb
child 674
a09e9c9ca963
     1.1 --- a/common/autoconf/autogen.sh	Thu Mar 21 10:42:22 2013 -0700
     1.2 +++ b/common/autoconf/autogen.sh	Tue Apr 02 13:59:30 2013 +0100
     1.3 @@ -43,14 +43,24 @@
     1.4  
     1.5  custom_hook=$custom_script_dir/custom-hook.m4
     1.6  
     1.7 -if test "x`which autoconf 2> /dev/null`" = x; then
     1.8 +AUTOCONF=$(which autoconf 2> /dev/null);
     1.9 +AUTOCONF_267=$(which autoconf-2.67 2> /dev/null);
    1.10 +
    1.11 +echo "Autoconf found: ${AUTOCONF}"
    1.12 +echo "Autoconf-2.67 found: ${AUTOCONF_267}"
    1.13 +
    1.14 +if test "x${AUTOCONF}" = x; then
    1.15    echo You need autoconf installed to be able to regenerate the configure script
    1.16    echo Error: Cannot find autoconf 1>&2
    1.17    exit 1
    1.18  fi
    1.19  
    1.20 -echo Generating generated-configure.sh
    1.21 -cat $script_dir/configure.ac  | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
    1.22 +if test "x${AUTOCONF_267}" != x; then
    1.23 +  AUTOCONF=${AUTOCONF_267};
    1.24 +fi
    1.25 +
    1.26 +echo Generating generated-configure.sh with ${AUTOCONF}
    1.27 +cat $script_dir/configure.ac  | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | ${AUTOCONF} -W all -I$script_dir - > $script_dir/generated-configure.sh
    1.28  rm -rf autom4te.cache
    1.29  
    1.30  if test -e $custom_hook; then
    1.31 @@ -58,7 +68,7 @@
    1.32    # We have custom sources available; also generate configure script
    1.33    # with custom hooks compiled in.
    1.34    cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
    1.35 -    sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | autoconf -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
    1.36 +    sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
    1.37    rm -rf autom4te.cache
    1.38  else
    1.39    echo No custom hook found:  $custom_hook

mercurial