blob: ad1fd3300e7a4884663a594493be53f964a2dc3e [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.2)
Owen Taylor3473f882001-02-23 17:55:21 +00003AC_INIT(entities.c)
Daniel Veillard01791d51998-07-24 19:24:09 +00004AM_CONFIG_HEADER(config.h)
Daniel Veillardd2ade932000-09-30 14:39:55 +00005AC_CANONICAL_HOST
Daniel Veillard14fff061999-06-22 21:49:07 +00006
Daniel Veillardcf461992000-03-14 18:30:20 +00007LIBXML_MAJOR_VERSION=2
Daniel Veillard09ab7e12001-07-10 15:49:44 +00008LIBXML_MINOR_VERSION=4
Daniel Veillard2fc2db72001-09-14 17:33:51 +00009LIBXML_MICRO_VERSION=5
Daniel Veillard14fff061999-06-22 21:49:07 +000010LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
11LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
12
Daniel Veillard361d8452000-04-03 19:48:13 +000013LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
14
Daniel Veillard14fff061999-06-22 21:49:07 +000015AC_SUBST(LIBXML_MAJOR_VERSION)
16AC_SUBST(LIBXML_MINOR_VERSION)
17AC_SUBST(LIBXML_MICRO_VERSION)
18AC_SUBST(LIBXML_VERSION)
19AC_SUBST(LIBXML_VERSION_INFO)
Daniel Veillard361d8452000-04-03 19:48:13 +000020AC_SUBST(LIBXML_VERSION_NUMBER)
Daniel Veillard14fff061999-06-22 21:49:07 +000021
Daniel Veillard361d8452000-04-03 19:48:13 +000022VERSION=${LIBXML_VERSION}
Daniel Veillard14fff061999-06-22 21:49:07 +000023
Daniel Veillardedfb29b2000-03-14 19:59:05 +000024AM_INIT_AUTOMAKE(libxml2, $VERSION)
Daniel Veillard1164e751999-02-16 16:29:17 +000025
26AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
Daniel Veillard01791d51998-07-24 19:24:09 +000027
28dnl Checks for programs.
29AC_PROG_CC
30AC_PROG_INSTALL
Sebastian Wilhelmia44c8a41998-08-07 08:38:58 +000031AC_PROG_CPP
Daniel Veillard01791d51998-07-24 19:24:09 +000032AC_PATH_PROG(RM, rm, /bin/rm)
33AC_PATH_PROG(MV, mv, /bin/mv)
34AC_PATH_PROG(TAR, tar, /bin/tar)
Daniel Veillard01791d51998-07-24 19:24:09 +000035
Daniel Veillard03109292000-08-14 14:58:22 +000036dnl Make sure we have an ANSI compiler
37AM_C_PROTOTYPES
38test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
39
Daniel Veillard01791d51998-07-24 19:24:09 +000040AM_PROG_LIBTOOL
41
42AM_MAINTAINER_MODE
43
Daniel Veillard71b656e2000-01-05 14:46:17 +000044dnl Checks for zlib library.
Owen Taylor3473f882001-02-23 17:55:21 +000045_cppflags="${CPPFLAGS}"
46_ldflags="${LDFLAGS}"
Daniel Veillard71b656e2000-01-05 14:46:17 +000047
Owen Taylor3473f882001-02-23 17:55:21 +000048AC_ARG_WITH(zlib,
49[ --with-zlib[=DIR] use libz in DIR],[
50 if test "$withval" != "no" -a "$withval" != "yes"; then
51 Z_DIR=$withval
52 CPPFLAGS="${CPPFLAGS} -I$withval/include"
53 LDFLAGS="${LDFLAGS} -L$withval/lib"
54 fi
Daniel Veillard3fbe8e32001-10-06 13:30:33 +000055 if test "$withval" != "no"; then
56 AC_CHECK_HEADERS(zlib.h,
57 AC_CHECK_LIB(z, gzread,[
58 AC_DEFINE(HAVE_LIBZ)
59 if test "x${Z_DIR}" != "x"; then
60 Z_CFLAGS="-I${Z_DIR}/include"
61 Z_LIBS="-L${Z_DIR}/lib -lz"
62 [case ${host} in
63 *-*-solaris*)
64 Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
65 ;;
66 esac]
67 else
68 Z_LIBS="-lz"
69 fi]))
70 fi
Owen Taylor3473f882001-02-23 17:55:21 +000071])
72
Owen Taylor3473f882001-02-23 17:55:21 +000073AC_SUBST(Z_CFLAGS)
74AC_SUBST(Z_LIBS)
75
76CPPFLAGS=${_cppflags}
77LDFLAGS=${_ldflags}
Daniel Veillardb05deb71999-08-10 19:04:08 +000078
Daniel Veillard01791d51998-07-24 19:24:09 +000079dnl Checks for header files.
80AC_HEADER_DIRENT
81AC_HEADER_STDC
82AC_CHECK_HEADERS(fcntl.h unistd.h ctype.h dirent.h errno.h malloc.h)
Daniel Veillard27b55282001-04-11 12:22:25 +000083AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h ansidecl.h)
Daniel Veillardb05deb71999-08-10 19:04:08 +000084AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h)
Daniel Veillard7f7d1111999-09-22 09:46:25 +000085AC_CHECK_HEADERS(stdlib.h sys/socket.h netinet/in.h arpa/inet.h)
Daniel Veillard46e370e2000-07-21 20:32:03 +000086AC_CHECK_HEADERS(netdb.h sys/time.h sys/select.h sys/mman.h)
Daniel Veillard068a9652001-06-07 15:30:26 +000087AC_CHECK_HEADERS(signal.h)
Daniel Veillard01791d51998-07-24 19:24:09 +000088
Daniel Veillard1164e751999-02-16 16:29:17 +000089dnl Specific dir for HTML output ?
90if test "x$with_html_dir" = "x" ; then
Daniel Veillard0a6c3582001-03-14 19:15:37 +000091 HTML_DIR='$(prefix)/doc'
Daniel Veillard1164e751999-02-16 16:29:17 +000092else
93 HTML_DIR=$with_html_dir
94fi
95
96AC_SUBST(HTML_DIR)
97
Daniel Veillard01791d51998-07-24 19:24:09 +000098dnl Checks for library functions.
99AC_FUNC_STRFTIME
Daniel Veillard92ad2102001-03-27 12:47:33 +0000100AC_CHECK_FUNCS(strdup strndup strerror)
Daniel Veillard71b656e2000-01-05 14:46:17 +0000101AC_CHECK_FUNCS(finite isnand fp_class class fpclass)
Daniel Veillard7f7d1111999-09-22 09:46:25 +0000102AC_CHECK_FUNCS(strftime localtime)
Daniel Veillard068a9652001-06-07 15:30:26 +0000103AC_CHECK_FUNCS(stat _stat signal)
Daniel Veillard7f7d1111999-09-22 09:46:25 +0000104
Daniel Veillard92ad2102001-03-27 12:47:33 +0000105dnl Checking the standard string functions availability
106AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,,
107 NEED_TRIO=1)
108
Daniel Veillard7f7d1111999-09-22 09:46:25 +0000109dnl Checks for inet libraries:
Daniel Veillard71b656e2000-01-05 14:46:17 +0000110AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
111AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
112AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect))
Daniel Veillardb05deb71999-08-10 19:04:08 +0000113
Daniel Veillardb0426ca2000-10-11 23:39:43 +0000114dnl Determine what socket length (socklen_t) data type is
115AC_MSG_CHECKING([for type of socket length (socklen_t)])
116AC_TRY_COMPILE2([
117#include <stddef.h>
118#include <sys/types.h>
119#include <sys/socket.h>],[
120(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
121 AC_MSG_RESULT(socklen_t *)
122 SOCKLEN_T=socklen_t],[
123 AC_TRY_COMPILE2([
124#include <stddef.h>
125#include <sys/types.h>
126#include <sys/socket.h>],[
127(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
128 AC_MSG_RESULT(size_t *)
129 SOCKLEN_T=size_t],[
130 AC_TRY_COMPILE2([
131#include <stddef.h>
132#include <sys/types.h>
133#include <sys/socket.h>],[
134(void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
135 AC_MSG_RESULT(int *)
136 SOCKLEN_T=int],[
137 AC_MSG_WARN(could not determine)])])])
138AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T)
139
Daniel Veillardb05deb71999-08-10 19:04:08 +0000140dnl Checks for isnan in libm if not in libc
Daniel Veillard71b656e2000-01-05 14:46:17 +0000141AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
Bjorn Reesee1dc0112001-03-03 12:09:03 +0000142 [AC_DEFINE(HAVE_ISNAN)]))
Daniel Veillardb05deb71999-08-10 19:04:08 +0000143
Daniel Veillard760f4422001-02-15 14:59:48 +0000144AC_CHECK_FUNC(isinf, AC_DEFINE(HAVE_ISINF) , AC_CHECK_LIB(m, isinf,
Bjorn Reesee1dc0112001-03-03 12:09:03 +0000145 [AC_DEFINE(HAVE_ISINF)]))
Daniel Veillardb05deb71999-08-10 19:04:08 +0000146
147XML_LIBDIR='-L${libdir}'
Daniel Veillard07cdb2a2001-09-12 20:19:58 +0000148XML_INCLUDEDIR='-I${includedir}/libxml2/libxml -I${includedir}/libxml2'
Daniel Veillardb05deb71999-08-10 19:04:08 +0000149
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000150dnl
Daniel Veillardf5c2c871999-12-01 09:51:45 +0000151dnl Extra flags
152dnl
153XML_CFLAGS=""
Daniel Veillard357c9602001-05-03 10:49:20 +0000154RDL_LIBS=""
Daniel Veillardf5c2c871999-12-01 09:51:45 +0000155
156dnl
Daniel Veillardb45c43b2001-04-28 17:02:11 +0000157dnl Workaround for native compilers
158dnl HP : http://bugs.gnome.org/db/31/3163.html
159dnl DEC : Enable NaN/Inf
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000160dnl
Daniel Veillard03109292000-08-14 14:58:22 +0000161if test "${GCC}" != "yes" ; then
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000162 case "${host}" in
163 *-*-hpux* )
Daniel Veillard03109292000-08-14 14:58:22 +0000164 CFLAGS="${CFLAGS} -Wp,-H30000"
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000165 ;;
Daniel Veillardb45c43b2001-04-28 17:02:11 +0000166 *-dec-osf* )
167 CFLAGS="${CFLAGS} -ieee"
168 ;;
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000169 esac
Daniel Veillardd574f782001-03-14 19:40:17 +0000170else
171 CFLAGS="${CFLAGS} -Wall"
Daniel Veillard14839d52001-06-06 16:11:56 +0000172 case "${host}" in
173 alpha*-*-linux* )
174 CFLAGS="${CFLAGS} -mieee"
175 ;;
176 esac
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000177fi
Daniel Veillardb0426ca2000-10-11 23:39:43 +0000178case ${host} in
179 *-*-solaris*)
Daniel Veillardd2ade932000-09-30 14:39:55 +0000180 XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
181 ;;
182esac
183
Daniel Veillardf5c2c871999-12-01 09:51:45 +0000184
Daniel Veillardb0426ca2000-10-11 23:39:43 +0000185
Daniel Veillardf5c2c871999-12-01 09:51:45 +0000186dnl
187dnl Use buffers for content
188dnl
189
190AC_ARG_WITH(buffers, [ --with-buffers Use buffers for node content])
191if test "$with_buffers" = "yes" ; then
192 CFLAGS="${CFLAGS} -DXML_USE_BUFFER_CONTENT"
193 XML_CFLAGS="${XML_CFLAGS} -DXML_USE_BUFFER_CONTENT"
194fi
195
Daniel Veillard437b87b2000-01-03 17:30:46 +0000196dnl
197dnl Tester makes use of readline if present
198dnl
Daniel Veillard03109292000-08-14 14:58:22 +0000199_cppflags="${CPPFLAGS}"
200_ldflags="${LDFLAGS}"
Daniel Veillard437b87b2000-01-03 17:30:46 +0000201
Daniel Veillard03109292000-08-14 14:58:22 +0000202AC_ARG_WITH(readline,
203[ --with-readline=DIR use readline in DIR],[
204 if test "$withval" != "no" -a "$withval" != "yes"; then
205 RDL_DIR=$withval
206 CPPFLAGS="${CPPFLAGS} -I$withval/include"
207 LDFLAGS="${LDFLAGS} -L$withval/lib"
208 fi
209])
210
Daniel Veillard361d8452000-04-03 19:48:13 +0000211dnl
Daniel Veillardf6eea272001-01-18 12:17:12 +0000212dnl specific tests to setup DV's devel environment with debug etc ...
Daniel Veillard81418e32001-05-22 15:08:55 +0000213dnl (-Wunreachable-code)
Daniel Veillardf6eea272001-01-18 12:17:12 +0000214dnl
215if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ; then
216 if test "${with_mem_debug}" = "" ; then
217 with_mem_debug="yes"
218 fi
Daniel Veillardeae522a2001-04-23 13:41:34 +0000219 if test "${with_docbook}" = "" ; then
220 with_docbook="yes"
221 fi
Daniel Veillardf6eea272001-01-18 12:17:12 +0000222 if test "${with_xptr}" = "" ; then
223 with_xptr="yes"
224 fi
Daniel Veillard017b1082001-06-21 11:20:21 +0000225 CFLAGS="-g -O -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 "
Daniel Veillardc86a4fa2001-03-26 16:28:29 +0000226dnl -Wcast-qual -ansi
Daniel Veillardf6eea272001-01-18 12:17:12 +0000227fi
Daniel Veillard92ad2102001-03-27 12:47:33 +0000228
229dnl
230dnl Check for trio string functions
231dnl
232
233if test "${NEED_TRIO}" = "1" ; then
234 echo Adding trio library for string functions
235 WITH_TRIO=1
236else
237 WITH_TRIO=0
238fi
Daniel Veillard01ef7382001-05-08 07:31:43 +0000239AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1")
Daniel Veillard92ad2102001-03-27 12:47:33 +0000240AC_SUBST(WITH_TRIO)
241
Daniel Veillardf6eea272001-01-18 12:17:12 +0000242dnl
Daniel Veillard361d8452000-04-03 19:48:13 +0000243dnl Aloow to disable various pieces
244dnl
245
Daniel Veillardf012a642001-07-23 19:10:52 +0000246AC_ARG_WITH(history, [ --with-history Add history support to xmllint shell(off)])
247if test "$with_ftp" = "yes" ; then
248 echo Enabling xmllint shell history
249 dnl check for terminal library. this is a very cool solution
250 dnl from octave's configure.in
251 unset tcap
252 for termlib in ncurses curses termcap terminfo termlib; do
253 AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"])
254 test -n "$tcap" && break
255 done
256
257 AC_CHECK_HEADER(readline/history.h,
258 AC_CHECK_LIB(history, append_history,[
259 RDL_LIBS="-lhistory"
260 AC_DEFINE(HAVE_LIBHISTORY)]))
261 AC_CHECK_HEADER(readline/readline.h,
262 AC_CHECK_LIB(readline, readline,[
263 RDL_LIBS="-lreadline $RDL_LIBS $tcap"
264 AC_DEFINE(HAVE_LIBREADLINE)], , $tcap))
265 if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then
266 CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include"
267 RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS"
268 else
269 CPPFLAGS=${_cppflags}
270 fi
271 LDFLAGS=${_ldflags}
272fi
273
274AC_SUBST(WITH_FTP)
275AC_SUBST(FTP_OBJ)
Daniel Veillard361d8452000-04-03 19:48:13 +0000276AC_ARG_WITH(ftp, [ --with-ftp Add the FTP support (on)])
277if test "$with_ftp" = "no" ; then
278 echo Disabling FTP support
279 WITH_FTP=0
280 FTP_OBJ=
281else
282 WITH_FTP=1
283 FTP_OBJ=nanoftp.o
284fi
285AC_SUBST(WITH_FTP)
286AC_SUBST(FTP_OBJ)
287
288AC_ARG_WITH(http, [ --with-http Add the HTTP support (on)])
289if test "$with_http" = "no" ; then
290 echo Disabling HTTP support
291 WITH_HTTP=0
292 HTTP_OBJ=
293else
294 WITH_HTTP=1
295 HTTP_OBJ=nanohttp.o
296fi
297AC_SUBST(WITH_HTTP)
298AC_SUBST(HTTP_OBJ)
299
300AC_ARG_WITH(html, [ --with-html Add the HTML support (on)])
301if test "$with_html" = "no" ; then
302 echo Disabling HTML support
303 WITH_HTML=0
304 HTML_OBJ=
305else
306 WITH_HTML=1
307 HTML_OBJ="HTMLparser.o HTMLtree.o"
308fi
309AC_SUBST(WITH_HTML)
310AC_SUBST(HTML_OBJ)
311
Daniel Veillarda7374592001-05-10 14:17:55 +0000312AC_ARG_WITH(catalog, [ --with-catalog Add the Catalog support (on)])
313if test "$with_catalog" = "no" ; then
314 echo Disabling Catalog support
315 WITH_CATALOG=0
316 CATALOG_OBJ=
317else
318 WITH_CATALOG=1
319 CATALOG_OBJ="catalog.o"
320fi
321AC_SUBST(WITH_CATALOG)
322AC_SUBST(CATALOG_OBJ)
323
Daniel Veillard6e90d192001-07-03 16:37:49 +0000324AC_ARG_WITH(docbook, [ --with-docbook Add Docbook SGML support (on)])
Daniel Veillardb59076b2001-04-29 17:04:07 +0000325if test "$with_docbook" = "no" ; then
326 echo Disabling Docbook support
Daniel Veillardeae522a2001-04-23 13:41:34 +0000327 WITH_DOCB=0
328 DOCB_OBJ=
Daniel Veillardb59076b2001-04-29 17:04:07 +0000329else
330 WITH_DOCB=1
331 DOCB_OBJ="DOCBparser.o"
Daniel Veillardeae522a2001-04-23 13:41:34 +0000332fi
333AC_SUBST(WITH_DOCB)
334AC_SUBST(DOCB_OBJ)
335
336
Daniel Veillard361d8452000-04-03 19:48:13 +0000337AC_ARG_WITH(xpath, [ --with-xpath Add the XPATH support (on)])
338if test "$with_xpath" = "no" ; then
339 echo Disabling XPATH support
Daniel Veillard52afe802000-10-22 16:56:02 +0000340 with_xptr="no"
Daniel Veillard361d8452000-04-03 19:48:13 +0000341 WITH_XPATH=0
342 XPATH_OBJ=
343else
344 WITH_XPATH=1
345 XPATH_OBJ=xpath.o
346fi
347AC_SUBST(WITH_XPATH)
348AC_SUBST(XPATH_OBJ)
349
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000350AC_ARG_WITH(xptr, [ --with-xptr Add the XPointer support (on)])
351if test "$with_xptr" = "no" ; then
352 echo Disabling XPointer support
353 WITH_XPTR=0
354 XPTR_OBJ=
355else
356 WITH_XPTR=1
357 XPTR_OBJ=xpointer.o
358fi
359AC_SUBST(WITH_XPTR)
360AC_SUBST(XPTR_OBJ)
361
Daniel Veillard9e8bfae2000-11-06 16:43:11 +0000362AC_ARG_WITH(xinclude, [ --with-xinclude Add the XInclude support (on)])
363if test "$with_xinclude" = "no" ; then
364 echo Disabling XInclude support
365 WITH_XINCLUDE=0
366 XINCLUDE_OBJ=
367 with_xinclude="no"
368else
369 WITH_XINCLUDE=1
370 XINCLUDE_OBJ=xinclude.o
371fi
372AC_SUBST(WITH_XINCLUDE)
373AC_SUBST(XINCLUDE_OBJ)
374
Daniel Veillard6e90d192001-07-03 16:37:49 +0000375WITH_ICONV=0
376AC_ARG_WITH(iconv, [ --with-iconv[=DIR] Add ICONV support (on)])
Daniel Veillard496a1cf2000-05-03 14:20:55 +0000377if test "$with_iconv" = "no" ; then
378 echo Disabling ICONV support
Daniel Veillardd574f782001-03-14 19:40:17 +0000379else
Daniel Veillard6e90d192001-07-03 16:37:49 +0000380 if test "$with_iconv" != "yes" ; then
381 CPPFLAGS="${CPPFLAGS} -I$with_iconv/include"
Daniel Veillardf5b44e42001-09-17 17:19:54 +0000382 # Export this since our headers include iconv.h
383 XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include"
Daniel Veillard6e90d192001-07-03 16:37:49 +0000384 ICONV_LIBS="-L$with_iconv/lib"
Daniel Veillard496a1cf2000-05-03 14:20:55 +0000385 fi
Daniel Veillard6e90d192001-07-03 16:37:49 +0000386
387 AC_CHECK_HEADER(iconv.h,
388 AC_MSG_CHECKING(for iconv)
389 AC_TRY_LINK([#include <stdlib.h>
390#include <iconv.h>],[
391iconv_t cd = iconv_open ("","");
392iconv (cd, NULL, NULL, NULL, NULL);],[
393 AC_MSG_RESULT(yes)
394 WITH_ICONV=1],[
395 AC_MSG_RESULT(no)
396 AC_MSG_CHECKING(for iconv in -liconv)
397
398 _ldflags="${LDFLAGS}"
399 _libs="${LIBS}"
400 LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
401 LIBS="${LIBS} -liconv"
402
403 AC_TRY_LINK([#include <stdlib.h>
404#include <iconv.h>],[
405iconv_t cd = iconv_open ("","");
406iconv (cd, NULL, NULL, NULL, NULL);],[
407 AC_MSG_RESULT(yes)
408 WITH_ICONV=1
409 ICONV_LIBS="${ICONV_LIBS} -liconv"
410 LIBS="${_libs}"
411 LDFLAGS="${_ldflags}"],[
412 AC_MSG_RESULT(no)
413 LIBS="${_libs}"
414 LDFLAGS="${_ldflags}"])]))
415fi
Daniel Veillard81418e32001-05-22 15:08:55 +0000416XML_LIBS="-lxml2 $Z_LIBS $ICONV_LIBS -lm $LIBS"
Daniel Veillard496a1cf2000-05-03 14:20:55 +0000417AC_SUBST(WITH_ICONV)
418
Daniel Veillard361d8452000-04-03 19:48:13 +0000419AC_ARG_WITH(debug, [ --with-debug Add the debugging module (on)])
420if test "$with_debug" = "no" ; then
421 echo Disabling DEBUG support
422 WITH_DEBUG=0
423 DEBUG_OBJ=
424else
425 WITH_DEBUG=1
426 DEBUG_OBJ=debugXML.o
427fi
428AC_SUBST(WITH_DEBUG)
429AC_SUBST(DEBUG_OBJ)
430
431AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)])
432if test "$with_mem_debug" = "yes" ; then
433 echo Enabling memory debug support
434 WITH_MEM_DEBUG=1
435else
436 WITH_MEM_DEBUG=0
437fi
438AC_SUBST(WITH_MEM_DEBUG)
439
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000440AC_SUBST(CFLAGS)
Daniel Veillardf5c2c871999-12-01 09:51:45 +0000441AC_SUBST(XML_CFLAGS)
Daniel Veillardd7e200c1999-11-15 17:53:11 +0000442
Daniel Veillardb05deb71999-08-10 19:04:08 +0000443AC_SUBST(XML_LIBDIR)
444AC_SUBST(XML_LIBS)
Daniel Veillard81418e32001-05-22 15:08:55 +0000445AC_SUBST(ICONV_LIBS)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000446AC_SUBST(XML_INCLUDEDIR)
447AC_SUBST(HTML_DIR)
448AC_SUBST(HAVE_ISNAN)
449AC_SUBST(HAVE_ISINF)
450
Daniel Veillardb05deb71999-08-10 19:04:08 +0000451AC_SUBST(M_LIBS)
Daniel Veillard437b87b2000-01-03 17:30:46 +0000452AC_SUBST(RDL_LIBS)
Daniel Veillard361d8452000-04-03 19:48:13 +0000453
Daniel Veillardc5d64342001-06-24 12:13:24 +0000454AC_OUTPUT(libxml.spec Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile include/libxml/xmlversion.h include/libxml/xmlwin32version.h xml2-config libxml-2.0.pc xml2Conf.sh)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000455