1 AC_INIT(libxslt/xslt.c)
3 LIBXSLT_MAJOR_VERSION=0
4 LIBXSLT_MINOR_VERSION=13
5 LIBXSLT_MICRO_VERSION=0
8 LIBXSLT_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION.$LIBXSLT_MICRO_VERSION
9 LIBXSLT_VERSION_INFO=`expr $LIBXSLT_MAJOR_VERSION + $LIBXSLT_MINOR_VERSION`:$LIBXSLT_MICRO_VERSION:$LIBXSLT_MINOR_VERSION
11 LIBXSLT_VERSION_NUMBER=`expr $LIBXSLT_MAJOR_VERSION \* 10000 + $LIBXSLT_MINOR_VERSION \* 100 + $LIBXSLT_MICRO_VERSION`
13 AC_SUBST(LIBXSLT_MAJOR_VERSION)
14 AC_SUBST(LIBXSLT_MINOR_VERSION)
15 AC_SUBST(LIBXSLT_MICRO_VERSION)
16 AC_SUBST(LIBXSLT_VERSION)
17 AC_SUBST(LIBXSLT_VERSION_INFO)
18 AC_SUBST(LIBXSLT_VERSION_NUMBER)
19 VERSION=${LIBXSLT_VERSION}
21 AM_CONFIG_HEADER(config.h)
22 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
26 dnl Check the environment
39 AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h)
40 AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h ansidecl.h)
41 AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
42 [M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)]))
44 AC_CHECK_FUNC(isinf, , AC_CHECK_LIB(m, isinf,
45 [M_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)]))
47 AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow,
48 [M_LIBS="-lm"; AC_DEFINE(HAVE_POW)]))
50 AC_CHECK_FUNC(floor, , AC_CHECK_LIB(m, pow,
51 [M_LIBS="-lm"; AC_DEFINE(HAVE_FLOOR)]))
53 AC_CHECK_FUNC(fabs, , AC_CHECK_LIB(m, pow,
54 [M_LIBS="-lm"; AC_DEFINE(HAVE_FABS)]))
57 dnl Perl is just needed for generating some data for XSLtmark
60 AC_CHECK_PROG(PERL, perl, perl, false)
61 AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
64 dnl Debug for DV (-Wunreachable-code)
66 if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ; then
67 if test "${with_mem_debug}" = "" ; then
70 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 "
73 AC_ARG_WITH(debug, [ --with-debug Add the debugging code (on)])
74 if test "$with_debug" = "no" ; then
75 echo Disabling debug support
80 AC_SUBST(WITH_XSLT_DEBUG)
82 AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)])
83 if test "$with_mem_debug" = "yes" ; then
84 echo Enabling memory debug support
89 AC_SUBST(WITH_MEM_DEBUG)
92 dnl The following new parameters were added to offer
93 dnl the ability to specify the location of the libxml
94 dnl library during linking and compilation.
95 dnl Mathieu Lacage 30/03/2000
98 AC_ARG_WITH(libxml-prefix,
99 [ --with-libxml-prefix=[PFX] Specify location of libxml],
100 LIBXML_PREFIX=$withval
103 AC_ARG_WITH(libxml-include-prefix,
104 [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
105 LIBXML_CFLAGS="-I$withval"
108 AC_ARG_WITH(libxml-libs-prefix,
109 [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
110 LIBXML_LIBS="-L$withval -lxml -lz"
114 dnl No internationalization (yet ?)
116 dnl ALL_LINGUAS="it ko fr de es no ga sv pt ja fi cs"
119 dnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
128 XML_CONFIG="xml2-config"
129 LIBXML_REQUIRED_VERSION=2.3.12
130 AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION)
131 if test "x$LIBXML_PREFIX" != "x"
133 if ${LIBXML_PREFIX}/bin/xml2-config --libs print > /dev/null 2>&1
135 XML_CONFIG=${LIBXML_PREFIX}/bin/xml2-config
137 XML_CONFIG=xml2-config
141 AC_DEFUN(VERSION_TO_NUMBER,
142 [`$1 | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`])
145 dnl test version and init our variables
147 if test "x$XML_CONFIG" != "x"
149 vers=VERSION_TO_NUMBER($XML_CONFIG --version)
150 if test "$vers" -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
152 LIBXML_LIBS="`$XML_CONFIG --libs`"
153 LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
156 AC_MSG_ERROR(You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
159 AC_MSG_ERROR(Could not find libxml2 anywhere, check ftp://xmlsoft.org/.)
164 AC_SUBST(LIBXML_LIBS)
165 AC_SUBST(LIBXML_CFLAGS)
167 XSLT_LIBDIR='-L${libdir}'
168 XSLT_INCLUDEDIR='-I${includedir}'
169 EXTRA_LIBS="$LIBXML_LIBS $M_LIBS"
170 XSLT_LIBS="-lxslt $LIBXML_LIBS $M_LIBS"
172 AC_SUBST(XSLT_LIBDIR)
173 AC_SUBST(XSLT_INCLUDEDIR)
181 libxslt/xsltwin32config.h
187 tests/general/Makefile
188 tests/namespaces/Makefile
189 tests/numbers/Makefile
190 tests/documents/Makefile
191 tests/xmlspec/Makefile
192 tests/multiple/Makefile
193 tests/XSLTMark/Makefile
194 tests/docbook/Makefile