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