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