-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathconfigure.in
276 lines (211 loc) · 7.33 KB
/
configure.in
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
###
### Welcome to Beagrep's configure.in. We hope you enjoy your stay.
###
AC_INIT(beagrepd/BeagrepDaemon.cs)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(beagrep, 0.3.9)
########################################################################
###
### Some dependencies
###
MONO_REQUIRED=1.2.4
MONODOC_REQUIRED=1.2.4
NDESK_DBUS_REQUIRED=0.5.2
NDESK_DBUS_GLIB_REQUIRED=0.3.0
GTK_SHARP_REQUIRED=2.10.0
GMIME_SHARP_REQUIRED=2.2.0
EVOLUTION_SHARP_REQUIRED=0.13.3
GTK_REQUIRED=2.10.0
########################################################################
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
AC_PROG_INSTALL
AM_PROG_LIBTOOL
AC_PROG_CXX
VERSION=${VERSION}
AC_SUBST(VERSION)
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
AC_PATH_PROG(BASH, bash)
AC_SUBST(BASH)
AC_PATH_PROG(MONO, mono, no)
if test "x$MONO" = "xno"; then
AC_MSG_ERROR([You need to install the Mono runtime])
fi
AC_PATH_PROG(MCS, mcs, no)
if test "x$MCS" = "xno"; then
AC_MSG_ERROR([You need to install the Mono mcs compiler])
fi
AC_MSG_CHECKING([for mono.pc])
if test -z `$PKG_CONFIG --variable=prefix mono`; then
AC_MSG_ERROR([missing the mono.pc file, usually found in the mono-devel package])
else
AC_MSG_RESULT([found])
fi
BEAGREP_DEFINES=""
# check that we have the require version of mono
# Temporary: check for mono-1.9
PKG_CHECK_MODULES(MONO, mono-2 >= 1.9, mono_1_9=yes, mono_1_9=no)
if test "x$mono_1_9" = "xno"; then
AC_MSG_RESULT([missing mono >= 1.9. Searching for mono >= 1.2.4])
PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED)
else
AC_MSG_RESULT([found mono >= 1.9])
BEAGREP_DEFINES="$BEAGREP_DEFINES -define:MONO_1_9"
fi
# check for various mono DLLs that we need.
needed_dlls="Mono.Data.Sqlite Mono.Posix System.Data System.Web ICSharpCode.SharpZipLib"
for i in $needed_dlls; do
AC_MSG_CHECKING([for $i.dll])
if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll &&
test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/4.5/$i.dll; then
AC_MSG_ERROR([missing required mono DLL: $i.dll])
else
AC_MSG_RESULT([found])
fi
done
# SharpZipLib was broken previously, and all our Makefile.am's depend on this
# define.
SHARPZIPLIB_LIBS="-r:ICSharpCode.SharpZipLib"
AC_SUBST(SHARPZIPLIB_LIBS)
# check for OS
case "$target" in
*-*-linux*)
os=linux
;;
*-*-freebsd*)
os=freebsd
;;
*)
AC_MSG_ERROR([Unrecognised target OS: $target])
;;
esac
AM_CONDITIONAL(OS_LINUX, test "x$os" = "xlinux")
AM_CONDITIONAL(OS_FREEBSD, test "x$os" = "xfreebsd")
# xdgmime really wants to have HAVE_MMAP defined
AC_FUNC_MMAP()
# check for desktop-launch
AC_PATH_PROG(DESKTOP_LAUNCH, desktop-launch, no)
AM_CONDITIONAL(ENABLE_DESKTOP_LAUNCH, test "x$DESKTOP_LAUNCH" != "xno")
# check for xdg-open
AC_PATH_PROG(XDG_OPEN, xdg-open, no)
AM_CONDITIONAL(ENABLE_XDG_OPEN, test "x$XDG_OPEN" != "xno")
#
# I18N
#
# Many distros don't have a dependency on sqlite for their
# mono-data-sqlite packages, and the mono build process itself
# doesn't require it. But we do, so check for it here.
# We really need sqlite 3.3.1+; the earlier pkgconfig based
# test was also flawed. Hence check for the sqlite3_prepare_v2
# API which was added in 3.3.9. 3.3.9 was released in Jan 07,
# so we can assume everyone has a much much newer sqlite3
AC_MSG_CHECKING([for sqlite3 >= 3.3.9])
AC_CHECK_LIB(sqlite3, sqlite3_prepare_v2)
dnl ----------------------------------------------
dnl inotify
AC_ARG_ENABLE([inotify],
AC_HELP_STRING([--disable-inotify], [Disable inotify filesystem monitoring support (default auto)]),
enable_inotify=$enableval,
enable_inotify=auto)
AC_CHECK_HEADERS(sys/inotify.h)
if test "x$ac_cv_header_sys_inotify_h" = "xno"; then
dnl error out if user has explicitly requested inotify
if test "x$enable_inotify" = "xyes"; then
AC_MSG_ERROR([inotify is unavailable on your system architecture])
fi
enable_inotify="no (unavailable)"
else
if test "x$enable_inotify" != "xno"; then
enable_inotify="yes"
else
enable_inotify="no (disabled)"
fi
fi
AM_CONDITIONAL(ENABLE_INOTIFY, test "x$enable_inotify" = "xyes")
dnl ----------------------------------------------
dnl gsf-sharp
dnl ----------------------------------------------
dnl ----------------------------------------------
dnl taglib-sharp: Needed for indexing audio formats
PKG_CHECK_MODULES([GLIB], glib-2.0 >= 2.2.0)
dnl ----------------------------------------------
PKG_CHECK_MODULES(BEAGREPD,
[
shared-mime-info
gmime-sharp-2.6 >= $GMIME_SHARP_REQUIRED
glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
])
BEAGREPD_LIBS="$BEAGREPD_LIBS"
AC_SUBST(BEAGREPD_LIBS)
GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp-2.4`
dnl ----------------------------------------------
GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
AC_SUBST(GTK_BINARY_VERSION)
dnl ----------------------------------------------
dnl Prefixes for helper scripts
GAC_PREFIX="$EVO_SHARP_PREFIX:$GMIME_SHARP_PREFIX"
dnl Remove duplicate prefixes
GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|:|\n|g' | sort | uniq | tr '\n' ':'`"
dnl Remove stray :s
GAC_PREFIX="`echo $GAC_PREFIX | sed -e 's|::\+|:|g' -e 's|^:\+||' -e 's|:\+$||'`"
AC_SUBST(GAC_PREFIX)
dnl ----------------------------------------------
dnl Monodoc
AC_ARG_ENABLE(docs,
AC_HELP_STRING([--disable-docs],
[Do not build documentation (default yes)]),
with_docs=$enableval,
with_docs=yes)
if test "x$with_docs" = "xyes"; then
AC_PATH_PROG(MONODOCER, monodocer, no)
if test "x$MONODOCER" = "xno"; then
AC_MSG_ERROR([You need to install monodoc, or pass --disable-docs to configure to skip documentation installation])
fi
AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
if test "x$MDASSEMBLER" = "xno"; then
AC_MSG_ERROR([You need to install mdassembler, or pass --disable-docs to configure to skip documentation installation])
fi
AM_CONDITIONAL(BUILD_DOCS, true)
else
AC_MSG_NOTICE([not building Beagrep csharp API documentation])
AM_CONDITIONAL(BUILD_DOCS, false)
fi
dnl ----------------------------------------------
dnl Conditional for debugging XML messages.
AC_ARG_ENABLE([xml-dump],
AC_HELP_STRING([--enable-xml-dump], [Enables printing of the XML messages sent between components (default no)]),
enable_xml_dump=$enableval,
enable_xml_dump=no)
if test "x$enable_xml_dump" = "xyes"; then
AC_DEFINE_UNQUOTED(ENABLE_XML_DUMP, 1, [Dump XML messages for debugging])
BEAGREP_DEFINES="$BEAGREP_DEFINES -define:ENABLE_XML_DUMP"
fi
AC_SUBST(BEAGREP_DEFINES)
dnl ----------------------------------------------
AC_OUTPUT([
Makefile
Util/Makefile
glue/Makefile
BeagrepClient/Makefile
beagrepd/Makefile
Filters/Makefile
tools/Makefile
doc/Makefile
doc/api/Makefile
conf-data/Makefile
beagrep-0.0.pc
beagrep-daemon.pc
beagrep-ui-0.0.pc
beagrep.spec
])
echo "
Beagrep version: ${VERSION}
Target OS: ${os}
Inotify: ${enable_inotify}
Prefix: ${prefix}
Build RDF Adapter ${enable_rdf_adapter} (purely experimental)
Build docs? ${with_docs}
"