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 | b96e643 | 1999-08-29 21:02:19 +0000 | [diff] [blame^] | 7 | LIBXML_MINOR_VERSION=6 |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 8 | LIBXML_MICRO_VERSION=0 |
| 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 | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 49 | |
Daniel Veillard | 1164e75 | 1999-02-16 16:29:17 +0000 | [diff] [blame] | 50 | dnl Specific dir for HTML output ? |
| 51 | if test "x$with_html_dir" = "x" ; then |
| 52 | HTML_DIR='${datadir}/gtk-doc/html' |
| 53 | else |
| 54 | HTML_DIR=$with_html_dir |
| 55 | fi |
| 56 | |
| 57 | AC_SUBST(HTML_DIR) |
| 58 | |
Daniel Veillard | 27fb075 | 1998-10-17 06:47:46 +0000 | [diff] [blame] | 59 | AC_ARG_ENABLE(corba, [ --enable-corba Add Corba support (default)]) |
| 60 | |
| 61 | dnl |
| 62 | dnl Corba is enabled by default |
| 63 | dnl |
Daniel Veillard | da4d3c4 | 1998-11-04 20:07:05 +0000 | [diff] [blame] | 64 | if test "$enable_corba" = "no" ; then |
Daniel Veillard | 27fb075 | 1998-10-17 06:47:46 +0000 | [diff] [blame] | 65 | CORBA_CFLAGS="-DWITHOUT_CORBA" |
| 66 | fi |
| 67 | AC_SUBST(CORBA_CFLAGS) |
| 68 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 69 | dnl Checks for library functions. |
| 70 | AC_FUNC_STRFTIME |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 71 | AC_CHECK_FUNCS(strdup strndup strerror snprintf) |
| 72 | AC_CHECK_FUNCS(finite isinf isnan isnand fp_class class fpclass finite) |
| 73 | |
| 74 | dnl Checks for isnan in libm if not in libc |
| 75 | M_LIBS= |
| 76 | if test "$ac_cv_func_isnan" != "yes" |
| 77 | then |
| 78 | AC_CHECK_LIB(m, isnan, |
| 79 | M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)) |
| 80 | fi |
| 81 | |
| 82 | dnl Checks for isinf in libm if not in libc |
| 83 | if test "$ac_cv_func_isinf" != "yes" |
| 84 | then |
| 85 | M2_LIBS="" |
| 86 | AC_CHECK_LIB(m, isinf, |
| 87 | M2_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)) |
| 88 | if test "$M2_LIBS" != "" |
| 89 | then |
| 90 | M_LIBS="$M2_LIBS" |
| 91 | fi |
| 92 | fi |
| 93 | |
| 94 | XML_LIBDIR='-L${libdir}' |
| 95 | XML_INCLUDEDIR='-I${includedir}/gnome-xml' |
| 96 | XML_LIBS="-lxml $Z_LIBS $M_LIBS" |
| 97 | |
| 98 | AC_SUBST(XML_LIBDIR) |
| 99 | AC_SUBST(XML_LIBS) |
| 100 | AC_SUBST(XML_INCLUDEDIR) |
| 101 | AC_SUBST(HTML_DIR) |
| 102 | AC_SUBST(HAVE_ISNAN) |
| 103 | AC_SUBST(HAVE_ISINF) |
| 104 | |
Daniel Veillard | 01791d5 | 1998-07-24 19:24:09 +0000 | [diff] [blame] | 105 | AC_SUBST(Z_LIBS) |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 106 | AC_SUBST(M_LIBS) |
Daniel Veillard | 3166ab1 | 1999-07-11 16:14:19 +0000 | [diff] [blame] | 107 | AC_OUTPUT(libxml.spec Makefile doc/Makefile example/Makefile xml-config) |
Arturo Espinosa | 15fe6e7 | 1998-09-07 17:27:57 +0000 | [diff] [blame] | 108 | |