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