Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 1 | dnl Process this file with autoconf to produce a configure script. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 2 | AC_INIT(entities.c) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 3 | AM_CONFIG_HEADER(config.h) |
Daniel Veillard | d2ade93 | 2000-09-30 14:39:55 +0000 | [diff] [blame] | 4 | AC_CANONICAL_HOST |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 5 | |
Daniel Veillard | cf46199 | 2000-03-14 18:30:20 +0000 | [diff] [blame] | 6 | LIBXML_MAJOR_VERSION=2 |
Daniel Veillard | 4fc5281 | 2003-09-01 20:33:13 +0000 | [diff] [blame] | 7 | LIBXML_MINOR_VERSION=6 |
Daniel Veillard | 298d964 | 2005-01-16 20:01:55 +0000 | [diff] [blame] | 8 | LIBXML_MICRO_VERSION=17 |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 9 | LIBXML_MICRO_VERSION_SUFFIX= |
Daniel Veillard | 4fc5281 | 2003-09-01 20:33:13 +0000 | [diff] [blame] | 10 | LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 11 | LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION |
| 12 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 13 | LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION` |
| 14 | |
William M. Brack | f402549 | 2004-08-18 21:08:46 +0000 | [diff] [blame] | 15 | if test -f CVS/Entries; then |
Daniel Veillard | dab93ea | 2004-08-20 16:47:10 +0000 | [diff] [blame] | 16 | extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%` |
| 17 | echo extra=$extra |
| 18 | if test "$extra" != "" |
| 19 | then |
| 20 | LIBXML_VERSION_EXTRA="-CVS$extra" |
| 21 | fi |
William M. Brack | f402549 | 2004-08-18 21:08:46 +0000 | [diff] [blame] | 22 | fi |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 23 | AC_SUBST(LIBXML_MAJOR_VERSION) |
| 24 | AC_SUBST(LIBXML_MINOR_VERSION) |
| 25 | AC_SUBST(LIBXML_MICRO_VERSION) |
| 26 | AC_SUBST(LIBXML_VERSION) |
| 27 | AC_SUBST(LIBXML_VERSION_INFO) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 28 | AC_SUBST(LIBXML_VERSION_NUMBER) |
William M. Brack | f402549 | 2004-08-18 21:08:46 +0000 | [diff] [blame] | 29 | AC_SUBST(LIBXML_VERSION_EXTRA) |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 30 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 31 | VERSION=${LIBXML_VERSION} |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 32 | |
Daniel Veillard | edfb29b | 2000-03-14 19:59:05 +0000 | [diff] [blame] | 33 | AM_INIT_AUTOMAKE(libxml2, $VERSION) |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 34 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 35 | dnl Checks for programs. |
| 36 | AC_PROG_CC |
| 37 | AC_PROG_INSTALL |
Sebastian Wilhelmi | a44c8a4 | 1998-08-07 08:38:58 +0000 | [diff] [blame] | 38 | AC_PROG_CPP |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 39 | AC_PATH_PROG(RM, rm, /bin/rm) |
| 40 | AC_PATH_PROG(MV, mv, /bin/mv) |
| 41 | AC_PATH_PROG(TAR, tar, /bin/tar) |
William M. Brack | 1826d0a | 2004-07-21 09:03:57 +0000 | [diff] [blame] | 42 | AC_PATH_PROG(PERL, perl, /usr/bin/perl) |
Daniel Veillard | 8b817da | 2004-09-30 09:19:33 +0000 | [diff] [blame] | 43 | AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint) |
Daniel Veillard | 06500c8 | 2004-09-07 09:12:44 +0000 | [diff] [blame] | 44 | AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 45 | |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 46 | dnl Make sure we have an ANSI compiler |
| 47 | AM_C_PROTOTYPES |
| 48 | test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant) |
| 49 | |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 50 | AC_LIBTOOL_WIN32_DLL |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 51 | AM_PROG_LIBTOOL |
| 52 | |
Daniel Veillard | d8cf906 | 2003-11-11 21:12:36 +0000 | [diff] [blame] | 53 | # AM_MAINTAINER_MODE |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 54 | |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 55 | dnl |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 56 | dnl We process the AC_ARG_WITH first so that later we can modify |
| 57 | dnl some of them to try to prevent impossible combinations. This |
| 58 | dnl also allows up so alphabetize the choices |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 59 | dnl |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 60 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 61 | dnl |
| 62 | dnl zlib option might change flags, so we save them initially |
| 63 | dnl |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 64 | _cppflags="${CPPFLAGS}" |
| 65 | _ldflags="${LDFLAGS}" |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 66 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 67 | AC_ARG_WITH(c14n, |
| 68 | [ --with-c14n add the Canonicalization support (on)]) |
| 69 | AC_ARG_WITH(catalog, |
| 70 | [ --with-catalog add the Catalog support (on)]) |
| 71 | AC_ARG_WITH(debug, |
| 72 | [ --with-debug add the debugging module (on)]) |
| 73 | AC_ARG_WITH(docbook, |
| 74 | [ --with-docbook add Docbook SGML support (on)]) |
| 75 | AC_ARG_WITH(fexceptions, |
| 76 | [ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)]) |
| 77 | AC_ARG_WITH(ftp, |
| 78 | [ --with-ftp add the FTP support (on)]) |
| 79 | AC_ARG_WITH(history, |
| 80 | [ --with-history add history support to xmllint shell(off)]) |
| 81 | AC_ARG_WITH(html, |
| 82 | [ --with-html add the HTML support (on)]) |
| 83 | dnl Specific dir for HTML output ? |
| 84 | AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=path], |
| 85 | [path to base html directory, default $datadir/doc/html]), |
| 86 | [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc']) |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 87 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 88 | AC_ARG_WITH(html-subdir, AC_HELP_STRING([--with-html-subdir=path], |
| 89 | [directory used under html-dir, default $PACKAGE-$VERSION/html]), |
| 90 | [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"], |
| 91 | [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"]) |
| 92 | AC_SUBST(HTML_DIR) |
| 93 | AC_ARG_WITH(http, |
| 94 | [ --with-http add the HTTP support (on)]) |
| 95 | AC_ARG_WITH(iconv, |
| 96 | [ --with-iconv[[=DIR]] add ICONV support (on)]) |
| 97 | AC_ARG_WITH(iso8859x, |
| 98 | [ --with-iso8859x add ISO8859X support if no iconv (on)]) |
| 99 | AC_ARG_WITH(legacy, |
| 100 | [ --with-legacy add deprecated APIs for compatibility (on)]) |
| 101 | AC_ARG_WITH(mem_debug, |
| 102 | [ --with-mem-debug add the memory debugging module (off)]) |
| 103 | AC_ARG_WITH(minimum, |
| 104 | [ --with-minimum build a minimally sized library (off)]) |
| 105 | AC_ARG_WITH(output, |
| 106 | [ --with-output add the serialization support (on)]) |
| 107 | AC_ARG_WITH(pattern, |
| 108 | [ --with-pattern add the xmlPattern selection interface (on)]) |
| 109 | AC_ARG_WITH(push, |
| 110 | [ --with-push add the PUSH parser interfaces (on)]) |
| 111 | AC_ARG_WITH(python, |
| 112 | [ --with-python[[=DIR]] build Python bindings if found]) |
| 113 | AC_ARG_WITH(reader, |
| 114 | [ --with-reader add the xmlReader parsing interface (on)]) |
| 115 | AC_ARG_WITH(readline, |
| 116 | [ --with-readline=DIR use readline in DIR],[ |
| 117 | if test "$withval" != "no" -a "$withval" != "yes"; then |
| 118 | RDL_DIR=$withval |
| 119 | CPPFLAGS="${CPPFLAGS} -I$withval/include" |
| 120 | LDFLAGS="${LDFLAGS} -L$withval/lib" |
| 121 | fi |
| 122 | ]) |
| 123 | AC_ARG_WITH(regexps, |
| 124 | [ --with-regexps add Regular Expressions support (on)]) |
| 125 | AC_ARG_WITH(run_debug, |
| 126 | [ --with-run-debug add the runtime debugging module (off)]) |
| 127 | AC_ARG_WITH(sax1, |
| 128 | [ --with-sax1 add the older SAX1 interface (on)]) |
| 129 | AC_ARG_WITH(schemas, |
| 130 | [ --with-schemas add Relax-NG and experimental Schemas support (on)]) |
| 131 | AC_ARG_WITH(threads, |
| 132 | [ --with-threads add multithread support(on)]) |
| 133 | AC_ARG_WITH(thread-alloc, |
| 134 | [ --with-thread-alloc add per-thread memory(off)]) |
| 135 | AC_ARG_WITH(tree, |
| 136 | [ --with-tree add the DOM like tree manipulation APIs (on)]) |
| 137 | AC_ARG_WITH(valid, |
| 138 | [ --with-valid add the DTD validation support (on)]) |
| 139 | AC_ARG_WITH(writer, |
| 140 | [ --with-writer add the xmlWriter saving interface (on)]) |
| 141 | AC_ARG_WITH(xinclude, |
| 142 | [ --with-xinclude add the XInclude support (on)]) |
| 143 | AC_ARG_WITH(xpath, |
| 144 | [ --with-xpath add the XPATH support (on)]) |
| 145 | AC_ARG_WITH(xptr, |
| 146 | [ --with-xptr add the XPointer support (on)]) |
Daniel Veillard | f6b71bd | 2005-01-04 17:50:14 +0000 | [diff] [blame] | 147 | AC_ARG_WITH(modules, |
| 148 | [ --with-modules add the dynamic modules support (on)]) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 149 | AC_ARG_WITH(zlib, |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 150 | [ --with-zlib[[=DIR]] use libz in DIR],[ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 151 | if test "$withval" != "no" -a "$withval" != "yes"; then |
| 152 | Z_DIR=$withval |
| 153 | CPPFLAGS="${CPPFLAGS} -I$withval/include" |
| 154 | LDFLAGS="${LDFLAGS} -L$withval/lib" |
| 155 | fi |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 156 | ]) |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 157 | |
| 158 | dnl |
| 159 | dnl option to build a minimal libxml2 library |
| 160 | dnl |
| 161 | if test "$with_minimum" = "yes" |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 162 | then |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 163 | echo "Configuring for a minimal library" |
| 164 | if test "$with_c14n" = "" |
| 165 | then |
| 166 | with_c14n=no |
| 167 | fi |
| 168 | if test "$with_catalog" = "" |
| 169 | then |
| 170 | with_catalog=no |
| 171 | fi |
| 172 | echo So far so good! |
| 173 | if test "$with_debug" = "" |
| 174 | then |
| 175 | with_debug=no |
| 176 | fi |
| 177 | if test "$with_docbook" = "" |
| 178 | then |
| 179 | with_docbook=no |
| 180 | fi |
| 181 | if test "$with_fexceptions" = "" |
| 182 | then |
| 183 | with_fexceptions=no |
| 184 | fi |
| 185 | if test "$with_ftp" = "" |
| 186 | then |
| 187 | with_ftp=no |
| 188 | fi |
| 189 | if test "$with_history" = "" |
| 190 | then |
| 191 | with_history=no |
| 192 | fi |
| 193 | if test "$with_html" = "" |
| 194 | then |
| 195 | with_html=no |
| 196 | fi |
| 197 | if test "$with_http" = "" |
| 198 | then |
| 199 | with_http=no |
| 200 | fi |
| 201 | if test "$with_iconv" = "" |
| 202 | then |
| 203 | with_iconv=no |
| 204 | fi |
| 205 | if test "$with_iso8859x" = "" |
| 206 | then |
| 207 | with_iso8859x=no |
| 208 | fi |
| 209 | if test "$with_legacy" = "" |
| 210 | then |
| 211 | with_legacy=no |
| 212 | fi |
| 213 | if test "$with_mem_debug" = "" |
| 214 | then |
| 215 | with_mem_debug=no |
| 216 | fi |
| 217 | if test "$with_output" = "" |
| 218 | then |
| 219 | with_output=no |
| 220 | fi |
| 221 | if test "$with_pattern" = "" |
| 222 | then |
| 223 | with_pattern=no |
| 224 | fi |
| 225 | if test "$with_push" = "" |
| 226 | then |
| 227 | with_push=no |
| 228 | fi |
| 229 | if test "$with_python" = "" |
| 230 | then |
| 231 | with_python=no |
| 232 | fi |
| 233 | if test "$with_reader" = "" |
| 234 | then |
| 235 | with_reader=no |
| 236 | fi |
| 237 | if test "$with_readline" = "" |
| 238 | then |
| 239 | with_readline=no |
| 240 | fi |
| 241 | if test "$with_regexp" = "" |
| 242 | then |
| 243 | with_regexp=no |
| 244 | fi |
| 245 | if test "$with_run_debug" = "" |
| 246 | then |
| 247 | with_run_debug=no |
| 248 | fi |
| 249 | if test "$with_sax1" = "" |
| 250 | then |
| 251 | with_sax1=no |
| 252 | fi |
| 253 | if test "$with_schemas" = "" |
| 254 | then |
| 255 | with_schemas=no |
| 256 | fi |
| 257 | if test "$with_threads" = "" |
| 258 | then |
| 259 | with_threads=no |
| 260 | fi |
| 261 | if test "$with_thread_alloc" = "" |
| 262 | then |
| 263 | with_thread_alloc=no |
| 264 | fi |
| 265 | if test "$with_tree" = "" |
| 266 | then |
| 267 | with_tree=no |
| 268 | fi |
| 269 | if test "$with_valid" = "" |
| 270 | then |
| 271 | with_valid=no |
| 272 | fi |
| 273 | if test "$with_writer" = "" |
| 274 | then |
| 275 | with_writer=no |
| 276 | fi |
| 277 | if test "$with_xinclude" = "" |
| 278 | then |
| 279 | with_xinclude=no |
| 280 | fi |
| 281 | if test "$with_xpath" = "" |
| 282 | then |
| 283 | with_xpath=no |
| 284 | fi |
| 285 | if test "$with_xptr" = "" |
| 286 | then |
| 287 | with_xptr=no |
| 288 | fi |
| 289 | if test "$with_zlib" = "" |
| 290 | then |
| 291 | with_zlib=no |
| 292 | fi |
Daniel Veillard | f6b71bd | 2005-01-04 17:50:14 +0000 | [diff] [blame] | 293 | if test "$with_modules" = "" |
| 294 | then |
| 295 | with_modules=no |
| 296 | fi |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 297 | fi |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 298 | |
| 299 | echo Checking zlib |
| 300 | |
| 301 | dnl Checks for zlib library. |
| 302 | |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 303 | if test "$with_zlib" = "no"; then |
| 304 | echo "Disabling compression support" |
| 305 | else |
Daniel Veillard | 3fbe8e3 | 2001-10-06 13:30:33 +0000 | [diff] [blame] | 306 | AC_CHECK_HEADERS(zlib.h, |
| 307 | AC_CHECK_LIB(z, gzread,[ |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 308 | AC_DEFINE([HAVE_LIBZ], [], [Have compression library]) |
Daniel Veillard | 3fbe8e3 | 2001-10-06 13:30:33 +0000 | [diff] [blame] | 309 | if test "x${Z_DIR}" != "x"; then |
| 310 | Z_CFLAGS="-I${Z_DIR}/include" |
| 311 | Z_LIBS="-L${Z_DIR}/lib -lz" |
| 312 | [case ${host} in |
| 313 | *-*-solaris*) |
| 314 | Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz" |
| 315 | ;; |
| 316 | esac] |
| 317 | else |
| 318 | Z_LIBS="-lz" |
| 319 | fi])) |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 320 | fi |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 321 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 322 | AC_SUBST(Z_CFLAGS) |
| 323 | AC_SUBST(Z_LIBS) |
| 324 | |
| 325 | CPPFLAGS=${_cppflags} |
| 326 | LDFLAGS=${_ldflags} |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 327 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 328 | echo Checking headers |
| 329 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 330 | dnl Checks for header files. |
| 331 | AC_HEADER_DIRENT |
| 332 | AC_HEADER_STDC |
Daniel Veillard | 817e70b | 2002-11-19 22:28:48 +0000 | [diff] [blame] | 333 | AC_CHECK_HEADERS([fcntl.h]) |
| 334 | AC_CHECK_HEADERS([unistd.h]) |
| 335 | AC_CHECK_HEADERS([ctype.h]) |
| 336 | AC_CHECK_HEADERS([dirent.h]) |
| 337 | AC_CHECK_HEADERS([errno.h]) |
| 338 | AC_CHECK_HEADERS([malloc.h]) |
| 339 | AC_CHECK_HEADERS([stdarg.h]) |
| 340 | AC_CHECK_HEADERS([sys/stat.h]) |
| 341 | AC_CHECK_HEADERS([sys/types.h]) |
| 342 | AC_CHECK_HEADERS([time.h]) |
| 343 | AC_CHECK_HEADERS([ansidecl.h]) |
| 344 | AC_CHECK_HEADERS([ieeefp.h]) |
| 345 | AC_CHECK_HEADERS([nan.h]) |
| 346 | AC_CHECK_HEADERS([math.h]) |
Daniel Veillard | ebe48c6 | 2003-12-03 12:12:27 +0000 | [diff] [blame] | 347 | AC_CHECK_HEADERS([limits.h]) |
Daniel Veillard | 817e70b | 2002-11-19 22:28:48 +0000 | [diff] [blame] | 348 | AC_CHECK_HEADERS([fp_class.h]) |
| 349 | AC_CHECK_HEADERS([float.h]) |
| 350 | AC_CHECK_HEADERS([stdlib.h]) |
| 351 | AC_CHECK_HEADERS([sys/socket.h], [], [], |
| 352 | [#if HAVE_SYS_TYPES_H |
| 353 | # include <sys/types.h> |
| 354 | # endif |
| 355 | ]) |
| 356 | AC_CHECK_HEADERS([netinet/in.h], [], [], |
| 357 | [#if HAVE_SYS_TYPES_H |
| 358 | # include <sys/types.h> |
| 359 | # endif |
| 360 | ]) |
| 361 | AC_CHECK_HEADERS([arpa/inet.h], [], [], |
| 362 | [#if HAVE_SYS_TYPES_H |
| 363 | # include <sys/types.h> |
| 364 | # endif |
| 365 | #if HAVE_ARPA_INET_H |
| 366 | # include <arpa/inet.h> |
| 367 | # endif |
| 368 | ]) |
| 369 | AC_CHECK_HEADERS([netdb.h]) |
| 370 | AC_CHECK_HEADERS([sys/time.h]) |
| 371 | AC_CHECK_HEADERS([sys/select.h]) |
| 372 | AC_CHECK_HEADERS([sys/mman.h]) |
| 373 | AC_CHECK_HEADERS([sys/timeb.h]) |
| 374 | AC_CHECK_HEADERS([signal.h]) |
| 375 | AC_CHECK_HEADERS([arpa/nameser.h], [], [], |
| 376 | [#if HAVE_SYS_TYPES_H |
| 377 | # include <sys/types.h> |
| 378 | # endif |
| 379 | ]) |
| 380 | AC_CHECK_HEADERS([resolv.h], [], [], |
| 381 | [#if HAVE_SYS_TYPES_H |
| 382 | # include <sys/types.h> |
| 383 | # endif |
| 384 | #if HAVE_NETINET_IN_H |
| 385 | # include <netinet/in.h> |
| 386 | # endif |
| 387 | #if HAVE_ARPA_NAMESER_H |
| 388 | # include <arpa/nameser.h> |
| 389 | # endif |
| 390 | ]) |
Daniel Veillard | dcd9390 | 2005-01-13 11:25:15 +0000 | [diff] [blame] | 391 | AC_CHECK_HEADERS([dl.h]) |
| 392 | AC_CHECK_HEADERS([dlfcn.h]) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 393 | |
Daniel Veillard | fc97906 | 2004-03-04 22:07:16 +0000 | [diff] [blame] | 394 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 395 | echo Checking libraries |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 396 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 397 | dnl Checks for library functions. |
| 398 | AC_FUNC_STRFTIME |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 399 | AC_CHECK_FUNCS(strdup strndup strerror) |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 400 | AC_CHECK_FUNCS(finite isnand fp_class class fpclass) |
Daniel Veillard | 90bc371 | 2002-03-07 15:12:58 +0000 | [diff] [blame] | 401 | AC_CHECK_FUNCS(strftime localtime gettimeofday ftime) |
Daniel Veillard | 068a965 | 2001-06-07 15:30:26 +0000 | [diff] [blame] | 402 | AC_CHECK_FUNCS(stat _stat signal) |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 403 | |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 404 | dnl Checking the standard string functions availability |
| 405 | AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, |
| 406 | NEED_TRIO=1) |
| 407 | |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 408 | dnl Checks for inet libraries: |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 409 | AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) |
| 410 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
Daniel Veillard | 7a3447a | 2005-01-04 14:31:14 +0000 | [diff] [blame] | 411 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(net, setsockopt)) |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 412 | AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect)) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 413 | |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 414 | dnl Determine what socket length (socklen_t) data type is |
| 415 | AC_MSG_CHECKING([for type of socket length (socklen_t)]) |
| 416 | AC_TRY_COMPILE2([ |
| 417 | #include <stddef.h> |
| 418 | #include <sys/types.h> |
| 419 | #include <sys/socket.h>],[ |
| 420 | (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[ |
| 421 | AC_MSG_RESULT(socklen_t *) |
| 422 | SOCKLEN_T=socklen_t],[ |
| 423 | AC_TRY_COMPILE2([ |
| 424 | #include <stddef.h> |
| 425 | #include <sys/types.h> |
| 426 | #include <sys/socket.h>],[ |
| 427 | (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[ |
| 428 | AC_MSG_RESULT(size_t *) |
| 429 | SOCKLEN_T=size_t],[ |
| 430 | AC_TRY_COMPILE2([ |
| 431 | #include <stddef.h> |
| 432 | #include <sys/types.h> |
| 433 | #include <sys/socket.h>],[ |
| 434 | (void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[ |
| 435 | AC_MSG_RESULT(int *) |
| 436 | SOCKLEN_T=int],[ |
William M. Brack | 2e6b143 | 2004-02-09 15:10:28 +0000 | [diff] [blame] | 437 | AC_MSG_WARN(could not determine) |
Daniel Veillard | c7e3cc4 | 2004-09-28 12:33:52 +0000 | [diff] [blame] | 438 | SOCKLEN_T="int"])])]) |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 439 | AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T, [Determine what socket length (socklen_t) data type is]) |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 440 | |
Daniel Veillard | de2a67b | 2003-06-21 14:20:04 +0000 | [diff] [blame] | 441 | dnl ***********************Checking for availability of IPv6******************* |
| 442 | |
| 443 | AC_MSG_CHECKING([whether to enable IPv6]) |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 444 | AC_ARG_ENABLE(ipv6, [ --enable-ipv6[[=yes/no]] enables compilation of IPv6 code [[default=yes]]],, enable_ipv6=yes) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 445 | if test "$with_minimum" = "yes" |
| 446 | then |
| 447 | enable_ipv6=no |
| 448 | fi |
Daniel Veillard | de2a67b | 2003-06-21 14:20:04 +0000 | [diff] [blame] | 449 | if test $enable_ipv6 = yes; then |
| 450 | have_ipv6=no |
| 451 | AC_TRY_COMPILE([ |
| 452 | #include <sys/socket.h> |
| 453 | #include <sys/types.h>], [ |
| 454 | struct sockaddr_storage ss; |
| 455 | socket(AF_INET6, SOCK_STREAM, 0) |
| 456 | ], |
| 457 | have_ipv6=yes, |
| 458 | have_ipv6=no |
| 459 | ) |
| 460 | AC_MSG_RESULT($have_ipv6) |
| 461 | |
William M. Brack | 476cd96 | 2003-08-13 11:09:42 +0000 | [diff] [blame] | 462 | if test $have_ipv6 = yes; then |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 463 | AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6]) |
Dodji Seketeli | 8eba3f3 | 2004-11-09 18:30:30 +0000 | [diff] [blame] | 464 | have_broken_ss_family=no |
| 465 | |
| 466 | dnl ********************************************************************* |
| 467 | dnl on some platforms (like AIX 5L), the structure sockaddr doesn't have |
| 468 | dnl a ss_family member, but rather __ss_family. Let's detect that |
| 469 | dnl and define the HAVE_BROKEN_SS_FAMILY when we are on one of these platforms. |
| 470 | dnl ******************************************************************** |
| 471 | AC_MSG_CHECKING([broken struct sockaddr::ss_family]) |
| 472 | AC_TRY_COMPILE([ |
| 473 | #include <sys/socket.h> |
| 474 | #include <sys/types.h>], [ |
| 475 | struct sockaddr_storage ss ; |
| 476 | ss.__ss_family = 0 ; |
| 477 | ], |
| 478 | have_broken_ss_family=yes, |
| 479 | have_broken_ss_family=no |
| 480 | ) |
| 481 | AC_MSG_RESULT($have_broken_ss_family) |
| 482 | if test x$have_broken_ss_family = xyes ; then |
| 483 | AC_DEFINE(HAVE_BROKEN_SS_FAMILY, [], [Whether struct sockaddr::__ss_family exists]) |
| 484 | AC_DEFINE(ss_family, __ss_family, [ss_family is not defined here, use __ss_family instead]) |
| 485 | fi |
Daniel Veillard | de2a67b | 2003-06-21 14:20:04 +0000 | [diff] [blame] | 486 | |
| 487 | have_getaddrinfo=no |
| 488 | AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes) |
| 489 | if test $have_getaddrinfo != yes; then |
| 490 | for lib in bsd socket inet; do |
| 491 | AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break]) |
| 492 | done |
| 493 | fi |
| 494 | |
William M. Brack | 476cd96 | 2003-08-13 11:09:42 +0000 | [diff] [blame] | 495 | if test $have_getaddrinfo = yes; then |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 496 | AC_DEFINE([HAVE_GETADDRINFO], [], [Define if getaddrinfo is there]) |
Daniel Veillard | de2a67b | 2003-06-21 14:20:04 +0000 | [diff] [blame] | 497 | fi |
| 498 | fi |
| 499 | fi |
| 500 | |
| 501 | dnl ******************************End IPv6 checks****************************** |
| 502 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 503 | dnl Checks for isnan in libm if not in libc |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 504 | AC_CHECK_FUNC(isnan, AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there]) , AC_CHECK_LIB(m, isnan, |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 505 | [AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there])])) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 506 | |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 507 | AC_CHECK_FUNC(isinf, AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there]) , AC_CHECK_LIB(m, isinf, |
| 508 | [AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there])])) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 509 | |
| 510 | XML_LIBDIR='-L${libdir}' |
Daniel Veillard | e7dd2b8 | 2002-03-15 18:44:02 +0000 | [diff] [blame] | 511 | XML_INCLUDEDIR='-I${includedir}/libxml2' |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 512 | |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 513 | dnl |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 514 | dnl Extra flags |
| 515 | dnl |
| 516 | XML_CFLAGS="" |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 517 | RDL_LIBS="" |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 518 | |
| 519 | dnl |
Daniel Veillard | b45c43b | 2001-04-28 17:02:11 +0000 | [diff] [blame] | 520 | dnl Workaround for native compilers |
| 521 | dnl HP : http://bugs.gnome.org/db/31/3163.html |
| 522 | dnl DEC : Enable NaN/Inf |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 523 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 524 | if test "${GCC}" != "yes" ; then |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 525 | case "${host}" in |
| 526 | *-*-hpux* ) |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 527 | CFLAGS="${CFLAGS} -Wp,-H30000" |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 528 | ;; |
Daniel Veillard | b45c43b | 2001-04-28 17:02:11 +0000 | [diff] [blame] | 529 | *-dec-osf* ) |
| 530 | CFLAGS="${CFLAGS} -ieee" |
| 531 | ;; |
William M. Brack | 476cd96 | 2003-08-13 11:09:42 +0000 | [diff] [blame] | 532 | alpha*-*-linux* ) |
| 533 | CFLAGS="${CFLAGS} -ieee" |
| 534 | ;; |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 535 | esac |
Daniel Veillard | d574f78 | 2001-03-14 19:40:17 +0000 | [diff] [blame] | 536 | else |
Daniel Veillard | d94849b | 2003-07-28 13:02:24 +0000 | [diff] [blame] | 537 | if test "$with_fexceptions" = "yes" |
| 538 | then |
| 539 | # |
| 540 | # Not activated by default because this inflates the code size |
| 541 | # Used to allow propagation of C++ exceptions through the library |
| 542 | # |
| 543 | CFLAGS="${CFLAGS} -fexceptions" |
| 544 | fi |
| 545 | |
Daniel Veillard | 05f9735 | 2004-10-31 15:35:32 +0000 | [diff] [blame] | 546 | 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" |
Daniel Veillard | 14839d5 | 2001-06-06 16:11:56 +0000 | [diff] [blame] | 547 | case "${host}" in |
| 548 | alpha*-*-linux* ) |
| 549 | CFLAGS="${CFLAGS} -mieee" |
| 550 | ;; |
Daniel Veillard | cb5b4d6 | 2002-04-11 08:24:26 +0000 | [diff] [blame] | 551 | alpha*-*-osf* ) |
| 552 | CFLAGS="${CFLAGS} -mieee" |
| 553 | ;; |
Daniel Veillard | 14839d5 | 2001-06-06 16:11:56 +0000 | [diff] [blame] | 554 | esac |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 555 | fi |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 556 | case ${host} in |
| 557 | *-*-solaris*) |
Daniel Veillard | d2ade93 | 2000-09-30 14:39:55 +0000 | [diff] [blame] | 558 | XML_LIBDIR="${XML_LIBDIR} -R${libdir}" |
| 559 | ;; |
Daniel Veillard | d30be4a | 2002-03-28 18:25:31 +0000 | [diff] [blame] | 560 | hppa*-hp-mpeix) |
| 561 | NEED_TRIO=1 |
| 562 | ;; |
Daniel Veillard | d2ade93 | 2000-09-30 14:39:55 +0000 | [diff] [blame] | 563 | esac |
| 564 | |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 565 | |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 566 | dnl |
| 567 | dnl check for python |
| 568 | dnl |
| 569 | |
| 570 | PYTHON= |
| 571 | PYTHON_VERSION= |
| 572 | PYTHON_INCLUDES= |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 573 | PYTHON_SITE_PACKAGES= |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 574 | PYTHON_TESTS= |
Daniel Veillard | 38b80a8 | 2003-05-14 18:59:00 +0000 | [diff] [blame] | 575 | pythondir= |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 576 | if test "$with_python" != "no" ; then |
| 577 | if test -x "$with_python/bin/python" |
| 578 | then |
| 579 | echo Found python in $with_python/bin/python |
| 580 | PYTHON="$with_python/bin/python" |
Daniel Veillard | 9b731d7 | 2002-04-14 12:56:08 +0000 | [diff] [blame] | 581 | else |
Daniel Veillard | a8a89fe | 2002-04-12 21:03:34 +0000 | [diff] [blame] | 582 | if test -x "$with_python" |
| 583 | then |
Daniel Veillard | 4efd3be | 2002-11-18 09:11:13 +0000 | [diff] [blame] | 584 | echo Found python in $with_python |
| 585 | PYTHON="$with_python" |
Daniel Veillard | a8a89fe | 2002-04-12 21:03:34 +0000 | [diff] [blame] | 586 | else |
William M. Brack | a73f45b | 2005-01-11 02:21:33 +0000 | [diff] [blame] | 587 | AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) |
Daniel Veillard | a8a89fe | 2002-04-12 21:03:34 +0000 | [diff] [blame] | 588 | fi |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 589 | fi |
| 590 | if test "$PYTHON" != "" |
| 591 | then |
| 592 | PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` |
| 593 | echo Found Python version $PYTHON_VERSION |
| 594 | fi |
| 595 | if test "$PYTHON_VERSION" != "" |
| 596 | then |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 597 | if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ |
| 598 | -d $with_python/lib/python$PYTHON_VERSION/site-packages |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 599 | then |
| 600 | PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 601 | PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 602 | else |
| 603 | if test -r $prefix/include/python$PYTHON_VERSION/Python.h |
| 604 | then |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 605 | PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)' |
Daniel Veillard | e3b7d9a | 2002-08-14 14:11:30 +0000 | [diff] [blame] | 606 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 607 | else |
| 608 | if test -r /usr/include/python$PYTHON_VERSION/Python.h |
| 609 | then |
| 610 | PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION |
Daniel Veillard | e3b7d9a | 2002-08-14 14:11:30 +0000 | [diff] [blame] | 611 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 612 | else |
| 613 | echo could not find python$PYTHON_VERSION/Python.h |
| 614 | fi |
| 615 | fi |
William M. Brack | 5d4cba4 | 2004-01-06 15:19:12 +0000 | [diff] [blame] | 616 | if test ! -d "$PYTHON_SITE_PACKAGES" |
Daniel Veillard | b6984ef | 2002-08-14 16:55:31 +0000 | [diff] [blame] | 617 | then |
| 618 | PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` |
| 619 | fi |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 620 | fi |
| 621 | fi |
Daniel Veillard | 38b80a8 | 2003-05-14 18:59:00 +0000 | [diff] [blame] | 622 | if test "$with_python" != "" |
| 623 | then |
| 624 | pythondir='$(PYTHON_SITE_PACKAGES)' |
| 625 | else |
| 626 | pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages' |
| 627 | fi |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 628 | fi |
| 629 | AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "") |
Daniel Veillard | 40b1134 | 2002-09-20 12:01:39 +0000 | [diff] [blame] | 630 | if test "$PYTHON_INCLUDES" != "" |
| 631 | then |
| 632 | PYTHON_SUBDIR=python |
| 633 | else |
| 634 | PYTHON_SUBDIR= |
| 635 | fi |
Daniel Veillard | 38b80a8 | 2003-05-14 18:59:00 +0000 | [diff] [blame] | 636 | AC_SUBST(pythondir) |
Daniel Veillard | 40b1134 | 2002-09-20 12:01:39 +0000 | [diff] [blame] | 637 | AC_SUBST(PYTHON_SUBDIR) |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 638 | |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 639 | dnl check for dso support |
| 640 | WITH_MODULES=0 |
| 641 | MODULE_EXTENSION=".so" |
| 642 | TEST_MODULES= |
| 643 | |
Daniel Veillard | f6b71bd | 2005-01-04 17:50:14 +0000 | [diff] [blame] | 644 | if test "$with_modules" != "no" ; then |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 645 | AC_CHECK_LIB(dld, shl_load, [ |
| 646 | WITH_MODULES=1 |
| 647 | MODULE_PLATFORM_LIBS="-ldld" |
| 648 | AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso]) |
| 649 | ]) |
| 650 | |
| 651 | AC_CHECK_LIB(dl, dlopen, [ |
| 652 | WITH_MODULES=1 |
| 653 | MODULE_PLATFORM_LIBS="-ldl" |
| 654 | AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso]) |
| 655 | ]) |
Daniel Veillard | f6b71bd | 2005-01-04 17:50:14 +0000 | [diff] [blame] | 656 | fi |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 657 | |
| 658 | if test "${WITH_MODULES}" = "1"; then |
| 659 | TEST_MODULES="ModuleTests" |
| 660 | fi |
| 661 | |
| 662 | AC_SUBST(WITH_MODULES) |
| 663 | AC_SUBST(MODULE_PLATFORM_LIBS) |
| 664 | AC_SUBST(MODULE_EXTENSION) |
| 665 | AC_SUBST(TEST_MODULES) |
| 666 | |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 667 | dnl |
| 668 | dnl Tester makes use of readline if present |
| 669 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 670 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 671 | dnl |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 672 | dnl specific tests to setup DV and Bill's devel environments with debug etc ... |
Daniel Veillard | 81418e3 | 2001-05-22 15:08:55 +0000 | [diff] [blame] | 673 | dnl (-Wunreachable-code) |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 674 | dnl |
William M. Brack | 871611b | 2003-10-18 04:53:14 +0000 | [diff] [blame] | 675 | if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \ |
Daniel Veillard | b7c6ac4 | 2004-06-29 22:01:27 +0000 | [diff] [blame] | 676 | [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ]] || \ |
William M. Brack | a2e844a | 2004-01-06 11:52:13 +0000 | [diff] [blame] | 677 | [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmltest" ]] || \ |
William M. Brack | 4119d1c | 2004-06-24 02:24:44 +0000 | [diff] [blame] | 678 | [[ "${LOGNAME}" = "wbrack" -a "`pwd`" = "/Users/wbrack/gnomecvs/xmltest" ]] |
William M. Brack | 871611b | 2003-10-18 04:53:14 +0000 | [diff] [blame] | 679 | then |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 680 | if test "$with_minimum" != "yes" |
| 681 | then |
| 682 | if test "${with_mem_debug}" = "" ; then |
| 683 | with_mem_debug="yes" |
Daniel Veillard | 22cdb84 | 2004-10-04 14:09:17 +0000 | [diff] [blame] | 684 | with_run_debug="yes" |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 685 | fi |
| 686 | if test "${with_docbook}" = "" ; then |
| 687 | with_docbook="yes" |
| 688 | fi |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 689 | fi |
Daniel Veillard | eff45a9 | 2004-10-29 12:10:55 +0000 | [diff] [blame] | 690 | if test "${CC}" = "gcc" ; then |
Daniel Veillard | 05f9735 | 2004-10-31 15:35:32 +0000 | [diff] [blame] | 691 | 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 Veillard | eff45a9 | 2004-10-29 12:10:55 +0000 | [diff] [blame] | 692 | fi |
Daniel Veillard | 2e9b165 | 2003-02-19 13:29:45 +0000 | [diff] [blame] | 693 | STATIC_BINARIES="-static" |
Daniel Veillard | c86a4fa | 2001-03-26 16:28:29 +0000 | [diff] [blame] | 694 | dnl -Wcast-qual -ansi |
Daniel Veillard | 2e9b165 | 2003-02-19 13:29:45 +0000 | [diff] [blame] | 695 | else |
| 696 | STATIC_BINARIES= |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 697 | fi |
Daniel Veillard | 2e9b165 | 2003-02-19 13:29:45 +0000 | [diff] [blame] | 698 | AC_SUBST(STATIC_BINARIES) |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 699 | |
| 700 | dnl |
| 701 | dnl Check for trio string functions |
| 702 | dnl |
| 703 | |
| 704 | if test "${NEED_TRIO}" = "1" ; then |
| 705 | echo Adding trio library for string functions |
| 706 | WITH_TRIO=1 |
| 707 | else |
| 708 | WITH_TRIO=0 |
| 709 | fi |
Daniel Veillard | 01ef738 | 2001-05-08 07:31:43 +0000 | [diff] [blame] | 710 | AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1") |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 711 | AC_SUBST(WITH_TRIO) |
| 712 | |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 713 | dnl |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 714 | dnl Allow to enable/disable various pieces |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 715 | dnl |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 716 | echo Checking configuration requirements |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 717 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 718 | dnl |
| 719 | dnl Thread-related stuff |
| 720 | dnl |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 721 | THREAD_LIBS="" |
| 722 | WITH_THREADS=0 |
| 723 | THREAD_CFLAGS="" |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 724 | TEST_THREADS="" |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 725 | THREADS_W32="" |
Daniel Veillard | 64a411c | 2001-10-15 12:32:07 +0000 | [diff] [blame] | 726 | |
Daniel Veillard | 8494271 | 2003-04-18 14:40:05 +0000 | [diff] [blame] | 727 | if test "$with_threads" = "no" ; then |
| 728 | echo Disabling multithreaded support |
| 729 | else |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 730 | echo Enabling multithreaded support |
| 731 | |
| 732 | AC_CHECK_HEADER(pthread.h, |
Daniel Veillard | cbaf399 | 2001-12-31 16:16:02 +0000 | [diff] [blame] | 733 | AC_CHECK_LIB(pthread, pthread_join,[ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 734 | THREAD_LIBS="-lpthread" |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 735 | AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) |
| 736 | AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there]) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 737 | WITH_THREADS="1"])) |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 738 | case $host_os in |
| 739 | *mingw32*) WITH_THREADS="1" |
| 740 | THREADS_W32="Win32" |
| 741 | THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" |
| 742 | ;; |
William M. Brack | a73f45b | 2005-01-11 02:21:33 +0000 | [diff] [blame] | 743 | *cygwin*) THREAD_LIBS="" |
| 744 | ;; |
Daniel Veillard | 7a3447a | 2005-01-04 14:31:14 +0000 | [diff] [blame] | 745 | *beos*) WITH_THREADS="1" |
| 746 | THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS" |
| 747 | ;; |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 748 | esac |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 749 | if test "$WITH_THREADS" = "1" ; then |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 750 | THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" |
| 751 | TEST_THREADS="Threadtests" |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 752 | fi |
| 753 | fi |
William M. Brack | 306e33c | 2004-06-12 01:01:22 +0000 | [diff] [blame] | 754 | if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 755 | THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" |
Daniel Veillard | 64a411c | 2001-10-15 12:32:07 +0000 | [diff] [blame] | 756 | fi |
| 757 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 758 | AC_SUBST(THREAD_LIBS) |
| 759 | AC_SUBST(WITH_THREADS) |
| 760 | AC_SUBST(THREAD_CFLAGS) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 761 | AC_SUBST(TEST_THREADS) |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 762 | AC_SUBST(THREADS_W32) |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 763 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 764 | dnl |
| 765 | dnl xmllint shell history |
| 766 | dnl |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 767 | if test "$with_history" = "yes" ; then |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 768 | echo Enabling xmllint shell history |
| 769 | dnl check for terminal library. this is a very cool solution |
| 770 | dnl from octave's configure.in |
| 771 | unset tcap |
| 772 | for termlib in ncurses curses termcap terminfo termlib; do |
| 773 | AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"]) |
| 774 | test -n "$tcap" && break |
| 775 | done |
| 776 | |
| 777 | AC_CHECK_HEADER(readline/history.h, |
| 778 | AC_CHECK_LIB(history, append_history,[ |
| 779 | RDL_LIBS="-lhistory" |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 780 | AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])])) |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 781 | AC_CHECK_HEADER(readline/readline.h, |
| 782 | AC_CHECK_LIB(readline, readline,[ |
| 783 | RDL_LIBS="-lreadline $RDL_LIBS $tcap" |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 784 | AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap)) |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 785 | if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then |
| 786 | CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include" |
| 787 | RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS" |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 788 | fi |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 789 | fi |
| 790 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 791 | dnl |
| 792 | dnl Tree functions |
| 793 | dnl |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 794 | if test "$with_tree" = "no" ; then |
| 795 | echo Disabling DOM like tree manipulation APIs |
| 796 | WITH_TREE=0 |
| 797 | else |
| 798 | WITH_TREE=1 |
| 799 | fi |
| 800 | AC_SUBST(WITH_TREE) |
| 801 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 802 | if test "$with_ftp" = "no" ; then |
| 803 | echo Disabling FTP support |
| 804 | WITH_FTP=0 |
| 805 | FTP_OBJ= |
| 806 | else |
| 807 | WITH_FTP=1 |
| 808 | FTP_OBJ=nanoftp.o |
| 809 | fi |
| 810 | AC_SUBST(WITH_FTP) |
| 811 | AC_SUBST(FTP_OBJ) |
| 812 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 813 | if test "$with_http" = "no" ; then |
| 814 | echo Disabling HTTP support |
| 815 | WITH_HTTP=0 |
| 816 | HTTP_OBJ= |
| 817 | else |
| 818 | WITH_HTTP=1 |
| 819 | HTTP_OBJ=nanohttp.o |
| 820 | fi |
| 821 | AC_SUBST(WITH_HTTP) |
| 822 | AC_SUBST(HTTP_OBJ) |
| 823 | |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 824 | if test "$with_legacy" = "no" ; then |
| 825 | echo Disabling deprecated APIs |
| 826 | WITH_LEGACY=0 |
| 827 | else |
| 828 | WITH_LEGACY=1 |
| 829 | fi |
| 830 | AC_SUBST(WITH_LEGACY) |
| 831 | |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 832 | if test "$with_reader" = "no" ; then |
| 833 | echo Disabling the xmlReader parsing interface |
| 834 | WITH_READER=0 |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 835 | READER_TEST= |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 836 | else |
| 837 | WITH_READER=1 |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 838 | READER_TEST=Readertests |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 839 | if test "$with_push" = "no" ; then |
| 840 | echo xmlReader requires Push interface - enabling it |
| 841 | with_push=yes |
| 842 | fi |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 843 | fi |
| 844 | AC_SUBST(WITH_READER) |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 845 | AC_SUBST(READER_TEST) |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 846 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 847 | if test "$with_writer" = "no" ; then |
| 848 | echo Disabling the xmlWriter saving interface |
| 849 | WITH_WRITER=0 |
| 850 | # WRITER_TEST= |
| 851 | else |
| 852 | WITH_WRITER=1 |
| 853 | # WRITER_TEST=Writertests |
| 854 | if test "$with_push" = "no" ; then |
| 855 | echo xmlWriter requires Push interface - enabling it |
| 856 | with_push=yes |
| 857 | fi |
| 858 | if test "$with_output" = "no" ; then |
| 859 | echo xmlWriter requires Output interface - enabling it |
| 860 | with_output=yes |
| 861 | fi |
Daniel Veillard | b3de70c | 2003-12-02 22:32:15 +0000 | [diff] [blame] | 862 | fi |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 863 | AC_SUBST(WITH_WRITER) |
| 864 | #AC_SUBST(WRITER_TEST) |
| 865 | |
Daniel Veillard | b3de70c | 2003-12-02 22:32:15 +0000 | [diff] [blame] | 866 | if test "$with_pattern" = "no" ; then |
| 867 | echo Disabling the xmlPattern parsing interface |
| 868 | WITH_PATTERN=0 |
| 869 | PATTERN_TEST= |
| 870 | else |
| 871 | WITH_PATTERN=1 |
| 872 | PATTERN_TEST=Patterntests |
| 873 | fi |
| 874 | AC_SUBST(WITH_PATTERN) |
| 875 | AC_SUBST(PATTERN_TEST) |
| 876 | |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 877 | if test "$with_sax1" = "no" ; then |
| 878 | echo Disabling the older SAX1 interface |
| 879 | WITH_SAX1=0 |
| 880 | TEST_SAX= |
| 881 | else |
| 882 | WITH_SAX1=1 |
| 883 | TEST_SAX=SAXtests |
| 884 | fi |
| 885 | AC_SUBST(WITH_SAX1) |
| 886 | AC_SUBST(TEST_SAX) |
| 887 | |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 888 | if test "$with_push" = "no" ; then |
| 889 | echo Disabling the PUSH parser interfaces |
| 890 | WITH_PUSH=0 |
| 891 | TEST_PUSH= |
| 892 | else |
| 893 | WITH_PUSH=1 |
| 894 | TEST_PUSH="XMLPushtests" |
| 895 | fi |
| 896 | AC_SUBST(WITH_PUSH) |
| 897 | AC_SUBST(TEST_PUSH) |
| 898 | |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 899 | if test "$with_html" = "no" ; then |
| 900 | echo Disabling HTML support |
| 901 | WITH_HTML=0 |
| 902 | HTML_OBJ= |
| 903 | TEST_HTML= |
| 904 | else |
| 905 | WITH_HTML=1 |
| 906 | HTML_OBJ="HTMLparser.o HTMLtree.o" |
| 907 | TEST_HTML=HTMLtests |
William M. Brack | 871611b | 2003-10-18 04:53:14 +0000 | [diff] [blame] | 908 | if test "$with_push" != "no" ; then |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 909 | TEST_PHTML=HTMLPushtests |
| 910 | else |
| 911 | TEST_PHTML= |
| 912 | fi |
| 913 | fi |
| 914 | AC_SUBST(WITH_HTML) |
| 915 | AC_SUBST(HTML_OBJ) |
| 916 | AC_SUBST(TEST_HTML) |
| 917 | AC_SUBST(TEST_PHTML) |
| 918 | |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 919 | if test "$with_valid" = "no" ; then |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 920 | echo Disabling DTD validation support |
| 921 | WITH_VALID=0 |
| 922 | TEST_VALID= |
| 923 | TEST_VTIME= |
| 924 | else |
| 925 | WITH_VALID=1 |
| 926 | TEST_VALID=Validtests |
| 927 | TEST_VTIME=VTimingtests |
| 928 | fi |
| 929 | AC_SUBST(WITH_VALID) |
| 930 | AC_SUBST(TEST_VALID) |
| 931 | AC_SUBST(TEST_VTIME) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 932 | |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 933 | if test "$with_catalog" = "no" ; then |
| 934 | echo Disabling Catalog support |
| 935 | WITH_CATALOG=0 |
| 936 | CATALOG_OBJ= |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 937 | TEST_CATALOG= |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 938 | else |
| 939 | WITH_CATALOG=1 |
| 940 | CATALOG_OBJ="catalog.o" |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 941 | TEST_CATALOG=Catatests |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 942 | fi |
| 943 | AC_SUBST(WITH_CATALOG) |
| 944 | AC_SUBST(CATALOG_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 945 | AC_SUBST(TEST_CATALOG) |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 946 | |
Daniel Veillard | b59076b | 2001-04-29 17:04:07 +0000 | [diff] [blame] | 947 | if test "$with_docbook" = "no" ; then |
| 948 | echo Disabling Docbook support |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 949 | WITH_DOCB=0 |
| 950 | DOCB_OBJ= |
Daniel Veillard | b59076b | 2001-04-29 17:04:07 +0000 | [diff] [blame] | 951 | else |
| 952 | WITH_DOCB=1 |
| 953 | DOCB_OBJ="DOCBparser.o" |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 954 | fi |
| 955 | AC_SUBST(WITH_DOCB) |
| 956 | AC_SUBST(DOCB_OBJ) |
| 957 | |
| 958 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 959 | if test "$with_xptr" = "no" ; then |
| 960 | echo Disabling XPointer support |
| 961 | WITH_XPTR=0 |
| 962 | XPTR_OBJ= |
| 963 | TEST_XPTR= |
| 964 | else |
| 965 | WITH_XPTR=1 |
| 966 | XPTR_OBJ=xpointer.o |
| 967 | TEST_XPTR=XPtrtests |
| 968 | if test "$with_xpath" = "no" ; then |
| 969 | echo XPointer requires XPath support - enabling it |
| 970 | with_xpath=yes |
| 971 | fi |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 972 | fi |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 973 | AC_SUBST(WITH_XPTR) |
| 974 | AC_SUBST(XPTR_OBJ) |
| 975 | AC_SUBST(TEST_XPTR) |
| 976 | |
| 977 | if test "$with_c14n" = "no" ; then |
| 978 | echo Disabling C14N support |
| 979 | WITH_C14N=0 |
| 980 | C14N_OBJ= |
| 981 | TEST_C14N= |
| 982 | else |
| 983 | WITH_C14N=1 |
| 984 | C14N_OBJ="c14n.c" |
| 985 | TEST_C14N=C14Ntests |
| 986 | if test "$with_xpath" = "no" ; then |
| 987 | echo C14N requires XPath support - enabling it |
| 988 | with_xpath=yes |
| 989 | fi |
| 990 | fi |
| 991 | AC_SUBST(WITH_C14N) |
| 992 | AC_SUBST(C14N_OBJ) |
| 993 | AC_SUBST(TEST_C14N) |
| 994 | |
| 995 | if test "$with_xinclude" = "no" ; then |
| 996 | echo Disabling XInclude support |
| 997 | WITH_XINCLUDE=0 |
| 998 | XINCLUDE_OBJ= |
| 999 | with_xinclude="no" |
| 1000 | TEST_XINCLUDE= |
| 1001 | else |
| 1002 | WITH_XINCLUDE=1 |
| 1003 | XINCLUDE_OBJ=xinclude.o |
| 1004 | TEST_XINCLUDE=XIncludetests |
| 1005 | if test "$with_xpath" = "no" ; then |
| 1006 | echo XInclude requires XPath support - enabling it |
| 1007 | with_xpath=yes |
| 1008 | fi |
| 1009 | fi |
| 1010 | AC_SUBST(WITH_XINCLUDE) |
| 1011 | AC_SUBST(XINCLUDE_OBJ) |
| 1012 | AC_SUBST(TEST_XINCLUDE) |
| 1013 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1014 | if test "$with_xpath" = "no" ; then |
| 1015 | echo Disabling XPATH support |
| 1016 | WITH_XPATH=0 |
| 1017 | XPATH_OBJ= |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 1018 | TEST_XPATH= |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1019 | else |
| 1020 | WITH_XPATH=1 |
| 1021 | XPATH_OBJ=xpath.o |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 1022 | TEST_XPATH=XPathtests |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1023 | fi |
| 1024 | AC_SUBST(WITH_XPATH) |
| 1025 | AC_SUBST(XPATH_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 1026 | AC_SUBST(TEST_XPATH) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1027 | |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 1028 | dnl |
| 1029 | dnl output functions |
| 1030 | dnl |
| 1031 | if test "$with_output" = "no" ; then |
| 1032 | echo Disabling serialization/saving support |
| 1033 | WITH_OUTPUT=0 |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 1034 | else |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 1035 | WITH_OUTPUT=1 |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 1036 | fi |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 1037 | AC_SUBST(WITH_OUTPUT) |
Daniel Veillard | 9e8bfae | 2000-11-06 16:43:11 +0000 | [diff] [blame] | 1038 | |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 1039 | WITH_ICONV=0 |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 1040 | if test "$with_iconv" = "no" ; then |
| 1041 | echo Disabling ICONV support |
Daniel Veillard | d574f78 | 2001-03-14 19:40:17 +0000 | [diff] [blame] | 1042 | else |
Daniel Veillard | 220346d | 2001-12-07 11:33:54 +0000 | [diff] [blame] | 1043 | if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 1044 | CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" |
Daniel Veillard | f5b44e4 | 2001-09-17 17:19:54 +0000 | [diff] [blame] | 1045 | # Export this since our headers include iconv.h |
| 1046 | XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include" |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 1047 | ICONV_LIBS="-L$with_iconv/lib" |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 1048 | fi |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 1049 | |
| 1050 | AC_CHECK_HEADER(iconv.h, |
| 1051 | AC_MSG_CHECKING(for iconv) |
| 1052 | AC_TRY_LINK([#include <stdlib.h> |
| 1053 | #include <iconv.h>],[ |
| 1054 | iconv_t cd = iconv_open ("",""); |
| 1055 | iconv (cd, NULL, NULL, NULL, NULL);],[ |
| 1056 | AC_MSG_RESULT(yes) |
| 1057 | WITH_ICONV=1],[ |
| 1058 | AC_MSG_RESULT(no) |
| 1059 | AC_MSG_CHECKING(for iconv in -liconv) |
| 1060 | |
| 1061 | _ldflags="${LDFLAGS}" |
| 1062 | _libs="${LIBS}" |
| 1063 | LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" |
| 1064 | LIBS="${LIBS} -liconv" |
| 1065 | |
| 1066 | AC_TRY_LINK([#include <stdlib.h> |
| 1067 | #include <iconv.h>],[ |
| 1068 | iconv_t cd = iconv_open ("",""); |
| 1069 | iconv (cd, NULL, NULL, NULL, NULL);],[ |
| 1070 | AC_MSG_RESULT(yes) |
| 1071 | WITH_ICONV=1 |
| 1072 | ICONV_LIBS="${ICONV_LIBS} -liconv" |
| 1073 | LIBS="${_libs}" |
| 1074 | LDFLAGS="${_ldflags}"],[ |
| 1075 | AC_MSG_RESULT(no) |
| 1076 | LIBS="${_libs}" |
| 1077 | LDFLAGS="${_ldflags}"])])) |
| 1078 | fi |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 1079 | case "$host" in |
| 1080 | *mingw*) M_LIBS="" |
| 1081 | ;; |
Daniel Veillard | 7a3447a | 2005-01-04 14:31:14 +0000 | [diff] [blame] | 1082 | *beos*) M_LIBS="" |
| 1083 | ;; |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 1084 | *) M_LIBS="-lm" |
| 1085 | ;; |
| 1086 | esac |
Daniel Veillard | b82c166 | 2001-12-09 14:00:54 +0000 | [diff] [blame] | 1087 | XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS" |
Daniel Veillard | 90d165b | 2003-09-01 20:33:13 +0000 | [diff] [blame] | 1088 | XML_LIBTOOLLIBS="libxml2.la" |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 1089 | AC_SUBST(WITH_ICONV) |
| 1090 | |
Daniel Veillard | 01fc1a9 | 2003-07-30 15:12:01 +0000 | [diff] [blame] | 1091 | WITH_ISO8859X=1 |
Daniel Veillard | 01fc1a9 | 2003-07-30 15:12:01 +0000 | [diff] [blame] | 1092 | if test "$WITH_ICONV" != "1" ; then |
| 1093 | if test "$with_iso8859x" = "no" ; then |
| 1094 | echo Disabling ISO8859X support |
| 1095 | WITH_ISO8859X=0 |
| 1096 | fi |
| 1097 | fi |
| 1098 | AC_SUBST(WITH_ISO8859X) |
| 1099 | |
Daniel Veillard | ef4d3bc | 2003-02-07 12:38:22 +0000 | [diff] [blame] | 1100 | if test "$with_schemas" = "no" ; then |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 1101 | echo "Disabling Schemas/Relax-NG support" |
Daniel Veillard | ef4d3bc | 2003-02-07 12:38:22 +0000 | [diff] [blame] | 1102 | WITH_SCHEMAS=0 |
| 1103 | TEST_SCHEMAS= |
| 1104 | else |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 1105 | echo "Enabled Schemas/Relax-NG support" |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 1106 | WITH_SCHEMAS=1 |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 1107 | TEST_SCHEMAS="Schemastests Relaxtests" |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1108 | if test "$PYTHON_INCLUDES" != "" ; then |
| 1109 | PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests" |
| 1110 | fi |
Daniel Veillard | 23e7357 | 2002-09-19 19:56:43 +0000 | [diff] [blame] | 1111 | with_regexps=yes |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 1112 | fi |
| 1113 | AC_SUBST(WITH_SCHEMAS) |
| 1114 | AC_SUBST(TEST_SCHEMAS) |
| 1115 | |
Daniel Veillard | 23e7357 | 2002-09-19 19:56:43 +0000 | [diff] [blame] | 1116 | if test "$with_regexps" = "no" ; then |
| 1117 | echo Disabling Regexps support |
| 1118 | WITH_REGEXPS=0 |
| 1119 | TEST_REGEXPS= |
| 1120 | else |
| 1121 | WITH_REGEXPS=1 |
| 1122 | TEST_REGEXPS="Regexptests Automatatests" |
| 1123 | fi |
| 1124 | AC_SUBST(WITH_REGEXPS) |
| 1125 | AC_SUBST(TEST_REGEXPS) |
| 1126 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1127 | if test "$with_debug" = "no" ; then |
| 1128 | echo Disabling DEBUG support |
| 1129 | WITH_DEBUG=0 |
| 1130 | DEBUG_OBJ= |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 1131 | TEST_DEBUG= |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1132 | else |
| 1133 | WITH_DEBUG=1 |
| 1134 | DEBUG_OBJ=debugXML.o |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 1135 | TEST_DEBUG=Scripttests |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1136 | fi |
| 1137 | AC_SUBST(WITH_DEBUG) |
| 1138 | AC_SUBST(DEBUG_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 1139 | AC_SUBST(TEST_DEBUG) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1140 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1141 | if test "$with_mem_debug" = "yes" ; then |
William M. Brack | 306e33c | 2004-06-12 01:01:22 +0000 | [diff] [blame] | 1142 | if test "$with_thread_alloc" = "yes" ; then |
| 1143 | echo Disabling memory debug - cannot use mem-debug with thread-alloc! |
| 1144 | WITH_MEM_DEBUG=0 |
| 1145 | else |
| 1146 | echo Enabling memory debug support |
| 1147 | WITH_MEM_DEBUG=1 |
| 1148 | fi |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1149 | else |
| 1150 | WITH_MEM_DEBUG=0 |
| 1151 | fi |
| 1152 | AC_SUBST(WITH_MEM_DEBUG) |
| 1153 | |
Daniel Veillard | 22cdb84 | 2004-10-04 14:09:17 +0000 | [diff] [blame] | 1154 | if test "$with_run_debug" = "yes" ; then |
| 1155 | echo Enabling runtime debug support |
| 1156 | WITH_RUN_DEBUG=1 |
| 1157 | else |
| 1158 | WITH_RUN_DEBUG=0 |
| 1159 | fi |
| 1160 | AC_SUBST(WITH_RUN_DEBUG) |
Daniel Veillard | 1638a47 | 2003-08-14 01:23:25 +0000 | [diff] [blame] | 1161 | |
| 1162 | WIN32_EXTRA_LIBADD= |
| 1163 | WIN32_EXTRA_LDFLAGS= |
William M. Brack | a73f45b | 2005-01-11 02:21:33 +0000 | [diff] [blame] | 1164 | CYGWIN_EXTRA_LDFLAGS= |
| 1165 | CYGWIN_EXTRA_PYTHON_LIBADD= |
Daniel Veillard | 1638a47 | 2003-08-14 01:23:25 +0000 | [diff] [blame] | 1166 | case "$host" in |
| 1167 | *-*-mingw*) |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 1168 | CPPFLAGS="$CPPFLAGS -DWIN32" |
| 1169 | WIN32_EXTRA_LIBADD="-lws2_32" |
Daniel Veillard | 1638a47 | 2003-08-14 01:23:25 +0000 | [diff] [blame] | 1170 | WIN32_EXTRA_LDFLAGS="-no-undefined" |
| 1171 | AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation]) |
| 1172 | AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around]) |
| 1173 | AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around]) |
| 1174 | ;; |
Daniel Veillard | d392ba7 | 2004-08-04 14:56:45 +0000 | [diff] [blame] | 1175 | *-*-cygwin*) |
| 1176 | CYGWIN_EXTRA_LDFLAGS="-no-undefined" |
William M. Brack | a73f45b | 2005-01-11 02:21:33 +0000 | [diff] [blame] | 1177 | if test "${PYTHON}" != "" |
| 1178 | then |
| 1179 | CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" |
| 1180 | fi |
Daniel Veillard | d392ba7 | 2004-08-04 14:56:45 +0000 | [diff] [blame] | 1181 | ;; |
Daniel Veillard | 1638a47 | 2003-08-14 01:23:25 +0000 | [diff] [blame] | 1182 | esac |
| 1183 | AC_SUBST(WIN32_EXTRA_LIBADD) |
| 1184 | AC_SUBST(WIN32_EXTRA_LDFLAGS) |
Daniel Veillard | d392ba7 | 2004-08-04 14:56:45 +0000 | [diff] [blame] | 1185 | AC_SUBST(CYGWIN_EXTRA_LDFLAGS) |
| 1186 | AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD) |
Daniel Veillard | 1638a47 | 2003-08-14 01:23:25 +0000 | [diff] [blame] | 1187 | |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 1188 | AC_SUBST(CPPFLAGS) |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 1189 | AC_SUBST(CFLAGS) |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 1190 | AC_SUBST(XML_CFLAGS) |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 1191 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 1192 | AC_SUBST(XML_LIBDIR) |
| 1193 | AC_SUBST(XML_LIBS) |
Daniel Veillard | 90d165b | 2003-09-01 20:33:13 +0000 | [diff] [blame] | 1194 | AC_SUBST(XML_LIBTOOLLIBS) |
Daniel Veillard | 81418e3 | 2001-05-22 15:08:55 +0000 | [diff] [blame] | 1195 | AC_SUBST(ICONV_LIBS) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 1196 | AC_SUBST(XML_INCLUDEDIR) |
| 1197 | AC_SUBST(HTML_DIR) |
| 1198 | AC_SUBST(HAVE_ISNAN) |
| 1199 | AC_SUBST(HAVE_ISINF) |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 1200 | AC_SUBST(PYTHON) |
| 1201 | AC_SUBST(PYTHON_VERSION) |
| 1202 | AC_SUBST(PYTHON_INCLUDES) |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 1203 | AC_SUBST(PYTHON_SITE_PACKAGES) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 1204 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 1205 | AC_SUBST(M_LIBS) |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 1206 | AC_SUBST(RDL_LIBS) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1207 | |
Daniel Veillard | 9715c17 | 2002-11-25 16:33:40 +0000 | [diff] [blame] | 1208 | dnl for the spec file |
| 1209 | RELDATE=`date +'%a %b %e %Y'` |
| 1210 | AC_SUBST(RELDATE) |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1211 | AC_SUBST(PYTHON_TESTS) |
Daniel Veillard | 9715c17 | 2002-11-25 16:33:40 +0000 | [diff] [blame] | 1212 | |
Daniel Veillard | c6e997c | 2003-01-27 12:35:42 +0000 | [diff] [blame] | 1213 | rm -f COPYING.LIB COPYING |
Daniel Veillard | c575b99 | 2002-02-08 13:28:40 +0000 | [diff] [blame] | 1214 | ln -s Copyright COPYING |
| 1215 | |
Daniel Veillard | e4177a5 | 2004-01-08 16:43:57 +0000 | [diff] [blame] | 1216 | # keep on one line for cygwin c.f. #130896 |
Daniel Veillard | b1da40c | 2004-09-06 11:57:44 +0000 | [diff] [blame] | 1217 | AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/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) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 1218 | |
Daniel Veillard | 06d2524 | 2004-02-25 13:01:42 +0000 | [diff] [blame] | 1219 | chmod +x xml2-config python/setup.py |