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 | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 8 | LIBXML_MINOR_VERSION=5 |
Daniel Veillard | d8da01c | 2003-03-24 15:58:23 +0000 | [diff] [blame^] | 9 | LIBXML_MICRO_VERSION=5 |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 10 | LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION |
| 11 | LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION |
| 12 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 13 | LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION` |
| 14 | |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 15 | AC_SUBST(LIBXML_MAJOR_VERSION) |
| 16 | AC_SUBST(LIBXML_MINOR_VERSION) |
| 17 | AC_SUBST(LIBXML_MICRO_VERSION) |
| 18 | AC_SUBST(LIBXML_VERSION) |
| 19 | AC_SUBST(LIBXML_VERSION_INFO) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 20 | AC_SUBST(LIBXML_VERSION_NUMBER) |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 21 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 22 | VERSION=${LIBXML_VERSION} |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 23 | |
Daniel Veillard | edfb29b | 2000-03-14 19:59:05 +0000 | [diff] [blame] | 24 | AM_INIT_AUTOMAKE(libxml2, $VERSION) |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 25 | |
| 26 | AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 27 | |
| 28 | dnl Checks for programs. |
| 29 | AC_PROG_CC |
| 30 | AC_PROG_INSTALL |
Sebastian Wilhelmi | a44c8a4 | 1998-08-07 08:38:58 +0000 | [diff] [blame] | 31 | AC_PROG_CPP |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 32 | AC_PATH_PROG(RM, rm, /bin/rm) |
| 33 | AC_PATH_PROG(MV, mv, /bin/mv) |
| 34 | AC_PATH_PROG(TAR, tar, /bin/tar) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 35 | |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 36 | dnl Make sure we have an ANSI compiler |
| 37 | AM_C_PROTOTYPES |
| 38 | test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant) |
| 39 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 40 | AM_PROG_LIBTOOL |
| 41 | |
| 42 | AM_MAINTAINER_MODE |
| 43 | |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 44 | dnl Checks for zlib library. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 45 | _cppflags="${CPPFLAGS}" |
| 46 | _ldflags="${LDFLAGS}" |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 47 | |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 48 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 49 | AC_ARG_WITH(zlib, |
| 50 | [ --with-zlib[=DIR] use libz in DIR],[ |
| 51 | if test "$withval" != "no" -a "$withval" != "yes"; then |
| 52 | Z_DIR=$withval |
| 53 | CPPFLAGS="${CPPFLAGS} -I$withval/include" |
| 54 | LDFLAGS="${LDFLAGS} -L$withval/lib" |
| 55 | fi |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 56 | ]) |
| 57 | if test "$with_zlib" = "no"; then |
| 58 | echo "Disabling compression support" |
| 59 | else |
Daniel Veillard | 3fbe8e3 | 2001-10-06 13:30:33 +0000 | [diff] [blame] | 60 | AC_CHECK_HEADERS(zlib.h, |
| 61 | AC_CHECK_LIB(z, gzread,[ |
| 62 | AC_DEFINE(HAVE_LIBZ) |
| 63 | if test "x${Z_DIR}" != "x"; then |
| 64 | Z_CFLAGS="-I${Z_DIR}/include" |
| 65 | Z_LIBS="-L${Z_DIR}/lib -lz" |
| 66 | [case ${host} in |
| 67 | *-*-solaris*) |
| 68 | Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz" |
| 69 | ;; |
| 70 | esac] |
| 71 | else |
| 72 | Z_LIBS="-lz" |
| 73 | fi])) |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 74 | fi |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 75 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 76 | AC_SUBST(Z_CFLAGS) |
| 77 | AC_SUBST(Z_LIBS) |
| 78 | |
| 79 | CPPFLAGS=${_cppflags} |
| 80 | LDFLAGS=${_ldflags} |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 81 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 82 | dnl Checks for header files. |
| 83 | AC_HEADER_DIRENT |
| 84 | AC_HEADER_STDC |
Daniel Veillard | 817e70b | 2002-11-19 22:28:48 +0000 | [diff] [blame] | 85 | AC_CHECK_HEADERS([fcntl.h]) |
| 86 | AC_CHECK_HEADERS([unistd.h]) |
| 87 | AC_CHECK_HEADERS([ctype.h]) |
| 88 | AC_CHECK_HEADERS([dirent.h]) |
| 89 | AC_CHECK_HEADERS([errno.h]) |
| 90 | AC_CHECK_HEADERS([malloc.h]) |
| 91 | AC_CHECK_HEADERS([stdarg.h]) |
| 92 | AC_CHECK_HEADERS([sys/stat.h]) |
| 93 | AC_CHECK_HEADERS([sys/types.h]) |
| 94 | AC_CHECK_HEADERS([time.h]) |
| 95 | AC_CHECK_HEADERS([ansidecl.h]) |
| 96 | AC_CHECK_HEADERS([ieeefp.h]) |
| 97 | AC_CHECK_HEADERS([nan.h]) |
| 98 | AC_CHECK_HEADERS([math.h]) |
| 99 | AC_CHECK_HEADERS([fp_class.h]) |
| 100 | AC_CHECK_HEADERS([float.h]) |
| 101 | AC_CHECK_HEADERS([stdlib.h]) |
| 102 | AC_CHECK_HEADERS([sys/socket.h], [], [], |
| 103 | [#if HAVE_SYS_TYPES_H |
| 104 | # include <sys/types.h> |
| 105 | # endif |
| 106 | ]) |
| 107 | AC_CHECK_HEADERS([netinet/in.h], [], [], |
| 108 | [#if HAVE_SYS_TYPES_H |
| 109 | # include <sys/types.h> |
| 110 | # endif |
| 111 | ]) |
| 112 | AC_CHECK_HEADERS([arpa/inet.h], [], [], |
| 113 | [#if HAVE_SYS_TYPES_H |
| 114 | # include <sys/types.h> |
| 115 | # endif |
| 116 | #if HAVE_ARPA_INET_H |
| 117 | # include <arpa/inet.h> |
| 118 | # endif |
| 119 | ]) |
| 120 | AC_CHECK_HEADERS([netdb.h]) |
| 121 | AC_CHECK_HEADERS([sys/time.h]) |
| 122 | AC_CHECK_HEADERS([sys/select.h]) |
| 123 | AC_CHECK_HEADERS([sys/mman.h]) |
| 124 | AC_CHECK_HEADERS([sys/timeb.h]) |
| 125 | AC_CHECK_HEADERS([signal.h]) |
| 126 | AC_CHECK_HEADERS([arpa/nameser.h], [], [], |
| 127 | [#if HAVE_SYS_TYPES_H |
| 128 | # include <sys/types.h> |
| 129 | # endif |
| 130 | ]) |
| 131 | AC_CHECK_HEADERS([resolv.h], [], [], |
| 132 | [#if HAVE_SYS_TYPES_H |
| 133 | # include <sys/types.h> |
| 134 | # endif |
| 135 | #if HAVE_NETINET_IN_H |
| 136 | # include <netinet/in.h> |
| 137 | # endif |
| 138 | #if HAVE_ARPA_NAMESER_H |
| 139 | # include <arpa/nameser.h> |
| 140 | # endif |
| 141 | ]) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 142 | |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 143 | dnl Specific dir for HTML output ? |
| 144 | if test "x$with_html_dir" = "x" ; then |
Daniel Veillard | 0a6c358 | 2001-03-14 19:15:37 +0000 | [diff] [blame] | 145 | HTML_DIR='$(prefix)/doc' |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 146 | else |
| 147 | HTML_DIR=$with_html_dir |
| 148 | fi |
| 149 | |
| 150 | AC_SUBST(HTML_DIR) |
| 151 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 152 | dnl Checks for library functions. |
| 153 | AC_FUNC_STRFTIME |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 154 | AC_CHECK_FUNCS(strdup strndup strerror) |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 155 | AC_CHECK_FUNCS(finite isnand fp_class class fpclass) |
Daniel Veillard | 90bc371 | 2002-03-07 15:12:58 +0000 | [diff] [blame] | 156 | AC_CHECK_FUNCS(strftime localtime gettimeofday ftime) |
Daniel Veillard | 068a965 | 2001-06-07 15:30:26 +0000 | [diff] [blame] | 157 | AC_CHECK_FUNCS(stat _stat signal) |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 158 | |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 159 | dnl Checking the standard string functions availability |
| 160 | AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, |
| 161 | NEED_TRIO=1) |
| 162 | |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 163 | dnl Checks for inet libraries: |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 164 | AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) |
| 165 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
| 166 | AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect)) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 167 | |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 168 | dnl Determine what socket length (socklen_t) data type is |
| 169 | AC_MSG_CHECKING([for type of socket length (socklen_t)]) |
| 170 | AC_TRY_COMPILE2([ |
| 171 | #include <stddef.h> |
| 172 | #include <sys/types.h> |
| 173 | #include <sys/socket.h>],[ |
| 174 | (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[ |
| 175 | AC_MSG_RESULT(socklen_t *) |
| 176 | SOCKLEN_T=socklen_t],[ |
| 177 | AC_TRY_COMPILE2([ |
| 178 | #include <stddef.h> |
| 179 | #include <sys/types.h> |
| 180 | #include <sys/socket.h>],[ |
| 181 | (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[ |
| 182 | AC_MSG_RESULT(size_t *) |
| 183 | SOCKLEN_T=size_t],[ |
| 184 | AC_TRY_COMPILE2([ |
| 185 | #include <stddef.h> |
| 186 | #include <sys/types.h> |
| 187 | #include <sys/socket.h>],[ |
| 188 | (void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[ |
| 189 | AC_MSG_RESULT(int *) |
| 190 | SOCKLEN_T=int],[ |
| 191 | AC_MSG_WARN(could not determine)])])]) |
| 192 | AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T) |
| 193 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 194 | dnl Checks for isnan in libm if not in libc |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 195 | AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan, |
Bjorn Reese | e1dc011 | 2001-03-03 12:09:03 +0000 | [diff] [blame] | 196 | [AC_DEFINE(HAVE_ISNAN)])) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 197 | |
Daniel Veillard | 760f442 | 2001-02-15 14:59:48 +0000 | [diff] [blame] | 198 | AC_CHECK_FUNC(isinf, AC_DEFINE(HAVE_ISINF) , AC_CHECK_LIB(m, isinf, |
Bjorn Reese | e1dc011 | 2001-03-03 12:09:03 +0000 | [diff] [blame] | 199 | [AC_DEFINE(HAVE_ISINF)])) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 200 | |
| 201 | XML_LIBDIR='-L${libdir}' |
Daniel Veillard | e7dd2b8 | 2002-03-15 18:44:02 +0000 | [diff] [blame] | 202 | XML_INCLUDEDIR='-I${includedir}/libxml2' |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 203 | |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 204 | dnl |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 205 | dnl Extra flags |
| 206 | dnl |
| 207 | XML_CFLAGS="" |
Daniel Veillard | 357c960 | 2001-05-03 10:49:20 +0000 | [diff] [blame] | 208 | RDL_LIBS="" |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 209 | |
| 210 | dnl |
Daniel Veillard | b45c43b | 2001-04-28 17:02:11 +0000 | [diff] [blame] | 211 | dnl Workaround for native compilers |
| 212 | dnl HP : http://bugs.gnome.org/db/31/3163.html |
| 213 | dnl DEC : Enable NaN/Inf |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 214 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 215 | if test "${GCC}" != "yes" ; then |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 216 | case "${host}" in |
| 217 | *-*-hpux* ) |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 218 | CFLAGS="${CFLAGS} -Wp,-H30000" |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 219 | ;; |
Daniel Veillard | b45c43b | 2001-04-28 17:02:11 +0000 | [diff] [blame] | 220 | *-dec-osf* ) |
| 221 | CFLAGS="${CFLAGS} -ieee" |
| 222 | ;; |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 223 | esac |
Daniel Veillard | d574f78 | 2001-03-14 19:40:17 +0000 | [diff] [blame] | 224 | else |
| 225 | CFLAGS="${CFLAGS} -Wall" |
Daniel Veillard | 14839d5 | 2001-06-06 16:11:56 +0000 | [diff] [blame] | 226 | case "${host}" in |
| 227 | alpha*-*-linux* ) |
| 228 | CFLAGS="${CFLAGS} -mieee" |
| 229 | ;; |
Daniel Veillard | cb5b4d6 | 2002-04-11 08:24:26 +0000 | [diff] [blame] | 230 | alpha*-*-osf* ) |
| 231 | CFLAGS="${CFLAGS} -mieee" |
| 232 | ;; |
Daniel Veillard | 14839d5 | 2001-06-06 16:11:56 +0000 | [diff] [blame] | 233 | esac |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 234 | fi |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 235 | case ${host} in |
| 236 | *-*-solaris*) |
Daniel Veillard | d2ade93 | 2000-09-30 14:39:55 +0000 | [diff] [blame] | 237 | XML_LIBDIR="${XML_LIBDIR} -R${libdir}" |
| 238 | ;; |
Daniel Veillard | d30be4a | 2002-03-28 18:25:31 +0000 | [diff] [blame] | 239 | hppa*-hp-mpeix) |
| 240 | NEED_TRIO=1 |
| 241 | ;; |
Daniel Veillard | d2ade93 | 2000-09-30 14:39:55 +0000 | [diff] [blame] | 242 | esac |
| 243 | |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 244 | |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 245 | dnl |
| 246 | dnl check for python |
| 247 | dnl |
| 248 | |
| 249 | PYTHON= |
| 250 | PYTHON_VERSION= |
| 251 | PYTHON_INCLUDES= |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 252 | PYTHON_SITE_PACKAGES= |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 253 | AC_ARG_WITH(python, [ --with-python[=DIR] Build Python bindings if found]) |
| 254 | if test "$with_python" != "no" ; then |
| 255 | if test -x "$with_python/bin/python" |
| 256 | then |
| 257 | echo Found python in $with_python/bin/python |
| 258 | PYTHON="$with_python/bin/python" |
Daniel Veillard | 9b731d7 | 2002-04-14 12:56:08 +0000 | [diff] [blame] | 259 | else |
Daniel Veillard | a8a89fe | 2002-04-12 21:03:34 +0000 | [diff] [blame] | 260 | if test -x "$with_python" |
| 261 | then |
Daniel Veillard | 4efd3be | 2002-11-18 09:11:13 +0000 | [diff] [blame] | 262 | echo Found python in $with_python |
| 263 | PYTHON="$with_python" |
Daniel Veillard | a8a89fe | 2002-04-12 21:03:34 +0000 | [diff] [blame] | 264 | else |
Daniel Veillard | 4efd3be | 2002-11-18 09:11:13 +0000 | [diff] [blame] | 265 | 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] | 266 | fi |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 267 | fi |
| 268 | if test "$PYTHON" != "" |
| 269 | then |
| 270 | PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` |
| 271 | echo Found Python version $PYTHON_VERSION |
| 272 | fi |
| 273 | if test "$PYTHON_VERSION" != "" |
| 274 | then |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 275 | if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ |
| 276 | -d $with_python/lib/python$PYTHON_VERSION/site-packages |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 277 | then |
| 278 | PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 279 | PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 280 | else |
| 281 | if test -r $prefix/include/python$PYTHON_VERSION/Python.h |
| 282 | then |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 283 | PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)' |
Daniel Veillard | e3b7d9a | 2002-08-14 14:11:30 +0000 | [diff] [blame] | 284 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 285 | else |
| 286 | if test -r /usr/include/python$PYTHON_VERSION/Python.h |
| 287 | then |
| 288 | PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION |
Daniel Veillard | e3b7d9a | 2002-08-14 14:11:30 +0000 | [diff] [blame] | 289 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 290 | else |
| 291 | echo could not find python$PYTHON_VERSION/Python.h |
| 292 | fi |
| 293 | fi |
Daniel Veillard | b6984ef | 2002-08-14 16:55:31 +0000 | [diff] [blame] | 294 | if ! test -d "$PYTHON_SITE_PACKAGES" |
| 295 | then |
| 296 | PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` |
| 297 | fi |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 298 | fi |
| 299 | fi |
| 300 | fi |
| 301 | AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "") |
Daniel Veillard | 40b1134 | 2002-09-20 12:01:39 +0000 | [diff] [blame] | 302 | if test "$PYTHON_INCLUDES" != "" |
| 303 | then |
| 304 | PYTHON_SUBDIR=python |
| 305 | else |
| 306 | PYTHON_SUBDIR= |
| 307 | fi |
| 308 | AC_SUBST(PYTHON_SUBDIR) |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 309 | |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 310 | dnl |
| 311 | dnl Tester makes use of readline if present |
| 312 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 313 | _cppflags="${CPPFLAGS}" |
| 314 | _ldflags="${LDFLAGS}" |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 315 | |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 316 | AC_ARG_WITH(readline, |
| 317 | [ --with-readline=DIR use readline in DIR],[ |
| 318 | if test "$withval" != "no" -a "$withval" != "yes"; then |
| 319 | RDL_DIR=$withval |
| 320 | CPPFLAGS="${CPPFLAGS} -I$withval/include" |
| 321 | LDFLAGS="${LDFLAGS} -L$withval/lib" |
| 322 | fi |
| 323 | ]) |
| 324 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 325 | dnl |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 326 | dnl specific tests to setup DV's devel environment with debug etc ... |
Daniel Veillard | 81418e3 | 2001-05-22 15:08:55 +0000 | [diff] [blame] | 327 | dnl (-Wunreachable-code) |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 328 | dnl |
| 329 | if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ; then |
| 330 | if test "${with_mem_debug}" = "" ; then |
| 331 | with_mem_debug="yes" |
| 332 | fi |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 333 | if test "${with_docbook}" = "" ; then |
| 334 | with_docbook="yes" |
| 335 | fi |
Daniel Veillard | 0ba5923 | 2002-02-10 13:20:39 +0000 | [diff] [blame] | 336 | 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] | 337 | STATIC_BINARIES="-static" |
Daniel Veillard | c86a4fa | 2001-03-26 16:28:29 +0000 | [diff] [blame] | 338 | dnl -Wcast-qual -ansi |
Daniel Veillard | 2e9b165 | 2003-02-19 13:29:45 +0000 | [diff] [blame] | 339 | else |
| 340 | STATIC_BINARIES= |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 341 | fi |
Daniel Veillard | 2e9b165 | 2003-02-19 13:29:45 +0000 | [diff] [blame] | 342 | AC_SUBST(STATIC_BINARIES) |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 343 | |
| 344 | dnl |
| 345 | dnl Check for trio string functions |
| 346 | dnl |
| 347 | |
| 348 | if test "${NEED_TRIO}" = "1" ; then |
| 349 | echo Adding trio library for string functions |
| 350 | WITH_TRIO=1 |
| 351 | else |
| 352 | WITH_TRIO=0 |
| 353 | fi |
Daniel Veillard | 01ef738 | 2001-05-08 07:31:43 +0000 | [diff] [blame] | 354 | AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1") |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 355 | AC_SUBST(WITH_TRIO) |
| 356 | |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 357 | dnl |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 358 | dnl Aloow to enable/disable various pieces |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 359 | dnl |
| 360 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 361 | THREAD_LIBS="" |
| 362 | WITH_THREADS=0 |
| 363 | THREAD_CFLAGS="" |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 364 | TEST_THREADS="" |
Daniel Veillard | 64a411c | 2001-10-15 12:32:07 +0000 | [diff] [blame] | 365 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 366 | AC_ARG_WITH(threads, [ --with-threads Add multithread support(off)]) |
| 367 | if test "$with_threads" = "yes" ; then |
| 368 | echo Enabling multithreaded support |
| 369 | |
| 370 | AC_CHECK_HEADER(pthread.h, |
Daniel Veillard | cbaf399 | 2001-12-31 16:16:02 +0000 | [diff] [blame] | 371 | AC_CHECK_LIB(pthread, pthread_join,[ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 372 | THREAD_LIBS="-lpthread" |
| 373 | AC_DEFINE(HAVE_LIBPTHREAD) |
| 374 | AC_DEFINE(HAVE_PTHREAD_H) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 375 | WITH_THREADS="1"])) |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 376 | |
| 377 | if test "$WITH_THREADS" = "1" ; then |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 378 | THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" |
| 379 | TEST_THREADS="Threadtests" |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 380 | fi |
| 381 | fi |
Daniel Veillard | 64a411c | 2001-10-15 12:32:07 +0000 | [diff] [blame] | 382 | AC_ARG_WITH(thread-alloc, [ --with-thread-alloc Add per-thread memory(off)]) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 383 | if test "$with_threads_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then |
| 384 | THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" |
Daniel Veillard | 64a411c | 2001-10-15 12:32:07 +0000 | [diff] [blame] | 385 | fi |
| 386 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 387 | AC_SUBST(THREAD_LIBS) |
| 388 | AC_SUBST(WITH_THREADS) |
| 389 | AC_SUBST(THREAD_CFLAGS) |
Daniel Veillard | ab7488e | 2001-10-17 11:30:37 +0000 | [diff] [blame] | 390 | AC_SUBST(TEST_THREADS) |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 391 | |
| 392 | AC_ARG_WITH(history, [ --with-history Add history support to xmllint shell(off)]) |
Daniel Veillard | 259ff74 | 2001-10-06 13:49:59 +0000 | [diff] [blame] | 393 | if test "$with_history" = "yes" ; then |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 394 | echo Enabling xmllint shell history |
| 395 | dnl check for terminal library. this is a very cool solution |
| 396 | dnl from octave's configure.in |
| 397 | unset tcap |
| 398 | for termlib in ncurses curses termcap terminfo termlib; do |
| 399 | AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"]) |
| 400 | test -n "$tcap" && break |
| 401 | done |
| 402 | |
| 403 | AC_CHECK_HEADER(readline/history.h, |
| 404 | AC_CHECK_LIB(history, append_history,[ |
| 405 | RDL_LIBS="-lhistory" |
| 406 | AC_DEFINE(HAVE_LIBHISTORY)])) |
| 407 | AC_CHECK_HEADER(readline/readline.h, |
| 408 | AC_CHECK_LIB(readline, readline,[ |
| 409 | RDL_LIBS="-lreadline $RDL_LIBS $tcap" |
| 410 | AC_DEFINE(HAVE_LIBREADLINE)], , $tcap)) |
| 411 | if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then |
| 412 | CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include" |
| 413 | RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS" |
| 414 | else |
| 415 | CPPFLAGS=${_cppflags} |
| 416 | fi |
| 417 | LDFLAGS=${_ldflags} |
| 418 | fi |
| 419 | |
| 420 | AC_SUBST(WITH_FTP) |
| 421 | AC_SUBST(FTP_OBJ) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 422 | AC_ARG_WITH(ftp, [ --with-ftp Add the FTP support (on)]) |
| 423 | if test "$with_ftp" = "no" ; then |
| 424 | echo Disabling FTP support |
| 425 | WITH_FTP=0 |
| 426 | FTP_OBJ= |
| 427 | else |
| 428 | WITH_FTP=1 |
| 429 | FTP_OBJ=nanoftp.o |
| 430 | fi |
| 431 | AC_SUBST(WITH_FTP) |
| 432 | AC_SUBST(FTP_OBJ) |
| 433 | |
| 434 | AC_ARG_WITH(http, [ --with-http Add the HTTP support (on)]) |
| 435 | if test "$with_http" = "no" ; then |
| 436 | echo Disabling HTTP support |
| 437 | WITH_HTTP=0 |
| 438 | HTTP_OBJ= |
| 439 | else |
| 440 | WITH_HTTP=1 |
| 441 | HTTP_OBJ=nanohttp.o |
| 442 | fi |
| 443 | AC_SUBST(WITH_HTTP) |
| 444 | AC_SUBST(HTTP_OBJ) |
| 445 | |
| 446 | AC_ARG_WITH(html, [ --with-html Add the HTML support (on)]) |
| 447 | if test "$with_html" = "no" ; then |
| 448 | echo Disabling HTML support |
| 449 | WITH_HTML=0 |
| 450 | HTML_OBJ= |
| 451 | else |
| 452 | WITH_HTML=1 |
| 453 | HTML_OBJ="HTMLparser.o HTMLtree.o" |
| 454 | fi |
| 455 | AC_SUBST(WITH_HTML) |
| 456 | AC_SUBST(HTML_OBJ) |
| 457 | |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 458 | AC_ARG_WITH(catalog, [ --with-catalog Add the Catalog support (on)]) |
| 459 | if test "$with_catalog" = "no" ; then |
| 460 | echo Disabling Catalog support |
| 461 | WITH_CATALOG=0 |
| 462 | CATALOG_OBJ= |
| 463 | else |
| 464 | WITH_CATALOG=1 |
| 465 | CATALOG_OBJ="catalog.o" |
| 466 | fi |
| 467 | AC_SUBST(WITH_CATALOG) |
| 468 | AC_SUBST(CATALOG_OBJ) |
| 469 | |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 470 | AC_ARG_WITH(docbook, [ --with-docbook Add Docbook SGML support (on)]) |
Daniel Veillard | b59076b | 2001-04-29 17:04:07 +0000 | [diff] [blame] | 471 | if test "$with_docbook" = "no" ; then |
| 472 | echo Disabling Docbook support |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 473 | WITH_DOCB=0 |
| 474 | DOCB_OBJ= |
Daniel Veillard | b59076b | 2001-04-29 17:04:07 +0000 | [diff] [blame] | 475 | else |
| 476 | WITH_DOCB=1 |
| 477 | DOCB_OBJ="DOCBparser.o" |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 478 | fi |
| 479 | AC_SUBST(WITH_DOCB) |
| 480 | AC_SUBST(DOCB_OBJ) |
| 481 | |
| 482 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 483 | AC_ARG_WITH(xpath, [ --with-xpath Add the XPATH support (on)]) |
| 484 | if test "$with_xpath" = "no" ; then |
| 485 | echo Disabling XPATH support |
Daniel Veillard | 52afe80 | 2000-10-22 16:56:02 +0000 | [diff] [blame] | 486 | with_xptr="no" |
Daniel Veillard | 34de97f | 2002-04-30 14:29:22 +0000 | [diff] [blame] | 487 | with_c14n="no" |
Daniel Veillard | 070803b | 2002-05-03 07:29:38 +0000 | [diff] [blame] | 488 | with_xinclude="no" |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 489 | WITH_XPATH=0 |
| 490 | XPATH_OBJ= |
| 491 | else |
| 492 | WITH_XPATH=1 |
| 493 | XPATH_OBJ=xpath.o |
| 494 | fi |
| 495 | AC_SUBST(WITH_XPATH) |
| 496 | AC_SUBST(XPATH_OBJ) |
| 497 | |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 498 | AC_ARG_WITH(xptr, [ --with-xptr Add the XPointer support (on)]) |
| 499 | if test "$with_xptr" = "no" ; then |
| 500 | echo Disabling XPointer support |
| 501 | WITH_XPTR=0 |
| 502 | XPTR_OBJ= |
| 503 | else |
| 504 | WITH_XPTR=1 |
| 505 | XPTR_OBJ=xpointer.o |
| 506 | fi |
| 507 | AC_SUBST(WITH_XPTR) |
| 508 | AC_SUBST(XPTR_OBJ) |
| 509 | |
Daniel Veillard | 044fc6b | 2002-03-04 17:09:44 +0000 | [diff] [blame] | 510 | AC_ARG_WITH(c14n, [ --with-c14n Add the Canonicalization support (on)]) |
| 511 | if test "$with_c14n" = "no" ; then |
| 512 | echo Disabling C14N support |
| 513 | WITH_C14N=0 |
| 514 | C14N_OBJ= |
| 515 | else |
| 516 | WITH_C14N=1 |
| 517 | C14N_OBJ="c14n.c" |
| 518 | fi |
| 519 | AC_SUBST(WITH_C14N) |
| 520 | AC_SUBST(C14N_OBJ) |
| 521 | |
Daniel Veillard | 9e8bfae | 2000-11-06 16:43:11 +0000 | [diff] [blame] | 522 | AC_ARG_WITH(xinclude, [ --with-xinclude Add the XInclude support (on)]) |
| 523 | if test "$with_xinclude" = "no" ; then |
| 524 | echo Disabling XInclude support |
| 525 | WITH_XINCLUDE=0 |
| 526 | XINCLUDE_OBJ= |
| 527 | with_xinclude="no" |
| 528 | else |
| 529 | WITH_XINCLUDE=1 |
| 530 | XINCLUDE_OBJ=xinclude.o |
| 531 | fi |
| 532 | AC_SUBST(WITH_XINCLUDE) |
| 533 | AC_SUBST(XINCLUDE_OBJ) |
| 534 | |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 535 | WITH_ICONV=0 |
| 536 | AC_ARG_WITH(iconv, [ --with-iconv[=DIR] Add ICONV support (on)]) |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 537 | if test "$with_iconv" = "no" ; then |
| 538 | echo Disabling ICONV support |
Daniel Veillard | d574f78 | 2001-03-14 19:40:17 +0000 | [diff] [blame] | 539 | else |
Daniel Veillard | 220346d | 2001-12-07 11:33:54 +0000 | [diff] [blame] | 540 | if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 541 | CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" |
Daniel Veillard | f5b44e4 | 2001-09-17 17:19:54 +0000 | [diff] [blame] | 542 | # Export this since our headers include iconv.h |
| 543 | XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include" |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 544 | ICONV_LIBS="-L$with_iconv/lib" |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 545 | fi |
Daniel Veillard | 6e90d19 | 2001-07-03 16:37:49 +0000 | [diff] [blame] | 546 | |
| 547 | AC_CHECK_HEADER(iconv.h, |
| 548 | AC_MSG_CHECKING(for iconv) |
| 549 | AC_TRY_LINK([#include <stdlib.h> |
| 550 | #include <iconv.h>],[ |
| 551 | iconv_t cd = iconv_open ("",""); |
| 552 | iconv (cd, NULL, NULL, NULL, NULL);],[ |
| 553 | AC_MSG_RESULT(yes) |
| 554 | WITH_ICONV=1],[ |
| 555 | AC_MSG_RESULT(no) |
| 556 | AC_MSG_CHECKING(for iconv in -liconv) |
| 557 | |
| 558 | _ldflags="${LDFLAGS}" |
| 559 | _libs="${LIBS}" |
| 560 | LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" |
| 561 | LIBS="${LIBS} -liconv" |
| 562 | |
| 563 | AC_TRY_LINK([#include <stdlib.h> |
| 564 | #include <iconv.h>],[ |
| 565 | iconv_t cd = iconv_open ("",""); |
| 566 | iconv (cd, NULL, NULL, NULL, NULL);],[ |
| 567 | AC_MSG_RESULT(yes) |
| 568 | WITH_ICONV=1 |
| 569 | ICONV_LIBS="${ICONV_LIBS} -liconv" |
| 570 | LIBS="${_libs}" |
| 571 | LDFLAGS="${_ldflags}"],[ |
| 572 | AC_MSG_RESULT(no) |
| 573 | LIBS="${_libs}" |
| 574 | LDFLAGS="${_ldflags}"])])) |
| 575 | fi |
Daniel Veillard | b82c166 | 2001-12-09 14:00:54 +0000 | [diff] [blame] | 576 | M_LIBS="-lm" |
| 577 | XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS" |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 578 | AC_SUBST(WITH_ICONV) |
| 579 | |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 580 | AC_ARG_WITH(schemas, [ --with-schemas Add experimental Schemas/RelaxNG support (on)]) |
Daniel Veillard | ef4d3bc | 2003-02-07 12:38:22 +0000 | [diff] [blame] | 581 | if test "$with_schemas" = "no" ; then |
| 582 | echo "Disabled Schemas/Relax-NG support" |
| 583 | WITH_SCHEMAS=0 |
| 584 | TEST_SCHEMAS= |
| 585 | else |
Daniel Veillard | 71531f3 | 2003-02-05 13:19:53 +0000 | [diff] [blame] | 586 | echo "Enabled Schemas/Relax-NG support" |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 587 | WITH_SCHEMAS=1 |
Daniel Veillard | 6eadf63 | 2003-01-23 18:29:16 +0000 | [diff] [blame] | 588 | TEST_SCHEMAS="Schemastests Relaxtests" |
Daniel Veillard | 23e7357 | 2002-09-19 19:56:43 +0000 | [diff] [blame] | 589 | with_regexps=yes |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 590 | fi |
| 591 | AC_SUBST(WITH_SCHEMAS) |
| 592 | AC_SUBST(TEST_SCHEMAS) |
| 593 | |
Daniel Veillard | 23e7357 | 2002-09-19 19:56:43 +0000 | [diff] [blame] | 594 | AC_ARG_WITH(regexps, [ --with-regexps Add Regular Expressions support (on)]) |
| 595 | if test "$with_regexps" = "no" ; then |
| 596 | echo Disabling Regexps support |
| 597 | WITH_REGEXPS=0 |
| 598 | TEST_REGEXPS= |
| 599 | else |
| 600 | WITH_REGEXPS=1 |
| 601 | TEST_REGEXPS="Regexptests Automatatests" |
| 602 | fi |
| 603 | AC_SUBST(WITH_REGEXPS) |
| 604 | AC_SUBST(TEST_REGEXPS) |
| 605 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 606 | AC_ARG_WITH(debug, [ --with-debug Add the debugging module (on)]) |
| 607 | if test "$with_debug" = "no" ; then |
| 608 | echo Disabling DEBUG support |
| 609 | WITH_DEBUG=0 |
| 610 | DEBUG_OBJ= |
| 611 | else |
| 612 | WITH_DEBUG=1 |
| 613 | DEBUG_OBJ=debugXML.o |
| 614 | fi |
| 615 | AC_SUBST(WITH_DEBUG) |
| 616 | AC_SUBST(DEBUG_OBJ) |
| 617 | |
| 618 | AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)]) |
| 619 | if test "$with_mem_debug" = "yes" ; then |
| 620 | echo Enabling memory debug support |
| 621 | WITH_MEM_DEBUG=1 |
| 622 | else |
| 623 | WITH_MEM_DEBUG=0 |
| 624 | fi |
| 625 | AC_SUBST(WITH_MEM_DEBUG) |
| 626 | |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 627 | AC_SUBST(CFLAGS) |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 628 | AC_SUBST(XML_CFLAGS) |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 629 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 630 | AC_SUBST(XML_LIBDIR) |
| 631 | AC_SUBST(XML_LIBS) |
Daniel Veillard | 81418e3 | 2001-05-22 15:08:55 +0000 | [diff] [blame] | 632 | AC_SUBST(ICONV_LIBS) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 633 | AC_SUBST(XML_INCLUDEDIR) |
| 634 | AC_SUBST(HTML_DIR) |
| 635 | AC_SUBST(HAVE_ISNAN) |
| 636 | AC_SUBST(HAVE_ISINF) |
Daniel Veillard | f1d0e6b | 2002-01-31 23:42:44 +0000 | [diff] [blame] | 637 | AC_SUBST(PYTHON) |
| 638 | AC_SUBST(PYTHON_VERSION) |
| 639 | AC_SUBST(PYTHON_INCLUDES) |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 640 | AC_SUBST(PYTHON_SITE_PACKAGES) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 641 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 642 | AC_SUBST(M_LIBS) |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 643 | AC_SUBST(RDL_LIBS) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 644 | |
Daniel Veillard | 9715c17 | 2002-11-25 16:33:40 +0000 | [diff] [blame] | 645 | dnl for the spec file |
| 646 | RELDATE=`date +'%a %b %e %Y'` |
| 647 | AC_SUBST(RELDATE) |
| 648 | |
Daniel Veillard | c6e997c | 2003-01-27 12:35:42 +0000 | [diff] [blame] | 649 | rm -f COPYING.LIB COPYING |
Daniel Veillard | c575b99 | 2002-02-08 13:28:40 +0000 | [diff] [blame] | 650 | ln -s Copyright COPYING |
| 651 | |
Daniel Veillard | 580ced8 | 2003-03-21 21:22:48 +0000 | [diff] [blame] | 652 | AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile python/Makefile python/tests/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc xml2Conf.sh python/setup.py) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 653 | |
Daniel Veillard | 9b731d7 | 2002-04-14 12:56:08 +0000 | [diff] [blame] | 654 | chmod +x xml2-config xml2Conf.sh python/setup.py |