]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Provide a macro to canonicalize a configuration name.
authorAkim Demaille <akim@epita.fr>
Wed, 3 May 2000 09:53:55 +0000 (09:53 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 3 May 2000 09:53:55 +0000 (09:53 +0000)
Suggested by Ralf Corsepius.

*  acgeneral.m4 (AC_CANONICALIZE): New macro.
(_AC_CANONICAL_THING): Use it.

ChangeLog
Makefile.in
THANKS
acgeneral.m4
configure
doc/autoconf.texi
doc/install.texi
lib/autoconf/general.m4
tests/Makefile.am
tests/Makefile.in

index 8c39bbda016532126b86cc0c63be958c906acebb..306bbc70885d8ad57f5687ddce4d875e714dcf4a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-05-03  Akim Demaille  <akim@epita.fr>
+
+       Provide a macro to canonicalize a configuration name.
+       Suggested by Ralf Corsepius.
+
+       *  acgeneral.m4 (AC_CANONICALIZE): New macro.
+       (_AC_CANONICAL_THING): Use it.
+
 2000-04-28  Akim Demaille  <akim@epita.fr>
 
        Don't double quote in AC_MSG_*.
index 4531c6ce526112e218ca833f72461b08f5aaf2cb..fdd662a48e0c0943d84aefc2f8cf57e64356895e 100644 (file)
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4a from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,6 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -32,8 +31,6 @@ mandir = @mandir@
 includedir = @includedir@
 oldincludedir = /usr/include
 
-DESTDIR =
-
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -46,9 +43,10 @@ AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_FLAG =
 transform = @program_transform_name@
 
 NORMAL_INSTALL = :
@@ -57,6 +55,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+
+@SET_MAKE@
 AWK = @AWK@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
@@ -64,6 +64,7 @@ PERL = @PERL@
 PERLSCRIPTS = @PERLSCRIPTS@
 standards_texi = @standards_texi@
 
+
 AUTOMAKE_OPTIONS = check-news 1.4 readme-alpha
 
 SUBDIRS = . m4 man doc tests
@@ -79,7 +80,10 @@ EXTRA_SCRIPTS = autoscan
 # s/nodistpackageDATA/nodist_pkgdata_DATA/
 # and adapt dependencies once we use a more recent Automake
 
-distpkgdataDATA =  acfunctions acheaders acidentifiers acmakevars acprograms libm4.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 autoconf.m4 autoupdate.m4 aclang.m4
+distpkgdataDATA = \
+acfunctions acheaders acidentifiers acmakevars acprograms \
+libm4.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 autoconf.m4 \
+autoupdate.m4 aclang.m4
 
 
 nodistpkgdataDATA = autoconf.m4f autoupdate.m4f acversion.m4
@@ -87,28 +91,43 @@ nodistpkgdataDATA = autoconf.m4f autoupdate.m4f acversion.m4
 pkgdata_DATA = $(distpkgdataDATA) $(nodistpkgdataDATA)
 
 OLDCHANGELOGS = ChangeLog.0 ChangeLog.1
-EXTRA_DIST = $(OLDCHANGELOGS) autoconf.sh autoheader.sh autoreconf.sh autoupdate.sh ifnames.sh autoscan.pl INSTALL.txt $(distpkgdataDATA)
+EXTRA_DIST = $(OLDCHANGELOGS) \
+autoconf.sh autoheader.sh autoreconf.sh autoupdate.sh \
+ifnames.sh autoscan.pl INSTALL.txt \
+$(distpkgdataDATA)
 
 
 # Files that should be removed, but which Automake does not know:
 # the frozen files and the scripts.
-CLEANFILES = autoconf.m4f autoupdate.m4f              $(bin_SCRIPTS)
+CLEANFILES = autoconf.m4f autoupdate.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'
 
-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
+common = libm4.m4 acgeneral.m4 acspecific.m4 acoldnames.m4 acversion.m4 \
+         aclang.m4
 
+subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES =  acversion.m4
 SCRIPTS =  $(bin_SCRIPTS)
 
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = 
 DATA =  $(pkgdata_DATA)
 
 DIST_COMMON =  README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
@@ -120,9 +139,8 @@ missing mkinstalldirs
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
 GZIP_ENV = --best
 all: all-redirect
 .SUFFIXES:
@@ -130,7 +148,7 @@ all: all-redirect
 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
        cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) \
          && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
@@ -146,38 +164,40 @@ install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(bindir)
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
+         f="`echo $$p|sed '$(transform)'`"; \
          if test -f $$p; then \
-           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
-           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
-         else if test -f $(srcdir)/$$p; then \
-           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
-           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
-         else :; fi; fi; \
+           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f"; \
+           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f; \
+         elif test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f"; \
+           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f; \
+         else :; fi; \
        done
 
 uninstall-binSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       list='$(bin_SCRIPTS)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+       @list='$(bin_SCRIPTS)'; for p in $$list; do \
+         f="`echo $$p|sed '$(transform)'`"; \
+         echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+         rm -f $(DESTDIR)$(bindir)/$$f; \
        done
 
 install-pkgdataDATA: $(pkgdata_DATA)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
        @list='$(pkgdata_DATA)'; for p in $$list; do \
-         if test -f $(srcdir)/$$p; then \
-           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p"; \
-           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \
-         else if test -f $$p; then \
-           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p"; \
-           $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
-         fi; fi; \
+         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
+         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
        done
 
 uninstall-pkgdataDATA:
        @$(NORMAL_UNINSTALL)
-       list='$(pkgdata_DATA)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(pkgdatadir)/$$p; \
+       @list='$(pkgdata_DATA)'; for p in $$list; do \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
+         rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
        done
 
 # This directory's subdirectories are mostly independent; you can cd
@@ -187,8 +207,6 @@ uninstall-pkgdataDATA:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 
-@SET_MAKE@
-
 all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive  \
 check-recursive installcheck-recursive info-recursive dvi-recursive:
@@ -216,7 +234,7 @@ maintainer-clean-recursive:
        dot_seen=no; \
        rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
          rev="$$subdir $$rev"; \
-         test "$$subdir" = "." && dot_seen=yes; \
+         if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
        done; \
        test "$$dot_seen" = "no" && rev=". $$rev"; \
        target=`echo $@ | sed s/-recursive//`; \
@@ -237,15 +255,17 @@ tags-recursive:
 
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       here=`pwd` && cd $(srcdir) \
-         && mkid -f$$here/ID $$unique $(LISP)
+       mkid -fID $$unique $(LISP)
 
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
        tags=; \
        here=`pwd`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -253,12 +273,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
            test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
    fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
+       list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
-         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+         || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
 
 mostlyclean-tags:
 
@@ -272,58 +294,69 @@ maintainer-clean-tags:
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 
+
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
 distcheck: dist
-       -rm -rf $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
        mkdir $(distdir)/=build
        mkdir $(distdir)/=inst
-       dc_install_base=`cd $(distdir)/=inst && pwd`; \
-       cd $(distdir)/=build \
+       chmod a-w $(distdir)
+       dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
+         && cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix=$$dc_install_base \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) dist
-       -rm -rf $(distdir)
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && $(MAKE) $(AM_MAKEFLAGS) distclean \
+         && rm -f $(distdir).tar.gz \
+         && test `find . -type f -print | wc -l` -eq 0
+       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
        @banner="$(distdir).tar.gz is ready for distribution"; \
        dashes=`echo "$$banner" | sed s/./=/g`; \
        echo "$$dashes"; \
        echo "$$banner"; \
        echo "$$dashes"
 dist: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
