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 | 260a68f | 1998-08-13 03:39:55 +0000 | [diff] [blame] | 3 | AC_INIT(entities.h) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 4 | AM_CONFIG_HEADER(config.h) |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 5 | |
| 6 | LIBXML_MAJOR_VERSION=1 |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 7 | LIBXML_MINOR_VERSION=7 |
Daniel Veillard | 3500838 | 1999-10-25 13:15:52 +0000 | [diff] [blame^] | 8 | LIBXML_MICRO_VERSION=4 |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 9 | LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION |
| 10 | LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION |
| 11 | |
| 12 | AC_SUBST(LIBXML_MAJOR_VERSION) |
| 13 | AC_SUBST(LIBXML_MINOR_VERSION) |
| 14 | AC_SUBST(LIBXML_MICRO_VERSION) |
| 15 | AC_SUBST(LIBXML_VERSION) |
| 16 | AC_SUBST(LIBXML_VERSION_INFO) |
| 17 | |
| 18 | VERSION=$LIBXML_VERSION |
| 19 | |
| 20 | AM_INIT_AUTOMAKE(libxml, $VERSION) |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 21 | |
| 22 | 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] | 23 | |
| 24 | dnl Checks for programs. |
| 25 | AC_PROG_CC |
| 26 | AC_PROG_INSTALL |
Sebastian Wilhelmi | a44c8a4 | 1998-08-07 08:38:58 +0000 | [diff] [blame] | 27 | AC_PROG_CPP |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 28 | AC_PATH_PROG(RM, rm, /bin/rm) |
| 29 | AC_PATH_PROG(MV, mv, /bin/mv) |
| 30 | AC_PATH_PROG(TAR, tar, /bin/tar) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 31 | |
| 32 | AM_PROG_LIBTOOL |
| 33 | |
| 34 | AM_MAINTAINER_MODE |
| 35 | |
| 36 | dnl Checks for libraries. |
| 37 | Z_LIBS= |
| 38 | AC_CHECK_LIB(z, inflate, |
| 39 | AC_CHECK_HEADER(zlib.h, |
| 40 | Z_LIBS="-lz"; AC_DEFINE(HAVE_LIBZ))) |
| 41 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 42 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 43 | dnl Checks for header files. |
| 44 | AC_HEADER_DIRENT |
| 45 | AC_HEADER_STDC |
| 46 | AC_CHECK_HEADERS(fcntl.h unistd.h ctype.h dirent.h errno.h malloc.h) |
| 47 | AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h zlib.h) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 48 | 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] | 49 | AC_CHECK_HEADERS(stdlib.h sys/socket.h netinet/in.h arpa/inet.h) |
| 50 | AC_CHECK_HEADERS(netdb.h sys/time.h sys/select.h) |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 51 | |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 52 | dnl Specific dir for HTML output ? |
| 53 | if test "x$with_html_dir" = "x" ; then |
| 54 | HTML_DIR='${datadir}/gtk-doc/html' |
| 55 | else |
| 56 | HTML_DIR=$with_html_dir |
| 57 | fi |
| 58 | |
| 59 | AC_SUBST(HTML_DIR) |
| 60 | |
Daniel Veillard | 27fb075 | 1998-10-17 06:47:46 +0000 | [diff] [blame] | 61 | AC_ARG_ENABLE(corba, [ --enable-corba Add Corba support (default)]) |
| 62 | |
| 63 | dnl |
| 64 | dnl Corba is enabled by default |
| 65 | dnl |
Daniel Veillard | da4d3c4 | 1998-11-04 20:07:05 +0000 | [diff] [blame] | 66 | if test "$enable_corba" = "no" ; then |
Daniel Veillard | 27fb075 | 1998-10-17 06:47:46 +0000 | [diff] [blame] | 67 | CORBA_CFLAGS="-DWITHOUT_CORBA" |
| 68 | fi |
| 69 | AC_SUBST(CORBA_CFLAGS) |
| 70 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 71 | dnl Checks for library functions. |
| 72 | AC_FUNC_STRFTIME |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 73 | AC_CHECK_FUNCS(strdup strndup strerror snprintf) |
| 74 | AC_CHECK_FUNCS(finite isinf isnan isnand fp_class class fpclass finite) |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 75 | AC_CHECK_FUNCS(strftime localtime) |
| 76 | |
| 77 | dnl Checks for inet libraries: |
| 78 | AC_CHECK_LIB(socket, socket) |
| 79 | AC_CHECK_LIB(inet, connect) |
| 80 | AC_CHECK_LIB(nsl, t_accept) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 81 | |
| 82 | dnl Checks for isnan in libm if not in libc |
| 83 | M_LIBS= |
| 84 | if test "$ac_cv_func_isnan" != "yes" |
| 85 | then |
| 86 | AC_CHECK_LIB(m, isnan, |
| 87 | M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)) |
| 88 | fi |
| 89 | |
| 90 | dnl Checks for isinf in libm if not in libc |
| 91 | if test "$ac_cv_func_isinf" != "yes" |
| 92 | then |
| 93 | M2_LIBS="" |
| 94 | AC_CHECK_LIB(m, isinf, |
| 95 | M2_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)) |
| 96 | if test "$M2_LIBS" != "" |
| 97 | then |
| 98 | M_LIBS="$M2_LIBS" |
| 99 | fi |
| 100 | fi |
| 101 | |
| 102 | XML_LIBDIR='-L${libdir}' |
| 103 | XML_INCLUDEDIR='-I${includedir}/gnome-xml' |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 104 | XML_LIBS="-lxml $Z_LIBS $M_LIBS $LIBS" |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 105 | |
| 106 | AC_SUBST(XML_LIBDIR) |
| 107 | AC_SUBST(XML_LIBS) |
| 108 | AC_SUBST(XML_INCLUDEDIR) |
| 109 | AC_SUBST(HTML_DIR) |
| 110 | AC_SUBST(HAVE_ISNAN) |
| 111 | AC_SUBST(HAVE_ISINF) |
| 112 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 113 | AC_SUBST(Z_LIBS) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 114 | AC_SUBST(M_LIBS) |
Daniel Veillard | 3166ab1 | 1999-07-11 16:14:19 +0000 | [diff] [blame] | 115 | AC_OUTPUT(libxml.spec Makefile doc/Makefile example/Makefile xml-config) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 116 | |