prog'.
* acgeneral.m4: Likewise.
* acspecific.m4: Likewise.
* doc/autoconf.texi (Limitations of Usual Tools, Coding Style):
Likewise.
+2000-07-10 Akim Demaille <akim@epita.fr>
+
+ * aclang.m4: Promote s,,, over s%%%, and `sed prog' over `sed -e
+ prog'.
+ * acgeneral.m4: Likewise.
+ * acspecific.m4: Likewise.
+ * doc/autoconf.texi (Limitations of Usual Tools, Coding Style):
+ Likewise.
+
2000-07-10 Akim Demaille <akim@epita.fr>
* autoconf.sh: When using `mktemp -d', be sure that the directory
dnl only ac_max_sed_lines should be used.
: ${ac_max_here_lines=48}
# Sed expression to map a string onto a valid sh and CPP variable names.
-ac_tr_sh='sed -e y%*+%pp%;s%[[^a-zA-Z0-9_]]%_%g'
-ac_tr_cpp='sed -e y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[[^A-Z0-9_]]%_%g'
+ac_tr_sh='sed y%*+%pp%;s%[[^a-zA-Z0-9_]]%_%g'
+ac_tr_cpp='sed y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[[^A-Z0-9_]]%_%g'
# By default always use an empty string as the executable extension.
# Only change it if the script calls AC_EXEEXT.
cd $ac_subdir
# A "../" for each directory in /$ac_subdir.
ac_dots=`echo $ac_subdir |
- sed -e 's%^\./%%;s%[[^/]]$%&/%;s%[[^/]]*/%../%g'`
+ sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
case $srcdir in
.) # No --srcdir option. We are building in place.
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
+ sed -n '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
;;
esac;
}dnl
#
EOF
_AC_CACHE_DUMP() |
- sed -e 's/^\([[^=]]*\)=\(.*\)$/\1=${\1=\2}/' >>confcache
+ sed 's/^\([[^=]]*\)=\(.*\)$/\1=${\1=\2}/' >>confcache
if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
define([AC_SUBST],
[ifval([$2], [$1=$2
])[]dnl
-_AC_SUBST([$1], [s%@$1@%[$]$1%;t t])dnl
+_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
])# AC_SUBST
# Read the comments of the preceding macro.
define([AC_SUBST_FILE],
[_AC_SUBST([$1], [/@$1@/r [$]$1
-s%@$1@%%;t t])])
+s,@$1@,,;t t])])
echo $ECHO_N "checking for prefix by $ECHO_C" >&AC_FD_MSG
AC_PATH_PROG(AC_Prog, $1)
if test -n "$ac_cv_path_[]AC_Prog"; then
- prefix=`echo $ac_cv_path_[]AC_Prog | [sed 's%/[^/][^/]*//*[^/][^/]*$%%']`
+ prefix=`echo $ac_cv_path_[]AC_Prog | [sed 's,/[^/][^/]*//*[^/][^/]*$,,']`
fi
fi
popdef([AC_Prog])dnl
# Save into config.log some information that might help in debugging.
echo >&AC_FD_LOG
echo "Cache variables:" >&AC_FD_LOG
-_AC_CACHE_DUMP | sed -e 's/^/| /' >&AC_FD_LOG
+_AC_CACHE_DUMP | sed 's/^/| /' >&AC_FD_LOG
echo >&AC_FD_LOG
echo "confdefs.h:" >&AC_FD_LOG
-cat confdefs.h | sed -e 's/^/| /' >&AC_FD_LOG
+cat confdefs.h | sed 's/^/| /' >&AC_FD_LOG
: ${CONFIG_STATUS=./config.status}
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# configure, is in ./config.log if it exists.
debug=false
-me=`echo "$[0]" | sed -e 's,.*/,,'`
+me=`echo "$[0]" | sed 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}
EOF
cat >confdef2opt.sed <<\EOF
t clear
: clear
-s%^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)%-D\1=\2%g
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
t cleanup
-s%^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)%-D\1=\2%g
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
: cleanup
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
EOF
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
dnl Please, pay attention that this sed code depends a lot on the shape
dnl of the sed commands issued by AC_SUBST. So if you change one, change
dnl the other too.
-[ sed 's/%@/@@/; s/@%/@@/; s/%;t t\$/@;t t/; /@;t t\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' >\$tmp/subs.sed <<\\CEOF]
+[ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF]
dnl These here document variables are unquoted when configure runs
dnl but quoted when config.status runs, so variables are expanded once.
dnl Insert the sed substitutions of variables.
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- *:*) ac_file_in=`echo "$ac_file" | sed 's%[[^:]]*:%%'`
- ac_file=`echo "$ac_file" | sed 's%:.*%%'` ;;
+ *:*) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*) ac_file_in=$ac_file.in ;;
esac
ac_dir=`_AC_SHELL_DIRNAME("$ac_file")`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dir")
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
# A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo "$ac_dir_suffix" | sed 's%/[[^/]]*%../%g'`
+ ac_dots=`echo "$ac_dir_suffix" | sed 's,/[[^/]]*,../,g'`
else
ac_dir_suffix= ac_dots=
fi
case $ac_given_srcdir in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots | sed 's%/$%%'`; fi ;;
+ else top_srcdir=`echo $ac_dots | sed 's,/$,,'`; fi ;;
[[\\/]]* | ?:[[\\/]]* )
srcdir=$ac_given_srcdir$ac_dir_suffix;
top_srcdir=$ac_given_srcdir ;;
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in |
- sed 's%.*/%%'` by configure."
+ sed 's,.*/,,'` by configure."
# Don't redirect the output to AC_FILE directly: use `mv' so that
# updating is atomic, and doesn't need trapping.
EOF
cat >>$CONFIG_STATUS <<EOF
dnl Neutralize VPATH when `$srcdir' = `.'.
- sed -e "$ac_vpsub
+ sed "$ac_vpsub
dnl Shell code in configure.in might set extrasub.
dnl FIXME: do we really want to maintain this feature?
$extrasub
cat >>$CONFIG_STATUS <<\EOF
:t
[/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
-s%@configure_input@%$configure_input%;t t
-s%@srcdir@%$srcdir%;t t
-s%@top_srcdir@%$top_srcdir%;t t
-AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%;t t
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$srcdir,;t t
+s,@top_srcdir@,$top_srcdir,;t t
+AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$INSTALL,;t t
])dnl
dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
#
# ac_d sets the value in "#define NAME VALUE" lines.
dnl Double quote for the `[ ]' and `define'.
-[ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$%\1#\2'
+[ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
ac_dC=' '
-ac_dD='%;t'
+ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$%\1#\2define\3'
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='%;t']
+ac_uD=',;t']
for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- *:*) ac_file_in=`echo "$ac_file" | sed 's%[[^:]]*:%%'`
- ac_file=`echo "$ac_file" | sed 's%:.*%%'` ;;
+ *:*) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*) ac_file_in=$ac_file.in ;;
esac
echo creating $ac_file
ac_file_inputs=`echo "$ac_file_in" |
- sed -e "s%^%$ac_given_srcdir/%;s%:% $ac_given_srcdir/%g"`
+ sed "s,^,$ac_given_srcdir/,;s,:, $ac_given_srcdir/,g"`
for ac_file_input in $ac_file_inputs;
do
test -f "$ac_file_input" ||
AC_MSG_ERROR(cannot find input file `$ac_file_input')
done
# Remove the trailing spaces.
- sed -e 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
+ sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
EOF
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\EOF
dnl Double quote for `[ ]' and `define'.
-[s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
+[s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
t clear
: clear
-s%^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$%${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD}%gp
+s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
t cleanup
-s%^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: cleanup]
EOF
# If some macros were called several times there might be several times
# the same #defines, which is useless. Nevertheless, we may not want to
# sort them, since we want the *last* AC_DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed -e 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\EOF
-[s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%]
+[s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,]
EOF
# Break up conftest.defines because some shells have a limit on the size
dnl with empty parameters (as in gettext.m4), then we obtain here
dnl `:', which we want to skip. So let's keep a single exception: `:'.
for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's%:.*%%'`
- ac_source=`echo "$ac_file" | sed 's%[[^:]]*:%%'`
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
echo "linking $srcdir/$ac_source to $ac_dest"
ac_dest_dir=`_AC_SHELL_DIRNAME("$ac_dest")`
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dest_dir")
- ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`"
# A "../" for each directory in $ac_dest_dir_suffix.
- ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[[^/]]*%../%g'`
+ ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[[^/]]*,../,g'`
else
ac_dest_dir_suffix= ac_dots=
fi
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's%:.*%%'`
- ac_source=`echo "$ac_file" | sed 's%[[^:]]*:%%'`
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
dnl FIXME: Until Automake uses the new features of config.status, we
dnl should keep this silent. Otherwise, because Automake runs this in
# A "../" for each directory in /$ac_subdir.
ac_dots=`echo $ac_subdir |
- sed -e 's%^\./%%;s%[[^/]]$%&/%;s%[[^/]]*/%../%g'`
+ sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
case $srcdir in
.) # No --srcdir option. We are building in place.
AC_MSG_CHECKING(whether cc understands -c and -o together)
fi
set dummy $CC; ac_cc=`echo $[2] |
- sed -e 's/[[^a-zA-Z0-9_]]/_/g' -e 's/^[[0-9]]/_/'`
+ sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
[echo 'foo(){}' >conftest.c
# Make sure it works both with $CC and with simple cc.
[AC_BEFORE([$0], [AC_PROG_F77])dnl
AC_MSG_CHECKING(whether $F77 understand -c and -o together)
set dummy $F77; ac_f77=`echo $[2] |
-sed -e 's/[[^a-zA-Z0-9_]]/_/g' -e 's/^[[0-9]]/_/'`
+sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o,
[cat >conftest.f <<EOF
program conftest
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*)
ac_ld_run_path=`echo $ac_link_output |
- sed -n 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%-R\1%p'`
+ sed -n 's,^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$,-R\1,p'`
test "x$ac_ld_run_path" != x &&
AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_flibs)
;;
# Define SET_MAKE to set ${MAKE} if make doesn't.
AC_DEFUN([AC_PROG_MAKE_SET],
[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
-set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y%./+-%__p_%'`
+set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y,./+-,__p_,'`
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
[cat >conftestmake <<\EOF
all:
: ${ac_cv_func_select_args='int,int *,struct timeval *'}
])
ac_save_IFS=$IFS; IFS=','
-set dummy `echo "$ac_cv_func_select_args" | sed -e 's/\*/\*/g'`
+set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
IFS=$ac_save_IFS
shift
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1],
[for ac_file in conftest.*; do
case $ac_file in
*.$ac_ext | *.o | *.obj | *.xcoff) ;;
- *) ac_cv_exeext=`echo $ac_file | sed -e s/conftest//` ;;
+ *) ac_cv_exeext=`echo $ac_file | sed s/conftest//` ;;
esac
done],
[AC_MSG_ERROR([cannot compile and link])])
[for ac_file in conftest.*; do
case $ac_file in
*.$ac_ext) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ *) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
esac
done],
[AC_MSG_ERROR([cannot compile])])])
@item @command{sed}
@cindex @command{sed}
+Of course the option @option{-e} is portable, but it is not needed. No
+valid @command{sed} program can start with a dash, so it does not help
+disambiguating. Its sole usefulness is helping enforcing indenting as
+in:
+
+@example
+sed -e @var{instruction-1} \
+ -e @var{instruction-2}
+@end example
+
+@noindent
+as opposed to
+
+@example
+sed @var{instruction-1};@var{instruction-2}
+@end example
+
@command{sed} scripts should not use branch labels longer than 8
characters and should not contain comments.
to avoid that the closing bracket be hidden inside a @samp{#}-comment,
breaking the bracket matching highlighting from Emacsen.
+When using @command{sed}, don't use @option{-e} but for indenting
+purpose. With the @code{s} command, the preferred separator is @samp{/}
+unless @samp{/} itself is used in the command, in which case you should
+use @samp{,}.
+
When defining a macro, quote the name being defined. If the macro is
never @code{AC_REQUIRE}'d nor @code{AC_REQUIRE}'s, use @code{define}.
In case of doubt, use @code{AC_DEFUN}. Include the prototype of the
AC_MSG_CHECKING(whether cc understands -c and -o together)
fi
set dummy $CC; ac_cc=`echo $[2] |
- sed -e 's/[[^a-zA-Z0-9_]]/_/g' -e 's/^[[0-9]]/_/'`
+ sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
[echo 'foo(){}' >conftest.c
# Make sure it works both with $CC and with simple cc.
[AC_BEFORE([$0], [AC_PROG_F77])dnl
AC_MSG_CHECKING(whether $F77 understand -c and -o together)
set dummy $F77; ac_f77=`echo $[2] |
-sed -e 's/[[^a-zA-Z0-9_]]/_/g' -e 's/^[[0-9]]/_/'`
+sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o,
[cat >conftest.f <<EOF
program conftest
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*)
ac_ld_run_path=`echo $ac_link_output |
- sed -n 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%-R\1%p'`
+ sed -n 's,^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$,-R\1,p'`
test "x$ac_ld_run_path" != x &&
AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_flibs)
;;
AC_MSG_CHECKING(whether cc understands -c and -o together)
fi
set dummy $CC; ac_cc=`echo $[2] |
- sed -e 's/[[^a-zA-Z0-9_]]/_/g' -e 's/^[[0-9]]/_/'`
+ sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
[echo 'foo(){}' >conftest.c
# Make sure it works both with $CC and with simple cc.
[AC_BEFORE([$0], [AC_PROG_F77])dnl
AC_MSG_CHECKING(whether $F77 understand -c and -o together)
set dummy $F77; ac_f77=`echo $[2] |
-sed -e 's/[[^a-zA-Z0-9_]]/_/g' -e 's/^[[0-9]]/_/'`
+sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o,
[cat >conftest.f <<EOF
program conftest
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*)
ac_ld_run_path=`echo $ac_link_output |
- sed -n 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%-R\1%p'`
+ sed -n 's,^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$,-R\1,p'`
test "x$ac_ld_run_path" != x &&
AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_flibs)
;;
dnl only ac_max_sed_lines should be used.
: ${ac_max_here_lines=48}
# Sed expression to map a string onto a valid sh and CPP variable names.
-ac_tr_sh='sed -e y%*+%pp%;s%[[^a-zA-Z0-9_]]%_%g'
-ac_tr_cpp='sed -e y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[[^A-Z0-9_]]%_%g'
+ac_tr_sh='sed y%*+%pp%;s%[[^a-zA-Z0-9_]]%_%g'
+ac_tr_cpp='sed y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[[^A-Z0-9_]]%_%g'
# By default always use an empty string as the executable extension.
# Only change it if the script calls AC_EXEEXT.
cd $ac_subdir
# A "../" for each directory in /$ac_subdir.
ac_dots=`echo $ac_subdir |
- sed -e 's%^\./%%;s%[[^/]]$%&/%;s%[[^/]]*/%../%g'`
+ sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
case $srcdir in
.) # No --srcdir option. We are building in place.
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
+ sed -n '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
;;
esac;
}dnl
#
EOF
_AC_CACHE_DUMP() |
- sed -e 's/^\([[^=]]*\)=\(.*\)$/\1=${\1=\2}/' >>confcache
+ sed 's/^\([[^=]]*\)=\(.*\)$/\1=${\1=\2}/' >>confcache
if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
define([AC_SUBST],
[ifval([$2], [$1=$2
])[]dnl
-_AC_SUBST([$1], [s%@$1@%[$]$1%;t t])dnl
+_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
])# AC_SUBST
# Read the comments of the preceding macro.
define([AC_SUBST_FILE],
[_AC_SUBST([$1], [/@$1@/r [$]$1
-s%@$1@%%;t t])])
+s,@$1@,,;t t])])
echo $ECHO_N "checking for prefix by $ECHO_C" >&AC_FD_MSG
AC_PATH_PROG(AC_Prog, $1)
if test -n "$ac_cv_path_[]AC_Prog"; then
- prefix=`echo $ac_cv_path_[]AC_Prog | [sed 's%/[^/][^/]*//*[^/][^/]*$%%']`
+ prefix=`echo $ac_cv_path_[]AC_Prog | [sed 's,/[^/][^/]*//*[^/][^/]*$,,']`
fi
fi
popdef([AC_Prog])dnl
# Save into config.log some information that might help in debugging.
echo >&AC_FD_LOG
echo "Cache variables:" >&AC_FD_LOG
-_AC_CACHE_DUMP | sed -e 's/^/| /' >&AC_FD_LOG
+_AC_CACHE_DUMP | sed 's/^/| /' >&AC_FD_LOG
echo >&AC_FD_LOG
echo "confdefs.h:" >&AC_FD_LOG
-cat confdefs.h | sed -e 's/^/| /' >&AC_FD_LOG
+cat confdefs.h | sed 's/^/| /' >&AC_FD_LOG
: ${CONFIG_STATUS=./config.status}
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# configure, is in ./config.log if it exists.
debug=false
-me=`echo "$[0]" | sed -e 's,.*/,,'`
+me=`echo "$[0]" | sed 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}
EOF
cat >confdef2opt.sed <<\EOF
t clear
: clear
-s%^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)%-D\1=\2%g
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
t cleanup
-s%^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)%-D\1=\2%g
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
: cleanup
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
EOF
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
dnl Please, pay attention that this sed code depends a lot on the shape
dnl of the sed commands issued by AC_SUBST. So if you change one, change
dnl the other too.
-[ sed 's/%@/@@/; s/@%/@@/; s/%;t t\$/@;t t/; /@;t t\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' >\$tmp/subs.sed <<\\CEOF]
+[ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF]
dnl These here document variables are unquoted when configure runs
dnl but quoted when config.status runs, so variables are expanded once.
dnl Insert the sed substitutions of variables.
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- *:*) ac_file_in=`echo "$ac_file" | sed 's%[[^:]]*:%%'`
- ac_file=`echo "$ac_file" | sed 's%:.*%%'` ;;
+ *:*) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*) ac_file_in=$ac_file.in ;;
esac
ac_dir=`_AC_SHELL_DIRNAME("$ac_file")`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dir")
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
# A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo "$ac_dir_suffix" | sed 's%/[[^/]]*%../%g'`
+ ac_dots=`echo "$ac_dir_suffix" | sed 's,/[[^/]]*,../,g'`
else
ac_dir_suffix= ac_dots=
fi
case $ac_given_srcdir in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots | sed 's%/$%%'`; fi ;;
+ else top_srcdir=`echo $ac_dots | sed 's,/$,,'`; fi ;;
[[\\/]]* | ?:[[\\/]]* )
srcdir=$ac_given_srcdir$ac_dir_suffix;
top_srcdir=$ac_given_srcdir ;;
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in |
- sed 's%.*/%%'` by configure."
+ sed 's,.*/,,'` by configure."
# Don't redirect the output to AC_FILE directly: use `mv' so that
# updating is atomic, and doesn't need trapping.
EOF
cat >>$CONFIG_STATUS <<EOF
dnl Neutralize VPATH when `$srcdir' = `.'.
- sed -e "$ac_vpsub
+ sed "$ac_vpsub
dnl Shell code in configure.in might set extrasub.
dnl FIXME: do we really want to maintain this feature?
$extrasub
cat >>$CONFIG_STATUS <<\EOF
:t
[/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
-s%@configure_input@%$configure_input%;t t
-s%@srcdir@%$srcdir%;t t
-s%@top_srcdir@%$top_srcdir%;t t
-AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%;t t
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$srcdir,;t t
+s,@top_srcdir@,$top_srcdir,;t t
+AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$INSTALL,;t t
])dnl
dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
#
# ac_d sets the value in "#define NAME VALUE" lines.
dnl Double quote for the `[ ]' and `define'.
-[ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$%\1#\2'
+[ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
ac_dC=' '
-ac_dD='%;t'
+ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$%\1#\2define\3'
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='%;t']
+ac_uD=',;t']
for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- *:*) ac_file_in=`echo "$ac_file" | sed 's%[[^:]]*:%%'`
- ac_file=`echo "$ac_file" | sed 's%:.*%%'` ;;
+ *:*) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*) ac_file_in=$ac_file.in ;;
esac
echo creating $ac_file
ac_file_inputs=`echo "$ac_file_in" |
- sed -e "s%^%$ac_given_srcdir/%;s%:% $ac_given_srcdir/%g"`
+ sed "s,^,$ac_given_srcdir/,;s,:, $ac_given_srcdir/,g"`
for ac_file_input in $ac_file_inputs;
do
test -f "$ac_file_input" ||
AC_MSG_ERROR(cannot find input file `$ac_file_input')
done
# Remove the trailing spaces.
- sed -e 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
+ sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
EOF
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\EOF
dnl Double quote for `[ ]' and `define'.
-[s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
+[s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
t clear
: clear
-s%^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$%${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD}%gp
+s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
t cleanup
-s%^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: cleanup]
EOF
# If some macros were called several times there might be several times
# the same #defines, which is useless. Nevertheless, we may not want to
# sort them, since we want the *last* AC_DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed -e 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\EOF
-[s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%]
+[s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,]
EOF
# Break up conftest.defines because some shells have a limit on the size
dnl with empty parameters (as in gettext.m4), then we obtain here
dnl `:', which we want to skip. So let's keep a single exception: `:'.
for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's%:.*%%'`
- ac_source=`echo "$ac_file" | sed 's%[[^:]]*:%%'`
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
echo "linking $srcdir/$ac_source to $ac_dest"
ac_dest_dir=`_AC_SHELL_DIRNAME("$ac_dest")`
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dest_dir")
- ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`"
# A "../" for each directory in $ac_dest_dir_suffix.
- ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[[^/]]*%../%g'`
+ ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[[^/]]*,../,g'`
else
ac_dest_dir_suffix= ac_dots=
fi
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's%:.*%%'`
- ac_source=`echo "$ac_file" | sed 's%[[^:]]*:%%'`
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
dnl FIXME: Until Automake uses the new features of config.status, we
dnl should keep this silent. Otherwise, because Automake runs this in
# A "../" for each directory in /$ac_subdir.
ac_dots=`echo $ac_subdir |
- sed -e 's%^\./%%;s%[[^/]]$%&/%;s%[[^/]]*/%../%g'`
+ sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
case $srcdir in
.) # No --srcdir option. We are building in place.
AC_MSG_CHECKING(whether cc understands -c and -o together)
fi
set dummy $CC; ac_cc=`echo $[2] |
- sed -e 's/[[^a-zA-Z0-9_]]/_/g' -e 's/^[[0-9]]/_/'`
+ sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
[echo 'foo(){}' >conftest.c
# Make sure it works both with $CC and with simple cc.
[AC_BEFORE([$0], [AC_PROG_F77])dnl
AC_MSG_CHECKING(whether $F77 understand -c and -o together)
set dummy $F77; ac_f77=`echo $[2] |
-sed -e 's/[[^a-zA-Z0-9_]]/_/g' -e 's/^[[0-9]]/_/'`
+sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o,
[cat >conftest.f <<EOF
program conftest
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*)
ac_ld_run_path=`echo $ac_link_output |
- sed -n 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%-R\1%p'`
+ sed -n 's,^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$,-R\1,p'`
test "x$ac_ld_run_path" != x &&
AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_flibs)
;;
# Define SET_MAKE to set ${MAKE} if make doesn't.
AC_DEFUN([AC_PROG_MAKE_SET],
[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
-set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y%./+-%__p_%'`
+set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y,./+-,__p_,'`
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
[cat >conftestmake <<\EOF
all:
: ${ac_cv_func_select_args='int,int *,struct timeval *'}
])
ac_save_IFS=$IFS; IFS=','
-set dummy `echo "$ac_cv_func_select_args" | sed -e 's/\*/\*/g'`
+set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
IFS=$ac_save_IFS
shift
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1],
[for ac_file in conftest.*; do
case $ac_file in
*.$ac_ext | *.o | *.obj | *.xcoff) ;;
- *) ac_cv_exeext=`echo $ac_file | sed -e s/conftest//` ;;
+ *) ac_cv_exeext=`echo $ac_file | sed s/conftest//` ;;
esac
done],
[AC_MSG_ERROR([cannot compile and link])])
[for ac_file in conftest.*; do
case $ac_file in
*.$ac_ext) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ *) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
esac
done],
[AC_MSG_ERROR([cannot compile])])])