Merged autoconf 2.61 into trunk.

git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@24464 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-03-19 12:42:05 +00:00
parent 7ff3918294
commit 939977cf72
150 changed files with 39886 additions and 25489 deletions

View File

@@ -1,7 +1,9 @@
## Process this file with automake to create Makefile.in. -*-Makefile-*-
## Makefile for Autoconf.
## Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
## Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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
@@ -15,20 +17,19 @@
## 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.
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
include ../lib/freeze.mk
bin_SCRIPTS = autom4te \
autoconf autoheader autoreconf ifnames autoscan autoupdate
EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \
autoscan.in autom4te.in \
autoconf.as
EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \
autoscan.in autom4te.in
# Files that should be removed, but which Automake does not know.
CLEANFILES = $(bin_SCRIPTS)
MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp
## ------------- ##
@@ -36,79 +37,46 @@ CLEANFILES = $(bin_SCRIPTS)
## ------------- ##
edit = sed \
-e 's,@SHELL\@,$(SHELL),g' \
-e 's,@PERL\@,$(PERL),g' \
-e 's,@bindir\@,$(bindir),g' \
-e 's,@datadir\@,$(pkgdatadir),g' \
-e 's,@prefix\@,$(prefix),g' \
-e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \
-e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \
-e 's,@autom4te-name\@,'`echo autom4te | 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' \
-e 's,@configure_input\@,Generated from $<; do not edit by hand.,g'
-e 's|@SHELL[@]|$(SHELL)|g' \
-e 's|@PERL[@]|$(PERL)|g' \
-e 's|@bindir[@]|$(bindir)|g' \
-e 's|@datadir[@]|$(pkgdatadir)|g' \
-e 's|@prefix[@]|$(prefix)|g' \
-e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
-e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
-e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \
-e 's|@M4[@]|$(M4)|g' \
-e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \
-e 's|@AWK[@]|$(AWK)|g' \
-e 's|@VERSION[@]|$(VERSION)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
# autoconf is written in M4sh.
AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh --cache ''
$(srcdir)/autoconf.in: $(srcdir)/autoconf.as # FIXME: $(m4sh_m4f_dependencies)
$(AUTOM4SH) $(srcdir)/autoconf.as -o $@
# FIXME: this target should depend on the frozen files below lib/m4sugar,
# otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
# installation below the same $(prefix); work around this with --melt.
autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
$(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
## All the files below depend on Makefile so that they are rebuilt
## when the prefix etc. changes. It took quite a while to have these
## rules correct, don't break them! In particular, we believe there is
## no solution to factor the code.
## All the scripts depend on Makefile so that they are rebuilt when the
## prefix etc. changes. It took quite a while to have the rule correct,
## don't break it!
## Use chmod -w to prevent people from editing the wrong file by accident.
autoconf: $(srcdir)/autoconf.in Makefile
rm -f autoconf autoconf.tmp
$(edit) $(srcdir)/autoconf.in >autoconf.tmp
chmod +x autoconf.tmp
chmod -w autoconf.tmp
mv -f autoconf.tmp autoconf
autoheader: $(srcdir)/autoheader.in Makefile
rm -f autoheader autoheader.tmp
$(edit) $(srcdir)/autoheader.in >autoheader.tmp
chmod +x autoheader.tmp
chmod -w autoheader.tmp
mv -f autoheader.tmp autoheader
autom4te: $(srcdir)/autom4te.in Makefile
rm -f autom4te autom4te.tmp
$(edit) $(srcdir)/autom4te.in >autom4te.tmp
chmod +x autom4te.tmp
chmod -w autom4te.tmp
mv -f autom4te.tmp autom4te
autoreconf: $(srcdir)/autoreconf.in Makefile
rm -f autoreconf autoreconf.tmp
$(edit) $(srcdir)/autoreconf.in >autoreconf.tmp
chmod +x autoreconf.tmp
chmod -w autoreconf.tmp
mv -f autoreconf.tmp autoreconf
autoscan: $(srcdir)/autoscan.in Makefile
rm -f autoscan autoscan.tmp
$(edit) $(srcdir)/autoscan.in >autoscan.tmp
chmod +x autoscan.tmp
chmod -w autoscan.tmp
mv -f autoscan.tmp autoscan
autoupdate: $(srcdir)/autoupdate.in Makefile
rm -f autoupdate autoupdate.tmp
$(edit) $(srcdir)/autoupdate.in >autoupdate.tmp
chmod +x autoupdate.tmp
chmod -w autoupdate.tmp
mv -f autoupdate.tmp autoupdate
ifnames: $(srcdir)/ifnames.in Makefile
rm -f ifnames ifnames.tmp
$(edit) $(srcdir)/ifnames.in >ifnames.tmp
chmod +x ifnames.tmp
chmod -w ifnames.tmp
mv -f ifnames.tmp ifnames
$(bin_SCRIPTS): Makefile
rm -f $@ $@.tmp
$(edit) `test -f ./$@.in || echo $(srcdir)/`$@.in >$@.tmp
chmod +x $@.tmp
chmod a-w $@.tmp
mv $@.tmp $@
autoconf: autoconf.in
autoheader: $(srcdir)/autoheader.in
autom4te: $(srcdir)/autom4te.in
autoreconf: $(srcdir)/autoreconf.in
autoscan: $(srcdir)/autoscan.in
autoupdate: $(srcdir)/autoupdate.in
ifnames: $(srcdir)/ifnames.in
## --------------- ##

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.7a from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 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.
@@ -14,15 +14,11 @@
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -34,25 +30,23 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
DIST_COMMON = $(srcdir)/../lib/freeze.mk $(srcdir)/Makefile.in \
Makefile.am
DIST_COMMON = $(srcdir)/../lib/freeze.mk $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
subdir = bin
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
am__installdirs = $(DESTDIR)$(bindir)
am__installdirs = "$(DESTDIR)$(bindir)"
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
SOURCES =
DIST_SOURCES =
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -65,10 +59,13 @@ DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EMACS = @EMACS@
EMACSLOADPATH = @EMACSLOADPATH@
EXPR = @EXPR@
GREP = @GREP@
HELP2MAN = @HELP2MAN@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -77,7 +74,9 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
M4_DEBUGFILE = @M4_DEBUGFILE@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -86,48 +85,71 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TEST_EMACS = @TEST_EMACS@
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_cv_sh_n_works = @ac_cv_sh_n_works@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
lispdir = @lispdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .m4 .m4f
AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg
# Do not use AUTOM4TE here, since Makefile.maint (my-distcheck)
# checks if we are independent of Autoconf by defining AUTOM4TE (and
# others) to `false'. But we _ship_ tests/autom4te, so it doesn't
# others) to `false'. Autoconf provides autom4te, so that doesn't
# apply to us.
MY_AUTOM4TE = $(top_builddir)/tests/autom4te
AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg
MY_AUTOM4TE = \
autom4te_perllibdir='$(top_srcdir)'/lib \
AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \
-B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` '
# Factor the dependencies between all the frozen files.
# Some day we should explain to Automake how to use autom4te to compute
# the dependencies...
src_libdir = $(top_srcdir)/lib
build_libdir = $(top_builddir)/lib
m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG)
m4f_dependencies = $(top_builddir)/bin/autom4te $(AUTOM4TE_CFG)
m4sugar_m4f_dependencies = \
$(m4f_dependencies) \
$(src_libdir)/m4sugar/m4sugar.m4 \
@@ -155,6 +177,7 @@ autoconf_m4f_dependencies = \
$(src_libdir)/autoconf/lang.m4 \
$(src_libdir)/autoconf/c.m4 \
$(src_libdir)/autoconf/fortran.m4 \
$(src_libdir)/autoconf/erlang.m4 \
$(src_libdir)/autoconf/functions.m4 \
$(src_libdir)/autoconf/headers.m4 \
$(src_libdir)/autoconf/types.m4 \
@@ -178,31 +201,28 @@ ETAGS_FOR_AUTOCONF = \
bin_SCRIPTS = autom4te \
autoconf autoheader autoreconf ifnames autoscan autoupdate
EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \
autoscan.in autom4te.in \
autoconf.as
EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \
autoscan.in autom4te.in
# Files that should be removed, but which Automake does not know.
CLEANFILES = $(bin_SCRIPTS)
MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp
edit = sed \
-e 's,@SHELL\@,$(SHELL),g' \
-e 's,@PERL\@,$(PERL),g' \
-e 's,@bindir\@,$(bindir),g' \
-e 's,@datadir\@,$(pkgdatadir),g' \
-e 's,@prefix\@,$(prefix),g' \
-e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \
-e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \
-e 's,@autom4te-name\@,'`echo autom4te | 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' \
-e 's,@configure_input\@,Generated from $<; do not edit by hand.,g'
-e 's|@SHELL[@]|$(SHELL)|g' \
-e 's|@PERL[@]|$(PERL)|g' \
-e 's|@bindir[@]|$(bindir)|g' \
-e 's|@datadir[@]|$(pkgdatadir)|g' \
-e 's|@prefix[@]|$(prefix)|g' \
-e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
-e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
-e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \
-e 's|@M4[@]|$(M4)|g' \
-e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \
-e 's|@AWK[@]|$(AWK)|g' \
-e 's|@VERSION[@]|$(VERSION)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
# autoconf is written in M4sh.
AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh --cache ''
TAGS_DEPENDENCIES = $(EXTRA_DIST)
letters = abcdefghijklmnopqrstuvwxyz
LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -220,7 +240,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .m4 .m4f
$(srcdir)/Makefile.in: Makefile.am $(srcdir)/../lib/freeze.mk $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../lib/freeze.mk $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -232,7 +252,8 @@ $(srcdir)/Makefile.in: Makefile.am $(srcdir)/../lib/freeze.mk $(am__configure_d
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu bin/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
@@ -250,13 +271,13 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
$(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
else :; fi; \
done
@@ -264,12 +285,9 @@ uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
uninstall-info-am:
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -279,6 +297,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -290,10 +309,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -318,23 +338,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkinstalldirs) $(distdir)/../lib
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -349,7 +367,9 @@ check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -365,12 +385,12 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -395,12 +415,20 @@ info-am:
install-data-am:
install-dvi: install-dvi-am
install-exec-am: install-binSCRIPTS
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -419,20 +447,22 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
uninstall-am: uninstall-binSCRIPTS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
ctags distclean distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binSCRIPTS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-binSCRIPTS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binSCRIPTS uninstall-info-am
uninstall-am uninstall-binSCRIPTS
$(MY_AUTOM4TE): $(top_srcdir)/tests/wrapper.in
cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te
$(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in
cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg
@@ -440,7 +470,7 @@ $(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in
# output but comments and empty lines.
# If freezing produces output, something went wrong: a bad `divert',
# or an improper paren etc.
# It may happen that the output does not end with a end of line, hence
# It may happen that the output does not end with an end of line, hence
# force an end of line when reporting errors.
.m4.m4f:
$(MY_AUTOM4TE) \
@@ -453,8 +483,8 @@ $(build_libdir)/m4sugar/version.m4:
cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4
check-forbidden-patterns:
if (cd $(srcdir) && \
grep $(forbidden_patterns) $(forbidden_patterns_files)) \
@if (cd $(srcdir) && \
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
>forbidden.log; then \
echo "ERROR: forbidden patterns were found:" >&2; \
sed "s,^,$*.m4: ," <forbidden.log >&2; \
@@ -463,57 +493,28 @@ check-forbidden-patterns:
else \
rm -f forbidden.log; \
fi
$(srcdir)/autoconf.in: $(srcdir)/autoconf.as # FIXME: $(m4sh_m4f_dependencies)
$(AUTOM4SH) $(srcdir)/autoconf.as -o $@
autoconf: $(srcdir)/autoconf.in Makefile
rm -f autoconf autoconf.tmp
$(edit) $(srcdir)/autoconf.in >autoconf.tmp
chmod +x autoconf.tmp
chmod -w autoconf.tmp
mv -f autoconf.tmp autoconf
# autoconf is written in M4sh.
# FIXME: this target should depend on the frozen files below lib/m4sugar,
# otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
# installation below the same $(prefix); work around this with --melt.
autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
$(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
autoheader: $(srcdir)/autoheader.in Makefile
rm -f autoheader autoheader.tmp
$(edit) $(srcdir)/autoheader.in >autoheader.tmp
chmod +x autoheader.tmp
chmod -w autoheader.tmp
mv -f autoheader.tmp autoheader
$(bin_SCRIPTS): Makefile
rm -f $@ $@.tmp
$(edit) `test -f ./$@.in || echo $(srcdir)/`$@.in >$@.tmp
chmod +x $@.tmp
chmod a-w $@.tmp
mv $@.tmp $@
autom4te: $(srcdir)/autom4te.in Makefile
rm -f autom4te autom4te.tmp
$(edit) $(srcdir)/autom4te.in >autom4te.tmp
chmod +x autom4te.tmp
chmod -w autom4te.tmp
mv -f autom4te.tmp autom4te
autoreconf: $(srcdir)/autoreconf.in Makefile
rm -f autoreconf autoreconf.tmp
$(edit) $(srcdir)/autoreconf.in >autoreconf.tmp
chmod +x autoreconf.tmp
chmod -w autoreconf.tmp
mv -f autoreconf.tmp autoreconf
autoscan: $(srcdir)/autoscan.in Makefile
rm -f autoscan autoscan.tmp
$(edit) $(srcdir)/autoscan.in >autoscan.tmp
chmod +x autoscan.tmp
chmod -w autoscan.tmp
mv -f autoscan.tmp autoscan
autoupdate: $(srcdir)/autoupdate.in Makefile
rm -f autoupdate autoupdate.tmp
$(edit) $(srcdir)/autoupdate.in >autoupdate.tmp
chmod +x autoupdate.tmp
chmod -w autoupdate.tmp
mv -f autoupdate.tmp autoupdate
ifnames: $(srcdir)/ifnames.in Makefile
rm -f ifnames ifnames.tmp
$(edit) $(srcdir)/ifnames.in >ifnames.tmp
chmod +x ifnames.tmp
chmod -w ifnames.tmp
mv -f ifnames.tmp ifnames
autoconf: autoconf.in
autoheader: $(srcdir)/autoheader.in
autom4te: $(srcdir)/autom4te.in
autoreconf: $(srcdir)/autoreconf.in
autoscan: $(srcdir)/autoscan.in
autoupdate: $(srcdir)/autoupdate.in
ifnames: $(srcdir)/ifnames.in
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -1,7 +1,8 @@
AS_INIT[]dnl -*- shell-script -*-
# autoconf -- create `configure' using m4 macros
# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003,
# 2004, 2005, 2006 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
@@ -15,8 +16,8 @@ AS_INIT[]dnl -*- shell-script -*-
# 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.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
usage=["\
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
@@ -44,7 +45,7 @@ Warning categories include:
\`none' turn off all the warnings
\`error' warnings are error
The environment variable \`WARNINGS' is honored.
The environment variables \`M4' and \`WARNINGS' are honored.
Library directories:
-B, --prepend-include=DIR prepend directory DIR to search path
@@ -60,25 +61,24 @@ Report bugs to <bug-autoconf@gnu.org>."]
version=["\
autoconf (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie and Akim Demaille.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."]
me=`AS_BASENAME([$0])`
Written by David J. MacKenzie and Akim Demaille."]
help="\
Try \`$me --help' for more information."
Try \`$as_me --help' for more information."
exit_missing_arg="\
echo \"$me: option \\\`\$1' requires an argument\" >&2
echo \"$as_me: option \\\`\$1' requires an argument\" >&2
echo \"\$help\" >&2
exit 1"
# Variables.
: ${AUTOM4TE='@bindir@/@autom4te-name@'}
dir=`AS_DIRNAME([$0])`
autom4te_options=
outfile=
verbose=:
@@ -90,13 +90,13 @@ while test $# -gt 0 ; do
"x$1" : 'x-.\(.*\)'`]
case $1 in
--version | -V )
echo "$version" ; exit 0 ;;
echo "$version" ; exit ;;
--help | -h )
echo "$usage"; exit 0 ;;
echo "$usage"; exit ;;
--verbose | -v )
verbose=echo
AUTOM4TE="$AUTOM4TE $1"; shift ;;
autom4te_options="$autom4te_options $1"; shift ;;
# Arguments passed as is to autom4te.
--debug | -d | \
@@ -104,26 +104,25 @@ while test $# -gt 0 ; do
--include=* | -I?* | \
--prepend-include=* | -B?* | \
--warnings=* | -W?* )
AUTOM4TE="$AUTOM4TE $1"; shift ;;
autom4te_options="$autom4te_options '$1'"; shift ;;
# Options with separated arg passed as is to autom4te.
--include | -I | \
--prepend-include | -B | \
--include | -I | \
--prepend-include | -B | \
--warnings | -W )
test $# = 1 && eval "$exit_missing_arg"
AUTOM4TE="$AUTOM4TE $option $2"
shift 2 ;;
autom4te_options="$autom4te_options $option '$2'"
shift; shift ;;
--trace=* | -t?* )
traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'"
shift ;;
--trace | -t )
test $# = 1 && eval "$exit_missing_arg"
shift
traces="$traces --trace='"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'"
shift ;;
traces="$traces --trace='"`echo "$2" | sed "s/'/'\\\\\\\\''/g"`"'"
shift; shift ;;
--initialization | -i )
AUTOM4TE="$AUTOM4TE --melt"
autom4te_options="$autom4te_options --melt"
shift;;
--output=* | -o?* )
@@ -131,9 +130,8 @@ while test $# -gt 0 ; do
shift ;;
--output | -o )
test $# = 1 && eval "$exit_missing_arg"
shift
outfile=$1
shift ;;
outfile=$2
shift; shift ;;
-- ) # Stop option processing
shift; break ;;
@@ -141,7 +139,7 @@ while test $# -gt 0 ; do
break ;;
-* )
exec >&2
echo "$me: invalid option $1"
echo "$as_me: invalid option $1"
echo "$help"
exit 1 ;;
* )
@@ -154,21 +152,21 @@ case $# in
0)
if test -f configure.ac; then
if test -f configure.in; then
echo "$me: warning: both \`configure.ac' and \`configure.in' are present." >&2
echo "$me: warning: proceeding with \`configure.ac'." >&2
echo "$as_me: warning: both \`configure.ac' and \`configure.in' are present." >&2
echo "$as_me: warning: proceeding with \`configure.ac'." >&2
fi
infile=configure.ac
elif test -f configure.in; then
infile=configure.in
else
echo "$me: no input file" >&2
echo "$as_me: no input file" >&2
exit 1
fi
test -z "$traces" && test -z "$outfile" && outfile=configure;;
1) # autom4te doesn't like `-'.
test "x$1" != "x-" && infile=$1 ;;
*) exec >&2
echo "$me: invalid number of arguments."
echo "$as_me: invalid number of arguments."
echo "$help"
(exit 1); exit 1 ;;
esac
@@ -177,6 +175,8 @@ esac
test -z "$outfile" && outfile=-
# Run autom4te with expansion.
eval set \$AUTOM4TE --language=autoconf --output=\$outfile "$traces" \$infile
$verbose "$me: running $*" >&2
exec "$@"
eval set x $autom4te_options \
--language=autoconf --output=\$outfile "$traces" \$infile
shift
$verbose "$as_me: running $AUTOM4TE $*" >&2
exec "$AUTOM4TE" "$@"

