2008-03-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * tests/defs.m4sh (func_get_config): Build egrep regex to speed
+ up extracting several variables at once. Use it to extract all
+ default variables at once. Also extract build_alias and
+ host_alias from the libtool script.
+ (func_configure_nofail): Use build_alias and host_alias for
+ --build and --host, respectively. Pass each if nonempty.
+ * tests/testsuite.at: Pass --build if build_alias is nonemtpy.
+ * tests/quote.test: Extract ECHO and wl at once.
+
* libltdl/m4/ltoptions.m4 (AC_LIBTOOL_WIN32_DLL): Require
AC_CANONICAL_HOST.
* THANKS: Update.
m4_divert_push([SCRIPT])# @configure_input@
# defs -- Defines for Libtool testing environment.
#
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software
+# Foundation, Inc.
# Written by Gord Matzigkeit, 1996
# Rewritten by Gary V. Vaughan, 2003
#
my_regex="$4"
my_exitp=false
+ if test -z "$my_regex"; then
+ my_regex="^("
+ my_build_regex=:
+ else
+ my_build_regex=false
+ fi
+ my_first=:
+
for my_varname in $my_varname_list; do
- test -z "$4" && my_regex="^${my_varname}="
-
+ if $my_build_regex; then
+ $my_first || my_regex="$my_regex|"
+ my_first=false
+ my_regex="$my_regex$my_varname"
+ fi
eval $my_varname=NONE
- eval `eval $my_src | eval $GREP \"$my_regex\"`
+ done
+ $my_build_regex && my_regex="$my_regex)="
+ eval `eval "$my_src" | eval "$EGREP \"$my_regex\""`
+ for my_varname in $my_varname_list; do
if eval test x\"\$$my_varname\" = xNONE; then
func_error "$my_varname not set in \`$my_src'"
$my_failp && my_exitp=:
}
-# Extract objext from the libtool configuration
-func_get_config "objext" "$LIBTOOL --config" ": fatal"
-
-# Extract objdir from the libtool configuration
-func_get_config "objdir" "$LIBTOOL --config" ": fatal"
-
-# Extract CC from the libtool configuration
-func_get_config "CC" "$LIBTOOL --config" ": fatal"
-
-# Extract host from the libtool configuration
-func_get_config "host" "$LIBTOOL --config" ": fatal"
+# Extract some variables from the libtool configuration.
+func_get_config "objext
+objdir
+CC
+host
+host_alias
+build
+build_alias" "$LIBTOOL --config" ": fatal"
-# Extract build from the libtool configuration
-func_get_config "build" "$LIBTOOL --config" ": fatal"
# func_mkprefixdir
func_mkprefixdir ()
test -n "$my_args" && my_args=" $my_args"
my_args="--srcdir="\""$my_testdir"\"" --prefix="\""$prefix"\""$my_args"
- test "$build" != "$host" && my_args="$my_args --host=\"$host\""
+ test -n "$host_alias" && my_args="$my_args --host=\"$host_alias\""
+ test -n "$build_alias" && my_args="$my_args --build=\"$build_alias\""
func_msg "Configuring in $my_dir"
#! /bin/sh
# quote.test - make sure that shell metacharacters do not blow up libtool
#
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2003
#
# This file is part of GNU Libtool.
;;
esac
-func_get_config "ECHO" "$LIBTOOL --config"
-func_get_config "wl" "$LIBTOOL --config"
+func_get_config "ECHO wl" "$LIBTOOL --config"
for mode in compile link install; do
$ECHO "== $mode mode"
done
export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF
eval `$LIBTOOL --config | grep '^EGREP='`
-eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|ECHO)='`
+eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|build_alias|ECHO)='`
configure_options=
if test -n "$host_alias"; then
- configure_options="--host $host_alias"
+ configure_options="$configure_options --host $host_alias"
+fi
+if test -n "$build_alias"; then
+ configure_options="$configure_options --build $build_alias"
fi
if (FOO=bar; unset FOO) >/dev/null 2>&1; then
unset=unset