1 dnl @synopsis GP_CHECK_SHELL_ENVIRONMENT([SHOW-LOCALE-VARS])
3 dnl Check that the shell environment is sane.
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!)
9 AC_DEFUN([GP_CHECK_SHELL_ENVIRONMENT],
11 # make sure "cd" doesn't print anything on stdout
12 if test x"${CDPATH+set}" = xset
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`" # ''''
25 uname=`uname 2>&1` # ''
26 uname_a=`uname -a 2>&1` # ''
29 * POSIX sh \$() command substition does not work with this shell.
31 * You are running a very rare species of shell. Please report this
32 * sighting to <${PACKAGE_BUGREPORT}>:
36 * Please also include your OS and version.
38 * Run this configure script using a better (i.e. POSIX compliant) shell.
42 m4_if([$1],[true],[dnl
43 printenv | grep -E '^(LC_|LANG)'