View File

@@ -1,271 +0,0 @@
#! /bin/sh
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
# Support unset when possible.
if (as_foo=foo; unset as_foo) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
for as_var in \
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
fi
done
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
# autoconf -- create `configure' using m4 macros
# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003
# 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.
usage="\
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
Generate a configuration script from a TEMPLATE-FILE if given, or
\`configure.ac' if present, or else \`configure.in'. Output is sent
to the standard output if TEMPLATE-FILE is given, else into
\`configure'.
Operation modes:
-h, --help print this help, then exit
-V, --version print version number, then exit
-v, --verbose verbosely report processing
-d, --debug don't remove temporary files
-f, --force consider all files obsolete
-o, --output=FILE save output in FILE (stdout is the default)
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
Warning categories include:
\`cross' cross compilation issues
\`obsolete' obsolete constructs
\`syntax' dubious syntactic constructs
\`all' all the warnings
\`no-CATEGORY' turn off the warnings on CATEGORY
\`none' turn off all the warnings
\`error' warnings are error
The environment variable \`WARNINGS' is honored.
Library directories:
-B, --prepend-include=DIR prepend directory DIR to search path
-I, --include=DIR append directory DIR to search path
Tracing:
-t, --trace=MACRO report the list of calls to MACRO
-i, --initialization also trace Autoconf's initialization process
In tracing mode, no configuration script is created.
Report bugs to <bug-autoconf@gnu.org>."
version="\
autoconf (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie and Akim Demaille.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
me=`$as_basename $0 ||
$as_expr X/$0 : '.*/\([^/][^/]*\)/*$' \| \
X$0 : 'X\(//\)$' \| \
X$0 : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/$0 |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
help="\
Try \`$me --help' for more information."
exit_missing_arg="\
echo \"$me: option \\\`\$1' requires an argument\" >&2
echo \"\$help\" >&2
exit 1"
# Variables.
: ${AUTOM4TE='@bindir@/@autom4te-name@'}
dir=`(dirname $0) 2>/dev/null ||
$as_expr X$0 : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X$0 : 'X\(//\)[^/]' \| \
X$0 : 'X\(//\)$' \| \
X$0 : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X$0 |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
outfile=
verbose=:
# Parse command line.
while test $# -gt 0 ; do
option=`expr "x$1" : 'x\(--[^=]*\)' \| \
"x$1" : 'x\(-.\)'`
optarg=`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
"x$1" : 'x-.\(.*\)'`
case $1 in
--version | -V )
echo "$version" ; exit 0 ;;
--help | -h )
echo "$usage"; exit 0 ;;
--verbose | -v )
verbose=echo
AUTOM4TE="$AUTOM4TE $1"; shift ;;
# Arguments passed as is to autom4te.
--debug | -d | \
--force | -f | \
--include=* | -I?* | \
--prepend-include=* | -B?* | \
--warnings=* | -W?* )
AUTOM4TE="$AUTOM4TE $1"; shift ;;
# Options with separated arg passed as is to autom4te.
--include | -I | \
--prepend-include | -B | \
--warnings | -W )
test $# = 1 && eval "$exit_missing_arg"
AUTOM4TE="$AUTOM4TE $option $2"
shift 2 ;;
--trace=* | -t?* )
traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'"
shift ;;
--trace | -t )
test $# = 1 && eval "$exit_missing_arg"
shift
traces="$traces --trace='"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'"
shift ;;
--initialization | -i )
AUTOM4TE="$AUTOM4TE --melt"
shift;;
--output=* | -o?* )
outfile=$optarg
shift ;;
--output | -o )
test $# = 1 && eval "$exit_missing_arg"
shift
outfile=$1
shift ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
exec >&2
echo "$me: invalid option $1"
echo "$help"
exit 1 ;;
* )
break ;;
esac
done
# Find the input file.
case $# in
0)
if test -f configure.ac; then
if test -f configure.in; then
echo "$me: warning: both \`configure.ac' and \`configure.in' are present." >&2
echo "$me: warning: proceeding with \`configure.ac'." >&2
fi
infile=configure.ac
elif test -f configure.in; then
infile=configure.in
else
echo "$me: no input file" >&2
exit 1
fi
test -z "$traces" && test -z "$outfile" && outfile=configure;;
1) # autom4te doesn't like `-'.
test "x$1" != "x-" && infile=$1 ;;
*) exec >&2
echo "$me: invalid number of arguments."
echo "$help"
(exit 1); exit 1 ;;
esac
# Unless specified, the output is stdout.
test -z "$outfile" && outfile=-
# Run autom4te with expansion.
eval set \$AUTOM4TE --language=autoconf --output=\$outfile "$traces" \$infile
$verbose "$me: running $*" >&2
exec "$@"

