1 AC_INIT(libxslt/xslt.c)
4 dnl libxslt is the main part of the package
6 LIBXSLT_MAJOR_VERSION=1
7 LIBXSLT_MINOR_VERSION=0
8 LIBXSLT_MICRO_VERSION=3
10 LIBEXSLT_MAJOR_VERSION=0
11 LIBEXSLT_MINOR_VERSION=3
12 LIBEXSLT_MICRO_VERSION=1
13 LIBXML_REQUIRED_VERSION=2.4.3
16 LIBXSLT_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION.$LIBXSLT_MICRO_VERSION
17 LIBXSLT_VERSION_INFO=`expr $LIBXSLT_MAJOR_VERSION + $LIBXSLT_MINOR_VERSION`:$LIBXSLT_MICRO_VERSION:$LIBXSLT_MINOR_VERSION
19 LIBXSLT_VERSION_NUMBER=`expr $LIBXSLT_MAJOR_VERSION \* 10000 + $LIBXSLT_MINOR_VERSION \* 100 + $LIBXSLT_MICRO_VERSION`
21 AC_SUBST(LIBXSLT_MAJOR_VERSION)
22 AC_SUBST(LIBXSLT_MINOR_VERSION)
23 AC_SUBST(LIBXSLT_MICRO_VERSION)
24 AC_SUBST(LIBXSLT_VERSION)
25 AC_SUBST(LIBXSLT_VERSION_INFO)
26 AC_SUBST(LIBXSLT_VERSION_NUMBER)
29 dnl libexslt is an extension library
32 LIBEXSLT_VERSION=$LIBEXSLT_MAJOR_VERSION.$LIBEXSLT_MINOR_VERSION.$LIBEXSLT_MICRO_VERSION
33 LIBEXSLT_VERSION_INFO=`expr $LIBEXSLT_MAJOR_VERSION + $LIBEXSLT_MINOR_VERSION`:$LIBEXSLT_MICRO_VERSION:$LIBEXSLT_MINOR_VERSION
35 LIBEXSLT_VERSION_NUMBER=`expr $LIBEXSLT_MAJOR_VERSION \* 10000 + $LIBEXSLT_MINOR_VERSION \* 100 + $LIBEXSLT_MICRO_VERSION`
37 AC_SUBST(LIBEXSLT_MAJOR_VERSION)
38 AC_SUBST(LIBEXSLT_MINOR_VERSION)
39 AC_SUBST(LIBEXSLT_MICRO_VERSION)
40 AC_SUBST(LIBEXSLT_VERSION)
41 AC_SUBST(LIBEXSLT_VERSION_INFO)
42 AC_SUBST(LIBEXSLT_VERSION_NUMBER)
45 VERSION=${LIBXSLT_VERSION}
47 AM_CONFIG_HEADER(config.h)
48 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
51 AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
54 dnl Specific dir for HTML output ?
57 if test "x$with_html_dir" = "x" ; then
58 HTML_DIR='$(prefix)/doc'
60 HTML_DIR=$with_html_dir
65 dnl Check the environment
78 AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h)
79 AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h ansidecl.h)
80 AC_CHECK_HEADERS(time.h)
82 AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
83 [M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)]))
85 AC_CHECK_FUNC(isinf, , AC_CHECK_LIB(m, isinf,
86 [M_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)]))
88 AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow,
89 [M_LIBS="-lm"; AC_DEFINE(HAVE_POW)]))
91 AC_CHECK_FUNC(floor, , AC_CHECK_LIB(m, pow,
92 [M_LIBS="-lm"; AC_DEFINE(HAVE_FLOOR)]))
94 AC_CHECK_FUNC(fabs, , AC_CHECK_LIB(m, pow,
95 [M_LIBS="-lm"; AC_DEFINE(HAVE_FABS)]))
96 AC_CHECK_FUNCS(gettimeofday)
97 AC_CHECK_FUNCS(mktime localtime asctime)
100 dnl Perl is just needed for generating some data for XSLtmark
103 AC_CHECK_PROG(PERL, perl, perl, false)
104 AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
107 dnl Debug for DV (-Wunreachable-code)
109 if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ; then
110 if test "${with_mem_debug}" = "" ; then
113 CFLAGS="-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline "
116 AC_ARG_WITH(debug, [ --with-debug Add the debugging code (on)])
117 if test "$with_debug" = "no" ; then
118 echo Disabling debug support
123 AC_SUBST(WITH_XSLT_DEBUG)
125 AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)])
126 if test "$with_mem_debug" = "yes" ; then
127 echo Enabling memory debug support
132 AC_SUBST(WITH_MEM_DEBUG)
135 dnl The following new parameters were added to offer
136 dnl the ability to specify the location of the libxml
137 dnl library during linking and compilation.
138 dnl Mathieu Lacage 30/03/2000
141 AC_ARG_WITH(libxml-prefix,
142 [ --with-libxml-prefix=[PFX] Specify location of libxml],
143 LIBXML_PREFIX=$withval
146 AC_ARG_WITH(libxml-include-prefix,
147 [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
148 LIBXML_CFLAGS="-I$withval"
151 AC_ARG_WITH(libxml-libs-prefix,
152 [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
153 LIBXML_LIBS="-L$withval -lxml -lz"
157 dnl No internationalization (yet ?)
159 dnl ALL_LINGUAS="it ko fr de es no ga sv pt ja fi cs"
162 dnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
171 XML_CONFIG="xml2-config"
172 AC_SUBST(LIBXML_REQUIRED_VERSION)
173 AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION)
174 if test "x$LIBXML_PREFIX" != "x"
176 if ${LIBXML_PREFIX}/bin/xml2-config --libs print > /dev/null 2>&1
178 XML_CONFIG=${LIBXML_PREFIX}/bin/xml2-config
180 XML_CONFIG=xml2-config
184 AC_DEFUN(VERSION_TO_NUMBER,
185 [`$1 | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`])
188 dnl test version and init our variables
190 if test "x$XML_CONFIG" != "x"
192 vers=VERSION_TO_NUMBER($XML_CONFIG --version)
193 if test "$vers" -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
195 LIBXML_LIBS="`$XML_CONFIG --libs`"
196 LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
199 AC_MSG_ERROR(You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
202 AC_MSG_ERROR(Could not find libxml2 anywhere, check ftp://xmlsoft.org/.)
206 dnl In build tree I use a static version with memory debug enabled
207 dnl libtool 1.4 tries to use the shared lib and this won't work
209 dnl if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ; then
210 dnl LIBXML_LIBS="./libxml2.a"
214 AC_SUBST(LIBXML_LIBS)
215 AC_SUBST(LIBXML_CFLAGS)
217 XSLT_LIBDIR='-L${libdir}'
218 XSLT_INCLUDEDIR='-I${includedir}'
219 EXTRA_LIBS="$LIBXML_LIBS $M_LIBS"
220 XSLT_LIBS="-lxslt $LIBXML_LIBS $M_LIBS"
222 AC_SUBST(XSLT_LIBDIR)
223 AC_SUBST(XSLT_INCLUDEDIR)
231 libxslt/xsltwin32config.h
233 libexslt/exsltconfig.h
240 tests/general/Makefile
241 tests/extensions/Makefile
242 tests/namespaces/Makefile
243 tests/numbers/Makefile
244 tests/documents/Makefile
245 tests/xmlspec/Makefile
246 tests/multiple/Makefile
247 tests/XSLTMark/Makefile
248 tests/docbook/Makefile
250 tests/exslt/common/Makefile
251 tests/exslt/functions/Makefile
252 tests/exslt/math/Makefile
253 tests/exslt/sets/Makefile