diff --git a/ChangeLog b/ChangeLog index 70631020..f5f784e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2000-07-19 Akim Demaille + + Make it clear that the regular user does not need --macrodir. + In fact, rename this option as -A, --autoconf-dir. + + * autoconf.sh: Complain when -m, --macrodir is used. + Accept -A, --autoconf-dir. + Use $autoconf_dir instead of $AC_MACRODIR. + Adjust --help. + * autoheader.sh: Likewise. + * autoscan.sh: Likewise. + * autoupdate.sh: Likewise. + Use $optarg. + * autoreconf.sh: Likewise. + * doc/autoconf.texi: Adjust. + * tests: Adjust the test suite. + 2000-07-19 Akim Demaille * autoreconf.sh: Forward --debug to sub tools. diff --git a/autoconf.in b/autoconf.in index 1d009709..1a8f35eb 100644 --- a/autoconf.in +++ b/autoconf.in @@ -108,7 +108,7 @@ case `$M4 --help &1` in esac # Variables. -: ${AC_MACRODIR=@datadir@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} : ${AC_ACLOCALDIR=`(aclocal --print-ac-dir) 2>/dev/null`} : ${AWK=@AWK@} debug=false @@ -152,13 +152,23 @@ while test $# -gt 0 ; do localdir=$1 shift ;; - --macrodir=* | --m*=* ) - AC_MACRODIR=$optarg + --autoconf-dir=*) + autoconf_dir=$optarg shift ;; - --macrodir | --m* | -m ) + --autoconf-dir | -A* ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 + shift ;; + --macrodir=* | --m*=* ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + autoconf_dir=$optarg + shift ;; + --macrodir | --m* | -m ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + test $# = 1 && eval "$exit_missing_arg" + shift + autoconf_dir=$1 shift ;; --trace | -t ) @@ -246,11 +256,11 @@ $debug || } # Running m4. -test -f "$AC_MACRODIR/acsite.m4" && acsite_m4="$AC_MACRODIR/acsite.m4" +test -f "$autoconf_dir/acsite.m4" && acsite_m4="$autoconf_dir/acsite.m4" test -f "$localdir/aclocal.m4" && aclocal_m4="$localdir/aclocal.m4" -m4_common="$acsite_m4 $aclocal_m4 -I $AC_MACRODIR -I $localdir" -run_m4="$M4 $AC_MACRODIR/autoconf.m4 $m4_common" -run_m4f="$M4 --reload $AC_MACRODIR/autoconf.m4f $m4_common" +m4_common="$acsite_m4 $aclocal_m4 -I $autoconf_dir -I $localdir" +run_m4="$M4 $autoconf_dir/autoconf.m4 $m4_common" +run_m4f="$M4 --reload $autoconf_dir/autoconf.m4f $m4_common" # Find the input file. case $# in diff --git a/autoconf.sh b/autoconf.sh index 1d009709..1a8f35eb 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -108,7 +108,7 @@ case `$M4 --help &1` in esac # Variables. -: ${AC_MACRODIR=@datadir@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} : ${AC_ACLOCALDIR=`(aclocal --print-ac-dir) 2>/dev/null`} : ${AWK=@AWK@} debug=false @@ -152,13 +152,23 @@ while test $# -gt 0 ; do localdir=$1 shift ;; - --macrodir=* | --m*=* ) - AC_MACRODIR=$optarg + --autoconf-dir=*) + autoconf_dir=$optarg shift ;; - --macrodir | --m* | -m ) + --autoconf-dir | -A* ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 + shift ;; + --macrodir=* | --m*=* ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + autoconf_dir=$optarg + shift ;; + --macrodir | --m* | -m ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + test $# = 1 && eval "$exit_missing_arg" + shift + autoconf_dir=$1 shift ;; --trace | -t ) @@ -246,11 +256,11 @@ $debug || } # Running m4. -test -f "$AC_MACRODIR/acsite.m4" && acsite_m4="$AC_MACRODIR/acsite.m4" +test -f "$autoconf_dir/acsite.m4" && acsite_m4="$autoconf_dir/acsite.m4" test -f "$localdir/aclocal.m4" && aclocal_m4="$localdir/aclocal.m4" -m4_common="$acsite_m4 $aclocal_m4 -I $AC_MACRODIR -I $localdir" -run_m4="$M4 $AC_MACRODIR/autoconf.m4 $m4_common" -run_m4f="$M4 --reload $AC_MACRODIR/autoconf.m4f $m4_common" +m4_common="$acsite_m4 $aclocal_m4 -I $autoconf_dir -I $localdir" +run_m4="$M4 $autoconf_dir/autoconf.m4 $m4_common" +run_m4f="$M4 --reload $autoconf_dir/autoconf.m4f $m4_common" # Find the input file. case $# in diff --git a/autoheader.in b/autoheader.in index d6d929d3..efcf64f2 100644 --- a/autoheader.in +++ b/autoheader.in @@ -36,14 +36,17 @@ given. -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files - -m, --macrodir=DIR directory storing Autoconf's macro files - -l, --localdir=DIR directory storing \`aclocal.m4' and \`acconfig.h' -W, --warnings=CATEGORY report the warnings falling in CATEGORY Warning categories include: \`obsolete' obsolete constructs \`all' all the warnings \`error' warnings are error + +Library directories: + -A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed) + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' + Report bugs to ." version="\ @@ -73,7 +76,7 @@ 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@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} dir=`echo "$0" | sed -e 's/[^/]*$//'` # We test "$dir/autoconf" in case we are in the build tree, in which case # the names are not transformed yet. @@ -93,7 +96,8 @@ warning_obsolete=false # Parse command line. while test $# -gt 0 ; do - case "$1" in + optarg=`expr "$1" : '-[^=]*=\(.*\)'` + case $1 in --version | --vers* | -V ) echo "$version" ; exit 0 ;; --help | --h* | -h ) @@ -106,7 +110,7 @@ while test $# -gt 0 ; do shift;; --localdir=* | --l*=* ) - localdir=`echo "$1" | sed -e 's/^[^=]*=//'` + localdir=$optarg shift ;; --localdir | --l* | -l ) test $# = 1 && eval "$exit_missing_arg" @@ -114,13 +118,23 @@ while test $# -gt 0 ; do localdir=$1 shift ;; - --macrodir=* | --m*=* ) - AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` + --autoconf-dir=*) + autoconf_dir=$optarg shift ;; - --macrodir | --m* | -m ) + --autoconf-dir | -A* ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 + shift ;; + --macrodir=* | --m*=* ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + autoconf_dir=$optarg + shift ;; + --macrodir | --m* | -m ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + test $# = 1 && eval "$exit_missing_arg" + shift + autoconf_dir=$1 shift ;; --warnings | -W ) @@ -128,11 +142,8 @@ while test $# -gt 0 ; do shift warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; - --warnings=* ) - warnings="$warnings "`echo "$1" | sed -e 's/^[^=]*=//;s/,/ /g'` - shift ;; - -W* ) # People are used to -Wall, -Werror etc. - warnings="$warnings "`echo "$1" | sed -e 's/^-W//;s/,/ /g'` + --warnings=* | -W*) + warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'` shift ;; -- ) # Stop option processing @@ -182,7 +193,7 @@ if ($warning_all || $warning_obsolete) && (test -f $config_h.top || test -f $config_h.bot || test -f $localdir/acconfig.h); then - sed -e "s/^ //;s/^/$me: WARNING: /" >&2 <<\EOF + sed -e "s/^ /$me: WARNING: /" >&2 <<\EOF Using auxiliary files such as `acconfig.h', `config.h.bot' and `config.h.top', to define templates for `config.h.in' is deprecated and discouraged. @@ -215,7 +226,7 @@ esac # Set up autoconf. autoconf="$autoconf -l $localdir" -export AC_MACRODIR +export autoconf_dir # ----------------------- # # Real work starts here. # diff --git a/autoheader.sh b/autoheader.sh index d6d929d3..efcf64f2 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -36,14 +36,17 @@ given. -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files - -m, --macrodir=DIR directory storing Autoconf's macro files - -l, --localdir=DIR directory storing \`aclocal.m4' and \`acconfig.h' -W, --warnings=CATEGORY report the warnings falling in CATEGORY Warning categories include: \`obsolete' obsolete constructs \`all' all the warnings \`error' warnings are error + +Library directories: + -A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed) + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' + Report bugs to ." version="\ @@ -73,7 +76,7 @@ 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@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} dir=`echo "$0" | sed -e 's/[^/]*$//'` # We test "$dir/autoconf" in case we are in the build tree, in which case # the names are not transformed yet. @@ -93,7 +96,8 @@ warning_obsolete=false # Parse command line. while test $# -gt 0 ; do - case "$1" in + optarg=`expr "$1" : '-[^=]*=\(.*\)'` + case $1 in --version | --vers* | -V ) echo "$version" ; exit 0 ;; --help | --h* | -h ) @@ -106,7 +110,7 @@ while test $# -gt 0 ; do shift;; --localdir=* | --l*=* ) - localdir=`echo "$1" | sed -e 's/^[^=]*=//'` + localdir=$optarg shift ;; --localdir | --l* | -l ) test $# = 1 && eval "$exit_missing_arg" @@ -114,13 +118,23 @@ while test $# -gt 0 ; do localdir=$1 shift ;; - --macrodir=* | --m*=* ) - AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` + --autoconf-dir=*) + autoconf_dir=$optarg shift ;; - --macrodir | --m* | -m ) + --autoconf-dir | -A* ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 + shift ;; + --macrodir=* | --m*=* ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + autoconf_dir=$optarg + shift ;; + --macrodir | --m* | -m ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + test $# = 1 && eval "$exit_missing_arg" + shift + autoconf_dir=$1 shift ;; --warnings | -W ) @@ -128,11 +142,8 @@ while test $# -gt 0 ; do shift warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; - --warnings=* ) - warnings="$warnings "`echo "$1" | sed -e 's/^[^=]*=//;s/,/ /g'` - shift ;; - -W* ) # People are used to -Wall, -Werror etc. - warnings="$warnings "`echo "$1" | sed -e 's/^-W//;s/,/ /g'` + --warnings=* | -W*) + warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'` shift ;; -- ) # Stop option processing @@ -182,7 +193,7 @@ if ($warning_all || $warning_obsolete) && (test -f $config_h.top || test -f $config_h.bot || test -f $localdir/acconfig.h); then - sed -e "s/^ //;s/^/$me: WARNING: /" >&2 <<\EOF + sed -e "s/^ /$me: WARNING: /" >&2 <<\EOF Using auxiliary files such as `acconfig.h', `config.h.bot' and `config.h.top', to define templates for `config.h.in' is deprecated and discouraged. @@ -215,7 +226,7 @@ esac # Set up autoconf. autoconf="$autoconf -l $localdir" -export AC_MACRODIR +export autoconf_dir # ----------------------- # # Real work starts here. # diff --git a/autoreconf.in b/autoreconf.in index 45aae5c7..3fa7014b 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -43,9 +43,10 @@ The option \`--install' is similar to the option \`--add-missing' in other tools. Library directories: - -m, --macrodir=ACDIR Autoconf's macro files location (rarely needed) - -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' - -M, --m4dir=M4DIR this package's Autoconf extensions + -A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed) + -m, --macro-path=PATH library extensions files + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' + -M, --m4dir=M4DIR this package's Autoconf extensions Unless specified, heuristics try to compute \`M4DIR' from the \`Makefile.am', or defaults to \`m4' if it exists. @@ -90,7 +91,7 @@ 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@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} debug=false dir=`echo "$0" | sed -e 's/[^/]*$//'` force=false @@ -150,12 +151,12 @@ while test $# -gt 0; do shift ;; --macrodir=* ) - AC_MACRODIR=$optarg + autoconf_dir=$optarg shift ;; --macrodir | -m ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 shift ;; --m4dir=* ) @@ -217,7 +218,7 @@ $debug && autoheader="$autoheader --debug" } # --macrodir -export AC_MACRODIR +export autoconf_dir # --install and --symlink if $install; then automake="$automake --add-missing `$symlink || echo --copy`" @@ -389,7 +390,7 @@ EOF # user needs the FILES, check that there is an exact correspondence. # Use yourself to get the list of the included files. export AC_ACLOCALDIR - export AC_MACRODIR + export autoconf_dir $autoconf -t include:'$1' -t m4_include:'$1' -t m4_sinclude:'$1' configure.in | sort | uniq >$tmp/included diff --git a/autoreconf.sh b/autoreconf.sh index 45aae5c7..3fa7014b 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -43,9 +43,10 @@ The option \`--install' is similar to the option \`--add-missing' in other tools. Library directories: - -m, --macrodir=ACDIR Autoconf's macro files location (rarely needed) - -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' - -M, --m4dir=M4DIR this package's Autoconf extensions + -A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed) + -m, --macro-path=PATH library extensions files + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' + -M, --m4dir=M4DIR this package's Autoconf extensions Unless specified, heuristics try to compute \`M4DIR' from the \`Makefile.am', or defaults to \`m4' if it exists. @@ -90,7 +91,7 @@ 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@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} debug=false dir=`echo "$0" | sed -e 's/[^/]*$//'` force=false @@ -150,12 +151,12 @@ while test $# -gt 0; do shift ;; --macrodir=* ) - AC_MACRODIR=$optarg + autoconf_dir=$optarg shift ;; --macrodir | -m ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 shift ;; --m4dir=* ) @@ -217,7 +218,7 @@ $debug && autoheader="$autoheader --debug" } # --macrodir -export AC_MACRODIR +export autoconf_dir # --install and --symlink if $install; then automake="$automake --add-missing `$symlink || echo --copy`" @@ -389,7 +390,7 @@ EOF # user needs the FILES, check that there is an exact correspondence. # Use yourself to get the list of the included files. export AC_ACLOCALDIR - export AC_MACRODIR + export autoconf_dir $autoconf -t include:'$1' -t m4_include:'$1' -t m4_sinclude:'$1' configure.in | sort | uniq >$tmp/included diff --git a/autoscan.in b/autoscan.in index 6ac9d647..b847dc78 100644 --- a/autoscan.in +++ b/autoscan.in @@ -54,7 +54,10 @@ is a preliminary \`configure.in' for that package. -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing - -m, --macrodir=DIR directory storing data files + +Library directories: + -A, --autoconf-dir=ACDIR Autoconf's files location (rarely needed) + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' Report bugs to . EOD @@ -73,7 +76,11 @@ EOD local $need_datadir = 0; foreach $_ (@ARGV) { - if (/^--m[a-z]*=(.*)/) { + if (/^--autoconf-dir=(.*)/) { + $datadir = $1; + } elsif (/^--autoconf-dir/ || /^-A$/) { + $need_datadir = 1; + } elsif (/^--m[a-z]*=(.*)/) { $datadir = $1; } elsif (/^-m$/) { $need_datadir = 1; diff --git a/autoscan.pl b/autoscan.pl index 6ac9d647..b847dc78 100644 --- a/autoscan.pl +++ b/autoscan.pl @@ -54,7 +54,10 @@ is a preliminary \`configure.in' for that package. -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing - -m, --macrodir=DIR directory storing data files + +Library directories: + -A, --autoconf-dir=ACDIR Autoconf's files location (rarely needed) + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' Report bugs to . EOD @@ -73,7 +76,11 @@ EOD local $need_datadir = 0; foreach $_ (@ARGV) { - if (/^--m[a-z]*=(.*)/) { + if (/^--autoconf-dir=(.*)/) { + $datadir = $1; + } elsif (/^--autoconf-dir/ || /^-A$/) { + $need_datadir = 1; + } elsif (/^--m[a-z]*=(.*)/) { $datadir = $1; } elsif (/^-m$/) { $need_datadir = 1; diff --git a/bin/autoconf.in b/bin/autoconf.in index 1d009709..1a8f35eb 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -108,7 +108,7 @@ case `$M4 --help &1` in esac # Variables. -: ${AC_MACRODIR=@datadir@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} : ${AC_ACLOCALDIR=`(aclocal --print-ac-dir) 2>/dev/null`} : ${AWK=@AWK@} debug=false @@ -152,13 +152,23 @@ while test $# -gt 0 ; do localdir=$1 shift ;; - --macrodir=* | --m*=* ) - AC_MACRODIR=$optarg + --autoconf-dir=*) + autoconf_dir=$optarg shift ;; - --macrodir | --m* | -m ) + --autoconf-dir | -A* ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 + shift ;; + --macrodir=* | --m*=* ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + autoconf_dir=$optarg + shift ;; + --macrodir | --m* | -m ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + test $# = 1 && eval "$exit_missing_arg" + shift + autoconf_dir=$1 shift ;; --trace | -t ) @@ -246,11 +256,11 @@ $debug || } # Running m4. -test -f "$AC_MACRODIR/acsite.m4" && acsite_m4="$AC_MACRODIR/acsite.m4" +test -f "$autoconf_dir/acsite.m4" && acsite_m4="$autoconf_dir/acsite.m4" test -f "$localdir/aclocal.m4" && aclocal_m4="$localdir/aclocal.m4" -m4_common="$acsite_m4 $aclocal_m4 -I $AC_MACRODIR -I $localdir" -run_m4="$M4 $AC_MACRODIR/autoconf.m4 $m4_common" -run_m4f="$M4 --reload $AC_MACRODIR/autoconf.m4f $m4_common" +m4_common="$acsite_m4 $aclocal_m4 -I $autoconf_dir -I $localdir" +run_m4="$M4 $autoconf_dir/autoconf.m4 $m4_common" +run_m4f="$M4 --reload $autoconf_dir/autoconf.m4f $m4_common" # Find the input file. case $# in diff --git a/bin/autoheader.in b/bin/autoheader.in index d6d929d3..efcf64f2 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -36,14 +36,17 @@ given. -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files - -m, --macrodir=DIR directory storing Autoconf's macro files - -l, --localdir=DIR directory storing \`aclocal.m4' and \`acconfig.h' -W, --warnings=CATEGORY report the warnings falling in CATEGORY Warning categories include: \`obsolete' obsolete constructs \`all' all the warnings \`error' warnings are error + +Library directories: + -A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed) + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' + Report bugs to ." version="\ @@ -73,7 +76,7 @@ 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@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} dir=`echo "$0" | sed -e 's/[^/]*$//'` # We test "$dir/autoconf" in case we are in the build tree, in which case # the names are not transformed yet. @@ -93,7 +96,8 @@ warning_obsolete=false # Parse command line. while test $# -gt 0 ; do - case "$1" in + optarg=`expr "$1" : '-[^=]*=\(.*\)'` + case $1 in --version | --vers* | -V ) echo "$version" ; exit 0 ;; --help | --h* | -h ) @@ -106,7 +110,7 @@ while test $# -gt 0 ; do shift;; --localdir=* | --l*=* ) - localdir=`echo "$1" | sed -e 's/^[^=]*=//'` + localdir=$optarg shift ;; --localdir | --l* | -l ) test $# = 1 && eval "$exit_missing_arg" @@ -114,13 +118,23 @@ while test $# -gt 0 ; do localdir=$1 shift ;; - --macrodir=* | --m*=* ) - AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` + --autoconf-dir=*) + autoconf_dir=$optarg shift ;; - --macrodir | --m* | -m ) + --autoconf-dir | -A* ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 + shift ;; + --macrodir=* | --m*=* ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + autoconf_dir=$optarg + shift ;; + --macrodir | --m* | -m ) + echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&1 + test $# = 1 && eval "$exit_missing_arg" + shift + autoconf_dir=$1 shift ;; --warnings | -W ) @@ -128,11 +142,8 @@ while test $# -gt 0 ; do shift warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; - --warnings=* ) - warnings="$warnings "`echo "$1" | sed -e 's/^[^=]*=//;s/,/ /g'` - shift ;; - -W* ) # People are used to -Wall, -Werror etc. - warnings="$warnings "`echo "$1" | sed -e 's/^-W//;s/,/ /g'` + --warnings=* | -W*) + warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'` shift ;; -- ) # Stop option processing @@ -182,7 +193,7 @@ if ($warning_all || $warning_obsolete) && (test -f $config_h.top || test -f $config_h.bot || test -f $localdir/acconfig.h); then - sed -e "s/^ //;s/^/$me: WARNING: /" >&2 <<\EOF + sed -e "s/^ /$me: WARNING: /" >&2 <<\EOF Using auxiliary files such as `acconfig.h', `config.h.bot' and `config.h.top', to define templates for `config.h.in' is deprecated and discouraged. @@ -215,7 +226,7 @@ esac # Set up autoconf. autoconf="$autoconf -l $localdir" -export AC_MACRODIR +export autoconf_dir # ----------------------- # # Real work starts here. # diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 45aae5c7..3fa7014b 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -43,9 +43,10 @@ The option \`--install' is similar to the option \`--add-missing' in other tools. Library directories: - -m, --macrodir=ACDIR Autoconf's macro files location (rarely needed) - -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' - -M, --m4dir=M4DIR this package's Autoconf extensions + -A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed) + -m, --macro-path=PATH library extensions files + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' + -M, --m4dir=M4DIR this package's Autoconf extensions Unless specified, heuristics try to compute \`M4DIR' from the \`Makefile.am', or defaults to \`m4' if it exists. @@ -90,7 +91,7 @@ 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@} +: ${autoconf_dir=${AC_MACRODIR=@datadir@}} debug=false dir=`echo "$0" | sed -e 's/[^/]*$//'` force=false @@ -150,12 +151,12 @@ while test $# -gt 0; do shift ;; --macrodir=* ) - AC_MACRODIR=$optarg + autoconf_dir=$optarg shift ;; --macrodir | -m ) test $# = 1 && eval "$exit_missing_arg" shift - AC_MACRODIR=$1 + autoconf_dir=$1 shift ;; --m4dir=* ) @@ -217,7 +218,7 @@ $debug && autoheader="$autoheader --debug" } # --macrodir -export AC_MACRODIR +export autoconf_dir # --install and --symlink if $install; then automake="$automake --add-missing `$symlink || echo --copy`" @@ -389,7 +390,7 @@ EOF # user needs the FILES, check that there is an exact correspondence. # Use yourself to get the list of the included files. export AC_ACLOCALDIR - export AC_MACRODIR + export autoconf_dir $autoconf -t include:'$1' -t m4_include:'$1' -t m4_sinclude:'$1' configure.in | sort | uniq >$tmp/included diff --git a/bin/autoscan.in b/bin/autoscan.in index 6ac9d647..b847dc78 100644 --- a/bin/autoscan.in +++ b/bin/autoscan.in @@ -54,7 +54,10 @@ is a preliminary \`configure.in' for that package. -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing - -m, --macrodir=DIR directory storing data files + +Library directories: + -A, --autoconf-dir=ACDIR Autoconf's files location (rarely needed) + -l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h' Report bugs to . EOD @@ -73,7 +76,11 @@ EOD local $need_datadir = 0; foreach $_ (@ARGV) { - if (/^--m[a-z]*=(.*)/) { + if (/^--autoconf-dir=(.*)/) { + $datadir = $1; + } elsif (/^--autoconf-dir/ || /^-A$/) { + $need_datadir = 1; + } elsif (/^--m[a-z]*=(.*)/) { $datadir = $1; } elsif (/^-m$/) { $need_datadir = 1; diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 1f7ad61a..8f4d2a73 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -794,6 +794,7 @@ encountered. Lines starting with @samp{#} are comments. @table @option @item --help +@itemx -h Print a summary of the command line options and exit. @item --version @@ -801,15 +802,19 @@ Print a summary of the command line options and exit. Print the version number of Autoconf and exit. @item --verbose +@itemx -v Print the names of the files it examines and the potentially interesting symbols it finds in them. This output can be voluminous. -@item --macrodir=@var{dir} +@item --autoconf-dir=@var{dir} +@itemx -A @evindex AC_MACRODIR -Look for the data files in directory @var{dir} instead of the default -installation directory. You can also set the @code{AC_MACRODIR} -environment variable to a directory; this option overrides the -environment variable. +Overwrite the location where Autoconf files were installed. You can +also set the @code{AC_MACRODIR} environment variable to a directory; +this option overrides the environment variable. + +This option is rarely needed and dangerous: only when you play with +different versions of Autoconf. @end table @node ifnames Invocation, autoconf Invocation, autoscan Invocation, Making configure Scripts @@ -887,12 +892,15 @@ Report processing steps. @itemx -d Don't remove the temporary files. -@item --macrodir=@var{dir} -@itemx -m @var{dir} +@item --autoconf-dir=@var{dir} +@itemx -A @evindex AC_MACRODIR -Look for the installed macro files in directory @var{dir}. You can also -set the @code{AC_MACRODIR} environment variable to a directory; this -option overrides the environment variable. +Overwrite the location where Autoconf files were installed. You can +also set the @code{AC_MACRODIR} environment variable to a directory; +this option overrides the environment variable. + +This option is rarely needed and dangerous: only when you play with +different versions of Autoconf. @item --localdir=@var{dir} @itemx -l @var{dir} @@ -1084,7 +1092,7 @@ amount of work. If you install a new version of Autoconf, you can make @code{autoreconf} remake @emph{all} of the files by giving it the @option{--force} option. -If you give @code{autoreconf} the @option{--macrodir=@var{dir}} or +If you give @code{autoreconf} the @option{--autoconf-dir=@var{dir}} or @option{--localdir=@var{dir}} options, it passes them down to @code{autoconf} and @code{autoheader} (with relative paths adjusted properly). @@ -1101,7 +1109,7 @@ in the future. @xref{Automatic Remaking}, for @file{Makefile} rules to automatically remake @code{configure} scripts when their source files change. That method handles the timestamps of configuration header templates -properly, but does not pass @option{--macrodir=@var{dir}} or +properly, but does not pass @option{--autoconf-dir=@var{dir}} or @option{--localdir=@var{dir}}. @noindent @@ -1137,13 +1145,15 @@ Have @code{autoconf} and @code{autoheader} look for the package files not @file{@var{file}.top} and @file{@var{file}.bot}) in directory @var{dir} instead of in the directory containing each @file{configure.in}. -@item --macrodir=@var{dir} -@itemx -m @var{dir} +@item --autoconf-dir=@var{dir} +@itemx -A @evindex AC_MACRODIR -Look for the Autoconf macro files in directory @var{dir} instead of the -default installation directory. You can also set the @code{AC_MACRODIR} -environment variable to a directory; this option overrides the -environment variable. +Overwrite the location where Autoconf files were installed. You can +also set the @code{AC_MACRODIR} environment variable to a directory; +this option overrides the environment variable. + +This option is rarely needed and dangerous: only when you play with +different versions of Autoconf. @end table @@ -1957,12 +1967,15 @@ Print the version number of Autoconf and exit. @itemx -d Don't remove the temporary files. -@item --macrodir=@var{dir} -@itemx -m @var{dir} +@item --autoconf-dir=@var{dir} +@itemx -A @evindex AC_MACRODIR -Look for the installed macro files and @file{acconfig.h} in directory -@var{dir}. You can also set the @code{AC_MACRODIR} environment variable -to a directory; this option overrides the environment variable. +Overwrite the location where Autoconf files were installed. You can +also set the @code{AC_MACRODIR} environment variable to a directory; +this option overrides the environment variable. + +This option is rarely needed and dangerous: only when you play with +different versions of Autoconf. @item --localdir=@var{dir} @itemx -l @var{dir} @@ -7724,12 +7737,15 @@ Report processing steps. @itemx -d Don't remove the temporary files. -@item --macrodir=@var{dir} -@itemx -m @var{dir} +@item --autoconf-dir=@var{dir} +@itemx -A @evindex AC_MACRODIR -Look for the installed macro files in directory @var{dir}. You can also -set the @code{AC_MACRODIR} environment variable to a directory; this -option overrides the environment variable. +Overwrite the location where Autoconf files were installed. You can +also set the @code{AC_MACRODIR} environment variable to a directory; +this option overrides the environment variable. + +This option is rarely needed and dangerous: only when you play with +different versions of Autoconf. @item --localdir=@var{dir} @itemx -l @var{dir} @@ -9002,7 +9018,7 @@ invalid arguments. Jim Blandy bravely coerced it into configuring Roland McGrath got it to configure the @sc{gnu} C Library, wrote the @code{autoheader} script to automate the creation of C header file templates, and added a @option{--verbose} option to @code{configure}. -Noah Friedman added the @option{--macrodir} option and +Noah Friedman added the @option{--autoconf-dir} option and @code{AC_MACRODIR} environment variable. (He also coined the term @dfn{autoconfiscate} to mean ``adapt a software package to use Autoconf''.) Roland and Noah improved the quoting protection in diff --git a/man/autoheader.1 b/man/autoheader.1 index 1c89dcec..bd27de4a 100644 --- a/man/autoheader.1 +++ b/man/autoheader.1 @@ -22,12 +22,6 @@ verbosely report processing \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .TP -\fB\-m\fR, \fB\-\-macrodir\fR=\fIDIR\fR -directory storing Autoconf's macro files -.TP -\fB\-l\fR, \fB\-\-localdir\fR=\fIDIR\fR -directory storing `aclocal.m4' and `acconfig.h' -.TP \fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR report the warnings falling in CATEGORY .SS "Warning categories include:" @@ -40,6 +34,13 @@ all the warnings .TP `error' warnings are error +.SS "Library directories:" +.TP +\fB\-A\fR, \fB\-\-autoconf\-dir\fR=\fIACDIR\fR +Autoconf's macro files location (rarely needed) +.TP +\fB\-l\fR, \fB\-\-localdir\fR=\fIDIR\fR +location of `aclocal.m4' and `acconfig.h' .SH AUTHOR Written by Roland McGrath. .SH "REPORTING BUGS" diff --git a/man/autoreconf.1 b/man/autoreconf.1 index d9d12d33..d03129ba 100644 --- a/man/autoreconf.1 +++ b/man/autoreconf.1 @@ -40,9 +40,12 @@ The option `--install' is similar to the option `--add-missing' in other tools. .SS "Library directories:" .TP -\fB\-m\fR, \fB\-\-macrodir\fR=\fIACDIR\fR +\fB\-A\fR, \fB\-\-autoconf\-dir\fR=\fIACDIR\fR Autoconf's macro files location (rarely needed) .TP +\fB\-m\fR, \fB\-\-macro\-path\fR=\fIPATH\fR +library extensions files +.TP \fB\-l\fR, \fB\-\-localdir\fR=\fIDIR\fR location of `aclocal.m4' and `acconfig.h' .TP diff --git a/man/autoscan.1 b/man/autoscan.1 index 36bb36b8..97d8eae2 100644 --- a/man/autoscan.1 +++ b/man/autoscan.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. -.TH AUTOSCAN "1" "May 2000" "GNU autoconf 2.14a" FSF +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. +.TH AUTOSCAN "1" "July 2000" "GNU autoconf 2.14a" FSF .SH NAME autoscan \- Generate a preliminary configure.in .SH SYNOPSIS @@ -19,9 +19,13 @@ print version number, then exit .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing +.SS "Library directories:" .TP -\fB\-m\fR, \fB\-\-macrodir\fR=\fIDIR\fR -directory storing data files +\fB\-A\fR, \fB\-\-autoconf\-dir\fR=\fIACDIR\fR +Autoconf's files location (rarely needed) +.TP +\fB\-l\fR, \fB\-\-localdir\fR=\fIDIR\fR +location of `aclocal.m4' and `acconfig.h' .SH AUTHOR Written by David J. MacKenzie. .SH "REPORTING BUGS" diff --git a/man/autoupdate.1 b/man/autoupdate.1 index f03d7226..77d46201 100644 --- a/man/autoupdate.1 +++ b/man/autoupdate.1 @@ -22,12 +22,13 @@ verbosely report processing .TP \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files +.SS "Library directories:" .TP -\fB\-m\fR, \fB\-\-macrodir\fR=\fIDIR\fR -directory storing Autoconf's macro files +\fB\-A\fR, \fB\-\-autoconf\-dir\fR=\fIACDIR\fR +Autoconf's macro files location (rarely needed) .TP \fB\-l\fR, \fB\-\-localdir\fR=\fIDIR\fR -directory storing the `aclocal.m4' file +location of `aclocal.m4' and `acconfig.h' .SH AUTHOR Written by David J. MacKenzie. .SH "REPORTING BUGS" diff --git a/tests/atspecific.m4 b/tests/atspecific.m4 index 90566648..0e714f11 100644 --- a/tests/atspecific.m4 +++ b/tests/atspecific.m4 @@ -97,8 +97,8 @@ dnl FIXME: Here we just don't consider the stderr from Autoconf. dnl Maybe some day we could be more precise and filter out warnings. dnl The problem is that currently some warnings are spread on several dnl lines, so grepping -v warning is not enough. -AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, ignore) -AT_CHECK([../autoheader -m .. -l $at_srcdir], 0,, ignore) +AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0,, ignore) +AT_CHECK([../autoheader --autoconf-dir .. -l $at_srcdir], 0,, ignore) AT_CHECK([top_srcdir=$top_srcdir ./configure], 0, ignore, ignore) test -n "$at_verbose" && echo "--- config.log" && cat config.log diff --git a/tests/base.m4 b/tests/base.m4 index c9ae50cf..6a8be6fd 100644 --- a/tests/base.m4 +++ b/tests/base.m4 @@ -48,7 +48,7 @@ AT_DATA(expout, First, second , third, [,quoted] ]]) -AT_CHECK([../autoconf -m .. -l $at_srcdir -o-], 0, expout) +AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir -o-], 0, expout) AT_CLEANUP() @@ -88,7 +88,7 @@ test -z "$test1" && exit 1 exit 0 ]]) -AT_CHECK([../autoconf -m .. -l $at_srcdir], 0, [], []) +AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], []) AT_CHECK([./configure], 0) AT_CLEANUP(configure) @@ -114,7 +114,7 @@ test -d a/b/c/d/e/f || exit 1 exit 0 ]]) -AT_CHECK([../autoconf -m .. -l $at_srcdir], 0, [], []) +AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], []) AT_CHECK([./configure], 0) AT_CLEANUP(configure 1) diff --git a/tests/semantics.m4 b/tests/semantics.m4 index b710dc91..497dce6b 100644 --- a/tests/semantics.m4 +++ b/tests/semantics.m4 @@ -157,7 +157,7 @@ AC_CHECK_TYPE(a,b,c,d) AC_OUTPUT ]]) -AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, +AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0,, [configure.in:10: warning: AC_CHECK_TYPE: assuming `uint65536_t' is not a type ]) AT_CHECK([[sed -e '/^#(cut-from-here/,/^#to-here)/!d' -e '/^#/d' configure]], @@ -251,7 +251,7 @@ test "$TOOL6" = tool || fail=1 exit $fail ]]) -AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, ignore) +AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0,, ignore) AT_CHECK([./configure], 0, ignore) @@ -283,7 +283,7 @@ test "$TOOL4" = $pwd/path/1/tool || fail=1 exit $fail ]]) -AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, ignore) +AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0,, ignore) AT_CHECK([./configure], 0, ignore) AT_CLEANUP(path config.log config.cache configure) @@ -331,7 +331,7 @@ esac AC_OUTPUT ]]) -AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, ignore) +AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0,, ignore) # Create a header AT_CHECK([./configure what_to_test=header], 0, ignore) diff --git a/tests/tools.m4 b/tests/tools.m4 index a5d680b0..73a4b9ce 100644 --- a/tests/tools.m4 +++ b/tests/tools.m4 @@ -90,7 +90,7 @@ AC_CONFIG_HEADERS(config.h) AC_DEFINE(this, "whatever you want.") ]]) -AT_CHECK([../autoheader -m .. -