X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fbootstrap;h=2087bab8fc534834a3edb5476fc644fd5abff432;hb=2c53651d0b8c9c7ea2dc61a9ece68cc65d2bf383;hp=93fe859ef0a67755f78870db08d019a04d17e894;hpb=2464bbfa7a6b82eca7bf3f7d517515ed462f1b23;p=gnulib.git diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 93fe859ef..2087bab8f 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -49,7 +49,7 @@ Options: not to have been checked out. --skip-po Do not download po files. -If the file bootstrap.conf exists in the current working directory, its +If the file $0.conf exists in the same directory as this script, its contents are read as shell variables to configure the bootstrap. Running without arguments will suffice in most cases. @@ -146,7 +146,13 @@ copy=false vc_ignore=auto # Override the default configuration, if necessary. -test -r bootstrap.conf && . ./bootstrap.conf +# Make sure that bootstrap.conf is sourced from the current directory +# if we were invoked as "sh bootstrap". +case "$0" in + */*) test -r "$0.conf" && . "$0.conf" ;; + *) test -r "$0.conf" && . ./"$0.conf" ;; +esac + if test "$vc_ignore" = auto; then vc_ignore= @@ -256,7 +262,8 @@ case ${GNULIB_SRCDIR--} in trap cleanup_gnulib 1 2 13 15 - git clone --depth 2 git://git.sv.gnu.org/gnulib || + git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow= + git clone $shallow git://git.sv.gnu.org/gnulib || cleanup_gnulib trap - 1 2 13 15 @@ -591,8 +598,16 @@ for command in \ 'automake --add-missing --copy --force-missing'; do if test "$command" = libtool; then - grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null || - continue + use_libtool=0 + # We'd like to use grep -E, to see if any of LT_INIT, + # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, + # but that's not portable enough (e.g., for Solaris). + grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \ + && use_libtool=1 + grep '^[ ]*LT_INIT' configure.ac >/dev/null \ + && use_libtool=1 + test $use_libtool = 0 \ + && continue command='libtoolize -c -f' fi echo "$0: $command ..."