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