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 | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 9 | LIBXML_MICRO_VERSION=8 |
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) |
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" ]] || \ |
William M. Brack | a2e844a | 2004-01-06 11:52:13 +0000 | [diff] [blame] | 424 | [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmltest" ]] || \ |
| 425 | [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmlnew" ]] |
William M. Brack | 871611b | 2003-10-18 04:53:14 +0000 | [diff] [blame] | 426 | then |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 427 | if test "$with_minimum" != "yes" |
| 428 | then |
| 429 | if test "${with_mem_debug}" = "" ; then |
| 430 | with_mem_debug="yes" |
| 431 | fi |
| 432 | if test "${with_docbook}" = "" ; then |
| 433 | with_docbook="yes" |
| 434 | fi |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 435 | fi |
Daniel Veillard | 0ba5923 | 2002-02-10 13:20:39 +0000 | [diff] [blame] | 436 | 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] | 437 | STATIC_BINARIES="-static" |
Daniel Veillard | c86a4fa | 2001-03-26 16:28:29 +0000 | [diff] [blame] | 438 | dnl -Wcast-qual -ansi |
Daniel Veillard | 2e9b165 | 2003-02-19 13:29:45 +0000 | [diff] [blame] | 439 | else |
| 440 | STATIC_BINARIES= |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 441 | fi |
Daniel Veillard | 2e9b165 | 2003-02-19 13:29:45 +0000 | [diff] [blame] | 442 | AC_SUBST(STATIC_BINARIES) |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 443 | |
| 444 | dnl |
| 445 | dnl Check for trio string functions |
| 446 | dnl |
| 447 | |
| 448 | if test "${NEED_TRIO}" = "1" ; then |
| 449 | echo Adding trio library for string functions |
| 450 | WITH_TRIO=1 |
| 451 | else |
| 452 | WITH_TRIO=0 |
| 453 | fi |
Daniel Veillard | 01ef738 | 2001-05-08 07:31:43 +0000 | [diff] [blame] | 454 | AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1") |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 455 | AC_SUBST(WITH_TRIO) |
| 456 | |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 457 | dnl |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 458 | dnl Allow to enable/disable various pieces |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 459 | dnl |
| 460 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 461 | THREAD_LIBS="" |
| 462 | WITH_THREADS=0 |
| 463 | THREAD_CFLAGS="" |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 464 | TEST_THREADS="" |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 465 | THREADS_W32="" |
Daniel Veillard | 64a411c | 2001-10-15 12:32:07 +0000 | [diff] [blame] | 466 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 467 | AC_ARG_WITH(threads, |
| 468 | [ --with-threads add multithread support(on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 469 | if test "$with_minimum" = "yes" -a "$with_threads" = "" |
| 470 | then |
| 471 | with_threads=no |
| 472 | fi |
Daniel Veillard | 8494271 | 2003-04-18 14:40:05 +0000 | [diff] [blame] | 473 | if test "$with_threads" = "no" ; then |
| 474 | echo Disabling multithreaded support |
| 475 | else |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 476 | echo Enabling multithreaded support |
| 477 | |
| 478 | AC_CHECK_HEADER(pthread.h, |
Daniel Veillard | cbaf399 | 2001-12-31 16:16:02 +0000 | [diff] [blame] | 479 | AC_CHECK_LIB(pthread, pthread_join,[ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 480 | THREAD_LIBS="-lpthread" |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 481 | AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) |
| 482 | AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there]) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 483 | WITH_THREADS="1"])) |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 484 | case $host_os in |
| 485 | *mingw32*) WITH_THREADS="1" |
| 486 | THREADS_W32="Win32" |
| 487 | THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" |
| 488 | ;; |
| 489 | esac |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 490 | if test "$WITH_THREADS" = "1" ; then |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 491 | THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" |
| 492 | TEST_THREADS="Threadtests" |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 493 | fi |
| 494 | fi |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 495 | AC_ARG_WITH(thread-alloc, |
| 496 | [ --with-thread-alloc add per-thread memory(off)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 497 | if test "$with_minimum" = "yes" -a "$with_thread_alloc" = "" |
| 498 | then |
| 499 | with_thread_alloc=no |
| 500 | fi |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 501 | if test "$with_threads_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then |
| 502 | THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" |
Daniel Veillard | 64a411c | 2001-10-15 12:32:07 +0000 | [diff] [blame] | 503 | fi |
| 504 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 505 | AC_SUBST(THREAD_LIBS) |
| 506 | AC_SUBST(WITH_THREADS) |
| 507 | AC_SUBST(THREAD_CFLAGS) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 508 | AC_SUBST(TEST_THREADS) |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 509 | AC_SUBST(THREADS_W32) |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 510 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 511 | AC_ARG_WITH(history, |
| 512 | [ --with-history add history support to xmllint shell(off)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 513 | if test "$with_minimum" = "yes" -a "$with_history" = "" |
| 514 | then |
| 515 | with_history=no |
| 516 | fi |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 517 | if test "$with_history" = "yes" ; then |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 518 | echo Enabling xmllint shell history |
| 519 | dnl check for terminal library. this is a very cool solution |
| 520 | dnl from octave's configure.in |
| 521 | unset tcap |
| 522 | for termlib in ncurses curses termcap terminfo termlib; do |
| 523 | AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"]) |
| 524 | test -n "$tcap" && break |
| 525 | done |
| 526 | |
| 527 | AC_CHECK_HEADER(readline/history.h, |
| 528 | AC_CHECK_LIB(history, append_history,[ |
| 529 | RDL_LIBS="-lhistory" |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 530 | AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])])) |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 531 | AC_CHECK_HEADER(readline/readline.h, |
| 532 | AC_CHECK_LIB(readline, readline,[ |
| 533 | RDL_LIBS="-lreadline $RDL_LIBS $tcap" |
Daniel Veillard | c790bf4 | 2003-10-11 10:50:10 +0000 | [diff] [blame] | 534 | AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap)) |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 535 | if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then |
| 536 | CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include" |
| 537 | RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS" |
| 538 | else |
| 539 | CPPFLAGS=${_cppflags} |
| 540 | fi |
| 541 | LDFLAGS=${_ldflags} |
| 542 | fi |
| 543 | |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 544 | AC_ARG_WITH(output, |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 545 | [ --with-output add the serialization support (on)]) |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 546 | if test "$with_minimum" = "yes" -a "$with_output" = "" |
| 547 | then |
| 548 | with_output=no |
| 549 | fi |
| 550 | if test "$with_output" = "no" ; then |
| 551 | echo Disabling serialization/saving support |
| 552 | WITH_OUTPUT=0 |
| 553 | else |
| 554 | WITH_OUTPUT=1 |
| 555 | fi |
| 556 | AC_SUBST(WITH_OUTPUT) |
| 557 | |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 558 | AC_ARG_WITH(tree, |
| 559 | [ --with-tree add the DOM like tree manipulation APIs (on)]) |
| 560 | if test "$with_minimum" = "yes" -a "$with_tree" = "" |
| 561 | then |
| 562 | with_tree=no |
| 563 | fi |
| 564 | if test "$with_tree" = "no" ; then |
| 565 | echo Disabling DOM like tree manipulation APIs |
| 566 | WITH_TREE=0 |
| 567 | else |
| 568 | WITH_TREE=1 |
| 569 | fi |
| 570 | AC_SUBST(WITH_TREE) |
| 571 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 572 | AC_ARG_WITH(ftp, |
| 573 | [ --with-ftp add the FTP support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 574 | if test "$with_minimum" = "yes" -a "$with_ftp" = "" |
| 575 | then |
| 576 | with_ftp=no |
| 577 | fi |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 578 | if test "$with_ftp" = "no" ; then |
| 579 | echo Disabling FTP support |
| 580 | WITH_FTP=0 |
| 581 | FTP_OBJ= |
| 582 | else |
| 583 | WITH_FTP=1 |
| 584 | FTP_OBJ=nanoftp.o |
| 585 | fi |
| 586 | AC_SUBST(WITH_FTP) |
| 587 | AC_SUBST(FTP_OBJ) |
| 588 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 589 | AC_ARG_WITH(http, |
| 590 | [ --with-http add the HTTP support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 591 | if test "$with_minimum" = "yes" -a "$with_http" = "" |
| 592 | then |
| 593 | with_http=no |
| 594 | fi |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 595 | if test "$with_http" = "no" ; then |
| 596 | echo Disabling HTTP support |
| 597 | WITH_HTTP=0 |
| 598 | HTTP_OBJ= |
| 599 | else |
| 600 | WITH_HTTP=1 |
| 601 | HTTP_OBJ=nanohttp.o |
| 602 | fi |
| 603 | AC_SUBST(WITH_HTTP) |
| 604 | AC_SUBST(HTTP_OBJ) |
| 605 | |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 606 | AC_ARG_WITH(legacy, |
Daniel Veillard | 652327a | 2003-09-29 18:02:38 +0000 | [diff] [blame] | 607 | [ --with-legacy add deprecated APIs for compatibility (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 608 | if test "$with_minimum" = "yes" -a "$with_legacy" = "" |
| 609 | then |
| 610 | with_legacy=no |
| 611 | fi |
| 612 | if test "$with_legacy" = "no" ; then |
| 613 | echo Disabling deprecated APIs |
| 614 | WITH_LEGACY=0 |
| 615 | else |
| 616 | WITH_LEGACY=1 |
| 617 | fi |
| 618 | AC_SUBST(WITH_LEGACY) |
| 619 | |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 620 | AC_ARG_WITH(reader, |
| 621 | [ --with-reader add the xmlReader parsing interface (on)]) |
| 622 | if test "$with_minimum" = "yes" -a "$with_reader" = "" |
| 623 | then |
| 624 | with_reader=no |
| 625 | fi |
| 626 | if test "$with_reader" = "no" ; then |
| 627 | echo Disabling the xmlReader parsing interface |
| 628 | WITH_READER=0 |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 629 | READER_TEST= |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 630 | else |
| 631 | WITH_READER=1 |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 632 | READER_TEST=Readertests |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 633 | fi |
| 634 | AC_SUBST(WITH_READER) |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 635 | AC_SUBST(READER_TEST) |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 636 | |
Daniel Veillard | b3de70c | 2003-12-02 22:32:15 +0000 | [diff] [blame] | 637 | AC_ARG_WITH(pattern, |
| 638 | [ --with-pattern add the xmlPattern selection interface (on)]) |
| 639 | if test "$with_minimum" = "yes" -a "$with_pattern" = "" |
| 640 | then |
| 641 | with_pattern=no |
| 642 | fi |
| 643 | if test "$with_pattern" = "no" ; then |
| 644 | echo Disabling the xmlPattern parsing interface |
| 645 | WITH_PATTERN=0 |
| 646 | PATTERN_TEST= |
| 647 | else |
| 648 | WITH_PATTERN=1 |
| 649 | PATTERN_TEST=Patterntests |
| 650 | fi |
| 651 | AC_SUBST(WITH_PATTERN) |
| 652 | AC_SUBST(PATTERN_TEST) |
| 653 | |
Daniel Veillard | 1d211e2 | 2003-10-20 22:32:39 +0000 | [diff] [blame] | 654 | AC_ARG_WITH(writer, |
| 655 | [ --with-writer add the xmlWriter saving interface (on)]) |
| 656 | if test "$with_minimum" = "yes" -a "$with_writer" = "" |
| 657 | then |
| 658 | with_writer=no |
| 659 | fi |
| 660 | if test "$with_writer" = "no" ; then |
| 661 | echo Disabling the xmlWriter saving interface |
| 662 | WITH_WRITER=0 |
| 663 | # WRITER_TEST= |
| 664 | else |
| 665 | WITH_WRITER=1 |
| 666 | # WRITER_TEST=Writertests |
| 667 | fi |
| 668 | AC_SUBST(WITH_WRITER) |
| 669 | #AC_SUBST(WRITER_TEST) |
| 670 | |
Daniel Veillard | 8127390 | 2003-09-30 00:43:48 +0000 | [diff] [blame] | 671 | AC_ARG_WITH(sax1, |
| 672 | [ --with-sax1 add the older SAX1 interface (on)]) |
| 673 | if test "$with_minimum" = "yes" -a "$with_sax1" = "" |
| 674 | then |
| 675 | with_sax1=no |
| 676 | fi |
| 677 | if test "$with_sax1" = "no" ; then |
| 678 | echo Disabling the older SAX1 interface |
| 679 | WITH_SAX1=0 |
| 680 | TEST_SAX= |
| 681 | else |
| 682 | WITH_SAX1=1 |
| 683 | TEST_SAX=SAXtests |
| 684 | fi |
| 685 | AC_SUBST(WITH_SAX1) |
| 686 | AC_SUBST(TEST_SAX) |
| 687 | |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 688 | AC_ARG_WITH(push, |
| 689 | [ --with-push add the PUSH parser interfaces (on)]) |
| 690 | if test "$with_minimum" = "yes" -a "$with_push" = "" |
| 691 | then |
| 692 | with_push=no |
| 693 | fi |
| 694 | if test "$with_push" = "no" ; then |
| 695 | echo Disabling the PUSH parser interfaces |
| 696 | WITH_PUSH=0 |
| 697 | TEST_PUSH= |
| 698 | else |
| 699 | WITH_PUSH=1 |
| 700 | TEST_PUSH="XMLPushtests" |
| 701 | fi |
| 702 | AC_SUBST(WITH_PUSH) |
| 703 | AC_SUBST(TEST_PUSH) |
| 704 | |
| 705 | AC_ARG_WITH(html, |
| 706 | [ --with-html add the HTML support (on)]) |
| 707 | if test "$with_minimum" = "yes" -a "$with_html" = "" |
| 708 | then |
| 709 | with_html=no |
| 710 | fi |
| 711 | if test "$with_html" = "no" ; then |
| 712 | echo Disabling HTML support |
| 713 | WITH_HTML=0 |
| 714 | HTML_OBJ= |
| 715 | TEST_HTML= |
| 716 | else |
| 717 | WITH_HTML=1 |
| 718 | HTML_OBJ="HTMLparser.o HTMLtree.o" |
| 719 | TEST_HTML=HTMLtests |
William M. Brack | 871611b | 2003-10-18 04:53:14 +0000 | [diff] [blame] | 720 | if test "$with_push" != "no" ; then |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 721 | TEST_PHTML=HTMLPushtests |
| 722 | else |
| 723 | TEST_PHTML= |
| 724 | fi |
| 725 | fi |
| 726 | AC_SUBST(WITH_HTML) |
| 727 | AC_SUBST(HTML_OBJ) |
| 728 | AC_SUBST(TEST_HTML) |
| 729 | AC_SUBST(TEST_PHTML) |
| 730 | |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 731 | AC_ARG_WITH(valid, |
| 732 | [ --with-valid add the DTD validation support (on)]) |
| 733 | if test "$with_minimum" = "yes" -a "$with_valid" = "" |
| 734 | then |
| 735 | with_valid=no |
| 736 | fi |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 737 | if test "$with_valid" = "no" ; then |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 738 | echo Disabling DTD validation support |
| 739 | WITH_VALID=0 |
| 740 | TEST_VALID= |
| 741 | TEST_VTIME= |
| 742 | else |
| 743 | WITH_VALID=1 |
| 744 | TEST_VALID=Validtests |
| 745 | TEST_VTIME=VTimingtests |
| 746 | fi |
| 747 | AC_SUBST(WITH_VALID) |
| 748 | AC_SUBST(TEST_VALID) |
| 749 | AC_SUBST(TEST_VTIME) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 750 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 751 | AC_ARG_WITH(catalog, |
| 752 | [ --with-catalog add the Catalog support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 753 | if test "$with_minimum" = "yes" -a "$with_catalog" = "" |
| 754 | then |
| 755 | with_catalog=no |
| 756 | fi |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 757 | if test "$with_catalog" = "no" ; then |
| 758 | echo Disabling Catalog support |
| 759 | WITH_CATALOG=0 |
| 760 | CATALOG_OBJ= |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 761 | TEST_CATALOG= |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 762 | else |
| 763 | WITH_CATALOG=1 |
| 764 | CATALOG_OBJ="catalog.o" |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 765 | TEST_CATALOG=Catatests |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 766 | fi |
| 767 | AC_SUBST(WITH_CATALOG) |
| 768 | AC_SUBST(CATALOG_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 769 | AC_SUBST(TEST_CATALOG) |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 770 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 771 | AC_ARG_WITH(docbook, |
| 772 | [ --with-docbook add Docbook SGML support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 773 | if test "$with_minimum" = "yes" -a "$with_docbook" = "" |
| 774 | then |
| 775 | with_docbook=no |
| 776 | fi |
Daniel Veillard | b59076b | 2001-04-29 17:04:07 +0000 | [diff] [blame] | 777 | if test "$with_docbook" = "no" ; then |
| 778 | echo Disabling Docbook support |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 779 | WITH_DOCB=0 |
| 780 | DOCB_OBJ= |
Daniel Veillard | b59076b | 2001-04-29 17:04:07 +0000 | [diff] [blame] | 781 | else |
| 782 | WITH_DOCB=1 |
| 783 | DOCB_OBJ="DOCBparser.o" |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 784 | fi |
| 785 | AC_SUBST(WITH_DOCB) |
| 786 | AC_SUBST(DOCB_OBJ) |
| 787 | |
| 788 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 789 | AC_ARG_WITH(xpath, |
| 790 | [ --with-xpath add the XPATH support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 791 | if test "$with_minimum" = "yes" -a "$with_xpath" = "" |
| 792 | then |
| 793 | with_xpath=no |
| 794 | fi |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 795 | if test "$with_xpath" = "no" ; then |
| 796 | echo Disabling XPATH support |
Daniel Veillard | 52afe80 | 2000-10-22 16:56:02 +0000 | [diff] [blame] | 797 | with_xptr="no" |
Daniel Veillard | 34de97f | 2002-04-30 14:29:22 +0000 | [diff] [blame] | 798 | with_c14n="no" |
Daniel Veillard | 070803b | 2002-05-03 07:29:38 +0000 | [diff] [blame] | 799 | with_xinclude="no" |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 800 | WITH_XPATH=0 |
| 801 | XPATH_OBJ= |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 802 | TEST_XPATH= |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 803 | else |
| 804 | WITH_XPATH=1 |
| 805 | XPATH_OBJ=xpath.o |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 806 | TEST_XPATH=XPathtests |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 807 | fi |
| 808 | AC_SUBST(WITH_XPATH) |
| 809 | AC_SUBST(XPATH_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 810 | AC_SUBST(TEST_XPATH) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 811 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 812 | AC_ARG_WITH(xptr, |
| 813 | [ --with-xptr add the XPointer support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 814 | if test "$with_minimum" = "yes" -a "$with_xptr" = "" |
| 815 | then |
| 816 | with_xptr=no |
| 817 | fi |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 818 | if test "$with_xptr" = "no" ; then |
| 819 | echo Disabling XPointer support |
| 820 | WITH_XPTR=0 |
| 821 | XPTR_OBJ= |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 822 | TEST_XPTR= |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 823 | else |
| 824 | WITH_XPTR=1 |
| 825 | XPTR_OBJ=xpointer.o |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 826 | TEST_XPTR=XPtrtests |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 827 | fi |
| 828 | AC_SUBST(WITH_XPTR) |
| 829 | AC_SUBST(XPTR_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 830 | AC_SUBST(TEST_XPTR) |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 831 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 832 | AC_ARG_WITH(c14n, |
| 833 | [ --with-c14n add the Canonicalization support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 834 | if test "$with_minimum" = "yes" -a "$with_c14n" = "" |
| 835 | then |
| 836 | with_c14n=no |
| 837 | fi |
Daniel Veillard | 044fc6b | 2002-03-04 17:09:44 +0000 | [diff] [blame] | 838 | if test "$with_c14n" = "no" ; then |
| 839 | echo Disabling C14N support |
| 840 | WITH_C14N=0 |
| 841 | C14N_OBJ= |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 842 | TEST_C14N= |
Daniel Veillard | 044fc6b | 2002-03-04 17:09:44 +0000 | [diff] [blame] | 843 | else |
| 844 | WITH_C14N=1 |
| 845 | C14N_OBJ="c14n.c" |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 846 | TEST_C14N=C14Ntests |
Daniel Veillard | 044fc6b | 2002-03-04 17:09:44 +0000 | [diff] [blame] | 847 | fi |
| 848 | AC_SUBST(WITH_C14N) |
| 849 | AC_SUBST(C14N_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 850 | AC_SUBST(TEST_C14N) |
Daniel Veillard | 044fc6b | 2002-03-04 17:09:44 +0000 | [diff] [blame] | 851 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 852 | AC_ARG_WITH(xinclude, |
| 853 | [ --with-xinclude add the XInclude support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 854 | if test "$with_minimum" = "yes" -a "$with_xinclude" = "" |
| 855 | then |
| 856 | with_xinclude=no |
| 857 | fi |
Daniel Veillard | 9e8bfae | 2000-11-06 16:43:11 +0000 | [diff] [blame] | 858 | if test "$with_xinclude" = "no" ; then |
| 859 | echo Disabling XInclude support |
| 860 | WITH_XINCLUDE=0 |
| 861 | XINCLUDE_OBJ= |
| 862 | with_xinclude="no" |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 863 | TEST_XINCLUDE= |
Daniel Veillard | 9e8bfae | 2000-11-06 16:43:11 +0000 | [diff] [blame] | 864 | else |
| 865 | WITH_XINCLUDE=1 |
| 866 | XINCLUDE_OBJ=xinclude.o |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 867 | TEST_XINCLUDE=XIncludetests |
Daniel Veillard | 9e8bfae | 2000-11-06 16:43:11 +0000 | [diff] [blame] | 868 | fi |
| 869 | AC_SUBST(WITH_XINCLUDE) |
| 870 | AC_SUBST(XINCLUDE_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 871 | AC_SUBST(TEST_XINCLUDE) |
Daniel Veillard | 9e8bfae | 2000-11-06 16:43:11 +0000 | [diff] [blame] | 872 | |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 873 | WITH_ICONV=0 |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 874 | AC_ARG_WITH(iconv, |
| 875 | [ --with-iconv[[=DIR]] add ICONV support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 876 | if test "$with_minimum" = "yes" -a "$with_iconv" = "" |
| 877 | then |
| 878 | with_iconv=no |
| 879 | fi |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 880 | if test "$with_iconv" = "no" ; then |
| 881 | echo Disabling ICONV support |
Daniel Veillard | d574f78 | 2001-03-14 19:40:17 +0000 | [diff] [blame] | 882 | else |
Daniel Veillard | 220346d | 2001-12-07 11:33:54 +0000 | [diff] [blame] | 883 | if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 884 | CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" |
Daniel Veillard | f5b44e4 | 2001-09-17 17:19:54 +0000 | [diff] [blame] | 885 | # Export this since our headers include iconv.h |
| 886 | XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include" |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 887 | ICONV_LIBS="-L$with_iconv/lib" |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 888 | fi |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 889 | |
| 890 | AC_CHECK_HEADER(iconv.h, |
| 891 | AC_MSG_CHECKING(for iconv) |
| 892 | AC_TRY_LINK([#include <stdlib.h> |
| 893 | #include <iconv.h>],[ |
| 894 | iconv_t cd = iconv_open ("",""); |
| 895 | iconv (cd, NULL, NULL, NULL, NULL);],[ |
| 896 | AC_MSG_RESULT(yes) |
| 897 | WITH_ICONV=1],[ |
| 898 | AC_MSG_RESULT(no) |
| 899 | AC_MSG_CHECKING(for iconv in -liconv) |
| 900 | |
| 901 | _ldflags="${LDFLAGS}" |
| 902 | _libs="${LIBS}" |
| 903 | LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" |
| 904 | LIBS="${LIBS} -liconv" |
| 905 | |
| 906 | AC_TRY_LINK([#include <stdlib.h> |
| 907 | #include <iconv.h>],[ |
| 908 | iconv_t cd = iconv_open ("",""); |
| 909 | iconv (cd, NULL, NULL, NULL, NULL);],[ |
| 910 | AC_MSG_RESULT(yes) |
| 911 | WITH_ICONV=1 |
| 912 | ICONV_LIBS="${ICONV_LIBS} -liconv" |
| 913 | LIBS="${_libs}" |
| 914 | LDFLAGS="${_ldflags}"],[ |
| 915 | AC_MSG_RESULT(no) |
| 916 | LIBS="${_libs}" |
| 917 | LDFLAGS="${_ldflags}"])])) |
| 918 | fi |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 919 | case "$host" in |
| 920 | *mingw*) M_LIBS="" |
| 921 | ;; |
| 922 | *) M_LIBS="-lm" |
| 923 | ;; |
| 924 | esac |
Daniel Veillard | b82c166 | 2001-12-09 14:00:54 +0000 | [diff] [blame] | 925 | XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS" |
Daniel Veillard | 90d165b | 2003-09-01 20:33:13 +0000 | [diff] [blame] | 926 | XML_LIBTOOLLIBS="libxml2.la" |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 927 | AC_SUBST(WITH_ICONV) |
| 928 | |
Daniel Veillard | 01fc1a9 | 2003-07-30 15:12:01 +0000 | [diff] [blame] | 929 | WITH_ISO8859X=1 |
| 930 | AC_ARG_WITH(iso8859x, |
| 931 | [ --with-iso8859x add ISO8859X support if no iconv (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 932 | if test "$with_minimum" = "yes" -a "$with_iso8859x" = "" |
| 933 | then |
| 934 | with_iso8859x=no |
| 935 | fi |
Daniel Veillard | 01fc1a9 | 2003-07-30 15:12:01 +0000 | [diff] [blame] | 936 | if test "$WITH_ICONV" != "1" ; then |
| 937 | if test "$with_iso8859x" = "no" ; then |
| 938 | echo Disabling ISO8859X support |
| 939 | WITH_ISO8859X=0 |
| 940 | fi |
| 941 | fi |
| 942 | AC_SUBST(WITH_ISO8859X) |
| 943 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 944 | AC_ARG_WITH(schemas, |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 945 | [ --with-schemas add Relax-NG and experimental Schemas support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 946 | if test "$with_minimum" = "yes" -a "$with_schemas" = "" |
| 947 | then |
| 948 | with_schemas=no |
| 949 | fi |
Daniel Veillard | ef4d3bc | 2003-02-07 12:38:22 +0000 | [diff] [blame] | 950 | if test "$with_schemas" = "no" ; then |
| 951 | echo "Disabled Schemas/Relax-NG support" |
| 952 | WITH_SCHEMAS=0 |
| 953 | TEST_SCHEMAS= |
| 954 | else |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 955 | echo "Enabled Schemas/Relax-NG support" |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 956 | WITH_SCHEMAS=1 |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 957 | TEST_SCHEMAS="Schemastests Relaxtests" |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 958 | if test "$PYTHON_INCLUDES" != "" ; then |
| 959 | PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests" |
| 960 | fi |
Daniel Veillard | 23e7357 | 2002-09-19 19:56:43 +0000 | [diff] [blame] | 961 | with_regexps=yes |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 962 | fi |
| 963 | AC_SUBST(WITH_SCHEMAS) |
| 964 | AC_SUBST(TEST_SCHEMAS) |
| 965 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 966 | AC_ARG_WITH(regexps, |
| 967 | [ --with-regexps add Regular Expressions support (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 968 | if test "$with_minimum" = "yes" -a "$with_regexps" = "" |
| 969 | then |
| 970 | with_regexps=no |
| 971 | fi |
Daniel Veillard | 23e7357 | 2002-09-19 19:56:43 +0000 | [diff] [blame] | 972 | if test "$with_regexps" = "no" ; then |
| 973 | echo Disabling Regexps support |
| 974 | WITH_REGEXPS=0 |
| 975 | TEST_REGEXPS= |
| 976 | else |
| 977 | WITH_REGEXPS=1 |
| 978 | TEST_REGEXPS="Regexptests Automatatests" |
| 979 | fi |
| 980 | AC_SUBST(WITH_REGEXPS) |
| 981 | AC_SUBST(TEST_REGEXPS) |
| 982 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 983 | AC_ARG_WITH(debug, |
| 984 | [ --with-debug add the debugging module (on)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 985 | if test "$with_minimum" = "yes" -a "$with_debug" = "" |
| 986 | then |
| 987 | with_debug=no |
| 988 | fi |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 989 | if test "$with_debug" = "no" ; then |
| 990 | echo Disabling DEBUG support |
| 991 | WITH_DEBUG=0 |
| 992 | DEBUG_OBJ= |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 993 | TEST_DEBUG= |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 994 | else |
| 995 | WITH_DEBUG=1 |
| 996 | DEBUG_OBJ=debugXML.o |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 997 | TEST_DEBUG=Scripttests |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 998 | fi |
| 999 | AC_SUBST(WITH_DEBUG) |
| 1000 | AC_SUBST(DEBUG_OBJ) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 1001 | AC_SUBST(TEST_DEBUG) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1002 | |
William M. Brack | 97ad4c7 | 2003-05-13 08:08:36 +0000 | [diff] [blame] | 1003 | AC_ARG_WITH(mem_debug, |
| 1004 | [ --with-mem-debug add the memory debugging module (off)]) |
Daniel Veillard | 4432df2 | 2003-09-28 18:58:27 +0000 | [diff] [blame] | 1005 | if test "$with_minimum" = "yes" -a "$with_mem_debug" = "" |
| 1006 | then |
| 1007 | with_mem_debug=no |
| 1008 | fi |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1009 | if test "$with_mem_debug" = "yes" ; then |
| 1010 | echo Enabling memory debug support |
| 1011 | WITH_MEM_DEBUG=1 |
| 1012 | else |
| 1013 | WITH_MEM_DEBUG=0 |
| 1014 | fi |
| 1015 | AC_SUBST(WITH_MEM_DEBUG) |
| 1016 | |
Daniel Veillard | 1638a47 | 2003-08-14 01:23:25 +0000 | [diff] [blame] | 1017 | |
| 1018 | WIN32_EXTRA_LIBADD= |
| 1019 | WIN32_EXTRA_LDFLAGS= |
| 1020 | case "$host" in |
| 1021 | *-*-mingw*) |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 1022 | CPPFLAGS="$CPPFLAGS -DWIN32" |
| 1023 | WIN32_EXTRA_LIBADD="-lws2_32" |
Daniel Veillard | 1638a47 | 2003-08-14 01:23:25 +0000 | [diff] [blame] | 1024 | WIN32_EXTRA_LDFLAGS="-no-undefined" |
| 1025 | AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation]) |
| 1026 | AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around]) |
| 1027 | AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around]) |
| 1028 | ;; |
| 1029 | esac |
| 1030 | AC_SUBST(WIN32_EXTRA_LIBADD) |
| 1031 | AC_SUBST(WIN32_EXTRA_LDFLAGS) |
| 1032 | |
Daniel Veillard | 6984e6d | 2003-12-09 14:20:17 +0000 | [diff] [blame] | 1033 | AC_SUBST(CPPFLAGS) |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 1034 | AC_SUBST(CFLAGS) |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 1035 | AC_SUBST(XML_CFLAGS) |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 1036 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 1037 | AC_SUBST(XML_LIBDIR) |
| 1038 | AC_SUBST(XML_LIBS) |
Daniel Veillard | 90d165b | 2003-09-01 20:33:13 +0000 | [diff] [blame] | 1039 | AC_SUBST(XML_LIBTOOLLIBS) |
Daniel Veillard | 81418e3 | 2001-05-22 15:08:55 +0000 | [diff] [blame] | 1040 | AC_SUBST(ICONV_LIBS) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 1041 | AC_SUBST(XML_INCLUDEDIR) |
| 1042 | AC_SUBST(HTML_DIR) |
| 1043 | AC_SUBST(HAVE_ISNAN) |
| 1044 | AC_SUBST(HAVE_ISINF) |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 1045 | AC_SUBST(PYTHON) |
| 1046 | AC_SUBST(PYTHON_VERSION) |
| 1047 | AC_SUBST(PYTHON_INCLUDES) |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 1048 | AC_SUBST(PYTHON_SITE_PACKAGES) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 1049 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 1050 | AC_SUBST(M_LIBS) |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 1051 | AC_SUBST(RDL_LIBS) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 1052 | |
Daniel Veillard | 9715c17 | 2002-11-25 16:33:40 +0000 | [diff] [blame] | 1053 | dnl for the spec file |
| 1054 | RELDATE=`date +'%a %b %e %Y'` |
| 1055 | AC_SUBST(RELDATE) |
Daniel Veillard | 6dc9196 | 2004-03-22 19:10:02 +0000 | [diff] [blame] | 1056 | AC_SUBST(PYTHON_TESTS) |
Daniel Veillard | 9715c17 | 2002-11-25 16:33:40 +0000 | [diff] [blame] | 1057 | |
Daniel Veillard | c6e997c | 2003-01-27 12:35:42 +0000 | [diff] [blame] | 1058 | rm -f COPYING.LIB COPYING |
Daniel Veillard | c575b99 | 2002-02-08 13:28:40 +0000 | [diff] [blame] | 1059 | ln -s Copyright COPYING |
| 1060 | |
Daniel Veillard | e4177a5 | 2004-01-08 16:43:57 +0000 | [diff] [blame] | 1061 | # keep on one line for cygwin c.f. #130896 |
Daniel Veillard | 06d2524 | 2004-02-25 13:01:42 +0000 | [diff] [blame] | 1062 | 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] | 1063 | |
Daniel Veillard | 06d2524 | 2004-02-25 13:01:42 +0000 | [diff] [blame] | 1064 | chmod +x xml2-config python/setup.py |