]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Create actypes.m4.
authorAkim Demaille <akim@epita.fr>
Mon, 22 Jan 2001 09:04:58 +0000 (09:04 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 22 Jan 2001 09:04:58 +0000 (09:04 +0000)
* acgeneral.m4 (AC_CHECK_SIZEOF, _AC_CHECK_TYPE_NEW)
(AC_CHECK_TYPES, _AC_CHECK_TYPE_OLD)
(_AC_CHECK_TYPE_REPLACEMENT_TYPE_P, _AC_CHECK_TYPE_MAYBE_TYPE_P)
(AC_CHECK_TYPE, AC_CHECK_MEMBER, AC_CHECK_MEMBERS): Move into...
* actypes.m4: here.
* acgeneral.m4 (AC_TYPE_GETGROUPS, AM_TYPE_PTRDIFF_T)
(AC_TYPE_UID_T, AC_TYPE_SIZE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T)
(AC_TYPE_MODE_T, AC_INT_16_BITS, AC_LONG_64_BITS, AC_TYPE_SIGNAL)
(AC_STRUCT_TM, AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE)
(AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Move into...
* actypes.m4: here.
Adjust the test suite.

16 files changed:
ChangeLog
Makefile.am
Makefile.in
acgeneral.m4
acspecific.m4
actypes.m4 [new file with mode: 0644]
autoconf.m4
lib/autoconf/autoconf.m4
lib/autoconf/general.m4
lib/autoconf/specific.m4
lib/autoconf/types.m4 [new file with mode: 0644]
tests/Makefile.am
tests/Makefile.in
tests/acspecific.at
tests/actypes.at [new file with mode: 0644]
tests/suite.at

index 04c6d0abed9ede1587984a305e0859bff1108554..dcfc1d6fba7e603ee36c9ae8e410c2df9aa8b893 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2001-01-22  Akim Demaille  <akim@epita.fr>
+
+       Create actypes.m4.
+
+       * acgeneral.m4 (AC_CHECK_SIZEOF, _AC_CHECK_TYPE_NEW)
+       (AC_CHECK_TYPES, _AC_CHECK_TYPE_OLD)
+       (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P, _AC_CHECK_TYPE_MAYBE_TYPE_P)
+       (AC_CHECK_TYPE, AC_CHECK_MEMBER, AC_CHECK_MEMBERS): Move into...
+       * actypes.m4: here.
+       * acgeneral.m4 (AC_TYPE_GETGROUPS, AM_TYPE_PTRDIFF_T)
+       (AC_TYPE_UID_T, AC_TYPE_SIZE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T)
+       (AC_TYPE_MODE_T, AC_INT_16_BITS, AC_LONG_64_BITS, AC_TYPE_SIGNAL)
+       (AC_STRUCT_TM, AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE)
+       (AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Move into...
+       * actypes.m4: here.
+       Adjust the test suite.
+
+       
+2001-01-22  Akim Demaille  <akim@epita.fr>
+
+       * tests/atgeneral.m4 (AT_INIT): Include a default case for non
+       existing tests.
+       * tests/atspecific.m4 (AT_CONFIGURE_AC, AT_CHECK_ENV)
+       (AT_CHECK_AUTOUPDATE, AT_CHECK_AU_MACRO): New.
+       Spread their use.
+       (AT_CHECK_MACRO): Pass `-W obsolete' to autoconf.
+       * tests/semantics.at (AC_HAVE_FUNCS): Obsolete, don't check.
+       * tests/mktest.sh: Create one test file per Autoconf source
+       file instead of separating syntax/update.
+
+       
 2001-01-22  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi: Some about diff and cmp.
index 271e2c4d5daf420294972b4c39fd882b1b3d4bee..77e174d027dd2ce5af262599558abf5623a84d73 100644 (file)
@@ -42,7 +42,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
 m4sources =  m4sugar.m4 m4sh.m4  \
              autoconf.m4 \
              acgeneral.m4 acoldnames.m4 acspecific.m4 aclang.m4 acversion.m4 \
-             acfunctions.m4 acheaders.m4
+             acfunctions.m4 acheaders.m4 actypes.m4
 
 distpkgdataDATA = acfunctions acheaders acidentifiers acmakevars acprograms \
                   $(m4sources)
index 4a555add53771caec1749af54e798e95a0066857..745704d1d62f5d40a65062a536b1b11acff9ab3a 100644 (file)
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4c from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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 +11,6 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -32,8 +32,6 @@ mandir = @mandir@
 includedir = @includedir@
 oldincludedir = /usr/include
 
-DESTDIR =
-
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -46,9 +44,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 +56,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+
+@SET_MAKE@
 AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
@@ -65,6 +66,7 @@ PERL = @PERL@
 PERLSCRIPTS = @PERLSCRIPTS@
 standards_texi = @standards_texi@
 
+
 AUTOMAKE_OPTIONS = check-news 1.4 readme-alpha
 
 SUBDIRS = . m4 man doc tests
@@ -85,54 +87,81 @@ PACKAGE_NAME = @PACKAGE_NAME@
 # s/nodistpackageDATA/nodist_pkgdata_DATA/
 # and adapt dependencies once we use a more recent Automake
 
-m4sources = m4sugar.m4 m4sh.m4               autoconf.m4              acgeneral.m4 acoldnames.m4 acspecific.m4 aclang.m4 acversion.m4              acfunctions.m4 acheaders.m4
+m4sources = m4sugar.m4 m4sh.m4  \
+             autoconf.m4 \
+             acgeneral.m4 acoldnames.m4 acspecific.m4 aclang.m4 acversion.m4 \
+             acfunctions.m4 acheaders.m4 actypes.m4
 
 
-distpkgdataDATA = acfunctions acheaders acidentifiers acmakevars acprograms                   $(m4sources)
+distpkgdataDATA = acfunctions acheaders acidentifiers acmakevars acprograms \
+                  $(m4sources)
 
 
 nodistpkgdataDATA = autoconf.m4f
 
 pkgdata_DATA = $(distpkgdataDATA) $(nodistpkgdataDATA)
 
-EXTRA_DIST = ChangeLog.0 ChangeLog.1              BUGS INSTALL.txt              acversion.m4.in              autoconf.sh autoheader.sh autoreconf.sh autoupdate.sh ifnames.sh              autoscan.pl              $(distpkgdataDATA)
+EXTRA_DIST = ChangeLog.0 ChangeLog.1 \
+             BUGS INSTALL.txt \
+             acversion.m4.in \
+             autoconf.sh autoheader.sh autoreconf.sh autoupdate.sh ifnames.sh \
+             autoscan.pl \
+             $(distpkgdataDATA)
 
 
 # Files that should be removed, but which Automake does not know:
 # the frozen files and the scripts.
-CLEANFILES = autoconf.m4f              $(bin_SCRIPTS)
+CLEANFILES = autoconf.m4f \
+             $(bin_SCRIPTS)
 
 
 MAINTAINERCLEANFILES = acversion.m4 INSTALL.txt
 
-edit = sed     -e 's,@SHELL\@,$(SHELL),g'      -e 's,@PERL\@,$(PERL),g'        -e 's,@datadir\@,$(pkgdatadir),g'       -e 's,@bindir\@,$(bindir),g'    -e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g'        -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g'    -e 's,@M4\@,$(M4),g'    -e 's,@AWK\@,$(AWK),g'  -e 's,@VERSION\@,$(VERSION),g'  -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
-
+edit = sed \
+       -e 's,@SHELL\@,$(SHELL),g' \
+       -e 's,@PERL\@,$(PERL),g' \
+       -e 's,@datadir\@,$(pkgdatadir),g' \
+       -e 's,@bindir\@,$(bindir),g' \
+       -e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \
+       -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \
+       -e 's,@M4\@,$(M4),g' \
+       -e 's,@AWK\@,$(AWK),g' \
+       -e 's,@VERSION\@,$(VERSION),g' \
+       -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
+
+subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES = 
 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 \
 Makefile.in NEWS README-alpha THANKS TODO aclocal.m4 config.guess \
-config.sub configure configure.in install-sh missing mkinstalldirs
+config.sub configure configure.in install-sh ltconfig ltmain.sh 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
+DIST_SUBDIRS =  $(SUBDIRS)
 all: all-redirect
 .SUFFIXES:
 .SUFFIXES: .m4 .m4f
 $(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 +175,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 +218,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:
@@ -214,11 +243,16 @@ mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
        @set fnord $(MAKEFLAGS); amf=$$2; \
        dot_seen=no; \
-       rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
-         rev="$$subdir $$rev"; \
-         test "$$subdir" = "." && dot_seen=yes; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
        done; \
-       test "$$dot_seen" = "no" && rev=". $$rev"; \
+       rev="$$rev ."; \
        target=`echo $@ | sed s/-recursive//`; \
        for subdir in $$rev; do \
          echo "Making $$target in $$subdir"; \
@@ -237,15 +271,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 +289,19 @@ 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)
+
+GTAGS:
+       here=`CDPATH=: && cd $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $$here
 
 mostlyclean-tags:
 
@@ -272,58 +315,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 +385,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 +413,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 +429,7 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
+       -rm -f Makefile.in
        -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 mostlyclean-am:  mostlyclean-tags mostlyclean-generic
 
@@ -399,18 +453,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
 
 
 # - acversion.m4 needs to be updated only once, since it depends on
index 62409a979f8abf8e1f19e65f2f4598049b97b49f..b6789e6a6996b997665cd141bad02e77462c3192 100644 (file)
@@ -2344,57 +2344,6 @@ $ac_includes_default])])
 
 
 
-## -------------------------- ##
-## Generic structure checks.  ##
-## -------------------------- ##
-
-
-# AC_CHECK_MEMBER(AGGREGATE.MEMBER,
-#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                 [INCLUDES])
-# ---------------------------------------------------------
-# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
-# variables are not a valid argument.
-AC_DEFUN([AC_CHECK_MEMBER],
-[AS_LITERAL_IF([$1], [],
-               [AC_FATAL([$0: requires literal arguments])])dnl
-m4_if(m4_regexp([$1], [\.]), -1,
-      [AC_FATAL([$0: Did not see any dot in `$1'])])dnl
-AC_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl
-dnl Extract the aggregate name, and the member name
-AC_CACHE_CHECK([for $1], ac_Member,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
-[dnl AGGREGATE foo;
-m4_patsubst([$1], [\..*]) foo;
-dnl foo.MEMBER;
-foo.m4_patsubst([$1], [^[^.]*\.]);])],
-                [AC_VAR_SET(ac_Member, yes)],
-                [AC_VAR_SET(ac_Member, no)])])
-AS_IF([test AC_VAR_GET(ac_Member) = yes], [$2], [$3])dnl
-AC_VAR_POPDEF([ac_Member])dnl
-])# AC_CHECK_MEMBER
-
-
-# AC_CHECK_MEMBERS([AGGREGATE.MEMBER, ...],
-#                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]
-#                  [INCLUDES])
-# ---------------------------------------------------------
-# The first argument is an m4 list.
-AC_DEFUN([AC_CHECK_MEMBERS],
-[m4_foreach([AC_Member], [$1],
-  [AC_CHECK_MEMBER(AC_Member,
-         [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Member), 1,
-                            [Define if `]m4_patsubst(AC_Member,
-                                                     [^[^.]*\.])[' is
-                             member of `]m4_patsubst(AC_Member, [\..*])['.])
-$2],
-                 [$3],
-                 [$4])])])
-
-
-
-
-
 ## ----------------------- ##
 ## Checking for programs.  ##
 ## ----------------------- ##
@@ -3145,208 +3094,6 @@ rm -f conftestval[]dnl
 ])# _AC_COMPUTE_INT
 
 
-# AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES])
-# --------------------------------------------
-AC_DEFUN([AC_CHECK_SIZEOF],
-[AS_LITERAL_IF([$1], [],
-               [AC_FATAL([$0: requires literal arguments])])dnl
-AC_CHECK_TYPE([$1], [], [], [$3])
-AC_CACHE_CHECK([size of $1], AC_TR_SH([ac_cv_sizeof_$1]),
-[if test "$AC_TR_SH([ac_cv_type_$1])" = yes; then
-  _AC_COMPUTE_INT([sizeof ($1)],
-                  [AC_TR_SH([ac_cv_sizeof_$1])],
-                  [AC_INCLUDES_DEFAULT([$3])])
-else
-  AC_TR_SH([ac_cv_sizeof_$1])=0
-fi])dnl
-AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), $AC_TR_SH([ac_cv_sizeof_$1]),
-                   [The size of a `$1', as computed by sizeof.])
-])# AC_CHECK_SIZEOF
-
-
-
-## -------------------- ##
-## Checking for types.  ##
-## -------------------- ##
-
-# Up to 2.13 included, Autoconf used to provide the macro
-#
-#    AC_CHECK_TYPE(TYPE, DEFAULT)
-#
-# Since, it provides another version which fits better with the other
-# AC_CHECK_ families:
-#
-#    AC_CHECK_TYPE(TYPE,
-#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                 [INCLUDES])
-#
-# In order to provide backward compatibility, the new scheme is
-# implemented as _AC_CHECK_TYPE_NEW, the old scheme as _AC_CHECK_TYPE_OLD,
-# and AC_CHECK_TYPE branches to one or the other, depending upon its
-# arguments.
-
-
-
-# _AC_CHECK_TYPE_NEW(TYPE,
-#                   [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                   [INCLUDES])
-# ------------------------------------------------------------
-# Check whether the type TYPE is supported by the system, maybe via the
-# the provided includes.  This macro implements the former task of
-# AC_CHECK_TYPE, with one big difference though: AC_CHECK_TYPE was
-# grepping in the headers, which, BTW, led to many problems until
-# the egrep expression was correct and did not given false positives.
-# It turned out there are even portability issues with egrep...
-#
-# The most obvious way to check for a TYPE is just to compile a variable
-# definition:
-#
-#        TYPE my_var;
-#
-# Unfortunately this does not work for const qualified types in C++,
-# where you need an initializer.  So you think of
-#
-#        TYPE my_var = (TYPE) 0;
-#
-# Unfortunately, again, this is not valid for some C++ classes.
-#
-# Then you look for another scheme.  For instance you think of declaring
-# a function which uses a parameter of type TYPE:
-#
-#        int foo (TYPE param);
-#
-# but of course you soon realize this does not make it with K&R
-# compilers.  And by no ways you want to
-#
-#        int foo (param)
-#          TYPE param
-#        { ; }
-#
-# since this time it's C++ who is not happy.
-#
-# Don't even think of the return type of a function, since K&R cries
-# there too.  So you start thinking of declaring a *pointer* to this TYPE:
-#
-#        TYPE *p;
-#
-# but you know fairly well that this is legal in C for aggregates which
-# are unknown (TYPE = struct does-not-exist).
-#
-# Then you think of using sizeof to make sure the TYPE is really
-# defined:
-#
-#        sizeof (TYPE);
-#
-# But this succeeds if TYPE is a variable: you get the size of the
-# variable's type!!!
-#
-# This time you tell yourself the last two options *together* will make
-# it.  And indeed this is the solution invented by Alexandre Oliva.
-#
-# Also note that we use
-#
-#        if (sizeof (TYPE))
-#
-# to `read' sizeof (to avoid warnings), while not depending on its type
-# (not necessarily size_t etc.).  Equally, instead of defining an unused
-# variable, we just use a cast to avoid warnings from the compiler.
-# Suggested by Paul Eggert.
-m4_define([_AC_CHECK_TYPE_NEW],
-[AC_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl
-AC_CACHE_CHECK([for $1], ac_Type,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
-[if (($1 *) 0)
-  return 0;
-if (sizeof ($1))
-  return 0;])],
-                   [AC_VAR_SET(ac_Type, yes)],
-                   [AC_VAR_SET(ac_Type, no)])])
-AS_IF([test AC_VAR_GET(ac_Type) = yes], [$2], [$3])[]dnl
-AC_VAR_POPDEF([ac_Type])dnl
-])# _AC_CHECK_TYPE_NEW
-
-
-# AC_CHECK_TYPES(TYPES,
-#                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                [INCLUDES])
-# --------------------------------------------------------
-# TYPES is an m4 list.  There are no ambiguities here, we mean the newer
-# AC_CHECK_TYPE.
-AC_DEFUN([AC_CHECK_TYPES],
-[m4_foreach([AC_Type], [$1],
-  [_AC_CHECK_TYPE_NEW(AC_Type,
-                      [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Type), 1,
-                                          [Define if the system has the type
-                                          `]AC_Type['.])
-$2],
-                      [$3],
-                      [$4])])])
-
-
-# _AC_CHECK_TYPE_OLD(TYPE, DEFAULT)
-# ---------------------------------
-# FIXME: This is an extremely badly chosen name, since this
-# macro actually performs an AC_REPLACE_TYPE.  Some day we
-# have to clean this up.
-m4_define([_AC_CHECK_TYPE_OLD],
-[_AC_CHECK_TYPE_NEW([$1],,
-   [AC_DEFINE_UNQUOTED([$1], [$2],
-                       [Define to `$2' if <sys/types.h> does not define.])])dnl
-])# _AC_CHECK_TYPE_OLD
-
-
-# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P(STRING)
-# -----------------------------------------
-# Return `1' if STRING seems to be a builtin C/C++ type, i.e., if it
-# starts with `_Bool', `bool', `char', `double', `float', `int',
-# `long', `short', `signed', or `unsigned' followed by characters
-# that are defining types.
-# Because many people have used `off_t' and `size_t' too, they are added
-# for better common-useward backward compatibility.
-m4_define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
-[m4_if(m4_regexp([$1],
-                 [^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|size_t\|off_t\)\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
-       0, 1, 0)dnl
-])# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P
-
-
-# _AC_CHECK_TYPE_MAYBE_TYPE_P(STRING)
-# -----------------------------------
-# Return `1' if STRING looks like a C/C++ type.
-m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
-[m4_if(m4_regexp([$1], [^[_a-zA-Z0-9 ]+\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
-       0, 1, 0)dnl
-])# _AC_CHECK_TYPE_MAYBE_TYPE_P
-
-
-# AC_CHECK_TYPE(TYPE, DEFAULT)
-#  or
-# AC_CHECK_TYPE(TYPE,
-#              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#              [INCLUDES])
-# -------------------------------------------------------
-#
-# Dispatch respectively to _AC_CHECK_TYPE_OLD or _AC_CHECK_TYPE_NEW.
-# 1. More than two arguments         => NEW
-# 2. $2 seems to be replacement type => OLD
-#    See _AC_CHECK_TYPE_REPLACEMENT_TYPE_P for `replacement type'.
-# 3. $2 seems to be a type           => NEW plus a warning
-# 4. default                         => NEW
-AC_DEFUN([AC_CHECK_TYPE],
-[m4_if($#, 3,
-         [_AC_CHECK_TYPE_NEW($@)],
-       $#, 4,
-         [_AC_CHECK_TYPE_NEW($@)],
-       _AC_CHECK_TYPE_REPLACEMENT_TYPE_P([$2]), 1,
-         [_AC_CHECK_TYPE_OLD($@)],
-       _AC_CHECK_TYPE_MAYBE_TYPE_P([$2]), 1,
-         [AC_DIAGNOSE([syntax],
-                    [$0: assuming `$2' is not a type])_AC_CHECK_TYPE_NEW($@)],
-       [_AC_CHECK_TYPE_NEW($@)])[]dnl
-])# AC_CHECK_TYPE
-
-
-
 ## ----------------------- ##
 ## Creating output files.  ##
 ## ----------------------- ##
index 45ef46e59264d1ab4af0cf007bc96a6db1100841..f223ae59e77ee95c2d691328b175e299c5cf726b 100644 (file)
@@ -326,258 +326,6 @@ fi
 
 
 
-## --------------------- ##
-## Checks for typedefs.  ##
-## --------------------- ##
-
-
-# AC_TYPE_GETGROUPS
-# -----------------
-AC_DEFUN([AC_TYPE_GETGROUPS],
-[AC_REQUIRE([AC_TYPE_UID_T])dnl
-AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
-[AC_RUN_IFELSE([AC_LANG_SOURCE(
-[/* Thanks to Mike Rendell for this test.  */
-#include <sys/types.h>
-#define NGID 256
-#undef MAX
-#define MAX(x, y) ((x) > (y) ? (x) : (y))
-int
-main ()
-{
-  gid_t gidset[NGID];
-  int i, n;
-  union { gid_t gval; long lval; }  val;
-
-  val.lval = -1;
-  for (i = 0; i < NGID; i++)
-    gidset[i] = val.gval;
-  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
-                 gidset);
-  /* Exit non-zero if getgroups seems to require an array of ints.  This
-     happens when gid_t is short but getgroups modifies an array of ints.  */
-  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
-}])],
-               [ac_cv_type_getgroups=gid_t],
-               [ac_cv_type_getgroups=int],
-               [ac_cv_type_getgroups=cross])
-if test $ac_cv_type_getgroups = cross; then
-  dnl When we can't run the test program (we are cross compiling), presume
-  dnl that <unistd.h> has either an accurate prototype for getgroups or none.
-  dnl Old systems without prototypes probably use int.
-  AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h,
-                 ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)
-fi])
-AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups,
-                   [Define to the type of elements in the array set by
-                    `getgroups'. Usually this is either `int' or `gid_t'.])
-])# AC_TYPE_GETGROUPS
-
-
-# AU::AM_TYPE_PTRDIFF_T
-AU_DEFUN([AM_TYPE_PTRDIFF_T],
-[AC_CHECK_TYPES(ptrdiff_t)])
-
-
-# AC_TYPE_UID_T
-# -------------
-# FIXME: Rewrite using AC_CHECK_TYPE.
-AC_DEFUN([AC_TYPE_UID_T],
-[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
-[AC_EGREP_HEADER(uid_t, sys/types.h,
-  ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
-if test $ac_cv_type_uid_t = no; then
-  AC_DEFINE(uid_t, int, [Define to `int' if <sys/types.h> doesn't define.])
-  AC_DEFINE(gid_t, int, [Define to `int' if <sys/types.h> doesn't define.])
-fi
-])
-
-
-AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned)])
-AC_DEFUN([AC_TYPE_PID_T],  [AC_CHECK_TYPE(pid_t,  int)])
-AC_DEFUN([AC_TYPE_OFF_T],  [AC_CHECK_TYPE(off_t,  long)])
-AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
-
-
-# AU::AC_INT_16_BITS
-# ------------------
-# What a great name :)
-AU_DEFUN([AC_INT_16_BITS],
-[AC_CHECK_SIZEOF([int])
-AC_DIAGNOSE([obsolete], [$0:
-        your code should no longer depend upon `INT_16_BITS', but upon
-        `SIZEOF_INT'.  Remove this warning and the `AC_DEFINE' when you
-        adjust the code.])dnl
-test $ac_cv_sizeof_int = 2 &&
-  AC_DEFINE(INT_16_BITS, 1,
-            [Define if `sizeof (int)' = 2.  Obsolete, use `SIZEOF_INT'.])
-])
-
-
-# AU::AC_LONG_64_BITS
-# -------------------
-AU_DEFUN([AC_LONG_64_BITS],
-[AC_CHECK_SIZEOF([long int])
-AC_DIAGNOSE([obsolete], [$0:
-        your code should no longer depend upon `LONG_64_BITS', but upon
-        `SIZEOF_LONG_INT'.  Remove this warning and the `AC_DEFINE' when
-        you adjust the code.])dnl
-test $ac_cv_sizeof_long_int = 8 &&
-  AC_DEFINE(LONG_64_BITS, 1,
-            [Define if `sizeof (long int)' = 8.  Obsolete, use
-             `SIZEOF_LONG_INT'.])
-])
-
-
-# AC_TYPE_SIGNAL
-# --------------
-# Note that identifiers starting with SIG are reserved by ANSI C.
-AC_DEFUN([AC_TYPE_SIGNAL],
-[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
-[AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-],
-                 [int i;])],
-                   [ac_cv_type_signal=void],
-                   [ac_cv_type_signal=int])])
-AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal,
-                   [Define as the return type of signal handlers
-                    (`int' or `void').])
-])
-
-
-
-
-
-## ------------------------------ ##
-## Checks for structure members.  ##
-## ------------------------------ ##
-
-
-# AC_STRUCT_TM
-# ------------
-# FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM.
-# Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME?
-AC_DEFUN([AC_STRUCT_TM],
-[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
-  ac_cv_struct_tm,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
-#include <time.h>
-],
-                                    [struct tm *tp; tp->tm_sec;])],
-                   [ac_cv_struct_tm=time.h],
-                   [ac_cv_struct_tm=sys/time.h])])
-if test $ac_cv_struct_tm = sys/time.h; then
-  AC_DEFINE(TM_IN_SYS_TIME, 1,
-            [Define if your <sys/time.h> declares `struct tm'.])
-fi
-])# AC_STRUCT_TM
-
-
-# AC_STRUCT_TIMEZONE
-# ------------------
-# Figure out how to get the current timezone.  If `struct tm' has a
-# `tm_zone' member, define `HAVE_TM_ZONE'.  Otherwise, if the
-# external array `tzname' is found, define `HAVE_TZNAME'.
-AC_DEFUN([AC_STRUCT_TIMEZONE],
-[AC_REQUIRE([AC_STRUCT_TM])dnl
-AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
-#include <$ac_cv_struct_tm>
-])
-if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
-  AC_DEFINE(HAVE_TM_ZONE, 1,
-            [Define if your `struct tm' has `tm_zone'. Deprecated, use
-             `HAVE_STRUCT_TM_TM_ZONE' instead.])
-else
-  AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
-[AC_TRY_LINK(
-[#include <time.h>
-#ifndef tzname /* For SGI.  */
-extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
-#endif
-],
-[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
-  if test $ac_cv_var_tzname = yes; then
-    AC_DEFINE(HAVE_TZNAME, 1,
-              [Define if you don't have `tm_zone' but do have the external
-               array `tzname'.])
-  fi
-fi
-])# AC_STRUCT_TIMEZONE
-
-
-
-# FIXME: The following three macros should no longer be supported in the
-# future.  They made sense when there was no means to directly check for
-# members of aggregates.
-
-
-# AC_STRUCT_ST_BLKSIZE
-# --------------------
-AU_DEFUN([AC_STRUCT_ST_BLKSIZE],
-[AC_DIAGNOSE([obsolete], [$0:
-        your code should no longer depend upon `HAVE_ST_BLKSIZE', but
-        `HAVE_STRUCT_STAT_ST_BLKSIZE'.  Remove this warning and
-        the `AC_DEFINE' when you adjust the code.])
-AC_CHECK_MEMBERS([struct stat.st_blksize],
-                 [AC_DEFINE(HAVE_ST_BLKSIZE, 1,
-                            [Define if your `struct stat' has
-                             `st_blksize'.  Deprecated, use
-                             `HAVE_STRUCT_STAT_ST_BLKSIZE' instead.])])
-])# AC_STRUCT_ST_BLKSIZE
-
-
-# AC_STRUCT_ST_BLOCKS
-# -------------------
-# If `struct stat' contains an `st_blocks' member, define
-# HAVE_STRUCT_STAT_ST_BLOCKS.  Otherwise, add `fileblocks.o' to the
-# output variable LIBOBJS.  We still define HAVE_ST_BLOCKS for backward
-# compatibility.  In the future, we will activate specializations for
-# this macro, so don't obsolete it right now.
-#
-# AC_OBSOLETE([$0], [; replace it with
-#   AC_CHECK_MEMBERS([struct stat.st_blocks],
-#                     [AC_LIBOBJ([fileblocks])])
-# Please note that it will define `HAVE_STRUCT_STAT_ST_BLOCKS',
-# and not `HAVE_ST_BLOCKS'.])dnl
-#
-AC_DEFUN([AC_STRUCT_ST_BLOCKS],
-[AC_CHECK_MEMBERS([struct stat.st_blocks],
-                  [AC_DEFINE(HAVE_ST_BLOCKS, 1,
-                             [Define if your `struct stat' has
-                              `st_blocks'.  Deprecated, use
-                              `HAVE_STRUCT_STAT_ST_BLOCKS' instead.])],
-                  [AC_LIBOBJ([fileblocks])])
-])# AC_STRUCT_ST_BLOCKS
-
-
-# AC_STRUCT_ST_RDEV
-# -----------------
-AU_DEFUN([AC_STRUCT_ST_RDEV],
-[AC_DIAGNOSE([obsolete], [$0:
-        your code should no longer depend upon `HAVE_ST_RDEV', but
-        `HAVE_STRUCT_STAT_ST_RDEV'.  Remove this warning and
-        the `AC_DEFINE' when you adjust the code.])
-AC_CHECK_MEMBERS([struct stat.st_rdev],
-                 [AC_DEFINE(HAVE_ST_RDEV, 1,
-                            [Define if your `struct stat' has `st_rdev'.
-                             Deprecated, use `HAVE_STRUCT_STAT_ST_RDEV'
-                             instead.])])
-])# AC_STRUCT_ST_RDEV
-
-
-
-
-
 ## -------------------------------------- ##
 ## Checks for operating system services.  ##
 ## -------------------------------------- ##
diff --git a/actypes.m4 b/actypes.m4
new file mode 100644 (file)
index 0000000..24bf2c9
--- /dev/null
@@ -0,0 +1,562 @@
+# This file is part of Autoconf.                       -*- Autoconf -*-
+# Type related macros: existence, sizeof, and structure members.
+# Copyright 2000
+# Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf.  You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them.  The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf.  We call these the "data" portions.  The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case.  We call these
+# comments and executable code the "non-data" portions.  Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation.  When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with.  (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.)  If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+#
+# Written by David MacKenzie, with help from
+# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+
+
+## ---------------- ##
+## Type existence.  ##
+## ---------------- ##
+
+# ---------------- #
+# General checks.  #
+# ---------------- #
+
+# Up to 2.13 included, Autoconf used to provide the macro
+#
+#    AC_CHECK_TYPE(TYPE, DEFAULT)
+#
+# Since, it provides another version which fits better with the other
+# AC_CHECK_ families:
+#
+#    AC_CHECK_TYPE(TYPE,
+#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                 [INCLUDES])
+#
+# In order to provide backward compatibility, the new scheme is
+# implemented as _AC_CHECK_TYPE_NEW, the old scheme as _AC_CHECK_TYPE_OLD,
+# and AC_CHECK_TYPE branches to one or the other, depending upon its
+# arguments.
+
+
+
+# _AC_CHECK_TYPE_NEW(TYPE,
+#                   [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                   [INCLUDES])
+# ------------------------------------------------------------
+# Check whether the type TYPE is supported by the system, maybe via the
+# the provided includes.  This macro implements the former task of
+# AC_CHECK_TYPE, with one big difference though: AC_CHECK_TYPE was
+# grepping in the headers, which, BTW, led to many problems until
+# the egrep expression was correct and did not given false positives.
+# It turned out there are even portability issues with egrep...
+#
+# The most obvious way to check for a TYPE is just to compile a variable
+# definition:
+#
+#        TYPE my_var;
+#
+# Unfortunately this does not work for const qualified types in C++,
+# where you need an initializer.  So you think of
+#
+#        TYPE my_var = (TYPE) 0;
+#
+# Unfortunately, again, this is not valid for some C++ classes.
+#
+# Then you look for another scheme.  For instance you think of declaring
+# a function which uses a parameter of type TYPE:
+#
+#        int foo (TYPE param);
+#
+# but of course you soon realize this does not make it with K&R
+# compilers.  And by no ways you want to
+#
+#        int foo (param)
+#          TYPE param
+#        { ; }
+#
+# since this time it's C++ who is not happy.
+#
+# Don't even think of the return type of a function, since K&R cries
+# there too.  So you start thinking of declaring a *pointer* to this TYPE:
+#
+#        TYPE *p;
+#
+# but you know fairly well that this is legal in C for aggregates which
+# are unknown (TYPE = struct does-not-exist).
+#
+# Then you think of using sizeof to make sure the TYPE is really
+# defined:
+#
+#        sizeof (TYPE);
+#
+# But this succeeds if TYPE is a variable: you get the size of the
+# variable's type!!!
+#
+# This time you tell yourself the last two options *together* will make
+# it.  And indeed this is the solution invented by Alexandre Oliva.
+#
+# Also note that we use
+#
+#        if (sizeof (TYPE))
+#
+# to `read' sizeof (to avoid warnings), while not depending on its type
+# (not necessarily size_t etc.).  Equally, instead of defining an unused
+# variable, we just use a cast to avoid warnings from the compiler.
+# Suggested by Paul Eggert.
+m4_define([_AC_CHECK_TYPE_NEW],
+[AC_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl
+AC_CACHE_CHECK([for $1], ac_Type,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
+[if (($1 *) 0)
+  return 0;
+if (sizeof ($1))
+  return 0;])],
+                   [AC_VAR_SET(ac_Type, yes)],
+                   [AC_VAR_SET(ac_Type, no)])])
+AS_IF([test AC_VAR_GET(ac_Type) = yes], [$2], [$3])[]dnl
+AC_VAR_POPDEF([ac_Type])dnl
+])# _AC_CHECK_TYPE_NEW
+
+
+# AC_CHECK_TYPES(TYPES,
+#                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                [INCLUDES])
+# --------------------------------------------------------
+# TYPES is an m4 list.  There are no ambiguities here, we mean the newer
+# AC_CHECK_TYPE.
+AC_DEFUN([AC_CHECK_TYPES],
+[m4_foreach([AC_Type], [$1],
+  [_AC_CHECK_TYPE_NEW(AC_Type,
+                      [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Type), 1,
+                                          [Define if the system has the type
+                                          `]AC_Type['.])
+$2],
+                      [$3],
+                      [$4])])])
+
+
+# _AC_CHECK_TYPE_OLD(TYPE, DEFAULT)
+# ---------------------------------
+# FIXME: This is an extremely badly chosen name, since this
+# macro actually performs an AC_REPLACE_TYPE.  Some day we
+# have to clean this up.
+m4_define([_AC_CHECK_TYPE_OLD],
+[_AC_CHECK_TYPE_NEW([$1],,
+   [AC_DEFINE_UNQUOTED([$1], [$2],
+                       [Define to `$2' if <sys/types.h> does not define.])])dnl
+])# _AC_CHECK_TYPE_OLD
+
+
+# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P(STRING)
+# -----------------------------------------
+# Return `1' if STRING seems to be a builtin C/C++ type, i.e., if it
+# starts with `_Bool', `bool', `char', `double', `float', `int',
+# `long', `short', `signed', or `unsigned' followed by characters
+# that are defining types.
+# Because many people have used `off_t' and `size_t' too, they are added
+# for better common-useward backward compatibility.
+m4_define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
+[m4_if(m4_regexp([$1],
+                 [^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|size_t\|off_t\)\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
+       0, 1, 0)dnl
+])# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P
+
+
+# _AC_CHECK_TYPE_MAYBE_TYPE_P(STRING)
+# -----------------------------------
+# Return `1' if STRING looks like a C/C++ type.
+m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
+[m4_if(m4_regexp([$1], [^[_a-zA-Z0-9 ]+\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
+       0, 1, 0)dnl
+])# _AC_CHECK_TYPE_MAYBE_TYPE_P
+
+
+# AC_CHECK_TYPE(TYPE, DEFAULT)
+#  or
+# AC_CHECK_TYPE(TYPE,
+#              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#              [INCLUDES])
+# -------------------------------------------------------
+#
+# Dispatch respectively to _AC_CHECK_TYPE_OLD or _AC_CHECK_TYPE_NEW.
+# 1. More than two arguments         => NEW
+# 2. $2 seems to be replacement type => OLD
+#    See _AC_CHECK_TYPE_REPLACEMENT_TYPE_P for `replacement type'.
+# 3. $2 seems to be a type           => NEW plus a warning
+# 4. default                         => NEW
+AC_DEFUN([AC_CHECK_TYPE],
+[m4_if($#, 3,
+         [_AC_CHECK_TYPE_NEW($@)],
+       $#, 4,
+         [_AC_CHECK_TYPE_NEW($@)],
+       _AC_CHECK_TYPE_REPLACEMENT_TYPE_P([$2]), 1,
+         [_AC_CHECK_TYPE_OLD($@)],
+       _AC_CHECK_TYPE_MAYBE_TYPE_P([$2]), 1,
+         [AC_DIAGNOSE([syntax],
+                    [$0: assuming `$2' is not a type])_AC_CHECK_TYPE_NEW($@)],
+       [_AC_CHECK_TYPE_NEW($@)])[]dnl
+])# AC_CHECK_TYPE
+
+
+
+# ----------------- #
+# Specific checks.  #
+# ----------------- #
+
+# AC_TYPE_GETGROUPS
+# -----------------
+AC_DEFUN([AC_TYPE_GETGROUPS],
+[AC_REQUIRE([AC_TYPE_UID_T])dnl
+AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
+[AC_RUN_IFELSE([AC_LANG_SOURCE(
+[/* Thanks to Mike Rendell for this test.  */
+#include <sys/types.h>
+#define NGID 256
+#undef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+int
+main ()
+{
+  gid_t gidset[NGID];
+  int i, n;
+  union { gid_t gval; long lval; }  val;
+
+  val.lval = -1;
+  for (i = 0; i < NGID; i++)
+    gidset[i] = val.gval;
+  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
+                 gidset);
+  /* Exit non-zero if getgroups seems to require an array of ints.  This
+     happens when gid_t is short but getgroups modifies an array of ints.  */
+  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
+}])],
+               [ac_cv_type_getgroups=gid_t],
+               [ac_cv_type_getgroups=int],
+               [ac_cv_type_getgroups=cross])
+if test $ac_cv_type_getgroups = cross; then
+  dnl When we can't run the test program (we are cross compiling), presume
+  dnl that <unistd.h> has either an accurate prototype for getgroups or none.
+  dnl Old systems without prototypes probably use int.
+  AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h,
+                 ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)
+fi])
+AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups,
+                   [Define to the type of elements in the array set by
+                    `getgroups'. Usually this is either `int' or `gid_t'.])
+])# AC_TYPE_GETGROUPS
+
+
+# AU::AM_TYPE_PTRDIFF_T
+AU_DEFUN([AM_TYPE_PTRDIFF_T],
+[AC_CHECK_TYPES(ptrdiff_t)])
+
+
+# AC_TYPE_UID_T
+# -------------
+# FIXME: Rewrite using AC_CHECK_TYPE.
+AC_DEFUN([AC_TYPE_UID_T],
+[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
+[AC_EGREP_HEADER(uid_t, sys/types.h,
+  ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
+if test $ac_cv_type_uid_t = no; then
+  AC_DEFINE(uid_t, int, [Define to `int' if <sys/types.h> doesn't define.])
+  AC_DEFINE(gid_t, int, [Define to `int' if <sys/types.h> doesn't define.])
+fi
+])
+
+
+AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned)])
+AC_DEFUN([AC_TYPE_PID_T],  [AC_CHECK_TYPE(pid_t,  int)])
+AC_DEFUN([AC_TYPE_OFF_T],  [AC_CHECK_TYPE(off_t,  long)])
+AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
+
+
+# AC_TYPE_SIGNAL
+# --------------
+# Note that identifiers starting with SIG are reserved by ANSI C.
+AC_DEFUN([AC_TYPE_SIGNAL],
+[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
+[AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+],
+                 [int i;])],
+                   [ac_cv_type_signal=void],
+                   [ac_cv_type_signal=int])])
+AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal,
+                   [Define as the return type of signal handlers
+                    (`int' or `void').])
+])
+
+
+## ------------------------ ##
+## Checking size of types.  ##
+## ------------------------ ##
+
+# ---------------- #
+# Generic checks.  #
+# ---------------- #
+
+
+# AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES])
+# --------------------------------------------
+AC_DEFUN([AC_CHECK_SIZEOF],
+[AS_LITERAL_IF([$1], [],
+               [AC_FATAL([$0: requires literal arguments])])dnl
+AC_CHECK_TYPE([$1], [], [], [$3])
+AC_CACHE_CHECK([size of $1], AC_TR_SH([ac_cv_sizeof_$1]),
+[if test "$AC_TR_SH([ac_cv_type_$1])" = yes; then
+  _AC_COMPUTE_INT([sizeof ($1)],
+                  [AC_TR_SH([ac_cv_sizeof_$1])],
+                  [AC_INCLUDES_DEFAULT([$3])])
+else
+  AC_TR_SH([ac_cv_sizeof_$1])=0
+fi])dnl
+AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), $AC_TR_SH([ac_cv_sizeof_$1]),
+                   [The size of a `$1', as computed by sizeof.])
+])# AC_CHECK_SIZEOF
+
+
+
+# ---------------- #
+# Generic checks.  #
+# ---------------- #
+
+# AU::AC_INT_16_BITS
+# ------------------
+# What a great name :)
+AU_DEFUN([AC_INT_16_BITS],
+[AC_CHECK_SIZEOF([int])
+AC_DIAGNOSE([obsolete], [$0:
+        your code should no longer depend upon `INT_16_BITS', but upon
+        `SIZEOF_INT'.  Remove this warning and the `AC_DEFINE' when you
+        adjust the code.])dnl
+test $ac_cv_sizeof_int = 2 &&
+  AC_DEFINE(INT_16_BITS, 1,
+            [Define if `sizeof (int)' = 2.  Obsolete, use `SIZEOF_INT'.])
+])
+
+
+# AU::AC_LONG_64_BITS
+# -------------------
+AU_DEFUN([AC_LONG_64_BITS],
+[AC_CHECK_SIZEOF([long int])
+AC_DIAGNOSE([obsolete], [$0:
+        your code should no longer depend upon `LONG_64_BITS', but upon
+        `SIZEOF_LONG_INT'.  Remove this warning and the `AC_DEFINE' when
+        you adjust the code.])dnl
+test $ac_cv_sizeof_long_int = 8 &&
+  AC_DEFINE(LONG_64_BITS, 1,
+            [Define if `sizeof (long int)' = 8.  Obsolete, use
+             `SIZEOF_LONG_INT'.])
+])
+
+
+
+## -------------------------- ##
+## Generic structure checks.  ##
+## -------------------------- ##
+
+
+# ---------------- #
+# Generic checks.  #
+# ---------------- #
+
+# AC_CHECK_MEMBER(AGGREGATE.MEMBER,
+#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                 [INCLUDES])
+# ---------------------------------------------------------
+# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
+# variables are not a valid argument.
+AC_DEFUN([AC_CHECK_MEMBER],
+[AS_LITERAL_IF([$1], [],
+               [AC_FATAL([$0: requires literal arguments])])dnl
+m4_if(m4_regexp([$1], [\.]), -1,
+      [AC_FATAL([$0: Did not see any dot in `$1'])])dnl
+AC_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl
+dnl Extract the aggregate name, and the member name
+AC_CACHE_CHECK([for $1], ac_Member,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
+[dnl AGGREGATE foo;
+m4_patsubst([$1], [\..*]) foo;
+dnl foo.MEMBER;
+foo.m4_patsubst([$1], [^[^.]*\.]);])],
+                [AC_VAR_SET(ac_Member, yes)],
+                [AC_VAR_SET(ac_Member, no)])])
+AS_IF([test AC_VAR_GET(ac_Member) = yes], [$2], [$3])dnl
+AC_VAR_POPDEF([ac_Member])dnl
+])# AC_CHECK_MEMBER
+
+
+# AC_CHECK_MEMBERS([AGGREGATE.MEMBER, ...],
+#                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]
+#                  [INCLUDES])
+# ---------------------------------------------------------
+# The first argument is an m4 list.
+AC_DEFUN([AC_CHECK_MEMBERS],
+[m4_foreach([AC_Member], [$1],
+  [AC_CHECK_MEMBER(AC_Member,
+         [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Member), 1,
+                            [Define if `]m4_patsubst(AC_Member,
+                                                     [^[^.]*\.])[' is
+                             member of `]m4_patsubst(AC_Member, [\..*])['.])
+$2],
+                 [$3],
+                 [$4])])])
+
+
+# ----------------- #
+# Specific checks.  #
+# ----------------- #
+
+# Alphabetic order, please.
+
+# AC_STRUCT_ST_BLKSIZE
+# --------------------
+AU_DEFUN([AC_STRUCT_ST_BLKSIZE],
+[AC_DIAGNOSE([obsolete], [$0:
+        your code should no longer depend upon `HAVE_ST_BLKSIZE', but
+        `HAVE_STRUCT_STAT_ST_BLKSIZE'.  Remove this warning and
+        the `AC_DEFINE' when you adjust the code.])
+AC_CHECK_MEMBERS([struct stat.st_blksize],
+                 [AC_DEFINE(HAVE_ST_BLKSIZE, 1,
+                            [Define if your `struct stat' has
+                             `st_blksize'.  Deprecated, use
+                             `HAVE_STRUCT_STAT_ST_BLKSIZE' instead.])])
+])# AC_STRUCT_ST_BLKSIZE
+
+
+# AC_STRUCT_ST_BLOCKS
+# -------------------
+# If `struct stat' contains an `st_blocks' member, define
+# HAVE_STRUCT_STAT_ST_BLOCKS.  Otherwise, add `fileblocks.o' to the
+# output variable LIBOBJS.  We still define HAVE_ST_BLOCKS for backward
+# compatibility.  In the future, we will activate specializations for
+# this macro, so don't obsolete it right now.
+#
+# AC_OBSOLETE([$0], [; replace it with
+#   AC_CHECK_MEMBERS([struct stat.st_blocks],
+#                     [AC_LIBOBJ([fileblocks])])
+# Please note that it will define `HAVE_STRUCT_STAT_ST_BLOCKS',
+# and not `HAVE_ST_BLOCKS'.])dnl
+#
+AC_DEFUN([AC_STRUCT_ST_BLOCKS],
+[AC_CHECK_MEMBERS([struct stat.st_blocks],
+                  [AC_DEFINE(HAVE_ST_BLOCKS, 1,
+                             [Define if your `struct stat' has
+                              `st_blocks'.  Deprecated, use
+                              `HAVE_STRUCT_STAT_ST_BLOCKS' instead.])],
+                  [AC_LIBOBJ([fileblocks])])
+])# AC_STRUCT_ST_BLOCKS
+
+
+# AC_STRUCT_ST_RDEV
+# -----------------
+AU_DEFUN([AC_STRUCT_ST_RDEV],
+[AC_DIAGNOSE([obsolete], [$0:
+        your code should no longer depend upon `HAVE_ST_RDEV', but
+        `HAVE_STRUCT_STAT_ST_RDEV'.  Remove this warning and
+        the `AC_DEFINE' when you adjust the code.])
+AC_CHECK_MEMBERS([struct stat.st_rdev],
+                 [AC_DEFINE(HAVE_ST_RDEV, 1,
+                            [Define if your `struct stat' has `st_rdev'.
+                             Deprecated, use `HAVE_STRUCT_STAT_ST_RDEV'
+                             instead.])])
+])# AC_STRUCT_ST_RDEV
+
+
+# AC_STRUCT_TM
+# ------------
+# FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM.
+# Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME?
+AC_DEFUN([AC_STRUCT_TM],
+[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
+  ac_cv_struct_tm,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
+#include <time.h>
+],
+                                    [struct tm *tp; tp->tm_sec;])],
+                   [ac_cv_struct_tm=time.h],
+                   [ac_cv_struct_tm=sys/time.h])])
+if test $ac_cv_struct_tm = sys/time.h; then
+  AC_DEFINE(TM_IN_SYS_TIME, 1,
+            [Define if your <sys/time.h> declares `struct tm'.])
+fi
+])# AC_STRUCT_TM
+
+
+# AC_STRUCT_TIMEZONE
+# ------------------
+# Figure out how to get the current timezone.  If `struct tm' has a
+# `tm_zone' member, define `HAVE_TM_ZONE'.  Otherwise, if the
+# external array `tzname' is found, define `HAVE_TZNAME'.
+AC_DEFUN([AC_STRUCT_TIMEZONE],
+[AC_REQUIRE([AC_STRUCT_TM])dnl
+AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+])
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+  AC_DEFINE(HAVE_TM_ZONE, 1,
+            [Define if your `struct tm' has `tm_zone'. Deprecated, use
+             `HAVE_STRUCT_TM_TM_ZONE' instead.])
+else
+  AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
+[AC_TRY_LINK(
+[#include <time.h>
+#ifndef tzname /* For SGI.  */
+extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
+#endif
+],
+[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
+  if test $ac_cv_var_tzname = yes; then
+    AC_DEFINE(HAVE_TZNAME, 1,
+              [Define if you don't have `tm_zone' but do have the external
+               array `tzname'.])
+  fi
+fi
+])# AC_STRUCT_TIMEZONE
index 06ff9209f62df26fa650d3aa7b5d55c5238db180..00ba953a4be14201a58e546c9643ef8fcef4ce85 100644 (file)
@@ -29,6 +29,7 @@ m4_include([acgeneral.m4])
 m4_include([aclang.m4])
 m4_include([acfunctions.m4])
 m4_include([acheaders.m4])
+m4_include([actypes.m4])
 m4_include([acspecific.m4])
 m4_include([acoldnames.m4])
 
index 06ff9209f62df26fa650d3aa7b5d55c5238db180..00ba953a4be14201a58e546c9643ef8fcef4ce85 100644 (file)
@@ -29,6 +29,7 @@ m4_include([acgeneral.m4])
 m4_include([aclang.m4])
 m4_include([acfunctions.m4])
 m4_include([acheaders.m4])
+m4_include([actypes.m4])
 m4_include([acspecific.m4])
 m4_include([acoldnames.m4])
 
index 62409a979f8abf8e1f19e65f2f4598049b97b49f..b6789e6a6996b997665cd141bad02e77462c3192 100644 (file)
@@ -2344,57 +2344,6 @@ $ac_includes_default])])
 
 
 
-## -------------------------- ##
-## Generic structure checks.  ##
-## -------------------------- ##
-
-
-# AC_CHECK_MEMBER(AGGREGATE.MEMBER,
-#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                 [INCLUDES])
-# ---------------------------------------------------------
-# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
-# variables are not a valid argument.
-AC_DEFUN([AC_CHECK_MEMBER],
-[AS_LITERAL_IF([$1], [],
-               [AC_FATAL([$0: requires literal arguments])])dnl
-m4_if(m4_regexp([$1], [\.]), -1,
-      [AC_FATAL([$0: Did not see any dot in `$1'])])dnl
-AC_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl
-dnl Extract the aggregate name, and the member name
-AC_CACHE_CHECK([for $1], ac_Member,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
-[dnl AGGREGATE foo;
-m4_patsubst([$1], [\..*]) foo;
-dnl foo.MEMBER;
-foo.m4_patsubst([$1], [^[^.]*\.]);])],
-                [AC_VAR_SET(ac_Member, yes)],
-                [AC_VAR_SET(ac_Member, no)])])
-AS_IF([test AC_VAR_GET(ac_Member) = yes], [$2], [$3])dnl
-AC_VAR_POPDEF([ac_Member])dnl
-])# AC_CHECK_MEMBER
-
-
-# AC_CHECK_MEMBERS([AGGREGATE.MEMBER, ...],
-#                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]
-#                  [INCLUDES])
-# ---------------------------------------------------------
-# The first argument is an m4 list.
-AC_DEFUN([AC_CHECK_MEMBERS],
-[m4_foreach([AC_Member], [$1],
-  [AC_CHECK_MEMBER(AC_Member,
-         [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Member), 1,
-                            [Define if `]m4_patsubst(AC_Member,
-                                                     [^[^.]*\.])[' is
-                             member of `]m4_patsubst(AC_Member, [\..*])['.])
-$2],
-                 [$3],
-                 [$4])])])
-
-
-
-
-
 ## ----------------------- ##
 ## Checking for programs.  ##
 ## ----------------------- ##
@@ -3145,208 +3094,6 @@ rm -f conftestval[]dnl
 ])# _AC_COMPUTE_INT
 
 
-# AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES])
-# --------------------------------------------
-AC_DEFUN([AC_CHECK_SIZEOF],
-[AS_LITERAL_IF([$1], [],
-               [AC_FATAL([$0: requires literal arguments])])dnl
-AC_CHECK_TYPE([$1], [], [], [$3])
-AC_CACHE_CHECK([size of $1], AC_TR_SH([ac_cv_sizeof_$1]),
-[if test "$AC_TR_SH([ac_cv_type_$1])" = yes; then
-  _AC_COMPUTE_INT([sizeof ($1)],
-                  [AC_TR_SH([ac_cv_sizeof_$1])],
-                  [AC_INCLUDES_DEFAULT([$3])])
-else
-  AC_TR_SH([ac_cv_sizeof_$1])=0
-fi])dnl
-AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), $AC_TR_SH([ac_cv_sizeof_$1]),
-                   [The size of a `$1', as computed by sizeof.])
-])# AC_CHECK_SIZEOF
-
-
-
-## -------------------- ##
-## Checking for types.  ##
-## -------------------- ##
-
-# Up to 2.13 included, Autoconf used to provide the macro
-#
-#    AC_CHECK_TYPE(TYPE, DEFAULT)
-#
-# Since, it provides another version which fits better with the other
-# AC_CHECK_ families:
-#
-#    AC_CHECK_TYPE(TYPE,
-#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                 [INCLUDES])
-#
-# In order to provide backward compatibility, the new scheme is
-# implemented as _AC_CHECK_TYPE_NEW, the old scheme as _AC_CHECK_TYPE_OLD,
-# and AC_CHECK_TYPE branches to one or the other, depending upon its
-# arguments.
-
-
-
-# _AC_CHECK_TYPE_NEW(TYPE,
-#                   [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                   [INCLUDES])
-# ------------------------------------------------------------
-# Check whether the type TYPE is supported by the system, maybe via the
-# the provided includes.  This macro implements the former task of
-# AC_CHECK_TYPE, with one big difference though: AC_CHECK_TYPE was
-# grepping in the headers, which, BTW, led to many problems until
-# the egrep expression was correct and did not given false positives.
-# It turned out there are even portability issues with egrep...
-#
-# The most obvious way to check for a TYPE is just to compile a variable
-# definition:
-#
-#        TYPE my_var;
-#
-# Unfortunately this does not work for const qualified types in C++,
-# where you need an initializer.  So you think of
-#
-#        TYPE my_var = (TYPE) 0;
-#
-# Unfortunately, again, this is not valid for some C++ classes.
-#
-# Then you look for another scheme.  For instance you think of declaring
-# a function which uses a parameter of type TYPE:
-#
-#        int foo (TYPE param);
-#
-# but of course you soon realize this does not make it with K&R
-# compilers.  And by no ways you want to
-#
-#        int foo (param)
-#          TYPE param
-#        { ; }
-#
-# since this time it's C++ who is not happy.
-#
-# Don't even think of the return type of a function, since K&R cries
-# there too.  So you start thinking of declaring a *pointer* to this TYPE:
-#
-#        TYPE *p;
-#
-# but you know fairly well that this is legal in C for aggregates which
-# are unknown (TYPE = struct does-not-exist).
-#
-# Then you think of using sizeof to make sure the TYPE is really
-# defined:
-#
-#        sizeof (TYPE);
-#
-# But this succeeds if TYPE is a variable: you get the size of the
-# variable's type!!!
-#
-# This time you tell yourself the last two options *together* will make
-# it.  And indeed this is the solution invented by Alexandre Oliva.
-#
-# Also note that we use
-#
-#        if (sizeof (TYPE))
-#
-# to `read' sizeof (to avoid warnings), while not depending on its type
-# (not necessarily size_t etc.).  Equally, instead of defining an unused
-# variable, we just use a cast to avoid warnings from the compiler.
-# Suggested by Paul Eggert.
-m4_define([_AC_CHECK_TYPE_NEW],
-[AC_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl
-AC_CACHE_CHECK([for $1], ac_Type,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
-[if (($1 *) 0)
-  return 0;
-if (sizeof ($1))
-  return 0;])],
-                   [AC_VAR_SET(ac_Type, yes)],
-                   [AC_VAR_SET(ac_Type, no)])])
-AS_IF([test AC_VAR_GET(ac_Type) = yes], [$2], [$3])[]dnl
-AC_VAR_POPDEF([ac_Type])dnl
-])# _AC_CHECK_TYPE_NEW
-
-
-# AC_CHECK_TYPES(TYPES,
-#                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                [INCLUDES])
-# --------------------------------------------------------
-# TYPES is an m4 list.  There are no ambiguities here, we mean the newer
-# AC_CHECK_TYPE.
-AC_DEFUN([AC_CHECK_TYPES],
-[m4_foreach([AC_Type], [$1],
-  [_AC_CHECK_TYPE_NEW(AC_Type,
-                      [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Type), 1,
-                                          [Define if the system has the type
-                                          `]AC_Type['.])
-$2],
-                      [$3],
-                      [$4])])])
-
-
-# _AC_CHECK_TYPE_OLD(TYPE, DEFAULT)
-# ---------------------------------
-# FIXME: This is an extremely badly chosen name, since this
-# macro actually performs an AC_REPLACE_TYPE.  Some day we
-# have to clean this up.
-m4_define([_AC_CHECK_TYPE_OLD],
-[_AC_CHECK_TYPE_NEW([$1],,
-   [AC_DEFINE_UNQUOTED([$1], [$2],
-                       [Define to `$2' if <sys/types.h> does not define.])])dnl
-])# _AC_CHECK_TYPE_OLD
-
-
-# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P(STRING)
-# -----------------------------------------
-# Return `1' if STRING seems to be a builtin C/C++ type, i.e., if it
-# starts with `_Bool', `bool', `char', `double', `float', `int',
-# `long', `short', `signed', or `unsigned' followed by characters
-# that are defining types.
-# Because many people have used `off_t' and `size_t' too, they are added
-# for better common-useward backward compatibility.
-m4_define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
-[m4_if(m4_regexp([$1],
-                 [^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|size_t\|off_t\)\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
-       0, 1, 0)dnl
-])# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P
-
-
-# _AC_CHECK_TYPE_MAYBE_TYPE_P(STRING)
-# -----------------------------------
-# Return `1' if STRING looks like a C/C++ type.
-m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
-[m4_if(m4_regexp([$1], [^[_a-zA-Z0-9 ]+\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
-       0, 1, 0)dnl
-])# _AC_CHECK_TYPE_MAYBE_TYPE_P
-
-
-# AC_CHECK_TYPE(TYPE, DEFAULT)
-#  or
-# AC_CHECK_TYPE(TYPE,
-#              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#              [INCLUDES])
-# -------------------------------------------------------
-#
-# Dispatch respectively to _AC_CHECK_TYPE_OLD or _AC_CHECK_TYPE_NEW.
-# 1. More than two arguments         => NEW
-# 2. $2 seems to be replacement type => OLD
-#    See _AC_CHECK_TYPE_REPLACEMENT_TYPE_P for `replacement type'.
-# 3. $2 seems to be a type           => NEW plus a warning
-# 4. default                         => NEW
-AC_DEFUN([AC_CHECK_TYPE],
-[m4_if($#, 3,
-         [_AC_CHECK_TYPE_NEW($@)],
-       $#, 4,
-         [_AC_CHECK_TYPE_NEW($@)],
-       _AC_CHECK_TYPE_REPLACEMENT_TYPE_P([$2]), 1,
-         [_AC_CHECK_TYPE_OLD($@)],
-       _AC_CHECK_TYPE_MAYBE_TYPE_P([$2]), 1,
-         [AC_DIAGNOSE([syntax],
-                    [$0: assuming `$2' is not a type])_AC_CHECK_TYPE_NEW($@)],
-       [_AC_CHECK_TYPE_NEW($@)])[]dnl
-])# AC_CHECK_TYPE
-
-
-
 ## ----------------------- ##
 ## Creating output files.  ##
 ## ----------------------- ##
index 45ef46e59264d1ab4af0cf007bc96a6db1100841..f223ae59e77ee95c2d691328b175e299c5cf726b 100644 (file)
@@ -326,258 +326,6 @@ fi
 
 
 
-## --------------------- ##
-## Checks for typedefs.  ##
-## --------------------- ##
-
-
-# AC_TYPE_GETGROUPS
-# -----------------
-AC_DEFUN([AC_TYPE_GETGROUPS],
-[AC_REQUIRE([AC_TYPE_UID_T])dnl
-AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
-[AC_RUN_IFELSE([AC_LANG_SOURCE(
-[/* Thanks to Mike Rendell for this test.  */
-#include <sys/types.h>
-#define NGID 256
-#undef MAX
-#define MAX(x, y) ((x) > (y) ? (x) : (y))
-int
-main ()
-{
-  gid_t gidset[NGID];
-  int i, n;
-  union { gid_t gval; long lval; }  val;
-
-  val.lval = -1;
-  for (i = 0; i < NGID; i++)
-    gidset[i] = val.gval;
-  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
-                 gidset);
-  /* Exit non-zero if getgroups seems to require an array of ints.  This
-     happens when gid_t is short but getgroups modifies an array of ints.  */
-  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
-}])],
-               [ac_cv_type_getgroups=gid_t],
-               [ac_cv_type_getgroups=int],
-               [ac_cv_type_getgroups=cross])
-if test $ac_cv_type_getgroups = cross; then
-  dnl When we can't run the test program (we are cross compiling), presume
-  dnl that <unistd.h> has either an accurate prototype for getgroups or none.
-  dnl Old systems without prototypes probably use int.
-  AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h,
-                 ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)
-fi])
-AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups,
-                   [Define to the type of elements in the array set by
-                    `getgroups'. Usually this is either `int' or `gid_t'.])
-])# AC_TYPE_GETGROUPS
-
-
-# AU::AM_TYPE_PTRDIFF_T
-AU_DEFUN([AM_TYPE_PTRDIFF_T],
-[AC_CHECK_TYPES(ptrdiff_t)])
-
-
-# AC_TYPE_UID_T
-# -------------
-# FIXME: Rewrite using AC_CHECK_TYPE.
-AC_DEFUN([AC_TYPE_UID_T],
-[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
-[AC_EGREP_HEADER(uid_t, sys/types.h,
-  ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
-if test $ac_cv_type_uid_t = no; then
-  AC_DEFINE(uid_t, int, [Define to `int' if <sys/types.h> doesn't define.])
-  AC_DEFINE(gid_t, int, [Define to `int' if <sys/types.h> doesn't define.])
-fi
-])
-
-
-AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned)])
-AC_DEFUN([AC_TYPE_PID_T],  [AC_CHECK_TYPE(pid_t,  int)])
-AC_DEFUN([AC_TYPE_OFF_T],  [AC_CHECK_TYPE(off_t,  long)])
-AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
-
-
-# AU::AC_INT_16_BITS
-# ------------------
-# What a great name :)
-AU_DEFUN([AC_INT_16_BITS],
-[AC_CHECK_SIZEOF([int])
-AC_DIAGNOSE([obsolete], [$0:
-        your code should no longer depend upon `INT_16_BITS', but upon
-        `SIZEOF_INT'.  Remove this warning and the `AC_DEFINE' when you
-        adjust the code.])dnl
-test $ac_cv_sizeof_int = 2 &&
-  AC_DEFINE(INT_16_BITS, 1,
-            [Define if `sizeof (int)' = 2.  Obsolete, use `SIZEOF_INT'.])
-])
-
-
-# AU::AC_LONG_64_BITS
-# -------------------
-AU_DEFUN([AC_LONG_64_BITS],
-[AC_CHECK_SIZEOF([long int])
-AC_DIAGNOSE([obsolete], [$0:
-        your code should no longer depend upon `LONG_64_BITS', but upon
-        `SIZEOF_LONG_INT'.  Remove this warning and the `AC_DEFINE' when
-        you adjust the code.])dnl
-test $ac_cv_sizeof_long_int = 8 &&
-  AC_DEFINE(LONG_64_BITS, 1,
-            [Define if `sizeof (long int)' = 8.  Obsolete, use
-             `SIZEOF_LONG_INT'.])
-])
-
-
-# AC_TYPE_SIGNAL
-# --------------
-# Note that identifiers starting with SIG are reserved by ANSI C.
-AC_DEFUN([AC_TYPE_SIGNAL],
-[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
-[AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-],
-                 [int i;])],
-                   [ac_cv_type_signal=void],
-                   [ac_cv_type_signal=int])])
-AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal,
-                   [Define as the return type of signal handlers
-                    (`int' or `void').])
-])
-
-
-
-
-
-## ------------------------------ ##
-## Checks for structure members.  ##
-## ------------------------------ ##
-
-
-# AC_STRUCT_TM
-# ------------
-# FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM.
-# Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME?
-AC_DEFUN([AC_STRUCT_TM],
-[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
-  ac_cv_struct_tm,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
-#include <time.h>
-],
-                                    [struct tm *tp; tp->tm_sec;])],
-                   [ac_cv_struct_tm=time.h],
-                   [ac_cv_struct_tm=sys/time.h])])
-if test $ac_cv_struct_tm = sys/time.h; then
-  AC_DEFINE(TM_IN_SYS_TIME, 1,
-            [Define if your <sys/time.h> declares `struct tm'.])
-fi
-])# AC_STRUCT_TM
-
-
-# AC_STRUCT_TIMEZONE
-# ------------------
-# Figure out how to get the current timezone.  If `struct tm' has a
-# `tm_zone' member, define `HAVE_TM_ZONE'.  Otherwise, if the
-# external array `tzname' is found, define `HAVE_TZNAME'.
-AC_DEFUN([AC_STRUCT_TIMEZONE],
-[AC_REQUIRE([AC_STRUCT_TM])dnl
-AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
-#include <$ac_cv_struct_tm>
-])
-if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
-  AC_DEFINE(HAVE_TM_ZONE, 1,
-            [Define if your `struct tm' has `tm_zone'. Deprecated, use
-             `HAVE_STRUCT_TM_TM_ZONE' instead.])
-else
-  AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
-[AC_TRY_LINK(
-[#include <time.h>
-#ifndef tzname /* For SGI.  */
-extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
-#endif
-],
-[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
-  if test $ac_cv_var_tzname = yes; then
-    AC_DEFINE(HAVE_TZNAME, 1,
-              [Define if you don't have `tm_zone' but do have the external
-               array `tzname'.])
-  fi
-fi
-])# AC_STRUCT_TIMEZONE
-
-
-
-# FIXME: The following three macros should no longer be supported in the
-# future.  They made sense when there was no means to directly check for
-# members of aggregates.
-
-
-# AC_STRUCT_ST_BLKSIZE
-# --------------------
-AU_DEFUN([AC_STRUCT_ST_BLKSIZE],
-[AC_DIAGNOSE([obsolete], [$0:
-        your code should no longer depend upon `HAVE_ST_BLKSIZE', but
-        `HAVE_STRUCT_STAT_ST_BLKSIZE'.  Remove this warning and
-        the `AC_DEFINE' when you adjust the code.])
-AC_CHECK_MEMBERS([struct stat.st_blksize],
-                 [AC_DEFINE(HAVE_ST_BLKSIZE, 1,
-                            [Define if your `struct stat' has
-                             `st_blksize'.  Deprecated, use
-                             `HAVE_STRUCT_STAT_ST_BLKSIZE' instead.])])
-])# AC_STRUCT_ST_BLKSIZE
-
-
-# AC_STRUCT_ST_BLOCKS
-# -------------------
-# If `struct stat' contains an `st_blocks' member, define
-# HAVE_STRUCT_STAT_ST_BLOCKS.  Otherwise, add `fileblocks.o' to the
-# output variable LIBOBJS.  We still define HAVE_ST_BLOCKS for backward
-# compatibility.  In the future, we will activate specializations for
-# this macro, so don't obsolete it right now.
-#
-# AC_OBSOLETE([$0], [; replace it with
-#   AC_CHECK_MEMBERS([struct stat.st_blocks],
-#                     [AC_LIBOBJ([fileblocks])])
-# Please note that it will define `HAVE_STRUCT_STAT_ST_BLOCKS',
-# and not `HAVE_ST_BLOCKS'.])dnl
-#
-AC_DEFUN([AC_STRUCT_ST_BLOCKS],
-[AC_CHECK_MEMBERS([struct stat.st_blocks],
-                  [AC_DEFINE(HAVE_ST_BLOCKS, 1,
-                             [Define if your `struct stat' has
-                              `st_blocks'.  Deprecated, use
-                              `HAVE_STRUCT_STAT_ST_BLOCKS' instead.])],
-                  [AC_LIBOBJ([fileblocks])])
-])# AC_STRUCT_ST_BLOCKS
-
-
-# AC_STRUCT_ST_RDEV
-# -----------------
-AU_DEFUN([AC_STRUCT_ST_RDEV],
-[AC_DIAGNOSE([obsolete], [$0:
-        your code should no longer depend upon `HAVE_ST_RDEV', but
-        `HAVE_STRUCT_STAT_ST_RDEV'.  Remove this warning and
-        the `AC_DEFINE' when you adjust the code.])
-AC_CHECK_MEMBERS([struct stat.st_rdev],
-                 [AC_DEFINE(HAVE_ST_RDEV, 1,
-                            [Define if your `struct stat' has `st_rdev'.
-                             Deprecated, use `HAVE_STRUCT_STAT_ST_RDEV'
-                             instead.])])
-])# AC_STRUCT_ST_RDEV
-
-
-
-
-
 ## -------------------------------------- ##
 ## Checks for operating system services.  ##
 ## -------------------------------------- ##
diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4
new file mode 100644 (file)
index 0000000..24bf2c9
--- /dev/null
@@ -0,0 +1,562 @@
+# This file is part of Autoconf.                       -*- Autoconf -*-
+# Type related macros: existence, sizeof, and structure members.
+# Copyright 2000
+# Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf.  You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them.  The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf.  We call these the "data" portions.  The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case.  We call these
+# comments and executable code the "non-data" portions.  Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation.  When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with.  (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.)  If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+#
+# Written by David MacKenzie, with help from
+# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+
+
+## ---------------- ##
+## Type existence.  ##
+## ---------------- ##
+
+# ---------------- #
+# General checks.  #
+# ---------------- #
+
+# Up to 2.13 included, Autoconf used to provide the macro
+#
+#    AC_CHECK_TYPE(TYPE, DEFAULT)
+#
+# Since, it provides another version which fits better with the other
+# AC_CHECK_ families:
+#
+#    AC_CHECK_TYPE(TYPE,
+#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                 [INCLUDES])
+#
+# In order to provide backward compatibility, the new scheme is
+# implemented as _AC_CHECK_TYPE_NEW, the old scheme as _AC_CHECK_TYPE_OLD,
+# and AC_CHECK_TYPE branches to one or the other, depending upon its
+# arguments.
+
+
+
+# _AC_CHECK_TYPE_NEW(TYPE,
+#                   [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                   [INCLUDES])
+# ------------------------------------------------------------
+# Check whether the type TYPE is supported by the system, maybe via the
+# the provided includes.  This macro implements the former task of
+# AC_CHECK_TYPE, with one big difference though: AC_CHECK_TYPE was
+# grepping in the headers, which, BTW, led to many problems until
+# the egrep expression was correct and did not given false positives.
+# It turned out there are even portability issues with egrep...
+#
+# The most obvious way to check for a TYPE is just to compile a variable
+# definition:
+#
+#        TYPE my_var;
+#
+# Unfortunately this does not work for const qualified types in C++,
+# where you need an initializer.  So you think of
+#
+#        TYPE my_var = (TYPE) 0;
+#
+# Unfortunately, again, this is not valid for some C++ classes.
+#
+# Then you look for another scheme.  For instance you think of declaring
+# a function which uses a parameter of type TYPE:
+#
+#        int foo (TYPE param);
+#
+# but of course you soon realize this does not make it with K&R
+# compilers.  And by no ways you want to
+#
+#        int foo (param)
+#          TYPE param
+#        { ; }
+#
+# since this time it's C++ who is not happy.
+#
+# Don't even think of the return type of a function, since K&R cries
+# there too.  So you start thinking of declaring a *pointer* to this TYPE:
+#
+#        TYPE *p;
+#
+# but you know fairly well that this is legal in C for aggregates which
+# are unknown (TYPE = struct does-not-exist).
+#
+# Then you think of using sizeof to make sure the TYPE is really
+# defined:
+#
+#        sizeof (TYPE);
+#
+# But this succeeds if TYPE is a variable: you get the size of the
+# variable's type!!!
+#
+# This time you tell yourself the last two options *together* will make
+# it.  And indeed this is the solution invented by Alexandre Oliva.
+#
+# Also note that we use
+#
+#        if (sizeof (TYPE))
+#
+# to `read' sizeof (to avoid warnings), while not depending on its type
+# (not necessarily size_t etc.).  Equally, instead of defining an unused
+# variable, we just use a cast to avoid warnings from the compiler.
+# Suggested by Paul Eggert.
+m4_define([_AC_CHECK_TYPE_NEW],
+[AC_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl
+AC_CACHE_CHECK([for $1], ac_Type,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
+[if (($1 *) 0)
+  return 0;
+if (sizeof ($1))
+  return 0;])],
+                   [AC_VAR_SET(ac_Type, yes)],
+                   [AC_VAR_SET(ac_Type, no)])])
+AS_IF([test AC_VAR_GET(ac_Type) = yes], [$2], [$3])[]dnl
+AC_VAR_POPDEF([ac_Type])dnl
+])# _AC_CHECK_TYPE_NEW
+
+
+# AC_CHECK_TYPES(TYPES,
+#                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                [INCLUDES])
+# --------------------------------------------------------
+# TYPES is an m4 list.  There are no ambiguities here, we mean the newer
+# AC_CHECK_TYPE.
+AC_DEFUN([AC_CHECK_TYPES],
+[m4_foreach([AC_Type], [$1],
+  [_AC_CHECK_TYPE_NEW(AC_Type,
+                      [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Type), 1,
+                                          [Define if the system has the type
+                                          `]AC_Type['.])
+$2],
+                      [$3],
+                      [$4])])])
+
+
+# _AC_CHECK_TYPE_OLD(TYPE, DEFAULT)
+# ---------------------------------
+# FIXME: This is an extremely badly chosen name, since this
+# macro actually performs an AC_REPLACE_TYPE.  Some day we
+# have to clean this up.
+m4_define([_AC_CHECK_TYPE_OLD],
+[_AC_CHECK_TYPE_NEW([$1],,
+   [AC_DEFINE_UNQUOTED([$1], [$2],
+                       [Define to `$2' if <sys/types.h> does not define.])])dnl
+])# _AC_CHECK_TYPE_OLD
+
+
+# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P(STRING)
+# -----------------------------------------
+# Return `1' if STRING seems to be a builtin C/C++ type, i.e., if it
+# starts with `_Bool', `bool', `char', `double', `float', `int',
+# `long', `short', `signed', or `unsigned' followed by characters
+# that are defining types.
+# Because many people have used `off_t' and `size_t' too, they are added
+# for better common-useward backward compatibility.
+m4_define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
+[m4_if(m4_regexp([$1],
+                 [^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|size_t\|off_t\)\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
+       0, 1, 0)dnl
+])# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P
+
+
+# _AC_CHECK_TYPE_MAYBE_TYPE_P(STRING)
+# -----------------------------------
+# Return `1' if STRING looks like a C/C++ type.
+m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
+[m4_if(m4_regexp([$1], [^[_a-zA-Z0-9 ]+\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
+       0, 1, 0)dnl
+])# _AC_CHECK_TYPE_MAYBE_TYPE_P
+
+
+# AC_CHECK_TYPE(TYPE, DEFAULT)
+#  or
+# AC_CHECK_TYPE(TYPE,
+#              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#              [INCLUDES])
+# -------------------------------------------------------
+#
+# Dispatch respectively to _AC_CHECK_TYPE_OLD or _AC_CHECK_TYPE_NEW.
+# 1. More than two arguments         => NEW
+# 2. $2 seems to be replacement type => OLD
+#    See _AC_CHECK_TYPE_REPLACEMENT_TYPE_P for `replacement type'.
+# 3. $2 seems to be a type           => NEW plus a warning
+# 4. default                         => NEW
+AC_DEFUN([AC_CHECK_TYPE],
+[m4_if($#, 3,
+         [_AC_CHECK_TYPE_NEW($@)],
+       $#, 4,
+         [_AC_CHECK_TYPE_NEW($@)],
+       _AC_CHECK_TYPE_REPLACEMENT_TYPE_P([$2]), 1,
+         [_AC_CHECK_TYPE_OLD($@)],
+       _AC_CHECK_TYPE_MAYBE_TYPE_P([$2]), 1,
+         [AC_DIAGNOSE([syntax],
+                    [$0: assuming `$2' is not a type])_AC_CHECK_TYPE_NEW($@)],
+       [_AC_CHECK_TYPE_NEW($@)])[]dnl
+])# AC_CHECK_TYPE
+
+
+
+# ----------------- #
+# Specific checks.  #
+# ----------------- #
+
+# AC_TYPE_GETGROUPS
+# -----------------
+AC_DEFUN([AC_TYPE_GETGROUPS],
+[AC_REQUIRE([AC_TYPE_UID_T])dnl
+AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
+[AC_RUN_IFELSE([AC_LANG_SOURCE(
+[/* Thanks to Mike Rendell for this test.  */
+#include <sys/types.h>
+#define NGID 256
+#undef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+int
+main ()
+{
+  gid_t gidset[NGID];
+  int i, n;
+  union { gid_t gval; long lval; }  val;
+
+  val.lval = -1;
+  for (i = 0; i < NGID; i++)
+    gidset[i] = val.gval;
+  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
+                 gidset);
+  /* Exit non-zero if getgroups seems to require an array of ints.  This
+     happens when gid_t is short but getgroups modifies an array of ints.  */
+  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
+}])],
+               [ac_cv_type_getgroups=gid_t],
+               [ac_cv_type_getgroups=int],
+               [ac_cv_type_getgroups=cross])
+if test $ac_cv_type_getgroups = cross; then
+  dnl When we can't run the test program (we are cross compiling), presume
+  dnl that <unistd.h> has either an accurate prototype for getgroups or none.
+  dnl Old systems without prototypes probably use int.
+  AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h,
+                 ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)
+fi])
+AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups,
+                   [Define to the type of elements in the array set by
+                    `getgroups'. Usually this is either `int' or `gid_t'.])
+])# AC_TYPE_GETGROUPS
+
+
+# AU::AM_TYPE_PTRDIFF_T
+AU_DEFUN([AM_TYPE_PTRDIFF_T],
+[AC_CHECK_TYPES(ptrdiff_t)])
+
+
+# AC_TYPE_UID_T
+# -------------
+# FIXME: Rewrite using AC_CHECK_TYPE.
+AC_DEFUN([AC_TYPE_UID_T],
+[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
+[AC_EGREP_HEADER(uid_t, sys/types.h,
+  ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
+if test $ac_cv_type_uid_t = no; then
+  AC_DEFINE(uid_t, int, [Define to `int' if <sys/types.h> doesn't define.])
+  AC_DEFINE(gid_t, int, [Define to `int' if <sys/types.h> doesn't define.])
+fi
+])
+
+
+AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned)])
+AC_DEFUN([AC_TYPE_PID_T],  [AC_CHECK_TYPE(pid_t,  int)])
+AC_DEFUN([AC_TYPE_OFF_T],  [AC_CHECK_TYPE(off_t,  long)])
+AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
+
+
+# AC_TYPE_SIGNAL
+# --------------
+# Note that identifiers starting with SIG are reserved by ANSI C.
+AC_DEFUN([AC_TYPE_SIGNAL],
+[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
+[AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+],
+                 [int i;])],
+                   [ac_cv_type_signal=void],
+                   [ac_cv_type_signal=int])])
+AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal,
+                   [Define as the return type of signal handlers
+                    (`int' or `void').])
+])
+
+
+## ------------------------ ##
+## Checking size of types.  ##
+## ------------------------ ##
+
+# ---------------- #
+# Generic checks.  #
+# ---------------- #
+
+
+# AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES])
+# --------------------------------------------
+AC_DEFUN([AC_CHECK_SIZEOF],
+[AS_LITERAL_IF([$1], [],
+               [AC_FATAL([$0: requires literal arguments])])dnl
+AC_CHECK_TYPE([$1], [], [], [$3])
+AC_CACHE_CHECK([size of $1], AC_TR_SH([ac_cv_sizeof_$1]),
+[if test "$AC_TR_SH([ac_cv_type_$1])" = yes; then
+  _AC_COMPUTE_INT([sizeof ($1)],
+                  [AC_TR_SH([ac_cv_sizeof_$1])],
+                  [AC_INCLUDES_DEFAULT([$3])])
+else
+  AC_TR_SH([ac_cv_sizeof_$1])=0
+fi])dnl
+AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), $AC_TR_SH([ac_cv_sizeof_$1]),
+                   [The size of a `$1', as computed by sizeof.])
+])# AC_CHECK_SIZEOF
+
+
+
+# ---------------- #
+# Generic checks.  #
+# ---------------- #
+
+# AU::AC_INT_16_BITS
+# ------------------
+# What a great name :)
+AU_DEFUN([AC_INT_16_BITS],
+[AC_CHECK_SIZEOF([int])
+AC_DIAGNOSE([obsolete], [$0:
+        your code should no longer depend upon `INT_16_BITS', but upon
+        `SIZEOF_INT'.  Remove this warning and the `AC_DEFINE' when you
+        adjust the code.])dnl
+test $ac_cv_sizeof_int = 2 &&
+  AC_DEFINE(INT_16_BITS, 1,
+            [Define if `sizeof (int)' = 2.  Obsolete, use `SIZEOF_INT'.])
+])
+
+
+# AU::AC_LONG_64_BITS
+# -------------------
+AU_DEFUN([AC_LONG_64_BITS],
+[AC_CHECK_SIZEOF([long int])
+AC_DIAGNOSE([obsolete], [$0:
+        your code should no longer depend upon `LONG_64_BITS', but upon
+        `SIZEOF_LONG_INT'.  Remove this warning and the `AC_DEFINE' when
+        you adjust the code.])dnl
+test $ac_cv_sizeof_long_int = 8 &&
+  AC_DEFINE(LONG_64_BITS, 1,
+            [Define if `sizeof (long int)' = 8.  Obsolete, use
+             `SIZEOF_LONG_INT'.])
+])
+
+
+
+## -------------------------- ##
+## Generic structure checks.  ##
+## -------------------------- ##
+
+
+# ---------------- #
+# Generic checks.  #
+# ---------------- #
+
+# AC_CHECK_MEMBER(AGGREGATE.MEMBER,
+#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                 [INCLUDES])
+# ---------------------------------------------------------
+# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
+# variables are not a valid argument.
+AC_DEFUN([AC_CHECK_MEMBER],
+[AS_LITERAL_IF([$1], [],
+               [AC_FATAL([$0: requires literal arguments])])dnl
+m4_if(m4_regexp([$1], [\.]), -1,
+      [AC_FATAL([$0: Did not see any dot in `$1'])])dnl
+AC_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl
+dnl Extract the aggregate name, and the member name
+AC_CACHE_CHECK([for $1], ac_Member,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
+[dnl AGGREGATE foo;
+m4_patsubst([$1], [\..*]) foo;
+dnl foo.MEMBER;
+foo.m4_patsubst([$1], [^[^.]*\.]);])],
+                [AC_VAR_SET(ac_Member, yes)],
+                [AC_VAR_SET(ac_Member, no)])])
+AS_IF([test AC_VAR_GET(ac_Member) = yes], [$2], [$3])dnl
+AC_VAR_POPDEF([ac_Member])dnl
+])# AC_CHECK_MEMBER
+
+
+# AC_CHECK_MEMBERS([AGGREGATE.MEMBER, ...],
+#                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]
+#                  [INCLUDES])
+# ---------------------------------------------------------
+# The first argument is an m4 list.
+AC_DEFUN([AC_CHECK_MEMBERS],
+[m4_foreach([AC_Member], [$1],
+  [AC_CHECK_MEMBER(AC_Member,
+         [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Member), 1,
+                            [Define if `]m4_patsubst(AC_Member,
+                                                     [^[^.]*\.])[' is
+                             member of `]m4_patsubst(AC_Member, [\..*])['.])
+$2],
+                 [$3],
+                 [$4])])])
+
+
+# ----------------- #
+# Specific checks.  #
+# ----------------- #
+
+# Alphabetic order, please.
+
+# AC_STRUCT_ST_BLKSIZE
+# --------------------
+AU_DEFUN([AC_STRUCT_ST_BLKSIZE],
+[AC_DIAGNOSE([obsolete], [$0:
+        your code should no longer depend upon `HAVE_ST_BLKSIZE', but
+        `HAVE_STRUCT_STAT_ST_BLKSIZE'.  Remove this warning and
+        the `AC_DEFINE' when you adjust the code.])
+AC_CHECK_MEMBERS([struct stat.st_blksize],
+                 [AC_DEFINE(HAVE_ST_BLKSIZE, 1,
+                            [Define if your `struct stat' has
+                             `st_blksize'.  Deprecated, use
+                             `HAVE_STRUCT_STAT_ST_BLKSIZE' instead.])])
+])# AC_STRUCT_ST_BLKSIZE
+
+
+# AC_STRUCT_ST_BLOCKS
+# -------------------
+# If `struct stat' contains an `st_blocks' member, define
+# HAVE_STRUCT_STAT_ST_BLOCKS.  Otherwise, add `fileblocks.o' to the
+# output variable LIBOBJS.  We still define HAVE_ST_BLOCKS for backward
+# compatibility.  In the future, we will activate specializations for
+# this macro, so don't obsolete it right now.
+#
+# AC_OBSOLETE([$0], [; replace it with
+#   AC_CHECK_MEMBERS([struct stat.st_blocks],
+#                     [AC_LIBOBJ([fileblocks])])
+# Please note that it will define `HAVE_STRUCT_STAT_ST_BLOCKS',
+# and not `HAVE_ST_BLOCKS'.])dnl
+#
+AC_DEFUN([AC_STRUCT_ST_BLOCKS],
+[AC_CHECK_MEMBERS([struct stat.st_blocks],
+                  [AC_DEFINE(HAVE_ST_BLOCKS, 1,
+                             [Define if your `struct stat' has
+                              `st_blocks'.  Deprecated, use
+                              `HAVE_STRUCT_STAT_ST_BLOCKS' instead.])],
+                  [AC_LIBOBJ([fileblocks])])
+])# AC_STRUCT_ST_BLOCKS
+
+
+# AC_STRUCT_ST_RDEV
+# -----------------
+AU_DEFUN([AC_STRUCT_ST_RDEV],
+[AC_DIAGNOSE([obsolete], [$0:
+        your code should no longer depend upon `HAVE_ST_RDEV', but
+        `HAVE_STRUCT_STAT_ST_RDEV'.  Remove this warning and
+        the `AC_DEFINE' when you adjust the code.])
+AC_CHECK_MEMBERS([struct stat.st_rdev],
+                 [AC_DEFINE(HAVE_ST_RDEV, 1,
+                            [Define if your `struct stat' has `st_rdev'.
+                             Deprecated, use `HAVE_STRUCT_STAT_ST_RDEV'
+                             instead.])])
+])# AC_STRUCT_ST_RDEV
+
+
+# AC_STRUCT_TM
+# ------------
+# FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM.
+# Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME?
+AC_DEFUN([AC_STRUCT_TM],
+[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
+  ac_cv_struct_tm,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
+#include <time.h>
+],
+                                    [struct tm *tp; tp->tm_sec;])],
+                   [ac_cv_struct_tm=time.h],
+                   [ac_cv_struct_tm=sys/time.h])])
+if test $ac_cv_struct_tm = sys/time.h; then
+  AC_DEFINE(TM_IN_SYS_TIME, 1,
+            [Define if your <sys/time.h> declares `struct tm'.])
+fi
+])# AC_STRUCT_TM
+
+
+# AC_STRUCT_TIMEZONE
+# ------------------
+# Figure out how to get the current timezone.  If `struct tm' has a
+# `tm_zone' member, define `HAVE_TM_ZONE'.  Otherwise, if the
+# external array `tzname' is found, define `HAVE_TZNAME'.
+AC_DEFUN([AC_STRUCT_TIMEZONE],
+[AC_REQUIRE([AC_STRUCT_TM])dnl
+AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+])
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+  AC_DEFINE(HAVE_TM_ZONE, 1,
+            [Define if your `struct tm' has `tm_zone'. Deprecated, use
+             `HAVE_STRUCT_TM_TM_ZONE' instead.])
+else
+  AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
+[AC_TRY_LINK(
+[#include <time.h>
+#ifndef tzname /* For SGI.  */
+extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
+#endif
+],
+[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
+  if test $ac_cv_var_tzname = yes; then
+    AC_DEFINE(HAVE_TZNAME, 1,
+              [Define if you don't have `tm_zone' but do have the external
+               array `tzname'.])
+  fi
+fi
+])# AC_STRUCT_TIMEZONE
index 36524724d4d71b89f99932da5e0c773d0a9e9874..6b49518f374acf9fff1ffb12fec3131f7994b8b4 100644 (file)
@@ -23,7 +23,8 @@ AUTOMAKE_OPTIONS = gnits
 SUITE = suite.at \
         m4sugar.at m4sh.at \
         base.at tools.at torture.at compile.at semantics.at \
-       acgeneral.at acspecific.at acfunctions.at aclang.at acheaders.at
+       acgeneral.at acspecific.at acfunctions.at aclang.at acheaders.at \
+       actypes.at \
        foreign.at
 
 # We don't actually distribute the testsuite, since one only
@@ -50,7 +51,8 @@ MACRO_FILES = $(top_srcdir)/acgeneral.m4 \
               $(top_srcdir)/acspecific.m4 \
               $(top_srcdir)/acfunctions.m4 \
               $(top_srcdir)/aclang.m4 \
-              $(top_srcdir)/acheaders.m4
+              $(top_srcdir)/acheaders.m4 \
+              $(top_srcdir)/actypes.m4
 
 acgeneral.at: mktests.sh $(MACRO_FILES)
        cd $(srcdir) && ./mktests.sh $(MACRO_FILES)
@@ -67,6 +69,9 @@ aclang.at: mktests.sh $(MACRO_FILES)
 acheaders.at: mktests.sh $(MACRO_FILES)
        cd $(srcdir) && ./mktests.sh $(MACRO_FILES)
 
+actypes.at: mktests.sh $(MACRO_FILES)
+       cd $(srcdir) && ./mktests.sh $(MACRO_FILES)
+
 CLEANFILES = debug-*.sh macro configure configure.in configure.ac \
              config.status config.cache config.log config.h.in config.h \
              stderr stdout empty
index fa9ed160532b0db95d108fd939128b870f75bce6..06779b4cb7f86d3d38763db258afde3bf6b0116e 100644 (file)
@@ -72,7 +72,9 @@ AUTOMAKE_OPTIONS = gnits
 SUITE = suite.at \
         m4sugar.at m4sh.at \
         base.at tools.at torture.at compile.at semantics.at \
-       acgeneral.at acspecific.at acfunctions.at aclang.at acheaders.at
+       acgeneral.at acspecific.at acfunctions.at aclang.at acheaders.at \
+       actypes.at \
+       foreign.at
 
 
 # We don't actually distribute the testsuite, since one only
@@ -87,7 +89,8 @@ MACRO_FILES = $(top_srcdir)/acgeneral.m4 \
               $(top_srcdir)/acspecific.m4 \
               $(top_srcdir)/acfunctions.m4 \
               $(top_srcdir)/aclang.m4 \
-              $(top_srcdir)/acheaders.m4
+              $(top_srcdir)/acheaders.m4 \
+              $(top_srcdir)/actypes.m4
 
 
 CLEANFILES = debug-*.sh macro configure configure.in configure.ac \
@@ -201,7 +204,6 @@ all-redirect all-am all install-strip installdirs mostlyclean-generic \
 distclean-generic clean-generic maintainer-clean-generic clean \
 mostlyclean distclean maintainer-clean
 
-       foreign.at
 
 check-local: atconfig testsuite
        $(SHELL) testsuite
@@ -230,6 +232,9 @@ aclang.at: mktests.sh $(MACRO_FILES)
 acheaders.at: mktests.sh $(MACRO_FILES)
        cd $(srcdir) && ./mktests.sh $(MACRO_FILES)
 
+actypes.at: mktests.sh $(MACRO_FILES)
+       cd $(srcdir) && ./mktests.sh $(MACRO_FILES)
+
 maintainer-check: maintainer-check-posix maintainer-check-c++
 
 # The hairy heredoc is more robust than using echo.
index 9f1a4ef5ed992fcca6a95a62632179fcb73a6712..5fea80ea3e208c5ae1adbbd644d3552ccc5cc3cd 100644 (file)
@@ -14,27 +14,17 @@ AT_CHECK_MACRO([AC_PROG_LN_S])
 AT_CHECK_MACRO([AC_PROG_MAKE_SET])
 AT_CHECK_MACRO([AC_PROG_RANLIB])
 AT_CHECK_MACRO([AC_PROG_YACC])
-AT_CHECK_MACRO([AC_STRUCT_ST_BLOCKS])
-AT_CHECK_MACRO([AC_STRUCT_TIMEZONE])
 AT_CHECK_MACRO([AC_SYS_INTERPRETER])
 AT_CHECK_MACRO([AC_SYS_LARGEFILE])
 AT_CHECK_MACRO([AC_SYS_LONG_FILE_NAMES])
 AT_CHECK_MACRO([AC_SYS_RESTARTABLE_SYSCALLS])
-AT_CHECK_MACRO([AC_TYPE_MODE_T])
-AT_CHECK_MACRO([AC_TYPE_OFF_T])
-AT_CHECK_MACRO([AC_TYPE_SIGNAL])
 
 # Obsolete macros.
 AT_CHECK_AU_MACRO([AC_ARG_ARRAY])
 AT_CHECK_AU_MACRO([AC_DECL_YYTEXT])
 AT_CHECK_AU_MACRO([AC_DYNIX_SEQ])
 AT_CHECK_AU_MACRO([AC_HAVE_POUNDBANG])
-AT_CHECK_AU_MACRO([AC_INT_16_BITS])
 AT_CHECK_AU_MACRO([AC_IRIX_SUN])
-AT_CHECK_AU_MACRO([AC_LONG_64_BITS])
 AT_CHECK_AU_MACRO([AC_RSH])
 AT_CHECK_AU_MACRO([AC_SCO_INTL])
-AT_CHECK_AU_MACRO([AC_STRUCT_ST_BLKSIZE])
-AT_CHECK_AU_MACRO([AC_STRUCT_ST_RDEV])
 AT_CHECK_AU_MACRO([AC_XENIX_DIR])
-AT_CHECK_AU_MACRO([AM_TYPE_PTRDIFF_T])
diff --git a/tests/actypes.at b/tests/actypes.at
new file mode 100644 (file)
index 0000000..1fdd9e8
--- /dev/null
@@ -0,0 +1,17 @@
+# Generated by mktests.sh, do not edit by hand.        -*- autoconf -*-
+
+AT_BANNER([Testing actypes macros.])
+
+# Modern macros.
+AT_CHECK_MACRO([AC_STRUCT_ST_BLOCKS])
+AT_CHECK_MACRO([AC_STRUCT_TIMEZONE])
+AT_CHECK_MACRO([AC_TYPE_MODE_T])
+AT_CHECK_MACRO([AC_TYPE_OFF_T])
+AT_CHECK_MACRO([AC_TYPE_SIGNAL])
+
+# Obsolete macros.
+AT_CHECK_AU_MACRO([AC_INT_16_BITS])
+AT_CHECK_AU_MACRO([AC_LONG_64_BITS])
+AT_CHECK_AU_MACRO([AC_STRUCT_ST_BLKSIZE])
+AT_CHECK_AU_MACRO([AC_STRUCT_ST_RDEV])
+AT_CHECK_AU_MACRO([AM_TYPE_PTRDIFF_T])
index 830bcdf78133e3550a29baee92f537994cf4a0ae..495c9139845ee70757985f1579297f1dccdc6615 100644 (file)
@@ -42,11 +42,14 @@ m4_include([compile.at])
 m4_include([semantics.at])
 
 # Blind testing the macros.
+# Include them as is suggested for a `configure.ac', as looking for
+# for types requires looking for headers etc.
 m4_include([acgeneral.at])
 m4_include([acspecific.at])
-m4_include([acfunctions.at])
 m4_include([aclang.at])
 m4_include([acheaders.at])
+m4_include([actypes.at])
+m4_include([acfunctions.at])
 
 # Compatibility with foreign tools.
 m4_include([foreign.at])