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) |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +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 | 6a2e406 | 2001-02-08 10:31:33 +0000 | [diff] [blame] | 8 | LIBXML_MINOR_VERSION=3 |
Daniel Veillard | 760f442 | 2001-02-15 14:59:48 +0000 | [diff] [blame] | 9 | LIBXML_MICRO_VERSION=1 |
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. |
| 45 | _cppflags="${CPPFLAGS}" |
| 46 | _ldflags="${LDFLAGS}" |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 47 | |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 48 | AC_ARG_WITH(zlib, |
| 49 | [ --with-zlib[=DIR] use libz in DIR],[ |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 50 | if test "$withval" != "no" -a "$withval" != "yes"; then |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 51 | Z_DIR=$withval |
| 52 | CPPFLAGS="${CPPFLAGS} -I$withval/include" |
| 53 | LDFLAGS="${LDFLAGS} -L$withval/lib" |
| 54 | fi |
| 55 | ]) |
| 56 | |
Daniel Veillard | 461a66c | 2000-01-18 18:01:01 +0000 | [diff] [blame] | 57 | AC_CHECK_HEADERS(zlib.h, |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 58 | AC_CHECK_LIB(z, gzread,[ |
| 59 | AC_DEFINE(HAVE_LIBZ) |
| 60 | if test "x${Z_DIR}" != "x"; then |
| 61 | Z_CFLAGS="-I${Z_DIR}/include" |
| 62 | Z_LIBS="-L${Z_DIR}/lib -lz" |
| 63 | else |
| 64 | Z_LIBS="-lz" |
| 65 | fi])) |
| 66 | AC_SUBST(Z_CFLAGS) |
| 67 | AC_SUBST(Z_LIBS) |
| 68 | |
| 69 | CPPFLAGS=${_cppflags} |
| 70 | LDFLAGS=${_ldflags} |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 71 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 72 | dnl Checks for header files. |
| 73 | AC_HEADER_DIRENT |
| 74 | AC_HEADER_STDC |
| 75 | AC_CHECK_HEADERS(fcntl.h unistd.h ctype.h dirent.h errno.h malloc.h) |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 76 | AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 77 | AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h) |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 78 | AC_CHECK_HEADERS(stdlib.h sys/socket.h netinet/in.h arpa/inet.h) |
Daniel Veillard | 46e370e | 2000-07-21 20:32:03 +0000 | [diff] [blame] | 79 | AC_CHECK_HEADERS(netdb.h sys/time.h sys/select.h sys/mman.h) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 80 | |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 81 | dnl Specific dir for HTML output ? |
| 82 | if test "x$with_html_dir" = "x" ; then |
| 83 | HTML_DIR='${datadir}/gtk-doc/html' |
| 84 | else |
| 85 | HTML_DIR=$with_html_dir |
| 86 | fi |
| 87 | |
| 88 | AC_SUBST(HTML_DIR) |
| 89 | |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 90 | AC_ARG_ENABLE(corba, |
| 91 | [ --enable-corba Add Corba support (default)]) |
Daniel Veillard | 27fb075 | 1998-10-17 06:47:46 +0000 | [diff] [blame] | 92 | |
| 93 | dnl |
| 94 | dnl Corba is enabled by default |
| 95 | dnl |
Daniel Veillard | da4d3c4 | 1998-11-04 20:07:05 +0000 | [diff] [blame] | 96 | if test "$enable_corba" = "no" ; then |
Daniel Veillard | 27fb075 | 1998-10-17 06:47:46 +0000 | [diff] [blame] | 97 | CORBA_CFLAGS="-DWITHOUT_CORBA" |
| 98 | fi |
| 99 | AC_SUBST(CORBA_CFLAGS) |
| 100 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 101 | dnl Checks for library functions. |
| 102 | AC_FUNC_STRFTIME |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 103 | AC_CHECK_FUNCS(strdup strndup strerror snprintf) |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 104 | AC_CHECK_FUNCS(finite isnand fp_class class fpclass) |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 105 | AC_CHECK_FUNCS(strftime localtime) |
Daniel Veillard | f17e09b | 2001-01-25 13:55:35 +0000 | [diff] [blame] | 106 | AC_CHECK_FUNCS(stat _stat) |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 107 | |
| 108 | dnl Checks for inet libraries: |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 109 | AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) |
| 110 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
| 111 | AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect)) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 112 | |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 113 | dnl Determine what socket length (socklen_t) data type is |
| 114 | AC_MSG_CHECKING([for type of socket length (socklen_t)]) |
| 115 | AC_TRY_COMPILE2([ |
| 116 | #include <stddef.h> |
| 117 | #include <sys/types.h> |
| 118 | #include <sys/socket.h>],[ |
| 119 | (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[ |
| 120 | AC_MSG_RESULT(socklen_t *) |
| 121 | SOCKLEN_T=socklen_t],[ |
| 122 | AC_TRY_COMPILE2([ |
| 123 | #include <stddef.h> |
| 124 | #include <sys/types.h> |
| 125 | #include <sys/socket.h>],[ |
| 126 | (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[ |
| 127 | AC_MSG_RESULT(size_t *) |
| 128 | SOCKLEN_T=size_t],[ |
| 129 | AC_TRY_COMPILE2([ |
| 130 | #include <stddef.h> |
| 131 | #include <sys/types.h> |
| 132 | #include <sys/socket.h>],[ |
| 133 | (void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[ |
| 134 | AC_MSG_RESULT(int *) |
| 135 | SOCKLEN_T=int],[ |
| 136 | AC_MSG_WARN(could not determine)])])]) |
| 137 | AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T) |
| 138 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 139 | dnl Checks for isnan in libm if not in libc |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 140 | AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan, |
| 141 | [M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)])) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 142 | |
Daniel Veillard | 760f442 | 2001-02-15 14:59:48 +0000 | [diff] [blame] | 143 | AC_CHECK_FUNC(isinf, AC_DEFINE(HAVE_ISINF) , AC_CHECK_LIB(m, isinf, |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 144 | [M_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)])) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 145 | |
| 146 | XML_LIBDIR='-L${libdir}' |
Daniel Veillard | e8282ed | 2000-10-10 23:01:31 +0000 | [diff] [blame] | 147 | XML_INCLUDEDIR='-I${includedir}/libxml -I${includedir}' |
Daniel Veillard | ee0a466 | 2001-01-27 18:59:33 +0000 | [diff] [blame] | 148 | XML_LIBS="-lxml2 $Z_LIBS $M_LIBS $LIBS" |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 149 | |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 150 | dnl |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 151 | dnl Extra flags |
| 152 | dnl |
| 153 | XML_CFLAGS="" |
| 154 | |
| 155 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 156 | dnl Workaround for HP native compiler |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 157 | dnl http://bugs.gnome.org/db/31/3163.html |
| 158 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 159 | if test "${GCC}" != "yes" ; then |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 160 | case "${host}" in |
| 161 | *-*-hpux* ) |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 162 | CFLAGS="${CFLAGS} -Wp,-H30000" |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 163 | ;; |
| 164 | esac |
| 165 | fi |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 166 | case ${host} in |
| 167 | *-*-solaris*) |
Daniel Veillard | d2ade93 | 2000-09-30 14:39:55 +0000 | [diff] [blame] | 168 | XML_LIBDIR="${XML_LIBDIR} -R${libdir}" |
| 169 | ;; |
| 170 | esac |
| 171 | |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 172 | |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 173 | |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 174 | dnl |
| 175 | dnl Use buffers for content |
| 176 | dnl |
| 177 | |
| 178 | AC_ARG_WITH(buffers, [ --with-buffers Use buffers for node content]) |
| 179 | if test "$with_buffers" = "yes" ; then |
| 180 | CFLAGS="${CFLAGS} -DXML_USE_BUFFER_CONTENT" |
| 181 | XML_CFLAGS="${XML_CFLAGS} -DXML_USE_BUFFER_CONTENT" |
| 182 | fi |
| 183 | |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 184 | dnl |
| 185 | dnl Tester makes use of readline if present |
| 186 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 187 | _cppflags="${CPPFLAGS}" |
| 188 | _ldflags="${LDFLAGS}" |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 189 | |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 190 | AC_ARG_WITH(readline, |
| 191 | [ --with-readline=DIR use readline in DIR],[ |
| 192 | if test "$withval" != "no" -a "$withval" != "yes"; then |
| 193 | RDL_DIR=$withval |
| 194 | CPPFLAGS="${CPPFLAGS} -I$withval/include" |
| 195 | LDFLAGS="${LDFLAGS} -L$withval/lib" |
| 196 | fi |
| 197 | ]) |
| 198 | |
| 199 | dnl check for terminal library. this is a very cool solution |
| 200 | dnl from octave's configure.in |
| 201 | unset tcap |
| 202 | for termlib in ncurses curses termcap terminfo termlib; do |
| 203 | AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"]) |
| 204 | test -n "$tcap" && break |
| 205 | done |
| 206 | |
| 207 | AC_CHECK_HEADER(readline/history.h, |
| 208 | AC_CHECK_LIB(history, append_history,[ |
| 209 | RDL_LIBS="-lhistory" |
| 210 | AC_DEFINE(HAVE_LIBHISTORY)])) |
| 211 | AC_CHECK_HEADER(readline/readline.h, |
| 212 | AC_CHECK_LIB(readline, readline,[ |
| 213 | RDL_LIBS="-lreadline $RDL_LIBS $tcap" |
| 214 | AC_DEFINE(HAVE_LIBREADLINE)], , $tcap)) |
| 215 | if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then |
| 216 | CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include" |
| 217 | RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS" |
| 218 | else |
| 219 | CPPFLAGS=${_cppflags} |
| 220 | fi |
| 221 | LDFLAGS=${_ldflags} |
| 222 | |
| 223 | AC_SUBST(RDL_LIBS) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 224 | |
| 225 | dnl |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 226 | dnl specific tests to setup DV's devel environment with debug etc ... |
| 227 | dnl |
| 228 | if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ; then |
| 229 | if test "${with_mem_debug}" = "" ; then |
| 230 | with_mem_debug="yes" |
| 231 | fi |
| 232 | dnl if test "${with_docbook}" = "" ; then |
| 233 | dnl with_docbook="yes" |
| 234 | dnl fi |
| 235 | if test "${with_xptr}" = "" ; then |
| 236 | with_xptr="yes" |
| 237 | fi |
| 238 | CFLAGS="-Wall -g -pedantic" |
| 239 | fi |
| 240 | dnl |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 241 | dnl Aloow to disable various pieces |
| 242 | dnl |
| 243 | |
| 244 | AC_ARG_WITH(ftp, [ --with-ftp Add the FTP support (on)]) |
| 245 | if test "$with_ftp" = "no" ; then |
| 246 | echo Disabling FTP support |
| 247 | WITH_FTP=0 |
| 248 | FTP_OBJ= |
| 249 | else |
| 250 | WITH_FTP=1 |
| 251 | FTP_OBJ=nanoftp.o |
| 252 | fi |
| 253 | AC_SUBST(WITH_FTP) |
| 254 | AC_SUBST(FTP_OBJ) |
| 255 | |
| 256 | AC_ARG_WITH(http, [ --with-http Add the HTTP support (on)]) |
| 257 | if test "$with_http" = "no" ; then |
| 258 | echo Disabling HTTP support |
| 259 | WITH_HTTP=0 |
| 260 | HTTP_OBJ= |
| 261 | else |
| 262 | WITH_HTTP=1 |
| 263 | HTTP_OBJ=nanohttp.o |
| 264 | fi |
| 265 | AC_SUBST(WITH_HTTP) |
| 266 | AC_SUBST(HTTP_OBJ) |
| 267 | |
| 268 | AC_ARG_WITH(html, [ --with-html Add the HTML support (on)]) |
| 269 | if test "$with_html" = "no" ; then |
| 270 | echo Disabling HTML support |
| 271 | WITH_HTML=0 |
| 272 | HTML_OBJ= |
| 273 | else |
| 274 | WITH_HTML=1 |
| 275 | HTML_OBJ="HTMLparser.o HTMLtree.o" |
| 276 | fi |
| 277 | AC_SUBST(WITH_HTML) |
| 278 | AC_SUBST(HTML_OBJ) |
| 279 | |
| 280 | AC_ARG_WITH(xpath, [ --with-xpath Add the XPATH support (on)]) |
| 281 | if test "$with_xpath" = "no" ; then |
| 282 | echo Disabling XPATH support |
Daniel Veillard | 52afe80 | 2000-10-22 16:56:02 +0000 | [diff] [blame] | 283 | with_xptr="no" |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 284 | WITH_XPATH=0 |
| 285 | XPATH_OBJ= |
| 286 | else |
| 287 | WITH_XPATH=1 |
| 288 | XPATH_OBJ=xpath.o |
| 289 | fi |
| 290 | AC_SUBST(WITH_XPATH) |
| 291 | AC_SUBST(XPATH_OBJ) |
| 292 | |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 293 | AC_ARG_WITH(xptr, [ --with-xptr Add the XPointer support (on)]) |
| 294 | if test "$with_xptr" = "no" ; then |
| 295 | echo Disabling XPointer support |
| 296 | WITH_XPTR=0 |
| 297 | XPTR_OBJ= |
| 298 | else |
| 299 | WITH_XPTR=1 |
| 300 | XPTR_OBJ=xpointer.o |
| 301 | fi |
| 302 | AC_SUBST(WITH_XPTR) |
| 303 | AC_SUBST(XPTR_OBJ) |
| 304 | |
Daniel Veillard | 9e8bfae | 2000-11-06 16:43:11 +0000 | [diff] [blame] | 305 | AC_ARG_WITH(xinclude, [ --with-xinclude Add the XInclude support (on)]) |
| 306 | if test "$with_xinclude" = "no" ; then |
| 307 | echo Disabling XInclude support |
| 308 | WITH_XINCLUDE=0 |
| 309 | XINCLUDE_OBJ= |
| 310 | with_xinclude="no" |
| 311 | else |
| 312 | WITH_XINCLUDE=1 |
| 313 | XINCLUDE_OBJ=xinclude.o |
| 314 | fi |
| 315 | AC_SUBST(WITH_XINCLUDE) |
| 316 | AC_SUBST(XINCLUDE_OBJ) |
| 317 | |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 318 | AC_ARG_WITH(iconv, [ --with-iconv Add the ICONV support (on)]) |
| 319 | if test "$with_iconv" = "no" ; then |
| 320 | echo Disabling ICONV support |
| 321 | WITH_ICONV=0 |
| 322 | else |
Daniel Veillard | 04698d9 | 2000-09-17 16:00:22 +0000 | [diff] [blame] | 323 | AC_CHECK_FUNCS(iconv) |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 324 | if test "$have_iconv" != "" ; then |
| 325 | echo Iconv support not found |
| 326 | WITH_ICONV=0 |
| 327 | else |
| 328 | WITH_ICONV=1 |
| 329 | fi |
| 330 | fi |
| 331 | AC_SUBST(WITH_ICONV) |
| 332 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 333 | AC_ARG_WITH(debug, [ --with-debug Add the debugging module (on)]) |
| 334 | if test "$with_debug" = "no" ; then |
| 335 | echo Disabling DEBUG support |
| 336 | WITH_DEBUG=0 |
| 337 | DEBUG_OBJ= |
| 338 | else |
| 339 | WITH_DEBUG=1 |
| 340 | DEBUG_OBJ=debugXML.o |
| 341 | fi |
| 342 | AC_SUBST(WITH_DEBUG) |
| 343 | AC_SUBST(DEBUG_OBJ) |
| 344 | |
| 345 | AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)]) |
| 346 | if test "$with_mem_debug" = "yes" ; then |
| 347 | echo Enabling memory debug support |
| 348 | WITH_MEM_DEBUG=1 |
| 349 | else |
| 350 | WITH_MEM_DEBUG=0 |
| 351 | fi |
| 352 | AC_SUBST(WITH_MEM_DEBUG) |
| 353 | |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 354 | AC_SUBST(CFLAGS) |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 355 | AC_SUBST(XML_CFLAGS) |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 356 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 357 | AC_SUBST(XML_LIBDIR) |
| 358 | AC_SUBST(XML_LIBS) |
| 359 | AC_SUBST(XML_INCLUDEDIR) |
| 360 | AC_SUBST(HTML_DIR) |
| 361 | AC_SUBST(HAVE_ISNAN) |
| 362 | AC_SUBST(HAVE_ISINF) |
| 363 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 364 | AC_SUBST(M_LIBS) |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 365 | AC_SUBST(RDL_LIBS) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 366 | |
| 367 | dnl |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 368 | dnl create the libxml and include links needed to get dependencies right |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 369 | dnl |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 370 | if test ! -d $srcdir/include/libxml |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 371 | then |
Daniel Veillard | 2d38f04 | 2000-10-11 10:54:10 +0000 | [diff] [blame] | 372 | if test ! -d $srcdir/include |
Daniel Veillard | 57fda59 | 2000-10-10 23:24:14 +0000 | [diff] [blame] | 373 | then |
| 374 | rm -f $srcdir/include |
| 375 | mkdir $srcdir/include |
| 376 | fi |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 377 | rm -f $srcdir/libxml |
Daniel Veillard | e8282ed | 2000-10-10 23:01:31 +0000 | [diff] [blame] | 378 | (cd $srcdir/include ; ln -s .. libxml) |
| 379 | fi |
Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 380 | if test ! -r $srcdir/libxml |
Daniel Veillard | e8282ed | 2000-10-10 23:01:31 +0000 | [diff] [blame] | 381 | then |
| 382 | (cd $srcdir ; ln -s include/libxml libxml) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 383 | fi |
Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 384 | if test ! -r include/libxml |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 385 | then |
Daniel Veillard | 2d38f04 | 2000-10-11 10:54:10 +0000 | [diff] [blame] | 386 | if test ! -d include |
Daniel Veillard | 57fda59 | 2000-10-10 23:24:14 +0000 | [diff] [blame] | 387 | then |
| 388 | rm -f include |
| 389 | mkdir include |
| 390 | fi |
Daniel Veillard | e8282ed | 2000-10-10 23:01:31 +0000 | [diff] [blame] | 391 | (cd include ; ln -s ../libxml libxml) |
| 392 | fi |
Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 393 | if test ! -r libxml |
Daniel Veillard | e8282ed | 2000-10-10 23:01:31 +0000 | [diff] [blame] | 394 | then |
| 395 | rm -rf libxml |
| 396 | ln -s $srcdir/include/libxml libxml |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 397 | fi |
| 398 | |
Daniel Veillard | b42042b | 2001-01-28 07:40:36 +0000 | [diff] [blame] | 399 | AC_OUTPUT(libxml.spec Makefile include/Makefile doc/Makefile example/Makefile libxml/xmlversion.h xml2-config libxml-2.0.pc xml2Conf.sh) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 400 | |