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 | 6a2e406 | 2001-02-08 10:31:33 +0000 | [diff] [blame] | 8 | LIBXML_MINOR_VERSION=3 |
Daniel Veillard | fac26a1 | 2001-04-08 13:08:14 +0000 | [diff] [blame^] | 9 | LIBXML_MICRO_VERSION=6 |
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 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 48 | AC_ARG_WITH(zlib, |
| 49 | [ --with-zlib[=DIR] use libz in DIR],[ |
| 50 | if test "$withval" != "no" -a "$withval" != "yes"; then |
| 51 | Z_DIR=$withval |
| 52 | CPPFLAGS="${CPPFLAGS} -I$withval/include" |
| 53 | LDFLAGS="${LDFLAGS} -L$withval/lib" |
| 54 | fi |
| 55 | ]) |
| 56 | |
| 57 | AC_CHECK_HEADERS(zlib.h, |
| 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 |
Daniel Veillard | 0a6c358 | 2001-03-14 19:15:37 +0000 | [diff] [blame] | 83 | HTML_DIR='$(prefix)/doc' |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 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 | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 103 | AC_CHECK_FUNCS(strdup strndup strerror) |
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 | |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 108 | dnl Checking the standard string functions availability |
| 109 | AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, |
| 110 | NEED_TRIO=1) |
| 111 | |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 112 | dnl Checks for inet libraries: |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 113 | AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) |
| 114 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
| 115 | AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect)) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 116 | |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 117 | dnl Determine what socket length (socklen_t) data type is |
| 118 | AC_MSG_CHECKING([for type of socket length (socklen_t)]) |
| 119 | AC_TRY_COMPILE2([ |
| 120 | #include <stddef.h> |
| 121 | #include <sys/types.h> |
| 122 | #include <sys/socket.h>],[ |
| 123 | (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[ |
| 124 | AC_MSG_RESULT(socklen_t *) |
| 125 | SOCKLEN_T=socklen_t],[ |
| 126 | AC_TRY_COMPILE2([ |
| 127 | #include <stddef.h> |
| 128 | #include <sys/types.h> |
| 129 | #include <sys/socket.h>],[ |
| 130 | (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[ |
| 131 | AC_MSG_RESULT(size_t *) |
| 132 | SOCKLEN_T=size_t],[ |
| 133 | AC_TRY_COMPILE2([ |
| 134 | #include <stddef.h> |
| 135 | #include <sys/types.h> |
| 136 | #include <sys/socket.h>],[ |
| 137 | (void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[ |
| 138 | AC_MSG_RESULT(int *) |
| 139 | SOCKLEN_T=int],[ |
| 140 | AC_MSG_WARN(could not determine)])])]) |
| 141 | AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T) |
| 142 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 143 | dnl Checks for isnan in libm if not in libc |
Daniel Veillard | 71b656e | 2000-01-05 14:46:17 +0000 | [diff] [blame] | 144 | AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan, |
Bjorn Reese | e1dc011 | 2001-03-03 12:09:03 +0000 | [diff] [blame] | 145 | [AC_DEFINE(HAVE_ISNAN)])) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 146 | |
Daniel Veillard | 760f442 | 2001-02-15 14:59:48 +0000 | [diff] [blame] | 147 | 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] | 148 | [AC_DEFINE(HAVE_ISINF)])) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 149 | |
| 150 | XML_LIBDIR='-L${libdir}' |
Daniel Veillard | e8282ed | 2000-10-10 23:01:31 +0000 | [diff] [blame] | 151 | XML_INCLUDEDIR='-I${includedir}/libxml -I${includedir}' |
Bjorn Reese | e1dc011 | 2001-03-03 12:09:03 +0000 | [diff] [blame] | 152 | XML_LIBS="-lxml2 $Z_LIBS -lm $LIBS" |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 153 | |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 154 | dnl |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 155 | dnl Extra flags |
| 156 | dnl |
| 157 | XML_CFLAGS="" |
| 158 | |
| 159 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 160 | dnl Workaround for HP native compiler |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 161 | dnl http://bugs.gnome.org/db/31/3163.html |
| 162 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 163 | if test "${GCC}" != "yes" ; then |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 164 | case "${host}" in |
| 165 | *-*-hpux* ) |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 166 | CFLAGS="${CFLAGS} -Wp,-H30000" |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 167 | ;; |
| 168 | esac |
Daniel Veillard | d574f78 | 2001-03-14 19:40:17 +0000 | [diff] [blame] | 169 | else |
| 170 | CFLAGS="${CFLAGS} -Wall" |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 171 | fi |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 172 | case ${host} in |
| 173 | *-*-solaris*) |
Daniel Veillard | d2ade93 | 2000-09-30 14:39:55 +0000 | [diff] [blame] | 174 | XML_LIBDIR="${XML_LIBDIR} -R${libdir}" |
| 175 | ;; |
| 176 | esac |
| 177 | |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 178 | |
Daniel Veillard | b0426ca | 2000-10-11 23:39:43 +0000 | [diff] [blame] | 179 | |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 180 | dnl |
| 181 | dnl Use buffers for content |
| 182 | dnl |
| 183 | |
| 184 | AC_ARG_WITH(buffers, [ --with-buffers Use buffers for node content]) |
| 185 | if test "$with_buffers" = "yes" ; then |
| 186 | CFLAGS="${CFLAGS} -DXML_USE_BUFFER_CONTENT" |
| 187 | XML_CFLAGS="${XML_CFLAGS} -DXML_USE_BUFFER_CONTENT" |
| 188 | fi |
| 189 | |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 190 | dnl |
| 191 | dnl Tester makes use of readline if present |
| 192 | dnl |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 193 | _cppflags="${CPPFLAGS}" |
| 194 | _ldflags="${LDFLAGS}" |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 195 | |
Daniel Veillard | 0310929 | 2000-08-14 14:58:22 +0000 | [diff] [blame] | 196 | AC_ARG_WITH(readline, |
| 197 | [ --with-readline=DIR use readline in DIR],[ |
| 198 | if test "$withval" != "no" -a "$withval" != "yes"; then |
| 199 | RDL_DIR=$withval |
| 200 | CPPFLAGS="${CPPFLAGS} -I$withval/include" |
| 201 | LDFLAGS="${LDFLAGS} -L$withval/lib" |
| 202 | fi |
| 203 | ]) |
| 204 | |
| 205 | dnl check for terminal library. this is a very cool solution |
| 206 | dnl from octave's configure.in |
| 207 | unset tcap |
| 208 | for termlib in ncurses curses termcap terminfo termlib; do |
| 209 | AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"]) |
| 210 | test -n "$tcap" && break |
| 211 | done |
| 212 | |
| 213 | AC_CHECK_HEADER(readline/history.h, |
| 214 | AC_CHECK_LIB(history, append_history,[ |
| 215 | RDL_LIBS="-lhistory" |
| 216 | AC_DEFINE(HAVE_LIBHISTORY)])) |
| 217 | AC_CHECK_HEADER(readline/readline.h, |
| 218 | AC_CHECK_LIB(readline, readline,[ |
| 219 | RDL_LIBS="-lreadline $RDL_LIBS $tcap" |
| 220 | AC_DEFINE(HAVE_LIBREADLINE)], , $tcap)) |
| 221 | if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then |
| 222 | CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include" |
| 223 | RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS" |
| 224 | else |
| 225 | CPPFLAGS=${_cppflags} |
| 226 | fi |
| 227 | LDFLAGS=${_ldflags} |
| 228 | |
| 229 | AC_SUBST(RDL_LIBS) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 230 | |
| 231 | dnl |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 232 | dnl specific tests to setup DV's devel environment with debug etc ... |
| 233 | dnl |
| 234 | if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ; then |
| 235 | if test "${with_mem_debug}" = "" ; then |
| 236 | with_mem_debug="yes" |
| 237 | fi |
| 238 | dnl if test "${with_docbook}" = "" ; then |
| 239 | dnl with_docbook="yes" |
| 240 | dnl fi |
| 241 | if test "${with_xptr}" = "" ; then |
| 242 | with_xptr="yes" |
| 243 | fi |
Daniel Veillard | c86a4fa | 2001-03-26 16:28:29 +0000 | [diff] [blame] | 244 | CFLAGS="-Wall -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 " |
| 245 | dnl -Wcast-qual -ansi |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 246 | fi |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 247 | |
| 248 | dnl |
| 249 | dnl Check for trio string functions |
| 250 | dnl |
| 251 | |
| 252 | if test "${NEED_TRIO}" = "1" ; then |
| 253 | echo Adding trio library for string functions |
| 254 | WITH_TRIO=1 |
| 255 | else |
| 256 | WITH_TRIO=0 |
| 257 | fi |
| 258 | AC_SUBST(WITH_TRIO) |
| 259 | |
Daniel Veillard | f6eea27 | 2001-01-18 12:17:12 +0000 | [diff] [blame] | 260 | dnl |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 261 | dnl Aloow to disable various pieces |
| 262 | dnl |
| 263 | |
| 264 | AC_ARG_WITH(ftp, [ --with-ftp Add the FTP support (on)]) |
| 265 | if test "$with_ftp" = "no" ; then |
| 266 | echo Disabling FTP support |
| 267 | WITH_FTP=0 |
| 268 | FTP_OBJ= |
| 269 | else |
| 270 | WITH_FTP=1 |
| 271 | FTP_OBJ=nanoftp.o |
| 272 | fi |
| 273 | AC_SUBST(WITH_FTP) |
| 274 | AC_SUBST(FTP_OBJ) |
| 275 | |
| 276 | AC_ARG_WITH(http, [ --with-http Add the HTTP support (on)]) |
| 277 | if test "$with_http" = "no" ; then |
| 278 | echo Disabling HTTP support |
| 279 | WITH_HTTP=0 |
| 280 | HTTP_OBJ= |
| 281 | else |
| 282 | WITH_HTTP=1 |
| 283 | HTTP_OBJ=nanohttp.o |
| 284 | fi |
| 285 | AC_SUBST(WITH_HTTP) |
| 286 | AC_SUBST(HTTP_OBJ) |
| 287 | |
| 288 | AC_ARG_WITH(html, [ --with-html Add the HTML support (on)]) |
| 289 | if test "$with_html" = "no" ; then |
| 290 | echo Disabling HTML support |
| 291 | WITH_HTML=0 |
| 292 | HTML_OBJ= |
| 293 | else |
| 294 | WITH_HTML=1 |
| 295 | HTML_OBJ="HTMLparser.o HTMLtree.o" |
| 296 | fi |
| 297 | AC_SUBST(WITH_HTML) |
| 298 | AC_SUBST(HTML_OBJ) |
| 299 | |
| 300 | AC_ARG_WITH(xpath, [ --with-xpath Add the XPATH support (on)]) |
| 301 | if test "$with_xpath" = "no" ; then |
| 302 | echo Disabling XPATH support |
Daniel Veillard | 52afe80 | 2000-10-22 16:56:02 +0000 | [diff] [blame] | 303 | with_xptr="no" |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 304 | WITH_XPATH=0 |
| 305 | XPATH_OBJ= |
| 306 | else |
| 307 | WITH_XPATH=1 |
| 308 | XPATH_OBJ=xpath.o |
| 309 | fi |
| 310 | AC_SUBST(WITH_XPATH) |
| 311 | AC_SUBST(XPATH_OBJ) |
| 312 | |
Daniel Veillard | c8df0aa | 2000-10-10 23:50:30 +0000 | [diff] [blame] | 313 | AC_ARG_WITH(xptr, [ --with-xptr Add the XPointer support (on)]) |
| 314 | if test "$with_xptr" = "no" ; then |
| 315 | echo Disabling XPointer support |
| 316 | WITH_XPTR=0 |
| 317 | XPTR_OBJ= |
| 318 | else |
| 319 | WITH_XPTR=1 |
| 320 | XPTR_OBJ=xpointer.o |
| 321 | fi |
| 322 | AC_SUBST(WITH_XPTR) |
| 323 | AC_SUBST(XPTR_OBJ) |
| 324 | |
Daniel Veillard | 9e8bfae | 2000-11-06 16:43:11 +0000 | [diff] [blame] | 325 | AC_ARG_WITH(xinclude, [ --with-xinclude Add the XInclude support (on)]) |
| 326 | if test "$with_xinclude" = "no" ; then |
| 327 | echo Disabling XInclude support |
| 328 | WITH_XINCLUDE=0 |
| 329 | XINCLUDE_OBJ= |
| 330 | with_xinclude="no" |
| 331 | else |
| 332 | WITH_XINCLUDE=1 |
| 333 | XINCLUDE_OBJ=xinclude.o |
| 334 | fi |
| 335 | AC_SUBST(WITH_XINCLUDE) |
| 336 | AC_SUBST(XINCLUDE_OBJ) |
| 337 | |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 338 | AC_ARG_WITH(iconv, [ --with-iconv Add the ICONV support (on)]) |
| 339 | if test "$with_iconv" = "no" ; then |
| 340 | echo Disabling ICONV support |
| 341 | WITH_ICONV=0 |
Daniel Veillard | d574f78 | 2001-03-14 19:40:17 +0000 | [diff] [blame] | 342 | else |
| 343 | AC_CHECK_HEADER(iconv.h, |
| 344 | AC_CHECK_FUNC(iconv, , AC_CHECK_LIB(iconv, iconv))) |
Daniel Veillard | 496a1cf | 2000-05-03 14:20:55 +0000 | [diff] [blame] | 345 | if test "$have_iconv" != "" ; then |
| 346 | echo Iconv support not found |
| 347 | WITH_ICONV=0 |
| 348 | else |
| 349 | WITH_ICONV=1 |
| 350 | fi |
| 351 | fi |
| 352 | AC_SUBST(WITH_ICONV) |
| 353 | |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 354 | AC_ARG_WITH(debug, [ --with-debug Add the debugging module (on)]) |
| 355 | if test "$with_debug" = "no" ; then |
| 356 | echo Disabling DEBUG support |
| 357 | WITH_DEBUG=0 |
| 358 | DEBUG_OBJ= |
| 359 | else |
| 360 | WITH_DEBUG=1 |
| 361 | DEBUG_OBJ=debugXML.o |
| 362 | fi |
| 363 | AC_SUBST(WITH_DEBUG) |
| 364 | AC_SUBST(DEBUG_OBJ) |
| 365 | |
| 366 | AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)]) |
| 367 | if test "$with_mem_debug" = "yes" ; then |
| 368 | echo Enabling memory debug support |
| 369 | WITH_MEM_DEBUG=1 |
| 370 | else |
| 371 | WITH_MEM_DEBUG=0 |
| 372 | fi |
| 373 | AC_SUBST(WITH_MEM_DEBUG) |
| 374 | |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 375 | AC_SUBST(CFLAGS) |
Daniel Veillard | f5c2c87 | 1999-12-01 09:51:45 +0000 | [diff] [blame] | 376 | AC_SUBST(XML_CFLAGS) |
Daniel Veillard | d7e200c | 1999-11-15 17:53:11 +0000 | [diff] [blame] | 377 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 378 | AC_SUBST(XML_LIBDIR) |
| 379 | AC_SUBST(XML_LIBS) |
| 380 | AC_SUBST(XML_INCLUDEDIR) |
| 381 | AC_SUBST(HTML_DIR) |
| 382 | AC_SUBST(HAVE_ISNAN) |
| 383 | AC_SUBST(HAVE_ISINF) |
| 384 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 385 | AC_SUBST(M_LIBS) |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 386 | AC_SUBST(RDL_LIBS) |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 387 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 388 | dnl |
| 389 | dnl create the libxml and include links needed to get dependencies right |
| 390 | dnl |
| 391 | if test ! -d $srcdir/include/libxml |
| 392 | then |
| 393 | if test ! -d $srcdir/include |
| 394 | then |
| 395 | rm -f $srcdir/include |
| 396 | mkdir $srcdir/include |
| 397 | fi |
| 398 | rm -f $srcdir/libxml |
| 399 | (cd $srcdir/include ; ln -s .. libxml) |
| 400 | fi |
| 401 | if test ! -r $srcdir/libxml |
| 402 | then |
| 403 | (cd $srcdir ; ln -s include/libxml libxml) |
| 404 | fi |
| 405 | if test ! -r include/libxml |
| 406 | then |
| 407 | if test ! -d include |
| 408 | then |
| 409 | rm -f include |
| 410 | mkdir include |
| 411 | fi |
| 412 | (cd include ; ln -s ../libxml libxml) |
| 413 | fi |
| 414 | if test ! -r libxml |
| 415 | then |
| 416 | rm -rf libxml |
| 417 | ln -s $srcdir/include/libxml libxml |
| 418 | fi |
| 419 | |
| 420 | 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] | 421 | |