Add support for platforms without fnmatch.
authorJ. Ali Harlow <ali@juiblex.co.uk>
Wed Jan 07 17:17:10 2009 +0000 (2009-01-07)
changeset 3233b24a0bd41ee
parent 322 66c281524c98
child 324 e41980e2f108
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.
.gitignore
Makefile.am
autogen.sh
configure.ac
gl/.gitignore
gl/m4/.gitignore
gl/m4/gnulib-cache.m4
librazor/Makefile.am
     1.1 --- a/.gitignore	Tue Jan 06 17:33:37 2009 +0000
     1.2 +++ b/.gitignore	Wed Jan 07 17:17:10 2009 +0000
     1.3 @@ -31,3 +31,4 @@
     1.4  *.tar.gz
     1.5  *~
     1.6  
     1.7 +/link-warning.h
     2.1 --- a/Makefile.am	Tue Jan 06 17:33:37 2009 +0000
     2.2 +++ b/Makefile.am	Wed Jan 07 17:17:10 2009 +0000
     2.3 @@ -1,6 +1,8 @@
     2.4  ## Process this file with automake to produce Makefile.in
     2.5  
     2.6 -SUBDIRS = data docs librazor src po
     2.7 +SUBDIRS = data docs gl librazor src po
     2.8 +
     2.9 +ACLOCAL_AMFLAGS = -I gl/m4
    2.10  
    2.11  # Creating ChangeLog from git log (taken from cairo/Makefile.am):
    2.12  ChangeLog: $(srcdir)/ChangeLog
     3.1 --- a/autogen.sh	Tue Jan 06 17:33:37 2009 +0000
     3.2 +++ b/autogen.sh	Wed Jan 07 17:17:10 2009 +0000
     3.3 @@ -47,6 +47,17 @@
     3.4    DIE=1
     3.5  }
     3.6  
     3.7 +if [ -z "$GNULIB_TOOL" ]; then
     3.8 +  GNULIB_TOOL=`which gnulib-tool`
     3.9 +  if [ -z "$GNULIB_TOOL" ]; then
    3.10 +    echo
    3.11 +    echo "**Error**: Missing gnulib-tool.  Set GNULIB_TOOL to point"
    3.12 +    echo "to a copy of gnulib-tool which is not in your PATH."
    3.13 +    echo "You can get gnulib from http://www.gnu.org/software/gnulib/"
    3.14 +    DIE=1
    3.15 +  fi
    3.16 +fi
    3.17 +
    3.18  if test "$DIE" -eq 1; then
    3.19    exit 1
    3.20  fi
    3.21 @@ -63,7 +74,7 @@
    3.22    am_opt=--include-deps;;
    3.23  esac
    3.24  
    3.25 -      aclocalinclude="$ACLOCAL_FLAGS"
    3.26 +      aclocalinclude="-I gl/m4 $ACLOCAL_FLAGS"
    3.27  
    3.28        if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
    3.29  	if test -z "$NO_LIBTOOLIZE" ; then 
    3.30 @@ -86,6 +97,9 @@
    3.31  
    3.32  gtkdocize --copy --flavour no-tmpl
    3.33  
    3.34 +echo "Running $GNULIB_TOOL --update ..."
    3.35 +$GNULIB_TOOL --update
    3.36 +
    3.37  conf_flags="--enable-maintainer-mode"
    3.38  
    3.39  if test x$NOCONFIGURE = x; then
     4.1 --- a/configure.ac	Tue Jan 06 17:33:37 2009 +0000
     4.2 +++ b/configure.ac	Wed Jan 07 17:17:10 2009 +0000
     4.3 @@ -19,9 +19,11 @@
     4.4  
     4.5  AC_ISC_POSIX
     4.6  AC_PROG_CC
     4.7 +gl_EARLY
     4.8  AM_PROG_CC_STDC
     4.9  AC_HEADER_STDC
    4.10  AC_CHECK_HEADERS([sys/mman.h])
    4.11 +gl_INIT
    4.12  AM_PROG_LIBTOOL
    4.13  AC_PROG_MAKE_SET
    4.14  AC_PROG_LN_S
    4.15 @@ -210,6 +212,7 @@
    4.16  docs/Makefile
    4.17  docs/version.xml
    4.18  po/Makefile.in
    4.19 +gl/Makefile
    4.20  ])
    4.21  
    4.22  dnl ==========================================================================
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/gl/.gitignore	Wed Jan 07 17:17:10 2009 +0000
     5.3 @@ -0,0 +1,11 @@
     5.4 +.deps
     5.5 +/Makefile.am
     5.6 +/alloca.c
     5.7 +/alloca.in.h
     5.8 +/dummy.c
     5.9 +/fnmatch.c
    5.10 +/fnmatch.in.h
    5.11 +/fnmatch_loop.c
    5.12 +/stdbool.in.h
    5.13 +/wchar.in.h
    5.14 +/wctype.in.h
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/gl/m4/.gitignore	Wed Jan 07 17:17:10 2009 +0000
     6.3 @@ -0,0 +1,12 @@
     6.4 +/alloca.m4
     6.5 +/extensions.m4
     6.6 +/fnmatch.m4
     6.7 +/gnulib-common.m4
     6.8 +/gnulib-comp.m4
     6.9 +/gnulib-tool.m4
    6.10 +/include_next.m4
    6.11 +/mbstate_t.m4
    6.12 +/stdbool.m4
    6.13 +/wchar.m4
    6.14 +/wctype.m4
    6.15 +/wint_t.m4
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/gl/m4/gnulib-cache.m4	Wed Jan 07 17:17:10 2009 +0000
     7.3 @@ -0,0 +1,36 @@
     7.4 +# Copyright (C) 2002-2009 Free Software Foundation, Inc.
     7.5 +#
     7.6 +# This file is free software, distributed under the terms of the GNU
     7.7 +# General Public License.  As a special exception to the GNU General
     7.8 +# Public License, this file may be distributed as part of a program
     7.9 +# that contains a configuration script generated by Autoconf, under
    7.10 +# the same distribution terms as the rest of that program.
    7.11 +#
    7.12 +# Generated by gnulib-tool.
    7.13 +#
    7.14 +# This file represents the specification of how gnulib-tool is used.
    7.15 +# It acts as a cache: It is written and read by gnulib-tool.
    7.16 +# In projects using CVS, this file is meant to be stored in CVS,
    7.17 +# like the configure.ac and various Makefile.am files.
    7.18 +
    7.19 +
    7.20 +# Specification in the form of a command-line invocation:
    7.21 +#   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
    7.22 +
    7.23 +# Specification in the form of a few gnulib-tool.m4 macro invocations:
    7.24 +gl_LOCAL_DIR([])
    7.25 +gl_MODULES([
    7.26 +  fnmatch
    7.27 +  fnmatch-posix
    7.28 +])
    7.29 +gl_AVOID([])
    7.30 +gl_SOURCE_BASE([gl])
    7.31 +gl_M4_BASE([gl/m4])
    7.32 +gl_PO_BASE([])
    7.33 +gl_DOC_BASE([doc])
    7.34 +gl_TESTS_BASE([tests])
    7.35 +gl_LIB([libgnu])
    7.36 +gl_MAKEFILE_NAME([])
    7.37 +gl_LIBTOOL
    7.38 +gl_MACRO_PREFIX([gl])
    7.39 +gl_PO_DOMAIN([])
     8.1 --- a/librazor/Makefile.am	Tue Jan 06 17:33:37 2009 +0000
     8.2 +++ b/librazor/Makefile.am	Wed Jan 07 17:17:10 2009 +0000
     8.3 @@ -1,6 +1,7 @@
     8.4  ## Process this file with automake to produce Makefile.in
     8.5  
     8.6  INCLUDES = \
     8.7 +	-I$(top_builddir)/gl -I$(top_srcdir)/gl \
     8.8  	-I$(top_builddir)/src -I$(top_srcdir)/src \
     8.9  	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
    8.10  	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
    8.11 @@ -30,7 +31,7 @@
    8.12  	merger.c					\
    8.13  	transaction.c
    8.14  
    8.15 -librazor_la_LIBADD = $(ZLIB_LIBS)
    8.16 +librazor_la_LIBADD = $(ZLIB_LIBS) ../gl/libgnu.la
    8.17  
    8.18  clean-local :
    8.19  	rm -f *~