1# -*- sh -*- 2# Defines for Libtool testing environment. 3# Gord Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4 5# See if we are running on zsh, and set the options which allow our 6# commands through without removal of \ escapes. 7if test -n "${ZSH_VERSION+set}" ; then 8 setopt NO_GLOB_SUBST 9fi 10 11# Check that srcdir is set to an absolute path. 12case "$srcdir" in 13/* | [A-Za-z]:\\*) ;; 14*) srcdir=`cd $srcdir && pwd` ;; 15esac 16 17progname=`echo "$0" | sed 's%^.*/%%'` 18 19libtool="../libtool" 20make="${MAKE-make}" 21SHELL="${CONFIG_SHELL-/bin/sh}" 22: ${SED=sed} 23 24if echo a | (grep -E '(a|b)') >/dev/null 2>&1; then 25 EGREP='grep -E' 26else 27 EGREP='egrep' 28fi 29if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1; then 30 FGREP='grep -F' 31else 32 FGREP='fgrep' 33fi 34 35prefix="./_inst" 36if test "$need_prefix" = yes; then 37 # An absolute path to a test installation directory. 38 test -d $prefix || mkdir $prefix 39 prefix=`cd $prefix && pwd` 40else 41 test -d $prefix && rm -rf $prefix 42 prefix=NONE 43fi 44 45# Extract CC from the libtool configuration 46eval `$libtool --config | grep '^CC='` 47 48# Extract host from the libtool configuration 49eval `$libtool --config | grep '^host='` 50 51# Extract build from the libtool configuration 52eval `$libtool --config | grep '^build='` 53 54# Disable usage of config.site for autoconf, unless DJGPP is present. 55# The DJGPP port of autoconf requires config.site, to work correctly. 56if test -z "$DJGPP"; then 57 CONFIG_SITE=/nonexistent 58fi 59 60# See how redirections should work. 61case "$VERBOSE" in 62NO | no | 0 | "") 63 exec > /dev/null 2>&1 64 ;; 65esac 66 67echo "=== Running $progname" 68