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