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