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