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@585
|
26 AC_INIT([Redland AudioDB Storage Module], 0.0.1, http://omras2.doc.gold.ac.uk/software/audiodb/, redland_audioDB)
|
mas01mj@584
|
27 AC_PREREQ(2.53)
|
mas01mj@584
|
28 AC_REVISION($Revision$)dnl
|
mas01mj@584
|
29
|
mas01mj@585
|
30 AM_INIT_AUTOMAKE([1.7])
|
mas01mj@584
|
31 AM_MAINTAINER_MODE
|
mas01mj@584
|
32
|
mas01mj@584
|
33 AC_CANONICAL_HOST
|
mas01mj@584
|
34
|
mas01mj@584
|
35
|
mas01mj@584
|
36 changequote(<<, >>)dnl
|
mas01mj@584
|
37 version_major=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\1/'`
|
mas01mj@584
|
38 version_minor=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\2/'`
|
mas01mj@584
|
39 version_release=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\3/'`
|
mas01mj@584
|
40 changequote([, ])dnl
|
mas01mj@584
|
41
|
mas01mj@584
|
42 version_decimal=`expr $version_major \* 10000 + $version_minor \* 100 + $version_release`
|
mas01mj@584
|
43
|
mas01mj@584
|
44 AC_DEFINE_UNQUOTED(LIBRDF_VERSION_MAJOR, $version_major, [Major version number])
|
mas01mj@584
|
45 AC_DEFINE_UNQUOTED(LIBRDF_VERSION_MINOR, $version_minor, [Minor version number])
|
mas01mj@584
|
46 AC_DEFINE_UNQUOTED(LIBRDF_VERSION_RELEASE, $version_release, [Release version number])
|
mas01mj@584
|
47 AC_DEFINE_UNQUOTED(LIBRDF_VERSION_DECIMAL, $version_decimal, [Release version as a decimal])
|
mas01mj@584
|
48
|
mas01mj@584
|
49 LIBRDF_LIBTOOL_VERSION=0:0:0
|
mas01mj@584
|
50 AC_SUBST(LIBRDF_LIBTOOL_VERSION)
|
mas01mj@584
|
51
|
mas01mj@584
|
52 dnl Checks for programs.
|
mas01mj@584
|
53 AM_SANITY_CHECK
|
mas01mj@584
|
54 AC_PROG_CC
|
mas01mj@584
|
55 AM_PROG_CC_C_O
|
mas01mj@584
|
56 AC_PROG_INSTALL
|
mas01mj@584
|
57 AC_PROG_LN_S
|
mas01mj@584
|
58 AC_PROG_MAKE_SET
|
mas01mj@584
|
59
|
mas01mj@584
|
60 m4_undefine([AC_PROG_CXX])
|
mas01mj@584
|
61 m4_defun([AC_PROG_CXX],[])
|
mas01mj@584
|
62 m4_undefine([AC_PROG_F77])
|
mas01mj@584
|
63 m4_defun([AC_PROG_F77],[])
|
mas01mj@584
|
64
|
mas01mj@584
|
65 # Libtool and LTDL initialising
|
mas01mj@584
|
66 LT_CONFIG_LTDL_DIR([libltdl])
|
mas01mj@584
|
67 LT_INIT([dlopen])
|
mas01mj@584
|
68 LTDL_INIT([convenience])
|
mas01mj@584
|
69
|
mas01mj@584
|
70 # Find a tar command for 'make dist'
|
mas01mj@584
|
71 AC_CHECK_PROGS(TAR, gnutar gtar tar)
|
mas01mj@584
|
72
|
mas01mj@584
|
73 AC_CHECK_PROGS(PERL, perl)
|
mas01mj@584
|
74 # Gnome
|
mas01mj@584
|
75 AC_CHECK_PROGS(PKG_CONFIG, pkg-config)
|
mas01mj@584
|
76
|
mas01mj@584
|
77
|
mas01mj@584
|
78 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
mas01mj@584
|
79 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
mas01mj@584
|
80 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
mas01mj@584
|
81 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
mas01mj@584
|
82
|
mas01mj@584
|
83
|
mas01mj@584
|
84 # Externally linked libraries - appear in redland-config
|
mas01mj@584
|
85 # -Dfoo -Idir
|
mas01mj@584
|
86 LIBRDF_CPPFLAGS=$CPPFLAGS
|
mas01mj@584
|
87 # -Ldir
|
mas01mj@584
|
88 LIBRDF_LDFLAGS=$LDFLAGS
|
mas01mj@584
|
89 # -llib
|
mas01mj@584
|
90 LIBRDF_LIBS=$LIBS
|
mas01mj@584
|
91
|
mas01mj@584
|
92 # Internally linked libraries - never given to users
|
mas01mj@584
|
93 # -Dfoo -Idir
|
mas01mj@584
|
94 LIBRDF_INTERNAL_CPPFLAGS=
|
mas01mj@584
|
95 # -Ldir -llib
|
mas01mj@584
|
96 LIBRDF_INTERNAL_LIBS=
|
mas01mj@584
|
97
|
mas01mj@584
|
98 # Libraries linked externally also may be internal - presently just
|
mas01mj@584
|
99 # raptor and rasqal but in future may include others
|
mas01mj@584
|
100 # Currently only substituted into redland-src-config.
|
mas01mj@584
|
101 # -Dfoo -Idir
|
mas01mj@584
|
102 LIBRDF_EXTERNAL_CPPFLAGS=
|
mas01mj@584
|
103 # -Ldir -llib
|
mas01mj@584
|
104 LIBRDF_EXTERNAL_LIBS=
|
mas01mj@584
|
105
|
mas01mj@584
|
106 # do these first because somehow they get messed up by bdb checks
|
mas01mj@584
|
107 AC_CHECK_TYPES([byte])
|
mas01mj@584
|
108 AC_CHECK_TYPES([u32])
|
mas01mj@584
|
109 AC_CHECK_TYPES([u64])
|
mas01mj@584
|
110
|
mas01mj@584
|
111 AC_CHECK_SIZEOF(unsigned char, 1)
|
mas01mj@584
|
112 AC_CHECK_SIZEOF(unsigned int, 4)
|
mas01mj@584
|
113 AC_CHECK_SIZEOF(unsigned long, 4)
|
mas01mj@584
|
114 AC_CHECK_SIZEOF(unsigned long long, 8)
|
mas01mj@584
|
115
|
mas01mj@584
|
116 CPPFLAGS="$LIBRDF_CPPFLAGS"
|
mas01mj@584
|
117 LDFLAGS="$LIBRDF_LDFLAGS"
|
mas01mj@584
|
118 LIBS="$LIBRDF_LIBS"
|
mas01mj@584
|
119
|
mas01mj@584
|
120
|
mas01mj@584
|
121 dnl Checks for typedefs, structures, and compiler characteristics.
|
mas01mj@584
|
122 AC_C_CONST
|
mas01mj@584
|
123 AC_C_BIGENDIAN
|
mas01mj@584
|
124
|
mas01mj@584
|
125 dnl Checks for URI resolvers
|
mas01mj@584
|
126
|
mas01mj@584
|
127 CPPFLAGS="$LIBRDF_CPPFLAGS"
|
mas01mj@584
|
128 LDFLAGS="$LIBRDF_LDFLAGS"
|
mas01mj@584
|
129 LIBS="$LIBRDF_LIBS"
|
mas01mj@584
|
130
|
mas01mj@584
|
131
|
mas01mj@584
|
132 dnl Checks for RDF parsers
|
mas01mj@584
|
133 parser_modules=raptor
|
mas01mj@584
|
134 rdf_parsers_available=
|
mas01mj@584
|
135
|
mas01mj@584
|
136 # Check for raptor
|
mas01mj@584
|
137 AC_MSG_CHECKING(for raptor)
|
mas01mj@584
|
138
|
mas01mj@584
|
139 RAPTOR_MIN_VERSION=1.4.17
|
mas01mj@584
|
140 AC_SUBST(RAPTOR_MIN_VERSION)
|
mas01mj@584
|
141 if $PKG_CONFIG raptor --exists; then
|
mas01mj@584
|
142 :
|
mas01mj@584
|
143 else
|
mas01mj@584
|
144 AC_MSG_ERROR(Raptor is not installed - see http://librdf.org/raptor/ to get a version newer than $RAPTOR_MIN_VERSION)
|
mas01mj@584
|
145 fi
|
mas01mj@584
|
146
|
mas01mj@584
|
147 RAPTOR_VERSION=`$PKG_CONFIG raptor --modversion 2>/dev/null`
|
mas01mj@584
|
148
|
mas01mj@584
|
149 if $PKG_CONFIG raptor --atleast-version=$RAPTOR_MIN_VERSION; then
|
mas01mj@584
|
150 :
|
mas01mj@584
|
151 else
|
mas01mj@584
|
152 AC_MSG_ERROR(Installed raptor $RAPTOR_VERSION is too old - need $RAPTOR_MIN_VERSION)
|
mas01mj@584
|
153 fi
|
mas01mj@584
|
154
|
mas01mj@584
|
155 LIBRDF_EXTERNAL_CPPFLAGS="`$PKG_CONFIG raptor --cflags` $LIBRDF_EXTERNAL_CPPFLAGS"
|
mas01mj@584
|
156 LIBRDF_EXTERNAL_LIBS="`$PKG_CONFIG raptor --libs` $LIBRDF_EXTERNAL_LIBS"
|
mas01mj@584
|
157
|
mas01mj@584
|
158 rdf_parsers_available="$parser_available raptor(system $RAPTOR_VERSION)"
|
mas01mj@584
|
159 AC_MSG_RESULT(system $RAPTOR_VERSION)
|
mas01mj@584
|
160
|
mas01mj@584
|
161 # Check for rasqal
|
mas01mj@584
|
162 AC_MSG_CHECKING(for rasqal)
|
mas01mj@584
|
163
|
mas01mj@584
|
164 RASQAL_MIN_VERSION=0.9.16
|
mas01mj@584
|
165 RASQAL_MAX_VERSION=0.9.99
|
mas01mj@584
|
166 AC_SUBST(RASQAL_MIN_VERSION)
|
mas01mj@584
|
167 AC_SUBST(RASQAL_MAX_VERSION)
|
mas01mj@584
|
168 if $PKG_CONFIG rasqal --exists; then
|
mas01mj@584
|
169 :
|
mas01mj@584
|
170 else
|
mas01mj@584
|
171 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
|
172 fi
|
mas01mj@584
|
173
|
mas01mj@584
|
174 RASQAL_VERSION=`$PKG_CONFIG rasqal --modversion 2>/dev/null`
|
mas01mj@584
|
175
|
mas01mj@584
|
176 if $PKG_CONFIG rasqal --atleast-version=$RASQAL_MIN_VERSION --max-version=$RASQAL_MAX_VERSION; then
|
mas01mj@584
|
177 :
|
mas01mj@584
|
178 else
|
mas01mj@584
|
179 AC_MSG_ERROR(Installed rasqal $RASQAL_VERSION is not in range $RASQAL_MIN_VERSION to $RASQAL_MAX_VERSION)
|
mas01mj@584
|
180 fi
|
mas01mj@584
|
181
|
mas01mj@584
|
182 LIBRDF_EXTERNAL_CPPFLAGS="`$PKG_CONFIG rasqal --cflags` $LIBRDF_EXTERNAL_CPPFLAGS"
|
mas01mj@584
|
183 LIBRDF_EXTERNAL_LIBS="`$PKG_CONFIG rasqal --libs` $LIBRDF_EXTERNAL_LIBS"
|
mas01mj@584
|
184
|
mas01mj@584
|
185 rdf_query="rasqal(system $RASQAL_VERSION)"
|
mas01mj@584
|
186 AC_MSG_RESULT(system $RASQAL_VERSION)
|
mas01mj@584
|
187
|
mas01mj@586
|
188 # Check for redland
|
mas01mj@586
|
189 AC_MSG_CHECKING(for redland)
|
mas01mj@586
|
190
|
mas01mj@586
|
191 REDLAND_MIN_VERSION=1.0.9
|
mas01mj@586
|
192 AC_SUBST(REDLAND_MIN_VERSION)
|
mas01mj@586
|
193 if $PKG_CONFIG redland --exists; then
|
mas01mj@586
|
194 :
|
mas01mj@586
|
195 else
|
mas01mj@586
|
196 AC_MSG_ERROR(Redland is not installed - see http://librdf.org/ to get a version newer than $REDLAND_MIN_VERSION)
|
mas01mj@586
|
197 fi
|
mas01mj@586
|
198
|
mas01mj@586
|
199 REDLAND_VERSION=`$PKG_CONFIG redland --modversion 2>/dev/null`
|
mas01mj@586
|
200
|
mas01mj@586
|
201 if $PKG_CONFIG redland --atleast-version=$REDLAND_MIN_VERSION; then
|
mas01mj@586
|
202 :
|
mas01mj@586
|
203 else
|
mas01mj@586
|
204 AC_MSG_ERROR(Installed redland $REDLAND_VERSION is not newer than $REDLAND_MIN_VERSION)
|
mas01mj@586
|
205 fi
|
mas01mj@586
|
206
|
mas01mj@586
|
207 LIBRDF_EXTERNAL_CPPFLAGS="`$PKG_CONFIG redland --cflags` $LIBRDF_EXTERNAL_CPPFLAGS"
|
mas01mj@586
|
208 LIBRDF_EXTERNAL_LIBS="`$PKG_CONFIG redland --libs` $LIBRDF_EXTERNAL_LIBS"
|
mas01mj@586
|
209
|
mas01mj@586
|
210 AC_MSG_RESULT(system $REDLAND_VERSION)
|
mas01mj@586
|
211
|
mas01mj@584
|
212 LIBS="$LIBS"
|
mas01mj@584
|
213 CPPFLAGS="$CPPFLAGS"
|
mas01mj@584
|
214 LDFLAGS="$LDFLAGS"
|
mas01mj@584
|
215
|
mas01mj@584
|
216 LIBRDF_LIBTOOLLIBS=librdf.la
|
mas01mj@584
|
217
|
mas01mj@584
|
218 AC_SUBST(LIBRDF_EXTERNAL_CPPFLAGS)
|
mas01mj@584
|
219 AC_SUBST(LIBRDF_EXTERNAL_LIBS)
|
mas01mj@584
|
220
|
mas01mj@584
|
221 AC_SUBST(LIBRDF_INTERNAL_CPPFLAGS)
|
mas01mj@584
|
222 AC_SUBST(LIBRDF_INTERNAL_LIBS)
|
mas01mj@584
|
223
|
mas01mj@584
|
224 AC_SUBST(LIBRDF_CPPFLAGS)
|
mas01mj@584
|
225 AC_SUBST(LIBRDF_LDFLAGS)
|
mas01mj@584
|
226 AC_SUBST(LIBRDF_LIBTOOLLIBS)
|
mas01mj@584
|
227 AC_SUBST(LIBRDF_PKGCONFIG_PRIVATE_LIBS)
|
mas01mj@584
|
228
|
mas01mj@584
|
229 AC_SUBST(MEM)
|
mas01mj@584
|
230 AC_SUBST(MEM_LIBS)
|
mas01mj@584
|
231
|
mas01mj@584
|
232 abs_top_srcdir=`cd $srcdir; pwd`
|
mas01mj@584
|
233 AC_SUBST(abs_top_srcdir)
|
mas01mj@584
|
234 abs_top_builddir=`pwd`
|
mas01mj@584
|
235 AC_SUBST(abs_top_builddir)
|
mas01mj@584
|
236
|
mas01mj@584
|
237 AC_CONFIG_FILES([Makefile src/Makefile])
|
mas01mj@584
|
238
|
mas01mj@584
|
239 AC_OUTPUT
|