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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
|
AC_INIT(tomboy, 1.1.0)
AC_CONFIG_SRCDIR(Tomboy/Tomboy.cs)
AM_INIT_AUTOMAKE([foreign tar-pax])
AM_MAINTAINER_MODE
GNOME_COMMON_INIT
GNOME_DOC_INIT
AM_CONFIG_HEADER(config.h)
AC_PROG_INSTALL
IT_PROG_INTLTOOL([0.35])
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
#
# Setup GETTEXT
#
GETTEXT_PACKAGE=tomboy
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
#
# Find gconftool-2
#
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
#
# Find mcs
#
AC_PATH_PROG(GMCS, gmcs)
if test "x$GMCS" = "x" ; then
AC_MSG_ERROR([Can't find "gmcs" in your PATH])
fi
#
# Check Mono version
#
MONO_MINIMUM_VERSION=1.9.1
PKG_CHECK_MODULES(MONO, mono >= $MONO_MINIMUM_VERSION)
#
# Gdk and Atk are needed for libtrayicon
#
GDK20_MINIMUM_VERSION=2.6.0
GTK20_MINIMUM_VERSION=2.14.0
ATK_MINIMUM_VERSION=1.2.4
PKG_CHECK_MODULES(LIBTOMBOY,
gdk-2.0 >= $GDK20_MINIMUM_VERSION
gtk+-2.0 >= $GTK20_MINIMUM_VERSION
atk >= $ATK_MINIMUM_VERSION)
AC_SUBST(LIBTOMBOY_CFLAGS)
AC_SUBST(LIBTOMBOY_LIBS)
if pkg-config --atleast-version=2.16 gtk+-2.0; then
HAS_GTK_2_16=yes
fi
AM_CONDITIONAL(HAS_GTK_2_16, test "x$HAS_GTK_2_16" = "xyes")
#
# Use pkg-config to check for the panel applet server directory if
# specified by --enable-panelapplet-srvdir-check.
#
AC_ARG_ENABLE(panelapplet-srvdir-check,
[ --enable-panelapplet-srvdir-check[[=no/yes]] query for panel applet server dir [[default: yes]]],
[case "$enableval" in
yes) ENABLE_PANELAPPLET_SRVDIR_CHECK=yes ;;
no) ENABLE_PANELAPPLET_SRVDIR_CHECK=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-panelapplet-srvdir-check) ;;
esac],
[ENABLE_PANELAPPLET_SRVDIR_CHECK=yes])
AM_CONDITIONAL(ENABLE_PANELAPPLET_SRVDIR_CHECK, test "$ENABLE_PANELAPPLET_SRVDIR_CHECK" = "yes")
if test "$ENABLE_PANELAPPLET_SRVDIR_CHECK" = "yes" ; then
#
# If libpanelapplet available, use it to find .server install location.
#
if test "x$prefix" = "x$ac_default_prefix"; then
PANELAPPLET_LIBDIR=`$PKG_CONFIG --variable=libdir libpanelapplet-2.0`
fi
if test "x$PANELAPPLET_LIBDIR" != "x"; then
PANELAPPLET_SERVER_DIR="$PANELAPPLET_LIBDIR/bonobo/servers"
fi
fi
# Set PANELAPPLET_SERVER_DIR default if it's not already set
if test "x$PANELAPPLET_SERVER_DIR" = "x" ; then
PANELAPPLET_SERVER_DIR="$libdir/bonobo/servers"
fi
AC_SUBST(PANELAPPLET_SERVER_DIR)
#
# Check for recent GtkSpell here. Prior versions require bug workarounds.
# http://gtkspell.sourceforge.net/
#
PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.9, FIXED_GTKSPELL="yes", FIXED_GTKSPELL="no")
AM_CONDITIONAL(FIXED_GTKSPELL, test "$FIXED_GTKSPELL" = "yes")
#
# Check for Mac/Windows/GNOME Support
#
AC_ARG_ENABLE(windows,
[ --enable-windows[[=no/yes]] compile with Windows support [[default: no]]],
ENABLE_WIN="$enableval", ENABLE_WIN="no")
AM_CONDITIONAL(ENABLE_WIN, test "x$ENABLE_WIN" = "xyes")
AC_ARG_ENABLE(osx,
[ --enable-osx[[=no/yes]] compile with Mac OS X support [[default: no]]],
ENABLE_OSX="$enableval", ENABLE_OSX="no")
AM_CONDITIONAL(ENABLE_OSX, test "x$ENABLE_OSX" = "xyes")
AC_ARG_ENABLE(gnome,
[ --enable-gnome[[=no/yes]] compile with GNOME support [[default: yes]]],
ENABLE_GNOME="$enableval")
if ((test "x$ENABLE_GNOME" = "xyes") && (test "x$ENABLE_WIN" = "xyes")) || ((test "x$ENABLE_GNOME" = "xyes") && (test "x$ENABLE_OSX" = "xyes")) || ((test "x$ENABLE_OSX" = "xyes") && (test "x$ENABLE_WIN" = "xyes")) ; then
AC_MSG_ERROR([--enable-gnome, --enable-windows, and --enable-osx are mutually exclusive])
fi
if (test "x$ENABLE_WIN" = "xno") && (test "x$ENABLE_OSX" = "xno") ; then
ENABLE_GNOME="yes"
else
ENABLE_GNOME="no"
fi
AM_CONDITIONAL(ENABLE_GNOME, test "x$ENABLE_GNOME" != "xno")
#
# Use DBus to export our remote control if available.
#
AC_ARG_ENABLE(dbus,
[ --enable-dbus[[=no/yes]] compile with dbus support [[default: yes]]],
ENABLE_DBUS="$enableval", ENABLE_DBUS="yes")
AM_CONDITIONAL(ENABLE_DBUS, test "x$ENABLE_DBUS" != "xno")
AC_ARG_WITH(dbus_service_dir, [ --with-dbus-service-dir=DIR Where to install Tomboy's DBus service file.])
AM_CONDITIONAL(WITH_DBUS_SERVICE_DIR, test "x$with_dbus_service_dir" != "x")
if test "x$with_dbus_service_dir" != "x"; then
DBUS_SERVICE_DIR=$with_dbus_service_dir
else
DBUS_SERVICE_DIR=${datadir}/dbus-1/services
fi
AC_SUBST(DBUS_SERVICE_DIR)
#
# Check for external NDesk DBus
#
DBUS_LIBS=
if test "x$ENABLE_DBUS" != "xno" ; then
PKG_CHECK_MODULES(DBUS, ndesk-dbus-1.0 >= 0.4 ndesk-dbus-glib-1.0 >= 0.3)
fi
AC_SUBST(DBUS_LIBS)
#
# Check for Mono.Addins
#
PKG_CHECK_MODULES(MONO_ADDINS, mono-addins >= 0.3 \
mono-addins-gui >= 0.3 \
mono-addins-setup >= 0.3)
#
# Tomboy.exe needs Gtk# Gnome# GConf#
#
GTKSHARP2_MINIMUM_VERSION=2.10.1
GNOMESHARP_MINIMUM_VERSION=2.15
if test "x$ENABLE_GNOME" != "xno"; then
if pkg-config --atleast-version=2.23.90 gnome-sharp-2.0; then
PKG_CHECK_MODULES(GNOME,
gnome-sharp-2.0
gconf-sharp-2.0
gconf-sharp-peditors-2.0
gnome-panel-sharp-2.24)
has_fixed_panelapplet="yes"
else
if pkg-config --atleast-version=2.16.1 gconf-sharp-2.0; then
PKG_CHECK_MODULES(GNOME,
gnome-sharp-2.0 > $GNOMESHARP_MINIMUM_VERSION
gconf-sharp-2.0
gconf-sharp-peditors-2.0)
else
PKG_CHECK_MODULES(GNOME,
gnome-sharp-2.0 > $GNOMESHARP_MINIMUM_VERSION
gconf-sharp-2.0)
fi
fi
fi
AM_CONDITIONAL(FIXED_PANELAPPLET, test "x$has_fixed_panelapplet" = "xyes")
AC_SUBST(GNOME_LIBS)
PKG_CHECK_MODULES(GTKSHARP,
gtk-sharp-2.0 >= $GTKSHARP2_MINIMUM_VERSION)
AC_SUBST(GTKSHARP_LIBS)
#
# Printing at least needs Mono.Cairo
#
required_assemblies="Mono.Cairo"
#
# This check stolen from banshee/build/m4/shamrock/mono.m4, because pkg-config
# seems to find the wrong Mono.Cairo (1.0).
#
for asm in $required_assemblies
do
AC_MSG_CHECKING([for Mono 2.0 GAC for $asm.dll])
if test \
-e "$($PKG_CONFIG --variable=libdir mono)/mono/2.0/$asm.dll" -o \
-e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/2.0/$asm.dll"; \
then \
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
AC_MSG_ERROR([missing reqired Mono 2.0 assembly: $asm.dll])
fi
done
#
# Evolution.dll needs GMime#
#
if test "x$ENABLE_GNOME" != "xno"; then
if pkg-config --exists gmime-sharp-2.4; then
PKG_CHECK_MODULES(EVOLUTION, gmime-sharp-2.4, ENABLE_EVOLUTION="yes", ENABLE_EVOLUTION="no")
else
PKG_CHECK_MODULES(EVOLUTION, gmime-sharp >= 2.2.7, ENABLE_EVOLUTION="yes", ENABLE_EVOLUTION="no")
fi
else
ENABLE_EVOLUTION=no
fi
AC_ARG_ENABLE(evolution,
[ --enable-evolution[[=no/yes]] compile evolution addin [[default: yes]]],
ENABLE_EVOLUTION="$enableval")
AM_CONDITIONAL(ENABLE_EVOLUTION, test "$ENABLE_EVOLUTION" = "yes")
AC_SUBST(EVOLUTION_LIBS)
#
# Sketching.dll is very sketchy; for now disable by default
#
AC_ARG_ENABLE(sketching,
[ --enable-sketching[[=no/yes]] compile sketching addin [[default: no]]],
ENABLE_SKETCHING="$enableval", ENABLE_SKETCHING="no")
AM_CONDITIONAL(ENABLE_SKETCHING, test "$ENABLE_SKETCHING" = "yes")
#
# GalagoPresence.dll needs Galago#
#
PKG_CHECK_MODULES(GALAGO, galago-sharp >= 0.5.0, ENABLE_GALAGO="yes", ENABLE_GALAGO="no")
if test "x$ENABLE_GNOME" = "xno" ; then
ENABLE_GALAGO=no
fi
AC_ARG_ENABLE(galago,
[ --enable-galago[[=no/yes]] compile galago addin [[default: yes]]],
ENABLE_GALAGO="$enableval")
AM_CONDITIONAL(ENABLE_GALAGO, test "$ENABLE_GALAGO" = "yes")
AC_SUBST(GALAGO_LIBS)
#
# NUnit required for (optional) unit tests
#
PKG_CHECK_MODULES(NUNIT, mono-nunit, HAVE_NUNIT="yes", HAVE_NUNIT="no")
AM_CONDITIONAL(HAVE_NUNIT, test "$HAVE_NUNIT" = "yes")
AC_SUBST(NUNIT_LIBS)
AC_PATH_PROG(NUNIT, nunit-console)
#
# Check for X11 libraries
#
ac_cflags_save="$CFLAGS"
ac_cppflags_save="$CPPFLAGS"
AC_PATH_XTRA
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
dnl now try to find the HEADER
AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no")
if test "x$HAVE_X" = "xno"
then
AC_MSG_ERROR([cannot find X11 development files])
else
dnl this is much more than we want
X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
dnl AC_PATH_XTRA only defines the path needed to find the X libs,
dnl it does not add the libs; therefore we add them here
X_LIBS="$X_LIBS -lX11"
AC_SUBST(X_CFLAGS)
AC_SUBST(X_LIBS)
fi
AC_SUBST(HAVE_X)
CFLAGS="$ac_cflags_save"
CPPFLAGS="$ac_cppflags_save"
#
# Replace xgettext by our PluginInfo aware wrapper script
#
XGETTEXT_XCOMMENT=`echo 'Test("1")' |\
xgettext -L C\# -k'Test:1,"XCOMMENT"' -o- - |\
grep XCOMMENT`
# Test to see if comments are supported in xgettext
# (known to work in 0.15 but not in 0.14.5)
if test "x#. XCOMMENT" = "x${XGETTEXT_XCOMMENT}"; then
XGETTEXT_PLUGIN_NAME=',"Plugin Name"'
XGETTEXT_PLUGIN_DESC=',"Plugin Description"'
else
XGETTEXT_PLUGIN_NAME=
XGETTEXT_PLUGIN_DESC=
fi
AC_SUBST(XGETTEXT_PLUGIN_NAME)
AC_SUBST(XGETTEXT_PLUGIN_DESC)
INTLTOOL_UPDATE="XGETTEXT=\$(top_builddir)/pot-update $INTLTOOL_UPDATE"
AC_CONFIG_FILES([pot-update], [chmod +x pot-update])
AC_OUTPUT([
Makefile
tomboy.spec
data/Makefile
data/tomboy-addins.pc
data/icons/Makefile
help/Makefile
libtomboy/Makefile
Tomboy/Makefile
Tomboy/Addins/Makefile
Tomboy/Addins/Backlinks/Makefile
Tomboy/Addins/Bugzilla/Makefile
Tomboy/Addins/Evolution/Makefile
Tomboy/Addins/ExportToHtml/Makefile
Tomboy/Addins/FileSystemSyncService/Makefile
Tomboy/Addins/FixedWidth/Makefile
Tomboy/Addins/GalagoPresence/Makefile
Tomboy/Addins/InsertTimestamp/Makefile
Tomboy/Addins/NoteOfTheDay/Makefile
Tomboy/Addins/PrintNotes/Makefile
Tomboy/Addins/Sketching/Makefile
Tomboy/Addins/SshSyncService/Makefile
Tomboy/Addins/StickyNoteImport/Makefile
Tomboy/Addins/Tasque/Makefile
Tomboy/Addins/Underline/Makefile
Tomboy/Addins/WebDavSyncService/Makefile
Tomboy/Addins/WebSyncService/Makefile
Tomboy/Addins/NoteDirectoryWatcher/Makefile
test/Makefile
po/Makefile.in
])
echo "
${PACKAGE}-${VERSION}
Install Prefix: ${prefix}
GNOME Support: ${ENABLE_GNOME}
Mac OS X Support: ${ENABLE_OSX}
Windows Support: ${ENABLE_WIN}
D-Bus Support: ${ENABLE_DBUS}
Evolution Add-in: ${ENABLE_EVOLUTION}
Galago Add-in: ${ENABLE_GALAGO}
Sketching Add-in: ${ENABLE_SKETCHING}
"
|