1997-04-02 03:18:28 +08:00
|
|
|
#! /bin/sh
|
|
|
|
# demo-inst.test - try installing from the ../demo subdirectory
|
|
|
|
|
|
|
|
# Test script header.
|
|
|
|
need_prefix=yes
|
|
|
|
if test -z "$srcdir"; then
|
1997-04-02 03:19:30 +08:00
|
|
|
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
|
|
|
|
test "$srcdir" = "$0" && srcdir=.
|
1997-04-02 03:18:28 +08:00
|
|
|
test "${VERBOSE+set}" != "set" && VERBOSE=yes
|
|
|
|
fi
|
|
|
|
. $srcdir/defs || exit 1
|
|
|
|
|
|
|
|
# Check that things are built.
|
|
|
|
if test -f ../demo/hell; then :
|
|
|
|
else
|
|
|
|
echo "You must run demo-make.test before $0" 1>&2
|
1999-03-20 01:58:53 +08:00
|
|
|
exit 77
|
1997-04-02 03:18:28 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Change to our build directory.
|
|
|
|
cd ../demo || exit 1
|
|
|
|
|
1997-04-02 03:21:43 +08:00
|
|
|
echo "= Running $make install in ../demo"
|
|
|
|
$make install || exit 1
|
1997-04-02 03:18:28 +08:00
|
|
|
|
|
|
|
echo "= Executing installed programs"
|
1997-06-20 12:20:39 +08:00
|
|
|
status=0
|
2002-03-03 11:19:55 +08:00
|
|
|
if $prefix/bin/hell_static | grep 'Welcome to GNU Hell'; then :
|
1997-04-02 03:18:28 +08:00
|
|
|
else
|
2002-03-03 11:19:55 +08:00
|
|
|
echo "$0: cannot execute $prefix/bin/hell_static" 1>&2
|
1997-06-20 12:20:39 +08:00
|
|
|
status=1
|
1997-04-02 03:18:28 +08:00
|
|
|
fi
|
|
|
|
|
1997-04-02 03:53:01 +08:00
|
|
|
if $prefix/bin/hell | grep 'Welcome to GNU Hell'; then :
|
1997-04-02 03:18:28 +08:00
|
|
|
else
|
|
|
|
echo "$0: cannot execute $prefix/bin/hell" 1>&2
|
|
|
|
|
|
|
|
# Simple check to see if they are superuser.
|
|
|
|
if test -w /; then :
|
|
|
|
else
|
|
|
|
echo "You may need to run $0 as the superuser."
|
|
|
|
fi
|
1997-06-20 12:20:39 +08:00
|
|
|
status=1
|
1997-04-02 03:18:28 +08:00
|
|
|
fi
|
1997-07-13 05:39:00 +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 $prefix/bin/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then :
|
1997-07-13 05:39:00 +08:00
|
|
|
else
|
|
|
|
echo "$0: cannot execute $prefix/bin/helldl" 1>&2
|
|
|
|
|
|
|
|
# Simple check to see if they are superuser.
|
|
|
|
if test -w /; then :
|
|
|
|
else
|
|
|
|
echo "You may need to run $0 as the superuser."
|
|
|
|
fi
|
|
|
|
status=1
|
|
|
|
fi
|
|
|
|
|
1997-06-20 12:20:39 +08:00
|
|
|
exit $status
|