1 dnl configuration script for expat
2 dnl Process this file with autoconf to produce a configure script.
4 dnl Copyright 2000 Clark Cooper
6 dnl This file is part of EXPAT.
8 dnl EXPAT is free software; you can redistribute it and/or modify it
9 dnl under the terms of the License (based on the MIT/X license) contained
10 dnl in the file COPYING that comes with this distribution.
13 dnl Ensure that Expat is configured with autoconf 2.52 or newer
16 dnl Get the version number of Expat, using m4's esyscmd() command to run
17 dnl the command at m4-generation time. This allows us to create an m4
18 dnl symbol holding the correct version number. AC_INIT() requires the
19 dnl version number at m4-time, rather than when ./configure is run, so
20 dnl all this must happen as part of m4, not as part of the shell code
21 dnl contained in ./configure.
23 dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate
24 dnl test. I believe this test will work, but I don't have a place with non-
25 dnl GNU M4 to test it right now.
26 define([expat_version], ifdef([__gnu__],
27 [esyscmd(conftools/get-version.sh lib/expat.h)],
29 AC_INIT(expat, expat_version, expat-bugs@mail.libexpat.org)
30 undefine([expat_version])
32 AC_CONFIG_SRCDIR(Makefile.in)
33 AC_CONFIG_AUX_DIR(conftools)
37 dnl Increment LIBREVISION if source code has changed at all
39 dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
41 dnl If the API changes compatibly (i.e. simply adding a new function
42 dnl without changing or removing earlier interfaces), then increment LIBAGE.
44 dnl If the API changes incompatibly set LIBAGE back to 0
51 AC_CONFIG_HEADER(expat_config.h)
53 sinclude(conftools/libtool.m4)
54 sinclude(conftools/ac_c_bigendian_cross.m4)
63 dnl Checks for programs.
67 if test "$GCC" = yes ; then
69 dnl Be careful about adding the -fexceptions option; some versions of
70 dnl GCC don't support it and it causes extra warnings that are only
71 dnl distracting; avoid.
73 OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
74 CFLAGS="$OLDCFLAGS -fexceptions"
75 AC_MSG_CHECKING(whether gcc accepts -fexceptions)
76 AC_TRY_COMPILE(,(void)1,
78 AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS")
81 dnl Checks for header files.
83 AC_CHECK_HEADERS(fcntl.h unistd.h)
85 dnl Checks for typedefs, structures, and compiler characteristics.
87 dnl Note: Avoid using AC_C_BIGENDIAN because it does not
88 dnl work in a cross compile.
95 dnl Checks for library functions.
100 if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
107 AC_CHECK_FUNCS(memmove bcopy)
109 dnl some basic configuration
110 AC_DEFINE([XML_NS], 1,
111 [Define to make XML Namespaces functionality available.])
112 AC_DEFINE([XML_DTD], 1,
113 [Define to make parameter entity parsing functionality available.])
114 AC_DEFINE([XML_CONTEXT_BYTES], 1024,
115 [Define to specify how much context to retain around the current parse point.])
117 AC_CONFIG_FILES(Makefile)
120 abs_srcdir="`cd $srcdir && pwd`"
122 if test "$abs_srcdir" != "$abs_builddir"; then