blob: 079a38f5d525b4f6117a1a59138f0746ba2141f6 [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.2)
Daniel Veillard260a68f1998-08-13 03:39:55 +00003AC_INIT(entities.h)
Daniel Veillard01791d51998-07-24 19:24:09 +00004AM_CONFIG_HEADER(config.h)
Daniel Veillard14fff061999-06-22 21:49:07 +00005
6LIBXML_MAJOR_VERSION=1
Daniel Veillardb96e6431999-08-29 21:02:19 +00007LIBXML_MINOR_VERSION=6
Daniel Veillard14fff061999-06-22 21:49:07 +00008LIBXML_MICRO_VERSION=0
9LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
10LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
11
12AC_SUBST(LIBXML_MAJOR_VERSION)
13AC_SUBST(LIBXML_MINOR_VERSION)
14AC_SUBST(LIBXML_MICRO_VERSION)
15AC_SUBST(LIBXML_VERSION)
16AC_SUBST(LIBXML_VERSION_INFO)
17
18VERSION=$LIBXML_VERSION
19
20AM_INIT_AUTOMAKE(libxml, $VERSION)
Daniel Veillard1164e751999-02-16 16:29:17 +000021
22AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
Daniel Veillard01791d51998-07-24 19:24:09 +000023
24dnl Checks for programs.
25AC_PROG_CC
26AC_PROG_INSTALL
Sebastian Wilhelmia44c8a41998-08-07 08:38:58 +000027AC_PROG_CPP
Daniel Veillard01791d51998-07-24 19:24:09 +000028AC_PATH_PROG(RM, rm, /bin/rm)
29AC_PATH_PROG(MV, mv, /bin/mv)
30AC_PATH_PROG(TAR, tar, /bin/tar)
Daniel Veillard01791d51998-07-24 19:24:09 +000031
32AM_PROG_LIBTOOL
33
34AM_MAINTAINER_MODE
35
36dnl Checks for libraries.
37Z_LIBS=
38AC_CHECK_LIB(z, inflate,
39 AC_CHECK_HEADER(zlib.h,
40 Z_LIBS="-lz"; AC_DEFINE(HAVE_LIBZ)))
41
Daniel Veillardb05deb71999-08-10 19:04:08 +000042
Daniel Veillard01791d51998-07-24 19:24:09 +000043dnl Checks for header files.
44AC_HEADER_DIRENT
45AC_HEADER_STDC
46AC_CHECK_HEADERS(fcntl.h unistd.h ctype.h dirent.h errno.h malloc.h)
47AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h zlib.h)
Daniel Veillardb05deb71999-08-10 19:04:08 +000048AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h)
Daniel Veillard01791d51998-07-24 19:24:09 +000049
Daniel Veillard1164e751999-02-16 16:29:17 +000050dnl Specific dir for HTML output ?
51if test "x$with_html_dir" = "x" ; then
52 HTML_DIR='${datadir}/gtk-doc/html'
53else
54 HTML_DIR=$with_html_dir
55fi
56
57AC_SUBST(HTML_DIR)
58
Daniel Veillard27fb0751998-10-17 06:47:46 +000059AC_ARG_ENABLE(corba, [ --enable-corba Add Corba support (default)])
60
61dnl
62dnl Corba is enabled by default
63dnl
Daniel Veillardda4d3c41998-11-04 20:07:05 +000064if test "$enable_corba" = "no" ; then
Daniel Veillard27fb0751998-10-17 06:47:46 +000065 CORBA_CFLAGS="-DWITHOUT_CORBA"
66fi
67AC_SUBST(CORBA_CFLAGS)
68
Daniel Veillard01791d51998-07-24 19:24:09 +000069dnl Checks for library functions.
70AC_FUNC_STRFTIME
Daniel Veillardb05deb71999-08-10 19:04:08 +000071AC_CHECK_FUNCS(strdup strndup strerror snprintf)
72AC_CHECK_FUNCS(finite isinf isnan isnand fp_class class fpclass finite)
73
74dnl Checks for isnan in libm if not in libc
75M_LIBS=
76if test "$ac_cv_func_isnan" != "yes"
77then
78AC_CHECK_LIB(m, isnan,
79 M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN))
80fi
81
82dnl Checks for isinf in libm if not in libc
83if test "$ac_cv_func_isinf" != "yes"
84then
85M2_LIBS=""
86AC_CHECK_LIB(m, isinf,
87 M2_LIBS="-lm"; AC_DEFINE(HAVE_ISINF))
88if test "$M2_LIBS" != ""
89then
90 M_LIBS="$M2_LIBS"
91fi
92fi
93
94XML_LIBDIR='-L${libdir}'
95XML_INCLUDEDIR='-I${includedir}/gnome-xml'
96XML_LIBS="-lxml $Z_LIBS $M_LIBS"
97
98AC_SUBST(XML_LIBDIR)
99AC_SUBST(XML_LIBS)
100AC_SUBST(XML_INCLUDEDIR)
101AC_SUBST(HTML_DIR)
102AC_SUBST(HAVE_ISNAN)
103AC_SUBST(HAVE_ISINF)
104
Daniel Veillard01791d51998-07-24 19:24:09 +0000105AC_SUBST(Z_LIBS)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000106AC_SUBST(M_LIBS)
Daniel Veillard3166ab11999-07-11 16:14:19 +0000107AC_OUTPUT(libxml.spec Makefile doc/Makefile example/Makefile xml-config)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000108