mas01mj@584
|
1 dnl -*- Mode: autoconf -*-
|
mas01mj@584
|
2 dnl
|
mas01mj@584
|
3 dnl configure.ac - top level autoconf file for Redland
|
mas01mj@584
|
4 dnl (Process this file with autoconf to produce a configure script.)
|
mas01mj@584
|
5 dnl
|
mas01mj@584
|
6 dnl Copyright (C) 2000-2009 David Beckett http://www.dajobe.org/
|
mas01mj@584
|
7 dnl Copyright (C) 2000-2005 University of Bristol, UK http://www.bristol.ac.uk/
|
mas01mj@584
|
8 dnl
|
mas01mj@584
|
9 dnl This package is Free Software and part of Redland http://librdf.org/
|
mas01mj@584
|
10 dnl
|
mas01mj@584
|
11 dnl It is licensed under the following three licenses as alternatives:
|
mas01mj@584
|
12 dnl 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
|
mas01mj@584
|
13 dnl 2. GNU General Public License (GPL) V2 or any newer version
|
mas01mj@584
|
14 dnl 3. Apache License, V2.0 or any newer version
|
mas01mj@584
|
15 dnl
|
mas01mj@584
|
16 dnl You may not use this file except in compliance with at least one of
|
mas01mj@584
|
17 dnl the above three licenses.
|
mas01mj@584
|
18 dnl
|
mas01mj@584
|
19 dnl See LICENSE.html or LICENSE.txt at the top of this package for the
|
mas01mj@584
|
20 dnl complete terms and further detail along with the license texts for
|
mas01mj@584
|
21 dnl the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively.
|
mas01mj@584
|
22 dnl
|
mas01mj@584
|
23 dnl
|
mas01mj@584
|
24
|
mas01mj@584
|
25
|
mas01mj@584
|
26 AC_INIT([Redland RDF Application Framework], 1.0.9, http://bugs.librdf.org/, redland)
|
mas01mj@584
|
27 AC_PREREQ(2.53)
|
mas01mj@584
|
28 dnl AC_CONFIG_SRCDIR(src/rdf_node.c)
|
mas01mj@584
|
29 AC_REVISION($Revision$)dnl
|
mas01mj@584
|
30
|
mas01mj@584
|
31 AM_INIT_AUTOMAKE([1.7 check-news std-options -Wobsolete -Wportability -Wsyntax -Wunsupported])
|
mas01mj@584
|
32 dnl AM_CONFIG_HEADER(src/rdf_config.h)
|
mas01mj@584
|
33 AM_MAINTAINER_MODE
|
mas01mj@584
|
34
|
mas01mj@584
|
35 AC_CANONICAL_HOST
|
mas01mj@584
|
36
|
mas01mj@584
|
37
|
mas01mj@584
|
38 changequote(<<, >>)dnl
|
mas01mj@584
|
39 version_major=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\1/'`
|
mas01mj@584
|
40 version_minor=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\2/'`
|
mas01mj@584
|
41 version_release=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\3/'`
|
mas01mj@584
|
42 changequote([, ])dnl
|
mas01mj@584
|
43
|
mas01mj@584
|
44 version_decimal=`expr $version_major \* 10000 + $version_minor \* 100 + $version_release`
|
mas01mj@584
|
45
|
mas01mj@584
|
46 AC_DEFINE_UNQUOTED(LIBRDF_VERSION_MAJOR, $version_major, [Major version number])
|
mas01mj@584
|
47 AC_DEFINE_UNQUOTED(LIBRDF_VERSION_MINOR, $version_minor, [Minor version number])
|
mas01mj@584
|
48 AC_DEFINE_UNQUOTED(LIBRDF_VERSION_RELEASE, $version_release, [Release version number])
|
mas01mj@584
|
49 AC_DEFINE_UNQUOTED(LIBRDF_VERSION_DECIMAL, $version_decimal, [Release version as a decimal])
|
mas01mj@584
|
50
|
mas01mj@584
|
51 # for redland-config.in
|
mas01mj@584
|
52 LIBRDF_VERSION_DECIMAL=$version_decimal
|
mas01mj@584
|
53 AC_SUBST(LIBRDF_VERSION_DECIMAL)
|
mas01mj@584
|
54
|
mas01mj@584
|
55
|
mas01mj@584
|
56 # Libtool versioning
|
mas01mj@584
|
57 #
|
mas01mj@584
|
58 # CURRENT
|
mas01mj@584
|
59 # The most recent interface number that this library implements.
|
mas01mj@584
|
60 #
|
mas01mj@584
|
61 # REVISION
|
mas01mj@584
|
62 # The implementation number of the CURRENT interface.
|
mas01mj@584
|
63 #
|
mas01mj@584
|
64 # AGE
|
mas01mj@584
|
65 # The difference between the newest and oldest interfaces that this
|
mas01mj@584
|
66 # library implements. In other words, the library implements all the
|
mas01mj@584
|
67 # interface numbers in the range from number `CURRENT - AGE' to
|
mas01mj@584
|
68 # `CURRENT'.
|
mas01mj@584
|
69 #
|
mas01mj@584
|
70 # Rules:
|
mas01mj@584
|
71 # 1. Start with version information of `0:0:0' for each libtool library.
|
mas01mj@584
|
72 #
|
mas01mj@584
|
73 # 2. Update the version information only immediately before a public
|
mas01mj@584
|
74 # release of your software. More frequent updates are unnecessary,
|
mas01mj@584
|
75 # and only guarantee that the current interface number gets larger
|
mas01mj@584
|
76 # faster.
|
mas01mj@584
|
77 #
|
mas01mj@584
|
78 # 3. If the library source code has changed at all since the last
|
mas01mj@584
|
79 # update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
|
mas01mj@584
|
80 #
|
mas01mj@584
|
81 # 4. If any interfaces have been added, removed, or changed since the
|
mas01mj@584
|
82 # last update, increment CURRENT, and set REVISION to 0.
|
mas01mj@584
|
83 #
|
mas01mj@584
|
84 # 5. If any interfaces have been added since the last public release,
|
mas01mj@584
|
85 # then increment AGE.
|
mas01mj@584
|
86 #
|
mas01mj@584
|
87 # 6. If any interfaces have been removed since the last public release,
|
mas01mj@584
|
88 # then set AGE to 0.
|
mas01mj@584
|
89 #
|
mas01mj@584
|
90 # syntax: CURRENT[:REVISION[:AGE]]
|
mas01mj@584
|
91 LIBRDF_LIBTOOL_VERSION=0:0:0
|
mas01mj@584
|
92 AC_SUBST(LIBRDF_LIBTOOL_VERSION)
|
mas01mj@584
|
93
|
mas01mj@584
|
94 dnl Checks for programs.
|
mas01mj@584
|
95 AM_SANITY_CHECK
|
mas01mj@584
|
96 AC_PROG_CC
|
mas01mj@584
|
97 AM_PROG_CC_C_O
|
mas01mj@584
|
98 AC_PROG_INSTALL
|
mas01mj@584
|
99 AC_PROG_LN_S
|
mas01mj@584
|
100 AC_PROG_MAKE_SET
|
mas01mj@584
|
101
|
mas01mj@584
|
102 m4_undefine([AC_PROG_CXX])
|
mas01mj@584
|
103 m4_defun([AC_PROG_CXX],[])
|
mas01mj@584
|
104 m4_undefine([AC_PROG_F77])
|
mas01mj@584
|
105 m4_defun([AC_PROG_F77],[])
|
mas01mj@584
|
106
|
mas01mj@584
|
107 # Libtool and LTDL initialising
|
mas01mj@584
|
108 LT_CONFIG_LTDL_DIR([libltdl])
|
mas01mj@584
|
109 LT_INIT([dlopen])
|
mas01mj@584
|
110 LTDL_INIT([convenience])
|
mas01mj@584
|
111
|
mas01mj@584
|
112 # Find a tar command for 'make dist'
|
mas01mj@584
|
113 AC_CHECK_PROGS(TAR, gnutar gtar tar)
|
mas01mj@584
|
114
|
mas01mj@584
|
115 AC_CHECK_PROGS(PERL, perl)
|
mas01mj@584
|
116 # Gnome
|
mas01mj@584
|
117 AC_CHECK_PROGS(PKG_CONFIG, pkg-config)
|
mas01mj@584
|
118
|
mas01mj@584
|
119
|
mas01mj@584
|
120 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
mas01mj@584
|
121 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
mas01mj@584
|
122 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
mas01mj@584
|
123 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
mas01mj@584
|
124
|
mas01mj@584
|
125
|
mas01mj@584
|
126 release_version=no
|
mas01mj@584
|
127 AC_ARG_ENABLE(release, [ --enable-release Turn on optimizations (for maintainer). ], \
|
mas01mj@584
|
128 if test "$enableval" = "yes"; then \
|
mas01mj@584
|
129 release_version=yes
|
mas01mj@584
|
130 fi;)
|
mas01mj@584
|
131
|
mas01mj@584
|
132 modular=yes
|
mas01mj@584
|
133 AC_ARG_ENABLE(modular, [ --disable-modular Build storage backends into librdf library. ], \
|
mas01mj@584
|
134 if test "$enableval" = "no"; then \
|
mas01mj@584
|
135 modular=no
|
mas01mj@584
|
136 fi;)
|
mas01mj@584
|
137
|
mas01mj@584
|
138 dnl compiler checks
|
mas01mj@584
|
139
|
mas01mj@584
|
140 AC_DEFUN([REDLAND_CC_TRY_FLAG], [
|
mas01mj@584
|
141 AC_MSG_CHECKING([whether $CC supports $1])
|
mas01mj@584
|
142 redland_save_CFLAGS="$CFLAGS"
|
mas01mj@584
|
143 CFLAGS="$CFLAGS $1"
|
mas01mj@584
|
144 AC_COMPILE_IFELSE([ ], [redland_cc_flag=yes], [redland_cc_flag=no])
|
mas01mj@584
|
145 CFLAGS="$redland_save_CFLAGS"
|
mas01mj@584
|
146 if test "X$redland_cc_flag" = "Xyes"; then
|
mas01mj@584
|
147 ifelse([$2], , :, [$2])
|
mas01mj@584
|
148 else
|
mas01mj@584
|
149 ifelse([$3], , :, [$3])
|
mas01mj@584
|
150 fi
|
mas01mj@584
|
151 AC_MSG_RESULT($redland_cc_flag)
|
mas01mj@584
|
152 ])
|
mas01mj@584
|
153
|
mas01mj@584
|
154 possible_warnings="-Wall -Wextra \
|
mas01mj@584
|
155 -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
mas01mj@584
|
156 -Wmissing-declarations -Wnested-externs -Wredundant-decls -Wswitch-enum \
|
mas01mj@584
|
157 -Wsign-compare -Werror-implicit-function-declaration -Wwrite-strings
|
mas01mj@584
|
158 -Wpacked -Wmissing-format-attribute -Wpointer-arith -Wcast-align -Winit-self \
|
mas01mj@584
|
159 -Wunsafe-loop-optimizations -Wdeclaration-after-statement \
|
mas01mj@584
|
160 -Wold-style-definition \
|
mas01mj@584
|
161 -Wno-missing-field-initializers -Wno-unused-parameter \
|
mas01mj@584
|
162 -Wformat-security"
|
mas01mj@584
|
163
|
mas01mj@584
|
164 warning_cflags=
|
mas01mj@584
|
165 if test "$USE_MAINTAINER_MODE" = yes; then
|
mas01mj@584
|
166 AC_MSG_CHECKING(for supported $CC warning flags)
|
mas01mj@584
|
167 AC_MSG_RESULT($warning_cflags)
|
mas01mj@584
|
168 for warning in $possible_warnings; do
|
mas01mj@584
|
169 REDLAND_CC_TRY_FLAG([$warning], [warning_cflags="$warning_cflags $warning"])
|
mas01mj@584
|
170 done
|
mas01mj@584
|
171 AC_MSG_CHECKING($CC supports warning flags)
|
mas01mj@584
|
172 AC_MSG_RESULT($warning_cflags)
|
mas01mj@584
|
173 fi
|
mas01mj@584
|
174
|
mas01mj@584
|
175 MAINTAINER_CFLAGS="$warning_cflags"
|
mas01mj@584
|
176
|
mas01mj@584
|
177
|
mas01mj@584
|
178 # Externally linked libraries - appear in redland-config
|
mas01mj@584
|
179 # -Dfoo -Idir
|
mas01mj@584
|
180 LIBRDF_CPPFLAGS=$CPPFLAGS
|
mas01mj@584
|
181 # -Ldir
|
mas01mj@584
|
182 LIBRDF_LDFLAGS=$LDFLAGS
|
mas01mj@584
|
183 # -llib
|
mas01mj@584
|
184 LIBRDF_LIBS=$LIBS
|
mas01mj@584
|
185
|
mas01mj@584
|
186 # Internally linked libraries - never given to users
|
mas01mj@584
|
187 # -Dfoo -Idir
|
mas01mj@584
|
188 LIBRDF_INTERNAL_CPPFLAGS=
|
mas01mj@584
|
189 # -Ldir -llib
|
mas01mj@584
|
190 LIBRDF_INTERNAL_LIBS=
|
mas01mj@584
|
191
|
mas01mj@584
|
192 # Libraries linked externally also may be internal - presently just
|
mas01mj@584
|
193 # raptor and rasqal but in future may include others
|
mas01mj@584
|
194 # Currently only substituted into redland-src-config.
|
mas01mj@584
|
195 # -Dfoo -Idir
|
mas01mj@584
|
196 LIBRDF_EXTERNAL_CPPFLAGS=
|
mas01mj@584
|
197 # -Ldir -llib
|
mas01mj@584
|
198 LIBRDF_EXTERNAL_LIBS=
|
mas01mj@584
|
199
|
mas01mj@584
|
200 # do these first because somehow they get messed up by bdb checks
|
mas01mj@584
|
201 AC_CHECK_TYPES([byte])
|
mas01mj@584
|
202 AC_CHECK_TYPES([u32])
|
mas01mj@584
|
203 AC_CHECK_TYPES([u64])
|
mas01mj@584
|
204
|
mas01mj@584
|
205 AC_CHECK_SIZEOF(unsigned char, 1)
|
mas01mj@584
|
206 AC_CHECK_SIZEOF(unsigned int, 4)
|
mas01mj@584
|
207 AC_CHECK_SIZEOF(unsigned long, 4)
|
mas01mj@584
|
208 AC_CHECK_SIZEOF(unsigned long long, 8)
|
mas01mj@584
|
209
|
mas01mj@584
|
210 dnl Location of the librdf source
|
mas01mj@584
|
211 AC_ARG_WITH(librdf, [ --with-librdf=DIR librdf (Redland) source folder], librdf_src_dir="$withval", librdf_src_dir="none")
|
mas01mj@584
|
212
|
mas01mj@584
|
213 if test "$librdf_src_dir" = "none" ; then
|
mas01mj@584
|
214 AC_MSG_ERROR(Please supply your librdf source folder (e.g. /home/bob/librdf/src))
|
mas01mj@584
|
215 fi
|
mas01mj@584
|
216
|
mas01mj@584
|
217 LIBRDF_SRC_DIR=$librdf_src_dir
|
mas01mj@584
|
218 AC_SUBST(LIBRDF_SRC_DIR)
|
mas01mj@584
|
219
|
mas01mj@584
|
220 dnl Checks for libraries.
|
mas01mj@584
|
221
|
mas01mj@584
|
222
|
mas01mj@584
|
223 dnl Berkeley DB
|
mas01mj@584
|
224 AC_ARG_WITH(bdb, [ --with-bdb=DIR Berkeley DB install area (default=/usr)], bdb_prefix="$withval", bdb_prefix="none")
|
mas01mj@584
|
225 AC_ARG_WITH(bdb_lib, [ --with-bdb-lib=DIR Berkeley DB lib directory (default=/usr/lib)], bdb_lib_dir="$withval", bdb_lib_dir="none")
|
mas01mj@584
|
226 AC_ARG_WITH(bdb_include, [ --with-bdb-include=DIR Berkeley DB include directory (default=/usr/include)], bdb_include_dir="$withval", bdb_include_dir="none")
|
mas01mj@584
|
227 AC_ARG_WITH(bdb_dbname, [ --with-bdb-dbname=NAME Berkeley DB library name (auto)], bdb_dbname="$withval", bdb_dbname="none")
|
mas01mj@584
|
228
|
mas01mj@584
|
229 bdb_version=unknown
|
mas01mj@584
|
230 bdb_available=Missing
|
mas01mj@584
|
231
|
mas01mj@584
|
232 if test "x$bdb_prefix" != "xno" ; then
|
mas01mj@584
|
233
|
mas01mj@584
|
234 if test "x$bdb_prefix" = "xyes" ; then
|
mas01mj@584
|
235 bdb_prefix="none"
|
mas01mj@584
|
236 fi
|
mas01mj@584
|
237
|
mas01mj@584
|
238 # Only prefix given - set lib and include
|
mas01mj@584
|
239 if test "X$bdb_prefix" != "Xnone" -a "X$bdb_lib_dir" = "Xnone" -a "X$bdb_include_dir" = "Xnone" ; then
|
mas01mj@584
|
240 bdb_lib_dir="$bdb_prefix/lib"
|
mas01mj@584
|
241 bdb_include_dir="$bdb_prefix/include"
|
mas01mj@584
|
242 fi
|
mas01mj@584
|
243
|
mas01mj@584
|
244 # Nothing given - search
|
mas01mj@584
|
245 if test "X$bdb_prefix" = "Xnone" -a "X$bdb_lib_dir" = "Xnone" -a "X$bdb_include_dir" = "Xnone" -a "X$bdb_dbname" = "Xnone" ; then
|
mas01mj@584
|
246 bdb_prefix="/usr"
|
mas01mj@584
|
247 bdb_lib_dir="/usr/lib"
|
mas01mj@584
|
248 bdb_include_dir="/usr/include"
|
mas01mj@584
|
249
|
mas01mj@584
|
250 extraprefix=
|
mas01mj@584
|
251 # OSX fink area added if found and /sw/bin is in the PATH
|
mas01mj@584
|
252 if test -d /sw/include -a -d /sw/lib ; then
|
mas01mj@584
|
253 if echo $PATH |grep /sw/bin >/dev/null; then
|
mas01mj@584
|
254 extraprefix=/sw
|
mas01mj@584
|
255 fi
|
mas01mj@584
|
256 fi
|
mas01mj@584
|
257
|
mas01mj@584
|
258 # Sigh! And this still might not be good enough.
|
mas01mj@584
|
259 for bdbc_version in 4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.0 4 3.3 3.2 3.1 3 2; do
|
mas01mj@584
|
260 bdbc_major=`echo $bdbc_version | sed -e 's/^\(.\).*$/\1/'`;
|
mas01mj@584
|
261 bdbc_version2=`echo $bdbc_version | sed -e 's/^\(.\).\(.\)$/\1\2/'`
|
mas01mj@584
|
262
|
mas01mj@584
|
263 for bdbc_prefix in $extraprefix /usr/local/BerkeleyDB.$bdbc_version /usr/local /opt/local /usr; do
|
mas01mj@584
|
264 bdbc_libdir=$bdbc_prefix/lib
|
mas01mj@584
|
265
|
mas01mj@584
|
266 for bdbc_incdir in $bdbc_prefix/include/db$bdbc_version $bdbc_prefix/include/db$bdbc_version2 $bdbc_prefix/include/db$bdbc_major $bdbc_prefix/include ; do
|
mas01mj@584
|
267 if test -r $bdbc_incdir/db.h ; then
|
mas01mj@584
|
268 header_bdbc_version=`sed -ne 's/^.*DB_VERSION_STRING.*Berkeley DB \(...\).*/\1/p' $bdbc_incdir/db.h`
|
mas01mj@584
|
269 if test "X$header_bdbc_version" = "X$bdbc_version" ; then
|
mas01mj@584
|
270 for bdbc_name in db-$bdbc_version db$bdbc_version db-$bdbc_version2 db$bdbc_version2; do
|
mas01mj@584
|
271 for bdbc_libdir2 in $bdbc_libdir $bdbc_libdir/db$bdbc_version $bdbc_libdir/db$bdbc_version2; do
|
mas01mj@584
|
272 if test -r $bdbc_libdir2/lib$bdbc_name.a -o -r $bdbc_libdir2/lib$bdbc_name.so -o -r $bdbc_libdir2/lib$bdbc_name.dylib; then
|
mas01mj@584
|
273 bdb_version=$bdbc_version
|
mas01mj@584
|
274 bdb_prefix=$bdbc_prefix
|
mas01mj@584
|
275 bdb_include_dir=$bdbc_incdir
|
mas01mj@584
|
276 bdb_lib_dir=$bdbc_libdir2
|
mas01mj@584
|
277 bdb_dbname=$bdbc_name
|
mas01mj@584
|
278 break 5
|
mas01mj@584
|
279 fi
|
mas01mj@584
|
280 done
|
mas01mj@584
|
281 done
|
mas01mj@584
|
282 fi
|
mas01mj@584
|
283 fi
|
mas01mj@584
|
284
|
mas01mj@584
|
285 done
|
mas01mj@584
|
286 done
|
mas01mj@584
|
287 done
|
mas01mj@584
|
288
|
mas01mj@584
|
289 fi
|
mas01mj@584
|
290
|
mas01mj@584
|
291 AC_MSG_CHECKING(BDB version)
|
mas01mj@584
|
292 AC_MSG_RESULT($bdb_version)
|
mas01mj@584
|
293 AC_MSG_CHECKING(location of BDB libs)
|
mas01mj@584
|
294 AC_MSG_RESULT($bdb_lib_dir)
|
mas01mj@584
|
295 AC_MSG_CHECKING(location of BDB includes)
|
mas01mj@584
|
296 AC_MSG_RESULT($bdb_include_dir)
|
mas01mj@584
|
297
|
mas01mj@584
|
298 if test "$bdb_prefix" != no; then
|
mas01mj@584
|
299 nLDFLAGS=$LDFLAGS
|
mas01mj@584
|
300 nCPPFLAGS=
|
mas01mj@584
|
301
|
mas01mj@584
|
302 if test "$bdb_lib_dir" != /usr/lib; then
|
mas01mj@584
|
303 nLDFLAGS="-L$bdb_lib_dir";
|
mas01mj@584
|
304 fi
|
mas01mj@584
|
305
|
mas01mj@584
|
306 if test "$bdb_dbname" = none; then
|
mas01mj@584
|
307 # Yuck, yuck, yuck - can't they create a bdb-config program like GNOME?
|
mas01mj@584
|
308 bdb_dbname=`cd $bdb_lib_dir; ls -1 libdb*.a 2>/dev/null |sed -e 's/^lib//' -e 's/\.a$//' | head -1`
|
mas01mj@584
|
309 if test "X$bdb_dbname" = X; then
|
mas01mj@584
|
310 AC_MSG_WARN(Cannot find the BDB library name from the files in $bdb_lib_dir)
|
mas01mj@584
|
311 AC_MSG_WARN(Assuming it is 'db' and will link like -ldb)
|
mas01mj@584
|
312 AC_MSG_WARN(Use --with-bdb-dbname=NAME if this is wrong)
|
mas01mj@584
|
313 bdb_dbname=db
|
mas01mj@584
|
314 fi
|
mas01mj@584
|
315 fi
|
mas01mj@584
|
316
|
mas01mj@584
|
317 AC_MSG_CHECKING(name of BDB library)
|
mas01mj@584
|
318 AC_MSG_RESULT($bdb_dbname)
|
mas01mj@584
|
319
|
mas01mj@584
|
320 if test "$bdb_include_dir" != /usr/include; then
|
mas01mj@584
|
321 nCPPFLAGS="-I$bdb_include_dir";
|
mas01mj@584
|
322 fi
|
mas01mj@584
|
323
|
mas01mj@584
|
324 LDFLAGS="$nLDFLAGS $LDFLAGS"
|
mas01mj@584
|
325 CPPFLAGS="$nCPPFLAGS $CPPFLAGS"
|
mas01mj@584
|
326 LIBS="-l$bdb_dbname $LIBS"
|
mas01mj@584
|
327
|
mas01mj@584
|
328 AC_CHECK_HEADERS(db.h)
|
mas01mj@584
|
329 if test "$ac_cv_header_db_h" = yes ; then
|
mas01mj@584
|
330 have_libdb=no
|
mas01mj@584
|
331
|
mas01mj@584
|
332 AC_MSG_CHECKING(for BDB V1 dbopen)
|
mas01mj@584
|
333 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
334 #include <db.h>], [dbopen(NULL, 0, 0, DB_BTREE, NULL);],
|
mas01mj@584
|
335 AC_DEFINE(HAVE_DBOPEN, 1, [BDB has dbopen method])
|
mas01mj@584
|
336 if test $have_libdb = no; then
|
mas01mj@584
|
337 bdb_available="Version 1.x - not supported"
|
mas01mj@584
|
338 have_libdb=no
|
mas01mj@584
|
339 fi
|
mas01mj@584
|
340 AC_MSG_RESULT(yes),
|
mas01mj@584
|
341 AC_MSG_RESULT(no))
|
mas01mj@584
|
342
|
mas01mj@584
|
343 AC_MSG_CHECKING(for BDB V2 db_open)
|
mas01mj@584
|
344 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
345 #include <db.h>], [db_open(NULL, DB_BTREE, 0, 0, NULL, NULL, NULL);],
|
mas01mj@584
|
346 AC_DEFINE(HAVE_DB_OPEN, 1, [BDB has db_open method])
|
mas01mj@584
|
347 have_libdb=yes
|
mas01mj@584
|
348 AC_MSG_RESULT(yes),
|
mas01mj@584
|
349 AC_MSG_RESULT(no))
|
mas01mj@584
|
350
|
mas01mj@584
|
351 AC_MSG_CHECKING(for BDB V3/V4.x db_create)
|
mas01mj@584
|
352 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
353 #include <db.h>], [db_create(NULL, NULL, 0);],
|
mas01mj@584
|
354 AC_DEFINE(HAVE_DB_CREATE, 1, [BDB has db_create method])
|
mas01mj@584
|
355 have_libdb=yes
|
mas01mj@584
|
356 AC_MSG_RESULT(yes),
|
mas01mj@584
|
357 AC_MSG_RESULT(no))
|
mas01mj@584
|
358
|
mas01mj@584
|
359 AC_MSG_CHECKING(for BDB V4.0 DB->open with 6 arguments)
|
mas01mj@584
|
360 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
361 #include <db.h>], [DB *bdb; bdb->open(bdb, NULL, NULL, DB_BTREE, 0, 0);],
|
mas01mj@584
|
362 AC_DEFINE(HAVE_BDB_OPEN_6_ARGS, 1, [BDB has open method with 6 args])
|
mas01mj@584
|
363 have_libdb=yes
|
mas01mj@584
|
364 AC_MSG_RESULT(yes),
|
mas01mj@584
|
365 AC_MSG_RESULT(no))
|
mas01mj@584
|
366
|
mas01mj@584
|
367 AC_MSG_CHECKING(for BDB DB->close with 2 arguments)
|
mas01mj@584
|
368 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
369 #include <db.h>], [DB *bdb; bdb->close(bdb, 0);],
|
mas01mj@584
|
370 AC_DEFINE(HAVE_BDB_CLOSE_2_ARGS, 1, [BDB has close method with 2 args])
|
mas01mj@584
|
371 AC_MSG_RESULT(yes),
|
mas01mj@584
|
372 AC_MSG_RESULT(no))
|
mas01mj@584
|
373
|
mas01mj@584
|
374 AC_MSG_CHECKING(for BDB DB->fd with 2 arguments)
|
mas01mj@584
|
375 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
376 #include <db.h>], [DB *bdb; bdb->fd(bdb, 0);],
|
mas01mj@584
|
377 AC_DEFINE(HAVE_BDB_FD_2_ARGS, 1, [BDB has fd method with 2 args])
|
mas01mj@584
|
378 AC_MSG_RESULT(yes),
|
mas01mj@584
|
379 AC_MSG_RESULT(no))
|
mas01mj@584
|
380
|
mas01mj@584
|
381 AC_MSG_CHECKING(for BDB DB->set_flags)
|
mas01mj@584
|
382 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
383 #include <db.h>], [DB *bdb; bdb->set_flags(bdb, 0);],
|
mas01mj@584
|
384 AC_DEFINE(HAVE_BDB_SET_FLAGS, 1, [BDB has set_flags method])
|
mas01mj@584
|
385 AC_MSG_RESULT(yes),
|
mas01mj@584
|
386 AC_MSG_RESULT(no))
|
mas01mj@584
|
387
|
mas01mj@584
|
388 AC_MSG_CHECKING(for BDB V4.1+ DB->open with 7 arguments)
|
mas01mj@584
|
389 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
390 #include <db.h>], [DB *bdb; bdb->open(bdb, NULL, NULL, NULL, DB_BTREE, 0, 0);],
|
mas01mj@584
|
391 AC_DEFINE(HAVE_BDB_OPEN_7_ARGS, 1, [BDB has open method with 7 args])
|
mas01mj@584
|
392 have_libdb=yes
|
mas01mj@584
|
393 AC_MSG_RESULT(yes),
|
mas01mj@584
|
394 AC_MSG_RESULT(no))
|
mas01mj@584
|
395
|
mas01mj@584
|
396 AC_MSG_CHECKING(whether DB_TXN defined in db.h)
|
mas01mj@584
|
397 dnl In BDB, DB_TXN is a pointer to a structure never defined
|
mas01mj@584
|
398 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
399 #include <db.h>], [DB_TXN* ptr=(DB_TXN*)NULL],
|
mas01mj@584
|
400 AC_DEFINE(HAVE_BDB_DB_TXN, 1, [BDB defines DB_TXN])
|
mas01mj@584
|
401 AC_MSG_RESULT(yes),
|
mas01mj@584
|
402 AC_MSG_RESULT(no))
|
mas01mj@584
|
403 AC_MSG_CHECKING(whether DBC defined in db.h)
|
mas01mj@584
|
404 AC_TRY_LINK([#include <db.h>], [size_t len=sizeof(DBC)],
|
mas01mj@584
|
405 AC_DEFINE(HAVE_BDB_CURSOR, 1, [BDB defines DBC])
|
mas01mj@584
|
406 AC_MSG_RESULT(yes),
|
mas01mj@584
|
407 AC_MSG_RESULT(no))
|
mas01mj@584
|
408 AC_MSG_CHECKING(number of arguments to db_cursor)
|
mas01mj@584
|
409 AC_TRY_LINK([#include <stdio.h>
|
mas01mj@584
|
410 #include <db.h>], [DB* db; db->cursor(db, NULL, NULL, 0);],
|
mas01mj@584
|
411 AC_DEFINE(HAVE_BDB_CURSOR_4_ARGS, 1, [BDB cursor method has 4 arguments])
|
mas01mj@584
|
412 AC_MSG_RESULT(4),
|
mas01mj@584
|
413 AC_MSG_RESULT(3))
|
mas01mj@584
|
414 fi
|
mas01mj@584
|
415
|
mas01mj@584
|
416 if test "$have_libdb" = yes; then
|
mas01mj@584
|
417 bdb_available="Version $bdb_version (library $bdb_dbname in $bdb_lib_dir)"
|
mas01mj@584
|
418 LIBRDF_LIBS="$LIBRDF_LIBS $nLDFLAGS -l$bdb_dbname"
|
mas01mj@584
|
419 LIBRDF_CPPFLAGS="$LIBRDF_CPPFLAGS $nCPPFLAGS"
|
mas01mj@584
|
420 fi
|
mas01mj@584
|
421
|
mas01mj@584
|
422 fi
|
mas01mj@584
|
423
|
mas01mj@584
|
424 fi
|
mas01mj@584
|
425
|
mas01mj@584
|
426 CPPFLAGS="$LIBRDF_CPPFLAGS"
|
mas01mj@584
|
427 LDFLAGS="$LIBRDF_LDFLAGS"
|
mas01mj@584
|
428 LIBS="$LIBRDF_LIBS"
|
mas01mj@584
|
429
|
mas01mj@584
|
430
|
mas01mj@584
|
431 dnl Checks for header files.
|
mas01mj@584
|
432 AC_HEADER_STDC
|
mas01mj@584
|
433 AC_CHECK_HEADERS(errno.h stdlib.h unistd.h string.h fcntl.h dmalloc.h time.h sys/time.h sys/stat.h getopt.h)
|
mas01mj@584
|
434 AC_HEADER_TIME
|
mas01mj@584
|
435
|
mas01mj@584
|
436 dnl Checks for typedefs, structures, and compiler characteristics.
|
mas01mj@584
|
437 AC_C_CONST
|
mas01mj@584
|
438 AC_C_BIGENDIAN
|
mas01mj@584
|
439
|
mas01mj@584
|
440 dnl Checks for library functions.
|
mas01mj@584
|
441 AC_CHECK_FUNCS(getopt getopt_long memcmp mkstemp mktemp tmpnam gettimeofday getenv)
|
mas01mj@584
|
442
|
mas01mj@584
|
443 AM_CONDITIONAL(MEMCMP, test $ac_cv_func_memcmp = no)
|
mas01mj@584
|
444 AM_CONDITIONAL(GETOPT, test $ac_cv_func_getopt = no -a $ac_cv_func_getopt_long = no)
|
mas01mj@584
|
445
|
mas01mj@584
|
446 dnl Checks for URI resolvers
|
mas01mj@584
|
447
|
mas01mj@584
|
448 CPPFLAGS="$LIBRDF_CPPFLAGS"
|
mas01mj@584
|
449 LDFLAGS="$LIBRDF_LDFLAGS"
|
mas01mj@584
|
450 LIBS="$LIBRDF_LIBS"
|
mas01mj@584
|
451
|
mas01mj@584
|
452
|
mas01mj@584
|
453 dnl Checks for XML parsers
|
mas01mj@584
|
454
|
mas01mj@584
|
455 # At present this is for passing on to raptor and not used here
|
mas01mj@584
|
456 AC_ARG_WITH(xml-parser, [ --with-xml-parser=NAME Use XML parser - expat, libxml (default=libxml)], xml_parser="$withval", xml_parser="libxml")
|
mas01mj@584
|
457
|
mas01mj@584
|
458
|
mas01mj@584
|
459
|
mas01mj@584
|
460
|
mas01mj@584
|
461 dnl Checks for RDF parsers
|
mas01mj@584
|
462 parser_modules=raptor
|
mas01mj@584
|
463 rdf_parsers_available=
|
mas01mj@584
|
464
|
mas01mj@584
|
465 # Check for raptor
|
mas01mj@584
|
466 AC_MSG_CHECKING(for raptor)
|
mas01mj@584
|
467
|
mas01mj@584
|
468 RAPTOR_MIN_VERSION=1.4.17
|
mas01mj@584
|
469 AC_SUBST(RAPTOR_MIN_VERSION)
|
mas01mj@584
|
470 if $PKG_CONFIG raptor --exists; then
|
mas01mj@584
|
471 :
|
mas01mj@584
|
472 else
|
mas01mj@584
|
473 AC_MSG_ERROR(Raptor is not installed - see http://librdf.org/raptor/ to get a version newer than $RAPTOR_MIN_VERSION)
|
mas01mj@584
|
474 fi
|
mas01mj@584
|
475
|
mas01mj@584
|
476 RAPTOR_VERSION=`$PKG_CONFIG raptor --modversion 2>/dev/null`
|
mas01mj@584
|
477
|
mas01mj@584
|
478 if $PKG_CONFIG raptor --atleast-version=$RAPTOR_MIN_VERSION; then
|
mas01mj@584
|
479 :
|
mas01mj@584
|
480 else
|
mas01mj@584
|
481 AC_MSG_ERROR(Installed raptor $RAPTOR_VERSION is too old - need $RAPTOR_MIN_VERSION)
|
mas01mj@584
|
482 fi
|
mas01mj@584
|
483
|
mas01mj@584
|
484 LIBRDF_EXTERNAL_CPPFLAGS="`$PKG_CONFIG raptor --cflags` $LIBRDF_EXTERNAL_CPPFLAGS"
|
mas01mj@584
|
485 LIBRDF_EXTERNAL_LIBS="`$PKG_CONFIG raptor --libs` $LIBRDF_EXTERNAL_LIBS"
|
mas01mj@584
|
486
|
mas01mj@584
|
487 rdf_parsers_available="$parser_available raptor(system $RAPTOR_VERSION)"
|
mas01mj@584
|
488 AC_MSG_RESULT(system $RAPTOR_VERSION)
|
mas01mj@584
|
489
|
mas01mj@584
|
490 # Check for rasqal
|
mas01mj@584
|
491 AC_MSG_CHECKING(for rasqal)
|
mas01mj@584
|
492
|
mas01mj@584
|
493 RASQAL_MIN_VERSION=0.9.16
|
mas01mj@584
|
494 RASQAL_MAX_VERSION=0.9.99
|
mas01mj@584
|
495 AC_SUBST(RASQAL_MIN_VERSION)
|
mas01mj@584
|
496 AC_SUBST(RASQAL_MAX_VERSION)
|
mas01mj@584
|
497 if $PKG_CONFIG rasqal --exists; then
|
mas01mj@584
|
498 :
|
mas01mj@584
|
499 else
|
mas01mj@584
|
500 AC_MSG_ERROR(Rasqal is not installed - see http://librdf.org/rasqal/ to get a version in range $RASQAL_MIN_VERSION to $RASQAL_MAX_VERSION)
|
mas01mj@584
|
501 fi
|
mas01mj@584
|
502
|
mas01mj@584
|
503 RASQAL_VERSION=`$PKG_CONFIG rasqal --modversion 2>/dev/null`
|
mas01mj@584
|
504
|
mas01mj@584
|
505 if $PKG_CONFIG rasqal --atleast-version=$RASQAL_MIN_VERSION --max-version=$RASQAL_MAX_VERSION; then
|
mas01mj@584
|
506 :
|
mas01mj@584
|
507 else
|
mas01mj@584
|
508 AC_MSG_ERROR(Installed rasqal $RASQAL_VERSION is not in range $RASQAL_MIN_VERSION to $RASQAL_MAX_VERSION)
|
mas01mj@584
|
509 fi
|
mas01mj@584
|
510
|
mas01mj@584
|
511 LIBRDF_EXTERNAL_CPPFLAGS="`$PKG_CONFIG rasqal --cflags` $LIBRDF_EXTERNAL_CPPFLAGS"
|
mas01mj@584
|
512 LIBRDF_EXTERNAL_LIBS="`$PKG_CONFIG rasqal --libs` $LIBRDF_EXTERNAL_LIBS"
|
mas01mj@584
|
513
|
mas01mj@584
|
514 rdf_query="rasqal(system $RASQAL_VERSION)"
|
mas01mj@584
|
515 AC_MSG_RESULT(system $RASQAL_VERSION)
|
mas01mj@584
|
516
|
mas01mj@584
|
517
|
mas01mj@584
|
518 dnl Checks for modules
|
mas01mj@584
|
519 digest_modules="md5 sha1 ripemd160"
|
mas01mj@584
|
520
|
mas01mj@584
|
521 AC_MSG_CHECKING(digests wanted)
|
mas01mj@584
|
522 AC_ARG_ENABLE(digests, [ --enable-digests=LIST Use digests (default=md5 sha1 ripemd160)], digest_modules="$enableval")
|
mas01mj@584
|
523 AC_MSG_RESULT($digest_modules)
|
mas01mj@584
|
524
|
mas01mj@584
|
525 DIGEST_OBJS=
|
mas01mj@584
|
526 DIGEST_SRCS=
|
mas01mj@584
|
527
|
mas01mj@584
|
528 AC_ARG_WITH(openssl-digests, [ --with-openssl-digests Use openssl digests (default=yes)], enable_openssl_digests="no", enable_openssl_digests="no")
|
mas01mj@584
|
529
|
mas01mj@584
|
530 digest_modules_available=
|
mas01mj@584
|
531
|
mas01mj@584
|
532
|
mas01mj@584
|
533 dnl hashes
|
mas01mj@584
|
534 HASH_OBJS=
|
mas01mj@584
|
535 HASH_SRCS=
|
mas01mj@584
|
536
|
mas01mj@584
|
537 AC_MSG_CHECKING(for bdb hash support)
|
mas01mj@584
|
538 if test "$have_libdb" = yes; then
|
mas01mj@584
|
539 AC_MSG_RESULT(yes)
|
mas01mj@584
|
540 AC_DEFINE(HAVE_BDB_HASH, 1, [Have BDB hash support])
|
mas01mj@584
|
541 HASH_OBJS="$HASH_OBJS rdf_hash_bdb.lo"
|
mas01mj@584
|
542 HASH_SRCS="$HASH_SRCS rdf_hash_bdb.c"
|
mas01mj@584
|
543 else
|
mas01mj@584
|
544 AC_MSG_RESULT(no)
|
mas01mj@584
|
545 fi
|
mas01mj@584
|
546
|
mas01mj@584
|
547
|
mas01mj@584
|
548 AC_SUBST(HASH_OBJS)
|
mas01mj@584
|
549 AC_SUBST(HASH_SRCS)
|
mas01mj@584
|
550
|
mas01mj@584
|
551
|
mas01mj@584
|
552 dnl Storages
|
mas01mj@584
|
553 persistent_storages="/file/tstore/mysql/sqlite/"
|
mas01mj@584
|
554 persistent_store=no
|
mas01mj@584
|
555 all_storages="audiodb memory file hashes trees mysql sqlite tstore postgresql"
|
mas01mj@584
|
556 always_available_storages="audiodb memory file hashes trees"
|
mas01mj@584
|
557
|
mas01mj@584
|
558 dnl default availabilities and enablements
|
mas01mj@584
|
559 for storage in $all_storages; do
|
mas01mj@584
|
560 eval $storage'_storage_available=no'
|
mas01mj@584
|
561 eval $storage'_storage=no'
|
mas01mj@584
|
562 done
|
mas01mj@584
|
563 for storage in $always_available_storages; do
|
mas01mj@584
|
564 eval $storage'_storage_available=yes'
|
mas01mj@584
|
565 eval $storage'_storage=yes'
|
mas01mj@584
|
566 done
|
mas01mj@584
|
567
|
mas01mj@584
|
568
|
mas01mj@584
|
569 storages_available="audiodb memory file hashes(memory) trees"
|
mas01mj@584
|
570 if test "$have_libdb" = yes; then
|
mas01mj@584
|
571 storages_available="$storages_available hashes(bdb $bdb_version)"
|
mas01mj@584
|
572 fi
|
mas01mj@584
|
573
|
mas01mj@584
|
574 AC_ARG_WITH(threestore, [ --with-threestore(=CONFIG|yes|no) Location of 3store-config (default=auto)], tstore_config="$withval", tstore_config="")
|
mas01mj@584
|
575 if test "X$tstore_config" != "Xno"; then
|
mas01mj@584
|
576 if test "X$tstore_config" != "Xyes" ; then
|
mas01mj@584
|
577 TSTORE_CONFIG=$tstore_config
|
mas01mj@584
|
578 fi
|
mas01mj@584
|
579 tstore_config=yes
|
mas01mj@584
|
580 fi
|
mas01mj@584
|
581 if test $tstore_config = yes -a "X$TSTORE_CONFIG" = "X" ; then
|
mas01mj@584
|
582 AC_CHECK_PROGS(TSTORE_CONFIG, 3store-config)
|
mas01mj@584
|
583 fi
|
mas01mj@584
|
584
|
mas01mj@584
|
585 AC_MSG_CHECKING(for 3store library)
|
mas01mj@584
|
586 if test "X$TSTORE_CONFIG" != X -a "X$PKG_CONFIG" != X ; then
|
mas01mj@584
|
587 tstore_version=`$TSTORE_CONFIG --version`
|
mas01mj@584
|
588
|
mas01mj@584
|
589 storages_available="$storages_available 3store($tstore_version)"
|
mas01mj@584
|
590 tstore_storage_available=yes
|
mas01mj@584
|
591
|
mas01mj@584
|
592 AC_MSG_RESULT(yes - version $tstore_version)
|
mas01mj@584
|
593 else
|
mas01mj@584
|
594 AC_MSG_RESULT(no)
|
mas01mj@584
|
595 fi
|
mas01mj@584
|
596
|
mas01mj@584
|
597
|
mas01mj@584
|
598 AC_ARG_WITH(mysql, [ --with-mysql(=CONFIG|yes|no) Location of MySQL 3/4 mysql_config (default=auto)], mysql_config="$withval", mysql_config="")
|
mas01mj@584
|
599 if test "X$mysql_config" != "Xno"; then
|
mas01mj@584
|
600 if test "X$mysql_config" != "Xyes" ; then
|
mas01mj@584
|
601 MYSQL_CONFIG=$mysql_config
|
mas01mj@584
|
602 fi
|
mas01mj@584
|
603 mysql_config=yes
|
mas01mj@584
|
604 fi
|
mas01mj@584
|
605 if test $mysql_config = yes -a "X$MYSQL_CONFIG" = "X" ; then
|
mas01mj@584
|
606 AC_CHECK_PROGS(MYSQL_CONFIG, mysql_config)
|
mas01mj@584
|
607 fi
|
mas01mj@584
|
608
|
mas01mj@584
|
609 libmysql_min_version=3.23.56
|
mas01mj@584
|
610 # Also tested on 4.0.14
|
mas01mj@584
|
611
|
mas01mj@584
|
612 mysql_cflags=
|
mas01mj@584
|
613 mysql_libs=
|
mas01mj@584
|
614 if test "X$MYSQL_CONFIG" != X; then
|
mas01mj@584
|
615 dnl need to change quotes to allow square brackets
|
mas01mj@584
|
616 changequote(<<, >>)dnl
|
mas01mj@584
|
617 mysql_libs=`$MYSQL_CONFIG --libs | sed -e "s/'//g"`
|
mas01mj@584
|
618 # Stop the MySQL config program adding -Os or -O<n> options to CFLAGS
|
mas01mj@584
|
619 mysql_cflags=`$MYSQL_CONFIG --cflags | sed -e "s/'//g" -e "s/[ \t]-O[A-Za-z0-9]*/ /" `
|
mas01mj@584
|
620 changequote([, ])dnl
|
mas01mj@584
|
621
|
mas01mj@584
|
622 LIBS="$LIBRDF_LIBS $mysql_libs"
|
mas01mj@584
|
623 CPPFLAGS="$LIBRDF_CPPFLAGS $mysql_cflags"
|
mas01mj@584
|
624 AC_MSG_CHECKING(for mysql library)
|
mas01mj@584
|
625 LIBMYSQL_VERSION=`$MYSQL_CONFIG --version`
|
mas01mj@584
|
626 libmysql_version_dec=`echo $LIBMYSQL_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
|
mas01mj@584
|
627 libmysql_min_version_dec=`echo $libmysql_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
|
mas01mj@584
|
628 AC_MSG_RESULT(yes - version $LIBMYSQL_VERSION)
|
mas01mj@584
|
629 if test $libmysql_version_dec -lt $libmysql_min_version_dec; then
|
mas01mj@584
|
630 AC_MSG_WARN(Using libmysql $LIBMYSQL_VERSION is unsupported - $libmysql_min_version or newer recommended.)
|
mas01mj@584
|
631 else
|
mas01mj@584
|
632 storages_available="$storages_available mysql($LIBMYSQL_VERSION)"
|
mas01mj@584
|
633 mysql_storage_available=yes
|
mas01mj@584
|
634 fi
|
mas01mj@584
|
635
|
mas01mj@584
|
636 AC_MSG_CHECKING(whether MYSQL_OPT_RECONNECT is declared)
|
mas01mj@584
|
637 AC_COMPILE_IFELSE([#include <mysql.h>
|
mas01mj@584
|
638 int x=MYSQL_OPT_RECONNECT;],
|
mas01mj@584
|
639 AC_DEFINE(HAVE_MYSQL_OPT_RECONNECT, 1, [have MYSQL_OPT_RECONNECT declared])
|
mas01mj@584
|
640 AC_MSG_RESULT(yes),
|
mas01mj@584
|
641 AC_MSG_RESULT(no))
|
mas01mj@584
|
642
|
mas01mj@584
|
643
|
mas01mj@584
|
644 LIBS="$LIBRDF_LIBS"
|
mas01mj@584
|
645 CPPFLAGS="$LIBRDF_CPPFLAGS"
|
mas01mj@584
|
646 fi
|
mas01mj@584
|
647
|
mas01mj@584
|
648
|
mas01mj@584
|
649
|
mas01mj@584
|
650 AC_ARG_WITH(sqlite, [ --with-sqlite(=yes|no|2|3) Enable SQLite store with version (default=auto)], sqlite_api_version="$withval", sqlite_api_version="auto")
|
mas01mj@584
|
651 AC_ARG_WITH(sqlite-version, [ --with-sqlite-version(=yes|no|2|3) SQLite version to use (default=auto)], sqlite_api_version="$withval")
|
mas01mj@584
|
652 if test "x$sqlite_api_version" = "xyes" ; then
|
mas01mj@584
|
653 sqlite_api_version="auto"
|
mas01mj@584
|
654 fi
|
mas01mj@584
|
655
|
mas01mj@584
|
656 AC_MSG_CHECKING(for sqlite library versions available)
|
mas01mj@584
|
657 sqlite_versions=
|
mas01mj@584
|
658 if test "X$PKG_CONFIG" != X ; then
|
mas01mj@584
|
659 sqlite_version=`$PKG_CONFIG sqlite3 --modversion 2>/dev/null`
|
mas01mj@584
|
660 if test "X$sqlite_version" != X; then
|
mas01mj@584
|
661 if test "X$sqlite_api_version" = Xauto; then
|
mas01mj@584
|
662 sqlite_api_version=3
|
mas01mj@584
|
663 fi
|
mas01mj@584
|
664 sqlite_versions=$sqlite_version
|
mas01mj@584
|
665 fi
|
mas01mj@584
|
666 sqlite_version=`$PKG_CONFIG sqlite --modversion 2>/dev/null`
|
mas01mj@584
|
667 if test "X$sqlite_version" != X; then
|
mas01mj@584
|
668 if test "X$sqlite_api_version" = Xauto; then
|
mas01mj@584
|
669 sqlite_api_version=2
|
mas01mj@584
|
670 fi
|
mas01mj@584
|
671 sqlite_versions="$sqlite_version $sqlite_versions"
|
mas01mj@584
|
672 fi
|
mas01mj@584
|
673 fi
|
mas01mj@584
|
674 AC_MSG_RESULT($sqlite_versions)
|
mas01mj@584
|
675
|
mas01mj@584
|
676 if test "X$sqlite_api_version" = Xauto; then
|
mas01mj@584
|
677 sqlite_api_version=no
|
mas01mj@584
|
678 fi
|
mas01mj@584
|
679
|
mas01mj@584
|
680 AC_MSG_CHECKING(using sqlite library)
|
mas01mj@584
|
681 if test "X$sqlite_api_version" != Xno ; then
|
mas01mj@584
|
682 if test "$sqlite_api_version" = 3; then
|
mas01mj@584
|
683 SQLITE_CONFIG="$PKG_CONFIG sqlite3"
|
mas01mj@584
|
684 else
|
mas01mj@584
|
685 SQLITE_CONFIG="$PKG_CONFIG sqlite"
|
mas01mj@584
|
686 fi
|
mas01mj@584
|
687 sqlite_version=`$SQLITE_CONFIG --modversion 2>/dev/null`
|
mas01mj@584
|
688 AC_DEFINE_UNQUOTED(SQLITE_API, $sqlite_api_version, [SQLite API version])
|
mas01mj@584
|
689
|
mas01mj@584
|
690 storages_available="$storages_available sqlite($sqlite_version)"
|
mas01mj@584
|
691 sqlite_storage_available=yes
|
mas01mj@584
|
692 AC_MSG_RESULT(yes - version $sqlite_version)
|
mas01mj@584
|
693
|
mas01mj@584
|
694 CPPFLAGS="$LIBRDF_CPPFLAGS `$SQLITE_CONFIG --cflags`"
|
mas01mj@584
|
695 AC_CHECK_HEADERS(sqlite3.h sqlite.h)
|
mas01mj@584
|
696 CPPFLAGS="$LIBRDF_CPPFLAGS"
|
mas01mj@584
|
697 else
|
mas01mj@584
|
698 AC_MSG_RESULT(no)
|
mas01mj@584
|
699 fi
|
mas01mj@584
|
700
|
mas01mj@584
|
701 AC_ARG_WITH(postgresql, [ --with-postgresql(=CONFIG|yes|no) Location of pg_config (default=auto)], pg_config="$withval", postgresql_config="")
|
mas01mj@584
|
702 if test "X$pg_config" != "Xno"; then
|
mas01mj@584
|
703 if test "X$pg_config" != "Xyes" ; then
|
mas01mj@584
|
704 PG_CONFIG=$pg_config
|
mas01mj@584
|
705 fi
|
mas01mj@584
|
706 pg_config=yes
|
mas01mj@584
|
707 fi
|
mas01mj@584
|
708 if test $pg_config = yes -a "X$PG_CONFIG" = "X" ; then
|
mas01mj@584
|
709 AC_CHECK_PROGS(PG_CONFIG, pg_config)
|
mas01mj@584
|
710 fi
|
mas01mj@584
|
711
|
mas01mj@584
|
712 AC_MSG_CHECKING(for postgresql library)
|
mas01mj@584
|
713 if test "X$PG_CONFIG" != X ; then
|
mas01mj@584
|
714 postgresql_version=`$PG_CONFIG --version | sed -e 's/^.* //'`
|
mas01mj@584
|
715 storages_available="$storages_available postgresql($postgresql_version)"
|
mas01mj@584
|
716 postgresql_storage_available=yes
|
mas01mj@584
|
717
|
mas01mj@584
|
718 AC_MSG_RESULT(yes - version $postgresql_version)
|
mas01mj@584
|
719
|
mas01mj@584
|
720 CPPFLAGS="$LIBRDF_CPPFLAGS -I`$PG_CONFIG --includedir`"
|
mas01mj@584
|
721 AC_CHECK_HEADERS(libpq-fe.h)
|
mas01mj@584
|
722 CPPFLAGS="$LIBRDF_CPPFLAGS"
|
mas01mj@584
|
723
|
mas01mj@584
|
724 LIBS="$LIBRDF_LIBS -L`$PG_CONFIG --libdir` -lpq"
|
mas01mj@584
|
725 else
|
mas01mj@584
|
726 AC_MSG_RESULT(no)
|
mas01mj@584
|
727 fi
|
mas01mj@584
|
728
|
mas01mj@584
|
729
|
mas01mj@584
|
730 # This is needed because autoheader can't work out which computed
|
mas01mj@584
|
731 # symbols must be pulled from acconfig.h into config.h.in
|
mas01mj@584
|
732 if test "x" = "y"; then
|
mas01mj@584
|
733 AC_DEFINE(STORAGE_FILE, 1, [Building file storage])
|
mas01mj@584
|
734 AC_DEFINE(STORAGE_HASHES, 1, [Building hashes storage])
|
mas01mj@584
|
735 AC_DEFINE(STORAGE_TREES, 1, [Building trees storage])
|
mas01mj@584
|
736 AC_DEFINE(STORAGE_MEMORY, 1, [Building memory storage])
|
mas01mj@584
|
737 AC_DEFINE(STORAGE_MYSQL, 1, [Building MySQL storage])
|
mas01mj@584
|
738 AC_DEFINE(STORAGE_SQLITE, 1, [Building SQLite storage])
|
mas01mj@584
|
739 AC_DEFINE(STORAGE_TSTORE, 1, [Building 3store storage])
|
mas01mj@584
|
740 AC_DEFINE(STORAGE_POSTGRESQL, 1, [Building PostgreSQL storage])
|
mas01mj@584
|
741 AC_DEFINE(STORAGE_AUDIODB, 1, [Building AudioDB storage])
|
mas01mj@584
|
742 fi
|
mas01mj@584
|
743
|
mas01mj@584
|
744
|
mas01mj@584
|
745 AC_MSG_CHECKING(storages required)
|
mas01mj@584
|
746 AC_ARG_ENABLE(storages, [ --enable-storages=LIST Use storages (default=all)], storages="$enableval")
|
mas01mj@584
|
747 if test "X$storages" = Xall -o "X$storages" = X; then
|
mas01mj@584
|
748 storages="$all_storages"
|
mas01mj@584
|
749 AC_MSG_RESULT(all)
|
mas01mj@584
|
750 else
|
mas01mj@584
|
751 AC_MSG_RESULT($storages)
|
mas01mj@584
|
752 fi
|
mas01mj@584
|
753
|
mas01mj@584
|
754 dnl absolutely ensuring memory is enabled
|
mas01mj@584
|
755 if echo $storages | grep memory >/dev/null; then
|
mas01mj@584
|
756 :
|
mas01mj@584
|
757 else
|
mas01mj@584
|
758 storages="memory $storages"
|
mas01mj@584
|
759 fi
|
mas01mj@584
|
760
|
mas01mj@584
|
761 for storage in $storages; do
|
mas01mj@584
|
762 if eval test \$$storage'_storage_available' = yes; then
|
mas01mj@584
|
763 eval $storage'_storage=yes'
|
mas01mj@584
|
764 NAME=`echo $storage | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
mas01mj@584
|
765 n=STORAGE_${NAME}
|
mas01mj@584
|
766 AC_DEFINE_UNQUOTED($n)
|
mas01mj@584
|
767 storages_enabled="$storages_enabled $storage"
|
mas01mj@584
|
768
|
mas01mj@584
|
769 if echo $persistent_storages | grep "/$storage/" >/dev/null; then
|
mas01mj@584
|
770 persistent_store=yes
|
mas01mj@584
|
771 fi
|
mas01mj@584
|
772 fi
|
mas01mj@584
|
773
|
mas01mj@584
|
774 done
|
mas01mj@584
|
775
|
mas01mj@584
|
776 AM_CONDITIONAL(STORAGE_FILE, test $file_storage = yes)
|
mas01mj@584
|
777 AM_CONDITIONAL(STORAGE_HASHES, test $hashes_storage = yes)
|
mas01mj@584
|
778 AM_CONDITIONAL(STORAGE_TREES, test $trees_storage = yes)
|
mas01mj@584
|
779 AM_CONDITIONAL(STORAGE_MEMORY, test $memory_storage = yes)
|
mas01mj@584
|
780 AM_CONDITIONAL(STORAGE_MYSQL, test $mysql_storage = yes)
|
mas01mj@584
|
781 AM_CONDITIONAL(STORAGE_SQLITE, test $sqlite_storage = yes)
|
mas01mj@584
|
782 AM_CONDITIONAL(STORAGE_TSTORE, test $tstore_storage = yes)
|
mas01mj@584
|
783 AM_CONDITIONAL(STORAGE_POSTGRESQL, test $postgresql_storage = yes)
|
mas01mj@584
|
784 AM_CONDITIONAL(STORAGE_AUDIODB, test $audiodb_storage = yes)
|
mas01mj@584
|
785
|
mas01mj@584
|
786 if test $mysql_storage = yes; then
|
mas01mj@584
|
787 MYSQL_CPPFLAGS=`$MYSQL_CONFIG --cflags | sed -e "s/'//g" -e "s/-O[A-Za-z0-9]*//" `
|
mas01mj@584
|
788 MYSQL_LIBS="$LIBRDF_LIBS $mysql_libs"
|
mas01mj@584
|
789 fi
|
mas01mj@584
|
790 if test $sqlite_storage = yes; then
|
mas01mj@584
|
791 SQLITE_CPPFLAGS="`$SQLITE_CONFIG --cflags`"
|
mas01mj@584
|
792 SQLITE_LIBS="`$SQLITE_CONFIG --libs`"
|
mas01mj@584
|
793 fi
|
mas01mj@584
|
794 AUDIODB_CPPFLAGS="`$PKG_CONFIG glib --cflags`"
|
mas01mj@584
|
795 AUDIODB_LIBS="-laudioDB `$PKG_CONFIG glib --libs`"
|
mas01mj@584
|
796 if test $tstore_storage = yes; then
|
mas01mj@584
|
797 TSTORE_CPPFLAGS="`$TSTORE_CONFIG --cflags` `$PKG_CONFIG glib --cflags`"
|
mas01mj@584
|
798 TSTORE_LIBS="`$TSTORE_CONFIG --libs` `$PKG_CONFIG glib --libs`"
|
mas01mj@584
|
799 fi
|
mas01mj@584
|
800 if test $postgresql_storage = yes; then
|
mas01mj@584
|
801 POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir`"
|
mas01mj@584
|
802 POSTGRESQL_LIBS="-L`$PG_CONFIG --libdir` -lpq"
|
mas01mj@584
|
803 fi
|
mas01mj@584
|
804
|
mas01mj@584
|
805
|
mas01mj@584
|
806 if test "$persistent_store" = no; then
|
mas01mj@584
|
807 AC_MSG_WARN(No persistant storage is available or enabled)
|
mas01mj@584
|
808 fi
|
mas01mj@584
|
809
|
mas01mj@584
|
810 AC_SUBST(MYSQL_CPPFLAGS)
|
mas01mj@584
|
811 AC_SUBST(MYSQL_LIBS)
|
mas01mj@584
|
812 AC_SUBST(SQLITE_CPPFLAGS)
|
mas01mj@584
|
813 AC_SUBST(SQLITE_LIBS)
|
mas01mj@584
|
814 AC_SUBST(AUDIODB_CPPFLAGS)
|
mas01mj@584
|
815 AC_SUBST(AUDIODB_LIBS)
|
mas01mj@584
|
816 AC_SUBST(TSTORE_CPPFLAGS)
|
mas01mj@584
|
817 AC_SUBST(TSTORE_LIBS)
|
mas01mj@584
|
818 AC_SUBST(POSTGRESQL_CPPFLAGS)
|
mas01mj@584
|
819 AC_SUBST(POSTGRESQL_LIBS)
|
mas01mj@584
|
820
|
mas01mj@584
|
821
|
mas01mj@584
|
822 if test "$modular" = yes; then
|
mas01mj@584
|
823 LIBRDF_CPPFLAGS="$LIBRDF_CPPFLAGS $INCLTDL"
|
mas01mj@584
|
824 LIBRDF_LIBS="$LIBRDF_LIBS $LIBLTDL"
|
mas01mj@584
|
825 AC_DEFINE(MODULAR_LIBRDF, 1, [Build storage backends as modules])
|
mas01mj@584
|
826 # AC_CONFIG_SUBDIRS([libltdl])
|
mas01mj@584
|
827 else
|
mas01mj@584
|
828 LIBRDF_CPPFLAGS="$LIBRDF_CPPFLAGS $MYSQL_CPPFLAGS $SQLITE_CPPFLAGS $TSTORE_CPPFLAGS $POSTGRESQL_CPPFLAGS"
|
mas01mj@584
|
829 LIBRDF_LIBS="$LIBRDF_LIBS $MYSQL_LIBS $SQLITE_LIBS $TSTORE_LIBS $POSTGRESQL_LIBS"
|
mas01mj@584
|
830 fi
|
mas01mj@584
|
831
|
mas01mj@584
|
832 AM_CONDITIONAL(MODULAR_LIBRDF, test $modular = yes)
|
mas01mj@584
|
833
|
mas01mj@584
|
834 CPPFLAGS="$LIBRDF_CPPFLAGS"
|
mas01mj@584
|
835 LDFLAGS="$LIBRDF_LDFLAGS"
|
mas01mj@584
|
836 LIBS="$LIBRDF_LIBS"
|
mas01mj@584
|
837
|
mas01mj@584
|
838
|
mas01mj@584
|
839 dnl Check for use of threads
|
mas01mj@584
|
840
|
mas01mj@584
|
841 AC_ARG_WITH(threads, [ --with-threads With POSIX thread support (default=no)], with_threads="$withval", with_threads="no")
|
mas01mj@584
|
842
|
mas01mj@584
|
843 AC_CHECK_HEADERS(pthread.h)
|
mas01mj@584
|
844
|
mas01mj@584
|
845 AC_MSG_CHECKING(if POSIX threads should be used)
|
mas01mj@584
|
846 if test $with_threads = "yes" ; then
|
mas01mj@584
|
847
|
mas01mj@584
|
848 if test "$ac_cv_header_pthread_h" = yes ; then
|
mas01mj@584
|
849 AC_DEFINE(WITH_THREADS, 1, [Use POSIX threads])
|
mas01mj@584
|
850 LIBRDF_LIBS="$LIBRDF_LIBS -lpthread"
|
mas01mj@584
|
851 AC_MSG_RESULT(yes)
|
mas01mj@584
|
852 else
|
mas01mj@584
|
853 AC_MSG_RESULT(no)
|
mas01mj@584
|
854 fi
|
mas01mj@584
|
855 else
|
mas01mj@584
|
856 AC_MSG_RESULT(no)
|
mas01mj@584
|
857 fi
|
mas01mj@584
|
858
|
mas01mj@584
|
859 LIBS=$LIBRDF_LIBS
|
mas01mj@584
|
860
|
mas01mj@584
|
861
|
mas01mj@584
|
862 # Maybe add some local digest modules
|
mas01mj@584
|
863 for module in $digest_modules; do
|
mas01mj@584
|
864 module_u=`echo $module | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
mas01mj@584
|
865 AC_MSG_CHECKING(for local $module digest module)
|
mas01mj@584
|
866 base=rdf_digest_$module
|
mas01mj@584
|
867 if test -r $srcdir/src/$base.c; then
|
mas01mj@584
|
868 AC_MSG_RESULT(yes)
|
mas01mj@584
|
869
|
mas01mj@584
|
870 n=HAVE_LOCAL_${module_u}_DIGEST
|
mas01mj@584
|
871 AC_DEFINE_UNQUOTED($n)
|
mas01mj@584
|
872
|
mas01mj@584
|
873 DIGEST_OBJS="$DIGEST_OBJS $base.lo"
|
mas01mj@584
|
874 DIGEST_SRCS="$DIGEST_SRCS $base.c"
|
mas01mj@584
|
875 digest_modules_available="$digest_modules_available $module"
|
mas01mj@584
|
876 else
|
mas01mj@584
|
877 AC_MSG_RESULT(no)
|
mas01mj@584
|
878 fi
|
mas01mj@584
|
879 done
|
mas01mj@584
|
880
|
mas01mj@584
|
881 AC_SUBST(DIGEST_OBJS)
|
mas01mj@584
|
882 AC_SUBST(DIGEST_SRCS)
|
mas01mj@584
|
883
|
mas01mj@584
|
884 # This is needed because autoheader can't work out which computed
|
mas01mj@584
|
885 # symbols must be pulled from acconfig.h into config.h.in
|
mas01mj@584
|
886 if test "x" = "y"; then
|
mas01mj@584
|
887 AC_DEFINE(HAVE_LOCAL_MD5_DIGEST, 1, [Have local MD5 digest])
|
mas01mj@584
|
888 AC_DEFINE(HAVE_LOCAL_SHA1_DIGEST, 1, [Have local SHA1 digest])
|
mas01mj@584
|
889 AC_DEFINE(HAVE_LOCAL_RIPEMD160_DIGEST, 1, [Have local RIPEMD160 digest])
|
mas01mj@584
|
890 fi
|
mas01mj@584
|
891
|
mas01mj@584
|
892
|
mas01mj@584
|
893
|
mas01mj@584
|
894 #LIBRDF_EXTERNAL_CPPFLAGS="$LIBRDF_EXTERNAL_CPPFLAGS $LIBRDF_CPPFLAGS"
|
mas01mj@584
|
895 LIBRDF_EXTERNAL_LIBS="$LIBRDF_EXTERNAL_LIBS $LIBRDF_LIBS"
|
mas01mj@584
|
896
|
mas01mj@584
|
897 # Everything except things with .pc files (raptor and rasqal)
|
mas01mj@584
|
898 # 3store uses it but is optional and thus tricky to specify this way
|
mas01mj@584
|
899 LIBRDF_PKGCONFIG_PRIVATE_LIBS=`echo $LIBRDF_LIBS | sed -e 's, ..top_build_prefix.libltdl/libltdlc.la, ,'`
|
mas01mj@584
|
900
|
mas01mj@584
|
901 # Make final changes to cflags
|
mas01mj@584
|
902 CFLAGS="-DLIBRDF_INTERNAL=1 $CFLAGS"
|
mas01mj@584
|
903 MEM=
|
mas01mj@584
|
904 MEM_LIBS=
|
mas01mj@584
|
905 AC_ARG_WITH(dmalloc, [ --with-dmalloc Use dmalloc debugging library (default=no)], use_dmalloc="$withval", use_dmalloc="no")
|
mas01mj@584
|
906 AC_MSG_CHECKING(using dmalloc library)
|
mas01mj@584
|
907 if test "$USE_MAINTAINER_MODE" = yes; then
|
mas01mj@584
|
908 if test "$ac_cv_header_dmalloc_h" = yes; then
|
mas01mj@584
|
909 if test "X$use_dmalloc" = Xauto; then
|
mas01mj@584
|
910 use_dmalloc=yes
|
mas01mj@584
|
911 fi
|
mas01mj@584
|
912 else
|
mas01mj@584
|
913 use_dmalloc=no
|
mas01mj@584
|
914 fi
|
mas01mj@584
|
915 else
|
mas01mj@584
|
916 use_dmalloc=no
|
mas01mj@584
|
917 fi
|
mas01mj@584
|
918 AC_MSG_RESULT($use_dmalloc)
|
mas01mj@584
|
919 if test $use_dmalloc = yes; then
|
mas01mj@584
|
920 MEM=-DLIBRDF_MEMORY_DEBUG_DMALLOC=1
|
mas01mj@584
|
921 MEM_LIBS=-ldmalloc
|
mas01mj@584
|
922 fi
|
mas01mj@584
|
923 AC_ARG_WITH(memory-signing, [ --with-memory-signing Sign allocated memory (default=no)], use_memory_signing="$withval", use_memory_signing="no")
|
mas01mj@584
|
924 AC_MSG_CHECKING(using memory signing)
|
mas01mj@584
|
925 AC_MSG_RESULT($use_memory_signing)
|
mas01mj@584
|
926 if test $use_memory_signing = yes; then
|
mas01mj@584
|
927 MEM=-DLIBRDF_MEMORY_SIGN=1
|
mas01mj@584
|
928 MEM_LIBS=
|
mas01mj@584
|
929 fi
|
mas01mj@584
|
930
|
mas01mj@584
|
931 assert=yes
|
mas01mj@584
|
932 AC_ARG_ENABLE(assertions, [ --enable-assertions Perform run time assertion checks (default yes). ], assert=$enableval)
|
mas01mj@584
|
933 if test "$assert" = "yes"; then
|
mas01mj@584
|
934 AC_DEFINE(LIBRDF_ASSERT, 1, [Run time assertion checks.])
|
mas01mj@584
|
935 fi
|
mas01mj@584
|
936
|
mas01mj@584
|
937 assert_messages=yes
|
mas01mj@584
|
938 AC_ARG_ENABLE(assert-messages, [ --enable-assert-messages Print run time assertion check failure messages (default yes). ], assert_messages=$enableval)
|
mas01mj@584
|
939 if test "$assert_messages" = "yes"; then
|
mas01mj@584
|
940 AC_DEFINE(LIBRDF_ASSERT_MESSAGES, 1, [Print run time assertion check failure messages.])
|
mas01mj@584
|
941 fi
|
mas01mj@584
|
942
|
mas01mj@584
|
943 debug_messages=no
|
mas01mj@584
|
944 if test "$USE_MAINTAINER_MODE" = yes; then
|
mas01mj@584
|
945 debug_messages=yes;
|
mas01mj@584
|
946 fi
|
mas01mj@584
|
947
|
mas01mj@584
|
948 AC_ARG_ENABLE(debug, [ --enable-debug Enable debug messages (default no). ], debug_messages=$enableval)
|
mas01mj@584
|
949 if test "$debug_messages" = "yes"; then
|
mas01mj@584
|
950 LIBRDF_CPPFLAGS="-g -DLIBRDF_DEBUG=1 $LIBRDF_CPPFLAGS"
|
mas01mj@584
|
951 fi
|
mas01mj@584
|
952
|
mas01mj@584
|
953 if test "$USE_MAINTAINER_MODE" = yes; then
|
mas01mj@584
|
954 CFLAGS="$MAINTAINER_CFLAGS $CFLAGS"
|
mas01mj@584
|
955 fi
|
mas01mj@584
|
956
|
mas01mj@584
|
957 if test "$USE_MAINTAINER_MODE" = yes -a $release_version = no; then
|
mas01mj@584
|
958 dnl need to change quotes to allow square brackets
|
mas01mj@584
|
959 changequote(<<, >>)dnl
|
mas01mj@584
|
960 CFLAGS=`echo $CFLAGS | sed -e "s/-O[A-Za-z0-9]*//"`
|
mas01mj@584
|
961 CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-O[A-Za-z0-9]*//"`
|
mas01mj@584
|
962 LIBRDF_CPPFLAGS=`echo $LIBRDF_CPPFLAGS | sed -e "s/-O[A-Za-z0-9]*//"`
|
mas01mj@584
|
963 LIBRDF_EXTERNAL_CPPFLAGS=`echo $LIBRDF_EXTERNAL_CPPFLAGS | sed -e "s/-O[A-Za-z0-9]*//"`
|
mas01mj@584
|
964 LIBRDF_INTERNAL_CPPFLAGS=`echo $LIBRDF_INTERNAL_CPPFLAGS | sed -e "s/-O[A-Za-z0-9]*//"`
|
mas01mj@584
|
965 changequote([, ])dnl
|
mas01mj@584
|
966 fi
|
mas01mj@584
|
967
|
mas01mj@584
|
968
|
mas01mj@584
|
969 LIBS="$LIBS"
|
mas01mj@584
|
970 CPPFLAGS="$CPPFLAGS"
|
mas01mj@584
|
971 LDFLAGS="$LDFLAGS"
|
mas01mj@584
|
972
|
mas01mj@584
|
973 LIBRDF_LIBTOOLLIBS=librdf.la
|
mas01mj@584
|
974
|
mas01mj@584
|
975 AC_SUBST(LIBRDF_EXTERNAL_CPPFLAGS)
|
mas01mj@584
|
976 AC_SUBST(LIBRDF_EXTERNAL_LIBS)
|
mas01mj@584
|
977
|
mas01mj@584
|
978 AC_SUBST(LIBRDF_INTERNAL_CPPFLAGS)
|
mas01mj@584
|
979 AC_SUBST(LIBRDF_INTERNAL_LIBS)
|
mas01mj@584
|
980
|
mas01mj@584
|
981 AC_SUBST(LIBRDF_CPPFLAGS)
|
mas01mj@584
|
982 AC_SUBST(LIBRDF_LDFLAGS)
|
mas01mj@584
|
983 AC_SUBST(LIBRDF_LIBTOOLLIBS)
|
mas01mj@584
|
984 AC_SUBST(LIBRDF_PKGCONFIG_PRIVATE_LIBS)
|
mas01mj@584
|
985
|
mas01mj@584
|
986 AC_SUBST(MEM)
|
mas01mj@584
|
987 AC_SUBST(MEM_LIBS)
|
mas01mj@584
|
988
|
mas01mj@584
|
989 abs_top_srcdir=`cd $srcdir; pwd`
|
mas01mj@584
|
990 AC_SUBST(abs_top_srcdir)
|
mas01mj@584
|
991 abs_top_builddir=`pwd`
|
mas01mj@584
|
992 AC_SUBST(abs_top_builddir)
|
mas01mj@584
|
993
|
mas01mj@584
|
994 AC_CONFIG_FILES([Makefile src/Makefile])
|
mas01mj@584
|
995
|
mas01mj@584
|
996 dnl Check for gtk-doc and docbook
|
mas01mj@584
|
997 GTK_DOC_CHECK([1.3])
|
mas01mj@584
|
998
|
mas01mj@584
|
999 AC_OUTPUT
|
mas01mj@584
|
1000
|
mas01mj@584
|
1001 AC_MSG_RESULT([
|
mas01mj@584
|
1002 Redland build summary:
|
mas01mj@584
|
1003 ])
|
mas01mj@584
|
1004
|
mas01mj@584
|
1005 if test "$modular" = yes; then
|
mas01mj@584
|
1006 AC_MSG_RESULT([ Using modular storage backends])
|
mas01mj@584
|
1007 else
|
mas01mj@584
|
1008 AC_MSG_RESULT([ Using monolithic storage backends])
|
mas01mj@584
|
1009 fi
|
mas01mj@584
|
1010
|
mas01mj@584
|
1011 AC_MSG_RESULT([
|
mas01mj@584
|
1012 Berkeley/Sleepycat DB : $bdb_available
|
mas01mj@584
|
1013 Triple stores available : $storages_available
|
mas01mj@584
|
1014 Triple stores enabled :$storages_enabled
|
mas01mj@584
|
1015 RDF parsers :$rdf_parsers_available
|
mas01mj@584
|
1016 RDF query : $rdf_query
|
mas01mj@584
|
1017 Content digests :$digest_modules_available
|
mas01mj@584
|
1018 ])
|