This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Libtool".
The branch, master has been updated via 880a41f6f5118b731c910382319d958cd2189fd4 (commit) via fec7d8718047269d2b4e1346aa46ef38b0828845 (commit) via 9fd7b88bc2b1c7a5b57495866b412c8767b27639 (commit) via 94271692f0bd4933b712be802818b90422975795 (commit) via 13d640337a652ce5ba6c92c585c6ae91ad0dbc02 (commit) via 97a331b094b7842203f8bf0c4baf993fc8f522e2 (commit) via 2c8c28acbd60b88d9ce569a169de803182b05af6 (commit) from eea1df80de2239ae2962786cbcb33fa3e3b4533a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 880a41f6f5118b731c910382319d958cd2189fd4 Author: Gary V. Vaughan <g...@gnu.org> Date: Tue Oct 29 17:08:49 2013 +1300 bootstrap: fix a quoting error. * gl/build-aux/bootstrap.in (func_require_buildreq_autoconf): Quote the extracted version number correctly so that it is displayed in verbose mode. Signed-off-by: Gary V. Vaughan <g...@gnu.org> commit fec7d8718047269d2b4e1346aa46ef38b0828845 Author: Gary V. Vaughan <g...@gnu.org> Date: Mon Oct 28 20:14:22 2013 +1300 funclib.sh: simplify version comparison functions. * gl/build-aux/funclib.sh (func_sort_ver): Much simplified. (func_lt_ver): New function, return true if arguments are in ascending order. * gl/build-aux/bootstrap.in: Simplify with func_lt_ver. * gl/build-aux/do-release-commit-and-tag.diff: Likewise. * bootstrap: Regenerate. Co-Authored-by: Paul Eggert <egg...@cs.ucla.edu> Signed-off-by: Gary V. Vaughan <g...@gnu.org> commit 9fd7b88bc2b1c7a5b57495866b412c8767b27639 Author: Gary V. Vaughan <g...@gnu.org> Date: Mon Oct 28 19:55:36 2013 +1300 bootstrap: show found GREP and SED in verbose mode. * gl/build-aux/bootstrap.in (EGREP, FGREP, GREP, SED): Remove. These are already set by funclib.sh. (func_prep): After --verbose has been processed, show the paths to GREP and SED found by funclib.sh. * bootstrap: Regenerate. Signed-off-by: Gary V. Vaughan <g...@gnu.org> commit 94271692f0bd4933b712be802818b90422975795 Author: Gary V. Vaughan <g...@gnu.org> Date: Mon Oct 28 18:50:36 2013 +1300 refactor: simplify program path searching in funclib.sh. * gl/build-aux/funclib.sh (func_path_progs): New function. Factor out common code from GREP and SED searches. (func_check_prog_sed, func_check_prog_grep): New functions, for non-common code. (scriptversion): Update. * bootstrap: Regenerate. Signed-off-by: Gary V. Vaughan <g...@gnu.org> commit 13d640337a652ce5ba6c92c585c6ae91ad0dbc02 Author: Gary V. Vaughan <g...@gnu.org> Date: Mon Oct 28 17:38:23 2013 +1300 bootstrap: search for a non-truncating grep binary. On at least Unixware 7.1.4, the first grep binary on PATH is unable to process the extract-trace scripts. * gl/build-aux/funclib.sh (GRUP): Search PATH for a grep binary that doesn't truncate its own output if available, and set GREP accordingly. * Makefile.am (SCRIPT_ENV): Add setting for GREP. * bootstrap: Regenerate. Reported by Tim Rice. Signed-off-by: Gary V. Vaughan <g...@gnu.org> commit 97a331b094b7842203f8bf0c4baf993fc8f522e2 Author: Gary V. Vaughan <g...@gnu.org> Date: Mon Oct 28 16:06:40 2013 +1300 bootstrap: search for a non-truncating sed binary. On at least Unixware 7.1.4, the first sed binary on PATH is unable to process the extract-trace scripts. * gl/build-aux/funclib.sh (PATH_SEPARATOR): Set to : or ; according to a feature test. (func_executable_p): New function. (SED): Search PATH for a sed binary that doesn't truncate its own output if available, and set SED accordingly. (scriptversion): Update. * Makefile.am (SCRIPT_ENV): New macro, for propagating configured variables. (ltdl_ac_aux_dir, $(ltmain_sh), install-data-local): Use it. * bootstrap: Regenerate. Reported by Tim Rice. Signed-off-by: Gary V. Vaughan <g...@gnu.org> commit 2c8c28acbd60b88d9ce569a169de803182b05af6 Author: Gary V. Vaughan <g...@gnu.org> Date: Mon Oct 28 10:13:34 2013 +1300 tests: use autotest as_unset rather than rerolling $unset locally. On at least Unixware 7.1.4, the shell variable 'unset' gets set to 'no' during the testsuite run, breaking several test cases. We should have been using Autotest $as_unset anyway. * tests/testsuite.at (unset): Remove test and variable setting. (LT_AT_MAKE): Use $as_unset as provided by autotest boilerplate instead of our own $unset. * tests/demo.at (uninstalled libraries ave priority): Likewise. Reported by Tim Rice. Signed-off-by: Gary V. Vaughan <g...@gnu.org> ----------------------------------------------------------------------- Summary of changes: Makefile.am | 8 +- bootstrap | 210 +++++++++++++++++++++------ gl/build-aux/bootstrap.in | 13 +- gl/build-aux/do-release-commit-and-tag.diff | 11 +- gl/build-aux/funclib.sh | 197 +++++++++++++++++++++----- tests/demo.at | 2 +- tests/testsuite.at | 7 +- 7 files changed, 348 insertions(+), 100 deletions(-) diff --git a/Makefile.am b/Makefile.am index d6dbc68..fe269ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -54,6 +54,8 @@ rebuild = rebuild=:; revision=`$(lt__cd) $(srcdir) && $(git_version_gen) | sed ' # Bootstrap. # # ---------- # +SCRIPT_ENV = GREP='$(GREP)' SED='$(SED)' + build_scripts = $(srcdir)/$(aux_dir)/announce-gen \ $(srcdir)/$(aux_dir)/do-release-commit-and-tag \ $(srcdir)/$(aux_dir)/gendocs.sh \ @@ -161,7 +163,7 @@ $(ltmain_sh): $(ltmain_in) $(dotversion) if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \ then echo " GEN " $@; \ else echo "$(inline_source) '$(ltmain_in)' |" $(bootstrap_edit) "> '$@'"; fi; \ - $(inline_source) '$(ltmain_in)' | $(bootstrap_edit) > '$@'; \ + $(SCRIPT_ENV) '$(inline_source)' '$(ltmain_in)' | $(bootstrap_edit) > '$@'; \ chmod a-w '$@'; \ fi @@ -248,7 +250,7 @@ all-local: $(LTDL_BOOTSTRAP_DEPS) ## ---------------- ## abs_aux_dir = `$(lt__cd) '$(srcdir)/$(aux_dir)' && pwd` -ltdl_ac_aux_dir = `$(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac` +ltdl_ac_aux_dir = `$(SCRIPT_ENV) $(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac` configure_edit = $(bootstrap_edit) \ -e '/^\. /s|@auxscriptsdir\@|'$(abs_aux_dir)'|g' \ @@ -507,7 +509,7 @@ install-data-local: $(lt_Makefile_in) $(INSTALL_DATA) "$(ltdldir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \ done ## Inline helper-scripts for installed libtoolize script - '$(inline_source)' libtoolize > '$(DESTDIR)$(bindir)/libtoolize'; + $(SCRIPT_ENV) '$(inline_source)' libtoolize > '$(DESTDIR)$(bindir)/libtoolize'; -chmod a+x '$(DESTDIR)$(pkgdatadir)/configure' '$(DESTDIR)$(bindir)/libtoolize' diff --git a/bootstrap b/bootstrap index 83171b5..1b16d95 100755 --- a/bootstrap +++ b/bootstrap @@ -9,7 +9,7 @@ # Source required external libraries: # Set a version string for this script. -scriptversion=2013-08-23.20; # UTC +scriptversion=2013-10-28.05; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 @@ -94,6 +94,75 @@ nl=' ' IFS="$sp $nl" +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + # There are still modern systems that have problems with 'echo' mis- # handling backslashes, among others, so make sure $bs_echo is set to a # command that correctly interprets backslashes. @@ -135,6 +204,82 @@ else fi +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + $bs_echo_n 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + $bs_echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the sed that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + $bs_echo_n 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + $bs_echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## @@ -146,15 +291,13 @@ fi : ${CP="cp -f"} : ${ECHO="$bs_echo"} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} @@ -1179,37 +1322,21 @@ func_sort_ver () { $debug_cmd - ver1=$1 - ver2=$2 + printf '%s\n%s\n' "$1" "$2" | + sort -t. -k1n -k1 -k2n -k2 -k3n -k3 -k4n -k4 -k5n -k5 -k6n -k6 -k7n -k7 -k8n -k8 -k9n -k9 +} - # Split on '.' and compare each component. - i=1 - while :; do - p1=`echo "$ver1" |cut -d. -f$i` - p2=`echo "$ver2" |cut -d. -f$i` - if test ! "$p1"; then - echo "$1 $2" - break - elif test ! "$p2"; then - echo "$2 $1" - break - elif test ! "$p1" = "$p2"; then - if test "$p1" -gt "$p2" 2>/dev/null; then # numeric comparison - echo "$2 $1" - elif test "$p2" -gt "$p1" 2>/dev/null; then # numeric comparison - echo "$1 $2" - else # numeric, then lexicographic comparison - lp=`printf "$p1\n$p2\n" |sort -n |tail -n1` - if test "$lp" = "$p2"; then - echo "$1 $2" - else - echo "$2 $1" - fi - fi - break - fi - i=`expr $i + 1` - done +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | sed 1q` } @@ -2337,13 +2464,9 @@ scriptversion=2013-09-16.03; # UTC : ${CMP="cmp"} : ${CONFIG_SHELL="/bin/sh"} : ${DIFF="diff"} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} : ${GIT="git"} -: ${GREP="grep"} : ${LN_S="ln -s"} : ${RM="rm"} -: ${SED="sed"} export ACLOCAL export AUTOCONF @@ -2552,6 +2675,10 @@ func_prep () $require_gnulib_merge_changelog + # Report the results of SED and GREP searches from funclib.sh. + func_verbose "GREP='$GREP'" + func_verbose "SED='$SED'" + # fetch update files from the translation project func_update_translations @@ -3329,7 +3456,7 @@ for tool in autoconf libtoolize autopoint; do '$tool' $_G_version http://www.gnu.org/s/'$b' " func_verbose \ - "auto-adding '\'$tool'-'$_G_version\'' to build requirements" + "auto-adding '\'$tool'-$_G_version'\'' to build requirements" } } @@ -4658,8 +4785,7 @@ delimited list of triples; 'program min-version url'." # Fail if a newer version than what we have is required. else - _G_newer=`func_sort_ver $_G_reqver $_G_instver |cut -d' ' -f2` - test "$_G_newer" != "$_G_instver" && { + func_lt_ver "$_G_reqver" "$_G_instver" || { func_error "\ '$_G_app' version == $_G_instver is too old '$_G_app' version >= $_G_reqver is required" diff --git a/gl/build-aux/bootstrap.in b/gl/build-aux/bootstrap.in index 3362d45..e83835c 100755 --- a/gl/build-aux/bootstrap.in +++ b/gl/build-aux/bootstrap.in @@ -100,13 +100,9 @@ scriptversion=2013-09-16.03; # UTC : ${CMP="cmp"} : ${CONFIG_SHELL="/bin/sh"} : ${DIFF="diff"} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} : ${GIT="git"} -: ${GREP="grep"} : ${LN_S="ln -s"} : ${RM="rm"} -: ${SED="sed"} export ACLOCAL export AUTOCONF @@ -315,6 +311,10 @@ func_prep () $require_gnulib_merge_changelog + # Report the results of SED and GREP searches from funclib.sh. + func_verbose "GREP='$GREP'" + func_verbose "SED='$SED'" + # fetch update files from the translation project func_update_translations @@ -1092,7 +1092,7 @@ for tool in autoconf libtoolize autopoint; do '$tool' $_G_version http://www.gnu.org/s/'$b' " func_verbose \ - "auto-adding '\'$tool'-'$_G_version\'' to build requirements" + "auto-adding '\'$tool'-$_G_version'\'' to build requirements" } } @@ -2421,8 +2421,7 @@ delimited list of triples; 'program min-version url'." # Fail if a newer version than what we have is required. else - _G_newer=`func_sort_ver $_G_reqver $_G_instver |cut -d' ' -f2` - test "$_G_newer" != "$_G_instver" && { + func_lt_ver "$_G_reqver" "$_G_instver" || { func_error "\ '$_G_app' version == $_G_instver is too old '$_G_app' version >= $_G_reqver is required" diff --git a/gl/build-aux/do-release-commit-and-tag.diff b/gl/build-aux/do-release-commit-and-tag.diff index ad1b409..1a8b29d 100644 --- a/gl/build-aux/do-release-commit-and-tag.diff +++ b/gl/build-aux/do-release-commit-and-tag.diff @@ -1,5 +1,5 @@ ---- gnulib/build-aux/do-release-commit-and-tag 2013-01-26 16:46:26.000000000 +1300 -+++ gl/build-aux/do-release-commit-and-tag 2013-10-26 15:42:36.000000000 +1300 +--- ./gnulib/build-aux/do-release-commit-and-tag 2013-01-26 16:46:26.000000000 +1300 ++++ gl/build-aux/do-release-commit-and-tag 2013-10-28 20:21:38.000000000 +1300 @@ -5,6 +5,9 @@ # will serve to identify the release, so apply a signed tag to it as well. VERSION=2012-08-01.09 # UTC @@ -10,7 +10,7 @@ # Note: this is a bash script (could be zsh or dash) # Copyright (C) 2009-2013 Free Software Foundation, Inc. -@@ -125,10 +128,9 @@ +@@ -125,10 +128,8 @@ || die 'failed to determine previous version number from .prev-version' # Verify that $ver is sensible (> .prev-version). @@ -18,9 +18,8 @@ - "$prev_ver:$ver:") ;; - *) die "invalid version: $ver (<= $prev_ver)";; -esac -+newer_ver=$(func_sort_ver $prev_ver $ver |cut -d' ' -f2) -+test "$newer_ver" != "$ver" && \ -+ die "invalid version: $ver (<= $prev_ver)" ++func_lt_ver "$prev_ver" "$ver" \ ++ || die "invalid version: $ver (<= $prev_ver)" case $type in alpha|beta|stable) ;; diff --git a/gl/build-aux/funclib.sh b/gl/build-aux/funclib.sh index 2f27d77..aedc85c 100644 --- a/gl/build-aux/funclib.sh +++ b/gl/build-aux/funclib.sh @@ -1,5 +1,5 @@ # Set a version string for this script. -scriptversion=2013-08-23.20; # UTC +scriptversion=2013-10-28.05; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 @@ -84,6 +84,75 @@ nl=' ' IFS="$sp $nl" +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + # There are still modern systems that have problems with 'echo' mis- # handling backslashes, among others, so make sure $bs_echo is set to a # command that correctly interprets backslashes. @@ -125,6 +194,82 @@ else fi +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + $bs_echo_n 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + $bs_echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the sed that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + $bs_echo_n 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + $bs_echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## @@ -136,15 +281,13 @@ fi : ${CP="cp -f"} : ${ECHO="$bs_echo"} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} @@ -1169,37 +1312,21 @@ func_sort_ver () { $debug_cmd - ver1=$1 - ver2=$2 + printf '%s\n%s\n' "$1" "$2" | + sort -t. -k1n -k1 -k2n -k2 -k3n -k3 -k4n -k4 -k5n -k5 -k6n -k6 -k7n -k7 -k8n -k8 -k9n -k9 +} - # Split on '.' and compare each component. - i=1 - while :; do - p1=`echo "$ver1" |cut -d. -f$i` - p2=`echo "$ver2" |cut -d. -f$i` - if test ! "$p1"; then - echo "$1 $2" - break - elif test ! "$p2"; then - echo "$2 $1" - break - elif test ! "$p1" = "$p2"; then - if test "$p1" -gt "$p2" 2>/dev/null; then # numeric comparison - echo "$2 $1" - elif test "$p2" -gt "$p1" 2>/dev/null; then # numeric comparison - echo "$1 $2" - else # numeric, then lexicographic comparison - lp=`printf "$p1\n$p2\n" |sort -n |tail -n1` - if test "$lp" = "$p2"; then - echo "$1 $2" - else - echo "$2 $1" - fi - fi - break - fi - i=`expr $i + 1` - done +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | sed 1q` } diff --git a/tests/demo.at b/tests/demo.at index f1fd9a8..c0a1486 100644 --- a/tests/demo.at +++ b/tests/demo.at @@ -796,7 +796,7 @@ rm -f libhello.la "hell$EXEEXT" # If this check fails (i.e. the make succeeds), then the installed library # was used, which is wrong. -AT_CHECK([$unset LIBTOOL LIBTOOLIZE; $MAKE hell$EXEEXT libhello_la_OBJECTS=hello.lo || (exit 1)], +AT_CHECK([$as_unset LIBTOOL; $as_unset LIBTOOLIZE; $MAKE hell$EXEEXT libhello_la_OBJECTS=hello.lo || (exit 1)], [1], [ignore], [ignore]) AT_CLEANUP diff --git a/tests/testsuite.at b/tests/testsuite.at index ecbdfc2..99122be 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -51,11 +51,6 @@ fi if test -n "$to_tool_file_cmd"; then configure_options="$configure_options lt_cv_to_tool_file_cmd=$to_tool_file_cmd" fi -if (FOO=bar; unset FOO) >/dev/null 2>&1; then - unset=unset -else - unset=false -fi : ${mkdir_p="$abs_top_srcdir/build-aux/install-sh -d"} # Fix relative paths in $lt_INSTALL case $lt_INSTALL in @@ -193,7 +188,7 @@ m4_define([LT_AT_CONFIGURE], m4_define([LT_AT_MAKE], [for target in m4_default([$1], [all]) do - AT_CHECK([$unset LIBTOOL LIBTOOLIZE; $MAKE $target $2], [0], [ignore], [ignore]) + AT_CHECK([$as_unset LIBTOOL; $as_unset LIBTOOLIZE; $MAKE $target $2], [0], [ignore], [ignore]) done ]) hooks/post-receive -- GNU Libtool