View File

@@ -6,8 +6,9 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
if 0;
# autoheader -- create `config.h.in' from `configure.ac'
# Copyright (C) 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 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
@@ -21,8 +22,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
# 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.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# Written by Roland McGrath.
# Rewritten in Perl by Akim Demaille.
@@ -86,11 +87,12 @@ Report bugs to <bug-autoconf\@gnu.org>.
# $VERSION
# --------
$version = "autoheader (@PACKAGE_NAME@) @VERSION@
Written by Roland McGrath and Akim Demaille.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Akim Demaille.
";
@@ -142,7 +144,7 @@ if ($config_h_top || $config_h_bot || $acconfig_h)
is deprecated and discouraged.
Using the third argument of \`AC_DEFINE\' and
\`AC_DEFINE_UNQUOTED\' allows to define a template without
\`AC_DEFINE_UNQUOTED\' allows one to define a template without
\`acconfig.h\':
AC_DEFINE([NEED_FUNC_MAIN], 1,
@@ -156,9 +158,9 @@ END
}
# Set up autoconf.
my $autoconf = "$autom4te --language=autoconf ";
$autoconf .= join (' ', map { "--include=$_" } @include);
$autoconf .= join (' ', map { "--prepend-include=$_" } @prepend_include);
my $autoconf = "'$autom4te' --language=autoconf ";
$autoconf .= join (' ', map { "--include='$_'" } @include);
$autoconf .= join (' ', map { "--prepend-include='$_'" } @prepend_include);
$autoconf .= ' --debug' if $debug;
$autoconf .= ' --force' if $force;
$autoconf .= ' --verbose' if $verbose;
@@ -181,8 +183,11 @@ local (%verbatim, %symbol);
debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $tmp/traces.pl`;
do "$tmp/traces.pl";
warn "couldn't parse $tmp/traces.pl: $@" if $@;
error "error: AC_CONFIG_HEADERS not found in $ARGV[0]"
unless $config_h;
unless ($config_h)
{
error "error: AC_CONFIG_HEADERS not found in $ARGV[0]";
exit 1;
}
# We template only the first CONFIG_HEADER.
$config_h =~ s/ .*//;
@@ -276,7 +281,7 @@ $out->close;
if keys %symbol;
}
update_file ("$tmp/config.hin", "$config_h_in");
update_file ("$tmp/config.hin", "$config_h_in", $force);
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:

