* acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): New macro.
Handle the NLS envvars, and IFS.
(_AC_INIT_PREPARE): Use it, no longer set the NLS envvars.
(_AC_WHICH_A, AC_PATH_PROG): Rely on the default IFS.
* acspecific.m4 (AC_PROG_INSTALL, AC_FUNC_SELECT_ARGTYPES):
Likewise.
+2000-03-17 Akim Demaille <akim@epita.fr>
+
+ Install the IFS we need once for all.
+
+ * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): New macro.
+ Handle the NLS envvars, and IFS.
+ (_AC_INIT_PREPARE): Use it, no longer set the NLS envvars.
+ (_AC_WHICH_A, AC_PATH_PROG): Rely on the default IFS.
+ * acspecific.m4 (AC_PROG_INSTALL, AC_FUNC_SELECT_ARGTYPES):
+ Likewise.
+
2000-03-17 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_TRY_COMPILE,
[m4_foreach([File], [$1], [AC_INCLUDE(File)])])
+# _AC_INIT_PREPARE_ENVIRONMENT
+# ----------------------------
+# Tune the envvar we depend upon: IFS, NLS.
+# FIXME: CDPATH.
+define([_AC_INIT_PREPARE_ENVIRONMENT],
+[# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# IFS
+# We need space, tab and new line.
+IFS="
+ "dnl
+])
+
# _AC_INIT_PREPARE([UNIQUE-FILE-IN-SOURCE-DIR])
# ---------------------------------------------
# Called by AC_INIT to build the preamble of the `configure' scripts.
# 6. Required macros (cache, default AC_SUBST etc.)
AC_DEFUN([_AC_INIT_PREPARE],
[AC_DIVERT_PUSH([INIT_PREPARE])dnl
+_AC_INIT_PREPARE_ENVIRONMENT
+
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# Keep a trace of the command line.
> [$]0 $ac_configure_args
" 1>&AC_FD_CC
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
# Work like `which -a NAME' in PATH, even if NAME is not executable.
# Can be used inside backquotes.
define([_AC_WHICH_A],
-[IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+[ac_save_ifs=$IFS; IFS=':'
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
echo "$ac_dir/$1"
fi
done
-IFS="$ac_save_ifs"
+IFS=$ac_save_ifs
])
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_save_ifs=$IFS; IFS=':'
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
break
fi
done
- IFS="$ac_save_ifs"
+ IFS=$ac_save_ifs
dnl If no 3rd arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifval([$3], [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
AC_MSG_CHECKING(for a BSD compatible install)
if test -z "$INSTALL"; then
AC_CACHE_VAL(ac_cv_path_install,
-[ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+[ ac_save_IFS=$IFS; IFS=':'
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
;;
esac
done
- IFS="$ac_save_IFS"
+ IFS=$ac_save_IFS
])dnl
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
# Provide a safe default value.
: ${ac_cv_func_select_args='int,int *,struct timeval *'}
])
-ac_save_IFS=$IFS
-IFS=','
+ac_save_IFS=$IFS; IFS=','
set dummy `echo "$ac_cv_func_select_args" | sed -e 's/\*/\*/g'`
IFS=$ac_save_IFS
shift
[m4_foreach([File], [$1], [AC_INCLUDE(File)])])
+# _AC_INIT_PREPARE_ENVIRONMENT
+# ----------------------------
+# Tune the envvar we depend upon: IFS, NLS.
+# FIXME: CDPATH.
+define([_AC_INIT_PREPARE_ENVIRONMENT],
+[# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# IFS
+# We need space, tab and new line.
+IFS="
+ "dnl
+])
+
# _AC_INIT_PREPARE([UNIQUE-FILE-IN-SOURCE-DIR])
# ---------------------------------------------
# Called by AC_INIT to build the preamble of the `configure' scripts.
# 6. Required macros (cache, default AC_SUBST etc.)
AC_DEFUN([_AC_INIT_PREPARE],
[AC_DIVERT_PUSH([INIT_PREPARE])dnl
+_AC_INIT_PREPARE_ENVIRONMENT
+
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# Keep a trace of the command line.
> [$]0 $ac_configure_args
" 1>&AC_FD_CC
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
# Work like `which -a NAME' in PATH, even if NAME is not executable.
# Can be used inside backquotes.
define([_AC_WHICH_A],
-[IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+[ac_save_ifs=$IFS; IFS=':'
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
echo "$ac_dir/$1"
fi
done
-IFS="$ac_save_ifs"
+IFS=$ac_save_ifs
])
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_save_ifs=$IFS; IFS=':'
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
break
fi
done
- IFS="$ac_save_ifs"
+ IFS=$ac_save_ifs
dnl If no 3rd arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifval([$3], [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
AC_MSG_CHECKING(for a BSD compatible install)
if test -z "$INSTALL"; then
AC_CACHE_VAL(ac_cv_path_install,
-[ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+[ ac_save_IFS=$IFS; IFS=':'
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
;;
esac
done
- IFS="$ac_save_IFS"
+ IFS=$ac_save_IFS
])dnl
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
# Provide a safe default value.
: ${ac_cv_func_select_args='int,int *,struct timeval *'}
])
-ac_save_IFS=$IFS
-IFS=','
+ac_save_IFS=$IFS; IFS=','
set dummy `echo "$ac_cv_func_select_args" | sed -e 's/\*/\*/g'`
IFS=$ac_save_IFS
shift