source: trunk/poppler/expat-1.95.8/configure.in @ 14

Last change on this file since 14 was 2, checked in by Eugene Romanenko, 16 years ago

First import

File size: 3.7 KB
Line 
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
16dnl Get the version number of Expat, using m4's esyscmd() command to run
17dnl the command at m4-generation time. This allows us to create an m4
18dnl symbol holding the correct version number. AC_INIT() requires the
19dnl version number at m4-time, rather than when ./configure is run, so
20dnl all this must happen as part of m4, not as part of the shell code
21dnl contained in ./configure.
22dnl
23dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate
24dnl test. I believe this test will work, but I don't have a place with non-
25dnl GNU M4 to test it right now.
26define([expat_version], ifdef([__gnu__],
27                              [esyscmd(conftools/get-version.sh lib/expat.h)],
28                              [1.95.x]))
29AC_INIT(expat, expat_version, expat-bugs@mail.libexpat.org)
30undefine([expat_version])
31
32AC_CONFIG_SRCDIR(Makefile.in)
33AC_CONFIG_AUX_DIR(conftools)
34
35
36dnl
37dnl Increment LIBREVISION if source code has changed at all
38dnl
39dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
40dnl
41dnl If the API changes compatibly (i.e. simply adding a new function
42dnl without changing or removing earlier interfaces), then increment LIBAGE.
43dnl
44dnl If the API changes incompatibly set LIBAGE back to 0
45dnl
46
47LIBCURRENT=5
48LIBREVISION=0
49LIBAGE=5
50
51AC_CONFIG_HEADER(expat_config.h)
52
53sinclude(conftools/libtool.m4)
54sinclude(conftools/ac_c_bigendian_cross.m4)
55
56AC_LIBTOOL_WIN32_DLL
57AC_PROG_LIBTOOL
58
59AC_SUBST(LIBCURRENT)
60AC_SUBST(LIBREVISION)
61AC_SUBST(LIBAGE)
62
63dnl Checks for programs.
64AC_PROG_CC
65AC_PROG_INSTALL
66
67if test "$GCC" = yes ; then
68    dnl
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.
72    dnl
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,
77                   AC_MSG_RESULT(yes),
78                   AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS")
79fi
80
81dnl Checks for header files.
82AC_HEADER_STDC
83
84dnl Checks for typedefs, structures, and compiler characteristics.
85
86dnl Note: Avoid using AC_C_BIGENDIAN because it does not
87dnl work in a cross compile.
88AC_C_BIGENDIAN_CROSS
89
90AC_C_CONST
91AC_TYPE_SIZE_T
92AC_CHECK_FUNCS(memmove bcopy)
93
94dnl Only needed for xmlwf:
95AC_CHECK_HEADERS(fcntl.h unistd.h)
96AC_TYPE_OFF_T
97AC_FUNC_MMAP
98
99if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
100    FILEMAP=unixfilemap
101else
102    FILEMAP=readfilemap
103fi
104AC_SUBST(FILEMAP)
105
106dnl Only needed for regression tests:
107AC_SUBST(MINICHECK_OBJECT)
108AC_SUBST(CHECK_LIBRARY)
109AC_CHECK_HEADERS(check.h)
110AC_CHECK_HEADER(check.h,
111                CHECK_LIBRARY=-lcheck,
112                MINICHECK_OBJECT=tests/minicheck.o)
113
114dnl Some basic configuration:
115AC_DEFINE([XML_NS], 1,
116          [Define to make XML Namespaces functionality available.])
117AC_DEFINE([XML_DTD], 1,
118          [Define to make parameter entity parsing functionality available.])
119AC_DEFINE([XML_CONTEXT_BYTES], 1024,
120          [Define to specify how much context to retain around the current parse point.])
121
122AC_CONFIG_FILES(Makefile)
123AC_OUTPUT
124
125abs_srcdir="`cd $srcdir && pwd`"
126abs_builddir="`pwd`"
127if test "$abs_srcdir" != "$abs_builddir"; then
128  make mkdir-init
129fi
Note: See TracBrowser for help on using the repository browser.