View File

@@ -6,7 +6,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
if 0;
# autom4te - Wrapper around M4 libraries.
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2005, 2006 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
@@ -20,8 +20,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
# 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.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
BEGIN
@@ -95,7 +95,7 @@ fatal "need GNU m4 1.4 or later: $m4"
# Set some high recursion limit as the default limit, 250, has already
# been hit with AC_OUTPUT. Don't override the user's choice.
$m4 .= ' --nesting-limit=1024'
if " $m4 " !~ / (--nesting-limit|-L) /;
if " $m4 " !~ / (--nesting-limit(=[0-9]+)?|-L[0-9]*) /;
# @M4_BUILTIN -- M4 builtins and a useful comment.
@@ -191,7 +191,7 @@ Languages include:
" . Autom4te::ChannelDefs::usage . "
The environment variable \`WARNINGS\' is honored.
The environment variables \`M4\' and \`WARNINGS\' are honored.
Library directories:
-B, --prepend-include=DIR prepend directory DIR to search path
@@ -211,11 +211,12 @@ Report bugs to <bug-autoconf\@gnu.org>.
# --------
$version = <<"EOF";
autom4te (@PACKAGE_NAME@) @VERSION@
Written by Akim Demaille.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Akim Demaille.
EOF
@@ -448,23 +449,20 @@ sub handle_m4 ($@)
{
my ($req, @macro) = @_;
# GNU m4 appends when using --error-output.
# GNU m4 appends when using --debugfile/--error-output.
unlink ($tcache . $req->id . "t");
# Run m4.
#
# Neutralize its stdin, so that GNU M4 1.5 doesn't neutralize SIGINT.
#
# We don't output directly to the cache files, to avoid problems
# when we are interrupted (that leaves corrupted files).
xsystem ("$m4"
. join (' --include=', '', @include)
. ' --debug=aflq'
. (!exists $ENV{'AUTOM4TE_NO_FATAL'} ? ' --fatal-warning' : '')
. " --error-output=$tcache" . $req->id . "t"
. " @M4_DEBUGFILE@=$tcache" . $req->id . "t"
. join (' --trace=', '', sort @macro)
. " " . files_to_options (@ARGV)
. ' </dev/null'
. " >$ocache" . $req->id . "t");
# Everything went ok: preserve the outputs.
@@ -572,7 +570,7 @@ sub handle_output ($$)
foreach (split (/\W+/))
{
$prohibited{$_} = $.
if /$forbidden/o && !/$allowed/o && ! exists $prohibited{$_};
if !/^$/ && /$forbidden/o && !/$allowed/o && ! exists $prohibited{$_};
}
# Performed *last*: the empty quadrigraph.
@@ -836,7 +834,7 @@ EOF
# It makes no sense to try to transform __oline__.
s/\@<:\@/[/g;
s/\@:>\@/]/g;
s/\@\$\|\@/\$/g;
s/\@S\|\@/\$/g;
s/\@%:\@/#/g;
s/\@&t\@//g;
print $out $_;
@@ -986,7 +984,7 @@ $req->valid (0)
# We now know whether we can trust the Request object. Say it.
verb "the trace request object is:\n" . $req->marshall;
# We need to run M4 if (i) the users wants it (--force), (ii) $REQ is
# We need to run M4 if (i) the user wants it (--force), (ii) $REQ is
# invalid.
handle_m4 ($req, keys %{$req->macro})
if $force || ! $req->valid;
@@ -1025,10 +1023,10 @@ if (%trace)
}
else
{
# Actual M4 expansion, only if $output is too old. STDOUT is
# pretty old.
# Actual M4 expansion, if the user wants it, or if $output is old
# (STDOUT is pretty old).
handle_output ($req, $output)
if mtime ($output) < mtime ($ocache . $req->id);
if $force || mtime ($output) < mtime ($ocache . $req->id);
}
# If we ran up to here, the cache is valid.

View File

@@ -6,7 +6,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
if 0;
# autoreconf - install the GNU Build System in a directory tree
# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -21,8 +21,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
# 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.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# Written by David J. MacKenzie.
# Extended and rewritten in Perl by Akim Demaille.
@@ -55,16 +55,16 @@ use strict;
# $HELP
# -----
$help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ...
$help = "Usage: $0 [OPTION] ... [DIRECTORY] ...
Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint'
(formerly `gettextize'), and `libtoolize' where appropriate)
repeatedly to remake the GNU Build System files in the DIRECTORIES or
the directory trees driven by CONFIGURE-AC (defaulting to `.').
repeatedly to remake the GNU Build System files in specified
DIRECTORIES and their subdirectories (defaulting to `.').
By default, it only remakes those files that are older than their
predecessors. If you install new versions of the GNU Build System,
running `autoreconf' remakes all of the files by giving it the
sources. If you install new versions of the GNU Build System,
you can make `autoreconf' remake all of the files by giving it the
`--force' option.
Operation modes:
@@ -74,6 +74,7 @@ Operation modes:
-d, --debug don't remove temporary files
-f, --force consider all files obsolete
-i, --install copy missing auxiliary files
--no-recursive don't rebuild sub-packages
-s, --symlink with -i, install symbolic links instead of copies
-m, --make when applicable, re-run ./configure && make
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
@@ -88,7 +89,7 @@ Library directories:
-I, --include=DIR append directory DIR to search path
The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
AUTOPOINT, LIBTOOLIZE are honored.
AUTOPOINT, LIBTOOLIZE, M4 are honored.
Report bugs to <bug-autoconf\@gnu.org>.
";
@@ -96,11 +97,12 @@ Report bugs to <bug-autoconf\@gnu.org>.
# $VERSION
# --------
$version = "autoreconf (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie and Akim Demaille.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by David J. MacKenzie and Akim Demaille.
";
# Lib files.
@@ -117,6 +119,8 @@ my $install = 0;
my $symlink = 0;
# Does aclocal support --force?
my $aclocal_supports_force = 0;
# Does automake support --force-missing?
my $automake_supports_force_missing = 0;
my @prepend_include;
my @include;
@@ -127,6 +131,9 @@ my @warning;
# Rerun `./configure && make'?
my $make = 0;
# Recurse into subpackages
my $recursive = 1;
## ---------- ##
## Routines. ##
## ---------- ##
@@ -144,7 +151,8 @@ sub parse_args ()
'B|prepend-include=s' => \@prepend_include,
'i|install' => \$install,
's|symlink' => \$symlink,
'm|make' => \$make);
'm|make' => \$make,
'recursive!' => \$recursive);
# Split the warnings as a list of elements instead of a list of
# lists.
@@ -172,6 +180,7 @@ sub parse_args ()
}
$aclocal_supports_force = `$aclocal --help` =~ /--force/;
$automake_supports_force_missing = `$automake --help` =~ /--force-missing/;
# Dispatch autoreconf's option to the tools.
# --include;
@@ -194,7 +203,8 @@ sub parse_args ()
if $aclocal_supports_force;
$autoconf .= ' --force';
$autoheader .= ' --force';
$automake .= ' --force-missing';
$automake .= ' --force-missing'
if $automake_supports_force_missing;
$autopoint .= ' --force';
$libtoolize .= ' --force';
}
@@ -207,13 +217,18 @@ sub parse_args ()
$automake .= ' --no-force'
if $aclocal_supports_force;
}
# --debug;
if ($debug)
# --verbose --verbose or --debug;
if ($verbose > 1 || $debug)
{
$autoconf .= ' --verbose --debug';
$autoheader .= ' --verbose --debug';
$autoconf .= ' --verbose';
$autoheader .= ' --verbose';
$automake .= ' --verbose';
$aclocal .= ' --verbose';
}
if ($debug)
{
$autoconf .= ' --debug';
$autoheader .= ' --debug';
$libtoolize .= ' --debug';
}
# --warnings;
@@ -293,7 +308,7 @@ sub run_aclocal ($$)
# -----------------------------
sub autoreconf_current_directory ()
{
my $configure_ac = require_configure_ac;
my $configure_ac = find_configure_ac;
# ---------------------- #
# Is it using Autoconf? #
@@ -301,16 +316,18 @@ sub autoreconf_current_directory ()
my $uses_autoconf;
my $uses_gettext;
my $configure_ac_file = new Autom4te::XFile $configure_ac;
while ($_ = $configure_ac_file->getline)
{
s/#.*//;
s/dnl.*//;
$uses_autoconf = 1 if /AC_INIT/;
# See below for why we look for gettext here.
$uses_gettext = 1 if /^AM_GNU_GETTEXT_VERSION/;
}
if (-f $configure_ac)
{
my $configure_ac_file = new Autom4te::XFile $configure_ac;
while ($_ = $configure_ac_file->getline)
{
s/#.*//;
s/dnl.*//;
$uses_autoconf = 1 if /AC_INIT/;
# See below for why we look for gettext here.
$uses_gettext = 1 if /^AM_GNU_GETTEXT_VERSION/;
}
}
if (!$uses_autoconf)
{
verb "$configure_ac: not using Autoconf";
@@ -397,7 +414,7 @@ sub autoreconf_current_directory ()
}
else
{
# Some filesystems have sub-second time stamps, and if so we may
# Some file systems have sub-second time stamps, and if so we may
# run into trouble later, after we rerun autoconf and set the
# time stamps of input files to be no greater than aclocal.m4,
# because the time-stamp-setting operation (utime) has a
@@ -426,7 +443,9 @@ sub autoreconf_current_directory ()
my $aux_dir;
my $uses_gettext_via_traces;
my $uses_libtool;
my $uses_libltdl;
my $uses_autoheader;
my $uses_automake;
my @subdir;
verb "$configure_ac: tracing";
my $traces = new Autom4te::XFile
@@ -439,7 +458,10 @@ sub autoreconf_current_directory ()
'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1',
'AC_INIT',
'AC_PROG_LIBTOOL',
'LT_INIT',
'LT_CONFIG_LTDL_DIR',
'AM_GNU_GETTEXT',
'AM_INIT_AUTOMAKE',
)
. ' |');
while ($_ = $traces->getline)
@@ -447,9 +469,11 @@ sub autoreconf_current_directory ()
$aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/;
$uses_autoconf = 1 if /AC_INIT/;
$uses_gettext_via_traces = 1 if /AM_GNU_GETTEXT/;
$uses_libtool = 1 if /AC_PROG_LIBTOOL/;
$uses_libtool = 1 if /(AC_PROG_LIBTOOL|LT_INIT)/;
$uses_libltdl = 1 if /LT_CONFIG_LTDL_DIR/;
$uses_autoheader = 1 if /AC_CONFIG_HEADERS/;
push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/;
$uses_automake = 1 if /AM_INIT_AUTOMAKE/;
push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/ && $recursive;
}
# The subdirs are *optional*, they may not exist.
@@ -457,7 +481,7 @@ sub autoreconf_current_directory ()
{
if (-d)
{
verb "$configure_ac: subdirectory $_ to autoreconf";
verb "$configure_ac: adding subdirectory $_ to autoreconf";
autoreconf ($_);
}
else
@@ -486,7 +510,7 @@ sub autoreconf_current_directory ()
if (defined $aux_dir && ! -d $aux_dir)
{
verb "$configure_ac: creating directory $aux_dir";
mkdir $aux_dir
mkdir $aux_dir, 0755
or error "cannot create $aux_dir: $!";
}
@@ -501,6 +525,10 @@ sub autoreconf_current_directory ()
}
elsif ($install)
{
if ($uses_libltdl)
{
$libtoolize .= " --ltdl";
}
xsystem ($libtoolize);
$rerun_aclocal = 1;
}
@@ -570,8 +598,7 @@ sub autoreconf_current_directory ()
# Running automake. #
# ------------------ #
# Assumes that there is a Makefile.am in the topmost directory.
if (!-f 'Makefile.am')
if (!$uses_automake)
{
verb "$configure_ac: not using Automake";
}
@@ -645,10 +672,11 @@ mktmpdir ('ar');
$ENV{'TMPDIR'} = $tmp;
parse_args;
# Autoreconf all the given configure.ac. A while loop, not a for,
# since the list can change at runtime because of AC_CONFIG_SUBDIRS.
# Autoreconf all the given configure.ac. Unless `--no-recursive' is passed,
# AC_CONFIG_SUBDIRS will be traversed in &autoreconf_current_directory.
for my $directory (@ARGV)
{
require_configure_ac ($directory);
autoreconf ($directory);
}

View File

@@ -1,7 +1,9 @@
#! @PERL@ -w
# -*- perl -*-
# @configure_input@
# autoscan - Create configure.scan (a preliminary configure.ac) for a package.
# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -16,8 +18,8 @@
# 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.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# Written by David MacKenzie <djm@gnu.ai.mit.edu>.
@@ -45,7 +47,7 @@ use File::Basename;
use File::Find;
use strict;
use vars qw(@cfiles @makefiles @shfiles %printed);
use vars qw(@cfiles @makefiles @shfiles @subdirs %printed);
# The kind of the words we are looking for.
my @kinds = qw (function header identifier program
@@ -89,7 +91,7 @@ my %needed_macros =
);
my $configure_scan = 'configure.scan';
my $log = new Autom4te::XFile ">$me.log";
my $log;
# Autoconf and lib files.
my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
@@ -121,11 +123,13 @@ Report bugs to <bug-autoconf\@gnu.org>.\n";
# $version
# --------
$version = "autoscan (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie and Akim Demaille.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
Written by David J. MacKenzie and Akim Demaille.
";
@@ -229,17 +233,17 @@ sub used ($$;$)
## ----------------------- ##
# scan_c_file ($FILENAME)
# -----------------------
# scan_c_file ($FILE-NAME)
# ------------------------
sub scan_c_file ($)
{
my ($filename) = @_;
my ($file_name) = @_;
push @cfiles, $File::Find::name;
# Nonzero if in a multiline comment.
my $in_comment = 0;
my $file = new Autom4te::XFile "<$filename";
my $file = new Autom4te::XFile "<$file_name";
while ($_ = $file->getline)
{
@@ -302,10 +306,10 @@ sub scan_c_file ($)
# -----------------------------
sub scan_makefile ($)
{
my ($filename) = @_;
my ($file_name) = @_;
push @makefiles, $File::Find::name;
my $file = new Autom4te::XFile "<$filename";
my $file = new Autom4te::XFile "<$file_name";
while ($_ = $file->getline)
{
@@ -344,10 +348,10 @@ sub scan_makefile ($)
# --------------------------------
sub scan_sh_file ($)
{
my ($filename) = @_;
my ($file_name) = @_;
push @shfiles, $File::Find::name;
my $file = new Autom4te::XFile "<$filename";
my $file = new Autom4te::XFile "<$file_name";
while ($_ = $file->getline)
{
@@ -369,7 +373,7 @@ sub scan_sh_file ($)
# scan_file ()
# ------------
# Called by &find on each file. $_ contains the current filename with
# Called by &find on each file. $_ contains the current file name with
# the current directory of the walk through.
sub scan_file ()
{
@@ -383,6 +387,15 @@ sub scan_file ()
# Strip a useless leading `./'.
$File::Find::name =~ s,^\./,,;
if ($_ ne '.' and -d $_ and
-f "$_/configure.in" ||
-f "$_/configure.ac" ||
-f "$_/configure.gnu" ||
-f "$_/configure")
{
$File::Find::prune = 1;
push @subdirs, $File::Find::name;
}
if (/\.[chlym](\.in)?$/)
{
used 'program', 'cc', $File::Find::name;
@@ -528,6 +541,7 @@ sub output ($)
output_kind ($file, 'identifier');
output_kind ($file, 'function');
print $file "\n";
if (@makefiles)
{
# Change DIR/Makefile.in to DIR/Makefile.
@@ -536,10 +550,16 @@ sub output ($)
$m =~ s/\.(?:in|am)$//;
$unique_makefiles{$m}++;
}
print $file ("\nAC_CONFIG_FILES([",
print $file ("AC_CONFIG_FILES([",
join ("\n ",
sort keys %unique_makefiles), "])\n");
}
if (@subdirs)
{
print $file ("AC_CONFIG_SUBDIRS([",
join ("\n ",
sort @subdirs), "])\n");
}
print $file "AC_OUTPUT\n";
$file->close;
@@ -618,6 +638,8 @@ sub check_configure_ac ($)
## -------------- ##
parse_args;
$log = new Autom4te::XFile ">$me.log";
$autoconf .= " --debug" if $debug;
$autoconf .= " --verbose" if $verbose;
$autoconf .= join (' --include=', '', @include);
@@ -627,7 +649,7 @@ my $configure_ac = find_configure_ac;
init_tables;
scan_files;
output ('configure.scan');
if ($configure_ac)
if (-f $configure_ac)
{
check_configure_ac ($configure_ac);
}

View File

@@ -1,7 +1,9 @@
#! @PERL@ -w
# -*- perl -*-
# @configure_input@
# autoupdate - modernize an Autoconf file.
# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -16,8 +18,8 @@
# 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.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# Originally written by David MacKenzie <djm@gnu.ai.mit.edu>.
# Rewritten by Akim Demaille <akim@freefriends.org>.
@@ -82,11 +84,12 @@ Report bugs to <bug-autoconf\@gnu.org>.
# $VERSION
# --------
$version = "autoupdate (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie and Akim Demaille.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by David J. MacKenzie and Akim Demaille.
";
## ---------- ##
@@ -113,97 +116,61 @@ sub parse_args ()
}
# ------------- #
# M4 builtins. #
# ------------- #
my @m4_builtins;
# &handle_m4_symbols ()
# ---------------------
# Create the following $tmp files:
# m4.m4 -- enable the m4 builtins.
# unm4.m4 -- disable the m4 builtins.
# savem4.m4 -- save the m4 builtins.
sub handle_m4_macros ()
{
# Get the list of builtins.
xsystem ("echo dumpdef | $m4 2>$tmp/m4.defs >/dev/null");
my $m4_defs = new Autom4te::XFile "$tmp/m4.defs";
while ($_ = $m4_defs->getline)
{
push @m4_builtins, $1
if /^(\w+):/;
}
$m4_defs->close;
# Output the files.
my $m4_m4 = new Autom4te::XFile ">$tmp/m4.m4";
print $m4_m4 "# m4.m4 -- enable the m4 builtins.\n";
my $unm4_m4 = new Autom4te::XFile ">$tmp/unm4.m4";
print $unm4_m4 "# unm4.m4 -- disable the m4 builtins.\n";
print $unm4_m4 "# Because Autoconf, via M4sugar, redefines some of these\n";
print $unm4_m4 "# macros, and therefore since unac.m4 disables them,\n";
print $unm4_m4 "# disable only if defined.\n";
my $m4save_m4 = new Autom4te::XFile ">$tmp/m4save.m4";
print $m4save_m4 "# savem4.m4 -- save the m4 builtins.\n";
foreach (@m4_builtins)
{
print $m4save_m4 "define([_au_$_], defn([$_]))\n";
print $unm4_m4 "_au_ifdef([$_], [_au_undefine([$_])])\n";
print $m4_m4 "_au_define([$_], _au_defn([_au_$_]))\n";
}
}
# ----------------- #
# Autoconf macros. #
# ----------------- #
# @AU_MACROS & AC_MACROS -- AU and AC macros and yet another useful comment.
my (%ac_macros, %au_macros);
my (%ac_macros, %au_macros, %m4_builtins);
# HANDLE_AUTOCONF_MACROS ()
# -------------------------
# @M4_BUILTINS -- M4 builtins and a useful comment.
sub handle_autoconf_macros ()
{
# Get the builtins.
xsystem ("echo dumpdef | $m4 2>$tmp/m4.defs >/dev/null");
my $m4_defs = new Autom4te::XFile "$tmp/m4.defs";
while ($_ = $m4_defs->getline)
{
$m4_builtins{$1} = 1
if /^(\w+):/;
}
$m4_defs->close;
my $macros = new Autom4te::XFile ("$autoconf"
. " --trace AU_DEFUN:'AU:\$f:\$1'"
. " --trace AU_DEFINE:'AU:\$f:\$1'"
. " --trace define:'AC:\$f:\$1'"
. " --melt /dev/null |");
while ($_ = $macros->getline)
{
chomp;
my ($domain, $file, $macro) = /^(AC|AU):(.*):([^:]*)$/ or next;
# ../lib/m4sugar/m4sugar.m4 -> m4sugar
# ../lib/autoconf/general.m4 -> autoconf
# aclocal.m4 -> aclocal
my $set = basename (dirname ($file));
$set = 'aclocal' if $file eq 'aclocal.m4';
error "unknown set: $set: $_"
unless $set =~ /^(m4sugar|aclocal|autoconf)$/;
if ($domain eq "AC")
if ($domain eq "AU")
{
$ac_macros{$macro} = $set;
$au_macros{$macro} = 1;
}
elsif ($file =~ /(^|\/)m4sugar\/(m4sugar|version)\.m4$/)
{
# Add the m4sugar macros to m4_builtins.
$m4_builtins{$macro} = 1;
}
else
{
$au_macros{$macro} = $set;
# Autoconf, aclocal, and m4sh macros.
$ac_macros{$macro} = 1;
}
}
$macros->close;
# Don't keep AU macros in @AC_MACROS.
delete $ac_macros{$_}
foreach (keys %au_macros);
# Don't keep M4sugar macros which are redefined by Autoconf,
# such as `builtin', `changequote' etc. See autoconf/autoconf.m4.
delete $ac_macros{$_}
foreach (@m4_builtins);
foreach (keys %m4_builtins);
error "no current Autoconf macros found"
unless keys %ac_macros;
error "no obsolete Autoconf macros found"
@@ -223,10 +190,26 @@ sub handle_autoconf_macros ()
print $ac_m4 "# ac.m4 -- autoquoting definitions of the AC macros.\n";
my $unac_m4 = new Autom4te::XFile ">$tmp/unac.m4";
print $unac_m4 "# unac.m4 -- undefine the AC macros.\n";
foreach (sort grep { $ac_macros{$_} ne 'm4sugar' } keys %ac_macros)
foreach (sort keys %ac_macros)
{
print $ac_m4 "_au_define([$_], [[\$0(\$\@)]])\n";
print $unac_m4 "_au_undefine([$_])\n";
print $ac_m4 "_au_m4_define([$_], [m4_if(\$#, 0, [[\$0]], [[\$0(\$\@)]])])\n";
print $unac_m4 "_au_m4_undefine([$_])\n";
}
# m4save.m4 -- save the m4 builtins.
# unm4.m4 -- disable the m4 builtins.
# m4.m4 -- enable the m4 builtins.
my $m4save_m4 = new Autom4te::XFile ">$tmp/m4save.m4";
print $m4save_m4 "# m4save.m4 -- save the m4 builtins.\n";
my $unm4_m4 = new Autom4te::XFile ">$tmp/unm4.m4";
print $unm4_m4 "# unm4.m4 -- disable the m4 builtins.\n";
my $m4_m4 = new Autom4te::XFile ">$tmp/m4.m4";
print $m4_m4 "# m4.m4 -- enable the m4 builtins.\n";
foreach (sort keys %m4_builtins)
{
print $m4save_m4 "_au__save([$_])\n";
print $unm4_m4 "_au__undefine([$_])\n";
print $m4_m4 "_au__restore([$_])\n";
}
}
@@ -243,15 +226,14 @@ $autoconf .= join (' --include=', '', @include);
$autoconf .= join (' --prepend-include=', '', @prepend_include);
mktmpdir ('au');
handle_m4_macros;
handle_autoconf_macros;
# $au_changequote -- enable the quote `[', `]' right before any AU macro.
my $au_changequote =
's/\b(' . join ('|', keys %au_macros) . ')\b/_au_changequote([,])$1/g';
's/\b(' . join ('|', keys %au_macros) . ')\b/_au_m4_changequote([,])$1/g';
# au.m4 -- definitions the AU macros.
xsystem ("$autoconf --trace AU_DEFUN:'_au_defun(\@<:\@\$1\@:>\@,
xsystem ("$autoconf --trace AU_DEFINE:'_au_defun(\@<:\@\$1\@:>\@,
\@<:\@\$2\@:>\@)' --melt /dev/null "
. ">$tmp/au.m4");
@@ -263,7 +245,6 @@ xsystem ("$autoconf --trace AU_DEFUN:'_au_defun(\@<:\@\$1\@:>\@,
foreach my $file (@ARGV)
{
my $filename = $file;
# We need an actual file.
if ($file eq '-')
{
@@ -280,22 +261,41 @@ foreach my $file (@ARGV)
# input file.
my $input_m4 = <<\EOF;
divert(-1) -*- Autoconf -*-
changequote([, ])
changequote([,])
# Define our special macros:
define([_au__defn], defn([defn]))
define([_au__divert], defn([divert]))
define([_au__include], defn([include]))
define([_au__undefine], defn([undefine]))
define([_au__save], [m4_ifdef([$1], [m4_copy([$1], [_au_$1])])])
define([_au__restore],
[_au_m4_ifdef([_au_$1],
[_au_m4_define([$1], _au__defn([_au_$1]))])])
# Set up m4sugar.
include(m4sugar/m4sugar.m4)
# Redefine __file__ to make warnings nicer; $file is replaced below.
m4_define([__file__], [$file])
# Redefine m4_location to fix the line number.
m4_define([m4_location], [__file__:m4_eval(__line__ - _au__first_line)])
# Move all the builtins into the `_au_' pseudo namespace
include([m4save.m4])
m4_include([m4save.m4])
# _au_defun(NAME, BODY)
# ---------------------
# Define NAME to BODY, plus AU activation/deactivation.
_au_define([_au_defun],
[_au_define([$1],
_au_m4_define([_au_defun],
[_au_m4_define([$1],
[_au_enable()dnl
$2[]dnl
_au_disable()])])
# Import the definition of the obsolete macros.
_au_include([au.m4])
_au__include([au.m4])
## ------------------------ ##
@@ -313,52 +313,49 @@ foreach my $file (@ARGV)
# __au_enable
# -----------
# Reenable the builtins, and m4sugar.
_au_define([__au_enable],
[_au_divert(-1)
# Reenable the builtins, m4sugar, and the autoquoting AC macros.
_au_m4_define([__au_enable],
[_au__divert(-1)
# Enable special characters.
_au_changecom([#])
_au_m4_changecom([#])
# Enable the m4 builtins, m4sugar and the autoquoting AC macros.
_au_include([m4.m4])
_au_include([m4sugar/m4sugar.m4])
_au_include([ac.m4])
_au__include([m4.m4])
_au__include([ac.m4])
_au_divert(0)])
_au__divert(0)])
# _au_enable
# ----------
# Called at the beginning of all the obsolete macros. Reenable the
# builtins, and m4sugar if needed.
_au_define([_au_enable],
[_au_ifdef([_au_enabled],
# Called at the beginning of all the obsolete macros. If this is the
# outermost level, call __au_enable.
_au_m4_define([_au_enable],
[_au_m4_ifdef([_au_enabled],
[],
[__au_enable()])_au_dnl
_au_pushdef([_au_enabled])])
_au_m4_pushdef([_au_enabled])])
# __au_disable
# ------------
# Disable the builtins, and m4sugar.
_au_define([__au_disable],
[_au_divert(-1)
# Disable m4sugar, the AC autoquoting macros, and m4.
_au_include([unac.m4])
_au_include([unm4.m4])
# Disable the AC autoquoting macros, m4sugar, and m4.
_au_m4_define([__au_disable],
[_au__divert(-1)
_au__include([unac.m4])
_au__include([unm4.m4])
# Disable special characters.
_au_changequote()
_au_changecom()
_au_m4_changequote()
_au_m4_changecom()
_au_divert(0)])
_au__divert(0)])
# _au_disable
# -----------
# Called at the end of all the obsolete macros. Disable the
# builtins, and m4sugar if needed..
_au_define([_au_disable],
[_au_popdef([_au_enabled])_au_dnl
_au_ifdef([_au_enabled],
# Called at the end of all the obsolete macros. If we are at the
# outermost level, call __au_disable.
_au_m4_define([_au_disable],
[_au_m4_popdef([_au_enabled])_au_dnl
_au_m4_ifdef([_au_enabled],
[],
[__au_disable()])])
@@ -366,19 +363,19 @@ foreach my $file (@ARGV)
## ------------------------------- ##
## Disable, and process the file. ##
## ------------------------------- ##
_au_divert(-1)
# Disable m4: M4sugar and the AC autoquoting macros are not loaded yet,
# hence invoking `_au_disable' is wrong.
_au_include([unm4.m4])
# The AC autoquoting macros are not loaded yet, hence invoking
# `_au_disable' would be wrong.
_au__include([unm4.m4])
# Disable special characters.
_au_changequote()
_au_changecom()
# Disable special characters, and set the first line number.
_au_m4_changequote()
_au_m4_changecom()
_au_divert(0)_au_dnl
_au_m4_define(_au__first_line, _au___line__)_au__divert(0)_au_dnl
EOF
$input_m4 =~ s/^ //mg;
$input_m4 =~ s/\$file/$file/g;
# prepared input -- input, but reenables the quote before each AU macro.
open INPUT_M4, ">$tmp/input.m4"
@@ -414,7 +411,7 @@ exit 0;
# The task of `autoupdate' is not trivial: the biggest difficulty being
# that you must limit the changes to the parts that really need to be
# updated. Finding a satisfying implementation proved to be quite hard,
# as this is the fourth implementation of `autoupdate'.
# as this is the fifth implementation of `autoupdate'.
#
# Below, we will use a simple example of obsolete macro:
#
@@ -597,7 +594,7 @@ exit 0;
# strings which can become quickly huge, which slows it significantly.
#
# In particular one should avoid as much as possible to use `define' for
# temporaries. Now that `define' as quite a complex meaning, it is an
# temporaries. Now that `define' has quite a complex meaning, it is an
# expensive operations that should be limited to macros. Use
# `m4_define' for temporaries.
#
@@ -712,7 +709,7 @@ exit 0;
# No big deal for the semantics (unless the macro depends upon $#, which
# is bad), but the users would not be happy.
#
# Additionally, we introduced quotes that we not there before, which is
# Additionally, we introduced quotes that were not there before, which is
# OK in most cases, but could change the semantics of the file.
#
# Cruel dilemma: we do want the auto-quoting definition of `NEW' when
@@ -884,7 +881,7 @@ exit 0;
# # ------------------------------
#
# This approach is heavily based on traces, but then there is an obvious
# problem: non expanded code will never be seen/ In particular, the body
# problem: non expanded code will never be seen. In particular, the body
# of a `define' definition is not seen, so on the input
#
# define([idem], [OLD(0, [$1])])
@@ -950,11 +947,11 @@ exit 0;
# this:
#
# `m4save.m4'
# moves the m4 builtins into the `_au_' pseudo namespace
# moves the m4 builtins into the `_au_' pseudo namespace,
# `unm4.m4'
# undefines the builtins
# undefines the builtins,
# `m4.m4'
# restores them
# restores them.
#
# So `input.m4' is:
#

View File

@@ -7,8 +7,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
# ifnames - print the identifiers used in C preprocessor conditionals
# Copyright (C) 1994, 1995, 1999, 2000, 2001, 2002, 2003 Free Software
# Foundation, Inc.
# Copyright (C) 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2005, 2006
# 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
@@ -22,8 +22,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
# 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.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# Reads from stdin if no files are given.
# Writes to stdout.
@@ -66,11 +66,12 @@ Report bugs to <bug-autoconf\@gnu.org>.
# $VERSION
# --------
$version = "ifnames (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie and Paul Eggert.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by David J. MacKenzie and Paul Eggert.
";
@@ -88,12 +89,12 @@ sub parse_args ()
my %occurrence;
# &scan_file ($FILENAME)
# ----------------------
# &scan_file ($FILE-NAME)
# -----------------------
sub scan_file ($)
{
my ($filename) = @_;
my $file = new Autom4te::XFile ($filename);
my ($file_name) = @_;
my $file = new Autom4te::XFile ($file_name);
while ($_ = $file->getline)
{
# Continuation lines.
@@ -111,7 +112,7 @@ sub scan_file ($)
{
next
if $word eq 'defined' || $word !~ /^[a-zA-Z_]/;
$occurrence{$word}{$filename} = 1;
$occurrence{$word}{$file_name} = 1;
}
}
}