blob: f0a62eaabd864c5df05b4e0deec6a911ea5332ea [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001dnl Process this file with autoconf to produce a configure script.
Daniel Veillard5d04ad12012-09-11 17:17:15 +08002AC_PREREQ([2.63])
Daniel Richard Gec4fc522012-08-17 10:04:30 +08003AC_INIT
4AC_CONFIG_SRCDIR([entities.c])
5AC_CONFIG_HEADERS([config.h])
Daniel Veillard3157e512010-03-09 11:32:46 +01006AC_CONFIG_MACRO_DIR([m4])
Daniel Veillardd2ade932000-09-30 14:39:55 +00007AC_CANONICAL_HOST
Daniel Veillard14fff061999-06-22 21:49:07 +00008
Daniel Veillardcf461992000-03-14 18:30:20 +00009LIBXML_MAJOR_VERSION=2
Daniel Veillardaa017c52012-08-10 10:42:56 +080010LIBXML_MINOR_VERSION=9
Daniel Veillardf4e5a692013-04-19 15:36:36 +080011LIBXML_MICRO_VERSION=1
Daniel Veillard3e35f8e2003-10-21 00:05:38 +000012LIBXML_MICRO_VERSION_SUFFIX=
Daniel Veillard4fc52812003-09-01 20:33:13 +000013LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
Daniel Veillard14fff061999-06-22 21:49:07 +000014LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
15
Daniel Veillard361d8452000-04-03 19:48:13 +000016LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
17
Daniel Veillard9cb1b642007-01-03 15:07:44 +000018if test -f CVS/Entries ; then
Daniel Veillarddab93ea2004-08-20 16:47:10 +000019 extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
20 echo extra=$extra
21 if test "$extra" != ""
22 then
23 LIBXML_VERSION_EXTRA="-CVS$extra"
24 fi
Daniel Veillard9cb1b642007-01-03 15:07:44 +000025else if test -d .svn ; then
26 extra=`svn info | grep Revision | sed 's+Revision: ++'`
27 echo extra=$extra
28 if test "$extra" != ""
29 then
30 LIBXML_VERSION_EXTRA="-SVN$extra"
31 fi
veillard97c7be62009-05-12 08:43:54 +020032else if test -d .git ; then
Christian Dywan040dcb52012-05-10 22:55:07 +080033 extra=`git describe 2>/dev/null | sed 's+LIBXML[[0-9.]]*-++'`
veillard97c7be62009-05-12 08:43:54 +020034 echo extra=$extra
35 if test "$extra" != ""
36 then
37 LIBXML_VERSION_EXTRA="-GIT$extra"
38 fi
39fi
Daniel Veillard9cb1b642007-01-03 15:07:44 +000040fi
William M. Brackf4025492004-08-18 21:08:46 +000041fi
Daniel Veillard14fff061999-06-22 21:49:07 +000042AC_SUBST(LIBXML_MAJOR_VERSION)
43AC_SUBST(LIBXML_MINOR_VERSION)
44AC_SUBST(LIBXML_MICRO_VERSION)
45AC_SUBST(LIBXML_VERSION)
46AC_SUBST(LIBXML_VERSION_INFO)
Daniel Veillard361d8452000-04-03 19:48:13 +000047AC_SUBST(LIBXML_VERSION_NUMBER)
William M. Brackf4025492004-08-18 21:08:46 +000048AC_SUBST(LIBXML_VERSION_EXTRA)
Daniel Veillard14fff061999-06-22 21:49:07 +000049
Daniel Veillard361d8452000-04-03 19:48:13 +000050VERSION=${LIBXML_VERSION}
Daniel Veillard14fff061999-06-22 21:49:07 +000051
Daniel Veillardedfb29b2000-03-14 19:59:05 +000052AM_INIT_AUTOMAKE(libxml2, $VERSION)
Daniel Veillard1164e751999-02-16 16:29:17 +000053
Stefan Kostc9c939d2011-05-10 10:34:41 +030054# Support silent build rules, requires at least automake-1.11. Disable
55# by either passing --disable-silent-rules to configure or passing V=1
56# to make
57m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
58
Daniel Veillard01791d51998-07-24 19:24:09 +000059dnl Checks for programs.
60AC_PROG_CC
61AC_PROG_INSTALL
Daniel Richard G5706b6d2012-08-06 11:32:54 +080062AC_PROG_LN_S
Adrian Bunk64b0d602010-11-04 09:43:31 +010063AC_PROG_MKDIR_P
Sebastian Wilhelmia44c8a41998-08-07 08:38:58 +000064AC_PROG_CPP
Daniel Veillard01791d51998-07-24 19:24:09 +000065AC_PATH_PROG(MV, mv, /bin/mv)
66AC_PATH_PROG(TAR, tar, /bin/tar)
William M. Brack1826d0a2004-07-21 09:03:57 +000067AC_PATH_PROG(PERL, perl, /usr/bin/perl)
Daniel Veillard33a2de92006-10-11 08:33:22 +000068AC_PATH_PROG(WGET, wget, /usr/bin/wget)
Daniel Veillard8b817da2004-09-30 09:19:33 +000069AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
Daniel Veillard06500c82004-09-07 09:12:44 +000070AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
Philip Withnallf3f86ff2013-10-28 17:24:02 +000071PKG_PROG_PKG_CONFIG
Daniel Veillard01791d51998-07-24 19:24:09 +000072
Daniel Richard G5706b6d2012-08-06 11:32:54 +080073LT_INIT
Daniel Veillard01791d51998-07-24 19:24:09 +000074
Daniel Veillard4432df22003-09-28 18:58:27 +000075dnl
Daniel Veillard8ed10722009-08-20 19:17:36 +020076dnl if the system support linker version scripts for symbol versioning
77dnl then add it
78dnl
79VERSION_SCRIPT_FLAGS=
Roumen Petrovf39adc22010-03-11 14:49:13 +010080# lt_cv_prog_gnu_ld is from libtool 2.+
81if test "$lt_cv_prog_gnu_ld" = yes; then
82 VERSION_SCRIPT_FLAGS=-Wl,--version-script=
83else
84 case $host in
85 *-*-sunos*) VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,";;
86 esac
87fi
Daniel Veillard8ed10722009-08-20 19:17:36 +020088AC_SUBST(VERSION_SCRIPT_FLAGS)
Daniel Veillard00819872010-11-04 21:53:14 +010089AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
Daniel Veillard8ed10722009-08-20 19:17:36 +020090
91dnl
William M. Brack21e4ef22005-01-02 09:53:13 +000092dnl We process the AC_ARG_WITH first so that later we can modify
93dnl some of them to try to prevent impossible combinations. This
94dnl also allows up so alphabetize the choices
Daniel Veillard4432df22003-09-28 18:58:27 +000095dnl
Daniel Veillard4432df22003-09-28 18:58:27 +000096
William M. Brack21e4ef22005-01-02 09:53:13 +000097dnl
98dnl zlib option might change flags, so we save them initially
99dnl
Owen Taylor3473f882001-02-23 17:55:21 +0000100_cppflags="${CPPFLAGS}"
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +0800101_libs="${LIBS}"
Daniel Veillard71b656e2000-01-05 14:46:17 +0000102
William M. Brack21e4ef22005-01-02 09:53:13 +0000103AC_ARG_WITH(c14n,
104[ --with-c14n add the Canonicalization support (on)])
105AC_ARG_WITH(catalog,
106[ --with-catalog add the Catalog support (on)])
107AC_ARG_WITH(debug,
108[ --with-debug add the debugging module (on)])
109AC_ARG_WITH(docbook,
110[ --with-docbook add Docbook SGML support (on)])
111AC_ARG_WITH(fexceptions,
112[ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)])
113AC_ARG_WITH(ftp,
114[ --with-ftp add the FTP support (on)])
115AC_ARG_WITH(history,
116[ --with-history add history support to xmllint shell(off)])
117AC_ARG_WITH(html,
118[ --with-html add the HTML support (on)])
119dnl Specific dir for HTML output ?
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800120AC_ARG_WITH(html-dir, AS_HELP_STRING([--with-html-dir=path],
William M. Brack21e4ef22005-01-02 09:53:13 +0000121 [path to base html directory, default $datadir/doc/html]),
122 [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])
Daniel Veillard259ff742001-10-06 13:49:59 +0000123
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800124AC_ARG_WITH(html-subdir, AS_HELP_STRING([--with-html-subdir=path],
William M. Brack21e4ef22005-01-02 09:53:13 +0000125 [directory used under html-dir, default $PACKAGE-$VERSION/html]),
126 [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"],
127 [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
128AC_SUBST(HTML_DIR)
129AC_ARG_WITH(http,
130[ --with-http add the HTTP support (on)])
131AC_ARG_WITH(iconv,
132[ --with-iconv[[=DIR]] add ICONV support (on)])
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +0100133AC_ARG_WITH(icu,
134[ --with-icu add ICU support (off)])
William M. Brack21e4ef22005-01-02 09:53:13 +0000135AC_ARG_WITH(iso8859x,
136[ --with-iso8859x add ISO8859X support if no iconv (on)])
137AC_ARG_WITH(legacy,
138[ --with-legacy add deprecated APIs for compatibility (on)])
139AC_ARG_WITH(mem_debug,
140[ --with-mem-debug add the memory debugging module (off)])
141AC_ARG_WITH(minimum,
142[ --with-minimum build a minimally sized library (off)])
143AC_ARG_WITH(output,
144[ --with-output add the serialization support (on)])
145AC_ARG_WITH(pattern,
146[ --with-pattern add the xmlPattern selection interface (on)])
147AC_ARG_WITH(push,
148[ --with-push add the PUSH parser interfaces (on)])
149AC_ARG_WITH(python,
150[ --with-python[[=DIR]] build Python bindings if found])
Jonas Erikssonfcb1bb52014-03-06 09:13:17 +0100151AC_ARG_WITH(python_install_dir,
152[ --with-python-install-dir=DIR
153 install Python bindings in DIR])
William M. Brack21e4ef22005-01-02 09:53:13 +0000154AC_ARG_WITH(reader,
155[ --with-reader add the xmlReader parsing interface (on)])
156AC_ARG_WITH(readline,
157[ --with-readline=DIR use readline in DIR],[
158 if test "$withval" != "no" -a "$withval" != "yes"; then
159 RDL_DIR=$withval
160 CPPFLAGS="${CPPFLAGS} -I$withval/include"
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +0800161 LIBS="${LIBS} -L$withval/lib"
William M. Brack21e4ef22005-01-02 09:53:13 +0000162 fi
163])
164AC_ARG_WITH(regexps,
165[ --with-regexps add Regular Expressions support (on)])
166AC_ARG_WITH(run_debug,
167[ --with-run-debug add the runtime debugging module (off)])
168AC_ARG_WITH(sax1,
169[ --with-sax1 add the older SAX1 interface (on)])
170AC_ARG_WITH(schemas,
Daniel Veillard39e5c892005-07-03 22:48:50 +0000171[ --with-schemas add Relax-NG and Schemas support (on)])
Daniel Veillarded6c5492005-07-23 15:00:22 +0000172AC_ARG_WITH(schematron,
173[ --with-schematron add Schematron support (on)])
William M. Brack21e4ef22005-01-02 09:53:13 +0000174AC_ARG_WITH(threads,
175[ --with-threads add multithread support(on)])
176AC_ARG_WITH(thread-alloc,
177[ --with-thread-alloc add per-thread memory(off)])
178AC_ARG_WITH(tree,
179[ --with-tree add the DOM like tree manipulation APIs (on)])
180AC_ARG_WITH(valid,
181[ --with-valid add the DTD validation support (on)])
182AC_ARG_WITH(writer,
183[ --with-writer add the xmlWriter saving interface (on)])
184AC_ARG_WITH(xinclude,
185[ --with-xinclude add the XInclude support (on)])
186AC_ARG_WITH(xpath,
187[ --with-xpath add the XPATH support (on)])
188AC_ARG_WITH(xptr,
189[ --with-xptr add the XPointer support (on)])
Daniel Veillardf6b71bd2005-01-04 17:50:14 +0000190AC_ARG_WITH(modules,
191[ --with-modules add the dynamic modules support (on)])
Owen Taylor3473f882001-02-23 17:55:21 +0000192AC_ARG_WITH(zlib,
William M. Brack97ad4c72003-05-13 08:08:36 +0000193[ --with-zlib[[=DIR]] use libz in DIR],[
Owen Taylor3473f882001-02-23 17:55:21 +0000194 if test "$withval" != "no" -a "$withval" != "yes"; then
195 Z_DIR=$withval
196 CPPFLAGS="${CPPFLAGS} -I$withval/include"
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +0800197 LIBS="${LIBS} -L$withval/lib"
Owen Taylor3473f882001-02-23 17:55:21 +0000198 fi
Daniel Veillard259ff742001-10-06 13:49:59 +0000199])
Anders F Bjorklundeae52612011-09-18 16:59:13 +0200200AC_ARG_WITH(lzma,
201[ --with-lzma[[=DIR]] use liblzma in DIR],[
202 if test "$withval" != "no" -a "$withval" != "yes"; then
203 LZMA_DIR=$withval
204 CPPFLAGS="${CPPFLAGS} -I$withval/include"
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +0800205 LIBS="${LIBS} -L$withval/lib"
Anders F Bjorklundeae52612011-09-18 16:59:13 +0200206 fi
207])
Daniel Veillardbfa5cf12008-08-27 15:33:28 +0000208AC_ARG_WITH(coverage,
209[ --with-coverage build for code coverage with GCC (off)])
William M. Brack21e4ef22005-01-02 09:53:13 +0000210
Daniel Veillardb40744e2008-10-17 13:26:44 +0000211AC_ARG_ENABLE(rebuild-docs,
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800212[ --enable-rebuild-docs[[=yes/no]] rebuild some generated docs [[default=no]]])
Daniel Richard878ec9d2012-09-07 14:52:17 +0800213if test "$enable_rebuild_docs" = "yes" -a "$srcdir" != "."; then
214 AC_MSG_ERROR([cannot rebuild docs when builddir != srcdir])
215fi
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800216AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "yes" -o "$USER" = "veillard"])
Daniel Veillardb40744e2008-10-17 13:26:44 +0000217
William M. Brack21e4ef22005-01-02 09:53:13 +0000218dnl
Daniel Veillard39e5c892005-07-03 22:48:50 +0000219dnl hard dependancies on options
220dnl
221if test "$with_schemas" = "yes"
222then
223 with_pattern=yes
Daniel Veillardc51f51c2007-05-02 16:25:45 +0000224 with_regexps=yes
Daniel Veillard39e5c892005-07-03 22:48:50 +0000225fi
Daniel Veillarded6c5492005-07-23 15:00:22 +0000226if test "$with_schematron" = "yes"
227then
228 with_pattern=yes
Nicolas Le Cam1af8b7b2013-06-14 22:20:37 +0200229 with_tree=yes
Daniel Veillarded6c5492005-07-23 15:00:22 +0000230 with_xpath=yes
231fi
Daniel Veillard39e5c892005-07-03 22:48:50 +0000232if test "$with_reader" = "yes"
233then
234 with_push=yes
235fi
236if test "$with_xptr" = "yes"
237then
238 with_xpath=yes
239fi
240dnl
William M. Brack21e4ef22005-01-02 09:53:13 +0000241dnl option to build a minimal libxml2 library
242dnl
243if test "$with_minimum" = "yes"
Daniel Veillard4432df22003-09-28 18:58:27 +0000244then
William M. Brack21e4ef22005-01-02 09:53:13 +0000245 echo "Configuring for a minimal library"
246 if test "$with_c14n" = ""
247 then
248 with_c14n=no
249 fi
250 if test "$with_catalog" = ""
251 then
252 with_catalog=no
253 fi
254 echo So far so good!
255 if test "$with_debug" = ""
256 then
257 with_debug=no
258 fi
259 if test "$with_docbook" = ""
260 then
261 with_docbook=no
262 fi
263 if test "$with_fexceptions" = ""
264 then
265 with_fexceptions=no
266 fi
267 if test "$with_ftp" = ""
268 then
269 with_ftp=no
270 fi
271 if test "$with_history" = ""
272 then
273 with_history=no
274 fi
275 if test "$with_html" = ""
276 then
277 with_html=no
278 fi
279 if test "$with_http" = ""
280 then
281 with_http=no
282 fi
283 if test "$with_iconv" = ""
284 then
285 with_iconv=no
286 fi
287 if test "$with_iso8859x" = ""
288 then
289 with_iso8859x=no
290 fi
291 if test "$with_legacy" = ""
292 then
293 with_legacy=no
294 fi
295 if test "$with_mem_debug" = ""
296 then
297 with_mem_debug=no
298 fi
299 if test "$with_output" = ""
300 then
301 with_output=no
302 fi
303 if test "$with_pattern" = ""
304 then
305 with_pattern=no
306 fi
307 if test "$with_push" = ""
308 then
309 with_push=no
310 fi
311 if test "$with_python" = ""
312 then
313 with_python=no
314 fi
315 if test "$with_reader" = ""
316 then
317 with_reader=no
318 fi
319 if test "$with_readline" = ""
320 then
321 with_readline=no
322 fi
Daniel Veillardc51f51c2007-05-02 16:25:45 +0000323 if test "$with_regexps" = ""
William M. Brack21e4ef22005-01-02 09:53:13 +0000324 then
Daniel Veillardc51f51c2007-05-02 16:25:45 +0000325 with_regexps=no
William M. Brack21e4ef22005-01-02 09:53:13 +0000326 fi
327 if test "$with_run_debug" = ""
328 then
329 with_run_debug=no
330 fi
331 if test "$with_sax1" = ""
332 then
333 with_sax1=no
334 fi
335 if test "$with_schemas" = ""
336 then
337 with_schemas=no
338 fi
Daniel Veillarded6c5492005-07-23 15:00:22 +0000339 if test "$with_schematron" = ""
340 then
341 with_schematron=no
342 fi
William M. Brack21e4ef22005-01-02 09:53:13 +0000343 if test "$with_threads" = ""
344 then
345 with_threads=no
346 fi
347 if test "$with_thread_alloc" = ""
348 then
349 with_thread_alloc=no
350 fi
351 if test "$with_tree" = ""
352 then
353 with_tree=no
354 fi
355 if test "$with_valid" = ""
356 then
357 with_valid=no
358 fi
359 if test "$with_writer" = ""
360 then
361 with_writer=no
362 fi
363 if test "$with_xinclude" = ""
364 then
365 with_xinclude=no
366 fi
367 if test "$with_xpath" = ""
368 then
369 with_xpath=no
370 fi
371 if test "$with_xptr" = ""
372 then
373 with_xptr=no
374 fi
375 if test "$with_zlib" = ""
376 then
377 with_zlib=no
378 fi
Daniel Veillardf6b71bd2005-01-04 17:50:14 +0000379 if test "$with_modules" = ""
380 then
381 with_modules=no
382 fi
Daniel Veillard4432df22003-09-28 18:58:27 +0000383fi
William M. Brack21e4ef22005-01-02 09:53:13 +0000384
385echo Checking zlib
386
387dnl Checks for zlib library.
388
Daniel Veillard75acfee2006-07-13 06:29:56 +0000389WITH_ZLIB=0
Daniel Veillard259ff742001-10-06 13:49:59 +0000390if test "$with_zlib" = "no"; then
391 echo "Disabling compression support"
392else
Daniel Veillard3fbe8e32001-10-06 13:30:33 +0000393 AC_CHECK_HEADERS(zlib.h,
394 AC_CHECK_LIB(z, gzread,[
Daniel Veillard75acfee2006-07-13 06:29:56 +0000395 AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
396 WITH_ZLIB=1
Daniel Veillard3fbe8e32001-10-06 13:30:33 +0000397 if test "x${Z_DIR}" != "x"; then
398 Z_CFLAGS="-I${Z_DIR}/include"
399 Z_LIBS="-L${Z_DIR}/lib -lz"
400 [case ${host} in
401 *-*-solaris*)
402 Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
403 ;;
404 esac]
405 else
406 Z_LIBS="-lz"
407 fi]))
Daniel Veillard259ff742001-10-06 13:49:59 +0000408fi
Owen Taylor3473f882001-02-23 17:55:21 +0000409
Owen Taylor3473f882001-02-23 17:55:21 +0000410AC_SUBST(Z_CFLAGS)
411AC_SUBST(Z_LIBS)
Daniel Veillard75acfee2006-07-13 06:29:56 +0000412AC_SUBST(WITH_ZLIB)
Owen Taylor3473f882001-02-23 17:55:21 +0000413
Anders F Bjorklundeae52612011-09-18 16:59:13 +0200414echo Checking lzma
415
416dnl Checks for lzma library.
417
418WITH_LZMA=0
419if test "$with_lzma" = "no"; then
420 echo "Disabling compression support"
421else
Philip Withnallf3f86ff2013-10-28 17:24:02 +0000422 # Try pkg-config first so that static linking works.
423 # If this succeeeds, we ignore the WITH_LZMA directory.
424 PKG_CHECK_MODULES([LZMA],[liblzma],
425 [have_liblzma=yes],
426 [have_liblzma=no])
427
428 # If pkg-config failed, fall back to AC_CHECK_LIB. This
429 # will not pick up the necessary LIBS flags for liblzma's
430 # private dependencies, though, so static linking may fail.
431 if test "x$have_liblzma" = "xno"; then
432 AC_CHECK_HEADERS(lzma.h,
433 AC_CHECK_LIB(lzma, lzma_code,[
434 have_liblzma=yes
435 if test "x${LZMA_DIR}" != "x"; then
436 LZMA_CFLAGS="-I${LZMA_DIR}/include"
437 LZMA_LIBS="-L${LZMA_DIR}/lib -llzma"
438 else
439 LZMA_LIBS="-llzma"
440 fi],
441 [have_liblzma=no]))
442 fi
443
444 # Found the library via either method?
445 if test "x$have_liblzma" = "xyes"; then
446 AC_DEFINE([HAVE_LIBLZMA], [1], [Have compression library])
447 WITH_LZMA=1
448 fi
Anders F Bjorklundeae52612011-09-18 16:59:13 +0200449fi
450
451AC_SUBST(LZMA_CFLAGS)
452AC_SUBST(LZMA_LIBS)
453AC_SUBST(WITH_LZMA)
454
Owen Taylor3473f882001-02-23 17:55:21 +0000455CPPFLAGS=${_cppflags}
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +0800456LIBS=${_libs}
Daniel Veillardb05deb71999-08-10 19:04:08 +0000457
William M. Brack21e4ef22005-01-02 09:53:13 +0000458echo Checking headers
459
Daniel Veillard01791d51998-07-24 19:24:09 +0000460dnl Checks for header files.
461AC_HEADER_DIRENT
462AC_HEADER_STDC
Daniel Veillard817e70b2002-11-19 22:28:48 +0000463AC_CHECK_HEADERS([fcntl.h])
464AC_CHECK_HEADERS([unistd.h])
465AC_CHECK_HEADERS([ctype.h])
466AC_CHECK_HEADERS([dirent.h])
467AC_CHECK_HEADERS([errno.h])
468AC_CHECK_HEADERS([malloc.h])
469AC_CHECK_HEADERS([stdarg.h])
470AC_CHECK_HEADERS([sys/stat.h])
471AC_CHECK_HEADERS([sys/types.h])
Daniel Veillard7f4547c2008-10-03 07:58:23 +0000472AC_CHECK_HEADERS([stdint.h])
Daniel Mustielesbde9c352012-03-19 21:39:58 +0100473AC_CHECK_HEADERS([inttypes.h])
Daniel Veillard817e70b2002-11-19 22:28:48 +0000474AC_CHECK_HEADERS([time.h])
475AC_CHECK_HEADERS([ansidecl.h])
476AC_CHECK_HEADERS([ieeefp.h])
477AC_CHECK_HEADERS([nan.h])
478AC_CHECK_HEADERS([math.h])
Daniel Veillardebe48c62003-12-03 12:12:27 +0000479AC_CHECK_HEADERS([limits.h])
Daniel Veillard817e70b2002-11-19 22:28:48 +0000480AC_CHECK_HEADERS([fp_class.h])
481AC_CHECK_HEADERS([float.h])
482AC_CHECK_HEADERS([stdlib.h])
483AC_CHECK_HEADERS([sys/socket.h], [], [],
484[#if HAVE_SYS_TYPES_H
485# include <sys/types.h>
486# endif
487])
488AC_CHECK_HEADERS([netinet/in.h], [], [],
489[#if HAVE_SYS_TYPES_H
490# include <sys/types.h>
491# endif
492])
493AC_CHECK_HEADERS([arpa/inet.h], [], [],
494[#if HAVE_SYS_TYPES_H
495# include <sys/types.h>
496# endif
497#if HAVE_ARPA_INET_H
498# include <arpa/inet.h>
499# endif
500])
501AC_CHECK_HEADERS([netdb.h])
502AC_CHECK_HEADERS([sys/time.h])
503AC_CHECK_HEADERS([sys/select.h])
Raphael Prevost48b60c32009-08-23 13:11:01 +0200504AC_CHECK_HEADERS([poll.h])
Daniel Veillard817e70b2002-11-19 22:28:48 +0000505AC_CHECK_HEADERS([sys/mman.h])
506AC_CHECK_HEADERS([sys/timeb.h])
507AC_CHECK_HEADERS([signal.h])
508AC_CHECK_HEADERS([arpa/nameser.h], [], [],
509[#if HAVE_SYS_TYPES_H
510# include <sys/types.h>
511# endif
512])
513AC_CHECK_HEADERS([resolv.h], [], [],
514[#if HAVE_SYS_TYPES_H
515# include <sys/types.h>
516# endif
517#if HAVE_NETINET_IN_H
518# include <netinet/in.h>
519# endif
520#if HAVE_ARPA_NAMESER_H
521# include <arpa/nameser.h>
522# endif
523])
Daniel Veillarddcd93902005-01-13 11:25:15 +0000524AC_CHECK_HEADERS([dl.h])
525AC_CHECK_HEADERS([dlfcn.h])
Daniel Veillard01791d51998-07-24 19:24:09 +0000526
Daniel Veillardfc979062004-03-04 22:07:16 +0000527
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800528echo Checking types
529
530AC_TYPE_UINT32_T
531
532
William M. Brack21e4ef22005-01-02 09:53:13 +0000533echo Checking libraries
Daniel Veillard1164e751999-02-16 16:29:17 +0000534
Daniel Veillard01791d51998-07-24 19:24:09 +0000535dnl Checks for library functions.
536AC_FUNC_STRFTIME
Daniel Veillard92ad2102001-03-27 12:47:33 +0000537AC_CHECK_FUNCS(strdup strndup strerror)
Daniel Veillard71b656e2000-01-05 14:46:17 +0000538AC_CHECK_FUNCS(finite isnand fp_class class fpclass)
Daniel Veillard90bc3712002-03-07 15:12:58 +0000539AC_CHECK_FUNCS(strftime localtime gettimeofday ftime)
Daniel Veillard068a9652001-06-07 15:30:26 +0000540AC_CHECK_FUNCS(stat _stat signal)
Daniel Veillardd495e6a2012-05-20 20:48:34 +0800541AC_CHECK_FUNCS(rand rand_r srand time)
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800542AC_CHECK_FUNCS(isascii mmap munmap putenv)
543
544AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */
545#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
546# undef /**/ HAVE_MMAP
547#endif])
Daniel Veillard7f7d1111999-09-22 09:46:25 +0000548
William M. Brackf4caa5e2005-10-20 09:04:05 +0000549dnl Checking for va_copy availability
550AC_MSG_CHECKING([for va_copy])
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800551AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
552va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])],
William M. Brackf4caa5e2005-10-20 09:04:05 +0000553have_va_copy=yes,
554have_va_copy=no)
555AC_MSG_RESULT($have_va_copy)
556if test x"$have_va_copy" = x"yes"; then
557 AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
558else
559 AC_MSG_CHECKING([for __va_copy])
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800560 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
561 va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])],
William M. Brackf4caa5e2005-10-20 09:04:05 +0000562 have___va_copy=yes,
563 have___va_copy=no)
564 AC_MSG_RESULT($have___va_copy)
565 if test x"$have___va_copy" = x"yes"; then
566 AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
567 fi
568fi
569
Patrick Monneratd1c0cc92013-12-12 15:14:47 +0800570dnl Checking whether va_list is an array type
571AC_MSG_CHECKING([whether va_list is an array type])
572AC_TRY_COMPILE2([
573#include <stdarg.h>
574void a(va_list * ap) {}],[
575va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1],[
576 AC_MSG_RESULT(no)],[
577 AC_MSG_RESULT(yes)
578 AC_DEFINE([VA_LIST_IS_ARRAY], [1],[Define if va_list is an array type])])
579
Daniel Veillard7f7d1111999-09-22 09:46:25 +0000580dnl Checks for inet libraries:
Daniel Veillardd4e39ae2005-10-28 15:59:14 +0000581AC_SEARCH_LIBS(gethostent, [nsl])
Scott McCreary59f53082009-08-26 09:55:24 +0200582AC_SEARCH_LIBS(setsockopt, [socket net network])
Daniel Veillardd4e39ae2005-10-28 15:59:14 +0000583AC_SEARCH_LIBS(connect, [inet])
Daniel Veillardb05deb71999-08-10 19:04:08 +0000584
Daniel Veillardb0426ca2000-10-11 23:39:43 +0000585dnl Determine what socket length (socklen_t) data type is
586AC_MSG_CHECKING([for type of socket length (socklen_t)])
587AC_TRY_COMPILE2([
588#include <stddef.h>
589#include <sys/types.h>
590#include <sys/socket.h>],[
591(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
592 AC_MSG_RESULT(socklen_t *)
Daniel Veillardc284c642005-03-31 10:24:24 +0000593 XML_SOCKLEN_T=socklen_t],[
Daniel Veillardb0426ca2000-10-11 23:39:43 +0000594 AC_TRY_COMPILE2([
595#include <stddef.h>
596#include <sys/types.h>
597#include <sys/socket.h>],[
598(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
599 AC_MSG_RESULT(size_t *)
Daniel Veillardc284c642005-03-31 10:24:24 +0000600 XML_SOCKLEN_T=size_t],[
Daniel Veillardb0426ca2000-10-11 23:39:43 +0000601 AC_TRY_COMPILE2([
602#include <stddef.h>
603#include <sys/types.h>
604#include <sys/socket.h>],[
605(void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
606 AC_MSG_RESULT(int *)
Daniel Veillardc284c642005-03-31 10:24:24 +0000607 XML_SOCKLEN_T=int],[
William M. Brack2e6b1432004-02-09 15:10:28 +0000608 AC_MSG_WARN(could not determine)
Daniel Veillardc284c642005-03-31 10:24:24 +0000609 XML_SOCKLEN_T="int"])])])
610AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
Daniel Veillardb0426ca2000-10-11 23:39:43 +0000611
Patrick Monneratd1c0cc92013-12-12 15:14:47 +0800612dnl Checking if gethostbyname() argument is const.
613AC_MSG_CHECKING([for const gethostbyname() argument])
614AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],
615 [[(void)gethostbyname((const char *)"");]])],
616have_gethostbyname_const_arg=yes,
617have_gethostbyname_const_arg=no)
618AC_MSG_RESULT($have_gethostbyname_const_arg)
619if test x"$have_gethostbyname_const_arg" = x"yes"; then
620 AC_DEFINE([GETHOSTBYNAME_ARG_CAST], [],
621 [Type cast for the gethostbyname() argument])
622else
623 AC_DEFINE([GETHOSTBYNAME_ARG_CAST], [(char *)],
624 [Type cast for the gethostbyname() argument])
625fi
626
627dnl Checking if send() second argument is const.
628AC_MSG_CHECKING([for const send() second argument])
629AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
630#include <sys/socket.h>]],
631 [[(void)send(1,(const char *)"",1,1);]])],
632have_send_const_arg2=yes,
633have_send_const_arg2=no)
634AC_MSG_RESULT($have_send_const_arg2)
635if test x"$have_send_const_arg2" = x"yes"; then
636 AC_DEFINE([SEND_ARG2_CAST], [],
637 [Type cast for the send() function 2nd arg])
638else
639 AC_DEFINE([SEND_ARG2_CAST], [(char *)],
640 [Type cast for the send() function 2nd arg])
641fi
642
Daniel Veillardde2a67b2003-06-21 14:20:04 +0000643dnl ***********************Checking for availability of IPv6*******************
644
645AC_MSG_CHECKING([whether to enable IPv6])
William M. Brack21e4ef22005-01-02 09:53:13 +0000646AC_ARG_ENABLE(ipv6, [ --enable-ipv6[[=yes/no]] enables compilation of IPv6 code [[default=yes]]],, enable_ipv6=yes)
Daniel Veillard4432df22003-09-28 18:58:27 +0000647if test "$with_minimum" = "yes"
648then
649 enable_ipv6=no
650fi
Daniel Veillardde2a67b2003-06-21 14:20:04 +0000651if test $enable_ipv6 = yes; then
652 have_ipv6=no
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800653 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
654# include <sys/types.h>
655# include <sys/socket.h>
656 ]], [[
Daniel Veillardde2a67b2003-06-21 14:20:04 +0000657 struct sockaddr_storage ss;
658 socket(AF_INET6, SOCK_STREAM, 0)
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800659 ]])],
Daniel Veillardde2a67b2003-06-21 14:20:04 +0000660 have_ipv6=yes,
661 have_ipv6=no
662 )
663 AC_MSG_RESULT($have_ipv6)
664
William M. Brack476cd962003-08-13 11:09:42 +0000665 if test $have_ipv6 = yes; then
Daniel Veillardc790bf42003-10-11 10:50:10 +0000666 AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6])
Dodji Seketeli8eba3f32004-11-09 18:30:30 +0000667 have_broken_ss_family=no
668
669 dnl *********************************************************************
670 dnl on some platforms (like AIX 5L), the structure sockaddr doesn't have
671 dnl a ss_family member, but rather __ss_family. Let's detect that
William M. Brack7d8b36b2005-06-25 07:30:50 +0000672 dnl and define the HAVE_BROKEN_SS_FAMILY when we are on one of these
673 dnl platforms. However, we should only do this if ss_family is not
674 dnl present.
Dodji Seketeli8eba3f32004-11-09 18:30:30 +0000675 dnl ********************************************************************
William M. Brack7d8b36b2005-06-25 07:30:50 +0000676 AC_MSG_CHECKING([struct sockaddr::ss_family])
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800677 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
678# include <sys/types.h>
679# include <sys/socket.h>
680 ]], [[
Dodji Seketeli8eba3f32004-11-09 18:30:30 +0000681 struct sockaddr_storage ss ;
William M. Brack7d8b36b2005-06-25 07:30:50 +0000682 ss.ss_family = 0 ;
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800683 ]])],
William M. Brack7d8b36b2005-06-25 07:30:50 +0000684 have_ss_family=yes,
685 have_ss_family=no
Dodji Seketeli8eba3f32004-11-09 18:30:30 +0000686 )
William M. Brack7d8b36b2005-06-25 07:30:50 +0000687 AC_MSG_RESULT($have_ss_family)
688 if test x$have_ss_family = xno ; then
689 AC_MSG_CHECKING([broken struct sockaddr::ss_family])
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800690 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
691# include <sys/types.h>
692# include <sys/socket.h>
693 ]], [[
William M. Brack7d8b36b2005-06-25 07:30:50 +0000694 struct sockaddr_storage ss ;
695 ss.__ss_family = 0 ;
Daniel Richard Gec4fc522012-08-17 10:04:30 +0800696 ]])],
William M. Brack7d8b36b2005-06-25 07:30:50 +0000697 have_broken_ss_family=yes,
698 have_broken_ss_family=no
699 )
700 AC_MSG_RESULT($have_broken_ss_family)
701 if test x$have_broken_ss_family = xyes ; then
702 AC_DEFINE(HAVE_BROKEN_SS_FAMILY, [],
703 [Whether struct sockaddr::__ss_family exists])
704 AC_DEFINE(ss_family, __ss_family,
705 [ss_family is not defined here, use __ss_family instead])
706 else
707 AC_MSG_WARN(ss_family and __ss_family not found)
708 fi
Dodji Seketeli8eba3f32004-11-09 18:30:30 +0000709 fi
Daniel Veillardde2a67b2003-06-21 14:20:04 +0000710
711 have_getaddrinfo=no
712 AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
713 if test $have_getaddrinfo != yes; then
714 for lib in bsd socket inet; do
715 AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break])
716 done
717 fi
718
William M. Brack476cd962003-08-13 11:09:42 +0000719 if test $have_getaddrinfo = yes; then
Daniel Veillardc790bf42003-10-11 10:50:10 +0000720 AC_DEFINE([HAVE_GETADDRINFO], [], [Define if getaddrinfo is there])
Daniel Veillardde2a67b2003-06-21 14:20:04 +0000721 fi
722 fi
723fi
724
725dnl ******************************End IPv6 checks******************************
726
Daniel Veillardb05deb71999-08-10 19:04:08 +0000727dnl Checks for isnan in libm if not in libc
Daniel Veillard6984e6d2003-12-09 14:20:17 +0000728AC_CHECK_FUNC(isnan, AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there]) , AC_CHECK_LIB(m, isnan,
Daniel Veillardc790bf42003-10-11 10:50:10 +0000729 [AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there])]))
Daniel Veillardb05deb71999-08-10 19:04:08 +0000730
Daniel Veillardc790bf42003-10-11 10:50:10 +0000731AC_CHECK_FUNC(isinf, AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there]) , AC_CHECK_LIB(m, isinf,
732 [AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there])]))
Daniel Veillardb05deb71999-08-10 19:04:08 +0000733
734XML_LIBDIR='-L${libdir}'
Daniel Veillarde7dd2b82002-03-15 18:44:02 +0000735XML_INCLUDEDIR='-I${includedir}/libxml2'
Daniel Veillardb05deb71999-08-10 19:04:08 +0000736
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000737dnl
Daniel Veillardf5c2c871999-12-01 09:51:45 +0000738dnl Extra flags
739dnl
740XML_CFLAGS=""
Daniel Veillard357c9602001-05-03 10:49:20 +0000741RDL_LIBS=""
Daniel Veillardf5c2c871999-12-01 09:51:45 +0000742
743dnl
Daniel Veillardb45c43b2001-04-28 17:02:11 +0000744dnl Workaround for native compilers
745dnl HP : http://bugs.gnome.org/db/31/3163.html
746dnl DEC : Enable NaN/Inf
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000747dnl
Daniel Veillard03109292000-08-14 14:58:22 +0000748if test "${GCC}" != "yes" ; then
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000749 case "${host}" in
Daniel Veillard6a0baa02005-12-10 11:11:12 +0000750 hppa*-*-hpux* )
Daniel Veillard03109292000-08-14 14:58:22 +0000751 CFLAGS="${CFLAGS} -Wp,-H30000"
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000752 ;;
Daniel Veillardb45c43b2001-04-28 17:02:11 +0000753 *-dec-osf* )
754 CFLAGS="${CFLAGS} -ieee"
755 ;;
William M. Brack476cd962003-08-13 11:09:42 +0000756 alpha*-*-linux* )
757 CFLAGS="${CFLAGS} -ieee"
758 ;;
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000759 esac
Daniel Veillardd574f782001-03-14 19:40:17 +0000760else
Daniel Veillardd94849b2003-07-28 13:02:24 +0000761 if test "$with_fexceptions" = "yes"
762 then
763 #
764 # Not activated by default because this inflates the code size
765 # Used to allow propagation of C++ exceptions through the library
766 #
767 CFLAGS="${CFLAGS} -fexceptions"
768 fi
Stefan Kost85deb482011-05-10 10:55:07 +0300769
770 # warnings we'd like to see
771 CFLAGS="${CFLAGS} -pedantic -W -Wformat -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 -Wredundant-decls"
772 # warnings we'd like to supress
773 CFLAGS="${CFLAGS} -Wno-long-long"
Daniel Veillard14839d52001-06-06 16:11:56 +0000774 case "${host}" in
775 alpha*-*-linux* )
776 CFLAGS="${CFLAGS} -mieee"
777 ;;
Daniel Veillardcb5b4d62002-04-11 08:24:26 +0000778 alpha*-*-osf* )
779 CFLAGS="${CFLAGS} -mieee"
780 ;;
Daniel Veillard14839d52001-06-06 16:11:56 +0000781 esac
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000782fi
Daniel Veillardb0426ca2000-10-11 23:39:43 +0000783case ${host} in
784 *-*-solaris*)
Daniel Veillardd2ade932000-09-30 14:39:55 +0000785 XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
786 ;;
Daniel Veillardd30be4a2002-03-28 18:25:31 +0000787 hppa*-hp-mpeix)
788 NEED_TRIO=1
789 ;;
Daniel Veillard4188ddf2006-01-19 08:58:42 +0000790 *-*-mingw* | *-*-cygwin* | *-*-msvc* )
791 # If the host is Windows, and shared libraries are disabled, we
792 # need to add -DLIBXML_STATIC to CFLAGS in order for linking to
793 # work properly (without it, xmlexports.h would force the use of
794 # DLL imports, which obviously aren't present in a static
795 # library).
796 if test "x$enable_shared" = "xno"; then
797 XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC"
798 CFLAGS="$CFLAGS -DLIBXML_STATIC"
799 fi
800 ;;
Daniel Veillardd2ade932000-09-30 14:39:55 +0000801esac
802
Daniel Veillardf5c2c871999-12-01 09:51:45 +0000803
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000804dnl
805dnl check for python
806dnl
807
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000808PYTHON_VERSION=
809PYTHON_INCLUDES=
Daniel Veillard253aa2c2002-02-02 09:17:16 +0000810PYTHON_SITE_PACKAGES=
Daniel Veillard6dc91962004-03-22 19:10:02 +0000811PYTHON_TESTS=
Daniel Veillard38b80a82003-05-14 18:59:00 +0000812pythondir=
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000813if test "$with_python" != "no" ; then
814 if test -x "$with_python/bin/python"
815 then
816 echo Found python in $with_python/bin/python
817 PYTHON="$with_python/bin/python"
Daniel Veillard9b731d72002-04-14 12:56:08 +0000818 else
LRNfbd4ddf2010-11-04 15:45:46 +0100819 if test -x "$with_python/python.exe"
820 then
821 echo Found python in $with_python/python.exe
822 PYTHON="$with_python/python.exe"
823 else
824 if test -x "$with_python"
825 then
826 echo Found python in $with_python
827 PYTHON="$with_python"
828 else
829 if test -x "$PYTHON"
830 then
831 echo Found python in environment PYTHON=$PYTHON
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800832 with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
LRNfbd4ddf2010-11-04 15:45:46 +0100833 else
834 AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
835 fi
Daniel Veillard4f69eb62005-08-24 22:19:10 +0000836 fi
Daniel Veillarda8a89fe2002-04-12 21:03:34 +0000837 fi
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000838 fi
839 if test "$PYTHON" != ""
840 then
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800841 PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"`
842 PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
843# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python
844#
845# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000846 echo Found Python version $PYTHON_VERSION
847 fi
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800848 if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000849 then
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800850 if test -r $with_python/include/python$PYTHON_VERSION/Python.h
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000851 then
852 PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
853 else
854 if test -r $prefix/include/python$PYTHON_VERSION/Python.h
855 then
Daniel Veillard8492ba12006-04-25 12:52:12 +0000856 PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000857 else
858 if test -r /usr/include/python$PYTHON_VERSION/Python.h
859 then
860 PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
861 else
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800862 if test -r $with_python/include/Python.h
LRNfbd4ddf2010-11-04 15:45:46 +0100863 then
864 PYTHON_INCLUDES=$with_python/include
LRNfbd4ddf2010-11-04 15:45:46 +0100865 else
866 echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
867 fi
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000868 fi
869 fi
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800870 fi
871 fi
Jonas Erikssonfcb1bb52014-03-06 09:13:17 +0100872 if test "$with_python_install_dir" != ""
873 then
874 PYTHON_SITE_PACKAGES="$with_python_install_dir"
875 fi
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800876 if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
877 then
878 if test -d $libdir/python$PYTHON_VERSION/site-packages
879 then
880 PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
881 else
882 if test -d $with_python/lib/site-packages
Daniel Veillardb6984ef2002-08-14 16:55:31 +0000883 then
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800884 PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
885 else
886 PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
Daniel Veillardb6984ef2002-08-14 16:55:31 +0000887 fi
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000888 fi
889 fi
Daniel Veillardb8e3f802013-03-28 09:46:20 +0800890 pythondir='$(PYTHON_SITE_PACKAGES)'
891 PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
Daniel Veillard4f69eb62005-08-24 22:19:10 +0000892else
893 PYTHON=
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000894fi
895AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
Daniel Veillard40b11342002-09-20 12:01:39 +0000896if test "$PYTHON_INCLUDES" != ""
897then
898 PYTHON_SUBDIR=python
899else
900 PYTHON_SUBDIR=
901fi
Daniel Veillard38b80a82003-05-14 18:59:00 +0000902AC_SUBST(pythondir)
Daniel Veillard40b11342002-09-20 12:01:39 +0000903AC_SUBST(PYTHON_SUBDIR)
Frederic Crozate21731d2009-09-12 18:02:40 +0200904AC_SUBST(PYTHON_LIBS)
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +0000905
Daniel Veillardce1648b2005-01-04 15:10:22 +0000906dnl check for dso support
907WITH_MODULES=0
Daniel Veillardce1648b2005-01-04 15:10:22 +0000908TEST_MODULES=
909
Daniel Veillardf6b71bd2005-01-04 17:50:14 +0000910if test "$with_modules" != "no" ; then
Daniel Veillard9202b672005-07-14 09:31:14 +0000911 case "$host" in
912 *-*-cygwin*)
913 MODULE_EXTENSION=".dll"
914 AC_CHECK_LIB(cygwin, dlopen, [
915 WITH_MODULES=1
916 MODULE_PLATFORM_LIBS=
917 AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
918 ])
919 ;;
Roumen Petrov120a2692010-03-10 10:07:49 +0100920 *-*-mingw*)
921 MODULE_EXTENSION=".dll"
922 WITH_MODULES=1
923 ;;
Daniel Veillard9202b672005-07-14 09:31:14 +0000924 *)
Daniel Veillard1d96f5a2005-10-28 08:44:48 +0000925 AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [
926 AC_CHECK_LIB(dld, shl_load, [
927 MODULE_PLATFORM_LIBS="-ldld"
928 libxml_have_shl_load=yes], [
929 AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [
930 AC_CHECK_LIB(dl, dlopen, [
931 MODULE_PLATFORM_LIBS="-ldl"
932 libxml_have_dlopen=yes])])])])
933
934 if test "${libxml_have_shl_load}" = "yes"; then
935 MODULE_EXTENSION=".sl"
Daniel Veillard9202b672005-07-14 09:31:14 +0000936 WITH_MODULES=1
Daniel Veillard9202b672005-07-14 09:31:14 +0000937 AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
Daniel Veillard1d96f5a2005-10-28 08:44:48 +0000938 fi
Daniel Veillard9202b672005-07-14 09:31:14 +0000939
Daniel Veillard1d96f5a2005-10-28 08:44:48 +0000940 if test "${libxml_have_dlopen}" = "yes"; then
941 case "${host}" in
942 *-*-hpux* )
943 MODULE_EXTENSION=".sl"
944 ;;
945 * )
946 MODULE_EXTENSION=".so"
947 ;;
948 esac
949
Daniel Veillard9202b672005-07-14 09:31:14 +0000950 WITH_MODULES=1
Daniel Veillard9202b672005-07-14 09:31:14 +0000951 AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
Daniel Veillard1d96f5a2005-10-28 08:44:48 +0000952 fi
Daniel Veillard9202b672005-07-14 09:31:14 +0000953 ;;
954 esac
Daniel Veillardf6b71bd2005-01-04 17:50:14 +0000955fi
Daniel Veillardce1648b2005-01-04 15:10:22 +0000956
957if test "${WITH_MODULES}" = "1"; then
958 TEST_MODULES="ModuleTests"
959fi
960
961AC_SUBST(WITH_MODULES)
962AC_SUBST(MODULE_PLATFORM_LIBS)
963AC_SUBST(MODULE_EXTENSION)
964AC_SUBST(TEST_MODULES)
965
Daniel Veillard437b87b2000-01-03 17:30:46 +0000966dnl
967dnl Tester makes use of readline if present
968dnl
Daniel Veillard03109292000-08-14 14:58:22 +0000969
Daniel Veillard361d8452000-04-03 19:48:13 +0000970dnl
William M. Brack21e4ef22005-01-02 09:53:13 +0000971dnl specific tests to setup DV and Bill's devel environments with debug etc ...
Daniel Veillard81418e32001-05-22 15:08:55 +0000972dnl (-Wunreachable-code)
Daniel Veillardf6eea272001-01-18 12:17:12 +0000973dnl
William M. Brack871611b2003-10-18 04:53:14 +0000974if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
Daniel Veillardb7c6ac42004-06-29 22:01:27 +0000975 [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ]] || \
William M. Brack7f28a012007-01-11 23:42:10 +0000976 [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxml2" ]]
William M. Brack871611b2003-10-18 04:53:14 +0000977 then
Daniel Veillard4432df22003-09-28 18:58:27 +0000978 if test "$with_minimum" != "yes"
979 then
980 if test "${with_mem_debug}" = "" ; then
Daniel Veillard379a3b72005-08-12 10:18:14 +0000981 echo Activating memory debugging
Daniel Veillard4432df22003-09-28 18:58:27 +0000982 with_mem_debug="yes"
Daniel Veillard22cdb842004-10-04 14:09:17 +0000983 with_run_debug="yes"
Daniel Veillard4432df22003-09-28 18:58:27 +0000984 fi
985 if test "${with_docbook}" = "" ; then
986 with_docbook="yes"
987 fi
Daniel Veillardeae522a2001-04-23 13:41:34 +0000988 fi
Daniel Veillard3854c572005-08-25 10:17:45 +0000989 if test "${GCC}" = "yes" ; then
Daniel Veillard05f97352004-10-31 15:35:32 +0000990 CFLAGS="-g -O -pedantic -W -Wformat -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 -Wredundant-decls -Wall"
Daniel Veillardeff45a92004-10-29 12:10:55 +0000991 fi
Daniel Veillard2e9b1652003-02-19 13:29:45 +0000992 STATIC_BINARIES="-static"
Daniel Veillardc86a4fa2001-03-26 16:28:29 +0000993dnl -Wcast-qual -ansi
Daniel Veillard2e9b1652003-02-19 13:29:45 +0000994else
995 STATIC_BINARIES=
Daniel Veillardf6eea272001-01-18 12:17:12 +0000996fi
Daniel Veillard2e9b1652003-02-19 13:29:45 +0000997AC_SUBST(STATIC_BINARIES)
Daniel Veillard92ad2102001-03-27 12:47:33 +0000998
999dnl
1000dnl Check for trio string functions
1001dnl
1002
1003if test "${NEED_TRIO}" = "1" ; then
1004 echo Adding trio library for string functions
1005 WITH_TRIO=1
1006else
1007 WITH_TRIO=0
1008fi
Daniel Veillard01ef7382001-05-08 07:31:43 +00001009AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1")
Daniel Veillard92ad2102001-03-27 12:47:33 +00001010AC_SUBST(WITH_TRIO)
1011
Daniel Veillardf6eea272001-01-18 12:17:12 +00001012dnl
William M. Brack97ad4c72003-05-13 08:08:36 +00001013dnl Allow to enable/disable various pieces
Daniel Veillard361d8452000-04-03 19:48:13 +00001014dnl
William M. Brack21e4ef22005-01-02 09:53:13 +00001015echo Checking configuration requirements
Daniel Veillard361d8452000-04-03 19:48:13 +00001016
William M. Brack21e4ef22005-01-02 09:53:13 +00001017dnl
1018dnl Thread-related stuff
1019dnl
Daniel Veillardb8478642001-10-12 17:29:10 +00001020THREAD_LIBS=""
Daniel Veillarddbfe05a2005-05-04 09:18:00 +00001021BASE_THREAD_LIBS=""
Daniel Veillardb8478642001-10-12 17:29:10 +00001022WITH_THREADS=0
1023THREAD_CFLAGS=""
Daniel Veillardab7488e2001-10-17 11:30:37 +00001024TEST_THREADS=""
Daniel Veillard6984e6d2003-12-09 14:20:17 +00001025THREADS_W32=""
Tim Starling0ad948e2012-10-29 13:41:55 +11001026WITH_THREAD_ALLOC=0
Daniel Veillard64a411c2001-10-15 12:32:07 +00001027
Daniel Veillard84942712003-04-18 14:40:05 +00001028if test "$with_threads" = "no" ; then
1029 echo Disabling multithreaded support
1030else
Daniel Veillardb8478642001-10-12 17:29:10 +00001031 echo Enabling multithreaded support
Sam Thursfield115581a2012-05-09 18:46:56 +08001032
1033 dnl Default to native threads on Win32
Daniel Veillard6984e6d2003-12-09 14:20:17 +00001034 case $host_os in
Sam Thursfield115581a2012-05-09 18:46:56 +08001035 *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then
LRN203fd2e2009-08-07 21:47:25 +02001036 WITH_THREADS="1"
Daniel Richard G5706b6d2012-08-06 11:32:54 +08001037 THREADS_W32="1"
Sam Thursfield115581a2012-05-09 18:46:56 +08001038 THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
LRN203fd2e2009-08-07 21:47:25 +02001039 fi
Daniel Veillard6984e6d2003-12-09 14:20:17 +00001040 ;;
Sam Thursfield115581a2012-05-09 18:46:56 +08001041 esac
1042
1043 dnl Use pthread by default in other cases
1044 if test -z "$THREADS_W32"; then
1045 if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
1046 AC_CHECK_HEADER(pthread.h,
1047 AC_CHECK_LIB(pthread, pthread_join,[
1048 THREAD_LIBS="-lpthread"
1049 AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
1050 AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
1051 WITH_THREADS="1"]))
1052 fi
1053 fi
1054
1055 case $host_os in
William M. Bracka73f45b2005-01-11 02:21:33 +00001056 *cygwin*) THREAD_LIBS=""
1057 ;;
Daniel Veillard7a3447a2005-01-04 14:31:14 +00001058 *beos*) WITH_THREADS="1"
1059 THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
1060 ;;
Daniel Veillarddbfe05a2005-05-04 09:18:00 +00001061 *linux*)
Daniel Veillard32a461f2005-08-25 21:48:54 +00001062 if test "${GCC}" = "yes" ; then
1063 GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
1064 GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
1065 GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[[0-9]]*\.++' | sed 's+\..*++'`
1066 if test "${THREAD_LIBS}" = "-lpthread" ; then
1067 if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
1068 then
1069 THREAD_LIBS=""
1070 BASE_THREAD_LIBS="-lpthread"
1071 else
LRN203fd2e2009-08-07 21:47:25 +02001072 if expr ${GCC_MAJOR} \> 3 > /dev/null
Daniel Veillard32a461f2005-08-25 21:48:54 +00001073 then
1074 THREAD_LIBS=""
1075 BASE_THREAD_LIBS="-lpthread"
1076 else
1077 echo old GCC disabling weak symbols for pthread
1078 fi
1079 fi
1080 fi
Daniel Veillarddbfe05a2005-05-04 09:18:00 +00001081 fi
1082 ;;
Daniel Veillard6984e6d2003-12-09 14:20:17 +00001083 esac
Daniel Veillardb8478642001-10-12 17:29:10 +00001084 if test "$WITH_THREADS" = "1" ; then
Daniel Veillardab7488e2001-10-17 11:30:37 +00001085 THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
1086 TEST_THREADS="Threadtests"
Daniel Veillardb8478642001-10-12 17:29:10 +00001087 fi
1088fi
William M. Brack306e33c2004-06-12 01:01:22 +00001089if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
Tim Starling0ad948e2012-10-29 13:41:55 +11001090 WITH_THREAD_ALLOC=1
Daniel Veillard64a411c2001-10-15 12:32:07 +00001091fi
1092
Daniel Veillardb8478642001-10-12 17:29:10 +00001093AC_SUBST(THREAD_LIBS)
Daniel Veillarddbfe05a2005-05-04 09:18:00 +00001094AC_SUBST(BASE_THREAD_LIBS)
Daniel Veillardb8478642001-10-12 17:29:10 +00001095AC_SUBST(WITH_THREADS)
1096AC_SUBST(THREAD_CFLAGS)
Daniel Veillardab7488e2001-10-17 11:30:37 +00001097AC_SUBST(TEST_THREADS)
Tim Starling0ad948e2012-10-29 13:41:55 +11001098AC_SUBST(WITH_THREAD_ALLOC)
Roumen Petrov8886f332012-08-13 16:38:09 +08001099AM_CONDITIONAL([THREADS_W32],[test -n "$THREADS_W32"])
Daniel Veillardb8478642001-10-12 17:29:10 +00001100
William M. Brack21e4ef22005-01-02 09:53:13 +00001101dnl
1102dnl xmllint shell history
1103dnl
Daniel Veillard259ff742001-10-06 13:49:59 +00001104if test "$with_history" = "yes" ; then
Daniel Veillardf012a642001-07-23 19:10:52 +00001105 echo Enabling xmllint shell history
1106 dnl check for terminal library. this is a very cool solution
1107 dnl from octave's configure.in
1108 unset tcap
1109 for termlib in ncurses curses termcap terminfo termlib; do
1110 AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"])
1111 test -n "$tcap" && break
1112 done
1113
1114 AC_CHECK_HEADER(readline/history.h,
1115 AC_CHECK_LIB(history, append_history,[
1116 RDL_LIBS="-lhistory"
Daniel Veillardc790bf42003-10-11 10:50:10 +00001117 AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])]))
Daniel Veillardf012a642001-07-23 19:10:52 +00001118 AC_CHECK_HEADER(readline/readline.h,
1119 AC_CHECK_LIB(readline, readline,[
1120 RDL_LIBS="-lreadline $RDL_LIBS $tcap"
Daniel Veillardc790bf42003-10-11 10:50:10 +00001121 AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap))
Daniel Veillardf012a642001-07-23 19:10:52 +00001122 if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then
1123 CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include"
1124 RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS"
Daniel Veillardf012a642001-07-23 19:10:52 +00001125 fi
Daniel Veillardf012a642001-07-23 19:10:52 +00001126fi
1127
William M. Brack21e4ef22005-01-02 09:53:13 +00001128dnl
1129dnl Tree functions
1130dnl
Daniel Veillard652327a2003-09-29 18:02:38 +00001131if test "$with_tree" = "no" ; then
1132 echo Disabling DOM like tree manipulation APIs
1133 WITH_TREE=0
1134else
1135 WITH_TREE=1
1136fi
1137AC_SUBST(WITH_TREE)
1138
Daniel Veillard361d8452000-04-03 19:48:13 +00001139if test "$with_ftp" = "no" ; then
1140 echo Disabling FTP support
1141 WITH_FTP=0
1142 FTP_OBJ=
1143else
1144 WITH_FTP=1
1145 FTP_OBJ=nanoftp.o
1146fi
1147AC_SUBST(WITH_FTP)
1148AC_SUBST(FTP_OBJ)
1149
Daniel Veillard361d8452000-04-03 19:48:13 +00001150if test "$with_http" = "no" ; then
1151 echo Disabling HTTP support
1152 WITH_HTTP=0
1153 HTTP_OBJ=
1154else
1155 WITH_HTTP=1
1156 HTTP_OBJ=nanohttp.o
1157fi
1158AC_SUBST(WITH_HTTP)
1159AC_SUBST(HTTP_OBJ)
1160
Daniel Veillard4432df22003-09-28 18:58:27 +00001161if test "$with_legacy" = "no" ; then
1162 echo Disabling deprecated APIs
1163 WITH_LEGACY=0
1164else
1165 WITH_LEGACY=1
1166fi
1167AC_SUBST(WITH_LEGACY)
1168
Daniel Veillard81273902003-09-30 00:43:48 +00001169if test "$with_reader" = "no" ; then
1170 echo Disabling the xmlReader parsing interface
1171 WITH_READER=0
Daniel Veillard73b013f2003-09-30 12:36:01 +00001172 READER_TEST=
Daniel Veillard81273902003-09-30 00:43:48 +00001173else
1174 WITH_READER=1
Daniel Veillard73b013f2003-09-30 12:36:01 +00001175 READER_TEST=Readertests
William M. Brack21e4ef22005-01-02 09:53:13 +00001176 if test "$with_push" = "no" ; then
1177 echo xmlReader requires Push interface - enabling it
1178 with_push=yes
1179 fi
Daniel Veillard81273902003-09-30 00:43:48 +00001180fi
1181AC_SUBST(WITH_READER)
Daniel Veillard73b013f2003-09-30 12:36:01 +00001182AC_SUBST(READER_TEST)
Daniel Veillard81273902003-09-30 00:43:48 +00001183
William M. Brack21e4ef22005-01-02 09:53:13 +00001184if test "$with_writer" = "no" ; then
1185 echo Disabling the xmlWriter saving interface
1186 WITH_WRITER=0
1187# WRITER_TEST=
1188else
1189 WITH_WRITER=1
1190# WRITER_TEST=Writertests
1191 if test "$with_push" = "no" ; then
1192 echo xmlWriter requires Push interface - enabling it
1193 with_push=yes
1194 fi
1195 if test "$with_output" = "no" ; then
1196 echo xmlWriter requires Output interface - enabling it
1197 with_output=yes
1198 fi
Daniel Veillardb3de70c2003-12-02 22:32:15 +00001199fi
William M. Brack21e4ef22005-01-02 09:53:13 +00001200AC_SUBST(WITH_WRITER)
1201#AC_SUBST(WRITER_TEST)
1202
Daniel Veillardb3de70c2003-12-02 22:32:15 +00001203if test "$with_pattern" = "no" ; then
1204 echo Disabling the xmlPattern parsing interface
1205 WITH_PATTERN=0
Daniel Veillardf9d16912005-01-30 22:36:30 +00001206 TEST_PATTERN=
Daniel Veillardb3de70c2003-12-02 22:32:15 +00001207else
1208 WITH_PATTERN=1
Daniel Veillardf9d16912005-01-30 22:36:30 +00001209 TEST_PATTERN=Patterntests
Daniel Veillardb3de70c2003-12-02 22:32:15 +00001210fi
1211AC_SUBST(WITH_PATTERN)
Daniel Veillardf9d16912005-01-30 22:36:30 +00001212AC_SUBST(TEST_PATTERN)
Daniel Veillardb3de70c2003-12-02 22:32:15 +00001213
Daniel Veillard81273902003-09-30 00:43:48 +00001214if test "$with_sax1" = "no" ; then
1215 echo Disabling the older SAX1 interface
1216 WITH_SAX1=0
1217 TEST_SAX=
1218else
1219 WITH_SAX1=1
1220 TEST_SAX=SAXtests
1221fi
1222AC_SUBST(WITH_SAX1)
Akira TAGOH961b5352012-07-03 14:13:59 +09001223AM_CONDITIONAL(WITH_SAX1_SOURCES, test "${WITH_TRIO}" = "1")
Daniel Veillard81273902003-09-30 00:43:48 +00001224AC_SUBST(TEST_SAX)
1225
Daniel Veillard73b013f2003-09-30 12:36:01 +00001226if test "$with_push" = "no" ; then
1227 echo Disabling the PUSH parser interfaces
1228 WITH_PUSH=0
1229 TEST_PUSH=
1230else
1231 WITH_PUSH=1
1232 TEST_PUSH="XMLPushtests"
1233fi
1234AC_SUBST(WITH_PUSH)
1235AC_SUBST(TEST_PUSH)
1236
Daniel Veillard73b013f2003-09-30 12:36:01 +00001237if test "$with_html" = "no" ; then
1238 echo Disabling HTML support
1239 WITH_HTML=0
1240 HTML_OBJ=
1241 TEST_HTML=
1242else
1243 WITH_HTML=1
1244 HTML_OBJ="HTMLparser.o HTMLtree.o"
1245 TEST_HTML=HTMLtests
William M. Brack871611b2003-10-18 04:53:14 +00001246 if test "$with_push" != "no" ; then
Daniel Veillard73b013f2003-09-30 12:36:01 +00001247 TEST_PHTML=HTMLPushtests
1248 else
1249 TEST_PHTML=
1250 fi
1251fi
1252AC_SUBST(WITH_HTML)
1253AC_SUBST(HTML_OBJ)
1254AC_SUBST(TEST_HTML)
1255AC_SUBST(TEST_PHTML)
1256
Daniel Veillard73b013f2003-09-30 12:36:01 +00001257if test "$with_valid" = "no" ; then
Daniel Veillard4432df22003-09-28 18:58:27 +00001258 echo Disabling DTD validation support
1259 WITH_VALID=0
1260 TEST_VALID=
1261 TEST_VTIME=
1262else
1263 WITH_VALID=1
1264 TEST_VALID=Validtests
1265 TEST_VTIME=VTimingtests
1266fi
1267AC_SUBST(WITH_VALID)
1268AC_SUBST(TEST_VALID)
1269AC_SUBST(TEST_VTIME)
Daniel Veillard361d8452000-04-03 19:48:13 +00001270
Daniel Veillarda7374592001-05-10 14:17:55 +00001271if test "$with_catalog" = "no" ; then
1272 echo Disabling Catalog support
1273 WITH_CATALOG=0
1274 CATALOG_OBJ=
Daniel Veillard4432df22003-09-28 18:58:27 +00001275 TEST_CATALOG=
Daniel Veillarda7374592001-05-10 14:17:55 +00001276else
1277 WITH_CATALOG=1
1278 CATALOG_OBJ="catalog.o"
Daniel Veillard4432df22003-09-28 18:58:27 +00001279 TEST_CATALOG=Catatests
Daniel Veillarda7374592001-05-10 14:17:55 +00001280fi
1281AC_SUBST(WITH_CATALOG)
1282AC_SUBST(CATALOG_OBJ)
Daniel Veillard4432df22003-09-28 18:58:27 +00001283AC_SUBST(TEST_CATALOG)
Daniel Veillarda7374592001-05-10 14:17:55 +00001284
Daniel Veillardb59076b2001-04-29 17:04:07 +00001285if test "$with_docbook" = "no" ; then
1286 echo Disabling Docbook support
Daniel Veillardeae522a2001-04-23 13:41:34 +00001287 WITH_DOCB=0
1288 DOCB_OBJ=
Daniel Veillardb59076b2001-04-29 17:04:07 +00001289else
1290 WITH_DOCB=1
1291 DOCB_OBJ="DOCBparser.o"
Daniel Veillardeae522a2001-04-23 13:41:34 +00001292fi
1293AC_SUBST(WITH_DOCB)
1294AC_SUBST(DOCB_OBJ)
1295
1296
William M. Brack21e4ef22005-01-02 09:53:13 +00001297if test "$with_xptr" = "no" ; then
1298 echo Disabling XPointer support
1299 WITH_XPTR=0
1300 XPTR_OBJ=
1301 TEST_XPTR=
1302else
1303 WITH_XPTR=1
1304 XPTR_OBJ=xpointer.o
1305 TEST_XPTR=XPtrtests
1306 if test "$with_xpath" = "no" ; then
1307 echo XPointer requires XPath support - enabling it
1308 with_xpath=yes
1309 fi
Daniel Veillard4432df22003-09-28 18:58:27 +00001310fi
William M. Brack21e4ef22005-01-02 09:53:13 +00001311AC_SUBST(WITH_XPTR)
1312AC_SUBST(XPTR_OBJ)
1313AC_SUBST(TEST_XPTR)
1314
1315if test "$with_c14n" = "no" ; then
1316 echo Disabling C14N support
1317 WITH_C14N=0
1318 C14N_OBJ=
1319 TEST_C14N=
1320else
1321 WITH_C14N=1
1322 C14N_OBJ="c14n.c"
1323 TEST_C14N=C14Ntests
1324 if test "$with_xpath" = "no" ; then
1325 echo C14N requires XPath support - enabling it
1326 with_xpath=yes
1327 fi
1328fi
1329AC_SUBST(WITH_C14N)
1330AC_SUBST(C14N_OBJ)
1331AC_SUBST(TEST_C14N)
1332
1333if test "$with_xinclude" = "no" ; then
1334 echo Disabling XInclude support
1335 WITH_XINCLUDE=0
1336 XINCLUDE_OBJ=
1337 with_xinclude="no"
1338 TEST_XINCLUDE=
1339else
1340 WITH_XINCLUDE=1
1341 XINCLUDE_OBJ=xinclude.o
1342 TEST_XINCLUDE=XIncludetests
1343 if test "$with_xpath" = "no" ; then
1344 echo XInclude requires XPath support - enabling it
1345 with_xpath=yes
1346 fi
1347fi
1348AC_SUBST(WITH_XINCLUDE)
1349AC_SUBST(XINCLUDE_OBJ)
1350AC_SUBST(TEST_XINCLUDE)
1351
Daniel Veillard319e1592014-07-15 11:13:15 +08001352if test "$with_xptr" = "" -a "$with_xpath" = "no" ; then
1353 with_xptr=no
1354fi
1355
1356if test "$with_schematron" = "" -a "$with_xpath" = "no" ; then
1357 with_schematron=no
1358fi
1359
1360if test "$with_schematron" = "no" ; then
1361 echo "Disabling Schematron support"
1362 WITH_SCHEMATRON=0
1363 TEST_SCHEMATRON=
1364else
1365 echo "Enabled Schematron support"
1366 WITH_SCHEMATRON=1
1367 TEST_SCHEMATRON="Schematrontests"
1368 with_xpath=yes
1369 with_pattern=yes
1370 with_schematron=yes
1371fi
1372AC_SUBST(WITH_SCHEMATRON)
1373AC_SUBST(TEST_SCHEMATRON)
1374
Daniel Veillard361d8452000-04-03 19:48:13 +00001375if test "$with_xpath" = "no" ; then
1376 echo Disabling XPATH support
1377 WITH_XPATH=0
1378 XPATH_OBJ=
Daniel Veillard4432df22003-09-28 18:58:27 +00001379 TEST_XPATH=
Daniel Veillard361d8452000-04-03 19:48:13 +00001380else
1381 WITH_XPATH=1
1382 XPATH_OBJ=xpath.o
Daniel Veillard4432df22003-09-28 18:58:27 +00001383 TEST_XPATH=XPathtests
Daniel Veillard361d8452000-04-03 19:48:13 +00001384fi
1385AC_SUBST(WITH_XPATH)
1386AC_SUBST(XPATH_OBJ)
Daniel Veillard4432df22003-09-28 18:58:27 +00001387AC_SUBST(TEST_XPATH)
Daniel Veillard361d8452000-04-03 19:48:13 +00001388
William M. Brack21e4ef22005-01-02 09:53:13 +00001389dnl
1390dnl output functions
1391dnl
1392if test "$with_output" = "no" ; then
1393 echo Disabling serialization/saving support
1394 WITH_OUTPUT=0
Daniel Veillardc8df0aa2000-10-10 23:50:30 +00001395else
William M. Brack21e4ef22005-01-02 09:53:13 +00001396 WITH_OUTPUT=1
Daniel Veillardc8df0aa2000-10-10 23:50:30 +00001397fi
William M. Brack21e4ef22005-01-02 09:53:13 +00001398AC_SUBST(WITH_OUTPUT)
Daniel Veillard9e8bfae2000-11-06 16:43:11 +00001399
Daniel Veillard6e90d192001-07-03 16:37:49 +00001400WITH_ICONV=0
Daniel Veillard496a1cf2000-05-03 14:20:55 +00001401if test "$with_iconv" = "no" ; then
1402 echo Disabling ICONV support
Daniel Veillardd574f782001-03-14 19:40:17 +00001403else
Daniel Veillard220346d2001-12-07 11:33:54 +00001404 if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then
Daniel Veillard6e90d192001-07-03 16:37:49 +00001405 CPPFLAGS="${CPPFLAGS} -I$with_iconv/include"
Daniel Veillardf5b44e42001-09-17 17:19:54 +00001406 # Export this since our headers include iconv.h
1407 XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include"
Daniel Veillard6e90d192001-07-03 16:37:49 +00001408 ICONV_LIBS="-L$with_iconv/lib"
Daniel Veillard496a1cf2000-05-03 14:20:55 +00001409 fi
Daniel Veillard6e90d192001-07-03 16:37:49 +00001410
1411 AC_CHECK_HEADER(iconv.h,
1412 AC_MSG_CHECKING(for iconv)
Daniel Richard Gec4fc522012-08-17 10:04:30 +08001413 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
1414#include <iconv.h>]],[[
Daniel Veillard6e90d192001-07-03 16:37:49 +00001415iconv_t cd = iconv_open ("","");
Daniel Richard Gec4fc522012-08-17 10:04:30 +08001416iconv (cd, NULL, NULL, NULL, NULL);]])],[
Daniel Veillard6e90d192001-07-03 16:37:49 +00001417 AC_MSG_RESULT(yes)
1418 WITH_ICONV=1],[
1419 AC_MSG_RESULT(no)
1420 AC_MSG_CHECKING(for iconv in -liconv)
1421
1422 _ldflags="${LDFLAGS}"
1423 _libs="${LIBS}"
1424 LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
1425 LIBS="${LIBS} -liconv"
1426
Daniel Richard Gec4fc522012-08-17 10:04:30 +08001427 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
1428#include <iconv.h>]],[[
Daniel Veillard6e90d192001-07-03 16:37:49 +00001429iconv_t cd = iconv_open ("","");
Daniel Richard Gec4fc522012-08-17 10:04:30 +08001430iconv (cd, NULL, NULL, NULL, NULL);]])],[
Daniel Veillard6e90d192001-07-03 16:37:49 +00001431 AC_MSG_RESULT(yes)
1432 WITH_ICONV=1
1433 ICONV_LIBS="${ICONV_LIBS} -liconv"
1434 LIBS="${_libs}"
1435 LDFLAGS="${_ldflags}"],[
1436 AC_MSG_RESULT(no)
1437 LIBS="${_libs}"
1438 LDFLAGS="${_ldflags}"])]))
Daniel Veillard8e1a46d2008-02-15 07:47:26 +00001439
1440 if test "$WITH_ICONV" = "1" ; then
1441 AC_MSG_CHECKING([for iconv declaration])
1442 AC_CACHE_VAL(xml_cv_iconv_arg2, [
Daniel Richard Gec4fc522012-08-17 10:04:30 +08001443 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
Daniel Veillard8e1a46d2008-02-15 07:47:26 +00001444#include <iconv.h>
1445extern
1446#ifdef __cplusplus
1447"C"
1448#endif
1449#if defined(__STDC__) || defined(__cplusplus)
1450size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1451#else
1452size_t iconv();
1453#endif
Daniel Richard Gec4fc522012-08-17 10:04:30 +08001454]], [])], xml_cv_iconv_arg2="", xml_cv_iconv_arg2="const")])
Daniel Veillard8e1a46d2008-02-15 07:47:26 +00001455
1456 xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
1457 AC_MSG_RESULT([${xml_xxx:-
1458 }$xml_cv_iconv_decl])
1459 AC_DEFINE_UNQUOTED(ICONV_CONST, $xml_cv_iconv_arg2,
1460 [Define as const if the declaration of iconv() needs const.])
1461 fi
Daniel Veillard6e90d192001-07-03 16:37:49 +00001462fi
Daniel Veillard6984e6d2003-12-09 14:20:17 +00001463case "$host" in
1464 *mingw*) M_LIBS=""
1465 ;;
Daniel Veillard7a3447a2005-01-04 14:31:14 +00001466 *beos*) M_LIBS=""
1467 ;;
Scott McCreary508a8d62009-08-24 16:35:35 +02001468 *haiku*) M_LIBS=""
1469 ;;
Daniel Veillard6984e6d2003-12-09 14:20:17 +00001470 *) M_LIBS="-lm"
1471 ;;
1472esac
Daniel Veillardb82c1662001-12-09 14:00:54 +00001473XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
Daniel Veillard90d165b2003-09-01 20:33:13 +00001474XML_LIBTOOLLIBS="libxml2.la"
Daniel Veillard496a1cf2000-05-03 14:20:55 +00001475AC_SUBST(WITH_ICONV)
1476
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +01001477WITH_ICU=0
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +08001478ICU_LIBS=""
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +01001479if test "$with_icu" != "yes" ; then
1480 echo Disabling ICU support
1481else
1482 ICU_CONFIG=icu-config
1483 if ${ICU_CONFIG} --cflags >/dev/null 2>&1
1484 then
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +08001485 ICU_LIBS=`${ICU_CONFIG} --ldflags`
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +01001486 WITH_ICU=1
1487 echo Enabling ICU support
1488 else
1489 AC_MSG_ERROR([libicu config program icu-config not found])
1490 fi
1491fi
1492AC_SUBST(WITH_ICU)
Arfrever Frehtes Taifersar Arahesis1f01f492012-08-28 22:16:50 +08001493AC_SUBST(ICU_LIBS)
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +01001494
Daniel Veillard01fc1a92003-07-30 15:12:01 +00001495WITH_ISO8859X=1
Daniel Veillard01fc1a92003-07-30 15:12:01 +00001496if test "$WITH_ICONV" != "1" ; then
1497if test "$with_iso8859x" = "no" ; then
1498 echo Disabling ISO8859X support
1499 WITH_ISO8859X=0
1500fi
1501fi
1502AC_SUBST(WITH_ISO8859X)
1503
Daniel Veillardef4d3bc2003-02-07 12:38:22 +00001504if test "$with_schemas" = "no" ; then
William M. Brack21e4ef22005-01-02 09:53:13 +00001505 echo "Disabling Schemas/Relax-NG support"
Daniel Veillardef4d3bc2003-02-07 12:38:22 +00001506 WITH_SCHEMAS=0
1507 TEST_SCHEMAS=
1508else
Daniel Veillard71531f32003-02-05 13:19:53 +00001509 echo "Enabled Schemas/Relax-NG support"
Daniel Veillard4255d502002-04-16 15:50:10 +00001510 WITH_SCHEMAS=1
Daniel Veillard6eadf632003-01-23 18:29:16 +00001511 TEST_SCHEMAS="Schemastests Relaxtests"
Daniel Veillard6dc91962004-03-22 19:10:02 +00001512 if test "$PYTHON_INCLUDES" != "" ; then
1513 PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests"
1514 fi
Daniel Veillard23e73572002-09-19 19:56:43 +00001515 with_regexps=yes
Daniel Veillard4255d502002-04-16 15:50:10 +00001516fi
1517AC_SUBST(WITH_SCHEMAS)
1518AC_SUBST(TEST_SCHEMAS)
1519
Daniel Veillard23e73572002-09-19 19:56:43 +00001520if test "$with_regexps" = "no" ; then
1521 echo Disabling Regexps support
1522 WITH_REGEXPS=0
1523 TEST_REGEXPS=
1524else
1525 WITH_REGEXPS=1
1526 TEST_REGEXPS="Regexptests Automatatests"
1527fi
1528AC_SUBST(WITH_REGEXPS)
1529AC_SUBST(TEST_REGEXPS)
1530
Daniel Veillard361d8452000-04-03 19:48:13 +00001531if test "$with_debug" = "no" ; then
1532 echo Disabling DEBUG support
1533 WITH_DEBUG=0
1534 DEBUG_OBJ=
Daniel Veillard4432df22003-09-28 18:58:27 +00001535 TEST_DEBUG=
Daniel Veillard361d8452000-04-03 19:48:13 +00001536else
1537 WITH_DEBUG=1
1538 DEBUG_OBJ=debugXML.o
Daniel Veillard4432df22003-09-28 18:58:27 +00001539 TEST_DEBUG=Scripttests
Daniel Veillard361d8452000-04-03 19:48:13 +00001540fi
1541AC_SUBST(WITH_DEBUG)
1542AC_SUBST(DEBUG_OBJ)
Daniel Veillard4432df22003-09-28 18:58:27 +00001543AC_SUBST(TEST_DEBUG)
Daniel Veillard361d8452000-04-03 19:48:13 +00001544
Daniel Veillard361d8452000-04-03 19:48:13 +00001545if test "$with_mem_debug" = "yes" ; then
William M. Brack306e33c2004-06-12 01:01:22 +00001546 if test "$with_thread_alloc" = "yes" ; then
1547 echo Disabling memory debug - cannot use mem-debug with thread-alloc!
1548 WITH_MEM_DEBUG=0
1549 else
1550 echo Enabling memory debug support
1551 WITH_MEM_DEBUG=1
1552 fi
Daniel Veillard361d8452000-04-03 19:48:13 +00001553else
1554 WITH_MEM_DEBUG=0
1555fi
1556AC_SUBST(WITH_MEM_DEBUG)
1557
Daniel Veillard22cdb842004-10-04 14:09:17 +00001558if test "$with_run_debug" = "yes" ; then
1559 echo Enabling runtime debug support
1560 WITH_RUN_DEBUG=1
1561else
1562 WITH_RUN_DEBUG=0
1563fi
1564AC_SUBST(WITH_RUN_DEBUG)
Daniel Veillard1638a472003-08-14 01:23:25 +00001565
1566WIN32_EXTRA_LIBADD=
1567WIN32_EXTRA_LDFLAGS=
William M. Bracka73f45b2005-01-11 02:21:33 +00001568CYGWIN_EXTRA_LDFLAGS=
1569CYGWIN_EXTRA_PYTHON_LIBADD=
LRNfbd4ddf2010-11-04 15:45:46 +01001570WIN32_EXTRA_PYTHON_LIBADD=
Daniel Veillard1638a472003-08-14 01:23:25 +00001571case "$host" in
1572 *-*-mingw*)
Daniel Veillard6984e6d2003-12-09 14:20:17 +00001573 CPPFLAGS="$CPPFLAGS -DWIN32"
1574 WIN32_EXTRA_LIBADD="-lws2_32"
Daniel Veillard1638a472003-08-14 01:23:25 +00001575 WIN32_EXTRA_LDFLAGS="-no-undefined"
1576 AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation])
LRNfbd4ddf2010-11-04 15:45:46 +01001577 if test "${PYTHON}" != ""
1578 then
John Heina4fe9b22012-05-10 22:12:46 +08001579 WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)"
LRNfbd4ddf2010-11-04 15:45:46 +01001580 fi
Daniel Veillard1638a472003-08-14 01:23:25 +00001581 ;;
Daniel Veillardd392ba72004-08-04 14:56:45 +00001582 *-*-cygwin*)
1583 CYGWIN_EXTRA_LDFLAGS="-no-undefined"
William M. Bracka73f45b2005-01-11 02:21:33 +00001584 if test "${PYTHON}" != ""
1585 then
1586 CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
1587 fi
Daniel Veillardd392ba72004-08-04 14:56:45 +00001588 ;;
Daniel Veillard1638a472003-08-14 01:23:25 +00001589esac
1590AC_SUBST(WIN32_EXTRA_LIBADD)
1591AC_SUBST(WIN32_EXTRA_LDFLAGS)
LRNfbd4ddf2010-11-04 15:45:46 +01001592AC_SUBST(WIN32_EXTRA_PYTHON_LIBADD)
Daniel Veillardd392ba72004-08-04 14:56:45 +00001593AC_SUBST(CYGWIN_EXTRA_LDFLAGS)
1594AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD)
Daniel Veillard1638a472003-08-14 01:23:25 +00001595
Andoni Moralesfda57172012-05-08 10:46:09 +08001596dnl Checking the standard string functions availability
Roumen Petrov978ff222012-05-20 16:07:54 +03001597dnl
1598dnl Note mingw* has C99 implementation that produce expected xml numbers
1599dnl if code use {v}snprintf functions.
1600dnl If you like to activate at run-time C99 compatible number output
1601dnl see release note for mingw runtime 3.15:
1602dnl http://sourceforge.net/project/shownotes.php?release_id=24832
1603dnl
1604dnl Also *win32*config.h files redefine them for various MSC compilers.
1605dnl
1606dnl So do not redefine {v}snprintf to _{v}snprintf like follwing:
1607dnl AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around])
1608dnl AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around])
1609dnl and do not redefine those functions is C-source files.
1610dnl
1611AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,,
1612 NEED_TRIO=1)
Andoni Moralesfda57172012-05-08 10:46:09 +08001613
Daniel Veillardbfa5cf12008-08-27 15:33:28 +00001614if test "$with_coverage" = "yes" -a "${GCC}" = "yes"
1615then
1616 echo Enabling code coverage for GCC
1617 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
1618 LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
1619else
1620 echo Disabling code coverage for GCC
1621fi
1622
Daniel Veillard6984e6d2003-12-09 14:20:17 +00001623AC_SUBST(CPPFLAGS)
Daniel Veillardd7e200c1999-11-15 17:53:11 +00001624AC_SUBST(CFLAGS)
Daniel Veillardbfa5cf12008-08-27 15:33:28 +00001625AC_SUBST(LDFLAGS)
Daniel Veillardf5c2c871999-12-01 09:51:45 +00001626AC_SUBST(XML_CFLAGS)
Daniel Veillardd7e200c1999-11-15 17:53:11 +00001627
Daniel Veillardb05deb71999-08-10 19:04:08 +00001628AC_SUBST(XML_LIBDIR)
1629AC_SUBST(XML_LIBS)
Daniel Veillard90d165b2003-09-01 20:33:13 +00001630AC_SUBST(XML_LIBTOOLLIBS)
Daniel Veillard81418e32001-05-22 15:08:55 +00001631AC_SUBST(ICONV_LIBS)
Daniel Veillardb05deb71999-08-10 19:04:08 +00001632AC_SUBST(XML_INCLUDEDIR)
1633AC_SUBST(HTML_DIR)
1634AC_SUBST(HAVE_ISNAN)
1635AC_SUBST(HAVE_ISINF)
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +00001636AC_SUBST(PYTHON)
1637AC_SUBST(PYTHON_VERSION)
1638AC_SUBST(PYTHON_INCLUDES)
Daniel Veillard253aa2c2002-02-02 09:17:16 +00001639AC_SUBST(PYTHON_SITE_PACKAGES)
Daniel Veillardb05deb71999-08-10 19:04:08 +00001640
Daniel Veillardb05deb71999-08-10 19:04:08 +00001641AC_SUBST(M_LIBS)
Daniel Veillard437b87b2000-01-03 17:30:46 +00001642AC_SUBST(RDL_LIBS)
Daniel Veillard361d8452000-04-03 19:48:13 +00001643
Daniel Veillard9715c172002-11-25 16:33:40 +00001644dnl for the spec file
1645RELDATE=`date +'%a %b %e %Y'`
1646AC_SUBST(RELDATE)
Daniel Veillard6dc91962004-03-22 19:10:02 +00001647AC_SUBST(PYTHON_TESTS)
Daniel Veillard9715c172002-11-25 16:33:40 +00001648
Daniel Veillardc6e997c2003-01-27 12:35:42 +00001649rm -f COPYING.LIB COPYING
Daniel Richard G5706b6d2012-08-06 11:32:54 +08001650ln -s $srcdir/Copyright COPYING
Daniel Veillardc575b992002-02-08 13:28:40 +00001651
Daniel Veillarde4177a52004-01-08 16:43:57 +00001652# keep on one line for cygwin c.f. #130896
Daniel Richard Gec4fc522012-08-17 10:04:30 +08001653AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py])
1654AC_OUTPUT
Arturo Espinosa15fe6e71998-09-07 17:27:57 +00001655
Daniel Veillard06d25242004-02-25 13:01:42 +00001656chmod +x xml2-config python/setup.py
Daniel Veillard67952602006-01-05 15:29:44 +00001657echo Done configuring