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