1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.2)
AC_INIT(entities.h)
AM_CONFIG_HEADER(config.h)
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=0
LIBXML_MICRO_VERSION=0
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
AC_SUBST(LIBXML_MAJOR_VERSION)
AC_SUBST(LIBXML_MINOR_VERSION)
AC_SUBST(LIBXML_MICRO_VERSION)
AC_SUBST(LIBXML_VERSION)
AC_SUBST(LIBXML_VERSION_INFO)
VERSION=${LIBXML_VERSION}beta
AM_INIT_AUTOMAKE(libxml2, $VERSION)
AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_CPP
AC_PATH_PROG(RM, rm, /bin/rm)
AC_PATH_PROG(MV, mv, /bin/mv)
AC_PATH_PROG(TAR, tar, /bin/tar)
AM_PROG_LIBTOOL
AM_MAINTAINER_MODE
dnl Checks for zlib library.
_cppflags="${CPPFLAGS}"
_ldflags="${LDFLAGS}"
AC_ARG_WITH(zlib,
[ --with-zlib[=DIR] use libz in DIR],[
if test "$withval" != "no"; then
Z_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
AC_CHECK_HEADERS(zlib.h,
AC_CHECK_LIB(z, gzread,[
AC_DEFINE(HAVE_LIBZ)
if test "x${Z_DIR}" != "x"; then
Z_CFLAGS="-I${Z_DIR}/include"
Z_LIBS="-L${Z_DIR}/lib -lz"
else
Z_LIBS="-lz"
fi]))
AC_SUBST(Z_CFLAGS)
AC_SUBST(Z_LIBS)
CPPFLAGS=${_cppflags}
LDFLAGS=${_ldflags}
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h ctype.h dirent.h errno.h malloc.h)
AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h)
AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h)
AC_CHECK_HEADERS(stdlib.h sys/socket.h netinet/in.h arpa/inet.h)
AC_CHECK_HEADERS(netdb.h sys/time.h sys/select.h)
dnl Specific dir for HTML output ?
if test "x$with_html_dir" = "x" ; then
HTML_DIR='${datadir}/gtk-doc/html'
else
HTML_DIR=$with_html_dir
fi
AC_SUBST(HTML_DIR)
AC_ARG_ENABLE(corba, [ --enable-corba Add Corba support (default)])
dnl
dnl Corba is enabled by default
dnl
if test "$enable_corba" = "no" ; then
CORBA_CFLAGS="-DWITHOUT_CORBA"
fi
AC_SUBST(CORBA_CFLAGS)
dnl Checks for library functions.
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(strdup strndup strerror snprintf)
AC_CHECK_FUNCS(finite isnand fp_class class fpclass)
AC_CHECK_FUNCS(strftime localtime)
dnl Checks for inet libraries:
AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect))
dnl Checks for isnan in libm if not in libc
AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
[M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)]))
AC_CHECK_FUNC(isinf, , AC_CHECK_LIB(m, isinf,
[M_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)]))
XML_LIBDIR='-L${libdir}'
XML_INCLUDEDIR='-I${includedir}/gnome-xml'
XML_LIBS="-lxml $Z_LIBS $M_LIBS $LIBS"
dnl
dnl Extra flags
dnl
XML_CFLAGS=""
dnl
dnl Workaround wor HP native compiler
dnl http://bugs.gnome.org/db/31/3163.html
dnl
if test "${CC}" != "gcc" ; then
case "${host}" in
*-*-hpux* )
CFLAGS="${CFLAGS} -Wp,-H16800 -Ae"
;;
esac
fi
dnl
dnl Use buffers for content
dnl
AC_ARG_WITH(buffers, [ --with-buffers Use buffers for node content])
if test "$with_buffers" = "yes" ; then
CFLAGS="${CFLAGS} -DXML_USE_BUFFER_CONTENT"
XML_CFLAGS="${XML_CFLAGS} -DXML_USE_BUFFER_CONTENT"
fi
dnl
dnl Tester makes use of readline if present
dnl
RDL_LIBS=""
AC_CHECK_LIB(history, append_history,
RDL_LIBS="-lhistory"; AC_DEFINE(HAVE_LIBHISTORY))
AC_CHECK_LIB(readline, readline,
RDL_LIBS="-lreadline ${RDL_LIBS}"; AC_DEFINE(HAVE_LIBREADLINE))
AC_SUBST(CFLAGS)
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBDIR)
AC_SUBST(XML_LIBS)
AC_SUBST(XML_INCLUDEDIR)
AC_SUBST(HTML_DIR)
AC_SUBST(HAVE_ISNAN)
AC_SUBST(HAVE_ISINF)
AC_SUBST(M_LIBS)
AC_SUBST(RDL_LIBS)
AC_OUTPUT(libxml.spec Makefile doc/Makefile example/Makefile xml-config win32config.h)
|