+       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r $(distdir)
+       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
+       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
 dist-all: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
+       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r $(distdir)
+       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
+       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
 distdir: $(DISTFILES)
        @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1; \
        fi
-       -rm -rf $(distdir)
+       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
        mkdir $(distdir)
-       -chmod 777 $(distdir)
-       here=`cd $(top_builddir) && pwd`; \
-       top_distdir=`cd $(distdir) && pwd`; \
-       distdir=`cd $(distdir) && pwd`; \
-       cd $(top_srcdir) \
-         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$d/$$file $(distdir)/$$file; \
+           cp -pR $$d/$$file $(distdir) \
+           || exit 1; \
          else \
            test -f $(distdir)/$$file \
-           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-           || cp -p $$d/$$file $(distdir)/$$file || :; \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
          fi; \
        done
        for subdir in $(SUBDIRS); do \
@@ -331,7 +364,6 @@ distdir: $(DISTFILES)
            test -d $(distdir)/$$subdir \
            || mkdir $(distdir)/$$subdir \
            || exit 1; \
-           chmod 777 $(distdir)/$$subdir; \
            (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
              || exit 1; \
          fi; \
@@ -360,7 +392,7 @@ uninstall: uninstall-recursive
 all-am: Makefile $(SCRIPTS) $(DATA)
 all-redirect: all-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
 installdirs: installdirs-recursive
 installdirs-am:
        $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir)
@@ -376,6 +408,7 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
+       -rm -f Makefile.in
 mostlyclean-am:  mostlyclean-tags mostlyclean-generic
 
 mostlyclean: mostlyclean-recursive
@@ -398,18 +431,19 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f config.status
 
 .PHONY: uninstall-binSCRIPTS install-binSCRIPTS uninstall-pkgdataDATA \
-install-pkgdataDATA install-data-recursive uninstall-data-recursive \
-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
-uninstalldirs-recursive all-recursive check-recursive \
-installcheck-recursive info-recursive dvi-recursive \
-mostlyclean-recursive distclean-recursive clean-recursive \
+install-pkgdataDATA install-recursive uninstall-recursive \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
 maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
 install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs-am \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+uninstall-am uninstall all-redirect all-am all install-strip \
+installdirs-am installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
 
 
 # INSTALL is a special case.  Automake seems to have a single name space
diff --git a/THANKS b/THANKS
index 49357b4d156288ba4eba007c9b9b34c710b127e8..c5667a9e9f320d3675add0a89f22d3b781277839 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -82,6 +82,7 @@ Michael Schoene               mrs@mlc.de
 Mike Hopkirk           hops@sco.com
 Mike Stump             mrs@wrs.com
 Miles Bader            miles@gnu.ai.mit.edu
+Mo DeJong              mdejong@cygnus.com
 Morten Eriksen         mortene@sim.no
 Nicolas Joly           njoly@pasteur.fr
 Noah Elliott           elliott@hera.llnl.gov
index ef7669415e22ce511be5224cb6fba4fa42050e7e..56affd35b685d8dde7321faa5849fe5f2df6a86e 100644 (file)
@@ -77,6 +77,8 @@ m4_namespace_push(autoconf)
 #   initialization code, option handling loop.
 # - HELP_BEGIN
 #   Handling `configure --help'.
+# - HELP_CANON
+#   Help msg for AC_CANONICAL_*
 # - HELP_ENABLE
 #   Help msg from AC_ARG_ENABLE.
 # - HELP_WITH
@@ -119,20 +121,24 @@ define([_AC_DIVERT(BINSH)],           0)
 define([_AC_DIVERT(NOTICE)],          1)
 define([_AC_DIVERT(DEFAULTS)],        2)
 define([_AC_DIVERT(INIT_PARSE_ARGS)], 3)
