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