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