1dnl   configuration script for expat
2dnl   Process this file with autoconf to produce a configure script.
3dnl
4dnl   Copyright 2000 Clark Cooper
5dnl
6dnl   This file is part of EXPAT.
7dnl
8dnl   EXPAT is free software; you can redistribute it and/or modify it
9dnl   under the terms of the License (based on the MIT/X license) contained
10dnl   in the file COPYING that comes with this distribution.
11dnl
12
13dnl Ensure that Expat is configured with autoconf 2.52 or newer
14AC_PREREQ(2.52)
15
16
17dnl ### apr-util hack: just hard-code the version here, as is done in expat.h.
18AC_INIT(expat, 1.95.7, expat-bugs@mail.libexpat.org)
19
20AC_CONFIG_SRCDIR(Makefile.in)
21AC_CONFIG_AUX_DIR(conftools)
22AC_CONFIG_MACRO_DIR(conftools)
23
24dnl
25dnl Increment LIBREVISION if source code has changed at all
26dnl
27dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
28dnl
29dnl If the API changes compatibly (i.e. simply adding a new function
30dnl without changing or removing earlier interfaces), then increment LIBAGE.
31dnl 
32dnl If the API changes incompatibly set LIBAGE back to 0
33dnl
34
35LIBCURRENT=5
36LIBREVISION=0
37LIBAGE=5
38
39AC_CONFIG_HEADER(expat_config.h)
40
41sinclude(conftools/ac_c_bigendian_cross.m4)
42
43AC_CANONICAL_SYSTEM
44
45case "$host_os" in
46*os2*)
47    # Use a custom made libtool replacement
48    echo Using aplibtool
49    LIBTOOL="$srcdir/../../../apr/build/aplibtool"
50    ;;
51*)
52AC_LIBTOOL_WIN32_DLL
53AC_PROG_LIBTOOL
54    ;;
55esac
56
57AC_SUBST(LIBCURRENT)
58AC_SUBST(LIBREVISION)
59AC_SUBST(LIBAGE)
60
61dnl Checks for programs.
62AC_PROG_CC
63AC_PROG_INSTALL
64
65dnl Checks for header files.
66AC_HEADER_STDC
67
68dnl Checks for typedefs, structures, and compiler characteristics.
69dnl check for endianness
70if test "$cross_compiling" = "no"; then
71  AC_C_BIGENDIAN
72else
73  AC_DEFINE(AP_UNKNOWN_BYTE_ORDER,1,
74                [byte order is unknown due to cross-compilation])
75fi
76AC_C_CONST
77AC_TYPE_SIZE_T
78AC_CHECK_FUNCS(memmove bcopy)
79
80dnl Only needed for regression tests:
81AC_CHECK_HEADERS(check.h)
82
83dnl Some basic configuration:
84AC_DEFINE([XML_NS], 1,
85          [Define to make XML Namespaces functionality available.])
86AC_DEFINE([XML_DTD], 1,
87          [Define to make parameter entity parsing functionality available.])
88AC_DEFINE([XML_CONTEXT_BYTES], 1024,
89          [Define to specify how much context to retain around the current parse point.])
90
91AC_CONFIG_FILES(Makefile)
92AC_OUTPUT
93
94abs_srcdir="`cd $srcdir && pwd`"
95abs_builddir="`pwd`"
96if test "$abs_srcdir" != "$abs_builddir"; then
97  mkdir lib
98fi
99
100