+2003-12-24
+ * added libzzipmmap.la with a simplified interface to zip archives
+ * added bins unzzipdir and unzzipcat to show usage of libzzipmmap.la
+ * introduce zzip/types.h to allow easier inclusion to zzip/mmapped.*
+
2003-12-22
* add AC_C_BIGENDIAN and
* move out ZZIP_GET to zzip/fetch.h where we also specify access
-# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# Makefile.in generated by automake 1.7.6 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# PARTICULAR PURPOSE.
@SET_MAKE@
-SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
-
-EXEEXT = @EXEEXT@
-OBJEXT = @OBJEXT@
-PATH_SEPARATOR = @PATH_SEPARATOR@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
CONFIG_FILES = @CONFIG_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
-LTREL = @LTREL@
-LTVER = @LTVER@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAJOR = @MAJOR@
-MICRO = @MICRO@
-MINOR = @MINOR@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
MKZIP = @MKZIP@
-OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
-PATCH = @PATCH@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
+RELEASE_INFO = @RELEASE_INFO@
RESOLVES = @RESOLVES@
SDL = @SDL@
-SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
THREAD_SAFE = @THREAD_SAFE@
VERSION = @VERSION@
+VERSION_INFO = @VERSION_INFO@
XMLTO = @XMLTO@
ZIPTESTS = @ZIPTESTS@
ZLIB_INCL = @ZLIB_INCL@
ZLIB_LDIR = @ZLIB_LDIR@
ZLIB_VERSION = @ZLIB_VERSION@
ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+aclocaldir = @aclocaldir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+ax_enable_builddir_sed = @ax_enable_builddir_sed@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
-m4_if = @m4_if@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
pkgconfig_libdir = @pkgconfig_libdir@
pkgconfig_libfile = @pkgconfig_libfile@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = 1.4 foreign dist-bzip2
WANT_AUTOMAKE = 1.6
WANT_AUTOCONF = 2.52
CONFIG_CLEAN_FILES =
DIST_SOURCES =
-RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
- uninstall-info-recursive all-recursive install-data-recursive \
- install-exec-recursive installdirs-recursive install-recursive \
- uninstall-recursive check-recursive installcheck-recursive
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+ ps-recursive install-info-recursive uninstall-info-recursive \
+ all-recursive install-data-recursive install-exec-recursive \
+ installdirs-recursive install-recursive uninstall-recursive \
+ check-recursive installcheck-recursive
DIST_COMMON = README COPYING.LIB ChangeLog Makefile.am Makefile.in TODO \
acinclude.m4 aclocal.m4 config.h.in configure configure.ac \
uses/config.guess uses/config.sub uses/depcomp uses/install-sh \
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
ETAGS = etags
ETAGSFLAGS =
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if (etags --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ else \
+ include_option=--include; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ test -f $$subdir/TAGS && \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(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 "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/msvc6 $(distdir)/msvc7 $(distdir)/uses
- @list='$(DISTFILES)'; for file in $$list; do \
+ @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; \
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 \
$(am__remove_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
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
chmod a-w $(distdir)
- dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
- && cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- find $$dc_install_base -type f -print ; \
- exit 1; } >&2 ) \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
distcleancheck: distclean
- if test '$(srcdir)' = . ; then \
+ @if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
- test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left after distclean:" ; \
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf autom4te.cache
+ -rm -rf $(top_srcdir)/autom4te.cache
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
- clean-generic clean-libtool clean-recursive dist dist-all \
- dist-bzip2 dist-gzip distcheck distclean distclean-generic \
- distclean-hdr distclean-libtool distclean-recursive \
- distclean-tags distcleancheck distdir dvi dvi-am dvi-recursive \
- info info-am info-recursive install install-am install-data \
- install-data-am install-data-recursive install-exec \
- install-exec-am install-exec-recursive install-info \
- install-info-am install-info-recursive install-man \
- install-recursive install-strip installcheck installcheck-am \
- installdirs installdirs-am installdirs-recursive \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive tags tags-recursive \
- uninstall uninstall-am uninstall-info-am \
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+ clean-generic clean-libtool clean-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip distcheck \
+ distclean distclean-generic distclean-hdr distclean-libtool \
+ distclean-recursive distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am dvi-recursive info info-am \
+ info-recursive install install-am install-data install-data-am \
+ install-data-recursive install-exec install-exec-am \
+ install-exec-recursive install-info install-info-am \
+ install-info-recursive install-man install-recursive \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am installdirs-recursive maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+ pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
+ tags-recursive uninstall uninstall-am uninstall-info-am \
uninstall-info-recursive uninstall-recursive
-# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# Makefile.in generated by automake 1.7.6 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# PARTICULAR PURPOSE.
@SET_MAKE@
-SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
-
-EXEEXT = @EXEEXT@
-OBJEXT = @OBJEXT@
-PATH_SEPARATOR = @PATH_SEPARATOR@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
CONFIG_FILES = @CONFIG_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
-LTREL = @LTREL@
-LTVER = @LTVER@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAJOR = @MAJOR@
-MICRO = @MICRO@
-MINOR = @MINOR@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
MKZIP = @MKZIP@
-OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
-PATCH = @PATCH@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
+RELEASE_INFO = @RELEASE_INFO@
RESOLVES = @RESOLVES@
SDL = @SDL@
-SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
THREAD_SAFE = @THREAD_SAFE@
VERSION = @VERSION@
+VERSION_INFO = @VERSION_INFO@
XMLTO = @XMLTO@
ZIPTESTS = @ZIPTESTS@
ZLIB_INCL = @ZLIB_INCL@
ZLIB_LDIR = @ZLIB_LDIR@
ZLIB_VERSION = @ZLIB_VERSION@
ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+aclocaldir = @aclocaldir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+ax_enable_builddir_sed = @ax_enable_builddir_sed@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
-m4_if = @m4_if@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
pkgconfig_libdir = @pkgconfig_libdir@
pkgconfig_libfile = @pkgconfig_libfile@
+# ----------------------------------------------------------------------
+# we do not install a library, so this about equivalent to some SDL.pc
+pkgconfigdir = $(libdir)/pkgconfig
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = 1.4 foreign
AUTOTOOL_VERSION = autoconf-2.52 automake-1.5 libtool-1.4.2
# CFLAGS = `sdl-config --cflags` `zzip-config --cflags`
###
CLEANFILES = *.pc *.omf
-# ----------------------------------------------------------------------
-# we do not install a library, so this about equivalent to some SDL.pc
-pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_HEADERS = zzip-sdl-config.pc zzip-sdl-rwops.pc
ERRNULL = 2>/dev/null
subdir = SDL
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/uses/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
zzcatsdl_LDADD = $(LDADD)
zzcatsdl_DEPENDENCIES =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/uses/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/SDL_rwops_zzcat.Po
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-CFLAGS = @CFLAGS@
DIST_SOURCES = $(zzcatsdl_SOURCES)
DATA = $(sdl_DATA)
-rm -rf ./$(DEPDIR)
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
.c.lo:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
mostlyclean-libtool:
-rm -f *.lo
ETAGS = etags
ETAGSFLAGS =
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(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 "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @list='$(DISTFILES)'; for file in $$list; do \
+ @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; \
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 \
installdirs:
$(mkinstalldirs) $(DESTDIR)$(sdldir) $(DESTDIR)$(pkgconfigdir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-info-am uninstall-pkgconfigHEADERS \
uninstall-sdlDATA
-.PHONY: GTAGS all all-am check check-am clean clean-checkPROGRAMS \
- clean-generic clean-libtool distclean distclean-compile \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-checkPROGRAMS \
+ clean-generic clean-libtool ctags distclean distclean-compile \
distclean-depend distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
install-pkgconfigHEADERS install-sdlDATA install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool tags uninstall \
- uninstall-am uninstall-info-am uninstall-pkgconfigHEADERS \
- uninstall-sdlDATA
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+ uninstall-pkgconfigHEADERS uninstall-sdlDATA
SDL_rwops_zzip.$(OBJEXT) : zzip-config @srcdir@/SDL_rwops_zzip.c
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
-dnl ______ /usr/share/aclocal/guidod/ax_spec_file.m4 ______
-dnl @* AX_SPEC_FILE [(rpmspecfile [,subdirpath])]
-dnl
-dnl set the specfile - if no argument has been given then check whether
-dnl the ac_unique_file looks like a .spec file and use it. This macro
-dnl is ac_REQUIRED by many AX_SPEC_ routines.
-dnl
-dnl the AX_SPEC_EXTRACT macro is a helper used by many AX_SPEC_
-dnl routines and therefore placed here to be automatically included
-dnl in the macro set of (older) aclocal/acinclude.
-dnl
-dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]])
-dnl
-dnl @version %Id: ax_spec_file.m4,v 1.1 2003/10/18 23:38:41 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
-
-AC_DEFUN([AX_SPEC_FILE],
-[ AC_MSG_CHECKING([rpm spec file])
- if test ".$1" != "." ; then
- ax_spec_file_="$1"
- ax_spec_file=`basename $1`
- else
- case ".$ac_unique_file" in
- *.spec) ax_spec_file="$ac_unique_file"
- ax_spec_file_="$ac_unique_file" ;;
- *) ax_spec_file="TODO"
- if test ".$PACKAGE" != "."
- then ax_spec_file_="$PACKAGE.spec"
- else ax_spec_file_="README"
- fi
- cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
- no ax_spec_file argument has been given, using defaults of
- (1) $ax_spec_file_
- (2) $ax_spec_file
-EOF
- ;;
- esac
- fi
- # find specfile
- for i in ifelse($2,,,$2) . $srcdir $srcdir/.. .. ; do
- if test -f "$i/$ax_spec_file_" ; then
- ax_spec_dir="$i"
- ax_spec_file="$ax_spec_dir/$ax_spec_file_"
- break
- fi
- if test -f "$i/$ax_spec_file" ; then
- ax_spec_dir="$i"
- ax_spec_file="$ax_spec_dir/$ax_spec_file"
- break
- fi
- done
- case "$ax_spec_file" in
- ./*) if test "$ax_spec_file" = "./$ax_spec_file_" ; then
- ax_spec_file="$ax_spec_file_"
- fi
- AC_MSG_RESULT([$ax_spec_file]) ;;
- */*) AC_MSG_RESULT([$ax_spec_file]) ;;
- *) AC_MSG_ERROR([no rpm spec file found]) ;;
- esac
- m4_define([m4_ax_spec_file],[ax_spec_file])
-])
-
-dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]])
-
-AC_DEFUN([AX_SPEC_EXTRACT],
-[
- if test ".$[]$1" = "." ; then
- $1=`grep -i '^[[ ]]*m4_ifval([$2],[$2],[$1])[[ ]]*:' dnl
- "$ax_spec_file" | sed -e 's/.*:[[ ]]*//' dnl
- -e 's/[[ ]][[ ]]*/ /g' -e 's/^ //' -e 's/ $[]//' -e 'q'`
- if test ".$[]$1" = "." ; then
- for $1 in $2 $1 m4_tolower([$1]) ; do
- $1=`echo "$[]$1" | sed -e 's/^%//g'`
- $1=`sed dnl
- -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
- -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
- -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file`
- test ".$1" != "." && break
- done
- fi
- case ".$[]$1" in
- .%{*)
- $1=`echo "$[]$1" | sed -e 's/%{//' -e 's/}$[]//'`
- $1=`sed dnl
- -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
- -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
- -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;;
- .%*)
- $1=`echo "$[]$1" | sed -e 's/%//'`
- $1=`sed dnl
- -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
- -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
- -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;;
- esac
- m4_ifval([$3],[test ".$[]$1" = "." && $1="$3"])
- fi # test ".$[]$1" = "."
-])
-
-dnl ______ /usr/share/aclocal/guidod/ax_spec_package_version.m4 ______
-dnl @* AX_SPEC_PACKAGE_AND_VERSION ([specfile])
-dnl @* AX_SPEC_PACKAGE_NAME ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_VERSION ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_SUMMARY ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_LICENSE ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_CATEGORY ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_ICON ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_DEFAULTS([specfile])
-dnl
-dnl set PACKAGE from the given specfile - default to basename of
-dnl the rpmspecfile if no "name:" could be found in the spec file.
-dnl
-dnl set VERSION from the given specfile - default to a date-derived
-dnl value if no "version:" could be found in the spec file.
-dnl
-dnl this macro builds on top of AX_SPEC_FILE / AX_SPEC_EXTRACT
-dnl
-dnl more specific: if not "name:" or "%define name" was found in
-dnl the myproject.spec file then the PACKAGE var is set to the
-dnl basename "myproject". When no spec file was present then it
-dnl will usually default to "TODO".
+dnl ______ /usr/share/aclocal/guidod/ax_cflags_gcc_option.m4 ______
+dnl @synopsis AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]])
dnl
-dnl The version spec looks for "version:" or "%define version" in
-dnl the spec file. When no such value was seen or no spec file
-dnl had been present then the value is set to `date +0.%y.%W%w`.
+dnl AX_CFLAGS_GCC_OPTION(-fvomit-frame) would show a message as like
+dnl "checking CFLAGS for gcc -fvomit-frame ... yes" and adds
+dnl the optionflag to CFLAGS if it is understood. You can override
+dnl the shellvar-default of CFLAGS of course. The order of arguments
+dnl stems from the explicit macros like AX_CFLAGS_WARN_ALL.
dnl
-dnl the version value itself is sanitized somewhat with making
-dnl it to always carry atleast three digits (1.2.3) and clensing
-dnl superflous "0" chars around from generating numbers elsewhere.
+dnl The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add
+dnl to CXXFLAGS - and it uses the autoconf setup for C++ instead of C
+dnl (since it is possible to use different compilers for C and C++).
dnl
-dnl additional macros are provided that extract a specific value
-dnl from the spec file, among these:
+dnl The macro is a lot simpler than any special AX_CFLAGS_* macro (or
+dnl ac_cxx_rtti.m4 macro) but allows to check for arbitrary options.
+dnl However, if you use this macro in a few places, it would be great
+dnl if you would make up a new function-macro and submit it to the
+dnl ac-archive.
dnl
-dnl set PACKAGE_SUMMARY from the given specfile - default to package and
-dnl try to detect a type suffix if "summary:" was not in the spec file
+dnl - $1 option-to-check-for : required ("-option" as non-value)
+dnl - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case)
+dnl - $3 action-if-found : add value to shellvariable
+dnl - $4 action-if-not-found : nothing
dnl
-dnl set PACKAGE_LICENSE from the given specfile - if no "license:" tag was
-dnl given in the spec file then various COPYING files are grepped to
-dnl have a guess and the final fallback will be GNU GPL (or GNU LGPL).
+dnl note: in earlier versions, $1-$2 were swapped. We try to detect the
+dnl situation and accept a $2=~/-/ as being the old option-to-check-for.
dnl
-dnl set PACKAGE_ICON from the given specfile - if no "icon:" tag was
-dnl given in the spec file then we default to $PACKAGE-icon.png
+dnl also: there are other variants that emerged from the original macro
+dnl variant which did just test an option to be possibly added. However,
+dnl some compilers accept an option silently, or possibly for just
+dnl another option that was not intended. Therefore, we have to do a
+dnl generic test for a compiler family. For gcc we check "-pedantic"
+dnl being accepted which is also understood by compilers who just want
+dnl to be compatible with gcc even when not being made from gcc sources.
dnl
-dnl the final AX_SPEC_INIT(specfile) will initialize all variables to
-dnl its defaults according to the spec file given.
+dnl see also:
+dnl AX_CFLAGS_SUN_OPTION AX_CFLAGS_HPUX_OPTION
+dnl AX_CFLAGS_AIX_OPTION AX_CFLAGS_IRIX_OPTION
dnl
-dnl @version %Id: ax_spec_package_version.m4,v 1.1 2003/10/18 23:38:41 guidod Exp %
+dnl @, tested, experimental
+dnl @version %Id: ax_cflags_gcc_option.m4,v 1.2 2003/10/28 23:57:38 guidod Exp %
dnl @author Guido Draheim <guidod@gmx.de>
-
-AC_DEFUN([AX_SPEC_PACKAGE_LICENSE],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_LICENSE])dnl
- AC_MSG_CHECKING([for spec license type])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[license],m4_ifval($1,$1))
- VAR=`echo $VAR | sed -e 's/ *License//g'`
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for LICENSE / COPYRIGHT
- if test ".$VAR" = "." ; then
- for ac_file in "$srcdir/COPYING" "$srcdir/COPYING" "$srcdir/LICENSE" ; do
- test -f "$ac_file" || continue
-dnl http://www.ibiblio.org/osrt/omf/omf_elements "16. Rights"
- if grep "GNU LESSER GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null
- then VAR="GNU LGPL" ; break
- elif grep "GNU GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null
- then VAR="GNU GPL" ; break
- elif grep "MOZILLA PUBLIC LICENSE" "$ac_file" >/dev/null
- then VAR="MPL" ; break
- elif grep "Mozilla Public License" "$ac_file" >/dev/null
- then VAR="MPL" ; break
- elif grep -i "artistic license" "$ac_file" >/dev/null
- then VAR="Artistic" ; break
- elif grep -i "artistic control" "$ac_file" >/dev/null
- then VAR="Artistic" ; break
- elif grep -i "semblance of artistic" "$ac_file" >/dev/null
- then VAR="Artistic" ; break
- elif grep -i "above copyright notice" "$ac_file" >/dev/null
- then VAR="BSD" ; break
- fi
- done
- if test ".$VAR" = "." ; then
- if test "$srcdir/COPYING.LIB" ; then VAR="GNU LGPL"
- elif test ".$ltmain" != "." ; then VAR="GNU LGPL"
- else VAR="GNU GPL"
- fi
- fi
- fi
- ],[test ".$VAR" = "." && VAR="$2"])
- test "$VAR" = "GPL" && VAR="GNU GPL"
- test "$VAR" = "LGPL" && VAR="GNU LGPL"
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_SUMMARY],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_SUMMARY])dnl
- AC_MSG_CHECKING([for spec summary])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[summary],m4_ifval($1,$1))
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for SUMMARY
- if test ".$VAR" = "." ; then VAR="$PACKAGE"
- test ".$VAR" = "." && VAR="foo"
- test ".$ltmain" != "." && VAR="$VAR library"
- fi
- ],[test ".$VAR" = "." && VAR="$2"])
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_ICON],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_ICON])dnl
- AC_MSG_CHECKING([for spec icon])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[icon],m4_ifval($1,$1))
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for ICON
- if test ".$VAR" = "." ; then VAR="$PACKAGE-icon.png" ; fi
- ],[test ".$VAR" = "." && VAR="$2"])
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_CATEGORY],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_CATEGORY])dnl
- AC_MSG_CHECKING([for spec category])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[group],m4_ifval($1,$1))
- VAR=`echo $VAR | sed -e 's/ /-/g'`
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for CATEGORY
- if test ".$VAR" = "." ; then if test ".$ltmain" != "."
- then VAR="Development/Library"
- else VAR="Development/Other"
- fi fi
- ],[test ".$VAR" = "." && VAR="$2"])
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_NAME],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_NAME])dnl
- AC_MSG_CHECKING([for spec package])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[name],m4_ifval($1,$1))
- VAR=`echo $VAR | sed -e 's/ /-/g'`
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for PACKAGE
- test ".$VAR" = "." && VAR=`basename $ax_spec_file .spec`
- test ".$VAR" = ".README" && VAR="TODO"
- test ".$VAR" = ".TODO" && VAR="foo"
- ],[test ".$VAR" = "." && VAR="$2"])
- test "VAR" = "PACKAGE_NAME" && test ".$PACKAGE" = "." && PACKAGE="$VAR"
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_VERSION_],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_VERSION])dnl
- AC_MSG_CHECKING([for spec version])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[version],m4_ifval($1,$1))
- VAR=`echo $VAR | sed -e 's/ /-/g'`
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for VERSION
- test ".$VAR" = "." && VAR=`date +0.%y.%W%w`
- ],[test ".$VAR" = "." && VAR="$2"])
- test "VAR" = "PACKAGE_VERSION" && test ".$VERSION" = "." && VERSION="$VAR"
- case "$VAR" in # note we set traditional VERSION before cleaning things up
- *.*.) VAR="$VAR"`date +%W%w` ;;
- *.*.*) ;;
- *.) VAR="$VAR"`date +%y.%W%w` ;;
- *.*) VAR="$VAR.0" ;;
- *) VAR=AS_TR_SH([$VAR]) ; VAR="$VAR.`date +%y.%W%w`" ;;
- esac
- VAR=`echo $VAR | sed -e "s/[[.]][0]\\([0-9]\\)/.\\1/g"`
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-dnl for compatibility, we define ax_spec_package_version
-dnl to do all of ax_spec_package_name as well.
-AC_DEFUN([AX_SPEC_PACKAGE_VERSION],[AC_REQUIRE([AX_SPEC_FILE])dnl
- ifelse($1,,
- AC_MSG_WARN([please use ax_spec_package_AND_version now!]),
- AC_MSG_ERROR([please use ax_spec_package_AND_version now!]))
- AX_SPEC_PACKAGE_NAME
- AX_SPEC_PACKAGE_VERSION_
-
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_AND_VERSION],[
- m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)])
- AX_SPEC_PACKAGE_NAME
- AX_SPEC_PACKAGE_VERSION_
-])
-
-AC_DEFUN([AX_SPEC_DEFAULTS],[
- m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)])
- AX_SPEC_PACKAGE_NAME
- AX_SPEC_PACKAGE_VERSION_
- AX_SPEC_PACKAGE_LICENSE
- AX_SPEC_PACKAGE_SUMMARY
- AX_SPEC_PACKAGE_CATEGORY
- AX_SPEC_PACKAGE_ICON
-])
-
-dnl ______ /usr/share/aclocal/guidod/ax_cflags_gcc_option.m4 ______
-dnl @synopsis AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]])
-dnl
-dnl AX_CFLAGS_GCC_OPTION(-fvomit-frame) would show a message as like
-dnl "checking CFLAGS for gcc -fvomit-frame ... yes" and adds
-dnl the optionflag to CFLAGS if it is understood. You can override
-dnl the shellvar-default of CFLAGS of course. The order of arguments
-dnl stems from the explicit macros like AX_CFLAGS_WARN_ALL.
-dnl
-dnl The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add
-dnl to CXXFLAGS - and it uses the autoconf setup for C++ instead of C
-dnl (since it is possible to use different compilers for C and C++).
-dnl
-dnl The macro is a lot simpler than any special AX_CFLAGS_* macro (or
-dnl ac_cxx_rtti.m4 macro) but allows to check for arbitrary options.
-dnl However, if you use this macro in a few places, it would be great
-dnl if you would make up a new function-macro and submit it to the
-dnl ac-archive.
-dnl
-dnl - $1 option-to-check-for : required ("-option" as non-value)
-dnl - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case)
-dnl - $3 action-if-found : add value to shellvariable
-dnl - $4 action-if-not-found : nothing
-dnl
-dnl note: in earlier versions, $1-$2 were swapped. We try to detect the
-dnl situation and accept a $2=~/-/ as being the old option-to-check-for.
-dnl
-dnl also: there are other variants that emerged from the original macro
-dnl variant which did just test an option to be possibly added. However,
-dnl some compilers accept an option silently, or possibly for just
-dnl another option that was not intended. Therefore, we have to do a
-dnl generic test for a compiler family. For gcc we check "-pedantic"
-dnl being accepted which is also understood by compilers who just want
-dnl to be compatible with gcc even when not being made from gcc sources.
-dnl
-dnl see also:
-dnl AX_CFLAGS_SUN_OPTION AX_CFLAGS_HPUX_OPTION
-dnl AX_CFLAGS_AIX_OPTION AX_CFLAGS_IRIX_OPTION
-dnl
-dnl @, tested, experimental
-dnl @version %Id: ax_cflags_gcc_option.m4,v 1.2 2003/10/28 23:57:38 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
-dnl
-AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
+dnl
+AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
])
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])])
-dnl ______ /usr/share/aclocal/guidod/ax_maintainer_mode_auto_silent.m4 ______
-dnl @* AX_MAINTAINER_MODE_AUTO_SILENT
-dnl
-dnl Set autotools to error/sleep settings so that they are not run when
-dnl being errornously triggered. Likewise make libtool-silent when
-dnl libtool has been used.
-dnl
-dnl I am using the macro quite a lot since some automake versions had the
-dnl tendency to try to rerun some autotools on a mere make even when not
-dnl quite in --maintainer-mode. That is very annoying. Likewise, a user
-dnl who installs from source does not want to see doubled compiler messages.
+dnl ______ ______
+
+dnl ______ /usr/share/aclocal/C_Support/acx_restrict.m4 ______
+dnl @synopsis ACX_C_RESTRICT
dnl
-dnl I did not put an AC-REQUIRE(MAINTAINER_MODE) in here - should I?
+dnl This macro determines whether the C compiler supports the "restrict"
+dnl keyword introduced in ANSI C99, or an equivalent. Does nothing if
+dnl the compiler accepts the keyword. Otherwise, if the compiler supports
+dnl an equivalent (like gcc's __restrict__) defines "restrict" to be that.
+dnl Otherwise, defines "restrict" to be empty.
dnl
-dnl @: guidod@gmx.de
-dnl @%Id: ax_maintainer_mode_auto_silent.m4,v 1.1 2003/10/19 00:12:45 guidod Exp %
+dnl @version %Id: acx_restrict.m4,v 1.1.1.1 2001/07/26 00:46:18 guidod Exp %
+dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
-AC_DEFUN([AX_MAINTAINER_MODE_AUTO_SILENT],[dnl
-dnl ac_REQUIRE([am_MAINTAINER_MODE])dn
-AC_MSG_CHECKING(auto silent in maintainer mode)
-if test "$USE_MAINTAINER_MODE" = "no" ; then
- test ".$TIMEOUT" = "." && TIMEOUT="9"
- AUTOHEADER="sleep $TIMEOUT ; true || autoheader || skipped"
- AUTOMAKE="sleep $TIMEOUT ; true || automake || skipped"
- AUTOCONF="sleep $TIMEOUT ; true || autoconf || skipped"
- if test ".$LIBTOOL" != "." ; then
- LIBTOOL="$LIBTOOL --silent"
- AC_MSG_RESULT([libtool-silent, auto-sleep-9])
- else
- AC_MSG_RESULT([auto-sleep-9])
- fi
-else
- AC_MSG_RESULT([no])
-fi
+AC_DEFUN([ACX_C_RESTRICT],
+[AC_CACHE_CHECK([for C restrict keyword], acx_cv_c_restrict,
+[acx_cv_c_restrict=unsupported
+ AC_LANG_SAVE
+ AC_LANG_C
+ # Try the official restrict keyword, then gcc's __restrict__, then
+ # SGI's __restrict. __restrict has slightly different semantics than
+ # restrict (it's a bit stronger, in that __restrict pointers can't
+ # overlap even with non __restrict pointers), but I think it should be
+ # okay under the circumstances where restrict is normally used.
+ for acx_kw in restrict __restrict__ __restrict; do
+ AC_TRY_COMPILE([], [float * $acx_kw x;], [acx_cv_c_restrict=$acx_kw; break])
+ done
+ AC_LANG_RESTORE
+])
+ if test "$acx_cv_c_restrict" != "restrict"; then
+ acx_kw="$acx_cv_c_restrict"
+ if test "$acx_kw" = unsupported; then acx_kw=""; fi
+ AC_DEFINE_UNQUOTED(restrict, $acx_kw, [Define to equivalent of C99 restrict keyword, or to nothing if this is not supported. Do not define if restrict is supported directly.])
+ fi
])
-dnl ______ /usr/share/aclocal/guidod/patch_libtool_to_add_host_cc.m4 ______
-dnl @* PATCH_LIBTOOL_TO_ADD_HOST_CC
+dnl ______ /usr/share/aclocal/guidod/patch_libtool_sys_lib_search_path_spec.m4 ______
+dnl @* PATCH_LIBTOOL_SYS_LIB_SEARCH_PATH_SPEC
dnl
-dnl The libtool 1.4.x processing (and patched 1.3.5) uses a little
-dnl "impgen" tool to turn a "*.dll" into an import "*.lib" as it is
-dnl needed for win32 targets. However, this little tool is not shipped
-dnl by binutils, it is not even a command option of dlltool or dllwrap.
-dnl It happens to be a C source snippet implanted into the libtool
-dnl sources - it gets written to ".libs", compiled into a binary
-dnl on-the-fly, and executed right away on the "dll" file to create
-dnl the import-lib (dll.a files in gcc-speak).
-dnl
-dnl This mode works fine for a native build within mingw or cygwin,
-dnl but it does not work in cross-compile mode since CC is a
-dnl crosscompiler - it will create an .exe file on a non-win32
-dnl system, and as a result an impgen.exe is created on-the-fly
-dnl that can not be executed on-the-fly. Luckily, the actual
-dnl libtool snippet uses HOST_CC to compile the sources which
-dnl has a fallback to CC when the HOST_CC variable was not set.
-dnl
-dnl this ac-macro is trying to detect a valid HOST_CC which is not
-dnl a cross-compiler. This is done by looking into the $PATH for
-dnl a "cc" and the result is patched into libtool a HOST_CC, iow
-dnl it adds another configured variable at the top of the libtool
-dnl script.
-dnl
-dnl In discussions on the libtool mailinglist it occurred that
-dnl later gcc/binutils generations are able to link with dlls
-dnl directly, i.e. there is no import-lib needed anymore. The
-dnl import-table is created within the linker itself (in-memory)
-dnl and bound to the .exe/.dll currently in the making. The
-dnl whole stuff of impgen exe and compiling it on-the-fly, well,
-dnl it is superflouos then.
-dnl
-dnl Since mingw crosscompilers tend to be quite a fresh development
-dnl it was agreed to remove the impgen stuff completly from
-dnl libtool sources. Still however, this macro does not hurt
-dnl since it does not patch impgen cmds but it just adds HOST_CC
-dnl which might be useful in other cross-compiling cases as well.
-dnl Therefore, you can leave it in for maximum compatibility and
-dnl portability.
-dnl
-dnl @= guidod@gmx.de
-dnl @%Id: patch_libtool_to_add_host_cc.m4,v 1.3 2003/03/23 13:20:27 guidod Exp %
-
-AC_DEFUN([PATCH_LIBTOOL_TO_ADD_HOST_CC],
-[# patch libtool to add HOST_CC sometimes needed in crosscompiling a win32 dll
-if grep "HOST_CC" libtool >/dev/null; then
- if test "$build" != "$host" ; then
- if test "_$HOST_CC" = "_" ; then
- HOST_CC="false"
- for i in `echo $PATH | sed 's,:, ,g'` ; do
- test -x $i/cc && HOST_CC=$i/cc
- done
- fi
-AC_MSG_RESULT(patching libtool to add HOST_CC=$HOST_CC)
- test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool)
- sed -e "/BEGIN.*LIBTOOL.*CONFIG/a\\
-HOST_CC=$HOST_CC" libtool >libtool.new
- (test -s libtool.new || rm libtool.new) 2>/dev/null
- test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !!
- test -f libtool || mv libtool.old libtool
- fi
-fi
-])
-dnl ______ /usr/share/aclocal/guidod/patch_libtool_sys_lib_search_path_spec.m4 ______
-dnl @* PATCH_LIBTOOL_SYS_LIB_SEARCH_PATH_SPEC
-dnl
-dnl Cross-compiling to win32 from a unix system reveals a bug - the
-dnl path-separator has been set to ";" depending on the target system.
-dnl However, the crossgcc search_path_spec works in a unix-environment
-dnl with unix-style directories and unix-stylish path_separator. The
-dnl result: the search_path_spec is a single word still containing the
-dnl ":" separators.
+dnl Cross-compiling to win32 from a unix system reveals a bug - the
+dnl path-separator has been set to ";" depending on the target system.
+dnl However, the crossgcc search_path_spec works in a unix-environment
+dnl with unix-style directories and unix-stylish path_separator. The
+dnl result: the search_path_spec is a single word still containing the
+dnl ":" separators.
dnl
dnl This macro fixes the situation: when we see the libtool PATH_SEP
dnl to be ":" and search_path_spec to contain ":" characters, then
fi
fi
])
-dnl ______ /usr/share/aclocal/guidod/ax_cflags_strict_prototypes.m4 ______
-dnl @synopsis AX_CFLAGS_STRICT_PROTOTYPES [(shellvar [,default, [A/NA]]
+dnl ______ /usr/share/aclocal/guidod/ax_warning_default_aclocaldir.m4 ______
+dnl @* AX_WARNING_DEFAULT_ACLOCALDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])]
+dnl @* AX_ENABLE_DEFAULT_ACLOCALDIR [(dirvariable [,defsetting])]
dnl
-dnl Try to find a compiler option that requires strict prototypes.
+dnl print a warning message if the $(datadir)/aclocal directory
+dnl is not in the dirlist searched by the aclocal tool. This macro
+dnl is useful if some `make install` would target $(datadir)/aclocal
+dnl to install an autoconf m4 file of your project to be picked up
+dnl by other projects.
dnl
-dnl The sanity check is done by looking at sys/signal.h which has a set
-dnl of macro-definitions SIG_DFL and SIG_IGN that are cast to the local
-dnl signal-handler type. If that signal-handler type is not fully
-dnl qualified then the system headers are not seen as strictly prototype clean.
+dnl default $1 dirvariable = aclocaldir
+dnl default $2 defsetting = ${datadir}/aclocal
+dnl default $3 action = nothing to do
+dnl default $4 action = warn the user about mismatch
dnl
-dnl For the GNU CC compiler it will be -fstrict-prototypes -Wstrict-prototypes
+dnl In the _WARNING_ variant, the defsetting is not placed in
+dnl dirvariable nor is it ac_subst'ed in any way. The default
+dnl fail-action $4 is to send a warning message to the user,
+dnl and the default accept-action $3 is nothing. It is expected that
+dnl a Makefile is generated with aclocaldir=${datadir}/aclocal
+dnl
+dnl The _ENABLE_ variant however will set not only the $aclocaldir shell
+dnl var of the script, but it is also AC-SUBST'ed on default - and
+dnl furthermore a configure option "--enable-default-aclocaldir" is
+dnl provided. Only if that option is set then $2 default is not set to
+dnl the canonic default in the a $prefix subpath but instead $2 default
+dnl is set to the primary path where `aclocal` looks for macros. The
+dnl user may also override the default on the command line.
+dnl
+dnl @: guidod@gmx.de
+dnl @%Id: ax_warning_default_aclocaldir.m4,v 1.1 2003/10/18 02:57:12 guidod Exp %
+
+AC_DEFUN([AX_WARNING_DEFAULT_ACLOCALDIR],[dnl
+AC_REQUIRE([AX_EXPAND_PREFIX])dnl
+AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_dir])dnl
+AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl
+AS_VAR_PUSHDEF([LOC],[ax_warning_default_aclocal_loc])dnl
+LOC='m4_if([$2],,[${datadir}/aclocal],[$2])'
+m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"])
+ if test ".$ACLOCAL" = "." ; then
+ AC_PATH_PROG([ACLOCAL],[aclocal],[:])
+ fi
+ BIN="$ACLOCAL"
+ test ".$BIN" = "." && BIN="aclocal"
+ DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"`
+ test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal"
+ test ".$DIR" = "." && DIR="/tmp"
+DIR=`eval "echo $DIR"` # we need to expand
+DIR=`eval "echo $DIR"`
+LOC=`eval "echo $LOC"`
+LOC=`eval "echo $LOC"`
+LOC=`eval "echo $LOC"`
+LOC=`eval "echo $LOC"`
+AC_RUN_LOG([: test "$LOC" = "$DIR"])
+if test "$LOC" != "$DIR" ; then
+ if test -f "$DIR/dirlist" ; then
+ for DIR in `cat $DIR/dirlist` $DIR ; do
+ AC_RUN_LOG([: test "$LOC" = "$DIR"])
+ test "$LOC" = "$DIR" && break
+ done
+ fi
+ if test "$LOC" != "$DIR" ; then
+ m4_ifval([$4],[$4],[dnl
+ AC_MSG_NOTICE([warning: m4_if([$1],,[aclocaldir],[$1])=$LOC dnl
+(see config.log)])
+ AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[aclocaldir],[$1])=$DIR])
+ cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
+ aclocaldir: the m4_if([$1],,[default aclocaldir],[$1 value]) of $LOC
+ aclocaldir: is not listed in the dirlist where aclocal will look
+ aclocaldir: for macros - you can override the install-path using
+ aclocaldir: make install aclocaldir=$DIR
+ aclocaldir: or append the directory to aclocal reconfigures later as
+ aclocaldir: aclocal -I $LOC
+ aclocaldir: when an autoconf macro is needed from that directory
+EOF
+ m4_ifvaln([$5],[$5])])dnl
+ m4_ifvaln([$3],[else $3])dnl
+ fi
+fi
+AS_VAR_POPDEF([LOC])dnl
+AS_VAR_POPDEF([BIN])dnl
+AS_VAR_POPDEF([DIR])dnl
+])
+
+AC_DEFUN([AX_ENABLE_DEFAULT_ACLOCALDIR],[dnl
+AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl
+AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_def])dnl
+AS_VAR_PUSHDEF([DEF],[ax_warning_default_aclocal_def])dnl
+AC_ARG_ENABLE([enable-default-aclocaldir],
+[ --enable-default-aclocaldir(=PATH) override the datadir/aclocal default])
+test ".$enable_default_aclocaldir" = "." && enable_default_aclocaldir="no"
+case ".$enable_default_aclocaldir" in
+ .no) DIR='m4_if([$2],,[${datadir}/aclocal],[$2])' ;;
+ .yes) # autodetect
+ if test ".$ACLOCAL" = "." ; then
+ AC_PATH_PROG([ACLOCAL],[aclocal],[:])
+ fi
+ BIN="$ACLOCAL"
+ test ".$BIN" = "." && BIN="aclocal"
+ DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"`
+ test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal"
+ test ".$DIR" = "." && DIR="/tmp" ;;
+ *) DIR="$enable_default_aclocaldir" ;;
+esac
+AX_WARNING_DEFAULT_ACLOCALDIR([$1],[$DEF],[$3],[$4],[$5])
+m4_if([$1],,[aclocaldir],[$1])="$ax_warning_default_aclocal_dir"
+AC_SUBST(m4_if([$1],,[aclocaldir],[$1]))
+AS_VAR_POPDEF([DEF])dnl
+AS_VAR_POPDEF([DIR])dnl
+AS_VAR_POPDEF([BIN])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_cflags_warn_all.m4 ______
+dnl @synopsis AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
+dnl
+dnl Try to find a compiler option that enables most reasonable warnings.
+dnl This macro is directly derived from VL_PROG_CC_WARNINGS which is
+dnl split up into two AX_CFLAGS_WARN_ALL and AX_CFLAGS_WARN_ALL_ANSI
+dnl
+dnl For the GNU CC compiler it will be -Wall (and -ansi -pedantic)
dnl The result is added to the shellvar being CFLAGS by default.
dnl
-dnl DEFAULTS:
+dnl Currently this macro knows about GCC, Solaris C compiler,
+dnl Digital Unix C compiler, C for AIX Compiler, HP-UX C compiler,
+dnl IRIX C compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90
+dnl (Unicos 10.0.0.8) C compiler.
dnl
-dnl - $1 shell-variable-to-add-to : CFLAGS
-dnl - $2 add-value-if-not-found : nothing
-dnl - $3 action-if-found : add value to shellvariable
-dnl - $4 action-if-not-found : nothing
+dnl - $1 shell-variable-to-add-to : CFLAGS
+dnl - $2 add-value-if-not-found : nothing
+dnl - $3 action-if-found : add value to shellvariable
+dnl - $4 action-if-not-found : nothing
dnl
-dnl @version %Id: ax_cflags_strict_prototypes.m4,v 1.7 2003/06/05 00:52:22 guidod Exp %
+dnl @version %Id: ax_cflags_warn_all.m4,v 1.2 2003/10/12 14:56:07 guidod Exp %
dnl @author Guido Draheim <guidod@gmx.de>
dnl
-AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
+AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
-in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
- "-Wall % -Wstrict-prototypes" dnl try to warn atleast
- #
+in "-pedantic % -Wall" dnl GCC
+ "-xstrconst % -v" dnl Solaris C
+ "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
+ "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+ "-ansi -ansiE % -fullwarn" dnl IRIX
+ "+ESlit % +w1" dnl HP-UX C
+ "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
+ "-h conform % -h msglevel 2" dnl Cray C (Unicos)
+ #
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
-case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check with signal() from sys/signal.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <signal.h>],[
- if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
- if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
- dnl the original did use test -n `$CC testprogram.c`
- [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
-then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
-then VAR="no, suppressed, signal.h," ; fi ; fi],
- [VAR="no, suppressed, signal.h"])
- rm config.tmp
- ;;
-esac
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
dnl the only difference - the LANG selection... and the default FLAGS
-AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
+AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CXX
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
-in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
- "-Wall % -Wstrict-prototypes" dnl try to warn atleast
- #
+in "-pedantic % -Wall" dnl GCC
+ "-xstrconst % -v" dnl Solaris C
+ "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
+ "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+ "-ansi -ansiE % -fullwarn" dnl IRIX
+ "+ESlit % +w1" dnl HP-UX C
+ "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
+ "-h conform % -h msglevel 2" dnl Cray C (Unicos)
+ #
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check with signal() from sys/signal.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <signal.h>],[
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+dnl implementation tactics:
+dnl the for-argument contains a list of options. The first part of
+dnl these does only exist to detect the compiler - usually it is
+dnl a global option to enable -ansi or -extrawarnings. All other
+dnl compilers will fail about it. That was needed since a lot of
+dnl compilers will give false positives for some option-syntax
+dnl like -Woption or -Xoption as they think of it is a pass-through
+dnl to later compile stages or something. The "%" is used as a
+dnl delimimiter. A non-option comment can be given after "%%" marks.
+
+
+dnl ______ /usr/share/aclocal/guidod/ax_cflags_strict_prototypes.m4 ______
+dnl @synopsis AX_CFLAGS_STRICT_PROTOTYPES [(shellvar [,default, [A/NA]]
+dnl
+dnl Try to find a compiler option that requires strict prototypes.
+dnl
+dnl The sanity check is done by looking at sys/signal.h which has a set
+dnl of macro-definitions SIG_DFL and SIG_IGN that are cast to the local
+dnl signal-handler type. If that signal-handler type is not fully
+dnl qualified then the system headers are not seen as strictly prototype clean.
+dnl
+dnl For the GNU CC compiler it will be -fstrict-prototypes -Wstrict-prototypes
+dnl The result is added to the shellvar being CFLAGS by default.
+dnl
+dnl DEFAULTS:
+dnl
+dnl - $1 shell-variable-to-add-to : CFLAGS
+dnl - $2 add-value-if-not-found : nothing
+dnl - $3 action-if-found : add value to shellvariable
+dnl - $4 action-if-not-found : nothing
+dnl
+dnl @version %Id: ax_cflags_strict_prototypes.m4,v 1.7 2003/06/05 00:52:22 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
+dnl
+AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
+ "-Wall % -Wstrict-prototypes" dnl try to warn atleast
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+case ".$VAR" in
+ .|.no|.no,*) ;;
+ *) # sanity check with signal() from sys/signal.h
+ cp config.log config.tmp
+ AC_TRY_COMPILE([#include <signal.h>],[
if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
dnl the original did use test -n `$CC testprogram.c`
AS_VAR_POPDEF([FLAGS])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ac_set_default_paths_system.m4 ______
-dnl @synopsis AC_SET_DEFAULT_PATHS_SYSTEM
-dnl
-dnl the most interesting changes go about windows-targets - where the
-dnl default_prefix is set to /programs, and quite some directories
-dnl are aliased: sbindir := libdir := bindir and the docprefix-defaults
-dnl are also a bit different, even on FHS2-compliant systems where the
-dnl mandir is going to $prefix/man only if prefix=/usr, otherwise they
-dnl shall go to $datadir/man. We use an extra docprefix to express it
-dnl which is either defined as being prefix or datadir. not SUBSTed here.
-dnl
-dnl @, (very useful)
-dnl @version %Id: ac_set_default_paths_system.m4,v 1.5 2003/02/02 19:32:30 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
-AC_DEFUN([AC_SET_DEFAULT_PATHS_SYSTEM],
-[AC_REQUIRE([AC_CANONICAL_HOST]) # --------------------------------------------
-case "$prefix:$ac_default_prefix" in
- NONE:/usr/local)
- result=""
- AC_MSG_CHECKING(default prefix path)
- case "${target_os}" in
- *cygwin* | *mingw* | *uwin* | *djgpp | *emx* )
- if test "${host_os}" = "${target_os}" ; then
- ac_default_prefix="/programs"
- result="(win/dos target)"
- else
- case "$PATH" in
- *:/usr/local/cross-tools/$target_alias/bin:*)
- ac_default_prefix="/usr/local/cross-tools/$target_alias" ;;
- *:/usr/local/$target_alias/bin:*)
- ac_default_prefix="/usr/local/$target_alias" ;;
- *:/usr/local/$target_cpu-$target_os/bin:*)
- ac_default_prefix="/usr/local/$target_cpu-$target_os" ;;
- *)
- ac_default_prefix="/programs" ;;
- esac
- result="(win/dos cross-compiler)"
- fi
- ;;
- esac
- AC_MSG_RESULT($ac_default_prefix $result)
+dnl the only difference - the LANG selection... and the default FLAGS
+
+AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_CXX
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
+ "-Wall % -Wstrict-prototypes" dnl try to warn atleast
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+case ".$VAR" in
+ .|.no|.no,*) ;;
+ *) # sanity check with signal() from sys/signal.h
+ cp config.log config.tmp
+ AC_TRY_COMPILE([#include <signal.h>],[
+ if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
+ if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
+ dnl the original did use test -n `$CC testprogram.c`
+ [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
+then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
+then VAR="no, suppressed, signal.h," ; fi ; fi],
+ [VAR="no, suppressed, signal.h"])
+ rm config.tmp
;;
esac
-AC_MSG_CHECKING(default prefix system)
-result="$prefix" ; test "$result" = "NONE" && result="$ac_default_prefix"
-case ${result} in
- /programs | /programs/*) result="is win-/programs"
- # on win/dos, .exe .dll and .cfg live in the same directory
- libdir=`echo $libdir |sed -e 's:^..exec_prefix./lib$:${bindir}:'`
- sbindir=`echo $sbindir |sed -e 's:^..exec_prefix./sbin$:${libdir}:'`
- sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:${sbindir}:'`
- libexecdir=`echo $libexecdir |sed -e 's:/libexec$:/system:'`
- # help-files shall be set with --infodir, docprefix is datadir
- docprefix="${datadir}"
- mandir=`echo $mandir \
- |sed -e 's:^..prefix./man$:${datadir}/info:'`
- includedir=`echo $includedir \
- |sed -e 's:^..prefix./include$:${datadir}/include:'`
- # other state files (but /etc) are moved to datadir
- sharedstatedir=`echo $sharedstatedir \
- |sed -e 's:^..prefix./com$:${datadir}/default:'`
- localstatedir=`echo $localstatedir \
- |sed -e 's:^..prefix./var$:${datadir}/current:'`
- ;;
- /usr) result="is /usr-shipped"
- # doc files are left at prefix
- docprefix="${prefix}"
- # state files go under /top
- sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:/etc:'`
- sharedstatedir=`echo $sharedstatedir \
- |sed -e 's:^..prefix./com$:/etc/default:'`
- # $prefix/var is going to end up in /var/lib
- localstatedir=`echo $localstatedir \
- |sed -e 's:^..prefix./var$:/var/lib:'`
- ;;
- /opt | /opt/*) result="is /opt-package"
- # state files go under /top/prefix
- sysconfdir=`echo $sysconfdir \
- |sed -e 's:^..prefix./etc$:/etc${prefix}:'`
- sharedstatedir=`echo $sharedstatedir \
- |sed -e 's:^..prefix./com$:/etc/default${prefix}:'`
- # $prefix/var is going to to be /var$prefix... once again
- localstatedir=`echo $localstatedir \
- |sed -e 's:^..prefix./var$:/var${prefix}:'`
- # doc files are left at prefix
- docprefix="${prefix}"
- ;;
- *) result="is /local-package"
- # doc files are moved from prefix down to datadir
- docprefix="${datadir}"
- mandir=`echo $mandir \
- |sed -e 's:^..prefix./man$:${datadir}/man:'`
- infodir=`echo $infodir \
- |sed -e 's:^..prefix./infodir$:${datadir}/info:'`
- # never use $prefix/com - that is no good idea
- sharedstatedir=`echo $sharedstatedir \
- |sed -e 's:^..prefix./com$:${sysconfdir}/default:'`
- ;;
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
esac
-AC_MSG_RESULT($result)
-# --------------------------------------------------------
-])
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
-dnl ______ /usr/share/aclocal/guidod/ax_enable_builddir.m4 ______
-dnl @synopsis AX_ENABLE_BUILDDIR [(dirstring-or-command [,Makefile.mk [,-all]])]
-dnl
-dnl if the current configure was run within the srcdir then
-dnl we move all configure-files into a subdir and let the configure
-dnl steps continue there. We provide an option --disable-builddir
-dnl to suppress the move into a separate builddir.
+dnl ______ /usr/share/aclocal/guidod/ax_spec_package_version.m4 ______
+dnl @* AX_SPEC_PACKAGE_AND_VERSION ([specfile])
+dnl @* AX_SPEC_PACKAGE_NAME ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_VERSION ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_SUMMARY ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_LICENSE ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_CATEGORY ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_ICON ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_DEFAULTS([specfile])
dnl
-dnl Defaults:
+dnl set PACKAGE from the given specfile - default to basename of
+dnl the rpmspecfile if no "name:" could be found in the spec file.
dnl
-dnl $1 = $host (overridden with $HOST)
-dnl $2 = Makefile.mk
-dnl $3 = -all
+dnl set VERSION from the given specfile - default to a date-derived
+dnl value if no "version:" could be found in the spec file.
dnl
-dnl This macro must be called before AM_INIT_AUTOMAKE.
+dnl this macro builds on top of AX_SPEC_FILE / AX_SPEC_EXTRACT
dnl
-dnl it creates a default toplevel srcdir Makefile from the information found
-dnl in the created toplevel builddir Makefile. It just copies the variables
-dnl and rule-targets, each extended with a default rule-execution that
-dnl recurses into the build directory of the current "HOST". You can override
-dnl the auto-dection through `config.guess` and build-time of course, as in
+dnl more specific: if not "name:" or "%define name" was found in
+dnl the myproject.spec file then the PACKAGE var is set to the
+dnl basename "myproject". When no spec file was present then it
+dnl will usually default to "TODO".
dnl
-dnl make HOST=i386-mingw-cross
+dnl The version spec looks for "version:" or "%define version" in
+dnl the spec file. When no such value was seen or no spec file
+dnl had been present then the value is set to `date +0.%y.%W%w`.
dnl
-dnl which can of course set at configure time as well using
+dnl the version value itself is sanitized somewhat with making
+dnl it to always carry atleast three digits (1.2.3) and clensing
+dnl superflous "0" chars around from generating numbers elsewhere.
dnl
-dnl configure --host=i386-mingw-cross
+dnl additional macros are provided that extract a specific value
+dnl from the spec file, among these:
dnl
-dnl After the default has been created, additional rules can be
-dnl appended that will not just recurse into the subdirectories and
-dnl only ever exist in the srcdir toplevel makefile - these parts
-dnl are read from the $2 = Makefile.mk file
+dnl set PACKAGE_SUMMARY from the given specfile - default to package and
+dnl try to detect a type suffix if "summary:" was not in the spec file
dnl
-dnl The automatic rules are usually scanning the toplevel Makefile for
-dnl lines like '#### $host |$builddir' to recognize the place where to
-dnl recurse into. Usually, the last one is the only one used. However,
-dnl almost all targets have an additional "*-all" rule which makes the
-dnl script to recurse into _all_ variants of the current HOST (!!)
-dnl setting. The "-all" suffix can be overriden for the macro as well.
+dnl set PACKAGE_LICENSE from the given specfile - if no "license:" tag was
+dnl given in the spec file then various COPYING files are grepped to
+dnl have a guess and the final fallback will be GNU GPL (or GNU LGPL).
dnl
-dnl a special rule is only given for things like "dist" that will
-dnl copy the tarball from the builddir to the sourcedir (or $(PUB))
-dnl for reason of convenience.
+dnl set PACKAGE_ICON from the given specfile - if no "icon:" tag was
+dnl given in the spec file then we default to $PACKAGE-icon.png
dnl
-dnl @author Guido Draheim
-dnl @version %Id: ax_enable_builddir.m4,v 1.13 2003/10/12 06:27:40 guidod Exp %
+dnl the final AX_SPEC_INIT(specfile) will initialize all variables to
+dnl its defaults according to the spec file given.
dnl
-AC_DEFUN([AX_ENABLE_BUILDDIR],[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
-AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
-AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl
-AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl
-AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
-SUB="."
-if test ".$ac_srcdir_defaulted" != ".no" ; then
- if test ".$srcdir" = ".." ; then
- AC_PATH_PROG(SED,gsed sed, sed)
- AC_ARG_ENABLE([builddir], AC_HELP_STRING(
- [--disable-builddir],[disable automatic build in subdir of sources])
- ,[SUB="$withval"], [SUB="."])
- test ".$SUB" = ".." && SUB=`$SED -V 2>&1 |$SED -e '/GNU/!d' -e 's/.*/yes/'`
- test ".$SUB" = "." && SUB="."
- test ".$SUB" = ".no" && SUB="."
- if test ".$SUB" != ".." ; then # we know where to go and
- if test ! -f config.status ; then # srcdir not yet configured
- test ".$HOST" = "." && HOST="$host"
- test ".$SUB" = ".yes" && SUB="m4_ifval([$1], [$1],[$HOST])"
- AS_MKDIR_P([$SUB])
- echo __.$SUB.__ > $SUB/conftest.tmp
- cd $SUB
- if grep __.$SUB.__ conftest.tmp >/dev/null 2>/dev/null ; then
- rm conftest.tmp
- AC_MSG_RESULT([continue configure in default builddir ./$SUB])
- else
- AC_MSG_ERROR([could not change to default builddir ./$SUB])
- fi
- srcdir=`echo "$SUB" |
- $SED -e 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,[[/]]$,,;'`
- AUX="$ac_aux_dir"
- test ".$ac_aux_dir" != "." && ac_aux_dir="$srcdir/$ac_aux_dir"
- test ".$ac_install_sh" != "." && ac_install_sh="$srcdir/$ac_install_sh"
- ac_config_guess="$SHELL $ac_aux_dir/config.guess"
- ac_config_sub="$SHELL $ac_aux_dir/config.sub"
- ac_configure="$SHELL $ac_aux_dir/configure" # Cygnus configure
+dnl @version %Id: ax_spec_package_version.m4,v 1.1 2003/10/18 23:38:41 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
- test -f $srcdir/config.log && mv $srcdir/config.log .
- test -f $srcdir/confdefs.h && mv $srcdir/confdefs.h .
- test -f $srcdir/conftest.log && mv $srcdir/conftest.log .
- test -f $srcdir/$cache_file && mv $srcdir/$cache_file .
- fi fi
- fi
-fi
-AS_VAR_POPDEF([SED])dnl
-AS_VAR_POPDEF([AUX])dnl
-AS_VAR_POPDEF([SUB])dnl
-AC_CONFIG_COMMANDS([buildir],[dnl .............. config.status ..............
-AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl
-AS_VAR_PUSHDEF([TOP],[top_srcdir])dnl
-AS_VAR_PUSHDEF([SRC],[ac_top_srcdir])dnl
-AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl
-AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
-pushdef([END],[Makefile.mk])dnl
-pushdef([_ALL],[ifelse([$3],,[-all],[$3])])dnl
- SUB=`grep "continue configure in default builddir " config.log |
- $SED -e "s/.*continue configure in default builddir //"`
- SRC="$ax_enable_builddir_srcdir"
- if test ".$SUB" = "." ; then
- if test -f "$TOP/Makefile" ; then
- AC_MSG_NOTICE([skipping TOP/Makefile - left untouched])
- else
- AC_MSG_NOTICE([skipping TOP/Makefile - not created])
- fi
- else
- if test -f "$SRC/Makefile" ; then
- a=`grep "^VERSION " "$SRC/Makefile"` ; b=`grep "^VERSION " Makefile`
- test "$a" != "$b" && rm "$SRC/Makefile"
- fi
- if test -f "$SRC/Makefile" ; then
- echo "$SRC/Makefile : $SRC/Makefile.in" > $tmp/conftemp.mk
- echo " []@ echo 'REMOVED,,,' >\$[]@" >> $tmp/conftemp.mk
- eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null"
- if grep '^REMOVED,,,' "$SRC/Makefile" >/dev/null
- then rm $SRC/Makefile ; fi
- cp $tmp/conftemp.mk $SRC/makefiles.mk~ ## DEBUGGING
- fi
- if test ! -f "$SRC/Makefile" ; then
- AC_MSG_NOTICE([create TOP/Makefile guessed from local Makefile])
- x='`' ; cat >$tmp/conftemp.sed <<_EOF
-/^\$/n
-x
-/^\$/bS
-x
-/\\\\\$/{H;d;}
-{H;s/.*//;x;}
-bM
-:S
-x
-/\\\\\$/{h;d;}
-{h;s/.*//;x;}
-:M
-s/\\(\\n\\) /\\1 /g
-/^ /d
-/^[[ ]]*[[\\#]]/d
-/^VPATH *=/d
-s/^srcdir *=.*/srcdir = ./
-s/^top_srcdir *=.*/top_srcdir = ./
-/[[:=]]/!d
-/^\\./d
-s/:.*/:/
-/:\$/s/ / /g
-/:\$/s/ \\([[a-z]][[a-z-]]*[[a-z]]\\) / \\1 \\1[]_ALL /g
-/:\$/s/^\\([[a-z]][[a-z-]]*[[a-z]]\\)\\([[ :]]\\)/\\1 \\1[]_ALL\\2/
-/:\$/s/ / /g
-/^all all[]_ALL[[ :]]/i\\
-all-configured : all[]_ALL
-dnl dist-all exists... and would make for dist-all-all
-/[]_ALL[]_ALL/d
-/^.*[[=]]/!a\\
- @ HOST="\$(HOST)\" \\\\\\
- ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
- ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
- ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
- ; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" = "0" ; then : \\\\\\
- ; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\
- ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
- ; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\
- ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
- ; (cd "\$\$i" && test ! -f configure && \$(MAKE) \$\$use) ; done
-dnl special rule add-on: "dist" copies the tarball to $(PUB). (source tree)
-/dist[]_ALL *:/a\\
- @ HOST="\$(HOST)\" \\\\\\
- ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
- ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
- ; found=$x echo \$\$BUILD | wc -w $x \\\\\\
- ; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\
- ; if test "\$\$found" = "0" ; then : \\\\\\
- ; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
- ; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
- ; test -f "\$\$i/\$(PACKAGE)-\$(VERSION).tar.gz" \\\\\\
- && mv "\$\$i/\$(PACKAGE)-\$(VERSION).tar.gz" \$(PUB). ; break ; done
-dnl special rule add-on: "distclean" removes all local builddirs completely
-/distclean[]_ALL *:/a\\
- @ HOST="\$(HOST)\" \\\\\\
- ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
- ; BUILD=$x grep "^#### .*| *\\./" Makefile | sed -e 's/.*|//' $x \\\\\\
- ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
- ; echo "MAKE \$\$HOST : \$\$n * \$\@ (all local builds)" \\\\\\
- ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
- ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
- ; echo "# rm -r \$\$i"; done ; echo "# (sleep 3)" ; sleep 3 \\\\\\
- ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
- ; echo "rm -r \$\$i"; (rm -r "\$\$i") ; done ; rm Makefile
-_EOF
- cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING
- $SED -f $tmp/conftemp.sed Makefile >$SRC/Makefile
- if test -f "$SRC/m4_ifval([$2],[$2],[END])" ; then
- AC_MSG_NOTICE([extend TOP/Makefile with TOP/m4_ifval([$2],[$2],[END])])
- cat $SRC/END >>$SRC/Makefile
- fi ; xxxx="####"
- echo "$xxxx CONFIGURATIONS FOR TOPLEVEL MAKEFILE: " >>$SRC/Makefile
- # sanity check
- if grep '^; echo "MAKE ' $SRC/Makefile >/dev/null ; then
- AC_MSG_NOTICE([buggy sed found - it deletes tab in "a" text parts])
- $SED -e '/^@ HOST=/s/^/ /' -e '/^; /s/^/ /' $SRC/Makefile \
- >$SRC/Makefile~
- (test -s $SRC/Makefile~ && mv $SRC/Makefile~ $SRC/Makefile) 2>/dev/null
+AC_DEFUN([AX_SPEC_PACKAGE_LICENSE],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_LICENSE])dnl
+ AC_MSG_CHECKING([for spec license type])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[license],m4_ifval($1,$1))
+ VAR=`echo $VAR | sed -e 's/ *License//g'`
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for LICENSE / COPYRIGHT
+ if test ".$VAR" = "." ; then
+ for ac_file in "$srcdir/COPYING" "$srcdir/COPYING" "$srcdir/LICENSE" ; do
+ test -f "$ac_file" || continue
+dnl http://www.ibiblio.org/osrt/omf/omf_elements "16. Rights"
+ if grep "GNU LESSER GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null
+ then VAR="GNU LGPL" ; break
+ elif grep "GNU GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null
+ then VAR="GNU GPL" ; break
+ elif grep "MOZILLA PUBLIC LICENSE" "$ac_file" >/dev/null
+ then VAR="MPL" ; break
+ elif grep "Mozilla Public License" "$ac_file" >/dev/null
+ then VAR="MPL" ; break
+ elif grep -i "artistic license" "$ac_file" >/dev/null
+ then VAR="Artistic" ; break
+ elif grep -i "artistic control" "$ac_file" >/dev/null
+ then VAR="Artistic" ; break
+ elif grep -i "semblance of artistic" "$ac_file" >/dev/null
+ then VAR="Artistic" ; break
+ elif grep -i "above copyright notice" "$ac_file" >/dev/null
+ then VAR="BSD" ; break
fi
- else
- xxxx="\\#\\#\\#\\#"
- # echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed
- echo "s!^$xxxx [[^|]]* | *$SUB *\$!$xxxx ...... $SUB!" >$tmp/conftemp.sed
- $SED -f "$tmp/conftemp.sed" "$SRC/Makefile" >$tmp/mkfile.tmp
- cp "$tmp/conftemp.sed" "$SRC/makefiles.sed~" ## DEBUGGING
- cp "$tmp/mkfile.tmp" "$SRC/makefiles.out~" ## DEBUGGING
- if cmp -s "$SRC/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then
- AC_MSG_NOTICE([keeping TOP/Makefile from earlier configure])
- rm "$tmp/mkfile.tmp"
- else
- AC_MSG_NOTICE([reusing TOP/Makefile from earlier configure])
- mv "$tmp/mkfile.tmp" "$SRC/Makefile"
+ done
+ if test ".$VAR" = "." ; then
+ if test "$srcdir/COPYING.LIB" ; then VAR="GNU LGPL"
+ elif test ".$ltmain" != "." ; then VAR="GNU LGPL"
+ else VAR="GNU GPL"
fi
fi
- AC_MSG_NOTICE([build in $SUB (HOST=$ax_enable_builddir_host)])
- xxxx="####"
- echo "$xxxx" "$ax_enable_builddir_host" "|$SUB" >>$SRC/Makefile
fi
-popdef([END])dnl
-AS_VAR_POPDEF([SED])dnl
-AS_VAR_POPDEF([AUX])dnl
-AS_VAR_POPDEF([SRC])dnl
-AS_VAR_POPDEF([TOP])dnl
-AS_VAR_POPDEF([SUB])dnl
-],[dnl
-ax_enable_builddir_srcdir="$srcdir" # $srcdir
-ax_enable_builddir_host="$HOST" # $HOST / $host
-ax_enable_builddir_version="$VERSION" # $VERSION
-ax_enable_builddir_package="$PACKAGE" # $PACKAGE
-ax_enable_builddir_auxdir="$ax_enable_builddir_auxdir" # $AUX
-ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED
-ax_enable_builddir="$ax_enable_builddir" # $SUB
-])dnl
+ ],[test ".$VAR" = "." && VAR="$2"])
+ test "$VAR" = "GPL" && VAR="GNU GPL"
+ test "$VAR" = "LGPL" && VAR="GNU LGPL"
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ax_not_enable_frame_pointer.m4 ______
-dnl @* AX_NOT_ENABLE_FRAME_POINTER ([shellvar])
-dnl
-dnl add --enable-frame-pointer option, the default will add the gcc
-dnl --fomit-frame-pointer option to the shellvar (per default CFLAGS)
-dnl and remove the " -g " debuginfo option from it. In other words,
-dnl the default is "--disable-frame-pointer"
-dnl
-dnl @: guidod@gmx.de
-dnl @%Id: %
+AC_DEFUN([AX_SPEC_PACKAGE_SUMMARY],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_SUMMARY])dnl
+ AC_MSG_CHECKING([for spec summary])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[summary],m4_ifval($1,$1))
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for SUMMARY
+ if test ".$VAR" = "." ; then VAR="$PACKAGE"
+ test ".$VAR" = "." && VAR="foo"
+ test ".$ltmain" != "." && VAR="$VAR library"
+ fi
+ ],[test ".$VAR" = "." && VAR="$2"])
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
+])
-AC_DEFUN([AX_NOT_ENABLE_FRAME_POINTER],[dnl
-AS_VAR_PUSHDEF([VAR],[enable_frame_pointer])dnl
-AC_MSG_CHECKING([m4_ifval($1,$1,CFLAGS) frame-pointer])
-AC_ARG_ENABLE([frame-pointer], AC_HELP_STRING(
- [--enable-frame-pointer],[enable callframe generation for debugging]))
-case ".$VAR" in
- .|.no|.no,*) test ".$VAR" = "." && VAR="no"
- m4_ifval($1,$1,CFLAGS)=`echo dnl
- " $m4_ifval($1,$1,CFLAGS) " | sed -e 's/ -g / /'`
- if test ".$GCC" = ".yes" ; then
- m4_ifval($1,$1,CFLAGS)="$m4_ifval($1,$1,CFLAGS) -fomit-frame-pointer"
- AC_MSG_RESULT([$VAR, -fomit-frame-pointer added])
- else
- AC_MSG_RESULT([$VAR, -g removed])
- fi ;;
- *) AC_MSG_RESULT([$VAR, kept]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
+AC_DEFUN([AX_SPEC_PACKAGE_ICON],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_ICON])dnl
+ AC_MSG_CHECKING([for spec icon])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[icon],m4_ifval($1,$1))
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for ICON
+ if test ".$VAR" = "." ; then VAR="$PACKAGE-icon.png" ; fi
+ ],[test ".$VAR" = "." && VAR="$2"])
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ax_warning_default_pkgconfig.m4 ______
-dnl @* AX_WARNING_DEFAULT_PKGCONFIGDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])]
-dnl @* AX_ENABLE_DEFAULT_PKGCONFIGDIR [(dirvariable [,defsetting])]
+AC_DEFUN([AX_SPEC_PACKAGE_CATEGORY],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_CATEGORY])dnl
+ AC_MSG_CHECKING([for spec category])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[group],m4_ifval($1,$1))
+ VAR=`echo $VAR | sed -e 's/ /-/g'`
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for CATEGORY
+ if test ".$VAR" = "." ; then if test ".$ltmain" != "."
+ then VAR="Development/Library"
+ else VAR="Development/Other"
+ fi fi
+ ],[test ".$VAR" = "." && VAR="$2"])
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
+])
+
+AC_DEFUN([AX_SPEC_PACKAGE_NAME],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_NAME])dnl
+ AC_MSG_CHECKING([for spec package])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[name],m4_ifval($1,$1))
+ VAR=`echo $VAR | sed -e 's/ /-/g'`
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for PACKAGE
+ test ".$VAR" = "." && VAR=`basename $ax_spec_file .spec`
+ test ".$VAR" = ".README" && VAR="TODO"
+ test ".$VAR" = ".TODO" && VAR="foo"
+ ],[test ".$VAR" = "." && VAR="$2"])
+ test "VAR" = "PACKAGE_NAME" && test ".$PACKAGE" = "." && PACKAGE="$VAR"
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
+])
+
+AC_DEFUN([AX_SPEC_PACKAGE_VERSION_],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_VERSION])dnl
+ AC_MSG_CHECKING([for spec version])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[version],m4_ifval($1,$1))
+ VAR=`echo $VAR | sed -e 's/ /-/g'`
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for VERSION
+ test ".$VAR" = "." && VAR=`date +0.%y.%W%w`
+ ],[test ".$VAR" = "." && VAR="$2"])
+ test "VAR" = "PACKAGE_VERSION" && test ".$VERSION" = "." && VERSION="$VAR"
+ case "$VAR" in # note we set traditional VERSION before cleaning things up
+ *.*.) VAR="$VAR"`date +%W%w` ;;
+ *.*.*) ;;
+ *.) VAR="$VAR"`date +%y.%W%w` ;;
+ *.*) VAR="$VAR.0" ;;
+ *) VAR=AS_TR_SH([$VAR]) ; VAR="$VAR.`date +%y.%W%w`" ;;
+ esac
+ VAR=`echo $VAR | sed -e "s/[[.]][0]\\([0-9]\\)/.\\1/g"`
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
+])
+
+dnl for compatibility, we define ax_spec_package_version
+dnl to do all of ax_spec_package_name as well.
+AC_DEFUN([AX_SPEC_PACKAGE_VERSION],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ ifelse($1,,
+ AC_MSG_WARN([please use ax_spec_package_AND_version now!]),
+ AC_MSG_ERROR([please use ax_spec_package_AND_version now!]))
+ AX_SPEC_PACKAGE_NAME
+ AX_SPEC_PACKAGE_VERSION_
+
+])
+
+AC_DEFUN([AX_SPEC_PACKAGE_AND_VERSION],[
+ m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)])
+ AX_SPEC_PACKAGE_NAME
+ AX_SPEC_PACKAGE_VERSION_
+])
+
+AC_DEFUN([AX_SPEC_DEFAULTS],[
+ m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)])
+ AX_SPEC_PACKAGE_NAME
+ AX_SPEC_PACKAGE_VERSION_
+ AX_SPEC_PACKAGE_LICENSE
+ AX_SPEC_PACKAGE_SUMMARY
+ AX_SPEC_PACKAGE_CATEGORY
+ AX_SPEC_PACKAGE_ICON
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_set_version_info.m4 ______
+dnl AX_SET_VERSION_INFO [(VERSION [,PREFIX])] -*- m4 -*-
+dnl default $1 = $PACKAGE_VERSION
+dnl default $2 = <none>
+dnl
+dnl This macro is the successor of AC_SET_RELEASEINFO_VERSIONINFO but
+dnl it can be used in parallel because it uses all different variables.
dnl
-dnl print a warning message if the $(datadir)/aclocal directory
-dnl is not in the dirlist searched by the aclocal tool. This macro
-dnl is useful if some `make install` would target $(datadir)/aclocal
-dnl to install an autoconf m4 file of your project to be picked up
-dnl by other projects.
+dnl check the $VERSION number and cut the two last digit-sequences off
+dnl which will form a -version-info in a @VERSION_INFO@ ac_subst while
+dnl the rest is going to the -release name in a @RELEASE_INFO@ ac_subst.
dnl
-dnl default $1 dirvariable = pkgconfigdir
-dnl default $2 defsetting = ${libdir}/pkgconfig
-dnl default $3 action = nothing to do
-dnl default $4 action = warn the user about mismatch
+dnl you should keep these two seperate - the release-name may contain
+dnl alpha-characters and can be modified later with extra release-hints
+dnl e.g. RELEASE_INFO="$RELEASE_INFO-debug" for a debug version
+dnl of your lib. The $VERSION_INFO however should not be touched.
dnl
-dnl In the _WARNING_ variant, the defsetting is not placed in
-dnl dirvariable nor is it ac_subst'ed in any way. The default
-dnl fail-action $4 is to send a warning message to the user,
-dnl and the default accept-action $3 is nothing. It is expected that
-dnl a Makefile is generated with pkgconfigdir=${libdir}/pkgconfig
+dnl example: a VERSION="2.4.18" will be transformed into
+dnl RELEASE_INFO = -release 2
+dnl VERSION_INFO = -versioninfo 4:18
+dnl then use these two variables and push them to your libtool linker
+dnl libtest_la_LIBADD = @RELEASE_INFO@ @VERSION_INFO@
+dnl and for a linux-target this will tell libtool to install the lib as
+dnl libmy.so libmy.la libmy.a libmy-2.so.4 libmy-2.so.4.0.18
+dnl and executables will get link-resolve-infos for libmy-2.so.4 - therefore
+dnl the patch-level is ignored during ldso linking, and ldso will use the
+dnl one with the highest patchlevel. Using just "-release $(VERSION)"
+dnl during libtool-linking would not do that - omitting the -version-info
+dnl will libtool install libmy.so libmy.la libmy.a libmy-2.4.18.so and
+dnl executables would get hardlinked with the 2.4.18 version of your lib.
dnl
-dnl The _ENABLE_ variant however will set not only the $pkgconfigdir shell
-dnl var of the script, but it is also AC-SUBST'ed on default - and
-dnl furthermore a configure option "--enable-default-pkgconfigdir" is
-dnl provided. Only if that option is set then $2 default is not set to
-dnl the canonic default in the a $prefix subpath but instead $2 default
-dnl is set to the primary path where `pkg-config` looks for .pc files. The
-dnl user may also override the default on the command line.
+dnl This background does also explain the default dll name for a win32
+dnl target : libtool will choose to make up libmy-2-4.dll for this
+dnl version spec.
+dnl
+dnl this macro does also set the usual three parts of a version spec
+dnl $MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION but does not ac_subst
+dnl for the plain AX_SET_VERSION_INFO macro. Use instead one of the numbered
+dnl macros AX_SET_VERSION_INFO1 (use first number for release part) or
+dnl that AX_SET_VERSION_INFO2 (use the first two numbers for release part).
dnl
-dnl @: guidod@gmx.de
-dnl @%Id: ax_warning_default_pkgconfig.m4,v 1.1 2003/10/18 02:57:13 guidod Exp %
+dnl You may add sublevel parts like "1.4.2-ac5" where the sublevel is
+dnl just killed from these version/release substvars. That allows to grab
+dnl the version off a .spec file like with AX_SPEC_PACKAGE_VERSION where
+dnl the $VERSION is used to name a tarball or distpack like mylib-2.2.9pre4
+dnl
+dnl Unlike earlier macros, you can use this one to break up different
+dnl VERSIONs and put them into different variables, just hint with
+dnl PREFIX-setting - i.e. _VERSION(2.4.5,TEST) will set variables named
+dnl TEST_MAJOR_VERSION=2... and of course $TEST_RELEASE_INFO etc.
+dnl (for the moment, it needs to be a literal prefix *sigh*)
+dnl
+dnl @version %Id: ax_set_version_info.m4,v 1.1 2003/07/02 23:41:42 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
-AC_DEFUN([AX_WARNING_DEFAULT_PKGCONFIGDIR],[dnl
-AC_REQUIRE([AX_EXPAND_PREFIX])dnl
-AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_dir])dnl
-AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
-AS_VAR_PUSHDEF([LOC],[ax_warning_default_pkgconfig_loc])dnl
-LOC='m4_if([$2],,[${libdir}/pkgconfig],[$2])'
-m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"])
- if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
- AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
- fi
- if test "$PKG_CONFIG" = "no"
- then DIR="/" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
- else BIN=`AS_DIRNAME(["$DIR"])` ;
- if test -d "$BIN/lib/pkgconfig" ; then
- DIR="$BIN/lib/pkgconfig"
- else BIN=`AS_DIRNAME(["$DIR"])`
- if test -d "$BIN/lib/pkgconfig" ; then
- DIR="$BIN/lib/pkgconfig"
- else
- if test -d "/usr/lib/pkgconfig" ; then
- DIR="/usr/lib/pkgconfig"
- else
- DIR="/"
- fi fi fi
- fi
-AC_RUN_LOG([: last pkgconfig dir is assumed as "$DIR"])
-DIR=`eval "echo $DIR"`
-DIR=`eval "echo $DIR"`
-LOC=`eval "echo $LOC"`
-LOC=`eval "echo $LOC"`
-LOC=`eval "echo $LOC"`
-LOC=`eval "echo $LOC"`
-for DIR in `echo "$PKG_CONFIG_PATH:$DIR" | sed -e 's,:, ,g'` ; do
- AC_RUN_LOG([: test ".$LOC" = ".$DIR"])
- test ".$LOC" = ".$DIR" && break
-done
-if test "$LOC" != "$DIR" ; then
- m4_ifval([$4],[$4],[dnl
- AC_MSG_NOTICE([warning: m4_if([$1],,[pkgconfigdir],[$1])=$LOC dnl
-(see config.log)])
- AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR])
- cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
- pkgconfigdir: the m4_if([$1],,[default pkgconfigdir],[$1 value]) of $LOC
- pkgconfigdir: is not listed in the dirlist where pkg-config will look for
- pkgconfigdir: package-configs - you can override the install-path using
- pkgconfigdir: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR
- pkgconfigdir: or set/append the directory to the environment variable
- pkgconfigdir: PKG_CONFIG_PATH="$LOC"
-EOF
- m4_ifvaln([$5],[$5])])dnl
- m4_ifvaln([$3],[else $3])dnl
-fi
-AS_VAR_POPDEF([LOC])dnl
-AS_VAR_POPDEF([BIN])dnl
-AS_VAR_POPDEF([DIR])dnl
+AC_DEFUN([AX_SET_VERSION_INFO1],[dnl
+AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
+AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
+AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
+AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
+test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
+AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
+ifelse($1,,$PACKAGE_VERSION,$1) )
+ MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
+ MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
+ MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
+ MICRO="$MINOR"
+ MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
+ MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
+ PATCH="$MICRO"
+ MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
+ PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
+ if test "_$MICRO" = "_" ; then MICRO="0" ; fi
+ if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
+ MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
+ LTREL="-release $MAJOR"
+ LTVER="-version-info $MINOR:$MICRO"
+AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
+AC_SUBST(MAJOR)
+AC_SUBST(MINOR)
+AC_SUBST(MICRO)
+AC_SUBST(PATCH)
+AC_SUBST(LTREL)
+AC_SUBST(LTVER)
+AS_VAR_POPDEF([LTVER])dnl
+AS_VAR_POPDEF([LTREL])dnl
+AS_VAR_POPDEF([PATCH])dnl
+AS_VAR_POPDEF([MICRO])dnl
+AS_VAR_POPDEF([MINOR])dnl
+AS_VAR_POPDEF([MAJOR])dnl
])
-AC_DEFUN([AX_ENABLE_DEFAULT_PKGCONFIGDIR],[dnl
-AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
-AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_def])dnl
-AS_VAR_PUSHDEF([DEF],[ax_warning_default_pkgconfig_def])dnl
-AC_ARG_ENABLE([enable-default-pkgconfigdir],
-[ --enable-default-pkgconfigdir(=PATH) override the libdir/pkgconfig default])
-test ".$enable_default_pkgconfigdir" = "." && enable_default_pkgconfigdir="no"
-case ".$enable_default_pkgconfigdir" in
- .no) DIR='m4_if([$2],,[${libdir}/pkgconfig],[$2])' ;;
- .yes) # autodetect
- if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
- AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
- fi
- if test "$PKG_CONFIG" = "no"
- then DIR="/tmp" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
- else BIN=`AS_DIRNAME(["$DIR"])` ;
- if test -d "$BIN/lib/pkgconfig" ; then
- DIR="$BIN/lib/pkgconfig"
- else BIN=`AS_DIRNAME(["$DIR"])`
- if test -d "$BIN/lib/pkgconfig" ; then
- DIR="$BIN/lib/pkgconfig"
- else
- if test -d "/usr/lib/pkgconfig" ; then
- DIR="/usr/lib/pkgconfig"
- else
- DIR="/tmp"
- fi fi fi
- fi ;;
- *) DIR="$enable_default_pkgconfigdir" ;;
-esac
-AX_WARNING_DEFAULT_PKGCONFIGDIR([$1],[$DEF],[$3],[$4],[$5])
-m4_if([$1],,[pkgconfigdir],[$1])="$ax_warning_default_pkgconfig_dir"
-AC_SUBST(m4_if([$1],,[pkgconfigdir],[$1]))
-AS_VAR_POPDEF([DEF])dnl
-AS_VAR_POPDEF([DIR])dnl
-AS_VAR_POPDEF([BIN])dnl
+AC_DEFUN([AX_SET_VERSION_INFO2],[dnl
+AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
+AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
+AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
+AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
+test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
+AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
+ifelse($1,,$PACKAGE_VERSION,$1) )
+ MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
+ MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
+ MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
+ MICRO="$MINOR"
+ MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
+ MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
+ PATCH="$MICRO"
+ MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
+ PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
+ test "_$MICRO" != "_" || MICRO="0"
+ if test "_$MINOR" != "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
+ MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
+ LTREL="-release $MAJOR.$MINOR"
+ LTVER="-version-info 0:$MICRO"
+AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
+AC_SUBST(MAJOR)
+AC_SUBST(MINOR)
+AC_SUBST(MICRO)
+AC_SUBST(PATCH)
+AC_SUBST(LTREL)
+AC_SUBST(LTVER)
+AS_VAR_POPDEF([LTVER])dnl
+AS_VAR_POPDEF([LTREL])dnl
+AS_VAR_POPDEF([PATCH])dnl
+AS_VAR_POPDEF([MICRO])dnl
+AS_VAR_POPDEF([MINOR])dnl
+AS_VAR_POPDEF([MAJOR])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ac_sys_largefile_sensitive.m4 ______
-dnl @synopsis AC_SYS_LARGEFILE_SENSITIVE
+AC_DEFUN([AX_SET_VERSION_INFO],[dnl
+AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
+AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
+AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
+AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
+test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
+AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
+ifelse($1,,$PACKAGE_VERSION,$1) )
+ MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
+ MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
+ MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
+ MICRO="$MINOR"
+ MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
+ MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
+ PATCH="$MICRO"
+ MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
+ PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'`
+ if test "_$MICRO" = "_" ; then MICRO="0" ; fi
+ if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
+ MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
+ LTREL="-release $MAJOR"
+ LTVER="-version-info $MINOR:$MICRO"
+AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
+AC_SUBST(LTREL)
+AC_SUBST(LTVER)
+AS_VAR_POPDEF([LTVER])dnl
+AS_VAR_POPDEF([LTREL])dnl
+AS_VAR_POPDEF([PATCH])dnl
+AS_VAR_POPDEF([MICRO])dnl
+AS_VAR_POPDEF([MINOR])dnl
+AS_VAR_POPDEF([MAJOR])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_enable_builddir.m4 ______
+dnl @synopsis AX_ENABLE_BUILDDIR [(dirstring-or-command [,Makefile.mk [,-all]])]
dnl
-dnl checker whether the current system is sensitive to -Ddefines
-dnl making off_t having different types/sizes. Automatically define
-dnl a config.h symbol LARGEFILE_SENSITIVE if that is the case,
-dnl otherwise leave everything as is.
+dnl if the current configure was run within the srcdir then
+dnl we move all configure-files into a subdir and let the configure
+dnl steps continue there. We provide an option --disable-builddir
+dnl to suppress the move into a separate builddir.
dnl
-dnl This macro builds on top of AC_SYS_LARGEFILE to detect whether
-dnl special options are neede to make the code use 64bit off_t - in
-dnl many setups this will also make the code use 64bit off_t immediatly.
+dnl Defaults:
dnl
-dnl The common use of a LARGEFILE_SENSITIVE config.h-define is to rename
-dnl exported functions, usually adding a 64 to the original function name.
-dnl Such renamings are only needed on systems being both (a) 32bit off_t
-dnl by default and (b) implementing large.file extensions (as for unix98).
+dnl $1 = $host (overridden with $HOST)
+dnl $2 = Makefile.mk
+dnl $3 = -all
dnl
-dnl a renaming section could look like this:
-dnl #if defined LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 == 64
-dnl #define zzip_open zzip_open64
-dnl #define zzip_seek zzip_seek64
-dnl #endif
+dnl This macro must be called before AM_INIT_AUTOMAKE.
dnl
-dnl for libraries, it is best to take advantage of the prefix-config.h
-dnl macro, otherwise you want to export a renamed LARGEFILE_SENSITIVE
-dnl in an installed header file. -> see AX_PREFIX_CONFIG_H
+dnl it creates a default toplevel srcdir Makefile from the information found
+dnl in the created toplevel builddir Makefile. It just copies the variables
+dnl and rule-targets, each extended with a default rule-execution that
+dnl recurses into the build directory of the current "HOST". You can override
+dnl the auto-dection through `config.guess` and build-time of course, as in
dnl
-dnl @, System Headers
-dnl @Author Guido Draheim <guidod@gmx.de>
-dnl @Version %Id: ac_sys_largefile_sensitive.m4,v 1.2 2003/05/13 18:46:22 guidod Exp %
-
-AC_DEFUN([AC_SYS_LARGEFILE_SENSITIVE],[dnl
-AC_REQUIRE([AC_SYS_LARGEFILE])dnl
-# we know about some internals of ac_sys_largefile here...
-AC_MSG_CHECKING(whether system differentiates 64bit off_t by defines)
-ac_cv_sys_largefile_sensitive="no"
-if test ".$ac_cv_sys_file_offset_bits$ac_cv_sys_large_files" != ".nono"
-then ac_cv_sys_largefile_sensitive="yes"
- AC_DEFINE(LARGEFILE_SENSITIVE, 1,
- [whether the system defaults to 32bit off_t but can do 64bit when requested])
-fi
-AC_MSG_RESULT([$ac_cv_sys_largefile_sensitive])
-])
-
-dnl ______ /usr/share/aclocal/guidod/ax_warning_default_aclocaldir.m4 ______
-dnl @* AX_WARNING_DEFAULT_ACLOCALDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])]
-dnl @* AX_ENABLE_DEFAULT_ACLOCALDIR [(dirvariable [,defsetting])]
+dnl make HOST=i386-mingw-cross
dnl
-dnl print a warning message if the $(datadir)/aclocal directory
-dnl is not in the dirlist searched by the aclocal tool. This macro
-dnl is useful if some `make install` would target $(datadir)/aclocal
-dnl to install an autoconf m4 file of your project to be picked up
-dnl by other projects.
+dnl which can of course set at configure time as well using
dnl
-dnl default $1 dirvariable = aclocaldir
-dnl default $2 defsetting = ${datadir}/aclocal
-dnl default $3 action = nothing to do
-dnl default $4 action = warn the user about mismatch
+dnl configure --host=i386-mingw-cross
dnl
-dnl In the _WARNING_ variant, the defsetting is not placed in
-dnl dirvariable nor is it ac_subst'ed in any way. The default
-dnl fail-action $4 is to send a warning message to the user,
-dnl and the default accept-action $3 is nothing. It is expected that
-dnl a Makefile is generated with aclocaldir=${datadir}/aclocal
+dnl After the default has been created, additional rules can be
+dnl appended that will not just recurse into the subdirectories and
+dnl only ever exist in the srcdir toplevel makefile - these parts
+dnl are read from the $2 = Makefile.mk file
dnl
-dnl The _ENABLE_ variant however will set not only the $aclocaldir shell
+dnl The automatic rules are usually scanning the toplevel Makefile for
+dnl lines like '#### $host |$builddir' to recognize the place where to
+dnl recurse into. Usually, the last one is the only one used. However,
+dnl almost all targets have an additional "*-all" rule which makes the
+dnl script to recurse into _all_ variants of the current HOST (!!)
+dnl setting. The "-all" suffix can be overriden for the macro as well.
+dnl
+dnl a special rule is only given for things like "dist" that will
+dnl copy the tarball from the builddir to the sourcedir (or $(PUB))
+dnl for reason of convenience.
+dnl
+dnl @author Guido Draheim
+dnl @version %Id: ax_enable_builddir.m4,v 1.13 2003/10/12 06:27:40 guidod Exp %
+dnl
+AC_DEFUN([AX_ENABLE_BUILDDIR],[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl
+AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl
+AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
+SUB="."
+if test ".$ac_srcdir_defaulted" != ".no" ; then
+ if test ".$srcdir" = ".." ; then
+ AC_PATH_PROG(SED,gsed sed, sed)
+ AC_ARG_ENABLE([builddir], AC_HELP_STRING(
+ [--disable-builddir],[disable automatic build in subdir of sources])
+ ,[SUB="$withval"], [SUB="."])
+ test ".$SUB" = ".." && SUB=`$SED -V 2>&1 |$SED -e '/GNU/!d' -e 's/.*/yes/'`
+ test ".$SUB" = "." && SUB="."
+ test ".$SUB" = ".no" && SUB="."
+ if test ".$SUB" != ".." ; then # we know where to go and
+ if test ! -f config.status ; then # srcdir not yet configured
+ test ".$HOST" = "." && HOST="$host"
+ test ".$SUB" = ".yes" && SUB="m4_ifval([$1], [$1],[$HOST])"
+ AS_MKDIR_P([$SUB])
+ echo __.$SUB.__ > $SUB/conftest.tmp
+ cd $SUB
+ if grep __.$SUB.__ conftest.tmp >/dev/null 2>/dev/null ; then
+ rm conftest.tmp
+ AC_MSG_RESULT([continue configure in default builddir ./$SUB])
+ else
+ AC_MSG_ERROR([could not change to default builddir ./$SUB])
+ fi
+ srcdir=`echo "$SUB" |
+ $SED -e 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,[[/]]$,,;'`
+ AUX="$ac_aux_dir"
+ test ".$ac_aux_dir" != "." && ac_aux_dir="$srcdir/$ac_aux_dir"
+ test ".$ac_install_sh" != "." && ac_install_sh="$srcdir/$ac_install_sh"
+ ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ ac_configure="$SHELL $ac_aux_dir/configure" # Cygnus configure
+
+ test -f $srcdir/config.log && mv $srcdir/config.log .
+ test -f $srcdir/confdefs.h && mv $srcdir/confdefs.h .
+ test -f $srcdir/conftest.log && mv $srcdir/conftest.log .
+ test -f $srcdir/$cache_file && mv $srcdir/$cache_file .
+ fi fi
+ fi
+fi
+AS_VAR_POPDEF([SED])dnl
+AS_VAR_POPDEF([AUX])dnl
+AS_VAR_POPDEF([SUB])dnl
+AC_CONFIG_COMMANDS([buildir],[dnl .............. config.status ..............
+AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl
+AS_VAR_PUSHDEF([TOP],[top_srcdir])dnl
+AS_VAR_PUSHDEF([SRC],[ac_top_srcdir])dnl
+AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl
+AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
+pushdef([END],[Makefile.mk])dnl
+pushdef([_ALL],[ifelse([$3],,[-all],[$3])])dnl
+ SUB=`grep "continue configure in default builddir " config.log |
+ $SED -e "s/.*continue configure in default builddir //"`
+ SRC="$ax_enable_builddir_srcdir"
+ if test ".$SUB" = "." ; then
+ if test -f "$TOP/Makefile" ; then
+ AC_MSG_NOTICE([skipping TOP/Makefile - left untouched])
+ else
+ AC_MSG_NOTICE([skipping TOP/Makefile - not created])
+ fi
+ else
+ if test -f "$SRC/Makefile" ; then
+ a=`grep "^VERSION " "$SRC/Makefile"` ; b=`grep "^VERSION " Makefile`
+ test "$a" != "$b" && rm "$SRC/Makefile"
+ fi
+ if test -f "$SRC/Makefile" ; then
+ echo "$SRC/Makefile : $SRC/Makefile.in" > $tmp/conftemp.mk
+ echo " []@ echo 'REMOVED,,,' >\$[]@" >> $tmp/conftemp.mk
+ eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null"
+ if grep '^REMOVED,,,' "$SRC/Makefile" >/dev/null
+ then rm $SRC/Makefile ; fi
+ cp $tmp/conftemp.mk $SRC/makefiles.mk~ ## DEBUGGING
+ fi
+ if test ! -f "$SRC/Makefile" ; then
+ AC_MSG_NOTICE([create TOP/Makefile guessed from local Makefile])
+ x='`' ; cat >$tmp/conftemp.sed <<_EOF
+/^\$/n
+x
+/^\$/bS
+x
+/\\\\\$/{H;d;}
+{H;s/.*//;x;}
+bM
+:S
+x
+/\\\\\$/{h;d;}
+{h;s/.*//;x;}
+:M
+s/\\(\\n\\) /\\1 /g
+/^ /d
+/^[[ ]]*[[\\#]]/d
+/^VPATH *=/d
+s/^srcdir *=.*/srcdir = ./
+s/^top_srcdir *=.*/top_srcdir = ./
+/[[:=]]/!d
+/^\\./d
+s/:.*/:/
+/:\$/s/ / /g
+/:\$/s/ \\([[a-z]][[a-z-]]*[[a-z]]\\) / \\1 \\1[]_ALL /g
+/:\$/s/^\\([[a-z]][[a-z-]]*[[a-z]]\\)\\([[ :]]\\)/\\1 \\1[]_ALL\\2/
+/:\$/s/ / /g
+/^all all[]_ALL[[ :]]/i\\
+all-configured : all[]_ALL
+dnl dist-all exists... and would make for dist-all-all
+/[]_ALL[]_ALL/d
+/^.*[[=]]/!a\\
+ @ HOST="\$(HOST)\" \\\\\\
+ ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
+ ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
+ ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
+ ; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" = "0" ; then : \\\\\\
+ ; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\
+ ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
+ ; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\
+ ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
+ ; (cd "\$\$i" && test ! -f configure && \$(MAKE) \$\$use) ; done
+dnl special rule add-on: "dist" copies the tarball to $(PUB). (source tree)
+/dist[]_ALL *:/a\\
+ @ HOST="\$(HOST)\" \\\\\\
+ ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
+ ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
+ ; found=$x echo \$\$BUILD | wc -w $x \\\\\\
+ ; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\
+ ; if test "\$\$found" = "0" ; then : \\\\\\
+ ; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
+ ; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
+ ; test -f "\$\$i/\$(PACKAGE)-\$(VERSION).tar.gz" \\\\\\
+ && mv "\$\$i/\$(PACKAGE)-\$(VERSION).tar.gz" \$(PUB). ; break ; done
+dnl special rule add-on: "distclean" removes all local builddirs completely
+/distclean[]_ALL *:/a\\
+ @ HOST="\$(HOST)\" \\\\\\
+ ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
+ ; BUILD=$x grep "^#### .*| *\\./" Makefile | sed -e 's/.*|//' $x \\\\\\
+ ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
+ ; echo "MAKE \$\$HOST : \$\$n * \$\@ (all local builds)" \\\\\\
+ ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
+ ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
+ ; echo "# rm -r \$\$i"; done ; echo "# (sleep 3)" ; sleep 3 \\\\\\
+ ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
+ ; echo "rm -r \$\$i"; (rm -r "\$\$i") ; done ; rm Makefile
+_EOF
+ cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING
+ $SED -f $tmp/conftemp.sed Makefile >$SRC/Makefile
+ if test -f "$SRC/m4_ifval([$2],[$2],[END])" ; then
+ AC_MSG_NOTICE([extend TOP/Makefile with TOP/m4_ifval([$2],[$2],[END])])
+ cat $SRC/END >>$SRC/Makefile
+ fi ; xxxx="####"
+ echo "$xxxx CONFIGURATIONS FOR TOPLEVEL MAKEFILE: " >>$SRC/Makefile
+ # sanity check
+ if grep '^; echo "MAKE ' $SRC/Makefile >/dev/null ; then
+ AC_MSG_NOTICE([buggy sed found - it deletes tab in "a" text parts])
+ $SED -e '/^@ HOST=/s/^/ /' -e '/^; /s/^/ /' $SRC/Makefile \
+ >$SRC/Makefile~
+ (test -s $SRC/Makefile~ && mv $SRC/Makefile~ $SRC/Makefile) 2>/dev/null
+ fi
+ else
+ xxxx="\\#\\#\\#\\#"
+ # echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed
+ echo "s!^$xxxx [[^|]]* | *$SUB *\$!$xxxx ...... $SUB!" >$tmp/conftemp.sed
+ $SED -f "$tmp/conftemp.sed" "$SRC/Makefile" >$tmp/mkfile.tmp
+ cp "$tmp/conftemp.sed" "$SRC/makefiles.sed~" ## DEBUGGING
+ cp "$tmp/mkfile.tmp" "$SRC/makefiles.out~" ## DEBUGGING
+ if cmp -s "$SRC/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then
+ AC_MSG_NOTICE([keeping TOP/Makefile from earlier configure])
+ rm "$tmp/mkfile.tmp"
+ else
+ AC_MSG_NOTICE([reusing TOP/Makefile from earlier configure])
+ mv "$tmp/mkfile.tmp" "$SRC/Makefile"
+ fi
+ fi
+ AC_MSG_NOTICE([build in $SUB (HOST=$ax_enable_builddir_host)])
+ xxxx="####"
+ echo "$xxxx" "$ax_enable_builddir_host" "|$SUB" >>$SRC/Makefile
+ fi
+popdef([END])dnl
+AS_VAR_POPDEF([SED])dnl
+AS_VAR_POPDEF([AUX])dnl
+AS_VAR_POPDEF([SRC])dnl
+AS_VAR_POPDEF([TOP])dnl
+AS_VAR_POPDEF([SUB])dnl
+],[dnl
+ax_enable_builddir_srcdir="$srcdir" # $srcdir
+ax_enable_builddir_host="$HOST" # $HOST / $host
+ax_enable_builddir_version="$VERSION" # $VERSION
+ax_enable_builddir_package="$PACKAGE" # $PACKAGE
+ax_enable_builddir_auxdir="$ax_enable_builddir_auxdir" # $AUX
+ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED
+ax_enable_builddir="$ax_enable_builddir" # $SUB
+])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_warning_default_pkgconfig.m4 ______
+dnl @* AX_WARNING_DEFAULT_PKGCONFIGDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])]
+dnl @* AX_ENABLE_DEFAULT_PKGCONFIGDIR [(dirvariable [,defsetting])]
+dnl
+dnl print a warning message if the $(datadir)/aclocal directory
+dnl is not in the dirlist searched by the aclocal tool. This macro
+dnl is useful if some `make install` would target $(datadir)/aclocal
+dnl to install an autoconf m4 file of your project to be picked up
+dnl by other projects.
+dnl
+dnl default $1 dirvariable = pkgconfigdir
+dnl default $2 defsetting = ${libdir}/pkgconfig
+dnl default $3 action = nothing to do
+dnl default $4 action = warn the user about mismatch
+dnl
+dnl In the _WARNING_ variant, the defsetting is not placed in
+dnl dirvariable nor is it ac_subst'ed in any way. The default
+dnl fail-action $4 is to send a warning message to the user,
+dnl and the default accept-action $3 is nothing. It is expected that
+dnl a Makefile is generated with pkgconfigdir=${libdir}/pkgconfig
+dnl
+dnl The _ENABLE_ variant however will set not only the $pkgconfigdir shell
dnl var of the script, but it is also AC-SUBST'ed on default - and
-dnl furthermore a configure option "--enable-default-aclocaldir" is
+dnl furthermore a configure option "--enable-default-pkgconfigdir" is
dnl provided. Only if that option is set then $2 default is not set to
dnl the canonic default in the a $prefix subpath but instead $2 default
-dnl is set to the primary path where `aclocal` looks for macros. The
+dnl is set to the primary path where `pkg-config` looks for .pc files. The
dnl user may also override the default on the command line.
-dnl
+dnl
dnl @: guidod@gmx.de
-dnl @%Id: ax_warning_default_aclocaldir.m4,v 1.1 2003/10/18 02:57:12 guidod Exp %
+dnl @%Id: ax_warning_default_pkgconfig.m4,v 1.1 2003/10/18 02:57:13 guidod Exp %
-AC_DEFUN([AX_WARNING_DEFAULT_ACLOCALDIR],[dnl
+AC_DEFUN([AX_WARNING_DEFAULT_PKGCONFIGDIR],[dnl
AC_REQUIRE([AX_EXPAND_PREFIX])dnl
-AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_dir])dnl
-AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl
-AS_VAR_PUSHDEF([LOC],[ax_warning_default_aclocal_loc])dnl
-LOC='m4_if([$2],,[${datadir}/aclocal],[$2])'
+AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_dir])dnl
+AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
+AS_VAR_PUSHDEF([LOC],[ax_warning_default_pkgconfig_loc])dnl
+LOC='m4_if([$2],,[${libdir}/pkgconfig],[$2])'
m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"])
- if test ".$ACLOCAL" = "." ; then
- AC_PATH_PROG([ACLOCAL],[aclocal],[:])
+ if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
+ AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
fi
- BIN="$ACLOCAL"
- test ".$BIN" = "." && BIN="aclocal"
- DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"`
- test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal"
- test ".$DIR" = "." && DIR="/tmp"
-DIR=`eval "echo $DIR"` # we need to expand
+ if test "$PKG_CONFIG" = "no"
+ then DIR="/" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
+ else BIN=`AS_DIRNAME(["$DIR"])` ;
+ if test -d "$BIN/lib/pkgconfig" ; then
+ DIR="$BIN/lib/pkgconfig"
+ else BIN=`AS_DIRNAME(["$DIR"])`
+ if test -d "$BIN/lib/pkgconfig" ; then
+ DIR="$BIN/lib/pkgconfig"
+ else
+ if test -d "/usr/lib/pkgconfig" ; then
+ DIR="/usr/lib/pkgconfig"
+ else
+ DIR="/"
+ fi fi fi
+ fi
+AC_RUN_LOG([: last pkgconfig dir is assumed as "$DIR"])
+DIR=`eval "echo $DIR"`
DIR=`eval "echo $DIR"`
LOC=`eval "echo $LOC"`
LOC=`eval "echo $LOC"`
LOC=`eval "echo $LOC"`
LOC=`eval "echo $LOC"`
-AC_RUN_LOG([: test "$LOC" = "$DIR"])
-if test "$LOC" != "$DIR" ; then
- if test -f "$DIR/dirlist" ; then
- for DIR in `cat $DIR/dirlist` $DIR ; do
- AC_RUN_LOG([: test "$LOC" = "$DIR"])
- test "$LOC" = "$DIR" && break
- done
- fi
- if test "$LOC" != "$DIR" ; then
- m4_ifval([$4],[$4],[dnl
- AC_MSG_NOTICE([warning: m4_if([$1],,[aclocaldir],[$1])=$LOC dnl
+for DIR in `echo "$PKG_CONFIG_PATH:$DIR" | sed -e 's,:, ,g'` ; do
+ AC_RUN_LOG([: test ".$LOC" = ".$DIR"])
+ test ".$LOC" = ".$DIR" && break
+done
+if test "$LOC" != "$DIR" ; then
+ m4_ifval([$4],[$4],[dnl
+ AC_MSG_NOTICE([warning: m4_if([$1],,[pkgconfigdir],[$1])=$LOC dnl
(see config.log)])
- AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[aclocaldir],[$1])=$DIR])
+ AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR])
cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
- aclocaldir: the m4_if([$1],,[default aclocaldir],[$1 value]) of $LOC
- aclocaldir: is not listed in the dirlist where aclocal will look
- aclocaldir: for macros - you can override the install-path using
- aclocaldir: make install aclocaldir=$DIR
- aclocaldir: or append the directory to aclocal reconfigures later as
- aclocaldir: aclocal -I $LOC
- aclocaldir: when an autoconf macro is needed from that directory
+ pkgconfigdir: the m4_if([$1],,[default pkgconfigdir],[$1 value]) of $LOC
+ pkgconfigdir: is not listed in the dirlist where pkg-config will look for
+ pkgconfigdir: package-configs - you can override the install-path using
+ pkgconfigdir: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR
+ pkgconfigdir: or set/append the directory to the environment variable
+ pkgconfigdir: PKG_CONFIG_PATH="$LOC"
EOF
m4_ifvaln([$5],[$5])])dnl
m4_ifvaln([$3],[else $3])dnl
- fi
fi
AS_VAR_POPDEF([LOC])dnl
AS_VAR_POPDEF([BIN])dnl
AS_VAR_POPDEF([DIR])dnl
])
-AC_DEFUN([AX_ENABLE_DEFAULT_ACLOCALDIR],[dnl
-AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl
-AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_def])dnl
-AS_VAR_PUSHDEF([DEF],[ax_warning_default_aclocal_def])dnl
-AC_ARG_ENABLE([enable-default-aclocaldir],
-[ --enable-default-aclocaldir(=PATH) override the datadir/aclocal default])
-test ".$enable_default_aclocaldir" = "." && enable_default_aclocaldir="no"
-case ".$enable_default_aclocaldir" in
- .no) DIR='m4_if([$2],,[${datadir}/aclocal],[$2])' ;;
+AC_DEFUN([AX_ENABLE_DEFAULT_PKGCONFIGDIR],[dnl
+AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
+AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_def])dnl
+AS_VAR_PUSHDEF([DEF],[ax_warning_default_pkgconfig_def])dnl
+AC_ARG_ENABLE([enable-default-pkgconfigdir],
+[ --enable-default-pkgconfigdir(=PATH) override the libdir/pkgconfig default])
+test ".$enable_default_pkgconfigdir" = "." && enable_default_pkgconfigdir="no"
+case ".$enable_default_pkgconfigdir" in
+ .no) DIR='m4_if([$2],,[${libdir}/pkgconfig],[$2])' ;;
.yes) # autodetect
- if test ".$ACLOCAL" = "." ; then
- AC_PATH_PROG([ACLOCAL],[aclocal],[:])
+ if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
+ AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
fi
- BIN="$ACLOCAL"
- test ".$BIN" = "." && BIN="aclocal"
- DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"`
- test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal"
- test ".$DIR" = "." && DIR="/tmp" ;;
- *) DIR="$enable_default_aclocaldir" ;;
+ if test "$PKG_CONFIG" = "no"
+ then DIR="/tmp" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
+ else BIN=`AS_DIRNAME(["$DIR"])` ;
+ if test -d "$BIN/lib/pkgconfig" ; then
+ DIR="$BIN/lib/pkgconfig"
+ else BIN=`AS_DIRNAME(["$DIR"])`
+ if test -d "$BIN/lib/pkgconfig" ; then
+ DIR="$BIN/lib/pkgconfig"
+ else
+ if test -d "/usr/lib/pkgconfig" ; then
+ DIR="/usr/lib/pkgconfig"
+ else
+ DIR="/tmp"
+ fi fi fi
+ fi ;;
+ *) DIR="$enable_default_pkgconfigdir" ;;
esac
-AX_WARNING_DEFAULT_ACLOCALDIR([$1],[$DEF],[$3],[$4],[$5])
-m4_if([$1],,[aclocaldir],[$1])="$ax_warning_default_aclocal_dir"
-AC_SUBST(m4_if([$1],,[aclocaldir],[$1]))
+AX_WARNING_DEFAULT_PKGCONFIGDIR([$1],[$DEF],[$3],[$4],[$5])
+m4_if([$1],,[pkgconfigdir],[$1])="$ax_warning_default_pkgconfig_dir"
+AC_SUBST(m4_if([$1],,[pkgconfigdir],[$1]))
AS_VAR_POPDEF([DEF])dnl
AS_VAR_POPDEF([DIR])dnl
AS_VAR_POPDEF([BIN])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ax_prefix_config_h.m4 ______
-dnl @synopsis AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]
+dnl ______ /usr/share/aclocal/Miscellaneous/ac_compile_check_sizeof.m4 ______
+dnl @synopsis AC_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]])
dnl
-dnl This is a new variant from ac_prefix_config_ this one will use a
-dnl lowercase-prefix if the config-define was starting with a
-dnl lowercase-char, e.g. "#define const", "#define restrict", or
-dnl "#define off_t", (and this one can live in another directory, e.g.
-dnl testpkg/config.h therefore I decided to move the output-header to
-dnl be the first arg)
+dnl This macro checks for the size of TYPE using compile checks, not
+dnl run checks. You can supply extra HEADERS to look into. the check
+dnl will cycle through 1 2 4 8 16 and any EXTRA_SIZES the user
+dnl supplies. If a match is found, it will #define SIZEOF_`TYPE' to
+dnl that value. Otherwise it will emit a configure time error
+dnl indicating the size of the type could not be determined.
dnl
-dnl takes the usual config.h generated header file; looks for each of
-dnl the generated "#define SOMEDEF" lines, and prefixes the defined name
-dnl (ie. makes it "#define PREFIX_SOMEDEF". The result is written to
-dnl the output config.header file. The PREFIX is converted to uppercase
-dnl for the conversions.
+dnl The trick is that C will not allow duplicate case labels. While
+dnl this is valid C code:
dnl
-dnl Defaults:
+dnl switch (0) case 0: case 1:;
dnl
-dnl OUTPUT-HEADER = $PACKAGE-config.h
-dnl PREFIX = $PACKAGE
-dnl ORIG-HEADER, from AM_CONFIG_HEADER(config.h)
+dnl The following is not:
dnl
-dnl Your configure.ac script should contain both macros in this order,
-dnl and unlike the earlier variations of this prefix-macro it is okay to
-dnl place the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invokation.
+dnl switch (0) case 0: case 0:;
dnl
-dnl Example:
+dnl Thus, the AC_TRY_COMPILE will fail if the currently tried size
+dnl does not match.
dnl
-dnl AC_INIT(config.h.in) # config.h.in as created by "autoheader"
-dnl AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE
-dnl AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in
-dnl AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it..
-dnl AC_MEMORY_H # makes "#undef NEED_MEMORY_H"
-dnl AC_C_CONST_H # makes "#undef const"
-dnl AC_OUTPUT(Makefile) # creates the "config.h" now
-dnl # and also mylib/_config.h
+dnl Here is an example skeleton configure.in script, demonstrating the
+dnl macro's usage:
dnl
-dnl if the argument to AX_PREFIX_CONFIG_H would have been omitted then the
-dnl default outputfile would have been called simply "testpkg-config.h", but
-dnl even under the name "mylib/_config.h" it contains prefix-defines like
+dnl AC_PROG_CC
+dnl AC_CHECK_HEADERS(stddef.h unistd.h)
+dnl AC_TYPE_SIZE_T
+dnl AC_CHECK_TYPE(ssize_t, int)
dnl
-dnl #ifndef TESTPKG_VERSION
-dnl #define TESTPKG_VERSION "0.1.1"
-dnl #endif
-dnl #ifndef TESTPKG_NEED_MEMORY_H
-dnl #define TESTPKG_NEED_MEMORY_H 1
-dnl #endif
-dnl #ifndef _testpkg_const
-dnl #define _testpkg_const _const
-dnl #endif
+dnl headers='#ifdef HAVE_STDDEF_H
+dnl #include <stddef.h>
+dnl #endif
+dnl #ifdef HAVE_UNISTD_H
+dnl #include <unistd.h>
+dnl #endif
+dnl '
dnl
-dnl and this "mylib/_config.h" can be installed along with other
-dnl header-files, which is most convenient when creating a shared
-dnl library (that has some headers) where some functionality is
-dnl dependent on the OS-features detected at compile-time. No
-dnl need to invent some "mylib-confdefs.h.in" manually. :-)
+dnl AC_COMPILE_CHECK_SIZEOF(char)
+dnl AC_COMPILE_CHECK_SIZEOF(short)
+dnl AC_COMPILE_CHECK_SIZEOF(int)
+dnl AC_COMPILE_CHECK_SIZEOF(long)
+dnl AC_COMPILE_CHECK_SIZEOF(unsigned char *)
+dnl AC_COMPILE_CHECK_SIZEOF(void *)
+dnl AC_COMPILE_CHECK_SIZEOF(size_t, $headers)
+dnl AC_COMPILE_CHECK_SIZEOF(ssize_t, $headers)
+dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
+dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers)
dnl
-dnl Note that some AC_DEFINEs that end up in the config.h file are
-dnl actually self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the
-dnl AC_TYPE_OFF_T say that they "will define inline|const|off_t if the
-dnl system does not do it by itself". You might want to clean up about
-dnl these - consider an extra mylib/conf.h that reads something like:
+dnl @author Kaveh Ghazi <ghazi@caip.rutgers.edu>
+dnl @version %Id: ac_compile_check_sizeof.m4,v 1.1.1.1 2001/07/26 00:46:24 guidod Exp %
dnl
-dnl #include <mylib/_config.h>
-dnl #ifndef _testpkg_const
-dnl #define _testpkg_const const
-dnl #endif
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $1)
+AC_CACHE_VAL(AC_CV_NAME,
+[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
+ AC_TRY_COMPILE([#include "confdefs.h"
+#include <sys/types.h>
+$2
+], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
+ if test x$AC_CV_NAME != x ; then break; fi
+done
+])
+if test x$AC_CV_NAME = x ; then
+ AC_MSG_ERROR([cannot determine a size for $1])
+fi
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/patch_libtool_to_add_host_cc.m4 ______
+dnl @* PATCH_LIBTOOL_TO_ADD_HOST_CC
dnl
-dnl and then start using _testpkg_const in the header files. That is
-dnl also a good thing to differentiate whether some library-user has
-dnl starting to take up with a different compiler, so perhaps it could
-dnl read something like this:
+dnl The libtool 1.4.x processing (and patched 1.3.5) uses a little
+dnl "impgen" tool to turn a "*.dll" into an import "*.lib" as it is
+dnl needed for win32 targets. However, this little tool is not shipped
+dnl by binutils, it is not even a command option of dlltool or dllwrap.
+dnl It happens to be a C source snippet implanted into the libtool
+dnl sources - it gets written to ".libs", compiled into a binary
+dnl on-the-fly, and executed right away on the "dll" file to create
+dnl the import-lib (dll.a files in gcc-speak).
dnl
-dnl #ifdef _MSC_VER
-dnl #include <mylib/_msvc.h>
-dnl #else
-dnl #include <mylib/_config.h>
-dnl #endif
-dnl #ifndef _testpkg_const
-dnl #define _testpkg_const const
-dnl #endif
+dnl This mode works fine for a native build within mingw or cygwin,
+dnl but it does not work in cross-compile mode since CC is a
+dnl crosscompiler - it will create an .exe file on a non-win32
+dnl system, and as a result an impgen.exe is created on-the-fly
+dnl that can not be executed on-the-fly. Luckily, the actual
+dnl libtool snippet uses HOST_CC to compile the sources which
+dnl has a fallback to CC when the HOST_CC variable was not set.
dnl
-dnl @version %Id: ax_prefix_config_h.m4,v 1.5 2003/07/02 23:29:23 guidod Exp %
-dnl @author Guiodo Draheim <guidod@gmx.de>
+dnl this ac-macro is trying to detect a valid HOST_CC which is not
+dnl a cross-compiler. This is done by looking into the $PATH for
+dnl a "cc" and the result is patched into libtool a HOST_CC, iow
+dnl it adds another configured variable at the top of the libtool
+dnl script.
dnl
-AC_DEFUN([AX_PREFIX_CONFIG_H],[AC_REQUIRE([AC_CONFIG_HEADER])
-AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
-AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
-AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
-AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
-AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
-AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
-AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
-m4_pushdef([_script],[conftest.prefix])dnl
-m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
-_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
-_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
-_PKG=`echo ifelse($2, , $PACKAGE, $2)`
-_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
-_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
-_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'`
-if test ".$_INP" = "."; then
- for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
- case "$ac_file" in
- *.h) _INP=$ac_file ;;
- *)
- esac
- test ".$_INP" != "." && break
- done
-fi
-if test ".$_INP" = "."; then
- case "$_OUT" in
- */*) _INP=`basename "$_OUT"`
- ;;
- *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
- ;;
- *) _INP=config.h
- ;;
- esac
-fi
-if test -z "$_PKG" ; then
- AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
-else
- if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
- _INP="$srcdir/$_INP"
- fi fi
- AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
- if test -f $_INP ; then
- echo "s/@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script
- echo "s/@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script
- echo "s/@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script
- echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script
- echo "@%:@endif/" >>_script
- echo "s/@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script
- echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script
- echo "@%:@endif/" >> _script
- # now executing _script on _DEF input to create _OUT output file
- echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
- echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
- echo ' ' >>$tmp/pconfig.h
- echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
+dnl In discussions on the libtool mailinglist it occurred that
+dnl later gcc/binutils generations are able to link with dlls
+dnl directly, i.e. there is no import-lib needed anymore. The
+dnl import-table is created within the linker itself (in-memory)
+dnl and bound to the .exe/.dll currently in the making. The
+dnl whole stuff of impgen exe and compiling it on-the-fly, well,
+dnl it is superflouos then.
+dnl
+dnl Since mingw crosscompilers tend to be quite a fresh development
+dnl it was agreed to remove the impgen stuff completly from
+dnl libtool sources. Still however, this macro does not hurt
+dnl since it does not patch impgen cmds but it just adds HOST_CC
+dnl which might be useful in other cross-compiling cases as well.
+dnl Therefore, you can leave it in for maximum compatibility and
+dnl portability.
+dnl
+dnl @= guidod@gmx.de
+dnl @%Id: patch_libtool_to_add_host_cc.m4,v 1.3 2003/03/23 13:20:27 guidod Exp %
- sed -f _script $_INP >>$tmp/pconfig.h
- echo ' ' >>$tmp/pconfig.h
- echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
- echo "@%:@endif" >>$tmp/pconfig.h
- if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
- AC_MSG_NOTICE([$_OUT is unchanged])
- else
- ac_dir=`AS_DIRNAME(["$_OUT"])`
- AS_MKDIR_P(["$ac_dir"])
- rm -f "$_OUT"
- mv $tmp/pconfig.h "$_OUT"
+AC_DEFUN([PATCH_LIBTOOL_TO_ADD_HOST_CC],
+[# patch libtool to add HOST_CC sometimes needed in crosscompiling a win32 dll
+if grep "HOST_CC" libtool >/dev/null; then
+ if test "$build" != "$host" ; then
+ if test "_$HOST_CC" = "_" ; then
+ HOST_CC="false"
+ for i in `echo $PATH | sed 's,:, ,g'` ; do
+ test -x $i/cc && HOST_CC=$i/cc
+ done
fi
- cp _script _configs.sed
- else
- AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
+AC_MSG_RESULT(patching libtool to add HOST_CC=$HOST_CC)
+ test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool)
+ sed -e "/BEGIN.*LIBTOOL.*CONFIG/a\\
+HOST_CC=$HOST_CC" libtool >libtool.new
+ (test -s libtool.new || rm libtool.new) 2>/dev/null
+ test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !!
+ test -f libtool || mv libtool.old libtool
fi
- rm -f conftest.*
fi
-m4_popdef([_symbol])dnl
-m4_popdef([_script])dnl
-AS_VAR_POPDEF([_INP])dnl
-AS_VAR_POPDEF([_UPP])dnl
-AS_VAR_POPDEF([_LOW])dnl
-AS_VAR_POPDEF([_PKG])dnl
-AS_VAR_POPDEF([_DEF])dnl
-AS_VAR_POPDEF([_OUT])dnl
-],[PACKAGE="$PACKAGE"])])
-
-dnl ______ /usr/share/aclocal/guidod/ax_cflags_no_writable_strings.m4 ______
-dnl @synopsis AX_CFLAGS_NO_WRITABLE_STRINGS [(shellvar [,default, [A/NA]])]
+])
+dnl ______ /usr/share/aclocal/guidod/patch_libtool_on_darwin_zsh_overquoting.m4 ______
+dnl @* PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING
dnl
-dnl Try to find a compiler option that makes all stringliteral readonly.
+dnl libtool 1.4.x has a bug on darwin where the "zsh" is installed
+dnl as the bourne shell replacement. Of course, the zsh is called in
+dnl a compatibility mode but there is a common problem with it,
+dnl probably a bug of zsh. Newer darwin systems have a "bash"
+dnl installed now, but the configure-default will be "zsh" in most
+dnl systems still.
dnl
-dnl The sanity check is done by looking at string.h which has a set
-dnl of strcpy definitions that should be defined with const-modifiers
-dnl to not emit a warning in all so many places.
+dnl The bug revelas itself as an overquoted statement in the
+dnl libtool cmds-spec for sharedlib creation on testing for
+dnl "module" builds. Later libtool has gone rid of it by simply
+dnl removing the quotes at that point . Here we maintain the
+dnl original style and simply remove the extra escape character,
+dnl i.e. we look for "archive_cmds" and replace a sequence of
+dnl triple-backslash-and-doublequote with single-backslash-and-doublequote.
+dnl
+dnl @= guidod@gmx.de
+dnl %Id: patch_libtool_on_darwin_zsh_overquoting.m4,v 1.4 2003/03/24 16:58:21 guidod Exp %
+
+AC_DEFUN([PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING],
+[# libtool-1.4 specific, on zsh target the final requoting does one too much
+case "$host_os" in
+ darwin*)
+ if grep "1.92" libtool >/dev/null ; then
+AC_MSG_RESULT(patching libtool on .so-sharedlib creation (zsh overquoting))
+ test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool)
+ sed -e '/archive_cmds=/s:[[\\]][[\\]][[\\]]*":\\":g' libtool >libtool.new
+ (test -s libtool.new || rm libtool.new) 2>/dev/null
+ test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !!
+ test -f libtool || mv libtool.old libtool
+ fi
+ ;;
+esac
+])
+dnl ______ /usr/share/aclocal/guidod/ac_sys_largefile_sensitive.m4 ______
+dnl @synopsis AC_SYS_LARGEFILE_SENSITIVE
dnl
-dnl For the GNU CC compiler it will be -fno-writable-strings -Wwrite-strings
-dnl The result is added to the shellvar being CFLAGS by default.
+dnl checker whether the current system is sensitive to -Ddefines
+dnl making off_t having different types/sizes. Automatically define
+dnl a config.h symbol LARGEFILE_SENSITIVE if that is the case,
+dnl otherwise leave everything as is.
dnl
-dnl DEFAULTS:
+dnl This macro builds on top of AC_SYS_LARGEFILE to detect whether
+dnl special options are neede to make the code use 64bit off_t - in
+dnl many setups this will also make the code use 64bit off_t immediatly.
dnl
-dnl - $1 shell-variable-to-add-to : CFLAGS
-dnl - $2 add-value-if-not-found : nothing
-dnl - $3 action-if-found : add value to shellvariable
-dnl - $4 action-if-not-found : nothing
+dnl The common use of a LARGEFILE_SENSITIVE config.h-define is to rename
+dnl exported functions, usually adding a 64 to the original function name.
+dnl Such renamings are only needed on systems being both (a) 32bit off_t
+dnl by default and (b) implementing large.file extensions (as for unix98).
dnl
-dnl @version %Id: ax_cflags_no_writable_strings.m4,v 1.6 2003/06/05 00:52:15 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
+dnl a renaming section could look like this:
+dnl #if defined LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 == 64
+dnl #define zzip_open zzip_open64
+dnl #define zzip_seek zzip_seek64
+dnl #endif
dnl
-AC_DEFUN([AX_CFLAGS_NO_WRITABLE_STRINGS],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_no_writable_strings])dnl
-AC_CACHE_CHECK([m4_ifval([$1],[$1],FLAGS) making strings readonly],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-# IRIX C compiler:
-# -use_readonly_const is the default for IRIX C,
-# puts them into .rodata, but they are copied later.
-# need to be "-G0 -rdatashared" for strictmode but
-# I am not sure what effect that has really. - guidod
-for ac_arg dnl
-in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC
- "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment
- "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment
- "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment
- "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
-case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check - testing strcpy() from string.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <string.h>],[
- char test[16];
- if (strcpy (test, "test")) return 1;],
- dnl the original did use test -n `$CC testprogram.c`
- [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
- then VAR="no, suppressed, string.h," ; fi],
- [VAR="no, suppressed, string.h"])
- rm config.tmp
- ;;
-esac
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
-
-dnl the only difference - the LANG selection... and the default FLAGS
+dnl for libraries, it is best to take advantage of the prefix-config.h
+dnl macro, otherwise you want to export a renamed LARGEFILE_SENSITIVE
+dnl in an installed header file. -> see AX_PREFIX_CONFIG_H
+dnl
+dnl @, System Headers
+dnl @Author Guido Draheim <guidod@gmx.de>
+dnl @Version %Id: ac_sys_largefile_sensitive.m4,v 1.2 2003/05/13 18:46:22 guidod Exp %
-AC_DEFUN([AX_CXXFLAGS_NO_WRITABLE_STRINGS],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_no_writable_strings])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) making strings readonly],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_CXX
- ac_save_[]FLAGS="$[]FLAGS"
-# IRIX C compiler:
-# -use_readonly_const is the default for IRIX C,
-# puts them into .rodata, but they are copied later.
-# need to be "-G0 -rdatashared" for strictmode but
-# I am not sure what effect that has really. - guidod
-for ac_arg dnl
-in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC
- "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment
- "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment
- "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment
- "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
-case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check - testing strcpy() from string.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <string.h>],[[
- char test[16];
- if (strcpy (test, "test")) return 1;]],
- dnl the original did use test -n `$CC testprogram.c`
- [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
- then VAR="no, suppressed, string.h," ; fi],
- [VAR="no, suppressed, string.h"])
- rm config.tmp
- ;;
-esac
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
+AC_DEFUN([AC_SYS_LARGEFILE_SENSITIVE],[dnl
+AC_REQUIRE([AC_SYS_LARGEFILE])dnl
+# we know about some internals of ac_sys_largefile here...
+AC_MSG_CHECKING(whether system differentiates 64bit off_t by defines)
+ac_cv_sys_largefile_sensitive="no"
+if test ".$ac_cv_sys_file_offset_bits$ac_cv_sys_large_files" != ".nono"
+then ac_cv_sys_largefile_sensitive="yes"
+ AC_DEFINE(LARGEFILE_SENSITIVE, 1,
+ [whether the system defaults to 32bit off_t but can do 64bit when requested])
+fi
+AC_MSG_RESULT([$ac_cv_sys_largefile_sensitive])
])
-dnl ______ /usr/share/aclocal/guidod/patch_libtool_on_darwin_zsh_overquoting.m4 ______
-dnl @* PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING
+dnl ______ /usr/share/aclocal/guidod/ax_maintainer_mode_auto_silent.m4 ______
+dnl @* AX_MAINTAINER_MODE_AUTO_SILENT
dnl
-dnl libtool 1.4.x has a bug on darwin where the "zsh" is installed
-dnl as the bourne shell replacement. Of course, the zsh is called in
-dnl a compatibility mode but there is a common problem with it,
-dnl probably a bug of zsh. Newer darwin systems have a "bash"
-dnl installed now, but the configure-default will be "zsh" in most
-dnl systems still.
+dnl Set autotools to error/sleep settings so that they are not run when
+dnl being errornously triggered. Likewise make libtool-silent when
+dnl libtool has been used.
dnl
-dnl The bug revelas itself as an overquoted statement in the
-dnl libtool cmds-spec for sharedlib creation on testing for
-dnl "module" builds. Later libtool has gone rid of it by simply
-dnl removing the quotes at that point . Here we maintain the
-dnl original style and simply remove the extra escape character,
-dnl i.e. we look for "archive_cmds" and replace a sequence of
-dnl triple-backslash-and-doublequote with single-backslash-and-doublequote.
-dnl
-dnl @= guidod@gmx.de
-dnl %Id: patch_libtool_on_darwin_zsh_overquoting.m4,v 1.4 2003/03/24 16:58:21 guidod Exp %
+dnl I am using the macro quite a lot since some automake versions had the
+dnl tendency to try to rerun some autotools on a mere make even when not
+dnl quite in --maintainer-mode. That is very annoying. Likewise, a user
+dnl who installs from source does not want to see doubled compiler messages.
+dnl
+dnl I did not put an AC-REQUIRE(MAINTAINER_MODE) in here - should I?
+dnl
+dnl @: guidod@gmx.de
+dnl @%Id: ax_maintainer_mode_auto_silent.m4,v 1.1 2003/10/19 00:12:45 guidod Exp %
-AC_DEFUN([PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING],
-[# libtool-1.4 specific, on zsh target the final requoting does one too much
-case "$host_os" in
- darwin*)
- if grep "1.92" libtool >/dev/null ; then
-AC_MSG_RESULT(patching libtool on .so-sharedlib creation (zsh overquoting))
- test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool)
- sed -e '/archive_cmds=/s:[[\\]][[\\]][[\\]]*":\\":g' libtool >libtool.new
- (test -s libtool.new || rm libtool.new) 2>/dev/null
- test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !!
- test -f libtool || mv libtool.old libtool
- fi
- ;;
-esac
+AC_DEFUN([AX_MAINTAINER_MODE_AUTO_SILENT],[dnl
+dnl ac_REQUIRE([am_MAINTAINER_MODE])dn
+AC_MSG_CHECKING(auto silent in maintainer mode)
+if test "$USE_MAINTAINER_MODE" = "no" ; then
+ test ".$TIMEOUT" = "." && TIMEOUT="9"
+ AUTOHEADER="sleep $TIMEOUT ; true || autoheader || skipped"
+ AUTOMAKE="sleep $TIMEOUT ; true || automake || skipped"
+ AUTOCONF="sleep $TIMEOUT ; true || autoconf || skipped"
+ if test ".$LIBTOOL" != "." ; then
+ LIBTOOL="$LIBTOOL --silent"
+ AC_MSG_RESULT([libtool-silent, auto-sleep-9])
+ else
+ AC_MSG_RESULT([auto-sleep-9])
+ fi
+else
+ AC_MSG_RESULT([no])
+fi
])
-dnl ______ ______
-dnl ______ /usr/share/aclocal/guidod/ax_set_version_info.m4 ______
-dnl AX_SET_VERSION_INFO [(VERSION [,PREFIX])] -*- m4 -*-
-dnl default $1 = $PACKAGE_VERSION
-dnl default $2 = <none>
-dnl
-dnl This macro is the successor of AC_SET_RELEASEINFO_VERSIONINFO but
-dnl it can be used in parallel because it uses all different variables.
+dnl ______ /usr/share/aclocal/guidod/ax_expand_prefix.m4 ______
+dnl @* AX_EXPAND_PREFIX
dnl
-dnl check the $VERSION number and cut the two last digit-sequences off
-dnl which will form a -version-info in a @VERSION_INFO@ ac_subst while
-dnl the rest is going to the -release name in a @RELEASE_INFO@ ac_subst.
+dnl when $prefix and $exec_prefix are still set to NONE then set them
+dnl to the usual default values - being based on $ac_default_prefix.
+dnl - this macro can be AC_REQUIREd by other macros that need to
+dnl compute values for installation directories. It has been observed
+dnl that it was done wrong over and over again, so this is a bit
+dnl more safe to do.
dnl
-dnl you should keep these two seperate - the release-name may contain
-dnl alpha-characters and can be modified later with extra release-hints
-dnl e.g. RELEASE_INFO="$RELEASE_INFO-debug" for a debug version
-dnl of your lib. The $VERSION_INFO however should not be touched.
+dnl remember - setting exec_prefix='${prefix}' needs you interpolate
+dnl directories multiple times, it is not sufficient to just say
+dnl MYVAR="${datadir}/putter" but you do have to run `eval` a few
+dnl times, sth. like MYVAR=`eval "echo \"$MYVAR\""` done atleast
+dnl two times.
+dnl
+dnl The implementation of this macro simply picks up the lines that
+dnl would be run at the start of AC_OUTPUT anyway to set the
+dnl prefix/exec_prefix defaults. Between AC_INIT and the first
+dnl command to AC_REQUIRE this macro you can set the two variables
+dnl to something explicit instead. Probably, any command to compute
+dnl installation directories should be run _after_ AM_INIT_AUTOMAKE
dnl
-dnl example: a VERSION="2.4.18" will be transformed into
-dnl RELEASE_INFO = -release 2
-dnl VERSION_INFO = -versioninfo 4:18
-dnl then use these two variables and push them to your libtool linker
-dnl libtest_la_LIBADD = @RELEASE_INFO@ @VERSION_INFO@
-dnl and for a linux-target this will tell libtool to install the lib as
-dnl libmy.so libmy.la libmy.a libmy-2.so.4 libmy-2.so.4.0.18
-dnl and executables will get link-resolve-infos for libmy-2.so.4 - therefore
-dnl the patch-level is ignored during ldso linking, and ldso will use the
-dnl one with the highest patchlevel. Using just "-release $(VERSION)"
-dnl during libtool-linking would not do that - omitting the -version-info
-dnl will libtool install libmy.so libmy.la libmy.a libmy-2.4.18.so and
-dnl executables would get hardlinked with the 2.4.18 version of your lib.
+dnl @: guidod@gmx.de
+dnl @%Id: ax_expand_prefix.m4,v 1.1 2003/10/19 00:05:18 guidod Exp %
+
+AC_DEFUN([AX_EXPAND_PREFIX],[dnl
+ # The prefix default can be set in configure.ac (otherwise it is /usr/local)
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ # Let make expand exec_prefix. Allows to override the makevar 'prefix' later
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_create_pkgconfig_info.m4 ______
+dnl @* AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary]]])]
+dnl defaults:
+dnl $1 = $PACKAGE_NAME.pc
+dnl $2 = (empty)
+dnl $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac)
+dnl $4 = $PACKAGE_SUMMARY (or $1 Library)
+dnl $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac)
dnl
-dnl This background does also explain the default dll name for a win32
-dnl target : libtool will choose to make up libmy-2-4.dll for this
-dnl version spec.
+dnl PACKAGE_NAME defaults to $PACKAGE if not set.
+dnl PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set.
dnl
-dnl this macro does also set the usual three parts of a version spec
-dnl $MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION but does not ac_subst
-dnl for the plain AX_SET_VERSION_INFO macro. Use instead one of the numbered
-dnl macros AX_SET_VERSION_INFO1 (use first number for release part) or
-dnl that AX_SET_VERSION_INFO2 (use the first two numbers for release part).
-dnl
-dnl You may add sublevel parts like "1.4.2-ac5" where the sublevel is
-dnl just killed from these version/release substvars. That allows to grab
-dnl the version off a .spec file like with AX_SPEC_PACKAGE_VERSION where
-dnl the $VERSION is used to name a tarball or distpack like mylib-2.2.9pre4
+dnl the resulting file is called $PACKAGE.pc.in / $PACKAGE.pc
dnl
-dnl Unlike earlier macros, you can use this one to break up different
-dnl VERSIONs and put them into different variables, just hint with
-dnl PREFIX-setting - i.e. _VERSION(2.4.5,TEST) will set variables named
-dnl TEST_MAJOR_VERSION=2... and of course $TEST_RELEASE_INFO etc.
-dnl (for the moment, it needs to be a literal prefix *sigh*)
+dnl You will find this macro most useful in conjunction with ax_spec_defaults
+dnl that can read good initializers from the .spec file. In consequencd, most
+dnl of the generatable installable stuff can be made from information being
+dnl updated in a single place for the whole project.
dnl
-dnl @version %Id: ax_set_version_info.m4,v 1.1 2003/07/02 23:41:42 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
+dnl @%Id: ax_create_pkgconfig_info.m4,v 1.1 2003/10/19 00:08:51 guidod Exp %
-AC_DEFUN([AX_SET_VERSION_INFO1],[dnl
-AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
-AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
-AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
-AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
-test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
-AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
-ifelse($1,,$PACKAGE_VERSION,$1) )
- MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
- MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
- MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
- MICRO="$MINOR"
- MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
- MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
- PATCH="$MICRO"
- MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
- PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
- if test "_$MICRO" = "_" ; then MICRO="0" ; fi
- if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
- MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
- LTREL="-release $MAJOR"
- LTVER="-version-info $MINOR:$MICRO"
-AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
-AC_SUBST(MAJOR)
-AC_SUBST(MINOR)
-AC_SUBST(MICRO)
-AC_SUBST(PATCH)
-AC_SUBST(LTREL)
-AC_SUBST(LTVER)
-AS_VAR_POPDEF([LTVER])dnl
-AS_VAR_POPDEF([LTREL])dnl
-AS_VAR_POPDEF([PATCH])dnl
-AS_VAR_POPDEF([MICRO])dnl
-AS_VAR_POPDEF([MINOR])dnl
-AS_VAR_POPDEF([MAJOR])dnl
-])
+AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl
+AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl
-AC_DEFUN([AX_SET_VERSION_INFO2],[dnl
-AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
-AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
-AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
-AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
-test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
-AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
-ifelse($1,,$PACKAGE_VERSION,$1) )
- MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
- MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
- MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
- MICRO="$MINOR"
- MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
- MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
- PATCH="$MICRO"
- MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
- PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
- test "_$MICRO" != "_" || MICRO="0"
- if test "_$MINOR" != "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
- MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
- LTREL="-release $MAJOR.$MINOR"
- LTVER="-version-info 0:$MICRO"
-AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
-AC_SUBST(MAJOR)
-AC_SUBST(MINOR)
-AC_SUBST(MICRO)
-AC_SUBST(PATCH)
-AC_SUBST(LTREL)
-AC_SUBST(LTVER)
-AS_VAR_POPDEF([LTVER])dnl
-AS_VAR_POPDEF([LTREL])dnl
-AS_VAR_POPDEF([PATCH])dnl
-AS_VAR_POPDEF([MICRO])dnl
-AS_VAR_POPDEF([MINOR])dnl
-AS_VAR_POPDEF([MAJOR])dnl
-])
+# we need the expanded forms...
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-AC_DEFUN([AX_SET_VERSION_INFO],[dnl
-AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
-AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
-AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
-AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
-test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
-AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
-ifelse($1,,$PACKAGE_VERSION,$1) )
- MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
- MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
- MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
- MICRO="$MINOR"
- MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
- MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
- PATCH="$MICRO"
- MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
- PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'`
- if test "_$MICRO" = "_" ; then MICRO="0" ; fi
- if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
- MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
- LTREL="-release $MAJOR"
- LTVER="-version-info $MINOR:$MICRO"
-AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
-AC_SUBST(LTREL)
-AC_SUBST(LTVER)
-AS_VAR_POPDEF([LTVER])dnl
-AS_VAR_POPDEF([LTREL])dnl
-AS_VAR_POPDEF([PATCH])dnl
-AS_VAR_POPDEF([MICRO])dnl
-AS_VAR_POPDEF([MINOR])dnl
-AS_VAR_POPDEF([MAJOR])dnl
-])
+AC_MSG_CHECKING(our pkgconfig libname)
+test ".$PKGCONFIG_libname" != "." || \
+PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)"
+test ".$PKGCONFIG_libname" != "." || \
+PKGCONFIG_libname="$PACKAGE"
+PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
+PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
+AC_MSG_RESULT($PKGCONFIG_libname)
-dnl ______ /usr/share/aclocal/guidod/ax_cflags_warn_all.m4 ______
-dnl @synopsis AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
-dnl
-dnl Try to find a compiler option that enables most reasonable warnings.
-dnl This macro is directly derived from VL_PROG_CC_WARNINGS which is
-dnl split up into two AX_CFLAGS_WARN_ALL and AX_CFLAGS_WARN_ALL_ANSI
-dnl
-dnl For the GNU CC compiler it will be -Wall (and -ansi -pedantic)
-dnl The result is added to the shellvar being CFLAGS by default.
-dnl
-dnl Currently this macro knows about GCC, Solaris C compiler,
-dnl Digital Unix C compiler, C for AIX Compiler, HP-UX C compiler,
-dnl IRIX C compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90
-dnl (Unicos 10.0.0.8) C compiler.
-dnl
-dnl - $1 shell-variable-to-add-to : CFLAGS
-dnl - $2 add-value-if-not-found : nothing
-dnl - $3 action-if-found : add value to shellvariable
-dnl - $4 action-if-not-found : nothing
-dnl
-dnl @version %Id: ax_cflags_warn_all.m4,v 1.2 2003/10/12 14:56:07 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
-dnl
-AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic % -Wall" dnl GCC
- "-xstrconst % -v" dnl Solaris C
- "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
- "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
- "-ansi -ansiE % -fullwarn" dnl IRIX
- "+ESlit % +w1" dnl HP-UX C
- "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
- "-h conform % -h msglevel 2" dnl Cray C (Unicos)
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
+AC_MSG_CHECKING(our pkgconfig version)
+test ".$PKGCONFIG_version" != "." || \
+PKGCONFIG_version="${PACKAGE_VERSION}"
+test ".$PKGCONFIG_version" != "." || \
+PKGCONFIG_version="$VERSION"
+PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
+PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
+AC_MSG_RESULT($PKGCONFIG_version)
-dnl the only difference - the LANG selection... and the default FLAGS
+AC_MSG_CHECKING(our pkgconfig_libdir)
+test ".$pkgconfig_libdir" = "." && \
+pkgconfig_libdir='${libdir}/pkgconfig'
+PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"`
+PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
+PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
+AC_MSG_RESULT($pkgconfig_libdir)
+test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && (
+AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir))
+AC_SUBST([pkgconfig_libdir])
-AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_CXX
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic % -Wall" dnl GCC
- "-xstrconst % -v" dnl Solaris C
- "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
- "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
- "-ansi -ansiE % -fullwarn" dnl IRIX
- "+ESlit % +w1" dnl HP-UX C
- "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
- "-h conform % -h msglevel 2" dnl Cray C (Unicos)
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
+AC_MSG_CHECKING(our pkgconfig_libfile)
+test ".$pkgconfig_libfile" != "." || \
+pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)"
+PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"`
+PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"`
+AC_MSG_RESULT($pkgconfig_libfile)
+test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && (
+AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile))
+AC_SUBST([pkgconfig_libfile])
-dnl implementation tactics:
-dnl the for-argument contains a list of options. The first part of
-dnl these does only exist to detect the compiler - usually it is
-dnl a global option to enable -ansi or -extrawarnings. All other
-dnl compilers will fail about it. That was needed since a lot of
-dnl compilers will give false positives for some option-syntax
-dnl like -Woption or -Xoption as they think of it is a pass-through
-dnl to later compile stages or something. The "%" is used as a
-dnl delimimiter. A non-option comment can be given after "%%" marks.
+AC_MSG_CHECKING(our pkgconfig description)
+PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)"
+test ".$PKGCONFIG_description" != "." || \
+PKGCONFIG_description="$PKGCONFIG_libname Library"
+PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
+PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
+AC_MSG_RESULT($PKGCONFIG_description)
-
-dnl ______ /usr/share/aclocal/guidod/ax_expand_prefix.m4 ______
-dnl @* AX_EXPAND_PREFIX
-dnl
-dnl when $prefix and $exec_prefix are still set to NONE then set them
-dnl to the usual default values - being based on $ac_default_prefix.
-dnl - this macro can be AC_REQUIREd by other macros that need to
-dnl compute values for installation directories. It has been observed
-dnl that it was done wrong over and over again, so this is a bit
-dnl more safe to do.
-dnl
-dnl remember - setting exec_prefix='${prefix}' needs you interpolate
-dnl directories multiple times, it is not sufficient to just say
-dnl MYVAR="${datadir}/putter" but you do have to run `eval` a few
-dnl times, sth. like MYVAR=`eval "echo \"$MYVAR\""` done atleast
-dnl two times.
-dnl
-dnl The implementation of this macro simply picks up the lines that
-dnl would be run at the start of AC_OUTPUT anyway to set the
-dnl prefix/exec_prefix defaults. Between AC_INIT and the first
-dnl command to AC_REQUIRE this macro you can set the two variables
-dnl to something explicit instead. Probably, any command to compute
-dnl installation directories should be run _after_ AM_INIT_AUTOMAKE
-dnl
-dnl @: guidod@gmx.de
-dnl @%Id: ax_expand_prefix.m4,v 1.1 2003/10/19 00:05:18 guidod Exp %
-
-AC_DEFUN([AX_EXPAND_PREFIX],[dnl
- # The prefix default can be set in configure.ac (otherwise it is /usr/local)
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- # Let make expand exec_prefix. Allows to override the makevar 'prefix' later
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-])
-
-dnl ______ /usr/share/aclocal/Miscellaneous/ac_compile_check_sizeof.m4 ______
-dnl @synopsis AC_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]])
-dnl
-dnl This macro checks for the size of TYPE using compile checks, not
-dnl run checks. You can supply extra HEADERS to look into. the check
-dnl will cycle through 1 2 4 8 16 and any EXTRA_SIZES the user
-dnl supplies. If a match is found, it will #define SIZEOF_`TYPE' to
-dnl that value. Otherwise it will emit a configure time error
-dnl indicating the size of the type could not be determined.
-dnl
-dnl The trick is that C will not allow duplicate case labels. While
-dnl this is valid C code:
-dnl
-dnl switch (0) case 0: case 1:;
-dnl
-dnl The following is not:
-dnl
-dnl switch (0) case 0: case 0:;
-dnl
-dnl Thus, the AC_TRY_COMPILE will fail if the currently tried size
-dnl does not match.
-dnl
-dnl Here is an example skeleton configure.in script, demonstrating the
-dnl macro's usage:
-dnl
-dnl AC_PROG_CC
-dnl AC_CHECK_HEADERS(stddef.h unistd.h)
-dnl AC_TYPE_SIZE_T
-dnl AC_CHECK_TYPE(ssize_t, int)
-dnl
-dnl headers='#ifdef HAVE_STDDEF_H
-dnl #include <stddef.h>
-dnl #endif
-dnl #ifdef HAVE_UNISTD_H
-dnl #include <unistd.h>
-dnl #endif
-dnl '
-dnl
-dnl AC_COMPILE_CHECK_SIZEOF(char)
-dnl AC_COMPILE_CHECK_SIZEOF(short)
-dnl AC_COMPILE_CHECK_SIZEOF(int)
-dnl AC_COMPILE_CHECK_SIZEOF(long)
-dnl AC_COMPILE_CHECK_SIZEOF(unsigned char *)
-dnl AC_COMPILE_CHECK_SIZEOF(void *)
-dnl AC_COMPILE_CHECK_SIZEOF(size_t, $headers)
-dnl AC_COMPILE_CHECK_SIZEOF(ssize_t, $headers)
-dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
-dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers)
-dnl
-dnl @author Kaveh Ghazi <ghazi@caip.rutgers.edu>
-dnl @version %Id: ac_compile_check_sizeof.m4,v 1.1.1.1 2001/07/26 00:46:24 guidod Exp %
-dnl
-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(size of $1)
-AC_CACHE_VAL(AC_CV_NAME,
-[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
- AC_TRY_COMPILE([#include "confdefs.h"
-#include <sys/types.h>
-$2
-], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
- if test x$AC_CV_NAME != x ; then break; fi
-done
-])
-if test x$AC_CV_NAME = x ; then
- AC_MSG_ERROR([cannot determine a size for $1])
-fi
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
-])
-
-dnl ______ /usr/share/aclocal/guidod/ax_dirname.m4 ______
-dnl @* AX_DIRNAME(PATHNAME)
-dnl
-dnl Parts of the implementation have been taken from AS_DIRNAME from the
-dnl main autoconf package in generation 2.5x. However, we do only use
-dnl "sed" to cut out the dirname, and we do additionally clean up some
-dnl dir/.. parts in the resulting pattern.
-dnl
-dnl this macro may be used in autoconf 2.13 scripts as well.
-dnl
-dnl @%Id: ax_dirname.m4,v 1.1 2003/07/02 23:42:59 guidod Exp %
-
-AC_DEFUN([AX_DIRNAME],
-[echo X[]$1 |
- sed ['s/\/[^\/:][^\/:]*\/..\//\//g
- s/\/[^\/:][^\/:]*\/..\//\//g
- s/\/[^\/:][^\/:]*\/..\//\//g
- s/\/[^\/:][^\/:]*\/..\//\//g
- /^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q']])
-
-dnl ______ /usr/share/aclocal/guidod/ax_create_pkgconfig_info.m4 ______
-dnl @* AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary]]])]
-dnl defaults:
-dnl $1 = $PACKAGE_NAME.pc
-dnl $2 = (empty)
-dnl $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac)
-dnl $4 = $PACKAGE_SUMMARY (or $1 Library)
-dnl $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac)
-dnl
-dnl PACKAGE_NAME defaults to $PACKAGE if not set.
-dnl PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set.
-dnl
-dnl the resulting file is called $PACKAGE.pc.in / $PACKAGE.pc
-dnl
-dnl You will find this macro most useful in conjunction with ax_spec_defaults
-dnl that can read good initializers from the .spec file. In consequencd, most
-dnl of the generatable installable stuff can be made from information being
-dnl updated in a single place for the whole project.
-dnl
-dnl @%Id: ax_create_pkgconfig_info.m4,v 1.1 2003/10/19 00:08:51 guidod Exp %
-
-AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl
-AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl
-
-# we need the expanded forms...
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-AC_MSG_CHECKING(our pkgconfig libname)
-test ".$PKGCONFIG_libname" != "." || \
-PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)"
-test ".$PKGCONFIG_libname" != "." || \
-PKGCONFIG_libname="$PACKAGE"
-PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
-PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
-AC_MSG_RESULT($PKGCONFIG_libname)
-
-AC_MSG_CHECKING(our pkgconfig version)
-test ".$PKGCONFIG_version" != "." || \
-PKGCONFIG_version="${PACKAGE_VERSION}"
-test ".$PKGCONFIG_version" != "." || \
-PKGCONFIG_version="$VERSION"
-PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
-PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
-AC_MSG_RESULT($PKGCONFIG_version)
-
-AC_MSG_CHECKING(our pkgconfig_libdir)
-test ".$pkgconfig_libdir" = "." && \
-pkgconfig_libdir='${libdir}/pkgconfig'
-PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"`
-PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
-PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
-AC_MSG_RESULT($pkgconfig_libdir)
-test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && (
-AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir))
-AC_SUBST([pkgconfig_libdir])
-
-AC_MSG_CHECKING(our pkgconfig_libfile)
-test ".$pkgconfig_libfile" != "." || \
-pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)"
-PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"`
-PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"`
-AC_MSG_RESULT($pkgconfig_libfile)
-test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && (
-AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile))
-AC_SUBST([pkgconfig_libfile])
-
-AC_MSG_CHECKING(our pkgconfig description)
-PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)"
-test ".$PKGCONFIG_description" != "." || \
-PKGCONFIG_description="$PKGCONFIG_libname Library"
-PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
-PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
-AC_MSG_RESULT($PKGCONFIG_description)
-
-AC_MSG_CHECKING(our pkgconfig requires)
-PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)"
-PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
-PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
-AC_MSG_RESULT($PKGCONFIG_requires)
+AC_MSG_CHECKING(our pkgconfig requires)
+PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)"
+PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
+PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
+AC_MSG_RESULT($PKGCONFIG_requires)
AC_MSG_CHECKING(our pkgconfig ext libs)
PKGCONFIG_pkglibs="$PACKAGE_LIBS"
AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl
])
+dnl ______ /usr/share/aclocal/guidod/ax_dirname.m4 ______
+dnl @* AX_DIRNAME(PATHNAME)
+dnl
+dnl Parts of the implementation have been taken from AS_DIRNAME from the
+dnl main autoconf package in generation 2.5x. However, we do only use
+dnl "sed" to cut out the dirname, and we do additionally clean up some
+dnl dir/.. parts in the resulting pattern.
+dnl
+dnl this macro may be used in autoconf 2.13 scripts as well.
+dnl
+dnl @%Id: ax_dirname.m4,v 1.1 2003/07/02 23:42:59 guidod Exp %
+
+AC_DEFUN([AX_DIRNAME],
+[echo X[]$1 |
+ sed ['s/\/[^\/:][^\/:]*\/..\//\//g
+ s/\/[^\/:][^\/:]*\/..\//\//g
+ s/\/[^\/:][^\/:]*\/..\//\//g
+ s/\/[^\/:][^\/:]*\/..\//\//g
+ /^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q']])
+
+dnl ______ /usr/share/aclocal/guidod/ax_prefix_config_h.m4 ______
+dnl @synopsis AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]
+dnl
+dnl This is a new variant from ac_prefix_config_ this one will use a
+dnl lowercase-prefix if the config-define was starting with a
+dnl lowercase-char, e.g. "#define const", "#define restrict", or
+dnl "#define off_t", (and this one can live in another directory, e.g.
+dnl testpkg/config.h therefore I decided to move the output-header to
+dnl be the first arg)
+dnl
+dnl takes the usual config.h generated header file; looks for each of
+dnl the generated "#define SOMEDEF" lines, and prefixes the defined name
+dnl (ie. makes it "#define PREFIX_SOMEDEF". The result is written to
+dnl the output config.header file. The PREFIX is converted to uppercase
+dnl for the conversions.
+dnl
+dnl Defaults:
+dnl
+dnl OUTPUT-HEADER = $PACKAGE-config.h
+dnl PREFIX = $PACKAGE
+dnl ORIG-HEADER, from AM_CONFIG_HEADER(config.h)
+dnl
+dnl Your configure.ac script should contain both macros in this order,
+dnl and unlike the earlier variations of this prefix-macro it is okay to
+dnl place the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invokation.
+dnl
+dnl Example:
+dnl
+dnl AC_INIT(config.h.in) # config.h.in as created by "autoheader"
+dnl AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE
+dnl AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in
+dnl AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it..
+dnl AC_MEMORY_H # makes "#undef NEED_MEMORY_H"
+dnl AC_C_CONST_H # makes "#undef const"
+dnl AC_OUTPUT(Makefile) # creates the "config.h" now
+dnl # and also mylib/_config.h
+dnl
+dnl if the argument to AX_PREFIX_CONFIG_H would have been omitted then the
+dnl default outputfile would have been called simply "testpkg-config.h", but
+dnl even under the name "mylib/_config.h" it contains prefix-defines like
+dnl
+dnl #ifndef TESTPKG_VERSION
+dnl #define TESTPKG_VERSION "0.1.1"
+dnl #endif
+dnl #ifndef TESTPKG_NEED_MEMORY_H
+dnl #define TESTPKG_NEED_MEMORY_H 1
+dnl #endif
+dnl #ifndef _testpkg_const
+dnl #define _testpkg_const _const
+dnl #endif
+dnl
+dnl and this "mylib/_config.h" can be installed along with other
+dnl header-files, which is most convenient when creating a shared
+dnl library (that has some headers) where some functionality is
+dnl dependent on the OS-features detected at compile-time. No
+dnl need to invent some "mylib-confdefs.h.in" manually. :-)
+dnl
+dnl Note that some AC_DEFINEs that end up in the config.h file are
+dnl actually self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the
+dnl AC_TYPE_OFF_T say that they "will define inline|const|off_t if the
+dnl system does not do it by itself". You might want to clean up about
+dnl these - consider an extra mylib/conf.h that reads something like:
+dnl
+dnl #include <mylib/_config.h>
+dnl #ifndef _testpkg_const
+dnl #define _testpkg_const const
+dnl #endif
+dnl
+dnl and then start using _testpkg_const in the header files. That is
+dnl also a good thing to differentiate whether some library-user has
+dnl starting to take up with a different compiler, so perhaps it could
+dnl read something like this:
+dnl
+dnl #ifdef _MSC_VER
+dnl #include <mylib/_msvc.h>
+dnl #else
+dnl #include <mylib/_config.h>
+dnl #endif
+dnl #ifndef _testpkg_const
+dnl #define _testpkg_const const
+dnl #endif
+dnl
+dnl @version %Id: ax_prefix_config_h.m4,v 1.5 2003/07/02 23:29:23 guidod Exp %
+dnl @author Guiodo Draheim <guidod@gmx.de>
+dnl
+AC_DEFUN([AX_PREFIX_CONFIG_H],[AC_REQUIRE([AC_CONFIG_HEADER])
+AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
+AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
+AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
+AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
+AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
+AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
+AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
+m4_pushdef([_script],[conftest.prefix])dnl
+m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
+_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
+_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
+_PKG=`echo ifelse($2, , $PACKAGE, $2)`
+_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
+_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
+_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'`
+if test ".$_INP" = "."; then
+ for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
+ case "$ac_file" in
+ *.h) _INP=$ac_file ;;
+ *)
+ esac
+ test ".$_INP" != "." && break
+ done
+fi
+if test ".$_INP" = "."; then
+ case "$_OUT" in
+ */*) _INP=`basename "$_OUT"`
+ ;;
+ *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
+ ;;
+ *) _INP=config.h
+ ;;
+ esac
+fi
+if test -z "$_PKG" ; then
+ AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
+else
+ if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
+ _INP="$srcdir/$_INP"
+ fi fi
+ AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
+ if test -f $_INP ; then
+ echo "s/@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script
+ echo "s/@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script
+ echo "s/@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script
+ echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script
+ echo "@%:@endif/" >>_script
+ echo "s/@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script
+ echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script
+ echo "@%:@endif/" >> _script
+ # now executing _script on _DEF input to create _OUT output file
+ echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
+ echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
+ echo ' ' >>$tmp/pconfig.h
+ echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
+
+ sed -f _script $_INP >>$tmp/pconfig.h
+ echo ' ' >>$tmp/pconfig.h
+ echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
+ echo "@%:@endif" >>$tmp/pconfig.h
+ if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
+ AC_MSG_NOTICE([$_OUT is unchanged])
+ else
+ ac_dir=`AS_DIRNAME(["$_OUT"])`
+ AS_MKDIR_P(["$ac_dir"])
+ rm -f "$_OUT"
+ mv $tmp/pconfig.h "$_OUT"
+ fi
+ cp _script _configs.sed
+ else
+ AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
+ fi
+ rm -f conftest.*
+fi
+m4_popdef([_symbol])dnl
+m4_popdef([_script])dnl
+AS_VAR_POPDEF([_INP])dnl
+AS_VAR_POPDEF([_UPP])dnl
+AS_VAR_POPDEF([_LOW])dnl
+AS_VAR_POPDEF([_PKG])dnl
+AS_VAR_POPDEF([_DEF])dnl
+AS_VAR_POPDEF([_OUT])dnl
+],[PACKAGE="$PACKAGE"])])
+
+dnl ______ /usr/share/aclocal/guidod/ax_not_enable_frame_pointer.m4 ______
+dnl @* AX_NOT_ENABLE_FRAME_POINTER ([shellvar])
+dnl
+dnl add --enable-frame-pointer option, the default will add the gcc
+dnl --fomit-frame-pointer option to the shellvar (per default CFLAGS)
+dnl and remove the " -g " debuginfo option from it. In other words,
+dnl the default is "--disable-frame-pointer"
+dnl
+dnl @: guidod@gmx.de
+dnl @%Id: %
+
+AC_DEFUN([AX_NOT_ENABLE_FRAME_POINTER],[dnl
+AS_VAR_PUSHDEF([VAR],[enable_frame_pointer])dnl
+AC_MSG_CHECKING([m4_ifval($1,$1,CFLAGS) frame-pointer])
+AC_ARG_ENABLE([frame-pointer], AC_HELP_STRING(
+ [--enable-frame-pointer],[enable callframe generation for debugging]))
+case ".$VAR" in
+ .|.no|.no,*) test ".$VAR" = "." && VAR="no"
+ m4_ifval($1,$1,CFLAGS)=`echo dnl
+ " $m4_ifval($1,$1,CFLAGS) " | sed -e 's/ -g / /'`
+ if test ".$GCC" = ".yes" ; then
+ m4_ifval($1,$1,CFLAGS)="$m4_ifval($1,$1,CFLAGS) -fomit-frame-pointer"
+ AC_MSG_RESULT([$VAR, -fomit-frame-pointer added])
+ else
+ AC_MSG_RESULT([$VAR, -g removed])
+ fi ;;
+ *) AC_MSG_RESULT([$VAR, kept]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/ac_set_default_paths_system.m4 ______
+dnl @synopsis AC_SET_DEFAULT_PATHS_SYSTEM
+dnl
+dnl the most interesting changes go about windows-targets - where the
+dnl default_prefix is set to /programs, and quite some directories
+dnl are aliased: sbindir := libdir := bindir and the docprefix-defaults
+dnl are also a bit different, even on FHS2-compliant systems where the
+dnl mandir is going to $prefix/man only if prefix=/usr, otherwise they
+dnl shall go to $datadir/man. We use an extra docprefix to express it
+dnl which is either defined as being prefix or datadir. not SUBSTed here.
+dnl
+dnl @, (very useful)
+dnl @version %Id: ac_set_default_paths_system.m4,v 1.5 2003/02/02 19:32:30 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
+AC_DEFUN([AC_SET_DEFAULT_PATHS_SYSTEM],
+[AC_REQUIRE([AC_CANONICAL_HOST]) # --------------------------------------------
+case "$prefix:$ac_default_prefix" in
+ NONE:/usr/local)
+ result=""
+ AC_MSG_CHECKING(default prefix path)
+ case "${target_os}" in
+ *cygwin* | *mingw* | *uwin* | *djgpp | *emx* )
+ if test "${host_os}" = "${target_os}" ; then
+ ac_default_prefix="/programs"
+ result="(win/dos target)"
+ else
+ case "$PATH" in
+ *:/usr/local/cross-tools/$target_alias/bin:*)
+ ac_default_prefix="/usr/local/cross-tools/$target_alias" ;;
+ *:/usr/local/$target_alias/bin:*)
+ ac_default_prefix="/usr/local/$target_alias" ;;
+ *:/usr/local/$target_cpu-$target_os/bin:*)
+ ac_default_prefix="/usr/local/$target_cpu-$target_os" ;;
+ *)
+ ac_default_prefix="/programs" ;;
+ esac
+ result="(win/dos cross-compiler)"
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT($ac_default_prefix $result)
+ ;;
+esac
+AC_MSG_CHECKING(default prefix system)
+result="$prefix" ; test "$result" = "NONE" && result="$ac_default_prefix"
+case ${result} in
+ /programs | /programs/*) result="is win-/programs"
+ # on win/dos, .exe .dll and .cfg live in the same directory
+ libdir=`echo $libdir |sed -e 's:^..exec_prefix./lib$:${bindir}:'`
+ sbindir=`echo $sbindir |sed -e 's:^..exec_prefix./sbin$:${libdir}:'`
+ sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:${sbindir}:'`
+ libexecdir=`echo $libexecdir |sed -e 's:/libexec$:/system:'`
+ # help-files shall be set with --infodir, docprefix is datadir
+ docprefix="${datadir}"
+ mandir=`echo $mandir \
+ |sed -e 's:^..prefix./man$:${datadir}/info:'`
+ includedir=`echo $includedir \
+ |sed -e 's:^..prefix./include$:${datadir}/include:'`
+ # other state files (but /etc) are moved to datadir
+ sharedstatedir=`echo $sharedstatedir \
+ |sed -e 's:^..prefix./com$:${datadir}/default:'`
+ localstatedir=`echo $localstatedir \
+ |sed -e 's:^..prefix./var$:${datadir}/current:'`
+ ;;
+ /usr) result="is /usr-shipped"
+ # doc files are left at prefix
+ docprefix="${prefix}"
+ # state files go under /top
+ sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:/etc:'`
+ sharedstatedir=`echo $sharedstatedir \
+ |sed -e 's:^..prefix./com$:/etc/default:'`
+ # $prefix/var is going to end up in /var/lib
+ localstatedir=`echo $localstatedir \
+ |sed -e 's:^..prefix./var$:/var/lib:'`
+ ;;
+ /opt | /opt/*) result="is /opt-package"
+ # state files go under /top/prefix
+ sysconfdir=`echo $sysconfdir \
+ |sed -e 's:^..prefix./etc$:/etc${prefix}:'`
+ sharedstatedir=`echo $sharedstatedir \
+ |sed -e 's:^..prefix./com$:/etc/default${prefix}:'`
+ # $prefix/var is going to to be /var$prefix... once again
+ localstatedir=`echo $localstatedir \
+ |sed -e 's:^..prefix./var$:/var${prefix}:'`
+ # doc files are left at prefix
+ docprefix="${prefix}"
+ ;;
+ *) result="is /local-package"
+ # doc files are moved from prefix down to datadir
+ docprefix="${datadir}"
+ mandir=`echo $mandir \
+ |sed -e 's:^..prefix./man$:${datadir}/man:'`
+ infodir=`echo $infodir \
+ |sed -e 's:^..prefix./infodir$:${datadir}/info:'`
+ # never use $prefix/com - that is no good idea
+ sharedstatedir=`echo $sharedstatedir \
+ |sed -e 's:^..prefix./com$:${sysconfdir}/default:'`
+ ;;
+esac
+AC_MSG_RESULT($result)
+# --------------------------------------------------------
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_cflags_no_writable_strings.m4 ______
+dnl @synopsis AX_CFLAGS_NO_WRITABLE_STRINGS [(shellvar [,default, [A/NA]])]
+dnl
+dnl Try to find a compiler option that makes all stringliteral readonly.
+dnl
+dnl The sanity check is done by looking at string.h which has a set
+dnl of strcpy definitions that should be defined with const-modifiers
+dnl to not emit a warning in all so many places.
+dnl
+dnl For the GNU CC compiler it will be -fno-writable-strings -Wwrite-strings
+dnl The result is added to the shellvar being CFLAGS by default.
+dnl
+dnl DEFAULTS:
+dnl
+dnl - $1 shell-variable-to-add-to : CFLAGS
+dnl - $2 add-value-if-not-found : nothing
+dnl - $3 action-if-found : add value to shellvariable
+dnl - $4 action-if-not-found : nothing
+dnl
+dnl @version %Id: ax_cflags_no_writable_strings.m4,v 1.6 2003/06/05 00:52:15 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
+dnl
+AC_DEFUN([AX_CFLAGS_NO_WRITABLE_STRINGS],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_no_writable_strings])dnl
+AC_CACHE_CHECK([m4_ifval([$1],[$1],FLAGS) making strings readonly],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+# -use_readonly_const is the default for IRIX C,
+# puts them into .rodata, but they are copied later.
+# need to be "-G0 -rdatashared" for strictmode but
+# I am not sure what effect that has really. - guidod
+for ac_arg dnl
+in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC
+ "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment
+ "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment
+ "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment
+ "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+case ".$VAR" in
+ .|.no|.no,*) ;;
+ *) # sanity check - testing strcpy() from string.h
+ cp config.log config.tmp
+ AC_TRY_COMPILE([#include <string.h>],[
+ char test[16];
+ if (strcpy (test, "test")) return 1;],
+ dnl the original did use test -n `$CC testprogram.c`
+ [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
+ then VAR="no, suppressed, string.h," ; fi],
+ [VAR="no, suppressed, string.h"])
+ rm config.tmp
+ ;;
+esac
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+dnl the only difference - the LANG selection... and the default FLAGS
+
+AC_DEFUN([AX_CXXFLAGS_NO_WRITABLE_STRINGS],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_no_writable_strings])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) making strings readonly],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_CXX
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+# -use_readonly_const is the default for IRIX C,
+# puts them into .rodata, but they are copied later.
+# need to be "-G0 -rdatashared" for strictmode but
+# I am not sure what effect that has really. - guidod
+for ac_arg dnl
+in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC
+ "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment
+ "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment
+ "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment
+ "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+case ".$VAR" in
+ .|.no|.no,*) ;;
+ *) # sanity check - testing strcpy() from string.h
+ cp config.log config.tmp
+ AC_TRY_COMPILE([#include <string.h>],[[
+ char test[16];
+ if (strcpy (test, "test")) return 1;]],
+ dnl the original did use test -n `$CC testprogram.c`
+ [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
+ then VAR="no, suppressed, string.h," ; fi],
+ [VAR="no, suppressed, string.h"])
+ rm config.tmp
+ ;;
+esac
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_spec_file.m4 ______
+dnl @* AX_SPEC_FILE [(rpmspecfile [,subdirpath])]
+dnl
+dnl set the specfile - if no argument has been given then check whether
+dnl the ac_unique_file looks like a .spec file and use it. This macro
+dnl is ac_REQUIRED by many AX_SPEC_ routines.
+dnl
+dnl the AX_SPEC_EXTRACT macro is a helper used by many AX_SPEC_
+dnl routines and therefore placed here to be automatically included
+dnl in the macro set of (older) aclocal/acinclude.
+dnl
+dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]])
+dnl
+dnl @version %Id: ax_spec_file.m4,v 1.1 2003/10/18 23:38:41 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
+
+AC_DEFUN([AX_SPEC_FILE],
+[ AC_MSG_CHECKING([rpm spec file])
+ if test ".$1" != "." ; then
+ ax_spec_file_="$1"
+ ax_spec_file=`basename $1`
+ else
+ case ".$ac_unique_file" in
+ *.spec) ax_spec_file="$ac_unique_file"
+ ax_spec_file_="$ac_unique_file" ;;
+ *) ax_spec_file="TODO"
+ if test ".$PACKAGE" != "."
+ then ax_spec_file_="$PACKAGE.spec"
+ else ax_spec_file_="README"
+ fi
+ cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
+ no ax_spec_file argument has been given, using defaults of
+ (1) $ax_spec_file_
+ (2) $ax_spec_file
+EOF
+ ;;
+ esac
+ fi
+ # find specfile
+ for i in ifelse($2,,,$2) . $srcdir $srcdir/.. .. ; do
+ if test -f "$i/$ax_spec_file_" ; then
+ ax_spec_dir="$i"
+ ax_spec_file="$ax_spec_dir/$ax_spec_file_"
+ break
+ fi
+ if test -f "$i/$ax_spec_file" ; then
+ ax_spec_dir="$i"
+ ax_spec_file="$ax_spec_dir/$ax_spec_file"
+ break
+ fi
+ done
+ case "$ax_spec_file" in
+ ./*) if test "$ax_spec_file" = "./$ax_spec_file_" ; then
+ ax_spec_file="$ax_spec_file_"
+ fi
+ AC_MSG_RESULT([$ax_spec_file]) ;;
+ */*) AC_MSG_RESULT([$ax_spec_file]) ;;
+ *) AC_MSG_ERROR([no rpm spec file found]) ;;
+ esac
+ m4_define([m4_ax_spec_file],[ax_spec_file])
+])
+
+dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]])
+
+AC_DEFUN([AX_SPEC_EXTRACT],
+[
+ if test ".$[]$1" = "." ; then
+ $1=`grep -i '^[[ ]]*m4_ifval([$2],[$2],[$1])[[ ]]*:' dnl
+ "$ax_spec_file" | sed -e 's/.*:[[ ]]*//' dnl
+ -e 's/[[ ]][[ ]]*/ /g' -e 's/^ //' -e 's/ $[]//' -e 'q'`
+ if test ".$[]$1" = "." ; then
+ for $1 in $2 $1 m4_tolower([$1]) ; do
+ $1=`echo "$[]$1" | sed -e 's/^%//g'`
+ $1=`sed dnl
+ -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
+ -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
+ -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file`
+ test ".$1" != "." && break
+ done
+ fi
+ case ".$[]$1" in
+ .%{*)
+ $1=`echo "$[]$1" | sed -e 's/%{//' -e 's/}$[]//'`
+ $1=`sed dnl
+ -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
+ -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
+ -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;;
+ .%*)
+ $1=`echo "$[]$1" | sed -e 's/%//'`
+ $1=`sed dnl
+ -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
+ -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
+ -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;;
+ esac
+ m4_ifval([$3],[test ".$[]$1" = "." && $1="$3"])
+ fi # test ".$[]$1" = "."
+])
+
-# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.7.6 -*- Autoconf -*-
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
-dnl ______ /usr/share/aclocal/guidod/ax_spec_file.m4 ______
-dnl @* AX_SPEC_FILE [(rpmspecfile [,subdirpath])]
-dnl
-dnl set the specfile - if no argument has been given then check whether
-dnl the ac_unique_file looks like a .spec file and use it. This macro
-dnl is ac_REQUIRED by many AX_SPEC_ routines.
-dnl
-dnl the AX_SPEC_EXTRACT macro is a helper used by many AX_SPEC_
-dnl routines and therefore placed here to be automatically included
-dnl in the macro set of (older) aclocal/acinclude.
-dnl
-dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]])
-dnl
-dnl @version %Id: ax_spec_file.m4,v 1.1 2003/10/18 23:38:41 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
-
-AC_DEFUN([AX_SPEC_FILE],
-[ AC_MSG_CHECKING([rpm spec file])
- if test ".$1" != "." ; then
- ax_spec_file_="$1"
- ax_spec_file=`basename $1`
- else
- case ".$ac_unique_file" in
- *.spec) ax_spec_file="$ac_unique_file"
- ax_spec_file_="$ac_unique_file" ;;
- *) ax_spec_file="TODO"
- if test ".$PACKAGE" != "."
- then ax_spec_file_="$PACKAGE.spec"
- else ax_spec_file_="README"
- fi
- cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
- no ax_spec_file argument has been given, using defaults of
- (1) $ax_spec_file_
- (2) $ax_spec_file
-EOF
- ;;
- esac
- fi
- # find specfile
- for i in ifelse($2,,,$2) . $srcdir $srcdir/.. .. ; do
- if test -f "$i/$ax_spec_file_" ; then
- ax_spec_dir="$i"
- ax_spec_file="$ax_spec_dir/$ax_spec_file_"
- break
- fi
- if test -f "$i/$ax_spec_file" ; then
- ax_spec_dir="$i"
- ax_spec_file="$ax_spec_dir/$ax_spec_file"
- break
- fi
- done
- case "$ax_spec_file" in
- ./*) if test "$ax_spec_file" = "./$ax_spec_file_" ; then
- ax_spec_file="$ax_spec_file_"
- fi
- AC_MSG_RESULT([$ax_spec_file]) ;;
- */*) AC_MSG_RESULT([$ax_spec_file]) ;;
- *) AC_MSG_ERROR([no rpm spec file found]) ;;
- esac
- m4_define([m4_ax_spec_file],[ax_spec_file])
-])
-
-dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]])
-
-AC_DEFUN([AX_SPEC_EXTRACT],
-[
- if test ".$[]$1" = "." ; then
- $1=`grep -i '^[[ ]]*m4_ifval([$2],[$2],[$1])[[ ]]*:' dnl
- "$ax_spec_file" | sed -e 's/.*:[[ ]]*//' dnl
- -e 's/[[ ]][[ ]]*/ /g' -e 's/^ //' -e 's/ $[]//' -e 'q'`
- if test ".$[]$1" = "." ; then
- for $1 in $2 $1 m4_tolower([$1]) ; do
- $1=`echo "$[]$1" | sed -e 's/^%//g'`
- $1=`sed dnl
- -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
- -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
- -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file`
- test ".$1" != "." && break
- done
- fi
- case ".$[]$1" in
- .%{*)
- $1=`echo "$[]$1" | sed -e 's/%{//' -e 's/}$[]//'`
- $1=`sed dnl
- -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
- -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
- -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;;
- .%*)
- $1=`echo "$[]$1" | sed -e 's/%//'`
- $1=`sed dnl
- -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
- -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
- -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;;
- esac
- m4_ifval([$3],[test ".$[]$1" = "." && $1="$3"])
- fi # test ".$[]$1" = "."
-])
-
-dnl ______ /usr/share/aclocal/guidod/ax_spec_package_version.m4 ______
-dnl @* AX_SPEC_PACKAGE_AND_VERSION ([specfile])
-dnl @* AX_SPEC_PACKAGE_NAME ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_VERSION ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_SUMMARY ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_LICENSE ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_CATEGORY ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_PACKAGE_ICON ([shellvar],[defaultvalue])
-dnl @* AX_SPEC_DEFAULTS([specfile])
-dnl
-dnl set PACKAGE from the given specfile - default to basename of
-dnl the rpmspecfile if no "name:" could be found in the spec file.
-dnl
-dnl set VERSION from the given specfile - default to a date-derived
-dnl value if no "version:" could be found in the spec file.
-dnl
-dnl this macro builds on top of AX_SPEC_FILE / AX_SPEC_EXTRACT
-dnl
-dnl more specific: if not "name:" or "%define name" was found in
-dnl the myproject.spec file then the PACKAGE var is set to the
-dnl basename "myproject". When no spec file was present then it
-dnl will usually default to "TODO".
+dnl ______ /usr/share/aclocal/guidod/ax_cflags_gcc_option.m4 ______
+dnl @synopsis AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]])
dnl
-dnl The version spec looks for "version:" or "%define version" in
-dnl the spec file. When no such value was seen or no spec file
-dnl had been present then the value is set to `date +0.%y.%W%w`.
+dnl AX_CFLAGS_GCC_OPTION(-fvomit-frame) would show a message as like
+dnl "checking CFLAGS for gcc -fvomit-frame ... yes" and adds
+dnl the optionflag to CFLAGS if it is understood. You can override
+dnl the shellvar-default of CFLAGS of course. The order of arguments
+dnl stems from the explicit macros like AX_CFLAGS_WARN_ALL.
dnl
-dnl the version value itself is sanitized somewhat with making
-dnl it to always carry atleast three digits (1.2.3) and clensing
-dnl superflous "0" chars around from generating numbers elsewhere.
+dnl The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add
+dnl to CXXFLAGS - and it uses the autoconf setup for C++ instead of C
+dnl (since it is possible to use different compilers for C and C++).
dnl
-dnl additional macros are provided that extract a specific value
-dnl from the spec file, among these:
+dnl The macro is a lot simpler than any special AX_CFLAGS_* macro (or
+dnl ac_cxx_rtti.m4 macro) but allows to check for arbitrary options.
+dnl However, if you use this macro in a few places, it would be great
+dnl if you would make up a new function-macro and submit it to the
+dnl ac-archive.
dnl
-dnl set PACKAGE_SUMMARY from the given specfile - default to package and
-dnl try to detect a type suffix if "summary:" was not in the spec file
+dnl - $1 option-to-check-for : required ("-option" as non-value)
+dnl - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case)
+dnl - $3 action-if-found : add value to shellvariable
+dnl - $4 action-if-not-found : nothing
dnl
-dnl set PACKAGE_LICENSE from the given specfile - if no "license:" tag was
-dnl given in the spec file then various COPYING files are grepped to
-dnl have a guess and the final fallback will be GNU GPL (or GNU LGPL).
+dnl note: in earlier versions, $1-$2 were swapped. We try to detect the
+dnl situation and accept a $2=~/-/ as being the old option-to-check-for.
dnl
-dnl set PACKAGE_ICON from the given specfile - if no "icon:" tag was
-dnl given in the spec file then we default to $PACKAGE-icon.png
+dnl also: there are other variants that emerged from the original macro
+dnl variant which did just test an option to be possibly added. However,
+dnl some compilers accept an option silently, or possibly for just
+dnl another option that was not intended. Therefore, we have to do a
+dnl generic test for a compiler family. For gcc we check "-pedantic"
+dnl being accepted which is also understood by compilers who just want
+dnl to be compatible with gcc even when not being made from gcc sources.
dnl
-dnl the final AX_SPEC_INIT(specfile) will initialize all variables to
-dnl its defaults according to the spec file given.
+dnl see also:
+dnl AX_CFLAGS_SUN_OPTION AX_CFLAGS_HPUX_OPTION
+dnl AX_CFLAGS_AIX_OPTION AX_CFLAGS_IRIX_OPTION
dnl
-dnl @version %Id: ax_spec_package_version.m4,v 1.1 2003/10/18 23:38:41 guidod Exp %
+dnl @, tested, experimental
+dnl @version %Id: ax_cflags_gcc_option.m4,v 1.2 2003/10/28 23:57:38 guidod Exp %
dnl @author Guido Draheim <guidod@gmx.de>
-
-AC_DEFUN([AX_SPEC_PACKAGE_LICENSE],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_LICENSE])dnl
- AC_MSG_CHECKING([for spec license type])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[license],m4_ifval($1,$1))
- VAR=`echo $VAR | sed -e 's/ *License//g'`
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for LICENSE / COPYRIGHT
- if test ".$VAR" = "." ; then
- for ac_file in "$srcdir/COPYING" "$srcdir/COPYING" "$srcdir/LICENSE" ; do
- test -f "$ac_file" || continue
-dnl http://www.ibiblio.org/osrt/omf/omf_elements "16. Rights"
- if grep "GNU LESSER GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null
- then VAR="GNU LGPL" ; break
- elif grep "GNU GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null
- then VAR="GNU GPL" ; break
- elif grep "MOZILLA PUBLIC LICENSE" "$ac_file" >/dev/null
- then VAR="MPL" ; break
- elif grep "Mozilla Public License" "$ac_file" >/dev/null
- then VAR="MPL" ; break
- elif grep -i "artistic license" "$ac_file" >/dev/null
- then VAR="Artistic" ; break
- elif grep -i "artistic control" "$ac_file" >/dev/null
- then VAR="Artistic" ; break
- elif grep -i "semblance of artistic" "$ac_file" >/dev/null
- then VAR="Artistic" ; break
- elif grep -i "above copyright notice" "$ac_file" >/dev/null
- then VAR="BSD" ; break
- fi
- done
- if test ".$VAR" = "." ; then
- if test "$srcdir/COPYING.LIB" ; then VAR="GNU LGPL"
- elif test ".$ltmain" != "." ; then VAR="GNU LGPL"
- else VAR="GNU GPL"
- fi
- fi
- fi
- ],[test ".$VAR" = "." && VAR="$2"])
- test "$VAR" = "GPL" && VAR="GNU GPL"
- test "$VAR" = "LGPL" && VAR="GNU LGPL"
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_SUMMARY],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_SUMMARY])dnl
- AC_MSG_CHECKING([for spec summary])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[summary],m4_ifval($1,$1))
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for SUMMARY
- if test ".$VAR" = "." ; then VAR="$PACKAGE"
- test ".$VAR" = "." && VAR="foo"
- test ".$ltmain" != "." && VAR="$VAR library"
- fi
- ],[test ".$VAR" = "." && VAR="$2"])
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_ICON],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_ICON])dnl
- AC_MSG_CHECKING([for spec icon])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[icon],m4_ifval($1,$1))
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for ICON
- if test ".$VAR" = "." ; then VAR="$PACKAGE-icon.png" ; fi
- ],[test ".$VAR" = "." && VAR="$2"])
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_CATEGORY],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_CATEGORY])dnl
- AC_MSG_CHECKING([for spec category])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[group],m4_ifval($1,$1))
- VAR=`echo $VAR | sed -e 's/ /-/g'`
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for CATEGORY
- if test ".$VAR" = "." ; then if test ".$ltmain" != "."
- then VAR="Development/Library"
- else VAR="Development/Other"
- fi fi
- ],[test ".$VAR" = "." && VAR="$2"])
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_NAME],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_NAME])dnl
- AC_MSG_CHECKING([for spec package])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[name],m4_ifval($1,$1))
- VAR=`echo $VAR | sed -e 's/ /-/g'`
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for PACKAGE
- test ".$VAR" = "." && VAR=`basename $ax_spec_file .spec`
- test ".$VAR" = ".README" && VAR="TODO"
- test ".$VAR" = ".TODO" && VAR="foo"
- ],[test ".$VAR" = "." && VAR="$2"])
- test "VAR" = "PACKAGE_NAME" && test ".$PACKAGE" = "." && PACKAGE="$VAR"
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_VERSION_],[AC_REQUIRE([AX_SPEC_FILE])dnl
- AS_VAR_PUSHDEF([VAR],[PACKAGE_VERSION])dnl
- AC_MSG_CHECKING([for spec version])
- if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
- then k="(w/o spec)"
- else k=""
- AX_SPEC_EXTRACT(VAR,[version],m4_ifval($1,$1))
- VAR=`echo $VAR | sed -e 's/ /-/g'`
- fi fi
- test ".$VAR" = "." && k="(fallback)"
- ifelse($2,,[dnl here the defaults for VERSION
- test ".$VAR" = "." && VAR=`date +0.%y.%W%w`
- ],[test ".$VAR" = "." && VAR="$2"])
- test "VAR" = "PACKAGE_VERSION" && test ".$VERSION" = "." && VERSION="$VAR"
- case "$VAR" in # note we set traditional VERSION before cleaning things up
- *.*.) VAR="$VAR"`date +%W%w` ;;
- *.*.*) ;;
- *.) VAR="$VAR"`date +%y.%W%w` ;;
- *.*) VAR="$VAR.0" ;;
- *) VAR=AS_TR_SH([$VAR]) ; VAR="$VAR.`date +%y.%W%w`" ;;
- esac
- VAR=`echo $VAR | sed -e "s/[[.]][0]\\([0-9]\\)/.\\1/g"`
- AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
- AS_VAR_POPDEF([VAR])dnl
-])
-
-dnl for compatibility, we define ax_spec_package_version
-dnl to do all of ax_spec_package_name as well.
-AC_DEFUN([AX_SPEC_PACKAGE_VERSION],[AC_REQUIRE([AX_SPEC_FILE])dnl
- ifelse($1,,
- AC_MSG_WARN([please use ax_spec_package_AND_version now!]),
- AC_MSG_ERROR([please use ax_spec_package_AND_version now!]))
- AX_SPEC_PACKAGE_NAME
- AX_SPEC_PACKAGE_VERSION_
-
-])
-
-AC_DEFUN([AX_SPEC_PACKAGE_AND_VERSION],[
- m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)])
- AX_SPEC_PACKAGE_NAME
- AX_SPEC_PACKAGE_VERSION_
-])
-
-AC_DEFUN([AX_SPEC_DEFAULTS],[
- m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)])
- AX_SPEC_PACKAGE_NAME
- AX_SPEC_PACKAGE_VERSION_
- AX_SPEC_PACKAGE_LICENSE
- AX_SPEC_PACKAGE_SUMMARY
- AX_SPEC_PACKAGE_CATEGORY
- AX_SPEC_PACKAGE_ICON
-])
-
-dnl ______ /usr/share/aclocal/guidod/ax_cflags_gcc_option.m4 ______
-dnl @synopsis AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]])
-dnl
-dnl AX_CFLAGS_GCC_OPTION(-fvomit-frame) would show a message as like
-dnl "checking CFLAGS for gcc -fvomit-frame ... yes" and adds
-dnl the optionflag to CFLAGS if it is understood. You can override
-dnl the shellvar-default of CFLAGS of course. The order of arguments
-dnl stems from the explicit macros like AX_CFLAGS_WARN_ALL.
-dnl
-dnl The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add
-dnl to CXXFLAGS - and it uses the autoconf setup for C++ instead of C
-dnl (since it is possible to use different compilers for C and C++).
-dnl
-dnl The macro is a lot simpler than any special AX_CFLAGS_* macro (or
-dnl ac_cxx_rtti.m4 macro) but allows to check for arbitrary options.
-dnl However, if you use this macro in a few places, it would be great
-dnl if you would make up a new function-macro and submit it to the
-dnl ac-archive.
-dnl
-dnl - $1 option-to-check-for : required ("-option" as non-value)
-dnl - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case)
-dnl - $3 action-if-found : add value to shellvariable
-dnl - $4 action-if-not-found : nothing
-dnl
-dnl note: in earlier versions, $1-$2 were swapped. We try to detect the
-dnl situation and accept a $2=~/-/ as being the old option-to-check-for.
-dnl
-dnl also: there are other variants that emerged from the original macro
-dnl variant which did just test an option to be possibly added. However,
-dnl some compilers accept an option silently, or possibly for just
-dnl another option that was not intended. Therefore, we have to do a
-dnl generic test for a compiler family. For gcc we check "-pedantic"
-dnl being accepted which is also understood by compilers who just want
-dnl to be compatible with gcc even when not being made from gcc sources.
-dnl
-dnl see also:
-dnl AX_CFLAGS_SUN_OPTION AX_CFLAGS_HPUX_OPTION
-dnl AX_CFLAGS_AIX_OPTION AX_CFLAGS_IRIX_OPTION
-dnl
-dnl @, tested, experimental
-dnl @version %Id: ax_cflags_gcc_option.m4,v 1.2 2003/10/28 23:57:38 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
-dnl
-AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
+dnl
+AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
])
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])])
-dnl ______ /usr/share/aclocal/guidod/ax_maintainer_mode_auto_silent.m4 ______
-dnl @* AX_MAINTAINER_MODE_AUTO_SILENT
-dnl
-dnl Set autotools to error/sleep settings so that they are not run when
-dnl being errornously triggered. Likewise make libtool-silent when
-dnl libtool has been used.
-dnl
-dnl I am using the macro quite a lot since some automake versions had the
-dnl tendency to try to rerun some autotools on a mere make even when not
-dnl quite in --maintainer-mode. That is very annoying. Likewise, a user
-dnl who installs from source does not want to see doubled compiler messages.
+dnl ______ ______
+
+dnl ______ /usr/share/aclocal/C_Support/acx_restrict.m4 ______
+dnl @synopsis ACX_C_RESTRICT
dnl
-dnl I did not put an AC-REQUIRE(MAINTAINER_MODE) in here - should I?
+dnl This macro determines whether the C compiler supports the "restrict"
+dnl keyword introduced in ANSI C99, or an equivalent. Does nothing if
+dnl the compiler accepts the keyword. Otherwise, if the compiler supports
+dnl an equivalent (like gcc's __restrict__) defines "restrict" to be that.
+dnl Otherwise, defines "restrict" to be empty.
dnl
-dnl @: guidod@gmx.de
-dnl @%Id: ax_maintainer_mode_auto_silent.m4,v 1.1 2003/10/19 00:12:45 guidod Exp %
+dnl @version %Id: acx_restrict.m4,v 1.1.1.1 2001/07/26 00:46:18 guidod Exp %
+dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
-AC_DEFUN([AX_MAINTAINER_MODE_AUTO_SILENT],[dnl
-dnl ac_REQUIRE([am_MAINTAINER_MODE])dn
-AC_MSG_CHECKING(auto silent in maintainer mode)
-if test "$USE_MAINTAINER_MODE" = "no" ; then
- test ".$TIMEOUT" = "." && TIMEOUT="9"
- AUTOHEADER="sleep $TIMEOUT ; true || autoheader || skipped"
- AUTOMAKE="sleep $TIMEOUT ; true || automake || skipped"
- AUTOCONF="sleep $TIMEOUT ; true || autoconf || skipped"
- if test ".$LIBTOOL" != "." ; then
- LIBTOOL="$LIBTOOL --silent"
- AC_MSG_RESULT([libtool-silent, auto-sleep-9])
- else
- AC_MSG_RESULT([auto-sleep-9])
- fi
-else
- AC_MSG_RESULT([no])
-fi
+AC_DEFUN([ACX_C_RESTRICT],
+[AC_CACHE_CHECK([for C restrict keyword], acx_cv_c_restrict,
+[acx_cv_c_restrict=unsupported
+ AC_LANG_SAVE
+ AC_LANG_C
+ # Try the official restrict keyword, then gcc's __restrict__, then
+ # SGI's __restrict. __restrict has slightly different semantics than
+ # restrict (it's a bit stronger, in that __restrict pointers can't
+ # overlap even with non __restrict pointers), but I think it should be
+ # okay under the circumstances where restrict is normally used.
+ for acx_kw in restrict __restrict__ __restrict; do
+ AC_TRY_COMPILE([], [float * $acx_kw x;], [acx_cv_c_restrict=$acx_kw; break])
+ done
+ AC_LANG_RESTORE
+])
+ if test "$acx_cv_c_restrict" != "restrict"; then
+ acx_kw="$acx_cv_c_restrict"
+ if test "$acx_kw" = unsupported; then acx_kw=""; fi
+ AC_DEFINE_UNQUOTED(restrict, $acx_kw, [Define to equivalent of C99 restrict keyword, or to nothing if this is not supported. Do not define if restrict is supported directly.])
+ fi
])
-dnl ______ /usr/share/aclocal/guidod/patch_libtool_to_add_host_cc.m4 ______
-dnl @* PATCH_LIBTOOL_TO_ADD_HOST_CC
+dnl ______ /usr/share/aclocal/guidod/patch_libtool_sys_lib_search_path_spec.m4 ______
+dnl @* PATCH_LIBTOOL_SYS_LIB_SEARCH_PATH_SPEC
dnl
-dnl The libtool 1.4.x processing (and patched 1.3.5) uses a little
-dnl "impgen" tool to turn a "*.dll" into an import "*.lib" as it is
-dnl needed for win32 targets. However, this little tool is not shipped
-dnl by binutils, it is not even a command option of dlltool or dllwrap.
-dnl It happens to be a C source snippet implanted into the libtool
-dnl sources - it gets written to ".libs", compiled into a binary
-dnl on-the-fly, and executed right away on the "dll" file to create
-dnl the import-lib (dll.a files in gcc-speak).
-dnl
-dnl This mode works fine for a native build within mingw or cygwin,
-dnl but it does not work in cross-compile mode since CC is a
-dnl crosscompiler - it will create an .exe file on a non-win32
-dnl system, and as a result an impgen.exe is created on-the-fly
-dnl that can not be executed on-the-fly. Luckily, the actual
-dnl libtool snippet uses HOST_CC to compile the sources which
-dnl has a fallback to CC when the HOST_CC variable was not set.
-dnl
-dnl this ac-macro is trying to detect a valid HOST_CC which is not
-dnl a cross-compiler. This is done by looking into the $PATH for
-dnl a "cc" and the result is patched into libtool a HOST_CC, iow
-dnl it adds another configured variable at the top of the libtool
-dnl script.
-dnl
-dnl In discussions on the libtool mailinglist it occurred that
-dnl later gcc/binutils generations are able to link with dlls
-dnl directly, i.e. there is no import-lib needed anymore. The
-dnl import-table is created within the linker itself (in-memory)
-dnl and bound to the .exe/.dll currently in the making. The
-dnl whole stuff of impgen exe and compiling it on-the-fly, well,
-dnl it is superflouos then.
-dnl
-dnl Since mingw crosscompilers tend to be quite a fresh development
-dnl it was agreed to remove the impgen stuff completly from
-dnl libtool sources. Still however, this macro does not hurt
-dnl since it does not patch impgen cmds but it just adds HOST_CC
-dnl which might be useful in other cross-compiling cases as well.
-dnl Therefore, you can leave it in for maximum compatibility and
-dnl portability.
-dnl
-dnl @= guidod@gmx.de
-dnl @%Id: patch_libtool_to_add_host_cc.m4,v 1.3 2003/03/23 13:20:27 guidod Exp %
-
-AC_DEFUN([PATCH_LIBTOOL_TO_ADD_HOST_CC],
-[# patch libtool to add HOST_CC sometimes needed in crosscompiling a win32 dll
-if grep "HOST_CC" libtool >/dev/null; then
- if test "$build" != "$host" ; then
- if test "_$HOST_CC" = "_" ; then
- HOST_CC="false"
- for i in `echo $PATH | sed 's,:, ,g'` ; do
- test -x $i/cc && HOST_CC=$i/cc
- done
- fi
-AC_MSG_RESULT(patching libtool to add HOST_CC=$HOST_CC)
- test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool)
- sed -e "/BEGIN.*LIBTOOL.*CONFIG/a\\
-HOST_CC=$HOST_CC" libtool >libtool.new
- (test -s libtool.new || rm libtool.new) 2>/dev/null
- test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !!
- test -f libtool || mv libtool.old libtool
- fi
-fi
-])
-dnl ______ /usr/share/aclocal/guidod/patch_libtool_sys_lib_search_path_spec.m4 ______
-dnl @* PATCH_LIBTOOL_SYS_LIB_SEARCH_PATH_SPEC
-dnl
-dnl Cross-compiling to win32 from a unix system reveals a bug - the
-dnl path-separator has been set to ";" depending on the target system.
-dnl However, the crossgcc search_path_spec works in a unix-environment
-dnl with unix-style directories and unix-stylish path_separator. The
-dnl result: the search_path_spec is a single word still containing the
-dnl ":" separators.
+dnl Cross-compiling to win32 from a unix system reveals a bug - the
+dnl path-separator has been set to ";" depending on the target system.
+dnl However, the crossgcc search_path_spec works in a unix-environment
+dnl with unix-style directories and unix-stylish path_separator. The
+dnl result: the search_path_spec is a single word still containing the
+dnl ":" separators.
dnl
dnl This macro fixes the situation: when we see the libtool PATH_SEP
dnl to be ":" and search_path_spec to contain ":" characters, then
fi
fi
])
-dnl ______ /usr/share/aclocal/guidod/ax_cflags_strict_prototypes.m4 ______
-dnl @synopsis AX_CFLAGS_STRICT_PROTOTYPES [(shellvar [,default, [A/NA]]
+dnl ______ /usr/share/aclocal/guidod/ax_warning_default_aclocaldir.m4 ______
+dnl @* AX_WARNING_DEFAULT_ACLOCALDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])]
+dnl @* AX_ENABLE_DEFAULT_ACLOCALDIR [(dirvariable [,defsetting])]
dnl
-dnl Try to find a compiler option that requires strict prototypes.
+dnl print a warning message if the $(datadir)/aclocal directory
+dnl is not in the dirlist searched by the aclocal tool. This macro
+dnl is useful if some `make install` would target $(datadir)/aclocal
+dnl to install an autoconf m4 file of your project to be picked up
+dnl by other projects.
dnl
-dnl The sanity check is done by looking at sys/signal.h which has a set
-dnl of macro-definitions SIG_DFL and SIG_IGN that are cast to the local
-dnl signal-handler type. If that signal-handler type is not fully
-dnl qualified then the system headers are not seen as strictly prototype clean.
+dnl default $1 dirvariable = aclocaldir
+dnl default $2 defsetting = ${datadir}/aclocal
+dnl default $3 action = nothing to do
+dnl default $4 action = warn the user about mismatch
dnl
-dnl For the GNU CC compiler it will be -fstrict-prototypes -Wstrict-prototypes
+dnl In the _WARNING_ variant, the defsetting is not placed in
+dnl dirvariable nor is it ac_subst'ed in any way. The default
+dnl fail-action $4 is to send a warning message to the user,
+dnl and the default accept-action $3 is nothing. It is expected that
+dnl a Makefile is generated with aclocaldir=${datadir}/aclocal
+dnl
+dnl The _ENABLE_ variant however will set not only the $aclocaldir shell
+dnl var of the script, but it is also AC-SUBST'ed on default - and
+dnl furthermore a configure option "--enable-default-aclocaldir" is
+dnl provided. Only if that option is set then $2 default is not set to
+dnl the canonic default in the a $prefix subpath but instead $2 default
+dnl is set to the primary path where `aclocal` looks for macros. The
+dnl user may also override the default on the command line.
+dnl
+dnl @: guidod@gmx.de
+dnl @%Id: ax_warning_default_aclocaldir.m4,v 1.1 2003/10/18 02:57:12 guidod Exp %
+
+AC_DEFUN([AX_WARNING_DEFAULT_ACLOCALDIR],[dnl
+AC_REQUIRE([AX_EXPAND_PREFIX])dnl
+AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_dir])dnl
+AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl
+AS_VAR_PUSHDEF([LOC],[ax_warning_default_aclocal_loc])dnl
+LOC='m4_if([$2],,[${datadir}/aclocal],[$2])'
+m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"])
+ if test ".$ACLOCAL" = "." ; then
+ AC_PATH_PROG([ACLOCAL],[aclocal],[:])
+ fi
+ BIN="$ACLOCAL"
+ test ".$BIN" = "." && BIN="aclocal"
+ DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"`
+ test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal"
+ test ".$DIR" = "." && DIR="/tmp"
+DIR=`eval "echo $DIR"` # we need to expand
+DIR=`eval "echo $DIR"`
+LOC=`eval "echo $LOC"`
+LOC=`eval "echo $LOC"`
+LOC=`eval "echo $LOC"`
+LOC=`eval "echo $LOC"`
+AC_RUN_LOG([: test "$LOC" = "$DIR"])
+if test "$LOC" != "$DIR" ; then
+ if test -f "$DIR/dirlist" ; then
+ for DIR in `cat $DIR/dirlist` $DIR ; do
+ AC_RUN_LOG([: test "$LOC" = "$DIR"])
+ test "$LOC" = "$DIR" && break
+ done
+ fi
+ if test "$LOC" != "$DIR" ; then
+ m4_ifval([$4],[$4],[dnl
+ AC_MSG_NOTICE([warning: m4_if([$1],,[aclocaldir],[$1])=$LOC dnl
+(see config.log)])
+ AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[aclocaldir],[$1])=$DIR])
+ cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
+ aclocaldir: the m4_if([$1],,[default aclocaldir],[$1 value]) of $LOC
+ aclocaldir: is not listed in the dirlist where aclocal will look
+ aclocaldir: for macros - you can override the install-path using
+ aclocaldir: make install aclocaldir=$DIR
+ aclocaldir: or append the directory to aclocal reconfigures later as
+ aclocaldir: aclocal -I $LOC
+ aclocaldir: when an autoconf macro is needed from that directory
+EOF
+ m4_ifvaln([$5],[$5])])dnl
+ m4_ifvaln([$3],[else $3])dnl
+ fi
+fi
+AS_VAR_POPDEF([LOC])dnl
+AS_VAR_POPDEF([BIN])dnl
+AS_VAR_POPDEF([DIR])dnl
+])
+
+AC_DEFUN([AX_ENABLE_DEFAULT_ACLOCALDIR],[dnl
+AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl
+AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_def])dnl
+AS_VAR_PUSHDEF([DEF],[ax_warning_default_aclocal_def])dnl
+AC_ARG_ENABLE([enable-default-aclocaldir],
+[ --enable-default-aclocaldir(=PATH) override the datadir/aclocal default])
+test ".$enable_default_aclocaldir" = "." && enable_default_aclocaldir="no"
+case ".$enable_default_aclocaldir" in
+ .no) DIR='m4_if([$2],,[${datadir}/aclocal],[$2])' ;;
+ .yes) # autodetect
+ if test ".$ACLOCAL" = "." ; then
+ AC_PATH_PROG([ACLOCAL],[aclocal],[:])
+ fi
+ BIN="$ACLOCAL"
+ test ".$BIN" = "." && BIN="aclocal"
+ DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"`
+ test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal"
+ test ".$DIR" = "." && DIR="/tmp" ;;
+ *) DIR="$enable_default_aclocaldir" ;;
+esac
+AX_WARNING_DEFAULT_ACLOCALDIR([$1],[$DEF],[$3],[$4],[$5])
+m4_if([$1],,[aclocaldir],[$1])="$ax_warning_default_aclocal_dir"
+AC_SUBST(m4_if([$1],,[aclocaldir],[$1]))
+AS_VAR_POPDEF([DEF])dnl
+AS_VAR_POPDEF([DIR])dnl
+AS_VAR_POPDEF([BIN])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_cflags_warn_all.m4 ______
+dnl @synopsis AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
+dnl
+dnl Try to find a compiler option that enables most reasonable warnings.
+dnl This macro is directly derived from VL_PROG_CC_WARNINGS which is
+dnl split up into two AX_CFLAGS_WARN_ALL and AX_CFLAGS_WARN_ALL_ANSI
+dnl
+dnl For the GNU CC compiler it will be -Wall (and -ansi -pedantic)
dnl The result is added to the shellvar being CFLAGS by default.
dnl
-dnl DEFAULTS:
+dnl Currently this macro knows about GCC, Solaris C compiler,
+dnl Digital Unix C compiler, C for AIX Compiler, HP-UX C compiler,
+dnl IRIX C compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90
+dnl (Unicos 10.0.0.8) C compiler.
dnl
-dnl - $1 shell-variable-to-add-to : CFLAGS
-dnl - $2 add-value-if-not-found : nothing
-dnl - $3 action-if-found : add value to shellvariable
-dnl - $4 action-if-not-found : nothing
+dnl - $1 shell-variable-to-add-to : CFLAGS
+dnl - $2 add-value-if-not-found : nothing
+dnl - $3 action-if-found : add value to shellvariable
+dnl - $4 action-if-not-found : nothing
dnl
-dnl @version %Id: ax_cflags_strict_prototypes.m4,v 1.7 2003/06/05 00:52:22 guidod Exp %
+dnl @version %Id: ax_cflags_warn_all.m4,v 1.2 2003/10/12 14:56:07 guidod Exp %
dnl @author Guido Draheim <guidod@gmx.de>
dnl
-AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
+AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
-in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
- "-Wall % -Wstrict-prototypes" dnl try to warn atleast
- #
+in "-pedantic % -Wall" dnl GCC
+ "-xstrconst % -v" dnl Solaris C
+ "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
+ "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+ "-ansi -ansiE % -fullwarn" dnl IRIX
+ "+ESlit % +w1" dnl HP-UX C
+ "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
+ "-h conform % -h msglevel 2" dnl Cray C (Unicos)
+ #
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
-case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check with signal() from sys/signal.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <signal.h>],[
- if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
- if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
- dnl the original did use test -n `$CC testprogram.c`
- [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
-then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
-then VAR="no, suppressed, signal.h," ; fi ; fi],
- [VAR="no, suppressed, signal.h"])
- rm config.tmp
- ;;
-esac
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
dnl the only difference - the LANG selection... and the default FLAGS
-AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
+AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CXX
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
-in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
- "-Wall % -Wstrict-prototypes" dnl try to warn atleast
- #
+in "-pedantic % -Wall" dnl GCC
+ "-xstrconst % -v" dnl Solaris C
+ "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
+ "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+ "-ansi -ansiE % -fullwarn" dnl IRIX
+ "+ESlit % +w1" dnl HP-UX C
+ "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
+ "-h conform % -h msglevel 2" dnl Cray C (Unicos)
+ #
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check with signal() from sys/signal.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <signal.h>],[
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+dnl implementation tactics:
+dnl the for-argument contains a list of options. The first part of
+dnl these does only exist to detect the compiler - usually it is
+dnl a global option to enable -ansi or -extrawarnings. All other
+dnl compilers will fail about it. That was needed since a lot of
+dnl compilers will give false positives for some option-syntax
+dnl like -Woption or -Xoption as they think of it is a pass-through
+dnl to later compile stages or something. The "%" is used as a
+dnl delimimiter. A non-option comment can be given after "%%" marks.
+
+
+dnl ______ /usr/share/aclocal/guidod/ax_cflags_strict_prototypes.m4 ______
+dnl @synopsis AX_CFLAGS_STRICT_PROTOTYPES [(shellvar [,default, [A/NA]]
+dnl
+dnl Try to find a compiler option that requires strict prototypes.
+dnl
+dnl The sanity check is done by looking at sys/signal.h which has a set
+dnl of macro-definitions SIG_DFL and SIG_IGN that are cast to the local
+dnl signal-handler type. If that signal-handler type is not fully
+dnl qualified then the system headers are not seen as strictly prototype clean.
+dnl
+dnl For the GNU CC compiler it will be -fstrict-prototypes -Wstrict-prototypes
+dnl The result is added to the shellvar being CFLAGS by default.
+dnl
+dnl DEFAULTS:
+dnl
+dnl - $1 shell-variable-to-add-to : CFLAGS
+dnl - $2 add-value-if-not-found : nothing
+dnl - $3 action-if-found : add value to shellvariable
+dnl - $4 action-if-not-found : nothing
+dnl
+dnl @version %Id: ax_cflags_strict_prototypes.m4,v 1.7 2003/06/05 00:52:22 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
+dnl
+AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
+ "-Wall % -Wstrict-prototypes" dnl try to warn atleast
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+case ".$VAR" in
+ .|.no|.no,*) ;;
+ *) # sanity check with signal() from sys/signal.h
+ cp config.log config.tmp
+ AC_TRY_COMPILE([#include <signal.h>],[
if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
dnl the original did use test -n `$CC testprogram.c`
AS_VAR_POPDEF([FLAGS])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ac_set_default_paths_system.m4 ______
-dnl @synopsis AC_SET_DEFAULT_PATHS_SYSTEM
-dnl
-dnl the most interesting changes go about windows-targets - where the
-dnl default_prefix is set to /programs, and quite some directories
-dnl are aliased: sbindir := libdir := bindir and the docprefix-defaults
-dnl are also a bit different, even on FHS2-compliant systems where the
-dnl mandir is going to $prefix/man only if prefix=/usr, otherwise they
-dnl shall go to $datadir/man. We use an extra docprefix to express it
-dnl which is either defined as being prefix or datadir. not SUBSTed here.
-dnl
-dnl @, (very useful)
-dnl @version %Id: ac_set_default_paths_system.m4,v 1.5 2003/02/02 19:32:30 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
-AC_DEFUN([AC_SET_DEFAULT_PATHS_SYSTEM],
-[AC_REQUIRE([AC_CANONICAL_HOST]) # --------------------------------------------
-case "$prefix:$ac_default_prefix" in
- NONE:/usr/local)
- result=""
- AC_MSG_CHECKING(default prefix path)
- case "${target_os}" in
- *cygwin* | *mingw* | *uwin* | *djgpp | *emx* )
- if test "${host_os}" = "${target_os}" ; then
- ac_default_prefix="/programs"
- result="(win/dos target)"
- else
- case "$PATH" in
- *:/usr/local/cross-tools/$target_alias/bin:*)
- ac_default_prefix="/usr/local/cross-tools/$target_alias" ;;
- *:/usr/local/$target_alias/bin:*)
- ac_default_prefix="/usr/local/$target_alias" ;;
- *:/usr/local/$target_cpu-$target_os/bin:*)
- ac_default_prefix="/usr/local/$target_cpu-$target_os" ;;
- *)
- ac_default_prefix="/programs" ;;
- esac
- result="(win/dos cross-compiler)"
- fi
- ;;
- esac
- AC_MSG_RESULT($ac_default_prefix $result)
+dnl the only difference - the LANG selection... and the default FLAGS
+
+AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_CXX
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
+ "-Wall % -Wstrict-prototypes" dnl try to warn atleast
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+case ".$VAR" in
+ .|.no|.no,*) ;;
+ *) # sanity check with signal() from sys/signal.h
+ cp config.log config.tmp
+ AC_TRY_COMPILE([#include <signal.h>],[
+ if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
+ if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
+ dnl the original did use test -n `$CC testprogram.c`
+ [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
+then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
+then VAR="no, suppressed, signal.h," ; fi ; fi],
+ [VAR="no, suppressed, signal.h"])
+ rm config.tmp
;;
esac
-AC_MSG_CHECKING(default prefix system)
-result="$prefix" ; test "$result" = "NONE" && result="$ac_default_prefix"
-case ${result} in
- /programs | /programs/*) result="is win-/programs"
- # on win/dos, .exe .dll and .cfg live in the same directory
- libdir=`echo $libdir |sed -e 's:^..exec_prefix./lib$:${bindir}:'`
- sbindir=`echo $sbindir |sed -e 's:^..exec_prefix./sbin$:${libdir}:'`
- sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:${sbindir}:'`
- libexecdir=`echo $libexecdir |sed -e 's:/libexec$:/system:'`
- # help-files shall be set with --infodir, docprefix is datadir
- docprefix="${datadir}"
- mandir=`echo $mandir \
- |sed -e 's:^..prefix./man$:${datadir}/info:'`
- includedir=`echo $includedir \
- |sed -e 's:^..prefix./include$:${datadir}/include:'`
- # other state files (but /etc) are moved to datadir
- sharedstatedir=`echo $sharedstatedir \
- |sed -e 's:^..prefix./com$:${datadir}/default:'`
- localstatedir=`echo $localstatedir \
- |sed -e 's:^..prefix./var$:${datadir}/current:'`
- ;;
- /usr) result="is /usr-shipped"
- # doc files are left at prefix
- docprefix="${prefix}"
- # state files go under /top
- sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:/etc:'`
- sharedstatedir=`echo $sharedstatedir \
- |sed -e 's:^..prefix./com$:/etc/default:'`
- # $prefix/var is going to end up in /var/lib
- localstatedir=`echo $localstatedir \
- |sed -e 's:^..prefix./var$:/var/lib:'`
- ;;
- /opt | /opt/*) result="is /opt-package"
- # state files go under /top/prefix
- sysconfdir=`echo $sysconfdir \
- |sed -e 's:^..prefix./etc$:/etc${prefix}:'`
- sharedstatedir=`echo $sharedstatedir \
- |sed -e 's:^..prefix./com$:/etc/default${prefix}:'`
- # $prefix/var is going to to be /var$prefix... once again
- localstatedir=`echo $localstatedir \
- |sed -e 's:^..prefix./var$:/var${prefix}:'`
- # doc files are left at prefix
- docprefix="${prefix}"
- ;;
- *) result="is /local-package"
- # doc files are moved from prefix down to datadir
- docprefix="${datadir}"
- mandir=`echo $mandir \
- |sed -e 's:^..prefix./man$:${datadir}/man:'`
- infodir=`echo $infodir \
- |sed -e 's:^..prefix./infodir$:${datadir}/info:'`
- # never use $prefix/com - that is no good idea
- sharedstatedir=`echo $sharedstatedir \
- |sed -e 's:^..prefix./com$:${sysconfdir}/default:'`
- ;;
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
esac
-AC_MSG_RESULT($result)
-# --------------------------------------------------------
-])
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
-dnl ______ /usr/share/aclocal/guidod/ax_enable_builddir.m4 ______
-dnl @synopsis AX_ENABLE_BUILDDIR [(dirstring-or-command [,Makefile.mk [,-all]])]
-dnl
-dnl if the current configure was run within the srcdir then
-dnl we move all configure-files into a subdir and let the configure
-dnl steps continue there. We provide an option --disable-builddir
-dnl to suppress the move into a separate builddir.
+dnl ______ /usr/share/aclocal/guidod/ax_spec_package_version.m4 ______
+dnl @* AX_SPEC_PACKAGE_AND_VERSION ([specfile])
+dnl @* AX_SPEC_PACKAGE_NAME ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_VERSION ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_SUMMARY ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_LICENSE ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_CATEGORY ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_PACKAGE_ICON ([shellvar],[defaultvalue])
+dnl @* AX_SPEC_DEFAULTS([specfile])
dnl
-dnl Defaults:
+dnl set PACKAGE from the given specfile - default to basename of
+dnl the rpmspecfile if no "name:" could be found in the spec file.
dnl
-dnl $1 = $host (overridden with $HOST)
-dnl $2 = Makefile.mk
-dnl $3 = -all
+dnl set VERSION from the given specfile - default to a date-derived
+dnl value if no "version:" could be found in the spec file.
dnl
-dnl This macro must be called before AM_INIT_AUTOMAKE.
+dnl this macro builds on top of AX_SPEC_FILE / AX_SPEC_EXTRACT
dnl
-dnl it creates a default toplevel srcdir Makefile from the information found
-dnl in the created toplevel builddir Makefile. It just copies the variables
-dnl and rule-targets, each extended with a default rule-execution that
-dnl recurses into the build directory of the current "HOST". You can override
-dnl the auto-dection through `config.guess` and build-time of course, as in
+dnl more specific: if not "name:" or "%define name" was found in
+dnl the myproject.spec file then the PACKAGE var is set to the
+dnl basename "myproject". When no spec file was present then it
+dnl will usually default to "TODO".
dnl
-dnl make HOST=i386-mingw-cross
+dnl The version spec looks for "version:" or "%define version" in
+dnl the spec file. When no such value was seen or no spec file
+dnl had been present then the value is set to `date +0.%y.%W%w`.
dnl
-dnl which can of course set at configure time as well using
+dnl the version value itself is sanitized somewhat with making
+dnl it to always carry atleast three digits (1.2.3) and clensing
+dnl superflous "0" chars around from generating numbers elsewhere.
dnl
-dnl configure --host=i386-mingw-cross
+dnl additional macros are provided that extract a specific value
+dnl from the spec file, among these:
dnl
-dnl After the default has been created, additional rules can be
-dnl appended that will not just recurse into the subdirectories and
-dnl only ever exist in the srcdir toplevel makefile - these parts
-dnl are read from the $2 = Makefile.mk file
+dnl set PACKAGE_SUMMARY from the given specfile - default to package and
+dnl try to detect a type suffix if "summary:" was not in the spec file
dnl
-dnl The automatic rules are usually scanning the toplevel Makefile for
-dnl lines like '#### $host |$builddir' to recognize the place where to
-dnl recurse into. Usually, the last one is the only one used. However,
-dnl almost all targets have an additional "*-all" rule which makes the
-dnl script to recurse into _all_ variants of the current HOST (!!)
-dnl setting. The "-all" suffix can be overriden for the macro as well.
+dnl set PACKAGE_LICENSE from the given specfile - if no "license:" tag was
+dnl given in the spec file then various COPYING files are grepped to
+dnl have a guess and the final fallback will be GNU GPL (or GNU LGPL).
dnl
-dnl a special rule is only given for things like "dist" that will
-dnl copy the tarball from the builddir to the sourcedir (or $(PUB))
-dnl for reason of convenience.
+dnl set PACKAGE_ICON from the given specfile - if no "icon:" tag was
+dnl given in the spec file then we default to $PACKAGE-icon.png
dnl
-dnl @author Guido Draheim
-dnl @version %Id: ax_enable_builddir.m4,v 1.13 2003/10/12 06:27:40 guidod Exp %
+dnl the final AX_SPEC_INIT(specfile) will initialize all variables to
+dnl its defaults according to the spec file given.
dnl
-AC_DEFUN([AX_ENABLE_BUILDDIR],[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
-AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
-AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl
-AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl
-AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
-SUB="."
-if test ".$ac_srcdir_defaulted" != ".no" ; then
- if test ".$srcdir" = ".." ; then
- AC_PATH_PROG(SED,gsed sed, sed)
- AC_ARG_ENABLE([builddir], AC_HELP_STRING(
- [--disable-builddir],[disable automatic build in subdir of sources])
- ,[SUB="$withval"], [SUB="."])
- test ".$SUB" = ".." && SUB=`$SED -V 2>&1 |$SED -e '/GNU/!d' -e 's/.*/yes/'`
- test ".$SUB" = "." && SUB="."
- test ".$SUB" = ".no" && SUB="."
- if test ".$SUB" != ".." ; then # we know where to go and
- if test ! -f config.status ; then # srcdir not yet configured
- test ".$HOST" = "." && HOST="$host"
- test ".$SUB" = ".yes" && SUB="m4_ifval([$1], [$1],[$HOST])"
- AS_MKDIR_P([$SUB])
- echo __.$SUB.__ > $SUB/conftest.tmp
- cd $SUB
- if grep __.$SUB.__ conftest.tmp >/dev/null 2>/dev/null ; then
- rm conftest.tmp
- AC_MSG_RESULT([continue configure in default builddir ./$SUB])
- else
- AC_MSG_ERROR([could not change to default builddir ./$SUB])
- fi
- srcdir=`echo "$SUB" |
- $SED -e 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,[[/]]$,,;'`
- AUX="$ac_aux_dir"
- test ".$ac_aux_dir" != "." && ac_aux_dir="$srcdir/$ac_aux_dir"
- test ".$ac_install_sh" != "." && ac_install_sh="$srcdir/$ac_install_sh"
- ac_config_guess="$SHELL $ac_aux_dir/config.guess"
- ac_config_sub="$SHELL $ac_aux_dir/config.sub"
- ac_configure="$SHELL $ac_aux_dir/configure" # Cygnus configure
+dnl @version %Id: ax_spec_package_version.m4,v 1.1 2003/10/18 23:38:41 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
- test -f $srcdir/config.log && mv $srcdir/config.log .
- test -f $srcdir/confdefs.h && mv $srcdir/confdefs.h .
- test -f $srcdir/conftest.log && mv $srcdir/conftest.log .
- test -f $srcdir/$cache_file && mv $srcdir/$cache_file .
- fi fi
- fi
-fi
-AS_VAR_POPDEF([SED])dnl
-AS_VAR_POPDEF([AUX])dnl
-AS_VAR_POPDEF([SUB])dnl
-AC_CONFIG_COMMANDS([buildir],[dnl .............. config.status ..............
-AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl
-AS_VAR_PUSHDEF([TOP],[top_srcdir])dnl
-AS_VAR_PUSHDEF([SRC],[ac_top_srcdir])dnl
-AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl
-AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
-pushdef([END],[Makefile.mk])dnl
-pushdef([_ALL],[ifelse([$3],,[-all],[$3])])dnl
- SUB=`grep "continue configure in default builddir " config.log |
- $SED -e "s/.*continue configure in default builddir //"`
- SRC="$ax_enable_builddir_srcdir"
- if test ".$SUB" = "." ; then
- if test -f "$TOP/Makefile" ; then
- AC_MSG_NOTICE([skipping TOP/Makefile - left untouched])
- else
- AC_MSG_NOTICE([skipping TOP/Makefile - not created])
- fi
- else
- if test -f "$SRC/Makefile" ; then
- a=`grep "^VERSION " "$SRC/Makefile"` ; b=`grep "^VERSION " Makefile`
- test "$a" != "$b" && rm "$SRC/Makefile"
- fi
- if test -f "$SRC/Makefile" ; then
- echo "$SRC/Makefile : $SRC/Makefile.in" > $tmp/conftemp.mk
- echo " []@ echo 'REMOVED,,,' >\$[]@" >> $tmp/conftemp.mk
- eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null"
- if grep '^REMOVED,,,' "$SRC/Makefile" >/dev/null
- then rm $SRC/Makefile ; fi
- cp $tmp/conftemp.mk $SRC/makefiles.mk~ ## DEBUGGING
- fi
- if test ! -f "$SRC/Makefile" ; then
- AC_MSG_NOTICE([create TOP/Makefile guessed from local Makefile])
- x='`' ; cat >$tmp/conftemp.sed <<_EOF
-/^\$/n
-x
-/^\$/bS
-x
-/\\\\\$/{H;d;}
-{H;s/.*//;x;}
-bM
-:S
-x
-/\\\\\$/{h;d;}
-{h;s/.*//;x;}
-:M
-s/\\(\\n\\) /\\1 /g
-/^ /d
-/^[[ ]]*[[\\#]]/d
-/^VPATH *=/d
-s/^srcdir *=.*/srcdir = ./
-s/^top_srcdir *=.*/top_srcdir = ./
-/[[:=]]/!d
-/^\\./d
-s/:.*/:/
-/:\$/s/ / /g
-/:\$/s/ \\([[a-z]][[a-z-]]*[[a-z]]\\) / \\1 \\1[]_ALL /g
-/:\$/s/^\\([[a-z]][[a-z-]]*[[a-z]]\\)\\([[ :]]\\)/\\1 \\1[]_ALL\\2/
-/:\$/s/ / /g
-/^all all[]_ALL[[ :]]/i\\
-all-configured : all[]_ALL
-dnl dist-all exists... and would make for dist-all-all
-/[]_ALL[]_ALL/d
-/^.*[[=]]/!a\\
- @ HOST="\$(HOST)\" \\\\\\
- ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
- ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
- ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
- ; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" = "0" ; then : \\\\\\
- ; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\
- ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
- ; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\
- ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
- ; (cd "\$\$i" && test ! -f configure && \$(MAKE) \$\$use) ; done
-dnl special rule add-on: "dist" copies the tarball to $(PUB). (source tree)
-/dist[]_ALL *:/a\\
- @ HOST="\$(HOST)\" \\\\\\
- ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
- ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
- ; found=$x echo \$\$BUILD | wc -w $x \\\\\\
- ; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\
- ; if test "\$\$found" = "0" ; then : \\\\\\
- ; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
- ; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
- ; test -f "\$\$i/\$(PACKAGE)-\$(VERSION).tar.gz" \\\\\\
- && mv "\$\$i/\$(PACKAGE)-\$(VERSION).tar.gz" \$(PUB). ; break ; done
-dnl special rule add-on: "distclean" removes all local builddirs completely
-/distclean[]_ALL *:/a\\
- @ HOST="\$(HOST)\" \\\\\\
- ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
- ; BUILD=$x grep "^#### .*| *\\./" Makefile | sed -e 's/.*|//' $x \\\\\\
- ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
- ; echo "MAKE \$\$HOST : \$\$n * \$\@ (all local builds)" \\\\\\
- ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
- ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
- ; echo "# rm -r \$\$i"; done ; echo "# (sleep 3)" ; sleep 3 \\\\\\
- ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
- ; echo "rm -r \$\$i"; (rm -r "\$\$i") ; done ; rm Makefile
-_EOF
- cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING
- $SED -f $tmp/conftemp.sed Makefile >$SRC/Makefile
- if test -f "$SRC/m4_ifval([$2],[$2],[END])" ; then
- AC_MSG_NOTICE([extend TOP/Makefile with TOP/m4_ifval([$2],[$2],[END])])
- cat $SRC/END >>$SRC/Makefile
- fi ; xxxx="####"
- echo "$xxxx CONFIGURATIONS FOR TOPLEVEL MAKEFILE: " >>$SRC/Makefile
- # sanity check
- if grep '^; echo "MAKE ' $SRC/Makefile >/dev/null ; then
- AC_MSG_NOTICE([buggy sed found - it deletes tab in "a" text parts])
- $SED -e '/^@ HOST=/s/^/ /' -e '/^; /s/^/ /' $SRC/Makefile \
- >$SRC/Makefile~
- (test -s $SRC/Makefile~ && mv $SRC/Makefile~ $SRC/Makefile) 2>/dev/null
+AC_DEFUN([AX_SPEC_PACKAGE_LICENSE],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_LICENSE])dnl
+ AC_MSG_CHECKING([for spec license type])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[license],m4_ifval($1,$1))
+ VAR=`echo $VAR | sed -e 's/ *License//g'`
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for LICENSE / COPYRIGHT
+ if test ".$VAR" = "." ; then
+ for ac_file in "$srcdir/COPYING" "$srcdir/COPYING" "$srcdir/LICENSE" ; do
+ test -f "$ac_file" || continue
+dnl http://www.ibiblio.org/osrt/omf/omf_elements "16. Rights"
+ if grep "GNU LESSER GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null
+ then VAR="GNU LGPL" ; break
+ elif grep "GNU GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null
+ then VAR="GNU GPL" ; break
+ elif grep "MOZILLA PUBLIC LICENSE" "$ac_file" >/dev/null
+ then VAR="MPL" ; break
+ elif grep "Mozilla Public License" "$ac_file" >/dev/null
+ then VAR="MPL" ; break
+ elif grep -i "artistic license" "$ac_file" >/dev/null
+ then VAR="Artistic" ; break
+ elif grep -i "artistic control" "$ac_file" >/dev/null
+ then VAR="Artistic" ; break
+ elif grep -i "semblance of artistic" "$ac_file" >/dev/null
+ then VAR="Artistic" ; break
+ elif grep -i "above copyright notice" "$ac_file" >/dev/null
+ then VAR="BSD" ; break
fi
- else
- xxxx="\\#\\#\\#\\#"
- # echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed
- echo "s!^$xxxx [[^|]]* | *$SUB *\$!$xxxx ...... $SUB!" >$tmp/conftemp.sed
- $SED -f "$tmp/conftemp.sed" "$SRC/Makefile" >$tmp/mkfile.tmp
- cp "$tmp/conftemp.sed" "$SRC/makefiles.sed~" ## DEBUGGING
- cp "$tmp/mkfile.tmp" "$SRC/makefiles.out~" ## DEBUGGING
- if cmp -s "$SRC/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then
- AC_MSG_NOTICE([keeping TOP/Makefile from earlier configure])
- rm "$tmp/mkfile.tmp"
- else
- AC_MSG_NOTICE([reusing TOP/Makefile from earlier configure])
- mv "$tmp/mkfile.tmp" "$SRC/Makefile"
+ done
+ if test ".$VAR" = "." ; then
+ if test "$srcdir/COPYING.LIB" ; then VAR="GNU LGPL"
+ elif test ".$ltmain" != "." ; then VAR="GNU LGPL"
+ else VAR="GNU GPL"
fi
fi
- AC_MSG_NOTICE([build in $SUB (HOST=$ax_enable_builddir_host)])
- xxxx="####"
- echo "$xxxx" "$ax_enable_builddir_host" "|$SUB" >>$SRC/Makefile
fi
-popdef([END])dnl
-AS_VAR_POPDEF([SED])dnl
-AS_VAR_POPDEF([AUX])dnl
-AS_VAR_POPDEF([SRC])dnl
-AS_VAR_POPDEF([TOP])dnl
-AS_VAR_POPDEF([SUB])dnl
-],[dnl
-ax_enable_builddir_srcdir="$srcdir" # $srcdir
-ax_enable_builddir_host="$HOST" # $HOST / $host
-ax_enable_builddir_version="$VERSION" # $VERSION
-ax_enable_builddir_package="$PACKAGE" # $PACKAGE
-ax_enable_builddir_auxdir="$ax_enable_builddir_auxdir" # $AUX
-ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED
-ax_enable_builddir="$ax_enable_builddir" # $SUB
-])dnl
+ ],[test ".$VAR" = "." && VAR="$2"])
+ test "$VAR" = "GPL" && VAR="GNU GPL"
+ test "$VAR" = "LGPL" && VAR="GNU LGPL"
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ax_not_enable_frame_pointer.m4 ______
-dnl @* AX_NOT_ENABLE_FRAME_POINTER ([shellvar])
-dnl
-dnl add --enable-frame-pointer option, the default will add the gcc
-dnl --fomit-frame-pointer option to the shellvar (per default CFLAGS)
-dnl and remove the " -g " debuginfo option from it. In other words,
-dnl the default is "--disable-frame-pointer"
-dnl
-dnl @: guidod@gmx.de
-dnl @%Id: %
+AC_DEFUN([AX_SPEC_PACKAGE_SUMMARY],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_SUMMARY])dnl
+ AC_MSG_CHECKING([for spec summary])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[summary],m4_ifval($1,$1))
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for SUMMARY
+ if test ".$VAR" = "." ; then VAR="$PACKAGE"
+ test ".$VAR" = "." && VAR="foo"
+ test ".$ltmain" != "." && VAR="$VAR library"
+ fi
+ ],[test ".$VAR" = "." && VAR="$2"])
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
+])
-AC_DEFUN([AX_NOT_ENABLE_FRAME_POINTER],[dnl
-AS_VAR_PUSHDEF([VAR],[enable_frame_pointer])dnl
-AC_MSG_CHECKING([m4_ifval($1,$1,CFLAGS) frame-pointer])
-AC_ARG_ENABLE([frame-pointer], AC_HELP_STRING(
- [--enable-frame-pointer],[enable callframe generation for debugging]))
-case ".$VAR" in
- .|.no|.no,*) test ".$VAR" = "." && VAR="no"
- m4_ifval($1,$1,CFLAGS)=`echo dnl
- " $m4_ifval($1,$1,CFLAGS) " | sed -e 's/ -g / /'`
- if test ".$GCC" = ".yes" ; then
- m4_ifval($1,$1,CFLAGS)="$m4_ifval($1,$1,CFLAGS) -fomit-frame-pointer"
- AC_MSG_RESULT([$VAR, -fomit-frame-pointer added])
- else
- AC_MSG_RESULT([$VAR, -g removed])
- fi ;;
- *) AC_MSG_RESULT([$VAR, kept]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
+AC_DEFUN([AX_SPEC_PACKAGE_ICON],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_ICON])dnl
+ AC_MSG_CHECKING([for spec icon])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[icon],m4_ifval($1,$1))
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for ICON
+ if test ".$VAR" = "." ; then VAR="$PACKAGE-icon.png" ; fi
+ ],[test ".$VAR" = "." && VAR="$2"])
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ax_warning_default_pkgconfig.m4 ______
-dnl @* AX_WARNING_DEFAULT_PKGCONFIGDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])]
-dnl @* AX_ENABLE_DEFAULT_PKGCONFIGDIR [(dirvariable [,defsetting])]
+AC_DEFUN([AX_SPEC_PACKAGE_CATEGORY],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_CATEGORY])dnl
+ AC_MSG_CHECKING([for spec category])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[group],m4_ifval($1,$1))
+ VAR=`echo $VAR | sed -e 's/ /-/g'`
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for CATEGORY
+ if test ".$VAR" = "." ; then if test ".$ltmain" != "."
+ then VAR="Development/Library"
+ else VAR="Development/Other"
+ fi fi
+ ],[test ".$VAR" = "." && VAR="$2"])
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
+])
+
+AC_DEFUN([AX_SPEC_PACKAGE_NAME],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_NAME])dnl
+ AC_MSG_CHECKING([for spec package])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[name],m4_ifval($1,$1))
+ VAR=`echo $VAR | sed -e 's/ /-/g'`
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for PACKAGE
+ test ".$VAR" = "." && VAR=`basename $ax_spec_file .spec`
+ test ".$VAR" = ".README" && VAR="TODO"
+ test ".$VAR" = ".TODO" && VAR="foo"
+ ],[test ".$VAR" = "." && VAR="$2"])
+ test "VAR" = "PACKAGE_NAME" && test ".$PACKAGE" = "." && PACKAGE="$VAR"
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
+])
+
+AC_DEFUN([AX_SPEC_PACKAGE_VERSION_],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ AS_VAR_PUSHDEF([VAR],[PACKAGE_VERSION])dnl
+ AC_MSG_CHECKING([for spec version])
+ if test ".$VAR" = "." ; then if test ! -f $ax_spec_file
+ then k="(w/o spec)"
+ else k=""
+ AX_SPEC_EXTRACT(VAR,[version],m4_ifval($1,$1))
+ VAR=`echo $VAR | sed -e 's/ /-/g'`
+ fi fi
+ test ".$VAR" = "." && k="(fallback)"
+ ifelse($2,,[dnl here the defaults for VERSION
+ test ".$VAR" = "." && VAR=`date +0.%y.%W%w`
+ ],[test ".$VAR" = "." && VAR="$2"])
+ test "VAR" = "PACKAGE_VERSION" && test ".$VERSION" = "." && VERSION="$VAR"
+ case "$VAR" in # note we set traditional VERSION before cleaning things up
+ *.*.) VAR="$VAR"`date +%W%w` ;;
+ *.*.*) ;;
+ *.) VAR="$VAR"`date +%y.%W%w` ;;
+ *.*) VAR="$VAR.0" ;;
+ *) VAR=AS_TR_SH([$VAR]) ; VAR="$VAR.`date +%y.%W%w`" ;;
+ esac
+ VAR=`echo $VAR | sed -e "s/[[.]][0]\\([0-9]\\)/.\\1/g"`
+ AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k])
+ AS_VAR_POPDEF([VAR])dnl
+])
+
+dnl for compatibility, we define ax_spec_package_version
+dnl to do all of ax_spec_package_name as well.
+AC_DEFUN([AX_SPEC_PACKAGE_VERSION],[AC_REQUIRE([AX_SPEC_FILE])dnl
+ ifelse($1,,
+ AC_MSG_WARN([please use ax_spec_package_AND_version now!]),
+ AC_MSG_ERROR([please use ax_spec_package_AND_version now!]))
+ AX_SPEC_PACKAGE_NAME
+ AX_SPEC_PACKAGE_VERSION_
+
+])
+
+AC_DEFUN([AX_SPEC_PACKAGE_AND_VERSION],[
+ m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)])
+ AX_SPEC_PACKAGE_NAME
+ AX_SPEC_PACKAGE_VERSION_
+])
+
+AC_DEFUN([AX_SPEC_DEFAULTS],[
+ m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)])
+ AX_SPEC_PACKAGE_NAME
+ AX_SPEC_PACKAGE_VERSION_
+ AX_SPEC_PACKAGE_LICENSE
+ AX_SPEC_PACKAGE_SUMMARY
+ AX_SPEC_PACKAGE_CATEGORY
+ AX_SPEC_PACKAGE_ICON
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_set_version_info.m4 ______
+dnl AX_SET_VERSION_INFO [(VERSION [,PREFIX])] -*- m4 -*-
+dnl default $1 = $PACKAGE_VERSION
+dnl default $2 = <none>
+dnl
+dnl This macro is the successor of AC_SET_RELEASEINFO_VERSIONINFO but
+dnl it can be used in parallel because it uses all different variables.
dnl
-dnl print a warning message if the $(datadir)/aclocal directory
-dnl is not in the dirlist searched by the aclocal tool. This macro
-dnl is useful if some `make install` would target $(datadir)/aclocal
-dnl to install an autoconf m4 file of your project to be picked up
-dnl by other projects.
+dnl check the $VERSION number and cut the two last digit-sequences off
+dnl which will form a -version-info in a @VERSION_INFO@ ac_subst while
+dnl the rest is going to the -release name in a @RELEASE_INFO@ ac_subst.
dnl
-dnl default $1 dirvariable = pkgconfigdir
-dnl default $2 defsetting = ${libdir}/pkgconfig
-dnl default $3 action = nothing to do
-dnl default $4 action = warn the user about mismatch
+dnl you should keep these two seperate - the release-name may contain
+dnl alpha-characters and can be modified later with extra release-hints
+dnl e.g. RELEASE_INFO="$RELEASE_INFO-debug" for a debug version
+dnl of your lib. The $VERSION_INFO however should not be touched.
dnl
-dnl In the _WARNING_ variant, the defsetting is not placed in
-dnl dirvariable nor is it ac_subst'ed in any way. The default
-dnl fail-action $4 is to send a warning message to the user,
-dnl and the default accept-action $3 is nothing. It is expected that
-dnl a Makefile is generated with pkgconfigdir=${libdir}/pkgconfig
+dnl example: a VERSION="2.4.18" will be transformed into
+dnl RELEASE_INFO = -release 2
+dnl VERSION_INFO = -versioninfo 4:18
+dnl then use these two variables and push them to your libtool linker
+dnl libtest_la_LIBADD = @RELEASE_INFO@ @VERSION_INFO@
+dnl and for a linux-target this will tell libtool to install the lib as
+dnl libmy.so libmy.la libmy.a libmy-2.so.4 libmy-2.so.4.0.18
+dnl and executables will get link-resolve-infos for libmy-2.so.4 - therefore
+dnl the patch-level is ignored during ldso linking, and ldso will use the
+dnl one with the highest patchlevel. Using just "-release $(VERSION)"
+dnl during libtool-linking would not do that - omitting the -version-info
+dnl will libtool install libmy.so libmy.la libmy.a libmy-2.4.18.so and
+dnl executables would get hardlinked with the 2.4.18 version of your lib.
dnl
-dnl The _ENABLE_ variant however will set not only the $pkgconfigdir shell
-dnl var of the script, but it is also AC-SUBST'ed on default - and
-dnl furthermore a configure option "--enable-default-pkgconfigdir" is
-dnl provided. Only if that option is set then $2 default is not set to
-dnl the canonic default in the a $prefix subpath but instead $2 default
-dnl is set to the primary path where `pkg-config` looks for .pc files. The
-dnl user may also override the default on the command line.
+dnl This background does also explain the default dll name for a win32
+dnl target : libtool will choose to make up libmy-2-4.dll for this
+dnl version spec.
+dnl
+dnl this macro does also set the usual three parts of a version spec
+dnl $MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION but does not ac_subst
+dnl for the plain AX_SET_VERSION_INFO macro. Use instead one of the numbered
+dnl macros AX_SET_VERSION_INFO1 (use first number for release part) or
+dnl that AX_SET_VERSION_INFO2 (use the first two numbers for release part).
dnl
-dnl @: guidod@gmx.de
-dnl @%Id: ax_warning_default_pkgconfig.m4,v 1.1 2003/10/18 02:57:13 guidod Exp %
+dnl You may add sublevel parts like "1.4.2-ac5" where the sublevel is
+dnl just killed from these version/release substvars. That allows to grab
+dnl the version off a .spec file like with AX_SPEC_PACKAGE_VERSION where
+dnl the $VERSION is used to name a tarball or distpack like mylib-2.2.9pre4
+dnl
+dnl Unlike earlier macros, you can use this one to break up different
+dnl VERSIONs and put them into different variables, just hint with
+dnl PREFIX-setting - i.e. _VERSION(2.4.5,TEST) will set variables named
+dnl TEST_MAJOR_VERSION=2... and of course $TEST_RELEASE_INFO etc.
+dnl (for the moment, it needs to be a literal prefix *sigh*)
+dnl
+dnl @version %Id: ax_set_version_info.m4,v 1.1 2003/07/02 23:41:42 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
-AC_DEFUN([AX_WARNING_DEFAULT_PKGCONFIGDIR],[dnl
-AC_REQUIRE([AX_EXPAND_PREFIX])dnl
-AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_dir])dnl
-AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
-AS_VAR_PUSHDEF([LOC],[ax_warning_default_pkgconfig_loc])dnl
-LOC='m4_if([$2],,[${libdir}/pkgconfig],[$2])'
-m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"])
- if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
- AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
- fi
- if test "$PKG_CONFIG" = "no"
- then DIR="/" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
- else BIN=`AS_DIRNAME(["$DIR"])` ;
- if test -d "$BIN/lib/pkgconfig" ; then
- DIR="$BIN/lib/pkgconfig"
- else BIN=`AS_DIRNAME(["$DIR"])`
- if test -d "$BIN/lib/pkgconfig" ; then
- DIR="$BIN/lib/pkgconfig"
- else
- if test -d "/usr/lib/pkgconfig" ; then
- DIR="/usr/lib/pkgconfig"
- else
- DIR="/"
- fi fi fi
- fi
-AC_RUN_LOG([: last pkgconfig dir is assumed as "$DIR"])
-DIR=`eval "echo $DIR"`
-DIR=`eval "echo $DIR"`
-LOC=`eval "echo $LOC"`
-LOC=`eval "echo $LOC"`
-LOC=`eval "echo $LOC"`
-LOC=`eval "echo $LOC"`
-for DIR in `echo "$PKG_CONFIG_PATH:$DIR" | sed -e 's,:, ,g'` ; do
- AC_RUN_LOG([: test ".$LOC" = ".$DIR"])
- test ".$LOC" = ".$DIR" && break
-done
-if test "$LOC" != "$DIR" ; then
- m4_ifval([$4],[$4],[dnl
- AC_MSG_NOTICE([warning: m4_if([$1],,[pkgconfigdir],[$1])=$LOC dnl
-(see config.log)])
- AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR])
- cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
- pkgconfigdir: the m4_if([$1],,[default pkgconfigdir],[$1 value]) of $LOC
- pkgconfigdir: is not listed in the dirlist where pkg-config will look for
- pkgconfigdir: package-configs - you can override the install-path using
- pkgconfigdir: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR
- pkgconfigdir: or set/append the directory to the environment variable
- pkgconfigdir: PKG_CONFIG_PATH="$LOC"
-EOF
- m4_ifvaln([$5],[$5])])dnl
- m4_ifvaln([$3],[else $3])dnl
-fi
-AS_VAR_POPDEF([LOC])dnl
-AS_VAR_POPDEF([BIN])dnl
-AS_VAR_POPDEF([DIR])dnl
+AC_DEFUN([AX_SET_VERSION_INFO1],[dnl
+AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
+AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
+AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
+AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
+test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
+AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
+ifelse($1,,$PACKAGE_VERSION,$1) )
+ MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
+ MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
+ MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
+ MICRO="$MINOR"
+ MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
+ MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
+ PATCH="$MICRO"
+ MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
+ PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
+ if test "_$MICRO" = "_" ; then MICRO="0" ; fi
+ if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
+ MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
+ LTREL="-release $MAJOR"
+ LTVER="-version-info $MINOR:$MICRO"
+AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
+AC_SUBST(MAJOR)
+AC_SUBST(MINOR)
+AC_SUBST(MICRO)
+AC_SUBST(PATCH)
+AC_SUBST(LTREL)
+AC_SUBST(LTVER)
+AS_VAR_POPDEF([LTVER])dnl
+AS_VAR_POPDEF([LTREL])dnl
+AS_VAR_POPDEF([PATCH])dnl
+AS_VAR_POPDEF([MICRO])dnl
+AS_VAR_POPDEF([MINOR])dnl
+AS_VAR_POPDEF([MAJOR])dnl
])
-AC_DEFUN([AX_ENABLE_DEFAULT_PKGCONFIGDIR],[dnl
-AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
-AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_def])dnl
-AS_VAR_PUSHDEF([DEF],[ax_warning_default_pkgconfig_def])dnl
-AC_ARG_ENABLE([enable-default-pkgconfigdir],
-[ --enable-default-pkgconfigdir(=PATH) override the libdir/pkgconfig default])
-test ".$enable_default_pkgconfigdir" = "." && enable_default_pkgconfigdir="no"
-case ".$enable_default_pkgconfigdir" in
- .no) DIR='m4_if([$2],,[${libdir}/pkgconfig],[$2])' ;;
- .yes) # autodetect
- if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
- AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
- fi
- if test "$PKG_CONFIG" = "no"
- then DIR="/tmp" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
- else BIN=`AS_DIRNAME(["$DIR"])` ;
- if test -d "$BIN/lib/pkgconfig" ; then
- DIR="$BIN/lib/pkgconfig"
- else BIN=`AS_DIRNAME(["$DIR"])`
- if test -d "$BIN/lib/pkgconfig" ; then
- DIR="$BIN/lib/pkgconfig"
- else
- if test -d "/usr/lib/pkgconfig" ; then
- DIR="/usr/lib/pkgconfig"
- else
- DIR="/tmp"
- fi fi fi
- fi ;;
- *) DIR="$enable_default_pkgconfigdir" ;;
-esac
-AX_WARNING_DEFAULT_PKGCONFIGDIR([$1],[$DEF],[$3],[$4],[$5])
-m4_if([$1],,[pkgconfigdir],[$1])="$ax_warning_default_pkgconfig_dir"
-AC_SUBST(m4_if([$1],,[pkgconfigdir],[$1]))
-AS_VAR_POPDEF([DEF])dnl
-AS_VAR_POPDEF([DIR])dnl
-AS_VAR_POPDEF([BIN])dnl
+AC_DEFUN([AX_SET_VERSION_INFO2],[dnl
+AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
+AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
+AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
+AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
+test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
+AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
+ifelse($1,,$PACKAGE_VERSION,$1) )
+ MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
+ MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
+ MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
+ MICRO="$MINOR"
+ MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
+ MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
+ PATCH="$MICRO"
+ MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
+ PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
+ test "_$MICRO" != "_" || MICRO="0"
+ if test "_$MINOR" != "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
+ MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
+ LTREL="-release $MAJOR.$MINOR"
+ LTVER="-version-info 0:$MICRO"
+AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
+AC_SUBST(MAJOR)
+AC_SUBST(MINOR)
+AC_SUBST(MICRO)
+AC_SUBST(PATCH)
+AC_SUBST(LTREL)
+AC_SUBST(LTVER)
+AS_VAR_POPDEF([LTVER])dnl
+AS_VAR_POPDEF([LTREL])dnl
+AS_VAR_POPDEF([PATCH])dnl
+AS_VAR_POPDEF([MICRO])dnl
+AS_VAR_POPDEF([MINOR])dnl
+AS_VAR_POPDEF([MAJOR])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ac_sys_largefile_sensitive.m4 ______
-dnl @synopsis AC_SYS_LARGEFILE_SENSITIVE
+AC_DEFUN([AX_SET_VERSION_INFO],[dnl
+AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
+AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
+AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
+AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
+test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
+AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
+ifelse($1,,$PACKAGE_VERSION,$1) )
+ MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
+ MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
+ MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
+ MICRO="$MINOR"
+ MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
+ MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
+ PATCH="$MICRO"
+ MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
+ PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'`
+ if test "_$MICRO" = "_" ; then MICRO="0" ; fi
+ if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
+ MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
+ LTREL="-release $MAJOR"
+ LTVER="-version-info $MINOR:$MICRO"
+AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
+AC_SUBST(LTREL)
+AC_SUBST(LTVER)
+AS_VAR_POPDEF([LTVER])dnl
+AS_VAR_POPDEF([LTREL])dnl
+AS_VAR_POPDEF([PATCH])dnl
+AS_VAR_POPDEF([MICRO])dnl
+AS_VAR_POPDEF([MINOR])dnl
+AS_VAR_POPDEF([MAJOR])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_enable_builddir.m4 ______
+dnl @synopsis AX_ENABLE_BUILDDIR [(dirstring-or-command [,Makefile.mk [,-all]])]
dnl
-dnl checker whether the current system is sensitive to -Ddefines
-dnl making off_t having different types/sizes. Automatically define
-dnl a config.h symbol LARGEFILE_SENSITIVE if that is the case,
-dnl otherwise leave everything as is.
+dnl if the current configure was run within the srcdir then
+dnl we move all configure-files into a subdir and let the configure
+dnl steps continue there. We provide an option --disable-builddir
+dnl to suppress the move into a separate builddir.
dnl
-dnl This macro builds on top of AC_SYS_LARGEFILE to detect whether
-dnl special options are neede to make the code use 64bit off_t - in
-dnl many setups this will also make the code use 64bit off_t immediatly.
+dnl Defaults:
dnl
-dnl The common use of a LARGEFILE_SENSITIVE config.h-define is to rename
-dnl exported functions, usually adding a 64 to the original function name.
-dnl Such renamings are only needed on systems being both (a) 32bit off_t
-dnl by default and (b) implementing large.file extensions (as for unix98).
+dnl $1 = $host (overridden with $HOST)
+dnl $2 = Makefile.mk
+dnl $3 = -all
dnl
-dnl a renaming section could look like this:
-dnl #if defined LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 == 64
-dnl #define zzip_open zzip_open64
-dnl #define zzip_seek zzip_seek64
-dnl #endif
+dnl This macro must be called before AM_INIT_AUTOMAKE.
dnl
-dnl for libraries, it is best to take advantage of the prefix-config.h
-dnl macro, otherwise you want to export a renamed LARGEFILE_SENSITIVE
-dnl in an installed header file. -> see AX_PREFIX_CONFIG_H
+dnl it creates a default toplevel srcdir Makefile from the information found
+dnl in the created toplevel builddir Makefile. It just copies the variables
+dnl and rule-targets, each extended with a default rule-execution that
+dnl recurses into the build directory of the current "HOST". You can override
+dnl the auto-dection through `config.guess` and build-time of course, as in
dnl
-dnl @, System Headers
-dnl @Author Guido Draheim <guidod@gmx.de>
-dnl @Version %Id: ac_sys_largefile_sensitive.m4,v 1.2 2003/05/13 18:46:22 guidod Exp %
-
-AC_DEFUN([AC_SYS_LARGEFILE_SENSITIVE],[dnl
-AC_REQUIRE([AC_SYS_LARGEFILE])dnl
-# we know about some internals of ac_sys_largefile here...
-AC_MSG_CHECKING(whether system differentiates 64bit off_t by defines)
-ac_cv_sys_largefile_sensitive="no"
-if test ".$ac_cv_sys_file_offset_bits$ac_cv_sys_large_files" != ".nono"
-then ac_cv_sys_largefile_sensitive="yes"
- AC_DEFINE(LARGEFILE_SENSITIVE, 1,
- [whether the system defaults to 32bit off_t but can do 64bit when requested])
-fi
-AC_MSG_RESULT([$ac_cv_sys_largefile_sensitive])
-])
-
-dnl ______ /usr/share/aclocal/guidod/ax_warning_default_aclocaldir.m4 ______
-dnl @* AX_WARNING_DEFAULT_ACLOCALDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])]
-dnl @* AX_ENABLE_DEFAULT_ACLOCALDIR [(dirvariable [,defsetting])]
+dnl make HOST=i386-mingw-cross
dnl
-dnl print a warning message if the $(datadir)/aclocal directory
-dnl is not in the dirlist searched by the aclocal tool. This macro
-dnl is useful if some `make install` would target $(datadir)/aclocal
-dnl to install an autoconf m4 file of your project to be picked up
-dnl by other projects.
+dnl which can of course set at configure time as well using
dnl
-dnl default $1 dirvariable = aclocaldir
-dnl default $2 defsetting = ${datadir}/aclocal
-dnl default $3 action = nothing to do
-dnl default $4 action = warn the user about mismatch
+dnl configure --host=i386-mingw-cross
dnl
-dnl In the _WARNING_ variant, the defsetting is not placed in
-dnl dirvariable nor is it ac_subst'ed in any way. The default
-dnl fail-action $4 is to send a warning message to the user,
-dnl and the default accept-action $3 is nothing. It is expected that
-dnl a Makefile is generated with aclocaldir=${datadir}/aclocal
+dnl After the default has been created, additional rules can be
+dnl appended that will not just recurse into the subdirectories and
+dnl only ever exist in the srcdir toplevel makefile - these parts
+dnl are read from the $2 = Makefile.mk file
dnl
-dnl The _ENABLE_ variant however will set not only the $aclocaldir shell
+dnl The automatic rules are usually scanning the toplevel Makefile for
+dnl lines like '#### $host |$builddir' to recognize the place where to
+dnl recurse into. Usually, the last one is the only one used. However,
+dnl almost all targets have an additional "*-all" rule which makes the
+dnl script to recurse into _all_ variants of the current HOST (!!)
+dnl setting. The "-all" suffix can be overriden for the macro as well.
+dnl
+dnl a special rule is only given for things like "dist" that will
+dnl copy the tarball from the builddir to the sourcedir (or $(PUB))
+dnl for reason of convenience.
+dnl
+dnl @author Guido Draheim
+dnl @version %Id: ax_enable_builddir.m4,v 1.13 2003/10/12 06:27:40 guidod Exp %
+dnl
+AC_DEFUN([AX_ENABLE_BUILDDIR],[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl
+AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl
+AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
+SUB="."
+if test ".$ac_srcdir_defaulted" != ".no" ; then
+ if test ".$srcdir" = ".." ; then
+ AC_PATH_PROG(SED,gsed sed, sed)
+ AC_ARG_ENABLE([builddir], AC_HELP_STRING(
+ [--disable-builddir],[disable automatic build in subdir of sources])
+ ,[SUB="$withval"], [SUB="."])
+ test ".$SUB" = ".." && SUB=`$SED -V 2>&1 |$SED -e '/GNU/!d' -e 's/.*/yes/'`
+ test ".$SUB" = "." && SUB="."
+ test ".$SUB" = ".no" && SUB="."
+ if test ".$SUB" != ".." ; then # we know where to go and
+ if test ! -f config.status ; then # srcdir not yet configured
+ test ".$HOST" = "." && HOST="$host"
+ test ".$SUB" = ".yes" && SUB="m4_ifval([$1], [$1],[$HOST])"
+ AS_MKDIR_P([$SUB])
+ echo __.$SUB.__ > $SUB/conftest.tmp
+ cd $SUB
+ if grep __.$SUB.__ conftest.tmp >/dev/null 2>/dev/null ; then
+ rm conftest.tmp
+ AC_MSG_RESULT([continue configure in default builddir ./$SUB])
+ else
+ AC_MSG_ERROR([could not change to default builddir ./$SUB])
+ fi
+ srcdir=`echo "$SUB" |
+ $SED -e 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,[[/]]$,,;'`
+ AUX="$ac_aux_dir"
+ test ".$ac_aux_dir" != "." && ac_aux_dir="$srcdir/$ac_aux_dir"
+ test ".$ac_install_sh" != "." && ac_install_sh="$srcdir/$ac_install_sh"
+ ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ ac_configure="$SHELL $ac_aux_dir/configure" # Cygnus configure
+
+ test -f $srcdir/config.log && mv $srcdir/config.log .
+ test -f $srcdir/confdefs.h && mv $srcdir/confdefs.h .
+ test -f $srcdir/conftest.log && mv $srcdir/conftest.log .
+ test -f $srcdir/$cache_file && mv $srcdir/$cache_file .
+ fi fi
+ fi
+fi
+AS_VAR_POPDEF([SED])dnl
+AS_VAR_POPDEF([AUX])dnl
+AS_VAR_POPDEF([SUB])dnl
+AC_CONFIG_COMMANDS([buildir],[dnl .............. config.status ..............
+AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl
+AS_VAR_PUSHDEF([TOP],[top_srcdir])dnl
+AS_VAR_PUSHDEF([SRC],[ac_top_srcdir])dnl
+AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl
+AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
+pushdef([END],[Makefile.mk])dnl
+pushdef([_ALL],[ifelse([$3],,[-all],[$3])])dnl
+ SUB=`grep "continue configure in default builddir " config.log |
+ $SED -e "s/.*continue configure in default builddir //"`
+ SRC="$ax_enable_builddir_srcdir"
+ if test ".$SUB" = "." ; then
+ if test -f "$TOP/Makefile" ; then
+ AC_MSG_NOTICE([skipping TOP/Makefile - left untouched])
+ else
+ AC_MSG_NOTICE([skipping TOP/Makefile - not created])
+ fi
+ else
+ if test -f "$SRC/Makefile" ; then
+ a=`grep "^VERSION " "$SRC/Makefile"` ; b=`grep "^VERSION " Makefile`
+ test "$a" != "$b" && rm "$SRC/Makefile"
+ fi
+ if test -f "$SRC/Makefile" ; then
+ echo "$SRC/Makefile : $SRC/Makefile.in" > $tmp/conftemp.mk
+ echo " []@ echo 'REMOVED,,,' >\$[]@" >> $tmp/conftemp.mk
+ eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null"
+ if grep '^REMOVED,,,' "$SRC/Makefile" >/dev/null
+ then rm $SRC/Makefile ; fi
+ cp $tmp/conftemp.mk $SRC/makefiles.mk~ ## DEBUGGING
+ fi
+ if test ! -f "$SRC/Makefile" ; then
+ AC_MSG_NOTICE([create TOP/Makefile guessed from local Makefile])
+ x='`' ; cat >$tmp/conftemp.sed <<_EOF
+/^\$/n
+x
+/^\$/bS
+x
+/\\\\\$/{H;d;}
+{H;s/.*//;x;}
+bM
+:S
+x
+/\\\\\$/{h;d;}
+{h;s/.*//;x;}
+:M
+s/\\(\\n\\) /\\1 /g
+/^ /d
+/^[[ ]]*[[\\#]]/d
+/^VPATH *=/d
+s/^srcdir *=.*/srcdir = ./
+s/^top_srcdir *=.*/top_srcdir = ./
+/[[:=]]/!d
+/^\\./d
+s/:.*/:/
+/:\$/s/ / /g
+/:\$/s/ \\([[a-z]][[a-z-]]*[[a-z]]\\) / \\1 \\1[]_ALL /g
+/:\$/s/^\\([[a-z]][[a-z-]]*[[a-z]]\\)\\([[ :]]\\)/\\1 \\1[]_ALL\\2/
+/:\$/s/ / /g
+/^all all[]_ALL[[ :]]/i\\
+all-configured : all[]_ALL
+dnl dist-all exists... and would make for dist-all-all
+/[]_ALL[]_ALL/d
+/^.*[[=]]/!a\\
+ @ HOST="\$(HOST)\" \\\\\\
+ ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
+ ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
+ ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
+ ; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" = "0" ; then : \\\\\\
+ ; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\
+ ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
+ ; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\
+ ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
+ ; (cd "\$\$i" && test ! -f configure && \$(MAKE) \$\$use) ; done
+dnl special rule add-on: "dist" copies the tarball to $(PUB). (source tree)
+/dist[]_ALL *:/a\\
+ @ HOST="\$(HOST)\" \\\\\\
+ ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
+ ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
+ ; found=$x echo \$\$BUILD | wc -w $x \\\\\\
+ ; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\
+ ; if test "\$\$found" = "0" ; then : \\\\\\
+ ; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
+ ; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
+ ; test -f "\$\$i/\$(PACKAGE)-\$(VERSION).tar.gz" \\\\\\
+ && mv "\$\$i/\$(PACKAGE)-\$(VERSION).tar.gz" \$(PUB). ; break ; done
+dnl special rule add-on: "distclean" removes all local builddirs completely
+/distclean[]_ALL *:/a\\
+ @ HOST="\$(HOST)\" \\\\\\
+ ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
+ ; BUILD=$x grep "^#### .*| *\\./" Makefile | sed -e 's/.*|//' $x \\\\\\
+ ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
+ ; echo "MAKE \$\$HOST : \$\$n * \$\@ (all local builds)" \\\\\\
+ ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
+ ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
+ ; echo "# rm -r \$\$i"; done ; echo "# (sleep 3)" ; sleep 3 \\\\\\
+ ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
+ ; echo "rm -r \$\$i"; (rm -r "\$\$i") ; done ; rm Makefile
+_EOF
+ cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING
+ $SED -f $tmp/conftemp.sed Makefile >$SRC/Makefile
+ if test -f "$SRC/m4_ifval([$2],[$2],[END])" ; then
+ AC_MSG_NOTICE([extend TOP/Makefile with TOP/m4_ifval([$2],[$2],[END])])
+ cat $SRC/END >>$SRC/Makefile
+ fi ; xxxx="####"
+ echo "$xxxx CONFIGURATIONS FOR TOPLEVEL MAKEFILE: " >>$SRC/Makefile
+ # sanity check
+ if grep '^; echo "MAKE ' $SRC/Makefile >/dev/null ; then
+ AC_MSG_NOTICE([buggy sed found - it deletes tab in "a" text parts])
+ $SED -e '/^@ HOST=/s/^/ /' -e '/^; /s/^/ /' $SRC/Makefile \
+ >$SRC/Makefile~
+ (test -s $SRC/Makefile~ && mv $SRC/Makefile~ $SRC/Makefile) 2>/dev/null
+ fi
+ else
+ xxxx="\\#\\#\\#\\#"
+ # echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed
+ echo "s!^$xxxx [[^|]]* | *$SUB *\$!$xxxx ...... $SUB!" >$tmp/conftemp.sed
+ $SED -f "$tmp/conftemp.sed" "$SRC/Makefile" >$tmp/mkfile.tmp
+ cp "$tmp/conftemp.sed" "$SRC/makefiles.sed~" ## DEBUGGING
+ cp "$tmp/mkfile.tmp" "$SRC/makefiles.out~" ## DEBUGGING
+ if cmp -s "$SRC/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then
+ AC_MSG_NOTICE([keeping TOP/Makefile from earlier configure])
+ rm "$tmp/mkfile.tmp"
+ else
+ AC_MSG_NOTICE([reusing TOP/Makefile from earlier configure])
+ mv "$tmp/mkfile.tmp" "$SRC/Makefile"
+ fi
+ fi
+ AC_MSG_NOTICE([build in $SUB (HOST=$ax_enable_builddir_host)])
+ xxxx="####"
+ echo "$xxxx" "$ax_enable_builddir_host" "|$SUB" >>$SRC/Makefile
+ fi
+popdef([END])dnl
+AS_VAR_POPDEF([SED])dnl
+AS_VAR_POPDEF([AUX])dnl
+AS_VAR_POPDEF([SRC])dnl
+AS_VAR_POPDEF([TOP])dnl
+AS_VAR_POPDEF([SUB])dnl
+],[dnl
+ax_enable_builddir_srcdir="$srcdir" # $srcdir
+ax_enable_builddir_host="$HOST" # $HOST / $host
+ax_enable_builddir_version="$VERSION" # $VERSION
+ax_enable_builddir_package="$PACKAGE" # $PACKAGE
+ax_enable_builddir_auxdir="$ax_enable_builddir_auxdir" # $AUX
+ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED
+ax_enable_builddir="$ax_enable_builddir" # $SUB
+])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_warning_default_pkgconfig.m4 ______
+dnl @* AX_WARNING_DEFAULT_PKGCONFIGDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])]
+dnl @* AX_ENABLE_DEFAULT_PKGCONFIGDIR [(dirvariable [,defsetting])]
+dnl
+dnl print a warning message if the $(datadir)/aclocal directory
+dnl is not in the dirlist searched by the aclocal tool. This macro
+dnl is useful if some `make install` would target $(datadir)/aclocal
+dnl to install an autoconf m4 file of your project to be picked up
+dnl by other projects.
+dnl
+dnl default $1 dirvariable = pkgconfigdir
+dnl default $2 defsetting = ${libdir}/pkgconfig
+dnl default $3 action = nothing to do
+dnl default $4 action = warn the user about mismatch
+dnl
+dnl In the _WARNING_ variant, the defsetting is not placed in
+dnl dirvariable nor is it ac_subst'ed in any way. The default
+dnl fail-action $4 is to send a warning message to the user,
+dnl and the default accept-action $3 is nothing. It is expected that
+dnl a Makefile is generated with pkgconfigdir=${libdir}/pkgconfig
+dnl
+dnl The _ENABLE_ variant however will set not only the $pkgconfigdir shell
dnl var of the script, but it is also AC-SUBST'ed on default - and
-dnl furthermore a configure option "--enable-default-aclocaldir" is
+dnl furthermore a configure option "--enable-default-pkgconfigdir" is
dnl provided. Only if that option is set then $2 default is not set to
dnl the canonic default in the a $prefix subpath but instead $2 default
-dnl is set to the primary path where `aclocal` looks for macros. The
+dnl is set to the primary path where `pkg-config` looks for .pc files. The
dnl user may also override the default on the command line.
-dnl
+dnl
dnl @: guidod@gmx.de
-dnl @%Id: ax_warning_default_aclocaldir.m4,v 1.1 2003/10/18 02:57:12 guidod Exp %
+dnl @%Id: ax_warning_default_pkgconfig.m4,v 1.1 2003/10/18 02:57:13 guidod Exp %
-AC_DEFUN([AX_WARNING_DEFAULT_ACLOCALDIR],[dnl
+AC_DEFUN([AX_WARNING_DEFAULT_PKGCONFIGDIR],[dnl
AC_REQUIRE([AX_EXPAND_PREFIX])dnl
-AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_dir])dnl
-AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl
-AS_VAR_PUSHDEF([LOC],[ax_warning_default_aclocal_loc])dnl
-LOC='m4_if([$2],,[${datadir}/aclocal],[$2])'
+AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_dir])dnl
+AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
+AS_VAR_PUSHDEF([LOC],[ax_warning_default_pkgconfig_loc])dnl
+LOC='m4_if([$2],,[${libdir}/pkgconfig],[$2])'
m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"])
- if test ".$ACLOCAL" = "." ; then
- AC_PATH_PROG([ACLOCAL],[aclocal],[:])
+ if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
+ AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
fi
- BIN="$ACLOCAL"
- test ".$BIN" = "." && BIN="aclocal"
- DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"`
- test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal"
- test ".$DIR" = "." && DIR="/tmp"
-DIR=`eval "echo $DIR"` # we need to expand
+ if test "$PKG_CONFIG" = "no"
+ then DIR="/" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
+ else BIN=`AS_DIRNAME(["$DIR"])` ;
+ if test -d "$BIN/lib/pkgconfig" ; then
+ DIR="$BIN/lib/pkgconfig"
+ else BIN=`AS_DIRNAME(["$DIR"])`
+ if test -d "$BIN/lib/pkgconfig" ; then
+ DIR="$BIN/lib/pkgconfig"
+ else
+ if test -d "/usr/lib/pkgconfig" ; then
+ DIR="/usr/lib/pkgconfig"
+ else
+ DIR="/"
+ fi fi fi
+ fi
+AC_RUN_LOG([: last pkgconfig dir is assumed as "$DIR"])
+DIR=`eval "echo $DIR"`
DIR=`eval "echo $DIR"`
LOC=`eval "echo $LOC"`
LOC=`eval "echo $LOC"`
LOC=`eval "echo $LOC"`
LOC=`eval "echo $LOC"`
-AC_RUN_LOG([: test "$LOC" = "$DIR"])
-if test "$LOC" != "$DIR" ; then
- if test -f "$DIR/dirlist" ; then
- for DIR in `cat $DIR/dirlist` $DIR ; do
- AC_RUN_LOG([: test "$LOC" = "$DIR"])
- test "$LOC" = "$DIR" && break
- done
- fi
- if test "$LOC" != "$DIR" ; then
- m4_ifval([$4],[$4],[dnl
- AC_MSG_NOTICE([warning: m4_if([$1],,[aclocaldir],[$1])=$LOC dnl
+for DIR in `echo "$PKG_CONFIG_PATH:$DIR" | sed -e 's,:, ,g'` ; do
+ AC_RUN_LOG([: test ".$LOC" = ".$DIR"])
+ test ".$LOC" = ".$DIR" && break
+done
+if test "$LOC" != "$DIR" ; then
+ m4_ifval([$4],[$4],[dnl
+ AC_MSG_NOTICE([warning: m4_if([$1],,[pkgconfigdir],[$1])=$LOC dnl
(see config.log)])
- AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[aclocaldir],[$1])=$DIR])
+ AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR])
cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
- aclocaldir: the m4_if([$1],,[default aclocaldir],[$1 value]) of $LOC
- aclocaldir: is not listed in the dirlist where aclocal will look
- aclocaldir: for macros - you can override the install-path using
- aclocaldir: make install aclocaldir=$DIR
- aclocaldir: or append the directory to aclocal reconfigures later as
- aclocaldir: aclocal -I $LOC
- aclocaldir: when an autoconf macro is needed from that directory
+ pkgconfigdir: the m4_if([$1],,[default pkgconfigdir],[$1 value]) of $LOC
+ pkgconfigdir: is not listed in the dirlist where pkg-config will look for
+ pkgconfigdir: package-configs - you can override the install-path using
+ pkgconfigdir: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR
+ pkgconfigdir: or set/append the directory to the environment variable
+ pkgconfigdir: PKG_CONFIG_PATH="$LOC"
EOF
m4_ifvaln([$5],[$5])])dnl
m4_ifvaln([$3],[else $3])dnl
- fi
fi
AS_VAR_POPDEF([LOC])dnl
AS_VAR_POPDEF([BIN])dnl
AS_VAR_POPDEF([DIR])dnl
])
-AC_DEFUN([AX_ENABLE_DEFAULT_ACLOCALDIR],[dnl
-AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl
-AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_def])dnl
-AS_VAR_PUSHDEF([DEF],[ax_warning_default_aclocal_def])dnl
-AC_ARG_ENABLE([enable-default-aclocaldir],
-[ --enable-default-aclocaldir(=PATH) override the datadir/aclocal default])
-test ".$enable_default_aclocaldir" = "." && enable_default_aclocaldir="no"
-case ".$enable_default_aclocaldir" in
- .no) DIR='m4_if([$2],,[${datadir}/aclocal],[$2])' ;;
+AC_DEFUN([AX_ENABLE_DEFAULT_PKGCONFIGDIR],[dnl
+AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
+AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_def])dnl
+AS_VAR_PUSHDEF([DEF],[ax_warning_default_pkgconfig_def])dnl
+AC_ARG_ENABLE([enable-default-pkgconfigdir],
+[ --enable-default-pkgconfigdir(=PATH) override the libdir/pkgconfig default])
+test ".$enable_default_pkgconfigdir" = "." && enable_default_pkgconfigdir="no"
+case ".$enable_default_pkgconfigdir" in
+ .no) DIR='m4_if([$2],,[${libdir}/pkgconfig],[$2])' ;;
.yes) # autodetect
- if test ".$ACLOCAL" = "." ; then
- AC_PATH_PROG([ACLOCAL],[aclocal],[:])
+ if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
+ AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
fi
- BIN="$ACLOCAL"
- test ".$BIN" = "." && BIN="aclocal"
- DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"`
- test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal"
- test ".$DIR" = "." && DIR="/tmp" ;;
- *) DIR="$enable_default_aclocaldir" ;;
+ if test "$PKG_CONFIG" = "no"
+ then DIR="/tmp" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
+ else BIN=`AS_DIRNAME(["$DIR"])` ;
+ if test -d "$BIN/lib/pkgconfig" ; then
+ DIR="$BIN/lib/pkgconfig"
+ else BIN=`AS_DIRNAME(["$DIR"])`
+ if test -d "$BIN/lib/pkgconfig" ; then
+ DIR="$BIN/lib/pkgconfig"
+ else
+ if test -d "/usr/lib/pkgconfig" ; then
+ DIR="/usr/lib/pkgconfig"
+ else
+ DIR="/tmp"
+ fi fi fi
+ fi ;;
+ *) DIR="$enable_default_pkgconfigdir" ;;
esac
-AX_WARNING_DEFAULT_ACLOCALDIR([$1],[$DEF],[$3],[$4],[$5])
-m4_if([$1],,[aclocaldir],[$1])="$ax_warning_default_aclocal_dir"
-AC_SUBST(m4_if([$1],,[aclocaldir],[$1]))
+AX_WARNING_DEFAULT_PKGCONFIGDIR([$1],[$DEF],[$3],[$4],[$5])
+m4_if([$1],,[pkgconfigdir],[$1])="$ax_warning_default_pkgconfig_dir"
+AC_SUBST(m4_if([$1],,[pkgconfigdir],[$1]))
AS_VAR_POPDEF([DEF])dnl
AS_VAR_POPDEF([DIR])dnl
AS_VAR_POPDEF([BIN])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ax_prefix_config_h.m4 ______
-dnl @synopsis AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]
+dnl ______ /usr/share/aclocal/Miscellaneous/ac_compile_check_sizeof.m4 ______
+dnl @synopsis AC_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]])
dnl
-dnl This is a new variant from ac_prefix_config_ this one will use a
-dnl lowercase-prefix if the config-define was starting with a
-dnl lowercase-char, e.g. "#define const", "#define restrict", or
-dnl "#define off_t", (and this one can live in another directory, e.g.
-dnl testpkg/config.h therefore I decided to move the output-header to
-dnl be the first arg)
+dnl This macro checks for the size of TYPE using compile checks, not
+dnl run checks. You can supply extra HEADERS to look into. the check
+dnl will cycle through 1 2 4 8 16 and any EXTRA_SIZES the user
+dnl supplies. If a match is found, it will #define SIZEOF_`TYPE' to
+dnl that value. Otherwise it will emit a configure time error
+dnl indicating the size of the type could not be determined.
dnl
-dnl takes the usual config.h generated header file; looks for each of
-dnl the generated "#define SOMEDEF" lines, and prefixes the defined name
-dnl (ie. makes it "#define PREFIX_SOMEDEF". The result is written to
-dnl the output config.header file. The PREFIX is converted to uppercase
-dnl for the conversions.
+dnl The trick is that C will not allow duplicate case labels. While
+dnl this is valid C code:
dnl
-dnl Defaults:
+dnl switch (0) case 0: case 1:;
dnl
-dnl OUTPUT-HEADER = $PACKAGE-config.h
-dnl PREFIX = $PACKAGE
-dnl ORIG-HEADER, from AM_CONFIG_HEADER(config.h)
+dnl The following is not:
dnl
-dnl Your configure.ac script should contain both macros in this order,
-dnl and unlike the earlier variations of this prefix-macro it is okay to
-dnl place the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invokation.
+dnl switch (0) case 0: case 0:;
dnl
-dnl Example:
+dnl Thus, the AC_TRY_COMPILE will fail if the currently tried size
+dnl does not match.
dnl
-dnl AC_INIT(config.h.in) # config.h.in as created by "autoheader"
-dnl AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE
-dnl AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in
-dnl AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it..
-dnl AC_MEMORY_H # makes "#undef NEED_MEMORY_H"
-dnl AC_C_CONST_H # makes "#undef const"
-dnl AC_OUTPUT(Makefile) # creates the "config.h" now
-dnl # and also mylib/_config.h
+dnl Here is an example skeleton configure.in script, demonstrating the
+dnl macro's usage:
dnl
-dnl if the argument to AX_PREFIX_CONFIG_H would have been omitted then the
-dnl default outputfile would have been called simply "testpkg-config.h", but
-dnl even under the name "mylib/_config.h" it contains prefix-defines like
+dnl AC_PROG_CC
+dnl AC_CHECK_HEADERS(stddef.h unistd.h)
+dnl AC_TYPE_SIZE_T
+dnl AC_CHECK_TYPE(ssize_t, int)
dnl
-dnl #ifndef TESTPKG_VERSION
-dnl #define TESTPKG_VERSION "0.1.1"
-dnl #endif
-dnl #ifndef TESTPKG_NEED_MEMORY_H
-dnl #define TESTPKG_NEED_MEMORY_H 1
-dnl #endif
-dnl #ifndef _testpkg_const
-dnl #define _testpkg_const _const
-dnl #endif
+dnl headers='#ifdef HAVE_STDDEF_H
+dnl #include <stddef.h>
+dnl #endif
+dnl #ifdef HAVE_UNISTD_H
+dnl #include <unistd.h>
+dnl #endif
+dnl '
dnl
-dnl and this "mylib/_config.h" can be installed along with other
-dnl header-files, which is most convenient when creating a shared
-dnl library (that has some headers) where some functionality is
-dnl dependent on the OS-features detected at compile-time. No
-dnl need to invent some "mylib-confdefs.h.in" manually. :-)
+dnl AC_COMPILE_CHECK_SIZEOF(char)
+dnl AC_COMPILE_CHECK_SIZEOF(short)
+dnl AC_COMPILE_CHECK_SIZEOF(int)
+dnl AC_COMPILE_CHECK_SIZEOF(long)
+dnl AC_COMPILE_CHECK_SIZEOF(unsigned char *)
+dnl AC_COMPILE_CHECK_SIZEOF(void *)
+dnl AC_COMPILE_CHECK_SIZEOF(size_t, $headers)
+dnl AC_COMPILE_CHECK_SIZEOF(ssize_t, $headers)
+dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
+dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers)
dnl
-dnl Note that some AC_DEFINEs that end up in the config.h file are
-dnl actually self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the
-dnl AC_TYPE_OFF_T say that they "will define inline|const|off_t if the
-dnl system does not do it by itself". You might want to clean up about
-dnl these - consider an extra mylib/conf.h that reads something like:
+dnl @author Kaveh Ghazi <ghazi@caip.rutgers.edu>
+dnl @version %Id: ac_compile_check_sizeof.m4,v 1.1.1.1 2001/07/26 00:46:24 guidod Exp %
dnl
-dnl #include <mylib/_config.h>
-dnl #ifndef _testpkg_const
-dnl #define _testpkg_const const
-dnl #endif
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $1)
+AC_CACHE_VAL(AC_CV_NAME,
+[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
+ AC_TRY_COMPILE([#include "confdefs.h"
+#include <sys/types.h>
+$2
+], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
+ if test x$AC_CV_NAME != x ; then break; fi
+done
+])
+if test x$AC_CV_NAME = x ; then
+ AC_MSG_ERROR([cannot determine a size for $1])
+fi
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+dnl ______ /usr/share/aclocal/guidod/patch_libtool_to_add_host_cc.m4 ______
+dnl @* PATCH_LIBTOOL_TO_ADD_HOST_CC
dnl
-dnl and then start using _testpkg_const in the header files. That is
-dnl also a good thing to differentiate whether some library-user has
-dnl starting to take up with a different compiler, so perhaps it could
-dnl read something like this:
+dnl The libtool 1.4.x processing (and patched 1.3.5) uses a little
+dnl "impgen" tool to turn a "*.dll" into an import "*.lib" as it is
+dnl needed for win32 targets. However, this little tool is not shipped
+dnl by binutils, it is not even a command option of dlltool or dllwrap.
+dnl It happens to be a C source snippet implanted into the libtool
+dnl sources - it gets written to ".libs", compiled into a binary
+dnl on-the-fly, and executed right away on the "dll" file to create
+dnl the import-lib (dll.a files in gcc-speak).
dnl
-dnl #ifdef _MSC_VER
-dnl #include <mylib/_msvc.h>
-dnl #else
-dnl #include <mylib/_config.h>
-dnl #endif
-dnl #ifndef _testpkg_const
-dnl #define _testpkg_const const
-dnl #endif
+dnl This mode works fine for a native build within mingw or cygwin,
+dnl but it does not work in cross-compile mode since CC is a
+dnl crosscompiler - it will create an .exe file on a non-win32
+dnl system, and as a result an impgen.exe is created on-the-fly
+dnl that can not be executed on-the-fly. Luckily, the actual
+dnl libtool snippet uses HOST_CC to compile the sources which
+dnl has a fallback to CC when the HOST_CC variable was not set.
dnl
-dnl @version %Id: ax_prefix_config_h.m4,v 1.5 2003/07/02 23:29:23 guidod Exp %
-dnl @author Guiodo Draheim <guidod@gmx.de>
+dnl this ac-macro is trying to detect a valid HOST_CC which is not
+dnl a cross-compiler. This is done by looking into the $PATH for
+dnl a "cc" and the result is patched into libtool a HOST_CC, iow
+dnl it adds another configured variable at the top of the libtool
+dnl script.
dnl
-AC_DEFUN([AX_PREFIX_CONFIG_H],[AC_REQUIRE([AC_CONFIG_HEADER])
-AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
-AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
-AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
-AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
-AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
-AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
-AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
-m4_pushdef([_script],[conftest.prefix])dnl
-m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
-_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
-_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
-_PKG=`echo ifelse($2, , $PACKAGE, $2)`
-_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
-_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
-_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'`
-if test ".$_INP" = "."; then
- for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
- case "$ac_file" in
- *.h) _INP=$ac_file ;;
- *)
- esac
- test ".$_INP" != "." && break
- done
-fi
-if test ".$_INP" = "."; then
- case "$_OUT" in
- */*) _INP=`basename "$_OUT"`
- ;;
- *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
- ;;
- *) _INP=config.h
- ;;
- esac
-fi
-if test -z "$_PKG" ; then
- AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
-else
- if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
- _INP="$srcdir/$_INP"
- fi fi
- AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
- if test -f $_INP ; then
- echo "s/@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script
- echo "s/@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script
- echo "s/@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script
- echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script
- echo "@%:@endif/" >>_script
- echo "s/@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script
- echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script
- echo "@%:@endif/" >> _script
- # now executing _script on _DEF input to create _OUT output file
- echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
- echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
- echo ' ' >>$tmp/pconfig.h
- echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
+dnl In discussions on the libtool mailinglist it occurred that
+dnl later gcc/binutils generations are able to link with dlls
+dnl directly, i.e. there is no import-lib needed anymore. The
+dnl import-table is created within the linker itself (in-memory)
+dnl and bound to the .exe/.dll currently in the making. The
+dnl whole stuff of impgen exe and compiling it on-the-fly, well,
+dnl it is superflouos then.
+dnl
+dnl Since mingw crosscompilers tend to be quite a fresh development
+dnl it was agreed to remove the impgen stuff completly from
+dnl libtool sources. Still however, this macro does not hurt
+dnl since it does not patch impgen cmds but it just adds HOST_CC
+dnl which might be useful in other cross-compiling cases as well.
+dnl Therefore, you can leave it in for maximum compatibility and
+dnl portability.
+dnl
+dnl @= guidod@gmx.de
+dnl @%Id: patch_libtool_to_add_host_cc.m4,v 1.3 2003/03/23 13:20:27 guidod Exp %
- sed -f _script $_INP >>$tmp/pconfig.h
- echo ' ' >>$tmp/pconfig.h
- echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
- echo "@%:@endif" >>$tmp/pconfig.h
- if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
- AC_MSG_NOTICE([$_OUT is unchanged])
- else
- ac_dir=`AS_DIRNAME(["$_OUT"])`
- AS_MKDIR_P(["$ac_dir"])
- rm -f "$_OUT"
- mv $tmp/pconfig.h "$_OUT"
+AC_DEFUN([PATCH_LIBTOOL_TO_ADD_HOST_CC],
+[# patch libtool to add HOST_CC sometimes needed in crosscompiling a win32 dll
+if grep "HOST_CC" libtool >/dev/null; then
+ if test "$build" != "$host" ; then
+ if test "_$HOST_CC" = "_" ; then
+ HOST_CC="false"
+ for i in `echo $PATH | sed 's,:, ,g'` ; do
+ test -x $i/cc && HOST_CC=$i/cc
+ done
fi
- cp _script _configs.sed
- else
- AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
+AC_MSG_RESULT(patching libtool to add HOST_CC=$HOST_CC)
+ test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool)
+ sed -e "/BEGIN.*LIBTOOL.*CONFIG/a\\
+HOST_CC=$HOST_CC" libtool >libtool.new
+ (test -s libtool.new || rm libtool.new) 2>/dev/null
+ test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !!
+ test -f libtool || mv libtool.old libtool
fi
- rm -f conftest.*
fi
-m4_popdef([_symbol])dnl
-m4_popdef([_script])dnl
-AS_VAR_POPDEF([_INP])dnl
-AS_VAR_POPDEF([_UPP])dnl
-AS_VAR_POPDEF([_LOW])dnl
-AS_VAR_POPDEF([_PKG])dnl
-AS_VAR_POPDEF([_DEF])dnl
-AS_VAR_POPDEF([_OUT])dnl
-],[PACKAGE="$PACKAGE"])])
-
-dnl ______ /usr/share/aclocal/guidod/ax_cflags_no_writable_strings.m4 ______
-dnl @synopsis AX_CFLAGS_NO_WRITABLE_STRINGS [(shellvar [,default, [A/NA]])]
+])
+dnl ______ /usr/share/aclocal/guidod/patch_libtool_on_darwin_zsh_overquoting.m4 ______
+dnl @* PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING
dnl
-dnl Try to find a compiler option that makes all stringliteral readonly.
+dnl libtool 1.4.x has a bug on darwin where the "zsh" is installed
+dnl as the bourne shell replacement. Of course, the zsh is called in
+dnl a compatibility mode but there is a common problem with it,
+dnl probably a bug of zsh. Newer darwin systems have a "bash"
+dnl installed now, but the configure-default will be "zsh" in most
+dnl systems still.
dnl
-dnl The sanity check is done by looking at string.h which has a set
-dnl of strcpy definitions that should be defined with const-modifiers
-dnl to not emit a warning in all so many places.
+dnl The bug revelas itself as an overquoted statement in the
+dnl libtool cmds-spec for sharedlib creation on testing for
+dnl "module" builds. Later libtool has gone rid of it by simply
+dnl removing the quotes at that point . Here we maintain the
+dnl original style and simply remove the extra escape character,
+dnl i.e. we look for "archive_cmds" and replace a sequence of
+dnl triple-backslash-and-doublequote with single-backslash-and-doublequote.
+dnl
+dnl @= guidod@gmx.de
+dnl %Id: patch_libtool_on_darwin_zsh_overquoting.m4,v 1.4 2003/03/24 16:58:21 guidod Exp %
+
+AC_DEFUN([PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING],
+[# libtool-1.4 specific, on zsh target the final requoting does one too much
+case "$host_os" in
+ darwin*)
+ if grep "1.92" libtool >/dev/null ; then
+AC_MSG_RESULT(patching libtool on .so-sharedlib creation (zsh overquoting))
+ test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool)
+ sed -e '/archive_cmds=/s:[[\\]][[\\]][[\\]]*":\\":g' libtool >libtool.new
+ (test -s libtool.new || rm libtool.new) 2>/dev/null
+ test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !!
+ test -f libtool || mv libtool.old libtool
+ fi
+ ;;
+esac
+])
+dnl ______ /usr/share/aclocal/guidod/ac_sys_largefile_sensitive.m4 ______
+dnl @synopsis AC_SYS_LARGEFILE_SENSITIVE
dnl
-dnl For the GNU CC compiler it will be -fno-writable-strings -Wwrite-strings
-dnl The result is added to the shellvar being CFLAGS by default.
+dnl checker whether the current system is sensitive to -Ddefines
+dnl making off_t having different types/sizes. Automatically define
+dnl a config.h symbol LARGEFILE_SENSITIVE if that is the case,
+dnl otherwise leave everything as is.
dnl
-dnl DEFAULTS:
+dnl This macro builds on top of AC_SYS_LARGEFILE to detect whether
+dnl special options are neede to make the code use 64bit off_t - in
+dnl many setups this will also make the code use 64bit off_t immediatly.
dnl
-dnl - $1 shell-variable-to-add-to : CFLAGS
-dnl - $2 add-value-if-not-found : nothing
-dnl - $3 action-if-found : add value to shellvariable
-dnl - $4 action-if-not-found : nothing
+dnl The common use of a LARGEFILE_SENSITIVE config.h-define is to rename
+dnl exported functions, usually adding a 64 to the original function name.
+dnl Such renamings are only needed on systems being both (a) 32bit off_t
+dnl by default and (b) implementing large.file extensions (as for unix98).
dnl
-dnl @version %Id: ax_cflags_no_writable_strings.m4,v 1.6 2003/06/05 00:52:15 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
+dnl a renaming section could look like this:
+dnl #if defined LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 == 64
+dnl #define zzip_open zzip_open64
+dnl #define zzip_seek zzip_seek64
+dnl #endif
dnl
-AC_DEFUN([AX_CFLAGS_NO_WRITABLE_STRINGS],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_no_writable_strings])dnl
-AC_CACHE_CHECK([m4_ifval([$1],[$1],FLAGS) making strings readonly],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-# IRIX C compiler:
-# -use_readonly_const is the default for IRIX C,
-# puts them into .rodata, but they are copied later.
-# need to be "-G0 -rdatashared" for strictmode but
-# I am not sure what effect that has really. - guidod
-for ac_arg dnl
-in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC
- "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment
- "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment
- "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment
- "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
-case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check - testing strcpy() from string.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <string.h>],[
- char test[16];
- if (strcpy (test, "test")) return 1;],
- dnl the original did use test -n `$CC testprogram.c`
- [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
- then VAR="no, suppressed, string.h," ; fi],
- [VAR="no, suppressed, string.h"])
- rm config.tmp
- ;;
-esac
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
-
-dnl the only difference - the LANG selection... and the default FLAGS
+dnl for libraries, it is best to take advantage of the prefix-config.h
+dnl macro, otherwise you want to export a renamed LARGEFILE_SENSITIVE
+dnl in an installed header file. -> see AX_PREFIX_CONFIG_H
+dnl
+dnl @, System Headers
+dnl @Author Guido Draheim <guidod@gmx.de>
+dnl @Version %Id: ac_sys_largefile_sensitive.m4,v 1.2 2003/05/13 18:46:22 guidod Exp %
-AC_DEFUN([AX_CXXFLAGS_NO_WRITABLE_STRINGS],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_no_writable_strings])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) making strings readonly],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_CXX
- ac_save_[]FLAGS="$[]FLAGS"
-# IRIX C compiler:
-# -use_readonly_const is the default for IRIX C,
-# puts them into .rodata, but they are copied later.
-# need to be "-G0 -rdatashared" for strictmode but
-# I am not sure what effect that has really. - guidod
-for ac_arg dnl
-in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC
- "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment
- "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment
- "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment
- "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
-case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check - testing strcpy() from string.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <string.h>],[[
- char test[16];
- if (strcpy (test, "test")) return 1;]],
- dnl the original did use test -n `$CC testprogram.c`
- [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
- then VAR="no, suppressed, string.h," ; fi],
- [VAR="no, suppressed, string.h"])
- rm config.tmp
- ;;
-esac
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
+AC_DEFUN([AC_SYS_LARGEFILE_SENSITIVE],[dnl
+AC_REQUIRE([AC_SYS_LARGEFILE])dnl
+# we know about some internals of ac_sys_largefile here...
+AC_MSG_CHECKING(whether system differentiates 64bit off_t by defines)
+ac_cv_sys_largefile_sensitive="no"
+if test ".$ac_cv_sys_file_offset_bits$ac_cv_sys_large_files" != ".nono"
+then ac_cv_sys_largefile_sensitive="yes"
+ AC_DEFINE(LARGEFILE_SENSITIVE, 1,
+ [whether the system defaults to 32bit off_t but can do 64bit when requested])
+fi
+AC_MSG_RESULT([$ac_cv_sys_largefile_sensitive])
])
-dnl ______ /usr/share/aclocal/guidod/patch_libtool_on_darwin_zsh_overquoting.m4 ______
-dnl @* PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING
+dnl ______ /usr/share/aclocal/guidod/ax_maintainer_mode_auto_silent.m4 ______
+dnl @* AX_MAINTAINER_MODE_AUTO_SILENT
dnl
-dnl libtool 1.4.x has a bug on darwin where the "zsh" is installed
-dnl as the bourne shell replacement. Of course, the zsh is called in
-dnl a compatibility mode but there is a common problem with it,
-dnl probably a bug of zsh. Newer darwin systems have a "bash"
-dnl installed now, but the configure-default will be "zsh" in most
-dnl systems still.
+dnl Set autotools to error/sleep settings so that they are not run when
+dnl being errornously triggered. Likewise make libtool-silent when
+dnl libtool has been used.
dnl
-dnl The bug revelas itself as an overquoted statement in the
-dnl libtool cmds-spec for sharedlib creation on testing for
-dnl "module" builds. Later libtool has gone rid of it by simply
-dnl removing the quotes at that point . Here we maintain the
-dnl original style and simply remove the extra escape character,
-dnl i.e. we look for "archive_cmds" and replace a sequence of
-dnl triple-backslash-and-doublequote with single-backslash-and-doublequote.
-dnl
-dnl @= guidod@gmx.de
-dnl %Id: patch_libtool_on_darwin_zsh_overquoting.m4,v 1.4 2003/03/24 16:58:21 guidod Exp %
+dnl I am using the macro quite a lot since some automake versions had the
+dnl tendency to try to rerun some autotools on a mere make even when not
+dnl quite in --maintainer-mode. That is very annoying. Likewise, a user
+dnl who installs from source does not want to see doubled compiler messages.
+dnl
+dnl I did not put an AC-REQUIRE(MAINTAINER_MODE) in here - should I?
+dnl
+dnl @: guidod@gmx.de
+dnl @%Id: ax_maintainer_mode_auto_silent.m4,v 1.1 2003/10/19 00:12:45 guidod Exp %
-AC_DEFUN([PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING],
-[# libtool-1.4 specific, on zsh target the final requoting does one too much
-case "$host_os" in
- darwin*)
- if grep "1.92" libtool >/dev/null ; then
-AC_MSG_RESULT(patching libtool on .so-sharedlib creation (zsh overquoting))
- test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool)
- sed -e '/archive_cmds=/s:[[\\]][[\\]][[\\]]*":\\":g' libtool >libtool.new
- (test -s libtool.new || rm libtool.new) 2>/dev/null
- test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !!
- test -f libtool || mv libtool.old libtool
- fi
- ;;
-esac
+AC_DEFUN([AX_MAINTAINER_MODE_AUTO_SILENT],[dnl
+dnl ac_REQUIRE([am_MAINTAINER_MODE])dn
+AC_MSG_CHECKING(auto silent in maintainer mode)
+if test "$USE_MAINTAINER_MODE" = "no" ; then
+ test ".$TIMEOUT" = "." && TIMEOUT="9"
+ AUTOHEADER="sleep $TIMEOUT ; true || autoheader || skipped"
+ AUTOMAKE="sleep $TIMEOUT ; true || automake || skipped"
+ AUTOCONF="sleep $TIMEOUT ; true || autoconf || skipped"
+ if test ".$LIBTOOL" != "." ; then
+ LIBTOOL="$LIBTOOL --silent"
+ AC_MSG_RESULT([libtool-silent, auto-sleep-9])
+ else
+ AC_MSG_RESULT([auto-sleep-9])
+ fi
+else
+ AC_MSG_RESULT([no])
+fi
])
-dnl ______ ______
-dnl ______ /usr/share/aclocal/guidod/ax_set_version_info.m4 ______
-dnl AX_SET_VERSION_INFO [(VERSION [,PREFIX])] -*- m4 -*-
-dnl default $1 = $PACKAGE_VERSION
-dnl default $2 = <none>
-dnl
-dnl This macro is the successor of AC_SET_RELEASEINFO_VERSIONINFO but
-dnl it can be used in parallel because it uses all different variables.
+dnl ______ /usr/share/aclocal/guidod/ax_expand_prefix.m4 ______
+dnl @* AX_EXPAND_PREFIX
dnl
-dnl check the $VERSION number and cut the two last digit-sequences off
-dnl which will form a -version-info in a @VERSION_INFO@ ac_subst while
-dnl the rest is going to the -release name in a @RELEASE_INFO@ ac_subst.
+dnl when $prefix and $exec_prefix are still set to NONE then set them
+dnl to the usual default values - being based on $ac_default_prefix.
+dnl - this macro can be AC_REQUIREd by other macros that need to
+dnl compute values for installation directories. It has been observed
+dnl that it was done wrong over and over again, so this is a bit
+dnl more safe to do.
dnl
-dnl you should keep these two seperate - the release-name may contain
-dnl alpha-characters and can be modified later with extra release-hints
-dnl e.g. RELEASE_INFO="$RELEASE_INFO-debug" for a debug version
-dnl of your lib. The $VERSION_INFO however should not be touched.
+dnl remember - setting exec_prefix='${prefix}' needs you interpolate
+dnl directories multiple times, it is not sufficient to just say
+dnl MYVAR="${datadir}/putter" but you do have to run `eval` a few
+dnl times, sth. like MYVAR=`eval "echo \"$MYVAR\""` done atleast
+dnl two times.
+dnl
+dnl The implementation of this macro simply picks up the lines that
+dnl would be run at the start of AC_OUTPUT anyway to set the
+dnl prefix/exec_prefix defaults. Between AC_INIT and the first
+dnl command to AC_REQUIRE this macro you can set the two variables
+dnl to something explicit instead. Probably, any command to compute
+dnl installation directories should be run _after_ AM_INIT_AUTOMAKE
dnl
-dnl example: a VERSION="2.4.18" will be transformed into
-dnl RELEASE_INFO = -release 2
-dnl VERSION_INFO = -versioninfo 4:18
-dnl then use these two variables and push them to your libtool linker
-dnl libtest_la_LIBADD = @RELEASE_INFO@ @VERSION_INFO@
-dnl and for a linux-target this will tell libtool to install the lib as
-dnl libmy.so libmy.la libmy.a libmy-2.so.4 libmy-2.so.4.0.18
-dnl and executables will get link-resolve-infos for libmy-2.so.4 - therefore
-dnl the patch-level is ignored during ldso linking, and ldso will use the
-dnl one with the highest patchlevel. Using just "-release $(VERSION)"
-dnl during libtool-linking would not do that - omitting the -version-info
-dnl will libtool install libmy.so libmy.la libmy.a libmy-2.4.18.so and
-dnl executables would get hardlinked with the 2.4.18 version of your lib.
+dnl @: guidod@gmx.de
+dnl @%Id: ax_expand_prefix.m4,v 1.1 2003/10/19 00:05:18 guidod Exp %
+
+AC_DEFUN([AX_EXPAND_PREFIX],[dnl
+ # The prefix default can be set in configure.ac (otherwise it is /usr/local)
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ # Let make expand exec_prefix. Allows to override the makevar 'prefix' later
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+])
+
+dnl ______ /usr/share/aclocal/guidod/ax_create_pkgconfig_info.m4 ______
+dnl @* AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary]]])]
+dnl defaults:
+dnl $1 = $PACKAGE_NAME.pc
+dnl $2 = (empty)
+dnl $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac)
+dnl $4 = $PACKAGE_SUMMARY (or $1 Library)
+dnl $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac)
dnl
-dnl This background does also explain the default dll name for a win32
-dnl target : libtool will choose to make up libmy-2-4.dll for this
-dnl version spec.
+dnl PACKAGE_NAME defaults to $PACKAGE if not set.
+dnl PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set.
dnl
-dnl this macro does also set the usual three parts of a version spec
-dnl $MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION but does not ac_subst
-dnl for the plain AX_SET_VERSION_INFO macro. Use instead one of the numbered
-dnl macros AX_SET_VERSION_INFO1 (use first number for release part) or
-dnl that AX_SET_VERSION_INFO2 (use the first two numbers for release part).
-dnl
-dnl You may add sublevel parts like "1.4.2-ac5" where the sublevel is
-dnl just killed from these version/release substvars. That allows to grab
-dnl the version off a .spec file like with AX_SPEC_PACKAGE_VERSION where
-dnl the $VERSION is used to name a tarball or distpack like mylib-2.2.9pre4
+dnl the resulting file is called $PACKAGE.pc.in / $PACKAGE.pc
dnl
-dnl Unlike earlier macros, you can use this one to break up different
-dnl VERSIONs and put them into different variables, just hint with
-dnl PREFIX-setting - i.e. _VERSION(2.4.5,TEST) will set variables named
-dnl TEST_MAJOR_VERSION=2... and of course $TEST_RELEASE_INFO etc.
-dnl (for the moment, it needs to be a literal prefix *sigh*)
+dnl You will find this macro most useful in conjunction with ax_spec_defaults
+dnl that can read good initializers from the .spec file. In consequencd, most
+dnl of the generatable installable stuff can be made from information being
+dnl updated in a single place for the whole project.
dnl
-dnl @version %Id: ax_set_version_info.m4,v 1.1 2003/07/02 23:41:42 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
+dnl @%Id: ax_create_pkgconfig_info.m4,v 1.1 2003/10/19 00:08:51 guidod Exp %
-AC_DEFUN([AX_SET_VERSION_INFO1],[dnl
-AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
-AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
-AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
-AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
-test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
-AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
-ifelse($1,,$PACKAGE_VERSION,$1) )
- MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
- MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
- MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
- MICRO="$MINOR"
- MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
- MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
- PATCH="$MICRO"
- MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
- PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
- if test "_$MICRO" = "_" ; then MICRO="0" ; fi
- if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
- MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
- LTREL="-release $MAJOR"
- LTVER="-version-info $MINOR:$MICRO"
-AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
-AC_SUBST(MAJOR)
-AC_SUBST(MINOR)
-AC_SUBST(MICRO)
-AC_SUBST(PATCH)
-AC_SUBST(LTREL)
-AC_SUBST(LTVER)
-AS_VAR_POPDEF([LTVER])dnl
-AS_VAR_POPDEF([LTREL])dnl
-AS_VAR_POPDEF([PATCH])dnl
-AS_VAR_POPDEF([MICRO])dnl
-AS_VAR_POPDEF([MINOR])dnl
-AS_VAR_POPDEF([MAJOR])dnl
-])
+AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl
+AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl
+AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl
-AC_DEFUN([AX_SET_VERSION_INFO2],[dnl
-AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
-AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
-AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
-AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
-test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
-AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
-ifelse($1,,$PACKAGE_VERSION,$1) )
- MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
- MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
- MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
- MICRO="$MINOR"
- MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
- MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
- PATCH="$MICRO"
- MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
- PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
- test "_$MICRO" != "_" || MICRO="0"
- if test "_$MINOR" != "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
- MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
- LTREL="-release $MAJOR.$MINOR"
- LTVER="-version-info 0:$MICRO"
-AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
-AC_SUBST(MAJOR)
-AC_SUBST(MINOR)
-AC_SUBST(MICRO)
-AC_SUBST(PATCH)
-AC_SUBST(LTREL)
-AC_SUBST(LTVER)
-AS_VAR_POPDEF([LTVER])dnl
-AS_VAR_POPDEF([LTREL])dnl
-AS_VAR_POPDEF([PATCH])dnl
-AS_VAR_POPDEF([MICRO])dnl
-AS_VAR_POPDEF([MINOR])dnl
-AS_VAR_POPDEF([MAJOR])dnl
-])
+# we need the expanded forms...
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-AC_DEFUN([AX_SET_VERSION_INFO],[dnl
-AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
-AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
-AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
-AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
-AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
-test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
-AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
-ifelse($1,,$PACKAGE_VERSION,$1) )
- MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
- MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
- MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
- MICRO="$MINOR"
- MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
- MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
- PATCH="$MICRO"
- MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
- PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'`
- if test "_$MICRO" = "_" ; then MICRO="0" ; fi
- if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
- MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
- LTREL="-release $MAJOR"
- LTVER="-version-info $MINOR:$MICRO"
-AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
-AC_SUBST(LTREL)
-AC_SUBST(LTVER)
-AS_VAR_POPDEF([LTVER])dnl
-AS_VAR_POPDEF([LTREL])dnl
-AS_VAR_POPDEF([PATCH])dnl
-AS_VAR_POPDEF([MICRO])dnl
-AS_VAR_POPDEF([MINOR])dnl
-AS_VAR_POPDEF([MAJOR])dnl
+AC_MSG_CHECKING(our pkgconfig libname)
+test ".$PKGCONFIG_libname" != "." || \
+PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)"
+test ".$PKGCONFIG_libname" != "." || \
+PKGCONFIG_libname="$PACKAGE"
+PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
+PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
+AC_MSG_RESULT($PKGCONFIG_libname)
+
+AC_MSG_CHECKING(our pkgconfig version)
+test ".$PKGCONFIG_version" != "." || \
+PKGCONFIG_version="${PACKAGE_VERSION}"
+test ".$PKGCONFIG_version" != "." || \
+PKGCONFIG_version="$VERSION"
+PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
+PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
+AC_MSG_RESULT($PKGCONFIG_version)
+
+AC_MSG_CHECKING(our pkgconfig_libdir)
+test ".$pkgconfig_libdir" = "." && \
+pkgconfig_libdir='${libdir}/pkgconfig'
+PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"`
+PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
+PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
+AC_MSG_RESULT($pkgconfig_libdir)
+test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && (
+AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir))
+AC_SUBST([pkgconfig_libdir])
+
+AC_MSG_CHECKING(our pkgconfig_libfile)
+test ".$pkgconfig_libfile" != "." || \
+pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)"
+PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"`
+PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"`
+AC_MSG_RESULT($pkgconfig_libfile)
+test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && (
+AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile))
+AC_SUBST([pkgconfig_libfile])
+
+AC_MSG_CHECKING(our pkgconfig description)
+PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)"
+test ".$PKGCONFIG_description" != "." || \
+PKGCONFIG_description="$PKGCONFIG_libname Library"
+PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
+PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
+AC_MSG_RESULT($PKGCONFIG_description)
+
+AC_MSG_CHECKING(our pkgconfig requires)
+PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)"
+PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
+PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
+AC_MSG_RESULT($PKGCONFIG_requires)
+
+AC_MSG_CHECKING(our pkgconfig ext libs)
+PKGCONFIG_pkglibs="$PACKAGE_LIBS"
+test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname"
+PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)"
+PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"`
+PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"`
+AC_MSG_RESULT($PKGCONFIG_libs)
+
+AC_MSG_CHECKING(our pkgconfig cppflags)
+PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)"
+PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"`
+PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"`
+AC_MSG_RESULT($PKGCONFIG_cppflags)
+
+test ".$PKGCONFIG_generate" != "." || \
+PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)"
+PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"`
+PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"`
+test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && (
+AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate))
+
+if test ".$PKGCONFIG_src_libdir" = "." ; then
+PKGCONFIG_src_libdir=`pwd`
+PKGCONFIG_src_libdir=`AX_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")`
+test ! -d $PKGCONFIG_src_libdir/src || \
+PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src"
+case ".$objdir" in
+*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac
+AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir)
+fi
+
+if test ".$PKGCONFIG_src_headers" = "." ; then
+PKGCONFIG_src_headers=`pwd`
+v="$ac_top_srcdir" ;
+test ".$v" != "." || v="$ax_spec_dir"
+test ".$v" != "." || v="$srcdir"
+case "$v" in /*) PKG_CONFIG_src_headers="" ;; esac
+PKGCONFIG_src_headers=`AX_DIRNAME("$PKGCONFIG_src_headers/$v/x")`
+test ! -d $PKGCONFIG_src_headers/incl[]ude || \
+PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude"
+AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers)
+fi
+
+dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here...
+AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[
+pkgconfig_generate="$ax_create_pkgconfig_generate"
+if test ! -f "$pkgconfig_generate.in"
+then generate="true"
+elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null
+then generate="true"
+else generate="false";
+fi
+if $generate ; then
+AC_MSG_NOTICE(creating $pkgconfig_generate.in)
+cat > $pkgconfig_generate.in <<_EOF
+# generated by configure / remove this line to disable regeneration
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: @PACKAGE_DESCRIPTION@
+Version: @PACKAGE_VERSION@
+Requires: @PACKAGE_REQUIRES@
+Libs: -L\${libdir} @LIBS@
+Cflags: -I\${includedir} @CPPFLAGS@
+_EOF
+fi # DONE generate $pkgconfig_generate.in
+AC_MSG_NOTICE(creating $pkgconfig_generate)
+sed -e "s|@prefix@|${pkgconfig_prefix}|" \
+ -e "s|@exec_prefix@|${pkgconfig_execprefix}|" \
+ -e "s|@libdir@|${pkgconfig_libdir}|" \
+ -e "s|@includedir@|${pkgconfig_includedir}|" \
+ -e "s|@PACKAGE_NAME@|${pkgconfig_libname}|" \
+ -e "s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}|" \
+ -e "s|@PACKAGE_VERSION@|${pkgconfig_version}|" \
+ -e "s|@PACKAGE_REQUIRES@|${pkgconfig_requires}|" \
+ -e "s|@LIBS@|${pkgconfig_libs}|" \
+ -e "s|@CPPFLAGS@|${pkgconfig_cppflags}|" \
+ $pkgconfig_generate.in > $pkgconfig_generate
+if test ! -s $pkgconfig_generate ; then
+ AC_MSG_ERROR([$pkgconfig_generate is empty])
+fi # DONE generate $pkgconfig_generate
+pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'`
+AC_MSG_NOTICE(creating $pkgconfig_uninstalled)
+sed -e "s|@prefix@|${pkgconfig_prefix}|" \
+ -e "s|@exec_prefix@|${pkgconfig_execprefix}|" \
+ -e "s|@libdir@|${pkgconfig_src_libdir}|" \
+ -e "s|@includedir@|${pkgconfig_src_headers}|" \
+ -e "s|@PACKAGE_NAME@|${pkgconfig_libname}|" \
+ -e "s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}|" \
+ -e "s|@PACKAGE_VERSION@|${pkgconfig_version}|" \
+ -e "s|@PACKAGE_REQUIRES@|${pkgconfig_requires}|" \
+ -e "s|@LIBS@|${pkgconfig_libs}|" \
+ -e "s|@CPPFLAGS@|${pkgconfig_cppflags}|" \
+ $pkgconfig_generate.in > $pkgconfig_uninstalled
+if test ! -s $pkgconfig_uninstalled ; then
+ AC_MSG_ERROR([$pkgconfig_uninstalled is empty])
+fi # DONE generate $pkgconfig_uninstalled
+],[
+dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here...
+ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate"
+pkgconfig_prefix='$prefix'
+pkgconfig_execprefix='$exec_prefix'
+pkgconfig_libdir='$libdir'
+pkgconfig_includedir='$includedir'
+pkgconfig_libname='$ax_create_pkgconfig_libname'
+pkgconfig_description='$ax_create_pkgconfig_description'
+pkgconfig_version='$ax_create_pkgconfig_version'
+pkgconfig_requires='$ax_create_pkgconfig_requires'
+pkgconfig_libs='$ax_create_pkgconfig_libs'
+pkgconfig_cppflags='$ax_create_pkgconfig_cppflags'
+pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir'
+pkgconfig_src_headers='$ax_create_pkgconfig_src_headers'
+])dnl
+AS_VAR_POPDEF([PKGCONFIG_libdir])dnl
+AS_VAR_POPDEF([PKGCONFIG_libfile])dnl
+AS_VAR_POPDEF([PKGCONFIG_libname])dnl
+AS_VAR_POPDEF([PKGCONFIG_version])dnl
+AS_VAR_POPDEF([PKGCONFIG_description])dnl
+AS_VAR_POPDEF([PKGCONFIG_requires])dnl
+AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl
+AS_VAR_POPDEF([PKGCONFIG_libs])dnl
+AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl
+AS_VAR_POPDEF([PKGCONFIG_generate])dnl
+AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl
+AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ax_cflags_warn_all.m4 ______
-dnl @synopsis AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
+dnl ______ /usr/share/aclocal/guidod/ax_dirname.m4 ______
+dnl @* AX_DIRNAME(PATHNAME)
+dnl
+dnl Parts of the implementation have been taken from AS_DIRNAME from the
+dnl main autoconf package in generation 2.5x. However, we do only use
+dnl "sed" to cut out the dirname, and we do additionally clean up some
+dnl dir/.. parts in the resulting pattern.
+dnl
+dnl this macro may be used in autoconf 2.13 scripts as well.
+dnl
+dnl @%Id: ax_dirname.m4,v 1.1 2003/07/02 23:42:59 guidod Exp %
+
+AC_DEFUN([AX_DIRNAME],
+[echo X[]$1 |
+ sed ['s/\/[^\/:][^\/:]*\/..\//\//g
+ s/\/[^\/:][^\/:]*\/..\//\//g
+ s/\/[^\/:][^\/:]*\/..\//\//g
+ s/\/[^\/:][^\/:]*\/..\//\//g
+ /^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q']])
+
+dnl ______ /usr/share/aclocal/guidod/ax_prefix_config_h.m4 ______
+dnl @synopsis AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]
+dnl
+dnl This is a new variant from ac_prefix_config_ this one will use a
+dnl lowercase-prefix if the config-define was starting with a
+dnl lowercase-char, e.g. "#define const", "#define restrict", or
+dnl "#define off_t", (and this one can live in another directory, e.g.
+dnl testpkg/config.h therefore I decided to move the output-header to
+dnl be the first arg)
dnl
-dnl Try to find a compiler option that enables most reasonable warnings.
-dnl This macro is directly derived from VL_PROG_CC_WARNINGS which is
-dnl split up into two AX_CFLAGS_WARN_ALL and AX_CFLAGS_WARN_ALL_ANSI
+dnl takes the usual config.h generated header file; looks for each of
+dnl the generated "#define SOMEDEF" lines, and prefixes the defined name
+dnl (ie. makes it "#define PREFIX_SOMEDEF". The result is written to
+dnl the output config.header file. The PREFIX is converted to uppercase
+dnl for the conversions.
dnl
-dnl For the GNU CC compiler it will be -Wall (and -ansi -pedantic)
-dnl The result is added to the shellvar being CFLAGS by default.
+dnl Defaults:
dnl
-dnl Currently this macro knows about GCC, Solaris C compiler,
-dnl Digital Unix C compiler, C for AIX Compiler, HP-UX C compiler,
-dnl IRIX C compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90
-dnl (Unicos 10.0.0.8) C compiler.
+dnl OUTPUT-HEADER = $PACKAGE-config.h
+dnl PREFIX = $PACKAGE
+dnl ORIG-HEADER, from AM_CONFIG_HEADER(config.h)
dnl
-dnl - $1 shell-variable-to-add-to : CFLAGS
-dnl - $2 add-value-if-not-found : nothing
-dnl - $3 action-if-found : add value to shellvariable
-dnl - $4 action-if-not-found : nothing
+dnl Your configure.ac script should contain both macros in this order,
+dnl and unlike the earlier variations of this prefix-macro it is okay to
+dnl place the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invokation.
dnl
-dnl @version %Id: ax_cflags_warn_all.m4,v 1.2 2003/10/12 14:56:07 guidod Exp %
-dnl @author Guido Draheim <guidod@gmx.de>
+dnl Example:
dnl
-AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic % -Wall" dnl GCC
- "-xstrconst % -v" dnl Solaris C
- "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
- "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
- "-ansi -ansiE % -fullwarn" dnl IRIX
- "+ESlit % +w1" dnl HP-UX C
- "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
- "-h conform % -h msglevel 2" dnl Cray C (Unicos)
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
-
-dnl the only difference - the LANG selection... and the default FLAGS
-
-AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_CXX
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic % -Wall" dnl GCC
- "-xstrconst % -v" dnl Solaris C
- "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
- "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
- "-ansi -ansiE % -fullwarn" dnl IRIX
- "+ESlit % +w1" dnl HP-UX C
- "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
- "-h conform % -h msglevel 2" dnl Cray C (Unicos)
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
-
-dnl implementation tactics:
-dnl the for-argument contains a list of options. The first part of
-dnl these does only exist to detect the compiler - usually it is
-dnl a global option to enable -ansi or -extrawarnings. All other
-dnl compilers will fail about it. That was needed since a lot of
-dnl compilers will give false positives for some option-syntax
-dnl like -Woption or -Xoption as they think of it is a pass-through
-dnl to later compile stages or something. The "%" is used as a
-dnl delimimiter. A non-option comment can be given after "%%" marks.
+dnl AC_INIT(config.h.in) # config.h.in as created by "autoheader"
+dnl AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE
+dnl AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in
+dnl AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it..
+dnl AC_MEMORY_H # makes "#undef NEED_MEMORY_H"
+dnl AC_C_CONST_H # makes "#undef const"
+dnl AC_OUTPUT(Makefile) # creates the "config.h" now
+dnl # and also mylib/_config.h
+dnl
+dnl if the argument to AX_PREFIX_CONFIG_H would have been omitted then the
+dnl default outputfile would have been called simply "testpkg-config.h", but
+dnl even under the name "mylib/_config.h" it contains prefix-defines like
+dnl
+dnl #ifndef TESTPKG_VERSION
+dnl #define TESTPKG_VERSION "0.1.1"
+dnl #endif
+dnl #ifndef TESTPKG_NEED_MEMORY_H
+dnl #define TESTPKG_NEED_MEMORY_H 1
+dnl #endif
+dnl #ifndef _testpkg_const
+dnl #define _testpkg_const _const
+dnl #endif
+dnl
+dnl and this "mylib/_config.h" can be installed along with other
+dnl header-files, which is most convenient when creating a shared
+dnl library (that has some headers) where some functionality is
+dnl dependent on the OS-features detected at compile-time. No
+dnl need to invent some "mylib-confdefs.h.in" manually. :-)
+dnl
+dnl Note that some AC_DEFINEs that end up in the config.h file are
+dnl actually self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the
+dnl AC_TYPE_OFF_T say that they "will define inline|const|off_t if the
+dnl system does not do it by itself". You might want to clean up about
+dnl these - consider an extra mylib/conf.h that reads something like:
+dnl
+dnl #include <mylib/_config.h>
+dnl #ifndef _testpkg_const
+dnl #define _testpkg_const const
+dnl #endif
+dnl
+dnl and then start using _testpkg_const in the header files. That is
+dnl also a good thing to differentiate whether some library-user has
+dnl starting to take up with a different compiler, so perhaps it could
+dnl read something like this:
+dnl
+dnl #ifdef _MSC_VER
+dnl #include <mylib/_msvc.h>
+dnl #else
+dnl #include <mylib/_config.h>
+dnl #endif
+dnl #ifndef _testpkg_const
+dnl #define _testpkg_const const
+dnl #endif
+dnl
+dnl @version %Id: ax_prefix_config_h.m4,v 1.5 2003/07/02 23:29:23 guidod Exp %
+dnl @author Guiodo Draheim <guidod@gmx.de>
+dnl
+AC_DEFUN([AX_PREFIX_CONFIG_H],[AC_REQUIRE([AC_CONFIG_HEADER])
+AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
+AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
+AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
+AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
+AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
+AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
+AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
+m4_pushdef([_script],[conftest.prefix])dnl
+m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
+_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
+_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
+_PKG=`echo ifelse($2, , $PACKAGE, $2)`
+_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
+_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
+_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'`
+if test ".$_INP" = "."; then
+ for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
+ case "$ac_file" in
+ *.h) _INP=$ac_file ;;
+ *)
+ esac
+ test ".$_INP" != "." && break
+ done
+fi
+if test ".$_INP" = "."; then
+ case "$_OUT" in
+ */*) _INP=`basename "$_OUT"`
+ ;;
+ *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
+ ;;
+ *) _INP=config.h
+ ;;
+ esac
+fi
+if test -z "$_PKG" ; then
+ AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
+else
+ if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
+ _INP="$srcdir/$_INP"
+ fi fi
+ AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
+ if test -f $_INP ; then
+ echo "s/@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script
+ echo "s/@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script
+ echo "s/@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script
+ echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script
+ echo "@%:@endif/" >>_script
+ echo "s/@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script
+ echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script
+ echo "@%:@endif/" >> _script
+ # now executing _script on _DEF input to create _OUT output file
+ echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
+ echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
+ echo ' ' >>$tmp/pconfig.h
+ echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
+ sed -f _script $_INP >>$tmp/pconfig.h
+ echo ' ' >>$tmp/pconfig.h
+ echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
+ echo "@%:@endif" >>$tmp/pconfig.h
+ if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
+ AC_MSG_NOTICE([$_OUT is unchanged])
+ else
+ ac_dir=`AS_DIRNAME(["$_OUT"])`
+ AS_MKDIR_P(["$ac_dir"])
+ rm -f "$_OUT"
+ mv $tmp/pconfig.h "$_OUT"
+ fi
+ cp _script _configs.sed
+ else
+ AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
+ fi
+ rm -f conftest.*
+fi
+m4_popdef([_symbol])dnl
+m4_popdef([_script])dnl
+AS_VAR_POPDEF([_INP])dnl
+AS_VAR_POPDEF([_UPP])dnl
+AS_VAR_POPDEF([_LOW])dnl
+AS_VAR_POPDEF([_PKG])dnl
+AS_VAR_POPDEF([_DEF])dnl
+AS_VAR_POPDEF([_OUT])dnl
+],[PACKAGE="$PACKAGE"])])
-dnl ______ /usr/share/aclocal/guidod/ax_expand_prefix.m4 ______
-dnl @* AX_EXPAND_PREFIX
-dnl
-dnl when $prefix and $exec_prefix are still set to NONE then set them
-dnl to the usual default values - being based on $ac_default_prefix.
-dnl - this macro can be AC_REQUIREd by other macros that need to
-dnl compute values for installation directories. It has been observed
-dnl that it was done wrong over and over again, so this is a bit
-dnl more safe to do.
+dnl ______ /usr/share/aclocal/guidod/ax_not_enable_frame_pointer.m4 ______
+dnl @* AX_NOT_ENABLE_FRAME_POINTER ([shellvar])
dnl
-dnl remember - setting exec_prefix='${prefix}' needs you interpolate
-dnl directories multiple times, it is not sufficient to just say
-dnl MYVAR="${datadir}/putter" but you do have to run `eval` a few
-dnl times, sth. like MYVAR=`eval "echo \"$MYVAR\""` done atleast
-dnl two times.
-dnl
-dnl The implementation of this macro simply picks up the lines that
-dnl would be run at the start of AC_OUTPUT anyway to set the
-dnl prefix/exec_prefix defaults. Between AC_INIT and the first
-dnl command to AC_REQUIRE this macro you can set the two variables
-dnl to something explicit instead. Probably, any command to compute
-dnl installation directories should be run _after_ AM_INIT_AUTOMAKE
+dnl add --enable-frame-pointer option, the default will add the gcc
+dnl --fomit-frame-pointer option to the shellvar (per default CFLAGS)
+dnl and remove the " -g " debuginfo option from it. In other words,
+dnl the default is "--disable-frame-pointer"
dnl
dnl @: guidod@gmx.de
-dnl @%Id: ax_expand_prefix.m4,v 1.1 2003/10/19 00:05:18 guidod Exp %
-
-AC_DEFUN([AX_EXPAND_PREFIX],[dnl
- # The prefix default can be set in configure.ac (otherwise it is /usr/local)
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- # Let make expand exec_prefix. Allows to override the makevar 'prefix' later
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-])
+dnl @%Id: %
-dnl ______ /usr/share/aclocal/Miscellaneous/ac_compile_check_sizeof.m4 ______
-dnl @synopsis AC_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]])
-dnl
-dnl This macro checks for the size of TYPE using compile checks, not
-dnl run checks. You can supply extra HEADERS to look into. the check
-dnl will cycle through 1 2 4 8 16 and any EXTRA_SIZES the user
-dnl supplies. If a match is found, it will #define SIZEOF_`TYPE' to
-dnl that value. Otherwise it will emit a configure time error
-dnl indicating the size of the type could not be determined.
-dnl
-dnl The trick is that C will not allow duplicate case labels. While
-dnl this is valid C code:
-dnl
-dnl switch (0) case 0: case 1:;
-dnl
-dnl The following is not:
-dnl
-dnl switch (0) case 0: case 0:;
-dnl
-dnl Thus, the AC_TRY_COMPILE will fail if the currently tried size
-dnl does not match.
-dnl
-dnl Here is an example skeleton configure.in script, demonstrating the
-dnl macro's usage:
-dnl
-dnl AC_PROG_CC
-dnl AC_CHECK_HEADERS(stddef.h unistd.h)
-dnl AC_TYPE_SIZE_T
-dnl AC_CHECK_TYPE(ssize_t, int)
-dnl
-dnl headers='#ifdef HAVE_STDDEF_H
-dnl #include <stddef.h>
-dnl #endif
-dnl #ifdef HAVE_UNISTD_H
-dnl #include <unistd.h>
-dnl #endif
-dnl '
-dnl
-dnl AC_COMPILE_CHECK_SIZEOF(char)
-dnl AC_COMPILE_CHECK_SIZEOF(short)
-dnl AC_COMPILE_CHECK_SIZEOF(int)
-dnl AC_COMPILE_CHECK_SIZEOF(long)
-dnl AC_COMPILE_CHECK_SIZEOF(unsigned char *)
-dnl AC_COMPILE_CHECK_SIZEOF(void *)
-dnl AC_COMPILE_CHECK_SIZEOF(size_t, $headers)
-dnl AC_COMPILE_CHECK_SIZEOF(ssize_t, $headers)
-dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
-dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers)
-dnl
-dnl @author Kaveh Ghazi <ghazi@caip.rutgers.edu>
-dnl @version %Id: ac_compile_check_sizeof.m4,v 1.1.1.1 2001/07/26 00:46:24 guidod Exp %
-dnl
-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(size of $1)
-AC_CACHE_VAL(AC_CV_NAME,
-[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
- AC_TRY_COMPILE([#include "confdefs.h"
-#include <sys/types.h>
-$2
-], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
- if test x$AC_CV_NAME != x ; then break; fi
-done
-])
-if test x$AC_CV_NAME = x ; then
- AC_MSG_ERROR([cannot determine a size for $1])
-fi
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
+AC_DEFUN([AX_NOT_ENABLE_FRAME_POINTER],[dnl
+AS_VAR_PUSHDEF([VAR],[enable_frame_pointer])dnl
+AC_MSG_CHECKING([m4_ifval($1,$1,CFLAGS) frame-pointer])
+AC_ARG_ENABLE([frame-pointer], AC_HELP_STRING(
+ [--enable-frame-pointer],[enable callframe generation for debugging]))
+case ".$VAR" in
+ .|.no|.no,*) test ".$VAR" = "." && VAR="no"
+ m4_ifval($1,$1,CFLAGS)=`echo dnl
+ " $m4_ifval($1,$1,CFLAGS) " | sed -e 's/ -g / /'`
+ if test ".$GCC" = ".yes" ; then
+ m4_ifval($1,$1,CFLAGS)="$m4_ifval($1,$1,CFLAGS) -fomit-frame-pointer"
+ AC_MSG_RESULT([$VAR, -fomit-frame-pointer added])
+ else
+ AC_MSG_RESULT([$VAR, -g removed])
+ fi ;;
+ *) AC_MSG_RESULT([$VAR, kept]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
])
-dnl ______ /usr/share/aclocal/guidod/ax_dirname.m4 ______
-dnl @* AX_DIRNAME(PATHNAME)
-dnl
-dnl Parts of the implementation have been taken from AS_DIRNAME from the
-dnl main autoconf package in generation 2.5x. However, we do only use
-dnl "sed" to cut out the dirname, and we do additionally clean up some
-dnl dir/.. parts in the resulting pattern.
+dnl ______ /usr/share/aclocal/guidod/ac_set_default_paths_system.m4 ______
+dnl @synopsis AC_SET_DEFAULT_PATHS_SYSTEM
dnl
-dnl this macro may be used in autoconf 2.13 scripts as well.
+dnl the most interesting changes go about windows-targets - where the
+dnl default_prefix is set to /programs, and quite some directories
+dnl are aliased: sbindir := libdir := bindir and the docprefix-defaults
+dnl are also a bit different, even on FHS2-compliant systems where the
+dnl mandir is going to $prefix/man only if prefix=/usr, otherwise they
+dnl shall go to $datadir/man. We use an extra docprefix to express it
+dnl which is either defined as being prefix or datadir. not SUBSTed here.
dnl
-dnl @%Id: ax_dirname.m4,v 1.1 2003/07/02 23:42:59 guidod Exp %
-
-AC_DEFUN([AX_DIRNAME],
-[echo X[]$1 |
- sed ['s/\/[^\/:][^\/:]*\/..\//\//g
- s/\/[^\/:][^\/:]*\/..\//\//g
- s/\/[^\/:][^\/:]*\/..\//\//g
- s/\/[^\/:][^\/:]*\/..\//\//g
- /^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q']])
+dnl @, (very useful)
+dnl @version %Id: ac_set_default_paths_system.m4,v 1.5 2003/02/02 19:32:30 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
+AC_DEFUN([AC_SET_DEFAULT_PATHS_SYSTEM],
+[AC_REQUIRE([AC_CANONICAL_HOST]) # --------------------------------------------
+case "$prefix:$ac_default_prefix" in
+ NONE:/usr/local)
+ result=""
+ AC_MSG_CHECKING(default prefix path)
+ case "${target_os}" in
+ *cygwin* | *mingw* | *uwin* | *djgpp | *emx* )
+ if test "${host_os}" = "${target_os}" ; then
+ ac_default_prefix="/programs"
+ result="(win/dos target)"
+ else
+ case "$PATH" in
+ *:/usr/local/cross-tools/$target_alias/bin:*)
+ ac_default_prefix="/usr/local/cross-tools/$target_alias" ;;
+ *:/usr/local/$target_alias/bin:*)
+ ac_default_prefix="/usr/local/$target_alias" ;;
+ *:/usr/local/$target_cpu-$target_os/bin:*)
+ ac_default_prefix="/usr/local/$target_cpu-$target_os" ;;
+ *)
+ ac_default_prefix="/programs" ;;
+ esac
+ result="(win/dos cross-compiler)"
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT($ac_default_prefix $result)
+ ;;
+esac
+AC_MSG_CHECKING(default prefix system)
+result="$prefix" ; test "$result" = "NONE" && result="$ac_default_prefix"
+case ${result} in
+ /programs | /programs/*) result="is win-/programs"
+ # on win/dos, .exe .dll and .cfg live in the same directory
+ libdir=`echo $libdir |sed -e 's:^..exec_prefix./lib$:${bindir}:'`
+ sbindir=`echo $sbindir |sed -e 's:^..exec_prefix./sbin$:${libdir}:'`
+ sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:${sbindir}:'`
+ libexecdir=`echo $libexecdir |sed -e 's:/libexec$:/system:'`
+ # help-files shall be set with --infodir, docprefix is datadir
+ docprefix="${datadir}"
+ mandir=`echo $mandir \
+ |sed -e 's:^..prefix./man$:${datadir}/info:'`
+ includedir=`echo $includedir \
+ |sed -e 's:^..prefix./include$:${datadir}/include:'`
+ # other state files (but /etc) are moved to datadir
+ sharedstatedir=`echo $sharedstatedir \
+ |sed -e 's:^..prefix./com$:${datadir}/default:'`
+ localstatedir=`echo $localstatedir \
+ |sed -e 's:^..prefix./var$:${datadir}/current:'`
+ ;;
+ /usr) result="is /usr-shipped"
+ # doc files are left at prefix
+ docprefix="${prefix}"
+ # state files go under /top
+ sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:/etc:'`
+ sharedstatedir=`echo $sharedstatedir \
+ |sed -e 's:^..prefix./com$:/etc/default:'`
+ # $prefix/var is going to end up in /var/lib
+ localstatedir=`echo $localstatedir \
+ |sed -e 's:^..prefix./var$:/var/lib:'`
+ ;;
+ /opt | /opt/*) result="is /opt-package"
+ # state files go under /top/prefix
+ sysconfdir=`echo $sysconfdir \
+ |sed -e 's:^..prefix./etc$:/etc${prefix}:'`
+ sharedstatedir=`echo $sharedstatedir \
+ |sed -e 's:^..prefix./com$:/etc/default${prefix}:'`
+ # $prefix/var is going to to be /var$prefix... once again
+ localstatedir=`echo $localstatedir \
+ |sed -e 's:^..prefix./var$:/var${prefix}:'`
+ # doc files are left at prefix
+ docprefix="${prefix}"
+ ;;
+ *) result="is /local-package"
+ # doc files are moved from prefix down to datadir
+ docprefix="${datadir}"
+ mandir=`echo $mandir \
+ |sed -e 's:^..prefix./man$:${datadir}/man:'`
+ infodir=`echo $infodir \
+ |sed -e 's:^..prefix./infodir$:${datadir}/info:'`
+ # never use $prefix/com - that is no good idea
+ sharedstatedir=`echo $sharedstatedir \
+ |sed -e 's:^..prefix./com$:${sysconfdir}/default:'`
+ ;;
+esac
+AC_MSG_RESULT($result)
+# --------------------------------------------------------
+])
-dnl ______ /usr/share/aclocal/guidod/ax_create_pkgconfig_info.m4 ______
-dnl @* AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary]]])]
-dnl defaults:
-dnl $1 = $PACKAGE_NAME.pc
-dnl $2 = (empty)
-dnl $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac)
-dnl $4 = $PACKAGE_SUMMARY (or $1 Library)
-dnl $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac)
+dnl ______ /usr/share/aclocal/guidod/ax_cflags_no_writable_strings.m4 ______
+dnl @synopsis AX_CFLAGS_NO_WRITABLE_STRINGS [(shellvar [,default, [A/NA]])]
dnl
-dnl PACKAGE_NAME defaults to $PACKAGE if not set.
-dnl PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set.
+dnl Try to find a compiler option that makes all stringliteral readonly.
dnl
-dnl the resulting file is called $PACKAGE.pc.in / $PACKAGE.pc
+dnl The sanity check is done by looking at string.h which has a set
+dnl of strcpy definitions that should be defined with const-modifiers
+dnl to not emit a warning in all so many places.
dnl
-dnl You will find this macro most useful in conjunction with ax_spec_defaults
-dnl that can read good initializers from the .spec file. In consequencd, most
-dnl of the generatable installable stuff can be made from information being
-dnl updated in a single place for the whole project.
+dnl For the GNU CC compiler it will be -fno-writable-strings -Wwrite-strings
+dnl The result is added to the shellvar being CFLAGS by default.
dnl
-dnl @%Id: ax_create_pkgconfig_info.m4,v 1.1 2003/10/19 00:08:51 guidod Exp %
-
-AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl
-AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl
-AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl
-
-# we need the expanded forms...
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-AC_MSG_CHECKING(our pkgconfig libname)
-test ".$PKGCONFIG_libname" != "." || \
-PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)"
-test ".$PKGCONFIG_libname" != "." || \
-PKGCONFIG_libname="$PACKAGE"
-PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
-PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
-AC_MSG_RESULT($PKGCONFIG_libname)
-
-AC_MSG_CHECKING(our pkgconfig version)
-test ".$PKGCONFIG_version" != "." || \
-PKGCONFIG_version="${PACKAGE_VERSION}"
-test ".$PKGCONFIG_version" != "." || \
-PKGCONFIG_version="$VERSION"
-PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
-PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
-AC_MSG_RESULT($PKGCONFIG_version)
-
-AC_MSG_CHECKING(our pkgconfig_libdir)
-test ".$pkgconfig_libdir" = "." && \
-pkgconfig_libdir='${libdir}/pkgconfig'
-PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"`
-PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
-PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
-AC_MSG_RESULT($pkgconfig_libdir)
-test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && (
-AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir))
-AC_SUBST([pkgconfig_libdir])
-
-AC_MSG_CHECKING(our pkgconfig_libfile)
-test ".$pkgconfig_libfile" != "." || \
-pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)"
-PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"`
-PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"`
-AC_MSG_RESULT($pkgconfig_libfile)
-test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && (
-AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile))
-AC_SUBST([pkgconfig_libfile])
-
-AC_MSG_CHECKING(our pkgconfig description)
-PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)"
-test ".$PKGCONFIG_description" != "." || \
-PKGCONFIG_description="$PKGCONFIG_libname Library"
-PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
-PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
-AC_MSG_RESULT($PKGCONFIG_description)
-
-AC_MSG_CHECKING(our pkgconfig requires)
-PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)"
-PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
-PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
-AC_MSG_RESULT($PKGCONFIG_requires)
-
-AC_MSG_CHECKING(our pkgconfig ext libs)
-PKGCONFIG_pkglibs="$PACKAGE_LIBS"
-test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname"
-PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)"
-PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"`
-PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"`
-AC_MSG_RESULT($PKGCONFIG_libs)
+dnl DEFAULTS:
+dnl
+dnl - $1 shell-variable-to-add-to : CFLAGS
+dnl - $2 add-value-if-not-found : nothing
+dnl - $3 action-if-found : add value to shellvariable
+dnl - $4 action-if-not-found : nothing
+dnl
+dnl @version %Id: ax_cflags_no_writable_strings.m4,v 1.6 2003/06/05 00:52:15 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
+dnl
+AC_DEFUN([AX_CFLAGS_NO_WRITABLE_STRINGS],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_no_writable_strings])dnl
+AC_CACHE_CHECK([m4_ifval([$1],[$1],FLAGS) making strings readonly],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+# -use_readonly_const is the default for IRIX C,
+# puts them into .rodata, but they are copied later.
+# need to be "-G0 -rdatashared" for strictmode but
+# I am not sure what effect that has really. - guidod
+for ac_arg dnl
+in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC
+ "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment
+ "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment
+ "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment
+ "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+case ".$VAR" in
+ .|.no|.no,*) ;;
+ *) # sanity check - testing strcpy() from string.h
+ cp config.log config.tmp
+ AC_TRY_COMPILE([#include <string.h>],[
+ char test[16];
+ if (strcpy (test, "test")) return 1;],
+ dnl the original did use test -n `$CC testprogram.c`
+ [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
+ then VAR="no, suppressed, string.h," ; fi],
+ [VAR="no, suppressed, string.h"])
+ rm config.tmp
+ ;;
+esac
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
-AC_MSG_CHECKING(our pkgconfig cppflags)
-PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)"
-PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"`
-PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"`
-AC_MSG_RESULT($PKGCONFIG_cppflags)
+dnl the only difference - the LANG selection... and the default FLAGS
-test ".$PKGCONFIG_generate" != "." || \
-PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)"
-PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"`
-PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"`
-test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && (
-AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate))
+AC_DEFUN([AX_CXXFLAGS_NO_WRITABLE_STRINGS],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_no_writable_strings])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) making strings readonly],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_CXX
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+# -use_readonly_const is the default for IRIX C,
+# puts them into .rodata, but they are copied later.
+# need to be "-G0 -rdatashared" for strictmode but
+# I am not sure what effect that has really. - guidod
+for ac_arg dnl
+in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC
+ "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment
+ "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment
+ "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment
+ "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+case ".$VAR" in
+ .|.no|.no,*) ;;
+ *) # sanity check - testing strcpy() from string.h
+ cp config.log config.tmp
+ AC_TRY_COMPILE([#include <string.h>],[[
+ char test[16];
+ if (strcpy (test, "test")) return 1;]],
+ dnl the original did use test -n `$CC testprogram.c`
+ [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
+ then VAR="no, suppressed, string.h," ; fi],
+ [VAR="no, suppressed, string.h"])
+ rm config.tmp
+ ;;
+esac
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
-if test ".$PKGCONFIG_src_libdir" = "." ; then
-PKGCONFIG_src_libdir=`pwd`
-PKGCONFIG_src_libdir=`AX_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")`
-test ! -d $PKGCONFIG_src_libdir/src || \
-PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src"
-case ".$objdir" in
-*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac
-AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir)
-fi
+dnl ______ /usr/share/aclocal/guidod/ax_spec_file.m4 ______
+dnl @* AX_SPEC_FILE [(rpmspecfile [,subdirpath])]
+dnl
+dnl set the specfile - if no argument has been given then check whether
+dnl the ac_unique_file looks like a .spec file and use it. This macro
+dnl is ac_REQUIRED by many AX_SPEC_ routines.
+dnl
+dnl the AX_SPEC_EXTRACT macro is a helper used by many AX_SPEC_
+dnl routines and therefore placed here to be automatically included
+dnl in the macro set of (older) aclocal/acinclude.
+dnl
+dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]])
+dnl
+dnl @version %Id: ax_spec_file.m4,v 1.1 2003/10/18 23:38:41 guidod Exp %
+dnl @author Guido Draheim <guidod@gmx.de>
-if test ".$PKGCONFIG_src_headers" = "." ; then
-PKGCONFIG_src_headers=`pwd`
-v="$ac_top_srcdir" ;
-test ".$v" != "." || v="$ax_spec_dir"
-test ".$v" != "." || v="$srcdir"
-case "$v" in /*) PKG_CONFIG_src_headers="" ;; esac
-PKGCONFIG_src_headers=`AX_DIRNAME("$PKGCONFIG_src_headers/$v/x")`
-test ! -d $PKGCONFIG_src_headers/incl[]ude || \
-PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude"
-AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers)
-fi
+AC_DEFUN([AX_SPEC_FILE],
+[ AC_MSG_CHECKING([rpm spec file])
+ if test ".$1" != "." ; then
+ ax_spec_file_="$1"
+ ax_spec_file=`basename $1`
+ else
+ case ".$ac_unique_file" in
+ *.spec) ax_spec_file="$ac_unique_file"
+ ax_spec_file_="$ac_unique_file" ;;
+ *) ax_spec_file="TODO"
+ if test ".$PACKAGE" != "."
+ then ax_spec_file_="$PACKAGE.spec"
+ else ax_spec_file_="README"
+ fi
+ cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
+ no ax_spec_file argument has been given, using defaults of
+ (1) $ax_spec_file_
+ (2) $ax_spec_file
+EOF
+ ;;
+ esac
+ fi
+ # find specfile
+ for i in ifelse($2,,,$2) . $srcdir $srcdir/.. .. ; do
+ if test -f "$i/$ax_spec_file_" ; then
+ ax_spec_dir="$i"
+ ax_spec_file="$ax_spec_dir/$ax_spec_file_"
+ break
+ fi
+ if test -f "$i/$ax_spec_file" ; then
+ ax_spec_dir="$i"
+ ax_spec_file="$ax_spec_dir/$ax_spec_file"
+ break
+ fi
+ done
+ case "$ax_spec_file" in
+ ./*) if test "$ax_spec_file" = "./$ax_spec_file_" ; then
+ ax_spec_file="$ax_spec_file_"
+ fi
+ AC_MSG_RESULT([$ax_spec_file]) ;;
+ */*) AC_MSG_RESULT([$ax_spec_file]) ;;
+ *) AC_MSG_ERROR([no rpm spec file found]) ;;
+ esac
+ m4_define([m4_ax_spec_file],[ax_spec_file])
+])
-dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here...
-AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[
-pkgconfig_generate="$ax_create_pkgconfig_generate"
-if test ! -f "$pkgconfig_generate.in"
-then generate="true"
-elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null
-then generate="true"
-else generate="false";
-fi
-if $generate ; then
-AC_MSG_NOTICE(creating $pkgconfig_generate.in)
-cat > $pkgconfig_generate.in <<_EOF
-# generated by configure / remove this line to disable regeneration
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]])
-Name: @PACKAGE_NAME@
-Description: @PACKAGE_DESCRIPTION@
-Version: @PACKAGE_VERSION@
-Requires: @PACKAGE_REQUIRES@
-Libs: -L\${libdir} @LIBS@
-Cflags: -I\${includedir} @CPPFLAGS@
-_EOF
-fi # DONE generate $pkgconfig_generate.in
-AC_MSG_NOTICE(creating $pkgconfig_generate)
-sed -e "s|@prefix@|${pkgconfig_prefix}|" \
- -e "s|@exec_prefix@|${pkgconfig_execprefix}|" \
- -e "s|@libdir@|${pkgconfig_libdir}|" \
- -e "s|@includedir@|${pkgconfig_includedir}|" \
- -e "s|@PACKAGE_NAME@|${pkgconfig_libname}|" \
- -e "s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}|" \
- -e "s|@PACKAGE_VERSION@|${pkgconfig_version}|" \
- -e "s|@PACKAGE_REQUIRES@|${pkgconfig_requires}|" \
- -e "s|@LIBS@|${pkgconfig_libs}|" \
- -e "s|@CPPFLAGS@|${pkgconfig_cppflags}|" \
- $pkgconfig_generate.in > $pkgconfig_generate
-if test ! -s $pkgconfig_generate ; then
- AC_MSG_ERROR([$pkgconfig_generate is empty])
-fi # DONE generate $pkgconfig_generate
-pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'`
-AC_MSG_NOTICE(creating $pkgconfig_uninstalled)
-sed -e "s|@prefix@|${pkgconfig_prefix}|" \
- -e "s|@exec_prefix@|${pkgconfig_execprefix}|" \
- -e "s|@libdir@|${pkgconfig_src_libdir}|" \
- -e "s|@includedir@|${pkgconfig_src_headers}|" \
- -e "s|@PACKAGE_NAME@|${pkgconfig_libname}|" \
- -e "s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}|" \
- -e "s|@PACKAGE_VERSION@|${pkgconfig_version}|" \
- -e "s|@PACKAGE_REQUIRES@|${pkgconfig_requires}|" \
- -e "s|@LIBS@|${pkgconfig_libs}|" \
- -e "s|@CPPFLAGS@|${pkgconfig_cppflags}|" \
- $pkgconfig_generate.in > $pkgconfig_uninstalled
-if test ! -s $pkgconfig_uninstalled ; then
- AC_MSG_ERROR([$pkgconfig_uninstalled is empty])
-fi # DONE generate $pkgconfig_uninstalled
-],[
-dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here...
-ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate"
-pkgconfig_prefix='$prefix'
-pkgconfig_execprefix='$exec_prefix'
-pkgconfig_libdir='$libdir'
-pkgconfig_includedir='$includedir'
-pkgconfig_libname='$ax_create_pkgconfig_libname'
-pkgconfig_description='$ax_create_pkgconfig_description'
-pkgconfig_version='$ax_create_pkgconfig_version'
-pkgconfig_requires='$ax_create_pkgconfig_requires'
-pkgconfig_libs='$ax_create_pkgconfig_libs'
-pkgconfig_cppflags='$ax_create_pkgconfig_cppflags'
-pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir'
-pkgconfig_src_headers='$ax_create_pkgconfig_src_headers'
-])dnl
-AS_VAR_POPDEF([PKGCONFIG_libdir])dnl
-AS_VAR_POPDEF([PKGCONFIG_libfile])dnl
-AS_VAR_POPDEF([PKGCONFIG_libname])dnl
-AS_VAR_POPDEF([PKGCONFIG_version])dnl
-AS_VAR_POPDEF([PKGCONFIG_description])dnl
-AS_VAR_POPDEF([PKGCONFIG_requires])dnl
-AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl
-AS_VAR_POPDEF([PKGCONFIG_libs])dnl
-AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl
-AS_VAR_POPDEF([PKGCONFIG_generate])dnl
-AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl
-AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl
+AC_DEFUN([AX_SPEC_EXTRACT],
+[
+ if test ".$[]$1" = "." ; then
+ $1=`grep -i '^[[ ]]*m4_ifval([$2],[$2],[$1])[[ ]]*:' dnl
+ "$ax_spec_file" | sed -e 's/.*:[[ ]]*//' dnl
+ -e 's/[[ ]][[ ]]*/ /g' -e 's/^ //' -e 's/ $[]//' -e 'q'`
+ if test ".$[]$1" = "." ; then
+ for $1 in $2 $1 m4_tolower([$1]) ; do
+ $1=`echo "$[]$1" | sed -e 's/^%//g'`
+ $1=`sed dnl
+ -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
+ -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
+ -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file`
+ test ".$1" != "." && break
+ done
+ fi
+ case ".$[]$1" in
+ .%{*)
+ $1=`echo "$[]$1" | sed -e 's/%{//' -e 's/}$[]//'`
+ $1=`sed dnl
+ -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
+ -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
+ -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;;
+ .%*)
+ $1=`echo "$[]$1" | sed -e 's/%//'`
+ $1=`sed dnl
+ -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl
+ -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl
+ -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;;
+ esac
+ m4_ifval([$3],[test ".$[]$1" = "." && $1="$3"])
+ fi # test ".$[]$1" = "."
])
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
+# serial 10
-AC_PREREQ([2.52])
+AC_PREREQ([2.54])
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
# the ones we care about.
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
- AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_][CC],
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_][CC],
- defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_][CXX],
- defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
# Copyright 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.6.3])])
+ [AM_AUTOMAKE_VERSION([1.7.6])])
# Helper functions for option handling. -*- Autoconf -*-
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# serial 4 -*- Autoconf -*-
+# -*- Autoconf -*-
+# Copyright (C) 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.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5 -*- Autoconf -*-
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 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
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- am_cv_$1_dependencies_compiler_type=$depmode
- break
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
fi
done
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
-[rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
- DEPDIR=.deps
-else
- # MS-DOS does not allow filenames that begin with a dot.
- DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-AC_SUBST([DEPDIR])
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
-# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 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
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
-doit:
+am__doit:
@echo done
+.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
_am_result=BSD
fi
fi
-AC_SUBST(am__include)
-AC_SUBST(am__quote)
-AC_MSG_RESULT($_am_result)
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([conditional \"$1\" was never defined.
+ AC_MSG_ERROR([conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.])
fi])])
AC_MSG_RESULT([$SED])
])
-# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
-
-# Copyright 1996, 1997, 2000, 2001 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.
-
-AC_PREREQ([2.52])
-
-# serial 6
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. We must strip everything past the first ":",
-# and everything past the last "/".
-
-# _AM_DIRNAME(PATH)
-# -----------------
-# Like AS_DIRNAME, only do it during macro expansion
-AC_DEFUN([_AM_DIRNAME],
- [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
- m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
- m4_if(regexp([$1], [^/.*]), -1,
- [.],
- patsubst([$1], [^\(/\).*], [\1])),
- patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
- patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
-])# _AM_DIRNAME
-
-
-# The stamp files are numbered to have different names.
-# We could number them on a directory basis, but that's additional
-# complications, let's have a unique counter.
-m4_define([_AM_STAMP_Count], [0])
-
-
-# _AM_STAMP(HEADER)
-# -----------------
-# The name of the stamp file for HEADER.
-AC_DEFUN([_AM_STAMP],
-[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
-AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
- [:.*])))/stamp-h[]_AM_STAMP_Count])
-
-
-# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
-# ------------------------------------------------------------
-# We used to try to get a real timestamp in stamp-h. But the fear is that
-# that will cause unnecessary cvs conflicts.
-AC_DEFUN([_AM_CONFIG_HEADER],
-[# Add the stamp file to the list of files AC keeps track of,
-# along with our hook.
-AC_CONFIG_HEADERS([$1],
- [# update the timestamp
-echo 'timestamp for $1' >"_AM_STAMP([$1])"
-$2],
- [$3])
-])# _AM_CONFIG_HEADER
-
-
-# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
-# --------------------------------------------------------------
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
-])# AM_CONFIG_HEADER
-
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
-# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1996, 1998, 2000, 2001, 2002 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
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 1
+# serial 2
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
]
)
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
-/* config.h.in. Generated automatically from configure.ac by autoheader. */
+/* config.h.in. Generated from configure.ac by autoheader. */
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
+/* Define to 1 if you have the <byteswap.h> header file. */
+#undef HAVE_BYTESWAP_H
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Define if you have the <direct.h> header file. */
+/* Define to 1 if you have the <direct.h> header file. */
#undef HAVE_DIRECT_H
-/* Define if you have the <dirent.h> header file, and it defines `DIR'. */
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
#undef HAVE_DIRENT_H
-/* Define if you have the <dlfcn.h> header file. */
+/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
-/* Define if you have the <inttypes.h> header file. */
+/* Define to 1 if you have the <fnmatch.h> header file. */
+#undef HAVE_FNMATCH_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define if you have the <io.h> header file. */
+/* Define to 1 if you have the <io.h> header file. */
#undef HAVE_IO_H
-/* Define if you have the <memory.h> header file. */
+/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define if you have the <ndir.h> header file, and it defines `DIR'. */
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
-/* Define if you have the <stdint.h> header file. */
+/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define if you have the `strcasecmp' function. */
+/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have the <strings.h> header file. */
+/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
-/* Define if you have the <sys/dir.h> header file, and it defines `DIR'. */
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_DIR_H
-/* Define if you have the <sys/int_types.h> header file. */
+/* Define to 1 if you have the <sys/int_types.h> header file. */
#undef HAVE_SYS_INT_TYPES_H
-/* Define if you have the <sys/mman.h> header file. */
+/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
-/* Define if you have the <sys/ndir.h> header file, and it defines `DIR'. */
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_NDIR_H
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/stat.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
-/* Define if you have the <sys/types.h> header file. */
+/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <winbase.h> header file. */
+/* Define to 1 if you have the <winbase.h> header file. */
#undef HAVE_WINBASE_H
-/* Define if you have the <windows.h> header file. */
+/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
-/* Define if you have the <winnt.h> header file. */
+/* Define to 1 if you have the <winnt.h> header file. */
#undef HAVE_WINNT_H
-/* Define if you have the <zlib.h> header file. */
+/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
- if it is not supported. */
-#undef inline
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
-
/* whether the system defaults to 32bit off_t but can do 64bit when requested
*/
#undef LARGEFILE_SENSITIVE
-/* Define to `long' if <sys/types.h> does not define. */
-#undef off_t
-
/* Name of package */
#undef PACKAGE
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
/* The number of bytes in type int */
#undef SIZEOF_INT
/* The number of bytes in type short */
#undef SIZEOF_SHORT
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+ if it is not supported. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
+ supported. Do not define if restrict is supported directly. */
+#undef restrict
+
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
#! /bin/sh
-# From configure.ac Revision: 1.1.1.2 .
+# From configure.ac Revision: 1.2 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os ax_enable_builddir_sed THREAD_SAFE ZLIB_INCL ZLIB_LDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL RELEASE_INFO VERSION_INFO MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT pkgconfig_libdir pkgconfig_libfile PERL PYTHON MKZIP XMLTO LARGEFILE_CFLAGS ZLIB_VERSION docdir SDL ZIPTESTS ZZIPLIB_LDFLAGS RESOLVES PKG_CONFIG pkgconfigdir aclocaldir CONFIG_FILES LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os ax_enable_builddir_sed THREAD_SAFE ZLIB_INCL ZLIB_LDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL RELEASE_INFO VERSION_INFO MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT pkgconfig_libdir pkgconfig_libfile PERL PYTHON MKZIP XMLTO LARGEFILE_CFLAGS ZLIB_VERSION docdir SDL ZIPTESTS ZZIPLIB_LDFLAGS RESOLVES PKG_CONFIG pkgconfigdir aclocaldir CONFIG_FILES LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
echo "${ECHO_T}$PACKAGE_ICON $k" >&6
-am__api_version="1.6"
+am__api_version="1.7"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
SET_MAKE="MAKE=${MAKE-make}"
fi
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ (exit 1); exit 1; }; }
fi
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
# Define the identity of the package.
PACKAGE=$PACKAGE
VERSION=$VERSION
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
- DEPDIR=.deps
-else
- # MS-DOS does not allow filenames that begin with a dot.
- DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-
+DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make}
cat > confinc << 'END'
-doit:
+am__doit:
@echo done
+.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- am_cv_CC_dependencies_compiler_type=$depmode
- break
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
fi
done
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5253 "configure"' > conftest.$ac_ext
+ echo '#line 5297 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:5800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7639 "configure"
+#line 7683 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7737 "configure"
+#line 7781 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
echo "${ECHO_T}creating zzip/_msvc.in via zzip/_msvc.sed of config.h.in" >&6
test -d zzip || mkdir zzip
sed -f $srcdir/zzip/_msvc.sed $srcdir/config.h.in >zzip/_msvc.in
-# Add the stamp file to the list of files AC keeps track of,
-# along with our hook.
ac_config_headers="$ac_config_headers config.h"
-
-ac_config_headers="$ac_config_headers "
-
-
ac_config_commands="$ac_config_commands zzip/_config.h"
fi
+echo "$as_me:$LINENO: checking for C restrict keyword" >&5
+echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
+if test "${acx_cv_c_restrict+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ acx_cv_c_restrict=unsupported
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ # Try the official restrict keyword, then gcc's __restrict__, then
+ # SGI's __restrict. __restrict has slightly different semantics than
+ # restrict (it's a bit stronger, in that __restrict pointers can't
+ # overlap even with non __restrict pointers), but I think it should be
+ # okay under the circumstances where restrict is normally used.
+ for acx_kw in restrict __restrict__ __restrict; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+float * $acx_kw x;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ acx_cv_c_restrict=$acx_kw; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+echo "$as_me:$LINENO: result: $acx_cv_c_restrict" >&5
+echo "${ECHO_T}$acx_cv_c_restrict" >&6
+ if test "$acx_cv_c_restrict" != "restrict"; then
+ acx_kw="$acx_cv_c_restrict"
+ if test "$acx_kw" = unsupported; then acx_kw=""; fi
+
+cat >>confdefs.h <<_ACEOF
+#define restrict $acx_kw
+_ACEOF
+
+ fi
+
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
done
+for ac_header in fnmatch.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
for ac_func in strcasecmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
s,@ACLOCAL@,$ACLOCAL,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
s,@LN_S@,$LN_S,;t t
s,@ECHO@,$ECHO,;t t
s,@RANLIB@,$RANLIB,;t t
cat $tmp/config.h
rm -f $tmp/config.h
fi
- # Run the commands associated with the file.
- case $ac_file in
- config.h ) # update the timestamp
-echo 'timestamp for config.h' >"./stamp-h1"
- ;;
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
AC_INIT(zziplib.spec)
AC_PREREQ(2.49)
AC_COPYRIGHT([Guido Draheim <guido@gmx.de> for ZZipLib.SF.net])
-AC_REVISION($Revision: 1.2 $)
+AC_REVISION($Revision: 1.3 $)
AC_CONFIG_AUX_DIR(uses)
# =======================================================================
AC_CANONICAL_SYSTEM
AC_MSG_RESULT([creating zzip/_msvc.in via zzip/_msvc.sed of config.h.in])
test -d zzip || mkdir zzip
sed -f $srcdir/zzip/_msvc.sed $srcdir/config.h.in >zzip/_msvc.in
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADER(config.h)
AX_PREFIX_CONFIG_H([zzip/_config.h],[zzip],[config.h])
AX_PREFIX_CONFIG_H([zzip/_msvc.h],[zzip],[zzip/_msvc.in])
AM_MAINTAINER_MODE
AC_C_INLINE
AC_C_CONST
+ACX_C_RESTRICT
AC_STDC_HEADERS
AC_HEADER_DIRENT
AC_CHECK_HEADERS(stdint.h unistd.h windows.h winnt.h winbase.h sys/int_types.h)
AC_CHECK_HEADERS(sys/types.h sys/mman.h sys/stat.h sys/param.h) dnl posix'ish
AC_CHECK_HEADERS(io.h direct.h zlib.h byteswap.h)
-AC_CHECK_FUNCS( strcasecmp )
+AC_CHECK_HEADERS(fnmatch.h)
+AC_CHECK_FUNCS( strcasecmp strndup )
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
%define lib lib010
Summary: ZZipLib - libZ-based ZIP-access Library
Name: zziplib
-Version: 0.13.26
+Version: 0.13.30
Release: 1mdk
Serial: 1
Copyright: LGPL