From: Ralf Wildenhues Date: Thu, 18 May 2006 05:43:01 +0000 (+0000) Subject: Fix mode=compile time regression of CVS HEAD over branch-1-5. X-Git-Tag: release-2-1b~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5809e5cd3ae7dbf8154408e241ad4b0d7f15d562;p=thirdparty%2Flibtool.git Fix mode=compile time regression of CVS HEAD over branch-1-5. * libltdl/m4/libtool.m4 (_LT_CHECK_XSI_SHELL): Rename to... (_LT_CHECK_SHELL_FEATURES): ...this. (_LT_SETUP): Adjust caller. (_LT_CHECK_XSI_SHELL): New libtool variables `lt_unset', `SP2NL', `NL2SP', to contain results from tests for unset, taken from AS_BOURNE_COMPATIBLE, and ASCII vs EBCDIC, taken... * libltdl/config/general.m4sh: ...from here, and used... * libltdl/config/ltmain.m4sh: ...here everywhere now. * (AS_SHELL_SANITIZE): Replace by faster, actually necessary part of its expansion, taken from current Autoconf CVS. Do not save and set all locale variables any more, but only LANG, LC_ALL, LC_CTYPE, LC_COLLATE, LC_MESSAGES. (func_mode_execute): Adjust. * libltdl/m4/libtool.m4 (_LT_CONFIG): No need to unset CDPATH here any more. * libtoolize.m4sh: Compute `SP2NL' and `NL2SP' here, too. --- diff --git a/ChangeLog b/ChangeLog index f87cd35f3..b2e256f74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2006-05-18 Ralf Wildenhues + + Fix mode=compile time regression of CVS HEAD over branch-1-5. + + * libltdl/m4/libtool.m4 (_LT_CHECK_XSI_SHELL): Rename to... + (_LT_CHECK_SHELL_FEATURES): ...this. + (_LT_SETUP): Adjust caller. + (_LT_CHECK_XSI_SHELL): New libtool variables `lt_unset', + `SP2NL', `NL2SP', to contain results from tests for unset, + taken from AS_BOURNE_COMPATIBLE, and ASCII vs EBCDIC, taken... + * libltdl/config/general.m4sh: ...from here, and used... + * libltdl/config/ltmain.m4sh: ...here everywhere now. + * (AS_SHELL_SANITIZE): Replace by faster, actually necessary + part of its expansion, taken from current Autoconf CVS. Do not + save and set all locale variables any more, but only LANG, + LC_ALL, LC_CTYPE, LC_COLLATE, LC_MESSAGES. + (func_mode_execute): Adjust. + * libltdl/m4/libtool.m4 (_LT_CONFIG): No need to unset CDPATH + here any more. + * libtoolize.m4sh: Compute `SP2NL' and `NL2SP' here, too. + 2006-05-17 Gary V. Vaughan * libltdl/config/ltmain.m4sh, libltdl/m4/libtool.m4 diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh index c359b4b2a..8340a71a1 100644 --- a/libltdl/config/general.m4sh +++ b/libltdl/config/general.m4sh @@ -105,19 +105,6 @@ double_quote_subst='s/\([["`\\]]\)/\\\1/g' sed_double_backslash='s/^\(\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/; s/\([[^\\]]\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/g' -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - SP2NL='tr \040 \012' - NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - SP2NL='tr \100 \n' - NL2SP='tr \r\n \100\100' - ;; -esac - # Standard options: opt_dry_run=false opt_help=false diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index df91539ca..414203942 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -77,18 +77,34 @@ VERSION=@VERSION@ TIMESTAMP="@TIMESTAMP@" package_revision=@package_revision@ +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + # NLS nuisances: We save the old values to restore during execute mode. -# AS_SHELL_SANITIZE will take care of unsetting. -for lt_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "test \"\${$lt_var+set}\" = set && save_$lt_var=\$$lt_var" + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" done -AS_SHELL_SANITIZE -$as_unset CDPATH +$lt_unset CDPATH m4_include([getopt.m4sh]) @@ -1637,15 +1653,12 @@ func_mode_execute () fi # Restore saved environment variables - for lt_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else - $as_unset $lt_var + $lt_unset $lt_var fi" done @@ -5795,7 +5808,7 @@ EOF # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else @@ -6536,7 +6549,7 @@ fi\ # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index a3e835726..60df3016e 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -145,7 +145,7 @@ AC_REQUIRE([AC_EXEEXT])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_XSI_SHELL])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -682,10 +682,6 @@ _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - _LT_EOF case $host_os in @@ -6874,11 +6870,11 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) -# _LT_CHECK_XSI_SHELL -# ------------------- +# _LT_CHECK_SHELL_FEATURES +# ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. -m4_defun([_LT_CHECK_XSI_SHELL], +m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no @@ -6896,7 +6892,29 @@ lt_shell_append=no && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) -])# _LT_CHECK_XSI_SHELL + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS diff --git a/libtoolize.m4sh b/libtoolize.m4sh index 22cb006a1..486b564ee 100644 --- a/libtoolize.m4sh +++ b/libtoolize.m4sh @@ -70,6 +70,20 @@ $as_unset CDPATH m4_include([getopt.m4sh]) +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + SP2NL='tr \040 \012' + NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + SP2NL='tr \100 \n' + NL2SP='tr \r\n \100\100' + ;; +esac + + # Command line options: opt_debug=: opt_force=false