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
13AC_INIT(Makefile.in)
14AC_CONFIG_AUX_DIR(conftools)
15AC_CONFIG_MACRO_DIR(.)
16
17dnl
18dnl Follow the GNU/Linux convention of odd number minor version for
19dnl beta/development releases and even number minor version for stable
20dnl releases. Edit is bumped with each release and set to 0 with
21dnl change to major or minor version.
22dnl
23
24EXPAT_MAJOR_VERSION=1
25EXPAT_MINOR_VERSION=95
26EXPAT_EDIT=2
27
28EXPAT_VERSION=$EXPAT_MAJOR_VERSION.$EXPAT_MINOR_VERSION.$EXPAT_EDIT
29VERSION=$EXPAT_VERSION
30PACKAGE=expat
31
32dnl
33dnl Increment LIBREVISION if source code has changed at all
34dnl
35dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
36dnl
37dnl If the API changes compatibly (i.e. simply adding a new function
38dnl without changing or removing earlier interfaces), then increment LIBAGE.
39dnl
40dnl If the API changes incompatibly set LIBAGE back to 0
41dnl
42
43LIBCURRENT=1
44LIBREVISION=0
45LIBAGE=1
46
47AC_CONFIG_HEADER(config.h)
48
49AC_CANONICAL_SYSTEM
50case "$host_os" in
51*os2*)
52    # Use a custom made libtool replacement
53    echo Using aplibtool
54    LIBTOOL="$srcdir/../../../apr/build/aplibtool"
55    ;;
56*)
57    AC_LIBTOOL_WIN32_DLL
58AC_PROG_LIBTOOL
59    ;;
60esac
61
62blddir=`pwd`
63AC_SUBST(blddir)
64
65AC_SUBST(PACKAGE)
66AC_SUBST(VERSION)
67AC_SUBST(EXPAT_MAJOR_VERSION)
68AC_SUBST(EXPAT_MINOR_VERSION)
69AC_SUBST(EXPAT_EDIT)
70
71AC_SUBST(LIBCURRENT)
72AC_SUBST(LIBREVISION)
73AC_SUBST(LIBAGE)
74
75dnl Checks for programs.
76AC_PROG_CC
77AC_PROG_INSTALL
78
79dnl Checks for libraries.
80
81dnl Checks for header files.
82AC_HEADER_STDC
83AC_CHECK_HEADERS(fcntl.h unistd.h string.h)
84
85dnl Checks for typedefs, structures, and compiler characteristics.
86dnl check for endianness
87if test "$cross_compiling" = "no"; then
88  AC_C_BIGENDIAN
89else
90  AC_DEFINE(AP_UNKNOWN_BYTE_ORDER,1,[byte order is unknown due to cross-compilation])
91fi
92
93if test "$ac_cv_c_bigendian" = "yes"; then
94  AC_DEFINE(XML_BYTE_ORDER,21,[21 for big endian or 12 for little])
95else
96  AC_DEFINE(XML_BYTE_ORDER,12,[z])
97fi
98
99AC_DEFINE(XML_NS,,[Define me])
100AC_DEFINE(XML_DTD,,[Define me])
101AC_DEFINE(XML_CONTEXT_BYTES,1024,[1024])
102
103AC_C_CONST
104AC_TYPE_OFF_T
105AC_TYPE_SIZE_T
106
107dnl Checks for library functions.
108
109AC_FUNC_MEMCMP
110AC_FUNC_MMAP
111AC_SUBST(FILEMAP_OBJ)
112if test -z "$HAVE_MMAP"; then
113FILEMAP_OBJ=unixfilemap.o
114else
115FILEMAP_OBJ=readfilemap.o
116fi
117
118AC_CHECK_FUNCS(memmove bcopy)
119
120AC_OUTPUT(Makefile lib/Makefile lib/expat.h)
121