]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Install the IFS we need once for all.
authorAkim Demaille <akim@epita.fr>
Fri, 17 Mar 2000 08:37:50 +0000 (08:37 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 17 Mar 2000 08:37:50 +0000 (08:37 +0000)
* 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.

ChangeLog
acgeneral.m4
acspecific.m4
lib/autoconf/general.m4
lib/autoconf/specific.m4

index 767af455064aa21bacf98cde7c103d4f83dd9cb5..50163112cea0af6566681483b8331e4f29ee5f45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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,
index 59ddf898091950a8a68e9e088c7dac246b192346..cf22c6704ec95f5dd73e198942ccd430205bfc4d 100644 (file)
@@ -1128,6 +1128,27 @@ define(AC_INCLUDES,
 [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.
@@ -1140,6 +1161,8 @@ define(AC_INCLUDES,
 # 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.
@@ -1187,16 +1210,6 @@ It was created by configure version AC_ACVERSION, executed with
  > [$]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.
@@ -2219,7 +2232,7 @@ $2],
 # 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.
@@ -2230,7 +2243,7 @@ for ac_dir in $ac_dummy; do
     echo "$ac_dir/$1"
   fi
 done
-IFS="$ac_save_ifs"
+IFS=$ac_save_ifs
 ])
 
 
@@ -2319,7 +2332,7 @@ AC_CACHE_VAL(ac_cv_path_$1,
   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.
@@ -2331,7 +2344,7 @@ 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"
index c7a5f34fcb61d2ef1fcf95bdcacdb3520b759900..581912890c49d431bb18598e59ca7f289f51e820 100644 (file)
@@ -768,7 +768,7 @@ AC_DEFUN(AC_PROG_INSTALL,
 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
@@ -796,7 +796,7 @@ AC_CACHE_VAL(ac_cv_path_install,
       ;;
     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"
@@ -1932,8 +1932,7 @@ done
 # 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
index 59ddf898091950a8a68e9e088c7dac246b192346..cf22c6704ec95f5dd73e198942ccd430205bfc4d 100644 (file)
@@ -1128,6 +1128,27 @@ define(AC_INCLUDES,
 [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.
@@ -1140,6 +1161,8 @@ define(AC_INCLUDES,
 # 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.
@@ -1187,16 +1210,6 @@ It was created by configure version AC_ACVERSION, executed with
  > [$]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.
@@ -2219,7 +2232,7 @@ $2],
 # 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.
@@ -2230,7 +2243,7 @@ for ac_dir in $ac_dummy; do
     echo "$ac_dir/$1"
   fi
 done
-IFS="$ac_save_ifs"
+IFS=$ac_save_ifs
 ])
 
 
@@ -2319,7 +2332,7 @@ AC_CACHE_VAL(ac_cv_path_$1,
   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.
@@ -2331,7 +2344,7 @@ 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"
index c7a5f34fcb61d2ef1fcf95bdcacdb3520b759900..581912890c49d431bb18598e59ca7f289f51e820 100644 (file)
@@ -768,7 +768,7 @@ AC_DEFUN(AC_PROG_INSTALL,
 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
@@ -796,7 +796,7 @@ AC_CACHE_VAL(ac_cv_path_install,
       ;;
     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"
@@ -1932,8 +1932,7 @@ done
 # 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