libtool/tests/defs

58 lines
1.2 KiB
Plaintext
Raw Normal View History

1997-04-02 03:18:28 +08:00
# -*- sh -*-
# Defines for Libtool testing environment.
# Gord Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Check that srcdir is set to an absolute path.
case "$srcdir" in
1998-02-17 04:13:54 +08:00
/* | [A-Za-z]:\\*) ;;
1997-04-02 03:18:28 +08:00
*) srcdir=`cd $srcdir && pwd` ;;
esac
1997-04-02 03:53:01 +08:00
progname=`echo "$0" | sed 's%^.*/%%'`
1998-03-09 13:34:02 +08:00
libtool="../libtool"
1997-04-02 03:53:01 +08:00
make="${MAKE-make}"
SHELL="${CONFIG_SHELL-/bin/sh}"
1997-04-02 03:21:43 +08:00
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if echo a | (grep -E '(a|b)') >/dev/null 2>&1; then
EGREP='grep -E'
else
EGREP='egrep'
fi
if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1; then
FGREP='grep -F'
else
FGREP='fgrep'
fi
1997-10-15 02:33:24 +08:00
prefix="./_inst"
1997-04-02 03:18:28 +08:00
if test "$need_prefix" = yes; then
# An absolute path to a test installation directory.
1997-04-02 03:21:43 +08:00
test -d $prefix || mkdir $prefix
1997-04-02 03:18:28 +08:00
prefix=`cd $prefix && pwd`
else
1997-04-02 03:21:43 +08:00
test -d $prefix && rm -rf $prefix
1997-04-02 03:18:28 +08:00
prefix=NONE
fi
# Extract CC from the libtool configuration
eval `$libtool --config | grep '^CC='`
# Extract host from the libtool configuration
eval `$libtool --config | grep '^host='`
# Disable usage of config.site for autoconf, unless DJGPP is present.
# The DJGPP port of autoconf requires config.site, to work correctly.
if test -z "$DJGPP"; then
CONFIG_SITE=/nonexistent
fi
1997-04-02 03:18:28 +08:00
# See how redirections should work.
1997-04-02 03:53:01 +08:00
case "$VERBOSE" in
NO | no | 0 | "")
exec > /dev/null 2>&1
;;
esac
1997-04-02 03:18:28 +08:00
1997-04-02 03:53:01 +08:00
echo "=== Running $progname"