Alexandre Duret-Lutz <[EMAIL PROTECTED]> writes: > $ac_abs_srcdir, $ac_top_srcdir, and $ac_abs_top_srcdir all > contain a '&', so the matched pattern gets inserted back into > the output. Then sed processes the line again and loop > infinitely.
Thanks for investigating it. I installed the following patch into Autoconf to fix that problem. This doesn't solve the problem of arbitrary chars in those strings, but at least '&' doesn't make 'configure' loop now. 2005-07-03 Paul Eggert <[EMAIL PROTECTED]> * lib/autoconf/general.m4 (AC_ARG_PROGRAM): Use &, not |, in sed substitution command, so that we allow | in program prefixes and program suffixes. (& is a problem anyway; we're not fixing that here.) * lib/autoconf/status.m4 (AC_CONFIG_FILES): Likewise, for configure_input, top_builddir, srcdir, etc. * lib/autotest/general.m4 (AT_INIT): Likewise, for PATH_SEPARATOR in AUTOTEST_PATH. Index: lib/autoconf/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v retrieving revision 1.873 diff -p -u -r1.873 general.m4 --- lib/autoconf/general.m4 4 Jul 2005 05:22:35 -0000 1.873 +++ lib/autoconf/general.m4 4 Jul 2005 06:26:00 -0000 @@ -1501,10 +1501,10 @@ Program names: --program-transform-name=PROGRAM run sed PROGRAM on installed program names m4_divert_pop([HELP_BEGIN])dnl test "$program_prefix" != NONE && - program_transform_name="s|^|$program_prefix|;$program_transform_name" + program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s|\$|$program_suffix|;$program_transform_name" + program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed Index: lib/autoconf/status.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v retrieving revision 1.67 diff -p -u -r1.67 status.m4 --- lib/autoconf/status.m4 1 Jul 2005 08:45:22 -0000 1.67 +++ lib/autoconf/status.m4 4 Jul 2005 06:26:00 -0000 @@ -547,13 +547,13 @@ cat >>$CONFIG_STATUS <<\_ACEOF :t [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b] dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE. -s|@configure_input@|$configure_input|;t t +s&@configure_input@&$configure_input&;t t dnl During the transition period, this is a special case: -s|@top_builddir@|$ac_top_builddir_sub|;t t[]AC_SUBST_TRACE([top_builddir]) +s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir]) m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir, builddir, abs_builddir, abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]]), - [s|@_AC_Var@|$ac_[]_AC_Var|;t t[]AC_SUBST_TRACE(_AC_Var) + [s&@_AC_Var@&$ac_[]_AC_Var&;t t[]AC_SUBST_TRACE(_AC_Var) ])dnl " $ac_file_inputs m4_defn([_AC_SED_CMDS])>$tmp/out m4_popdef([_AC_SED_CMDS])dnl Index: lib/autotest/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v retrieving revision 1.185 diff -p -u -r1.185 general.m4 --- lib/autotest/general.m4 21 Jun 2005 16:03:59 -0000 1.185 +++ lib/autotest/general.m4 4 Jul 2005 06:26:00 -0000 @@ -478,7 +478,7 @@ m4_divert_push([PREPARE_TESTS])dnl # For embedded test suites, AUTOTEST_PATH is relative to the top level # of the package. Then expand it into build/src parts, since users # may create executables in both places. -AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s,:,$PATH_SEPARATOR,g"` +AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"` at_path= _AS_PATH_WALK([$AUTOTEST_PATH $PATH], [test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR