From: J. Ali Harlow Date: Wed, 7 Jan 2009 17:17:10 +0000 (+0000) Subject: Add support for platforms without fnmatch. X-Git-Tag: 0.1~55 X-Git-Url: http://project.juiblex.co.uk/git/?a=commitdiff_plain;h=1d58c0b201b4a9120042889b46a24778cb61c576;p=razor2.git%2F.git Add support for platforms without fnmatch. This uses gnulib so you will need to have a copy in order to run autogen.sh (but not to build from a tarball). Either arrange for gnulib-tool to be in your path or set the environment variable GNULIB_TOOL to point to its location. --- diff --git a/.gitignore b/.gitignore index e3ccd2d..c859eab 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ ChangeLog *.tar.gz *~ +/link-warning.h diff --git a/Makefile.am b/Makefile.am index d54ddd4..f602bab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,8 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = data docs librazor src po +SUBDIRS = data docs gl librazor src po + +ACLOCAL_AMFLAGS = -I gl/m4 # Creating ChangeLog from git log (taken from cairo/Makefile.am): ChangeLog: $(srcdir)/ChangeLog diff --git a/autogen.sh b/autogen.sh index a70e81e..c8448ad 100755 --- a/autogen.sh +++ b/autogen.sh @@ -47,6 +47,17 @@ test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { DIE=1 } +if [ -z "$GNULIB_TOOL" ]; then + GNULIB_TOOL=`which gnulib-tool` + if [ -z "$GNULIB_TOOL" ]; then + echo + echo "**Error**: Missing gnulib-tool. Set GNULIB_TOOL to point" + echo "to a copy of gnulib-tool which is not in your PATH." + echo "You can get gnulib from http://www.gnu.org/software/gnulib/" + DIE=1 + fi +fi + if test "$DIE" -eq 1; then exit 1 fi @@ -63,7 +74,7 @@ xlc ) am_opt=--include-deps;; esac - aclocalinclude="$ACLOCAL_FLAGS" + aclocalinclude="-I gl/m4 $ACLOCAL_FLAGS" if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then if test -z "$NO_LIBTOOLIZE" ; then @@ -86,6 +97,9 @@ intltoolize --copy --force --automake || exit 1 gtkdocize --copy --flavour no-tmpl +echo "Running $GNULIB_TOOL --update ..." +$GNULIB_TOOL --update + conf_flags="--enable-maintainer-mode" if test x$NOCONFIGURE = x; then diff --git a/configure.ac b/configure.ac index 6923ba8..6167d06 100644 --- a/configure.ac +++ b/configure.ac @@ -19,9 +19,11 @@ AC_SUBST(LT_AGE) AC_ISC_POSIX AC_PROG_CC +gl_EARLY AM_PROG_CC_STDC AC_HEADER_STDC AC_CHECK_HEADERS([sys/mman.h]) +gl_INIT AM_PROG_LIBTOOL AC_PROG_MAKE_SET AC_PROG_LN_S @@ -210,6 +212,7 @@ src/Makefile docs/Makefile docs/version.xml po/Makefile.in +gl/Makefile ]) dnl ========================================================================== diff --git a/gl/.gitignore b/gl/.gitignore new file mode 100644 index 0000000..97e84e2 --- /dev/null +++ b/gl/.gitignore @@ -0,0 +1,11 @@ +.deps +/Makefile.am +/alloca.c +/alloca.in.h +/dummy.c +/fnmatch.c +/fnmatch.in.h +/fnmatch_loop.c +/stdbool.in.h +/wchar.in.h +/wctype.in.h diff --git a/gl/m4/.gitignore b/gl/m4/.gitignore new file mode 100644 index 0000000..135066a --- /dev/null +++ b/gl/m4/.gitignore @@ -0,0 +1,12 @@ +/alloca.m4 +/extensions.m4 +/fnmatch.m4 +/gnulib-common.m4 +/gnulib-comp.m4 +/gnulib-tool.m4 +/include_next.m4 +/mbstate_t.m4 +/stdbool.m4 +/wchar.m4 +/wctype.m4 +/wint_t.m4 diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 new file mode 100644 index 0000000..aa86786 --- /dev/null +++ b/gl/m4/gnulib-cache.m4 @@ -0,0 +1,36 @@ +# Copyright (C) 2002-2009 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# +# This file represents the specification of how gnulib-tool is used. +# It acts as a cache: It is written and read by gnulib-tool. +# In projects using CVS, this file is meant to be stored in CVS, +# like the configure.ac and various Makefile.am files. + + +# Specification in the form of a command-line invocation: +# gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=. --libtool --macro-prefix=gl fnmatch fnmatch-posix + +# Specification in the form of a few gnulib-tool.m4 macro invocations: +gl_LOCAL_DIR([]) +gl_MODULES([ + fnmatch + fnmatch-posix +]) +gl_AVOID([]) +gl_SOURCE_BASE([gl]) +gl_M4_BASE([gl/m4]) +gl_PO_BASE([]) +gl_DOC_BASE([doc]) +gl_TESTS_BASE([tests]) +gl_LIB([libgnu]) +gl_MAKEFILE_NAME([]) +gl_LIBTOOL +gl_MACRO_PREFIX([gl]) +gl_PO_DOMAIN([]) diff --git a/librazor/Makefile.am b/librazor/Makefile.am index a858968..c3a5ebb 100644 --- a/librazor/Makefile.am +++ b/librazor/Makefile.am @@ -1,6 +1,7 @@ ## Process this file with automake to produce Makefile.in INCLUDES = \ + -I$(top_builddir)/gl -I$(top_srcdir)/gl \ -I$(top_builddir)/src -I$(top_srcdir)/src \ -DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \ -DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \ @@ -30,7 +31,7 @@ librazor_la_SOURCES = \ merger.c \ transaction.c -librazor_la_LIBADD = $(ZLIB_LIBS) +librazor_la_LIBADD = $(ZLIB_LIBS) ../gl/libgnu.la clean-local : rm -f *~