-define([_AC_DIVERT(HELP_BEGIN)],      4)
-define([_AC_DIVERT(HELP_ENABLE)],     5)
-define([_AC_DIVERT(HELP_WITH)],       6)
-define([_AC_DIVERT(HELP_VAR)],        7)
-define([_AC_DIVERT(HELP_END)],        8)
-define([_AC_DIVERT(VERSION_BEGIN)],   9)
-define([_AC_DIVERT(VERSION_END)],    10)
-define([_AC_DIVERT(INIT_PREPARE)],   11)
-
-define([_AC_DIVERT(NORMAL_4)],       20)
-define([_AC_DIVERT(NORMAL_3)],       21)
-define([_AC_DIVERT(NORMAL_2)],       22)
-define([_AC_DIVERT(NORMAL_1)],       23)
-define([_AC_DIVERT(NORMAL)],         24)
+
+define([_AC_DIVERT(HELP_BEGIN)],     10)
+define([_AC_DIVERT(HELP_CANON)],     11)
+define([_AC_DIVERT(HELP_ENABLE)],    12)
+define([_AC_DIVERT(HELP_WITH)],      13)
+define([_AC_DIVERT(HELP_VAR)],       14)
+define([_AC_DIVERT(HELP_END)],       15)
+
+define([_AC_DIVERT(VERSION_BEGIN)],  20)
+define([_AC_DIVERT(VERSION_END)],    21)
+
+define([_AC_DIVERT(INIT_PREPARE)],   30)
+
+define([_AC_DIVERT(NORMAL_4)],       50)
+define([_AC_DIVERT(NORMAL_3)],       51)
+define([_AC_DIVERT(NORMAL_2)],       52)
+define([_AC_DIVERT(NORMAL_1)],       53)
+define([_AC_DIVERT(NORMAL)],         54)
 
 define([_AC_DIVERT],
 [ifdef([_AC_DIVERT($1)],
@@ -290,7 +296,7 @@ define(AC_BEFORE,
 define(AC_REQUIRE,
 [AC_PROVIDE_IFELSE([$1],
                    [],
-                   [AC_DIVERT(m4_eval(AC_DIVERT_DIVERSION - 1), [$1])])
+                   [AC_DIVERT(m4_eval(AC_DIVERT_DIVERSION - 1), [$1])])dnl
 ])
 
 
@@ -890,12 +896,9 @@ ac_init_help=
 ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
 cache_file=/dev/null
 AC_SUBST(exec_prefix, NONE)dnl
-host=NONE
 no_create=
-nonopt=NONE
 no_recursion=
 AC_SUBST(prefix, NONE)dnl
 program_prefix=NONE
@@ -904,7 +907,6 @@ AC_SUBST(program_transform_name, [s,x,x,])dnl
 silent=
 site=
 srcdir=
-target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
@@ -1212,12 +1214,10 @@ Try `configure --help' for more information.])
 
   *)
     if echo "$ac_option" | grep '[[^-a-zA-Z0-9.]]' >/dev/null 2>&1; then
-      AC_MSG_WARN(invalid host type: $ac_option)
+      AC_MSG_WARN([invalid host type: $ac_option])
     fi
-    if test "x$nonopt" != xNONE; then
-      AC_MSG_ERROR(can only configure for one host and one target at a time)
-    fi
-    nonopt=$ac_option
+    AC_MSG_WARN([you should use --build, --host, --target])
+    : ${build=$ac_option} ${host=$ac_option} ${target=$ac_option}
     ;;
 
   esac
@@ -1260,7 +1260,7 @@ if test "$ac_init_help" = "long"; then
                         [AC_PACKAGE_STRING],
                         [this package]) to adapt to many kinds of systems.
 
-Usage: $[0] [[OPTION]... [VAR=VALUE]... [HOST]]
+Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
 
 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
 VAR=VALUE.
@@ -1275,7 +1275,7 @@ Configuration:
   -q, --quiet, --silent   do not print \`checking...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or ..]
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
 EOF
 
@@ -1308,26 +1308,28 @@ Fine tuning of the installation directories:
   --mandir=DIR           man documentation [PREFIX/man]
 EOF
 
-  cat <<\EOF
-
-Host type:
-  --host=HOST        configure for HOST [guessed]
-  --build=BUILD      configure for building on BUILD [BUILD=HOST]
-  --target=TARGET    configure for TARGET [TARGET=HOST]
-EOF
   cat <<\EOF]
 AC_DIVERT_POP()dnl
 dnl The order of the diversions here is
-dnl HELP_BEGIN, which may be prolongated by extra generic options
-dnl             such as with X or AC_ARG_PROGRAM.  Displayed only
-dnl             in long --help.
-dnl HELP_ENABLE, which starts with the trailer of the HELP_BEGIN
-dnl              section, then implements the header of the non
-dnl              generic options.
-dnl HELP_WITH,
-dnl HELP_VAR,
-dnl HELP_END, initialized below, in which we dump the trailer
-dnl           (handling of the recursion for instance).
+dnl - HELP_BEGIN
+dnl   which may be prolongated by extra generic options such as with X or
+dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
+dnl
+dnl - HELP_CANON
+dnl   Support for cross compilation (--build, --host and --target).
+dnl   Display only in long --help.
+dnl
+dnl - HELP_ENABLE
+dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
+dnl   then implements the header of the non generic options.
+dnl
+dnl - HELP_WITH
+dnl
+dnl - HELP_VAR
+dnl
+dnl - HELP_END
+dnl   initialized below, in which we dump the trailer (handling of the
+dnl   recursion for instance).
 AC_DIVERT_PUSH([HELP_ENABLE])dnl
 EOF
 fi
@@ -1689,9 +1691,9 @@ test -z "$program_transform_name" && program_transform_name="s,x,x,"
 
 
 
-## ----------------------------------- ##
-## Getting the canonical system type.  ##
-## ----------------------------------- ##
+## ------------------------- ##
+## Finding auxiliary files.  ##
+## ------------------------- ##
 
 
 # AC_CONFIG_AUX_DIR(DIR)
@@ -1744,102 +1746,114 @@ AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 ])# AC_CONFIG_AUX_DIRS
 
 
-# AC_CANONICAL_SYSTEM
-# -------------------
-# Canonicalize the host, target, and build system types.
-AC_DEFUN(AC_CANONICAL_SYSTEM,
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_TARGET])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_BEFORE([$0], [AC_ARG_PROGRAM])
-# Do some error checking and defaulting for the host and target type.
+
+
+## ----------------------------------- ##
+## Getting the canonical system type.  ##
+## ----------------------------------- ##
+
 # The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#    configure --host=HOST --target=TARGET --build=BUILD
 #
 # The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
+# 1. Build defaults to the current host, as determined by config.guess.
+# 2. Host defaults to build.
+# 3. Target defaults to host.
 
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
-esac
 
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-])# AC_CANONICAL_SYSTEM
+# AC_CANONICALIZE(THING)
+# ----------------------
+# Canonicalize the appropriate THING, generating the variables THING,
+# THING_{alias cpu vendor os}, and the associated cache entries.
+AC_DEFUN([AC_CANONICALIZE],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+ac_cv_$1=`$ac_config_sub $ac_cv_$1_alias` || exit 1
+ac_cv_$1_cpu=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`
+ac_cv_$1_vendor=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`
+ac_cv_$1_os=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`
+AC_SUBST([$1],        [$ac_cv_$1])dnl
+AC_SUBST([$1_alias],  [$ac_cv_$1_alias])dnl
+AC_SUBST([$1_cpu],    [$ac_cv_$1_cpu])dnl
+AC_SUBST([$1_vendor], [$ac_cv_$1_vendor])dnl
+AC_SUBST([$1_os],     [$ac_cv_$1_os])dnl
+])# AC_CANONICALIZE
 
 
 # _AC_CANONICAL_THING(THING)
 # --------------------------
-# Worker routine for AC_CANONICAL_{HOST TARGET BUILD}.  THING is one of
-# `host', `target', or `build'.  Canonicalize the appropriate thing,
-# generating the variables THING, THING_{alias cpu vendor os}, and the
-# associated cache entries.  We also redo the cache entries if the user
-# specifies something different from ac_cv_$THING_alias on the command line.
-define(_AC_CANONICAL_THING,
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-ifelse([$1], [host], , [AC_REQUIRE([AC_CANONICAL_HOST])])dnl
-AC_MSG_CHECKING([$1 system type])
-if test "x$ac_cv_$1" = "x" || (test "x$$1" != "xNONE" && test "x$$1" != "x$ac_cv_$1_alias"); then
-
-  # Make sure we can run config.sub.
-  if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
-    AC_MSG_ERROR(cannot run $ac_config_sub)
-  fi
+# Worker routine for AC_CANONICAL_SYSTEM.  THING is one of `host',
+# `target', or `build'.  Canonicalize the appropriate thing.  We also
+# redo the cache entries if the user specifies something different
+# from ac_cv_$THING_alias on the command line.
+define([_AC_CANONICAL_THING],
+[AC_MSG_CHECKING([$1 system type])
+if test "x$ac_cv_$1" = "x" ||
+   (test "x$$1" != "x" && test "x$$1" != "x$ac_cv_$1_alias"); then
 
 dnl Set $1_alias.
   ac_cv_$1_alias=$$1
-  case "$ac_cv_$1_alias" in
-  NONE)
-    case $nonopt in
-    NONE)
-ifelse([$1], [host],[dnl
-      if ac_cv_$1_alias=`$ac_config_guess`; then :
-      else AC_MSG_ERROR(cannot guess $1 type; you must specify one)
-      fi ;;],[dnl
-      ac_cv_$1_alias=$host_alias ;;
-])dnl
-    *) ac_cv_$1_alias=$nonopt ;;
-    esac ;;
-  esac
-
-dnl Set the other $[1] vars.  Propagate the failures of config.sub.
-  ac_cv_$1=`$ac_config_sub $ac_cv_$1_alias` || exit 1
-  ac_cv_$1_cpu=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`
-  ac_cv_$1_vendor=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`
-  ac_cv_$1_os=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`
+  test "x$ac_cv_$1_alias" = "x" &&
+    m4_case([$1],
+[build],
+  [{ ac_cv_build_alias=`$ac_config_guess` ||
+      AC_MSG_ERROR(
+           [cannot guess build (this machine) type; you must specify one]); }],
+[host],
+  [ac_cv_host_alias=$build_alias],
+[target],
+  [ac_cv_target_alias=$host_alias])
 else
   echo $ECHO_N "(cached) $ECHO_C" >&AC_FD_MSG
 fi
+AC_CANONICALIZE([$1])
+AC_MSG_RESULT($ac_cv_$1)[]dnl
+])# _AC_CANONICAL_THING
 
-AC_MSG_RESULT($ac_cv_$1)
 
-$1=$ac_cv_$1
-$1_alias=$ac_cv_$1_alias
-$1_cpu=$ac_cv_$1_cpu
-$1_vendor=$ac_cv_$1_vendor
-$1_os=$ac_cv_$1_os
-AC_SUBST($1)dnl
-AC_SUBST($1_alias)dnl
-AC_SUBST($1_cpu)dnl
-AC_SUBST($1_vendor)dnl
-AC_SUBST($1_os)dnl
-])# _AC_CANONICAL_THING
+# AC_CANONICAL_BUILD
+# ------------------
+AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
+[AC_DIVERT([HELP_CANON],
+[[
+Hosts type:
+  --build=BUILD     configure for building on BUILD [guessed]]])dnl
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  AC_MSG_ERROR([cannot run $ac_config_sub])
+
+_AC_CANONICAL_THING(build)[]dnl
+])# AC_CANONICAL_BUILD
+
+
+# AC_CANONICAL_HOST
+# -----------------
+AC_DEFUN_ONCE([AC_CANONICAL_HOST],
+[AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_DIVERT([HELP_CANON],
+[[  --host=HOST       configure for building programs running on HOST [BUILD]]])dnl
+_AC_CANONICAL_THING(host)[]dnl
+])# AC_CANONICAL_HOST
+
+
+# AC_CANONICAL_TARGET
+# -------------------
+AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
+AC_DIVERT([HELP_CANON],
+[[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
+_AC_CANONICAL_THING(target)[]dnl
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-[]dnl
+])# AC_CANONICAL_TARGET
+
 
-AC_DEFUN(AC_CANONICAL_HOST,   [_AC_CANONICAL_THING([host])])
-AC_DEFUN(AC_CANONICAL_TARGET, [_AC_CANONICAL_THING([target])])
-AC_DEFUN(AC_CANONICAL_BUILD,  [_AC_CANONICAL_THING([build])])
+AU_DEFUN(AC_CANONICAL_SYSTEM, [AC_CANONICAL_TARGET])
 
 
 # AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
index 76d990199af16326948c190934a42ccd7fc43530..a84dbff043ab837878d18d07e2ac8039bbd3636f 100755 (executable)
--- a/configure
+++ b/configure
@@ -61,12 +61,9 @@ ac_init_help=
 ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
 cache_file=/dev/null
 exec_prefix=NONE
-host=NONE
 no_create=
-nonopt=NONE
 no_recursion=
 prefix=NONE
 program_prefix=NONE
@@ -75,7 +72,6 @@ program_transform_name=s,x,x,
 silent=
 site=
 srcdir=
-target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
@@ -380,10 +376,8 @@ Try \`configure --help' for more information." >&2; exit 1; }
     if echo "$ac_option" | grep '[^-a-zA-Z0-9.]' >/dev/null 2>&1; then
       echo "configure: warning: invalid host type: $ac_option" >&2
     fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" >&2; exit 1; }
-    fi
-    nonopt=$ac_option
+    echo "configure: warning: you should use --build, --host, --target" >&2
+    : ${build=$ac_option} ${host=$ac_option} ${target=$ac_option}
     ;;
 
   esac
@@ -438,7 +432,7 @@ if test "$ac_init_help" = "long"; then
   cat <<EOF
 \`configure' configures Autoconf 2.14a to adapt to many kinds of systems.
 
-Usage: $0 [OPTION]... [VAR=VALUE]... [HOST]
+Usage: $0 [OPTION]... [VAR=VALUE]...
 
 To assign environment variables (e.g., CC, CFLAGS...), specify them as
 VAR=VALUE.
@@ -453,7 +447,7 @@ Configuration:
   -q, --quiet, --silent   do not print \`checking...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or ..]
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
 EOF
 
@@ -488,13 +482,6 @@ EOF
 
   cat <<\EOF
 
-Host type:
-  --host=HOST        configure for HOST [guessed]
-  --build=BUILD      configure for building on BUILD [BUILD=HOST]
-  --target=TARGET    configure for TARGET [TARGET=HOST]
-EOF
-  cat <<\EOF
-
 Program names:
   --program-prefix=PREFIX            prepend PREFIX to installed program names
   --program-suffix=SUFFIX            append SUFFIX to installed program names
@@ -694,7 +681,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo "configure:613: checking for a BSD compatible install" >&5
+echo "configure:601: checking for a BSD compatible install" >&5
 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
@@ -741,8 +728,8 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-echo "configure:659: result: $INSTALL" >&5
-echo "$ECHO_T""$INSTALL" >&6
+echo "configure:647: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -752,7 +739,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-echo "configure:666: checking whether build environment is sane" >&5
+echo "configure:654: checking whether build environment is sane" >&5
 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
 # Just in case
 sleep 1
@@ -789,8 +776,8 @@ else
 Check your system clock" >&2; exit 1; }
 fi
 rm -f conftest*
-echo "configure:701: result: yes" >&5
-echo "$ECHO_T""yes" >&6
+echo "configure:689: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 if test "$program_transform_name" = s,x,x,; then
   program_transform_name=
 else
@@ -808,9 +795,9 @@ test "$program_suffix" != NONE &&
   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
 
 # sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+test -z "$program_transform_name" && program_transform_name="s,x,x,"
 
-echo "configure:720: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:708: checking whether ${MAKE-make} sets \${MAKE}" >&5
 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
@@ -830,12 +817,12 @@ fi
 rm -f conftestmake
 fi
 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "configure:740: result: yes" >&5
-echo "$ECHO_T""yes" >&6
+  echo "configure:728: result: yes" >&5
+echo "${ECHO_T}yes" >&6
   SET_MAKE=
 else
-  echo "configure:744: result: no" >&5
-echo "$ECHO_T""no" >&6
+  echo "configure:732: result: no" >&5
+echo "${ECHO_T}no" >&6
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -844,94 +831,91 @@ PACKAGE=autoconf
 VERSION=2.14a
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
-  { echo "configure: error: source directory already configured; run "make distclean" there first" >&2; exit 1; }
+  { echo "configure: error: source directory already configured; run \"make distclean\" there first" >&2; exit 1; }
 fi
-#
 
 cat >>confdefs.h <<EOF
 #define PACKAGE "$PACKAGE"
 EOF
 
-#
-
 cat >>confdefs.h <<EOF
 #define VERSION "$VERSION"
 EOF
 
 missing_dir=`cd $ac_aux_dir && pwd`
-echo "configure:762: checking for working aclocal" >&5
+echo "configure:748: checking for working aclocal" >&5
 echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
    ACLOCAL=aclocal
-   echo "configure:769: result: found" >&5
-echo "$ECHO_T""found" >&6
+   echo "configure:755: result: found" >&5
+echo "${ECHO_T}found" >&6
 else
    ACLOCAL="$missing_dir/missing aclocal"
-   echo "configure:773: result: missing" >&5
-echo "$ECHO_T""missing" >&6
+   echo "configure:759: result: missing" >&5
+echo "${ECHO_T}missing" >&6
 fi
 
-echo "configure:776: checking for working autoconf" >&5
+echo "configure:762: checking for working autoconf" >&5
 echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
    AUTOCONF=autoconf
-   echo "configure:783: result: found" >&5
-echo "$ECHO_T""found" >&6
+   echo "configure:769: result: found" >&5
+echo "${ECHO_T}found" >&6
 else
    AUTOCONF="$missing_dir/missing autoconf"
-   echo "configure:787: result: missing" >&5
-echo "$ECHO_T""missing" >&6
+   echo "configure:773: result: missing" >&5
+echo "${ECHO_T}missing" >&6
 fi
 
-echo "configure:790: checking for working automake" >&5
+echo "configure:776: checking for working automake" >&5
 echo $ECHO_N "checking for working automake... $ECHO_C" >&6
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 if (automake --version) < /dev/null > /dev/null 2>&1; then
    AUTOMAKE=automake
-   echo "configure:797: result: found" >&5
-echo "$ECHO_T""found" >&6
+   echo "configure:783: result: found" >&5
+echo "${ECHO_T}found" >&6
 else
    AUTOMAKE="$missing_dir/missing automake"
-   echo "configure:801: result: missing" >&5
-echo "$ECHO_T""missing" >&6
+   echo "configure:787: result: missing" >&5
+echo "${ECHO_T}missing" >&6
 fi
 
-echo "configure:804: checking for working autoheader" >&5
+echo "configure:790: checking for working autoheader" >&5
 echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
    AUTOHEADER=autoheader
-   echo "configure:811: result: found" >&5
-echo "$ECHO_T""found" >&6
+   echo "configure:797: result: found" >&5
+echo "${ECHO_T}found" >&6
 else
    AUTOHEADER="$missing_dir/missing autoheader"
-   echo "configure:815: result: missing" >&5
-echo "$ECHO_T""missing" >&6
+   echo "configure:801: result: missing" >&5
+echo "${ECHO_T}missing" >&6
 fi
 
-echo "configure:818: checking for working makeinfo" >&5
+echo "configure:804: checking for working makeinfo" >&5
 echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
    MAKEINFO=makeinfo
-   echo "configure:825: result: found" >&5
-echo "$ECHO_T""found" >&6
+   echo "configure:811: result: found" >&5
+echo "${ECHO_T}found" >&6
 else
    MAKEINFO="$missing_dir/missing makeinfo"
-   echo "configure:829: result: missing" >&5
-echo "$ECHO_T""missing" >&6
+   echo "configure:815: result: missing" >&5
+echo "${ECHO_T}missing" >&6
 fi
 
 AT_TESTPATH=..
@@ -940,7 +924,7 @@ for ac_prog in gm4 gnum4 m4
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "configure:837: checking for $ac_word" >&5
+echo "configure:823: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_M4+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -965,18 +949,18 @@ esac
 fi
 M4=$ac_cv_path_M4
 if test -n "$M4"; then
-  echo "configure:862: result: $M4" >&5
-echo "$ECHO_T""$M4" >&6
+  echo "configure:848: result: $M4" >&5
+echo "${ECHO_T}$M4" >&6
 else
-  echo "configure:865: result: no" >&5
-echo "$ECHO_T""no" >&6
+  echo "configure:851: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 test -n "$M4" && break
 done
 test -n "$M4" || M4="m4"
 
-echo "configure:871: checking whether m4 supports frozen files" >&5
+echo "configure:857: checking whether m4 supports frozen files" >&5
 echo $ECHO_N "checking whether m4 supports frozen files... $ECHO_C" >&6
 if test "${ac_cv_prog_gnu_m4+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -988,8 +972,8 @@ if test x"$M4" != x; then
   esac
 fi
 fi
-echo "configure:883: result: $ac_cv_prog_gnu_m4" >&5
-echo "$ECHO_T""$ac_cv_prog_gnu_m4" >&6
+echo "configure:869: result: $ac_cv_prog_gnu_m4" >&5
+echo "${ECHO_T}$ac_cv_prog_gnu_m4" >&6
 if test x"$ac_cv_prog_gnu_m4" != xyes; then
   { echo "configure: error: GNU m4 1.4 is required" >&2; exit 1; }
 fi
@@ -998,7 +982,7 @@ for ac_prog in mawk gawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "configure:892: checking for $ac_word" >&5
+echo "configure:878: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1023,34 +1007,34 @@ fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  echo "configure:917: result: $AWK" >&5
-echo "$ECHO_T""$AWK" >&6
+  echo "configure:903: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
 else
-  echo "configure:920: result: no" >&5
-echo "$ECHO_T""no" >&6
+  echo "configure:906: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 test -n "$AWK" && break
 done
 
-echo "configure:925: checking for working help2man" >&5
+echo "configure:911: checking for working help2man" >&5
 echo $ECHO_N "checking for working help2man... $ECHO_C" >&6
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 if (help2man --version) < /dev/null > /dev/null 2>&1; then
    HELP2MAN=help2man
-   echo "configure:932: result: found" >&5
-echo "$ECHO_T""found" >&6
+   echo "configure:918: result: found" >&5
+echo "${ECHO_T}found" >&6
 else
    HELP2MAN="\${SHELL} \${top_srcdir}/missing help2man"
-   echo "configure:936: result: missing" >&5
-echo "$ECHO_T""missing" >&6
+   echo "configure:922: result: missing" >&5
+echo "${ECHO_T}missing" >&6
 fi
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
-echo "configure:941: checking for $ac_word" >&5
+echo "configure:927: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PERL+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1076,11 +1060,11 @@ esac
 fi
 PERL=$ac_cv_path_PERL
 if test -n "$PERL"; then
-  echo "configure:967: result: $PERL" >&5
-echo "$ECHO_T""$PERL" >&6
+  echo "configure:953: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
 else
-  echo "configure:970: result: no" >&5
-echo "$ECHO_T""no" >&6
+  echo "configure:956: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 if test "$PERL" != no; then
@@ -1100,7 +1084,7 @@ fi
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo "configure:989: checking for a BSD compatible install" >&5
+echo "configure:975: checking for a BSD compatible install" >&5
 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
@@ -1147,8 +1131,8 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-echo "configure:1035: result: $INSTALL" >&5
-echo "$ECHO_T""$INSTALL" >&6
+echo "configure:1021: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -1467,7 +1451,7 @@ EOF
   ac_beg=1 # First line for current file.
   ac_end=$ac_max_sed_lines # Line after last line for current file.
   ac_more_lines=:
-  ac_sed_cmds=""
+  ac_sed_cmds=
   while $ac_more_lines; do
     if test $ac_beg -gt 1; then
       sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
index 87331655d94201a17130ab1debca4dae3fbdec2d..7b74c259f955ad869d5244c2633006807902ede4 100644 (file)
@@ -2568,9 +2568,10 @@ is not changed.  Calls @code{AC_SUBST} for @var{variable}.
 @defmac AC_CHECK_TOOL (@var{variable}, @var{prog-to-check-for}, @ovar{value-if-not-found}, @ovar{path})
 @maindex CHECK_TOOL
 Like @code{AC_CHECK_PROG}, but first looks for @var{prog-to-check-for}
-with a prefix of the host type as determined by @code{AC_CANONICAL_HOST},
-followed by a dash (@pxref{Canonicalizing}).  For example, if the user
-runs @samp{configure --host=i386-gnu}, then this call:
+with a prefix of the host type as determined by
+@code{AC_CANONICAL_HOST}, followed by a dash (@pxref{Canonicalizing}).
+For example, if the user runs @samp{configure --host=i386-gnu}, then
+this call:
 @example
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 @end example
@@ -2597,9 +2598,9 @@ found.
 @maindex PATH_TOOL
 Like @code{AC_PATH_PROG}, but first looks for @var{prog-to-check-for}
 with a prefix of the host type as determined by
-@code{AC_CANONICAL_HOST},
-followed by a dash (@pxref{Canonicalizing}).  For example, if the user
-runs @samp{configure --host=i386-gnu}, then this call:
+@code{AC_CANONICAL_HOST}, followed by a dash (@pxref{Canonicalizing}).
+For example, if the user runs @samp{configure --host=i386-gnu}, then
+this call:
 @example
 AC_PATH_TOOL(FILE, file, :, /usr/bin:$PATH)
 @end example
@@ -4395,6 +4396,8 @@ operators; consequently, POSIX does not specify them, so using them is
 nonportable.  If you combine @samp{&&} and @samp{||} in the same
 statement, keep in mind that they have equal precedence.
 
+
+@c FIXME: Hm, I'd say the `target' here should be `build'.
 To enable @code{configure} scripts to support cross-compilation, they
 shouldn't do anything that tests features of the host system instead of
 the target system.  But occasionally you may find it necessary to check
@@ -5680,17 +5683,15 @@ the type of system for which any compiler tools in the package will
 produce code.
 @end table
 
-@noindent
-If the user gives @code{configure} a non-option argument, it is used as
-the default for the host, target, and build system types if the user
-does not specify them explicitly with options.  The target and build
-types default to the host type if it is given and they are not.  If you
-are cross-compiling, you still have to specify the names of the
+By default, the build is guessed (by @code{config,guess}), the host
+system is the build system, and the target is the build system.
+
+If you are cross-compiling, you still have to specify the names of the
 cross-tools you use, in particular the C compiler, on the
 @code{configure} command line, e.g.,
 
 @example
-CC=m68k-coff-gcc configure --target=m68k-coff
+./configure --target=m68k-coff CC=m68k-coff-gcc
 @end example
 
 @code{configure} recognizes short aliases for many system types; for
@@ -5713,22 +5714,29 @@ those scripts in.  If you do not use either of these macros,
 @code{configure} ignores any @samp{--host}, @samp{--target}, and
 @samp{--build} options given to it.
 
-@defmac AC_CANONICAL_SYSTEM
-@maindex CANONICAL_SYSTEM
-Determine the system type and set output variables to the names of the
-canonical system types.  @xref{System Type Variables}, for details about
-the variables this macro sets.
+
+@defmac AC_CANONICAL_BUILD
+@maindex CANONICAL_BUILD
+Compute the @samp{build} system type variables, see @ref{System Type
+Variables}.  Unless specified to @code{configure} via @samp{--build},
+the build system is guessed by running @code{config.guess}.
 @end defmac
 
 @defmac AC_CANONICAL_HOST
-@defmacx AC_CANONICAL_BUILD
-@defmacx AC_CANONICAL_TARGET
 @maindex CANONICAL_HOST
-@maindex CANONICAL_BUILD
+Compute the @samp{host} system type variables, see @ref{System Type
+Variables}.  Unless specified to @code{configure} via @samp{--host}, the
+host system is the build system.
+@end defmac
+
+@defmac AC_CANONICAL_TARGET
 @maindex CANONICAL_TARGET
-Perform only the subset of @code{AC_CANONICAL_SYSTEM} relevant to the
-host or build or target type.  @code{AC_CANONICAL_HOST} is all that is
-needed for programs that are not part of a compiler tool chain.
+Compute the @samp{target} system type variables, see @ref{System Type
+Variables}.  Unless specified to @code{configure} via @samp{--target},
+the target system is the host system.
+
+This macro only makes sense for compilers, debuggers etc. which might
+run on a machine, but work on binaries from another machine.
 @end defmac
 
 @defmac AC_VALIDATE_CACHED_SYSTEM_TUPLE (@var{cmd})
@@ -5741,10 +5749,9 @@ error message.
 @node System Type Variables, Using System Type, Canonicalizing, Manual Configuration
 @section System Type Variables
 
-After calling @code{AC_CANONICAL_SYSTEM}, the following output variables
-contain the system type information.  After @code{AC_CANONICAL_HOST},
-@code{AC_CANONICAL_BUILD}, or @code{AC_CANONICAL_TARGET}, only the
-@code{host}, @code{build}, or @code{target} variables below are set.
+After calling @code{AC_CANONICAL_BUILD}, the following @samp{build}
+output variables contain the build system type information, likewise for
+@code{AC_CANONICAL_HOST} and @code{AC_CANONICAL_TARGET}.
 
 @table @code
 @ovindex build
@@ -6059,10 +6066,10 @@ Place in output variable @code{program_transform_name} a sequence of
 
 If any of the options described below are given to @code{configure},
 program names are transformed accordingly.  Otherwise, if
-@code{AC_CANONICAL_SYSTEM} has been called and a @samp{--target} value
-is given that differs from the host type (specified with @samp{--host}
-or defaulted by @code{config.sub}), the target type followed by a dash
-is used as a prefix.  Otherwise, no program name transformation is done.
+@code{AC_CANONICAL_TARGET} has been called and a @samp{--target} value
+is given that differs from the host type (specified with @samp{--host}),
+the target type followed by a dash is used as a prefix.  Otherwise, no
+program name transformation is done.
 @end defmac
 
 @menu
@@ -7105,6 +7112,18 @@ removed because of limited usefulness
 This macro is obsolete; it does nothing.
 @end defmac
 
+@defmac AC_CANONICAL_SYSTEM
+@maindex CANONICAL_SYSTEM
+Determine the system type and set output variables to the names of the
+canonical system types.  @xref{System Type Variables}, for details about
+the variables this macro sets.
+
+The user is encouraged to explicitly use either
+@code{AC_CANONICAL_BUILD}, or @code{AC_CANONICAL_HOST}, or
+@code{AC_CANONICAL_TARGET}, depending on her needs.  Using
+@code{AC_CANONICAL_TARGET} is enough to run the three macros.
+@end defmac
+
 @defmac AC_CHAR_UNSIGNED
 @maindex CHAR_UNSIGNED
 @code{AC_C_CHAR_UNSIGNED}
index 7892d0fcbb53d7979e387aaf25e7ea73454b17bb..2ea1e2a95bff8c1e622fc19559b8bc22092d44e4 100644 (file)
@@ -194,22 +194,6 @@ example:
 will cause the specified gcc to be used as the C compiler (unless it is
 overridden in the site shell script).
 
-Please, note that the former interface:
-
-@example
-CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-
-@noindent
-or
-
-@example
-env CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-
-@noindent
-should be avoided.
-
 
 @node Operation Controls
 @section Operation Controls
index ef7669415e22ce511be5224cb6fba4fa42050e7e..56affd35b685d8dde7321faa5849fe5f2df6a86e 100644 (file)
@@ -77,6 +77,8 @@ m4_namespace_push(autoconf)
 #   initialization code, option handling loop.
 # - HELP_BEGIN
 #   Handling `configure --help'.
+# - HELP_CANON
+#   Help msg for AC_CANONICAL_*
 # - HELP_ENABLE
 #   Help msg from AC_ARG_ENABLE.
 # - HELP_WITH
@@ -119,20 +121,24 @@ define([_AC_DIVERT(BINSH)],           0)
 define([_AC_DIVERT(NOTICE)],          1)
 define([_AC_DIVERT(DEFAULTS)],        2)
 define([_AC_DIVERT(INIT_PARSE_ARGS)], 3)
-define([_AC_DIVERT(HELP_BEGIN)],      4)
-define([_AC_DIVERT(HELP_ENABLE)],     5)
-define([_AC_DIVERT(HELP_WITH)],       6)
-define([_AC_DIVERT(HELP_VAR)],        7)
-define([_AC_DIVERT(HELP_END)],        8)
-define([_AC_DIVERT(VERSION_BEGIN)],   9)
-define([_AC_DIVERT(VERSION_END)],    10)
-define([_AC_DIVERT(INIT_PREPARE)],   11)
-
-define([_AC_DIVERT(NORMAL_4)],       20)
-define([_AC_DIVERT(NORMAL_3)],       21)
-define([_AC_DIVERT(NORMAL_2)],       22)
-define([_AC_DIVERT(NORMAL_1)],       23)
-define([_AC_DIVERT(NORMAL)],         24)
+
+define([_AC_DIVERT(HELP_BEGIN)],     10)
+define([_AC_DIVERT(HELP_CANON)],     11)
+define([_AC_DIVERT(HELP_ENABLE)],    12)
+define([_AC_DIVERT(HELP_WITH)],      13)
+define([_AC_DIVERT(HELP_VAR)],       14)
+define([_AC_DIVERT(HELP_END)],       15)
+
+define([_AC_DIVERT(VERSION_BEGIN)],  20)
+define([_AC_DIVERT(VERSION_END)],    21)
+
+define([_AC_DIVERT(INIT_PREPARE)],   30)
+
+define([_AC_DIVERT(NORMAL_4)],       50)
+define([_AC_DIVERT(NORMAL_3)],       51)
+define([_AC_DIVERT(NORMAL_2)],       52)
+define([_AC_DIVERT(NORMAL_1)],       53)
+define([_AC_DIVERT(NORMAL)],         54)
 
 define([_AC_DIVERT],
 [ifdef([_AC_DIVERT($1)],
@@ -290,7 +296,7 @@ define(AC_BEFORE,
 define(AC_REQUIRE,
 [AC_PROVIDE_IFELSE([$1],
                    [],
-                   [AC_DIVERT(m4_eval(AC_DIVERT_DIVERSION - 1), [$1])])
+                   [AC_DIVERT(m4_eval(AC_DIVERT_DIVERSION - 1), [$1])])dnl
 ])
 
 
@@ -890,12 +896,9 @@ ac_init_help=
 ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
 cache_file=/dev/null
 AC_SUBST(exec_prefix, NONE)dnl
-host=NONE
 no_create=
-nonopt=NONE
 no_recursion=
 AC_SUBST(prefix, NONE)dnl
 program_prefix=NONE
@@ -904,7 +907,6 @@ AC_SUBST(program_transform_name, [s,x,x,])dnl
 silent=
 site=
 srcdir=
-target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
@@ -1212,12 +1214,10 @@ Try `configure --help' for more information.])
 
   *)
     if echo "$ac_option" | grep '[[^-a-zA-Z0-9.]]' >/dev/null 2>&1; then
-      AC_MSG_WARN(invalid host type: $ac_option)
+      AC_MSG_WARN([invalid host type: $ac_option])
     fi
-    if test "x$nonopt" != xNONE; then
-      AC_MSG_ERROR(can only configure for one host and one target at a time)
-    fi
-    nonopt=$ac_option
+    AC_MSG_WARN([you should use --build, --host, --target])
+    : ${build=$ac_option} ${host=$ac_option} ${target=$ac_option}
     ;;
 
   esac
@@ -1260,7 +1260,7 @@ if test "$ac_init_help" = "long"; then
                         [AC_PACKAGE_STRING],
                         [this package]) to adapt to many kinds of systems.
 
-Usage: $[0] [[OPTION]... [VAR=VALUE]... [HOST]]
+Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
 
 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
 VAR=VALUE.
@@ -1275,7 +1275,7 @@ Configuration:
   -q, --quiet, --silent   do not print \`checking...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or ..]
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
 EOF
 
@@ -1308,26 +1308,28 @@ Fine tuning of the installation directories:
   --mandir=DIR           man documentation [PREFIX/man]
 EOF
 
-  cat <<\EOF
-
-Host type:
-  --host=HOST        configure for HOST [guessed]
-  --build=BUILD      configure for building on BUILD [BUILD=HOST]
-  --target=TARGET    configure for TARGET [TARGET=HOST]
-EOF
   cat <<\EOF]
 AC_DIVERT_POP()dnl
 dnl The order of the diversions here is
-dnl HELP_BEGIN, which may be prolongated by extra generic options
-dnl             such as with X or AC_ARG_PROGRAM.  Displayed only
-dnl             in long --help.
-dnl HELP_ENABLE, which starts with the trailer of the HELP_BEGIN
-dnl              section, then implements the header of the non
-dnl              generic options.
-dnl HELP_WITH,
-dnl HELP_VAR,
-dnl HELP_END, initialized below, in which we dump the trailer
-dnl           (handling of the recursion for instance).
+dnl - HELP_BEGIN
+dnl   which may be prolongated by extra generic options such as with X or
+dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
+dnl
+dnl - HELP_CANON
+dnl   Support for cross compilation (--build, --host and --target).
+dnl   Display only in long --help.
+dnl
+dnl - HELP_ENABLE
+dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
+dnl   then implements the header of the non generic options.
+dnl
+dnl - HELP_WITH
+dnl
+dnl - HELP_VAR
+dnl
+dnl - HELP_END
+dnl   initialized below, in which we dump the trailer (handling of the
+dnl   recursion for instance).
 AC_DIVERT_PUSH([HELP_ENABLE])dnl
 EOF
 fi
@@ -1689,9 +1691,9 @@ test -z "$program_transform_name" && program_transform_name="s,x,x,"
 
 
 
-## ----------------------------------- ##
-## Getting the canonical system type.  ##
-## ----------------------------------- ##
+## ------------------------- ##
+## Finding auxiliary files.  ##
+## ------------------------- ##
 
 
 # AC_CONFIG_AUX_DIR(DIR)
@@ -1744,102 +1746,114 @@ AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 ])# AC_CONFIG_AUX_DIRS
 
 
-# AC_CANONICAL_SYSTEM
-# -------------------
-# Canonicalize the host, target, and build system types.
-AC_DEFUN(AC_CANONICAL_SYSTEM,
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_TARGET])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_BEFORE([$0], [AC_ARG_PROGRAM])
-# Do some error checking and defaulting for the host and target type.
+
+
+## ----------------------------------- ##
+## Getting the canonical system type.  ##
+## ----------------------------------- ##
+
 # The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#    configure --host=HOST --target=TARGET --build=BUILD
 #
 # The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
+# 1. Build defaults to the current host, as determined by config.guess.
+# 2. Host defaults to build.
+# 3. Target defaults to host.
 
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
-esac
 
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-])# AC_CANONICAL_SYSTEM
+# AC_CANONICALIZE(THING)
+# ----------------------
+# Canonicalize the appropriate THING, generating the variables THING,
+# THING_{alias cpu vendor os}, and the associated cache entries.
+AC_DEFUN([AC_CANONICALIZE],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+ac_cv_$1=`$ac_config_sub $ac_cv_$1_alias` || exit 1
+ac_cv_$1_cpu=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`
+ac_cv_$1_vendor=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`
+ac_cv_$1_os=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`
+AC_SUBST([$1],        [$ac_cv_$1])dnl
+AC_SUBST([$1_alias],  [$ac_cv_$1_alias])dnl
+AC_SUBST([$1_cpu],    [$ac_cv_$1_cpu])dnl
+AC_SUBST([$1_vendor], [$ac_cv_$1_vendor])dnl
+AC_SUBST([$1_os],     [$ac_cv_$1_os])dnl
+])# AC_CANONICALIZE
 
 
 # _AC_CANONICAL_THING(THING)
 # --------------------------
-# Worker routine for AC_CANONICAL_{HOST TARGET BUILD}.  THING is one of
-# `host', `target', or `build'.  Canonicalize the appropriate thing,
-# generating the variables THING, THING_{alias cpu vendor os}, and the
-# associated cache entries.  We also redo the cache entries if the user
-# specifies something different from ac_cv_$THING_alias on the command line.
-define(_AC_CANONICAL_THING,
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-ifelse([$1], [host], , [AC_REQUIRE([AC_CANONICAL_HOST])])dnl
-AC_MSG_CHECKING([$1 system type])
-if test "x$ac_cv_$1" = "x" || (test "x$$1" != "xNONE" && test "x$$1" != "x$ac_cv_$1_alias"); then
-
-  # Make sure we can run config.sub.
-  if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
-    AC_MSG_ERROR(cannot run $ac_config_sub)
-  fi
+# Worker routine for AC_CANONICAL_SYSTEM.  THING is one of `host',
+# `target', or `build'.  Canonicalize the appropriate thing.  We also
+# redo the cache entries if the user specifies something different
+# from ac_cv_$THING_alias on the command line.
+define([_AC_CANONICAL_THING],
+[AC_MSG_CHECKING([$1 system type])
+if test "x$ac_cv_$1" = "x" ||
+   (test "x$$1" != "x" && test "x$$1" != "x$ac_cv_$1_alias"); then
 
 dnl Set $1_alias.
   ac_cv_$1_alias=$$1
-  case "$ac_cv_$1_alias" in
-  NONE)
-    case $nonopt in
-    NONE)
-ifelse([$1], [host],[dnl
-      if ac_cv_$1_alias=`$ac_config_guess`; then :
-      else AC_MSG_ERROR(cannot guess $1 type; you must specify one)
-      fi ;;],[dnl
-      ac_cv_$1_alias=$host_alias ;;
-])dnl
-    *) ac_cv_$1_alias=$nonopt ;;
-    esac ;;
-  esac
-
-dnl Set the other $[1] vars.  Propagate the failures of config.sub.
-  ac_cv_$1=`$ac_config_sub $ac_cv_$1_alias` || exit 1
-  ac_cv_$1_cpu=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`
-  ac_cv_$1_vendor=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`
-  ac_cv_$1_os=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`
+  test "x$ac_cv_$1_alias" = "x" &&
+    m4_case([$1],
+[build],
+  [{ ac_cv_build_alias=`$ac_config_guess` ||
+      AC_MSG_ERROR(
+           [cannot guess build (this machine) type; you must specify one]); }],
+[host],
+  [ac_cv_host_alias=$build_alias],
+[target],
+  [ac_cv_target_alias=$host_alias])
 else
   echo $ECHO_N "(cached) $ECHO_C" >&AC_FD_MSG
 fi
+AC_CANONICALIZE([$1])
+AC_MSG_RESULT($ac_cv_$1)[]dnl
+])# _AC_CANONICAL_THING
 
-AC_MSG_RESULT($ac_cv_$1)
 
-$1=$ac_cv_$1
-$1_alias=$ac_cv_$1_alias
-$1_cpu=$ac_cv_$1_cpu
-$1_vendor=$ac_cv_$1_vendor
-$1_os=$ac_cv_$1_os
-AC_SUBST($1)dnl
-AC_SUBST($1_alias)dnl
-AC_SUBST($1_cpu)dnl
-AC_SUBST($1_vendor)dnl
-AC_SUBST($1_os)dnl
-])# _AC_CANONICAL_THING
+# AC_CANONICAL_BUILD
+# ------------------
+AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
+[AC_DIVERT([HELP_CANON],
+[[
+Hosts type:
+  --build=BUILD     configure for building on BUILD [guessed]]])dnl
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  AC_MSG_ERROR([cannot run $ac_config_sub])
+
+_AC_CANONICAL_THING(build)[]dnl
+])# AC_CANONICAL_BUILD
+
+
+# AC_CANONICAL_HOST
+# -----------------
+AC_DEFUN_ONCE([AC_CANONICAL_HOST],
+[AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_DIVERT([HELP_CANON],
+[[  --host=HOST       configure for building programs running on HOST [BUILD]]])dnl
+_AC_CANONICAL_THING(host)[]dnl
+])# AC_CANONICAL_HOST
+
+
+# AC_CANONICAL_TARGET
+# -------------------
+AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
+AC_DIVERT([HELP_CANON],
+[[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
+_AC_CANONICAL_THING(target)[]dnl
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-[]dnl
+])# AC_CANONICAL_TARGET
+
 
-AC_DEFUN(AC_CANONICAL_HOST,   [_AC_CANONICAL_THING([host])])
-AC_DEFUN(AC_CANONICAL_TARGET, [_AC_CANONICAL_THING([target])])
-AC_DEFUN(AC_CANONICAL_BUILD,  [_AC_CANONICAL_THING([build])])
+AU_DEFUN(AC_CANONICAL_SYSTEM, [AC_CANONICAL_TARGET])
 
 
 # AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
index 4083089874cc71d988fb550a96ff213aeb2708fc..fc05744d28fca2980fe01782d47937e6034ed3dd 100644 (file)
@@ -47,6 +47,8 @@ testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
 # and some are already tested elsewhere.  EGREP_EXCLUDE must filter out
 # the macros we don't want to test in syntax.m4.
 #
+# - AC_CANONICALIZE
+#   Needs an argument.
 # - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
 #   Performed in the semantics tests.
 # - AC_CONFIG
@@ -70,6 +72,7 @@ testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
 # We use the fact that automake will replace all the `\\\n' with ` '.
 FILTER_MACROS = egrep -v -e \
 `echo '^AC_ARG_VAR$$\
+^AC_CANONICALIZE$$\
 ^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TYPE)S?$$\
 ^AC_CONFIG\
 ^AC_INIT\
index 14eb4830c9b3d4ebb89ae9f32e73bf50cc3fe045..0825544d54a2e53da4c9b4b8a233d4aadfec9032 100644 (file)
@@ -80,6 +80,8 @@ PERL = perl
 # and some are already tested elsewhere.  EGREP_EXCLUDE must filter out
 # the macros we don't want to test in syntax.m4.
 #
+# - AC_CANONICALIZE
+#   Needs an argument.
 # - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
 #   Performed in the semantics tests.
 # - AC_CONFIG
@@ -101,7 +103,7 @@ PERL = perl
 #
 # Multiple `-e' to egrep are not portable, so join all the patterns together.
 # We use the fact that automake will replace all the `\\\n' with ` '.
-FILTER_MACROS = egrep -v -e `echo '^AC_ARG_VAR$$ ^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TYPE)S?$$ ^AC_CONFIG ^AC_INIT ^AC_LANG ^AC_LINKER_OPTION$$ ^AC_LINK_FILES$$ ^AC_LIST_MEMBER_OF$$ ^AC_PATH_(TOOL|PROG)S?$$ ^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$ ^AC_REPLACE_FUNCS$$ ^AC_SEARCH_LIBS$$ ^AC_TRY _AC_' | tr ' ' '|'`
+FILTER_MACROS = egrep -v -e `echo '^AC_ARG_VAR$$ ^AC_CANONICALIZE$$ ^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TYPE)S?$$ ^AC_CONFIG ^AC_INIT ^AC_LANG ^AC_LINKER_OPTION$$ ^AC_LINK_FILES$$ ^AC_LIST_MEMBER_OF$$ ^AC_PATH_(TOOL|PROG)S?$$ ^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$ ^AC_REPLACE_FUNCS$$ ^AC_SEARCH_LIBS$$ ^AC_TRY _AC_' | tr ' ' '|'`
 
 
 # The files which contains macro we check for syntax.