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