+2000-10-24 Akim Demaille <akim@epita.fr>
+
+ Start avoiding dependence upon character ranges.
+
+ * acgeneral.m4 (_AC_INIT_DEFAULTS): Introduce `ac_cr_AZ',
+ `ac_cr_az', `ac_cr_09', `ac_cr_alnum' and `ac_hostname'.
+ Spread their use.
+
2000-10-24 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_OUTPUT): Don't play with `trap'.
subdirs=
MFLAGS= MAKEFLAGS=
AC_SUBST(SHELL, ${CONFIG_SHELL-/bin/sh})dnl
+
# Maximum number of lines to put in a shell here document.
# This variable seems obsolete. It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too. Use two double quotes for font-lock.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+# Avoid depending upon Character Ranges.
+ac_cr_az='abcdefghijklmnopqrstuvwxyz'
+ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+ac_cr_09='0123456789'
+ac_cr_alnum=$ac_cr_az$ac_cr_AZ$ac_cr_09
+
# Sed expression to map a string onto a valid sh and CPP variable names.
-ac_tr_sh='sed y%*+%pp%;s%[[^a-zA-Z0-9_]]%_%g'
-ac_tr_cpp='sed y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[[^A-Z0-9_]]%_%g'
+ac_tr_sh="sed y%*+%pp%;s%[[^_$ac_cr_alnum]]%_%g"
+ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[[^_$ac_cr_alnum]]%_%g"
# By default always use an empty string as the executable extension.
# Only change it if the script calls AC_EXEEXT.
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : "[.*[^-a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_feature" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid feature name: $ac_feature])
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : "[.*[^-a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_feature" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid feature name: $ac_feature])
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
case $ac_option in
-with-* | --with-*)
ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : "[.*[^-a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_package" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid package name: $ac_package])
ac_package=`echo $ac_package| sed 's/-/_/g'`
case $ac_option in
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : "[.*[^-a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_package" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid package name: $ac_package])
ac_package=`echo $ac_package | sed 's/-/_/g'`
eval "with_$ac_package=no" ;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
# Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : "[.*[^a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_envvar" : "[.*[^_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid variable name: $ac_envvar])
ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
eval "$ac_envvar='$ac_optarg'"
*)
# FIXME: should be removed in autoconf 3.0.
AC_MSG_WARN([you should use --build, --host, --target])
- expr "x$ac_option" : "[.*[^a-zA-Z0-9.]]" >/dev/null &&
+ expr "x$ac_option" : "[.*[^.$ac_cr_alnum]]" >/dev/null &&
AC_MSG_WARN([invalid host type: $ac_option])
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
- -e "s/'/'\\\\''/g" \
- -e ["s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"]
+ ["s/'/'\\\\''/g \
+ s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
+ sed -n \
+ ["s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
;;
esac;
}dnl
Report bugs to <bug-autoconf@gnu.org>."
EOF
-dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-dnl so uname gets run too. Use two double quotes for font-lock.
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
$CONFIG_STATUS generated by autoconf version AC_ACVERSION.
-Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
+Configured on host $ac_hostname by
`echo "[$]0 $ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
ac_given_srcdir=$srcdir
subdirs=
MFLAGS= MAKEFLAGS=
AC_SUBST(SHELL, ${CONFIG_SHELL-/bin/sh})dnl
+
# Maximum number of lines to put in a shell here document.
# This variable seems obsolete. It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too. Use two double quotes for font-lock.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+# Avoid depending upon Character Ranges.
+ac_cr_az='abcdefghijklmnopqrstuvwxyz'
+ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+ac_cr_09='0123456789'
+ac_cr_alnum=$ac_cr_az$ac_cr_AZ$ac_cr_09
+
# Sed expression to map a string onto a valid sh and CPP variable names.
-ac_tr_sh='sed y%*+%pp%;s%[[^a-zA-Z0-9_]]%_%g'
-ac_tr_cpp='sed y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[[^A-Z0-9_]]%_%g'
+ac_tr_sh="sed y%*+%pp%;s%[[^_$ac_cr_alnum]]%_%g"
+ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[[^_$ac_cr_alnum]]%_%g"
# By default always use an empty string as the executable extension.
# Only change it if the script calls AC_EXEEXT.
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : "[.*[^-a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_feature" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid feature name: $ac_feature])
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : "[.*[^-a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_feature" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid feature name: $ac_feature])
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
case $ac_option in
-with-* | --with-*)
ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : "[.*[^-a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_package" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid package name: $ac_package])
ac_package=`echo $ac_package| sed 's/-/_/g'`
case $ac_option in
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : "[.*[^-a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_package" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid package name: $ac_package])
ac_package=`echo $ac_package | sed 's/-/_/g'`
eval "with_$ac_package=no" ;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
# Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : "[.*[^a-zA-Z0-9_]]" >/dev/null &&
+ expr "x$ac_envvar" : "[.*[^_$ac_cr_alnum]]" >/dev/null &&
AC_MSG_ERROR([invalid variable name: $ac_envvar])
ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
eval "$ac_envvar='$ac_optarg'"
*)
# FIXME: should be removed in autoconf 3.0.
AC_MSG_WARN([you should use --build, --host, --target])
- expr "x$ac_option" : "[.*[^a-zA-Z0-9.]]" >/dev/null &&
+ expr "x$ac_option" : "[.*[^.$ac_cr_alnum]]" >/dev/null &&
AC_MSG_WARN([invalid host type: $ac_option])
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
- -e "s/'/'\\\\''/g" \
- -e ["s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"]
+ ["s/'/'\\\\''/g \
+ s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
+ sed -n \
+ ["s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
;;
esac;
}dnl
Report bugs to <bug-autoconf@gnu.org>."
EOF
-dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-dnl so uname gets run too. Use two double quotes for font-lock.
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
$CONFIG_STATUS generated by autoconf version AC_ACVERSION.
-Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
+Configured on host $ac_hostname by
`echo "[$]0 $ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
ac_given_srcdir=$srcdir