1 dnl @synopsis GP_CHECK_SHELL_ENVIRONMENT([SHOW-LOCALE-VARS]) 2 dnl 3 dnl Check that the shell environment is sane. 4 dnl 5 dnl If SHOW-LOCALE-VARS is set to [true], print all LC_* and LANG* 6 dnl variables at configure time. (WARNING: This is not portable!) 7 dnl 8 dnl 9 AC_DEFUN([GP_CHECK_SHELL_ENVIRONMENT], 10 [ 11 # make sure "cd" doesn't print anything on stdout 12 if test x"${CDPATH+set}" = xset 13 then 14 CDPATH=: 15 export CDPATH 16 fi 17 18 # make sure $() command substitution works 19 AC_MSG_CHECKING([for POSIX sh \$() command substitution]) 20 if test "x$(pwd)" = "x`pwd`" && test "y$(echo "foobar")" = "y`echo foobar`" # '''' 21 then 22 AC_MSG_RESULT([yes]) 23 else 24 AC_MSG_RESULT([no]) 25 uname=`uname 2>&1` # '' 26 uname_a=`uname -a 2>&1` # '' 27 AC_MSG_ERROR([ 28 29 * POSIX sh \$() command substition does not work with this shell. 30 * 31 * You are running a very rare species of shell. Please report this 32 * sighting to <${PACKAGE_BUGREPORT}>: 33 * SHELL=${SHELL} 34 * uname=${uname} 35 * uname-a=${uname_a} 36 * Please also include your OS and version. 37 * 38 * Run this configure script using a better (i.e. POSIX compliant) shell. 39 ]) 40 fi 41 dnl 42 m4_if([$1],[true],[dnl 43 printenv | grep -E '^(LC_|LANG)' 44 ])dnl 45 46 dnl 47 ])dnl 48 dnl 49