diff --git a/ChangeLog b/ChangeLog index 273039c7..df994682 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2000-05-26 Akim Demaille + + Thanks to --program-transform-name, `autoconf' might be install as + `yo-man-i-am-the-all-mighty-AVt0c0nF-eh-eh'. But when + `yo-man-i-am-the-all-mighty-AVt0h3Ad3R-eh-eh' and the other tools + want to trace, they might stupidly invoke the program named + `autoconf' instead. Pfff, stupid scripts :) + + * Makefile.am (editsh): Transfer the names of the install + `autoconf' and `autoheader'. + * autoconf.sh: Add a missing period at the end of the comment + # Parse command line + Make sure to have a ChangeLog much longer than the patch. + * autoheader.sh: Use the right `autoconf'. + * autoupdate.sh: Likewise. + * autoreconf.sh: Likewise, and for `autoheader' too. + Simplify the handling of localdir and AC_MACRODIR. + * ifnames.sh: Formatting changes. + 2000-05-25 Steven G. Johnson Don't use f2c as a possible Fortran compiler, since by itself it diff --git a/Makefile.am b/Makefile.am index dcb5217e..9c53044e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,23 +72,36 @@ install-data-hook: INSTALL.txt # The scripts. -editsh = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e \ - 's,@''M4''@,$(M4),g' -e 's,@''AWK''@,$(AWK),g' \ +editsh = sed \ + -e 's,@''datadir''@,$(pkgdatadir),g' \ + -e 's,@''M4''@,$(M4),g' \ + -e 's,@''AWK''@,$(AWK),g' \ -e 's,@''SHELL''@,$(SHELL),g' \ - -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g' -editpl = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''PERL''@,$(PERL),g' \ - -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g' + -e 's,@''VERSION''@,$(VERSION),g' \ + -e 's,@''PACKAGE''@,$(PACKAGE),g' \ + -e 's,@autoconf-name@,'`echo autoconf | sed '$(transform)'`',g' \ + -e 's,@autoheader-name@,'`echo autoheader | sed '$(transform)'`',g' + +editpl = sed \ + -e 's,@''datadir''@,$(pkgdatadir),g' \ + -e 's,@''PERL''@,$(PERL),g' \ + -e 's,@''VERSION''@,$(VERSION),g' \ + -e 's,@''PACKAGE''@,$(PACKAGE),g' .sh: rm -f $@ $@.tmp - $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@ + $(editsh) $< >$@.tmp + chmod +x $@.tmp + mv $@.tmp $@ .pl: rm -f $@ $@.tmp - $(editpl) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@ + $(editpl) $< >$@.tmp + chmod +x $@.tmp + mv $@.tmp $@ .m4.m4f: - $(M4) -F $*.m4f -I$(srcdir) $(srcdir)/$*.m4 + $(M4) -I $(srcdir) $(srcdir)/$*.m4 --freeze-state=$*.m4f common = libm4.m4 acgeneral.m4 acspecific.m4 acoldnames.m4 acversion.m4 \ aclang.m4 diff --git a/Makefile.in b/Makefile.in index 84b64238..527e80bc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -97,9 +97,10 @@ CLEANFILES = autoconf.m4f $(bin_SCRIPTS) # The scripts. -editsh = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''M4''@,$(M4),g' -e 's,@''AWK''@,$(AWK),g' -e 's,@''SHELL''@,$(SHELL),g' -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g' +editsh = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''M4''@,$(M4),g' -e 's,@''AWK''@,$(AWK),g' -e 's,@''SHELL''@,$(SHELL),g' -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g' -e 's,@autoconf-name@,'`echo autoconf | sed '$(transform)'`',g' -e 's,@autoheader-name@,'`echo autoheader | sed '$(transform)'`',g' -editpl = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''PERL''@,$(PERL),g' -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g' + +editpl = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''PERL''@,$(PERL),g' -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g' common = libm4.m4 acgeneral.m4 acspecific.m4 acoldnames.m4 acversion.m4 aclang.m4 @@ -430,14 +431,18 @@ install-data-hook: INSTALL.txt .sh: rm -f $@ $@.tmp - $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@ + $(editsh) $< >$@.tmp + chmod +x $@.tmp + mv $@.tmp $@ .pl: rm -f $@ $@.tmp - $(editpl) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@ + $(editpl) $< >$@.tmp + chmod +x $@.tmp + mv $@.tmp $@ .m4.m4f: - $(M4) -F $*.m4f -I$(srcdir) $(srcdir)/$*.m4 + $(M4) -I $(srcdir) $(srcdir)/$*.m4 --freeze-state=$*.m4f autoconf.m4f: autoconf.m4 $(common) diff --git a/autoconf.in b/autoconf.in index 46e2472e..81a9b22f 100644 --- a/autoconf.in +++ b/autoconf.in @@ -120,7 +120,7 @@ task=script tmp= verbose=: -# Parse command line +# Parse command line. while test $# -gt 0 ; do case "$1" in --version | --vers* | -V ) diff --git a/autoconf.sh b/autoconf.sh index 46e2472e..81a9b22f 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -120,7 +120,7 @@ task=script tmp= verbose=: -# Parse command line +# Parse command line. while test $# -gt 0 ; do case "$1" in --version | --vers* | -V ) diff --git a/autoheader.in b/autoheader.in index 1c05ccdc..057527f3 100644 --- a/autoheader.in +++ b/autoheader.in @@ -69,6 +69,11 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} +if test -n "$AUTOCONF"; then + autoconf=$AUTOCONF +else + autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" +fi debug=false localdir=. tmp= @@ -77,6 +82,7 @@ warning_all=false warning_error=false warning_obsolete=false +# Parse command line. while test $# -gt 0 ; do case "$1" in --version | --vers* | -V ) @@ -198,14 +204,15 @@ case $# in exit 1 ;; esac -# Well, work now! -config_h= -syms= +# Set up autoconf. +autoconf="$autoconf -l $localdir" +export AC_MACRODIR + +# ----------------------- # +# Real work starts here. # +# ----------------------- # # Source what the traces are trying to tell us. -autoconf=`echo "$0" | sed -e 's,[^/]*$,autoconf,'` -test -n "$localdir" && autoconf="$autoconf -l $localdir" -export AC_MACRODIR $autoconf \ --trace AC_CONFIG_HEADERS:'config_h="$1"' \ --trace AH_OUTPUT:'ac_verbatim_$1="\ diff --git a/autoheader.sh b/autoheader.sh index 1c05ccdc..057527f3 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -69,6 +69,11 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} +if test -n "$AUTOCONF"; then + autoconf=$AUTOCONF +else + autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" +fi debug=false localdir=. tmp= @@ -77,6 +82,7 @@ warning_all=false warning_error=false warning_obsolete=false +# Parse command line. while test $# -gt 0 ; do case "$1" in --version | --vers* | -V ) @@ -198,14 +204,15 @@ case $# in exit 1 ;; esac -# Well, work now! -config_h= -syms= +# Set up autoconf. +autoconf="$autoconf -l $localdir" +export AC_MACRODIR + +# ----------------------- # +# Real work starts here. # +# ----------------------- # # Source what the traces are trying to tell us. -autoconf=`echo "$0" | sed -e 's,[^/]*$,autoconf,'` -test -n "$localdir" && autoconf="$autoconf -l $localdir" -export AC_MACRODIR $autoconf \ --trace AC_CONFIG_HEADERS:'config_h="$1"' \ --trace AH_OUTPUT:'ac_verbatim_$1="\ diff --git a/autoreconf.in b/autoreconf.in index b979579d..681e6aab 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -57,14 +57,35 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." -localdir= -verbose=: -force=no +# 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 + +# Variables. +: ${AC_MACRODIR=@datadir@} +if test -n "$AUTOCONF"; then + autoconf=$AUTOCONF +else + autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" +fi +if test -n "$AUTOHEADER"; then + autoheader=$AUTOHEADER +else + autoheader=`echo "$0" | sed -e 's/[^/]*$//`"@autoheader-name@" +fi automake_mode=--gnu automake_deps= +force=no +localdir=. +verbose=: -test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@ - +# Parse command line. while test $# -gt 0; do case "$1" in --version | --vers* | -V ) @@ -121,9 +142,14 @@ if test $# -ne 0; then exit 1 fi -# The paths to the autoconf and autoheader scripts, at the top of the tree. -top_autoconf=`echo "$0" | sed s%autoreconf%autoconf%` -top_autoheader=`echo "$0" | sed s%autoreconf%autoheader%` +# Set up autoconf and autoheader. +autoconf="$autoconf -l $localdir" +autoheader="$autoheader -l $localdir" +export AC_MACRODIR + +# ----------------------- # +# Real work starts here. # +# ----------------------- # # Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. @@ -140,20 +166,7 @@ while read dir; do dots=`echo /$dir|sed 's%/[^/]*%../%g'` ;; esac - case "$0" in - /*) autoconf=$top_autoconf; autoheader=$top_autoheader ;; - */*) autoconf=$dots$top_autoconf; autoheader=$dots$top_autoheader ;; - *) autoconf=$top_autoconf; autoheader=$top_autoheader ;; - esac - - case "$AC_MACRODIR" in - /*) macrodir_opt="--macrodir=$AC_MACRODIR" ;; - *) macrodir_opt="--macrodir=$dots$AC_MACRODIR" ;; - esac - case "$localdir" in - "") localdir_opt= - aclocal_m4=aclocal.m4 ;; /*) localdir_opt="--localdir=$localdir" aclocal_m4=$localdir/aclocal.m4 ;; *) localdir_opt="--localdir=$dots$localdir" @@ -218,7 +231,7 @@ while read dir; do : else $verbose "running autoconf in $dir" - $autoconf $macrodir_opt $localdir_opt + $autoconf $localdir_opt fi if grep '^[ ]*A[CM]_CONFIG_HEADER' configure.in >/dev/null; then @@ -246,7 +259,7 @@ while read dir; do : else $verbose "running autoheader in $dir" - $autoheader $macrodir_opt $localdir_opt && + $autoheader $localdir_opt && $verbose "touching $stamp" && touch $stamp fi diff --git a/autoreconf.sh b/autoreconf.sh index b979579d..681e6aab 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -57,14 +57,35 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." -localdir= -verbose=: -force=no +# 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 + +# Variables. +: ${AC_MACRODIR=@datadir@} +if test -n "$AUTOCONF"; then + autoconf=$AUTOCONF +else + autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" +fi +if test -n "$AUTOHEADER"; then + autoheader=$AUTOHEADER +else + autoheader=`echo "$0" | sed -e 's/[^/]*$//`"@autoheader-name@" +fi automake_mode=--gnu automake_deps= +force=no +localdir=. +verbose=: -test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@ - +# Parse command line. while test $# -gt 0; do case "$1" in --version | --vers* | -V ) @@ -121,9 +142,14 @@ if test $# -ne 0; then exit 1 fi -# The paths to the autoconf and autoheader scripts, at the top of the tree. -top_autoconf=`echo "$0" | sed s%autoreconf%autoconf%` -top_autoheader=`echo "$0" | sed s%autoreconf%autoheader%` +# Set up autoconf and autoheader. +autoconf="$autoconf -l $localdir" +autoheader="$autoheader -l $localdir" +export AC_MACRODIR + +# ----------------------- # +# Real work starts here. # +# ----------------------- # # Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. @@ -140,20 +166,7 @@ while read dir; do dots=`echo /$dir|sed 's%/[^/]*%../%g'` ;; esac - case "$0" in - /*) autoconf=$top_autoconf; autoheader=$top_autoheader ;; - */*) autoconf=$dots$top_autoconf; autoheader=$dots$top_autoheader ;; - *) autoconf=$top_autoconf; autoheader=$top_autoheader ;; - esac - - case "$AC_MACRODIR" in - /*) macrodir_opt="--macrodir=$AC_MACRODIR" ;; - *) macrodir_opt="--macrodir=$dots$AC_MACRODIR" ;; - esac - case "$localdir" in - "") localdir_opt= - aclocal_m4=aclocal.m4 ;; /*) localdir_opt="--localdir=$localdir" aclocal_m4=$localdir/aclocal.m4 ;; *) localdir_opt="--localdir=$dots$localdir" @@ -218,7 +231,7 @@ while read dir; do : else $verbose "running autoconf in $dir" - $autoconf $macrodir_opt $localdir_opt + $autoconf $localdir_opt fi if grep '^[ ]*A[CM]_CONFIG_HEADER' configure.in >/dev/null; then @@ -246,7 +259,7 @@ while read dir; do : else $verbose "running autoheader in $dir" - $autoheader $macrodir_opt $localdir_opt && + $autoheader $localdir_opt && $verbose "touching $stamp" && touch $stamp fi diff --git a/bin/autoconf.in b/bin/autoconf.in index 46e2472e..81a9b22f 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -120,7 +120,7 @@ task=script tmp= verbose=: -# Parse command line +# Parse command line. while test $# -gt 0 ; do case "$1" in --version | --vers* | -V ) diff --git a/bin/autoheader.in b/bin/autoheader.in index 1c05ccdc..057527f3 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -69,6 +69,11 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} +if test -n "$AUTOCONF"; then + autoconf=$AUTOCONF +else + autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" +fi debug=false localdir=. tmp= @@ -77,6 +82,7 @@ warning_all=false warning_error=false warning_obsolete=false +# Parse command line. while test $# -gt 0 ; do case "$1" in --version | --vers* | -V ) @@ -198,14 +204,15 @@ case $# in exit 1 ;; esac -# Well, work now! -config_h= -syms= +# Set up autoconf. +autoconf="$autoconf -l $localdir" +export AC_MACRODIR + +# ----------------------- # +# Real work starts here. # +# ----------------------- # # Source what the traces are trying to tell us. -autoconf=`echo "$0" | sed -e 's,[^/]*$,autoconf,'` -test -n "$localdir" && autoconf="$autoconf -l $localdir" -export AC_MACRODIR $autoconf \ --trace AC_CONFIG_HEADERS:'config_h="$1"' \ --trace AH_OUTPUT:'ac_verbatim_$1="\ diff --git a/bin/autoreconf.in b/bin/autoreconf.in index b979579d..681e6aab 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -57,14 +57,35 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." -localdir= -verbose=: -force=no +# 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 + +# Variables. +: ${AC_MACRODIR=@datadir@} +if test -n "$AUTOCONF"; then + autoconf=$AUTOCONF +else + autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" +fi +if test -n "$AUTOHEADER"; then + autoheader=$AUTOHEADER +else + autoheader=`echo "$0" | sed -e 's/[^/]*$//`"@autoheader-name@" +fi automake_mode=--gnu automake_deps= +force=no +localdir=. +verbose=: -test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@ - +# Parse command line. while test $# -gt 0; do case "$1" in --version | --vers* | -V ) @@ -121,9 +142,14 @@ if test $# -ne 0; then exit 1 fi -# The paths to the autoconf and autoheader scripts, at the top of the tree. -top_autoconf=`echo "$0" | sed s%autoreconf%autoconf%` -top_autoheader=`echo "$0" | sed s%autoreconf%autoheader%` +# Set up autoconf and autoheader. +autoconf="$autoconf -l $localdir" +autoheader="$autoheader -l $localdir" +export AC_MACRODIR + +# ----------------------- # +# Real work starts here. # +# ----------------------- # # Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. @@ -140,20 +166,7 @@ while read dir; do dots=`echo /$dir|sed 's%/[^/]*%../%g'` ;; esac - case "$0" in - /*) autoconf=$top_autoconf; autoheader=$top_autoheader ;; - */*) autoconf=$dots$top_autoconf; autoheader=$dots$top_autoheader ;; - *) autoconf=$top_autoconf; autoheader=$top_autoheader ;; - esac - - case "$AC_MACRODIR" in - /*) macrodir_opt="--macrodir=$AC_MACRODIR" ;; - *) macrodir_opt="--macrodir=$dots$AC_MACRODIR" ;; - esac - case "$localdir" in - "") localdir_opt= - aclocal_m4=aclocal.m4 ;; /*) localdir_opt="--localdir=$localdir" aclocal_m4=$localdir/aclocal.m4 ;; *) localdir_opt="--localdir=$dots$localdir" @@ -218,7 +231,7 @@ while read dir; do : else $verbose "running autoconf in $dir" - $autoconf $macrodir_opt $localdir_opt + $autoconf $localdir_opt fi if grep '^[ ]*A[CM]_CONFIG_HEADER' configure.in >/dev/null; then @@ -246,7 +259,7 @@ while read dir; do : else $verbose "running autoheader in $dir" - $autoheader $macrodir_opt $localdir_opt && + $autoheader $localdir_opt && $verbose "touching $stamp" && touch $stamp fi diff --git a/bin/ifnames.in b/bin/ifnames.in index a6fb37ab..a3e14fdf 100644 --- a/bin/ifnames.in +++ b/bin/ifnames.in @@ -34,9 +34,9 @@ identifiers that appear in those files in \`#if', \`#elif', \`#ifdef', or \`#ifndef' directives. Print each identifier on a line, followed by a space-separated list of the files in which that identifier occurs. - -h, --help print this help, then exit - -V, --version print version number, then exit - -v, --verbose verbosely report processing + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing Report bugs to ." diff --git a/ifnames.in b/ifnames.in index a6fb37ab..a3e14fdf 100644 --- a/ifnames.in +++ b/ifnames.in @@ -34,9 +34,9 @@ identifiers that appear in those files in \`#if', \`#elif', \`#ifdef', or \`#ifndef' directives. Print each identifier on a line, followed by a space-separated list of the files in which that identifier occurs. - -h, --help print this help, then exit - -V, --version print version number, then exit - -v, --verbose verbosely report processing + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing Report bugs to ." diff --git a/ifnames.sh b/ifnames.sh index a6fb37ab..a3e14fdf 100644 --- a/ifnames.sh +++ b/ifnames.sh @@ -34,9 +34,9 @@ identifiers that appear in those files in \`#if', \`#elif', \`#ifdef', or \`#ifndef' directives. Print each identifier on a line, followed by a space-separated list of the files in which that identifier occurs. - -h, --help print this help, then exit - -V, --version print version number, then exit - -v, --verbose verbosely report processing + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing Report bugs to ."