forked from f-spot/f-spot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
402 lines (319 loc) · 11.1 KB
/
configure.ac
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
dnl Granularly define the version components
dnl Remember to also update the Display Version
m4_define([fspot_version_major], [0])
m4_define([fspot_version_minor], [9])
m4_define([fspot_version_micro], [0])
dnl set to 0 when doing an official release
m4_define([fspot_version_pre_release], [0])
m4_define([concat], $1$2$3$4)
dnl create base version string
m4_define([fspot_version], concat(
fspot_version_major.,
fspot_version_minor.,
fspot_version_micro))
dnl create the release version
m4_define([fspot_version],
m4_if(fspot_version_pre_release, [0],
fspot_version,
concat(fspot_version, fspot_version_pre_release)))
dnl this can sometimes differ manually
m4_define([fspot_display_version],
["0.9.0"])
m4_define([fspot_api_version],
[fspot_version_major.fspot_version_minor])
m4_define([fspot_asm_version],
[fspot_api_version.0.0])
AC_PREREQ(2.52)
AC_INIT([f-spot], fspot_version,
[http://bugzilla.gnome.org/enter_bug.cgi?product=f-spot])
AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar dist-zip foreign])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([build/m4])
AC_SUBST([ACLOCAL_AMFLAGS], ["-I build/m4/shamrock -I build/m4/f-spot \${ACLOCAL_FLAGS}"])
IT_PROG_INTLTOOL([0.35.0])
AC_PROG_LIBTOOL
AC_PROG_INSTALL
dnl How to configure for distcheck
DISTCHECK_CONFIGURE_FLAGS="--disable-docs --enable-release"
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
dnl Export Version Info
AC_SUBST([API_VERSION], [fspot_api_version])
AC_SUBST([ASM_VERSION], [fspot_asm_version])
AC_SUBST([DISPLAY_VERSION], [fspot_display_version])
dnl Expansions
SHAMROCK_EXPAND_LIBDIR
SHAMROCK_EXPAND_BINDIR
SHAMROCK_EXPAND_DATADIR
dnl User help
SHAMROCK_CHECK_GNOME_DOC_UTILS(0.17.3)
dnl Mono and gmcs
SHAMROCK_CHECK_MONO_MODULE(2.2)
SHAMROCK_FIND_MONO_2_0_COMPILER
SHAMROCK_FIND_MONO_RUNTIME
SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
Mono.Posix
Mono.Simd
System
System.Runtime.Remoting
System.Web
System.Web.Services
System.Data
Mono.Cairo
ICSharpCode.SharpZipLib
])
FSPOT_CHECK_LIBFSPOT
dnl --- Checks for gtk-sharp and glib-sharp
FSPOT_CHECK_GTK_SHARP
FSPOT_CHECK_GNOME_KEYRING_SHARP
FSPOT_CHECK_FLICKRNET
SHAMROCK_CHECK_NUNIT
FSPOT_CHECK_MONO_ADDINS
FSPOT_CHECK_DBUS_SHARP
FSPOT_CHECK_TAGLIB_SHARP
FSPOT_CHECK_GNOME_SHARP
# ---------------------------------- <Old build stuff>
dnl --- Check for mono and gmcs
AC_PATH_PROG(MONO, mono)
AC_PATH_PROG(MCS, gmcs)
CS="C#"
if test ! -x "$MCS"; then
AC_MSG_ERROR([No $CS compiler found])
fi
dnl --- Check for gapi programs
AC_PATH_PROG(GAPI2FIXUP, gapi2-fixup, no)
if test ! -x "$GAPI2FIXUP"; then
AC_MSG_ERROR([No gapi post-processor found])
fi
AC_PATH_PROG(GAPI2PARSER, gapi2-parser, no)
if test ! -x "$GAPI2PARSER"; then
AC_MSG_ERROR([No gapi parser found])
fi
AC_PATH_PROG(GAPI2CODEGEN, gapi2-codegen, no)
if test ! -x "$GAPI2CODEGEN"; then
AC_MSG_ERROR([No gapi code generator found])
fi
dnl -- Check for mono pc file
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
dnl --- Required libraries
LIBGNOMEDESKTOP_REQUIRED=2.17
GIO_REQUIRED=2.22.0
GTKSHARPBEANS_REQUIRED=2.13.92
GTK_REQUIRED=2.14
MONO_CAIRO_REQUIRED=1.2.5
CAIRO_REQUIRED=1.4.0
LCMS_REQUIRED=1.12
PKG_CHECK_MODULES(F, gnome-desktop-2.0 >= $LIBGNOMEDESKTOP_REQUIRED gtk+-2.0 >= $GTK_REQUIRED mono-cairo >= $MONO_CAIRO_REQUIRED cairo >= $CAIRO_REQUIRED)
AC_SUBST(F_CFLAGS)
AC_SUBST(F_LIBS)
PKG_CHECK_MODULES(GIO, gio-2.0 >= $GIO_REQUIRED)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
CSC_DEFINES=""
PKG_CHECK_MODULES(GNOME_SHARP, gnome-sharp-2.0 >= 2.8)
PKG_CHECK_MODULES(GLIBSHARP, glib-sharp-2.0 >= 2.12)
if pkg-config --atleast-version=2.13.0 gtk-sharp-2.0 && pkg-config --max-version=2.14 gtk-sharp-2.0; then
AC_MSG_ERROR([There is a svn version of gtk-sharp 2.13.x installed. Uninstall it.])
fi
dnl --- GConf
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
PKG_CHECK_MODULES(GCONF_SHARP, gconf-sharp-2.0 >= $GTKSHARP_REQUIRED)
if pkg-config --atleast-version=2.18 gconf-sharp-2.0; then
CSC_DEFINES="$CSC_DEFINES -d:GCONF_SHARP_2_18"
fi
if pkg-config --atleast-version=2.20.2 gconf-sharp-2.0; then
CSC_DEFINES="$CSC_DEFINES -d:GCONF_SHARP_2_20_2"
fi
AC_SUBST(CSC_DEFINES)
dnl --- libjpeg
AC_CHECK_LIB(jpeg, jpeg_start_decompress, [],
[AC_MSG_ERROR([libjpeg not found])], -lm)
AC_CHECK_HEADER(jpeglib.h, , [AC_MSG_ERROR([libjpeg not found])])
LIBJPEG='-ljpeg'
dnl --- lcms
PKG_CHECK_MODULES(LCMS, lcms >= $LCMS_REQUIRED, [],
[AC_CHECK_LIB(lcms, cmsCreateBCHSWabstractProfile, [],
[AC_MSG_ERROR([liblcms not found])], -lm)
AC_CHECK_HEADER(lcms.h, , [AC_MSG_ERROR([liblcms not found])])
LCMS_LIBS='-llcms'
LCMS_CFLAGS=''])
dnl --- libunique check
PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= 1.0)
dnl --- Set up paths
AC_ARG_WITH(turtle, [ --with-turtle=DIR set path to source directory for turtle])
AM_CONDITIONAL(WITH_TURTLE, test "x$with_turtle" != "xno")
if test "x$with_turtle" != "xno"; then
TURTLEDIR=$with_turtle
AC_SUBST(TURTLEDIR)
fi
AC_ARG_WITH(gnome-screensaver,
[ --with-gnome-screensaver=PREFIX set gnome gnome-screensaver prefix],
gnome_screensaver_prefix=$with_gnome_screensaver,
gnome_screensaver_prefix=$prefix)
AC_ARG_WITH(gnome-screensaver-privlibexecdir,
[ --with-gnome-screensaver-privlibexecdir=DIR set gnome-screensaver privlibexecdir],
GNOME_SCREENSAVER_SAVERDIR=$with_gnome_screensaver_privlibexecdir,
if test -d $gnome_screensaver_prefix/lib/gnome-screensaver; then
GNOME_SCREENSAVER_SAVERDIR=$gnome_screensaver_prefix/lib/gnome-screensaver
else
GNOME_SCREENSAVER_SAVERDIR=$gnome_screensaver_prefix/libexec/gnome-screensaver
fi)
AC_ARG_WITH(gnome-screensaver-themesdir,
[ --with-gnome-screensaver-themesdir=DIR set gnome-screensaver themesdir],
GNOME_SCREENSAVER_THEMESDIR=$with_gnome_screensaver_themesdir,
GNOME_SCREENSAVER_THEMESDIR=$gnome_screensaver_prefix/share/applications/screensavers
)
AC_SUBST(GNOME_SCREENSAVER_SAVERDIR)
AC_SUBST(GNOME_SCREENSAVER_THEMESDIR)
ICONS_DIRECTORY=${datadir}/${PACKAGE}-${VERSION}
AC_SUBST(ICONS_DIRECTORY)
dnl -- Intl
GETTEXT_PACKAGE=f-spot
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
dnl --- Prologue
AC_SUBST(LIBJPEG)
AC_SUBST(LCMS_LIBS)
AC_SUBST(LCMS_CFLAGS)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_CONFIG_FILES([src/Clients/MainApp/f-spot],[chmod +x src/Clients/MainApp/f-spot])
GNOME_ICON_THEME_PREFIX=`$PKG_CONFIG --variable=prefix gnome-icon-theme`
AC_SUBST(GNOME_ICON_THEME_PREFIX)
# ---------------------------------- </Old build stuff>
AC_ARG_ENABLE(release,
AC_HELP_STRING([--enable-release],
[Use release configuration]),
enable_release=yes, enable_release=`(test ! -d .svn && test ! -d .git) && echo "yes" || echo "no"`)
AM_CONDITIONAL(ENABLE_RELEASE, test "x$enable_release" = "xyes")
ENABLE_RELEASE=$enable_release
AC_SUBST(ENABLE_RELEASE)
if test "x$enable_release" = "xyes"; then
GMCS_FLAGS="-define:RELEASE"
# FIXME: Enable as soon as we rock sufficiently
#else
# GMCS_FLAGS="-warnaserror"
fi
AC_SUBST(GMCS_FLAGS)
AM_CONDITIONAL(HYENA_PKG_CONFIG, false)
AC_ARG_WITH(vendor-build-id,
AC_HELP_STRING([--with-vendor-build-id=<vendor-build-id>],
[Set a vendor build ID, recommended for packagers]),
[vendor_build_id="$withval"], [
test -d .git \
&& vendor_build_id="git-checkout" \
|| vendor_build_id="source-tarball"
])
BUILD_VENDOR_ID="$vendor_build_id"
BUILD_HOST_OS="$host_os"
BUILD_HOST_CPU="$host_cpu"
BUILD_TIME=`date +"%F %T %Z"`
AC_SUBST(BUILD_VENDOR_ID)
AC_SUBST(BUILD_HOST_OS)
AC_SUBST(BUILD_HOST_CPU)
AC_SUBST(BUILD_TIME)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl generated files
AC_OUTPUT([
Makefile
build/Makefile
build/m4/Makefile
build/pkg-config/Makefile
data/Makefile
data/desktop-files/Makefile
data/desktop-files/f-spot.desktop.in
data/desktop-files/f-spot-view.desktop.in
data/desktop-files/f-spot-import.desktop.in
help/Makefile
lib/Hyena/build/m4/Makefile
lib/Hyena/build/Makefile
lib/Hyena/build/pkg-config/Makefile
lib/Hyena/Hyena.Data.Sqlite/Makefile
lib/Hyena/Hyena.Gui/Makefile
lib/Hyena/Hyena/Makefile
lib/Hyena/Makefile
lib/libfspot/Makefile
lib/Makefile
src/AssemblyInfo.cs
src/Makefile
src/Core/Makefile
src/Core/FSpot.Bling/Makefile
src/Core/FSpot.Cms/Makefile
src/Core/FSpot.Cms/FSpot.Cms.dll.config
src/Core/FSpot.Core/Makefile
src/Core/FSpot.Core/FSpot.Core.dll.config
src/Core/FSpot.Core/FSpot.Core/Defines.cs
src/Core/FSpot.JobScheduler/Makefile
src/Core/FSpot.Utils/Makefile
src/Core/FSpot.Utils/FSpot.Utils.dll.config
src/Core/FSpot.Query/Makefile
src/Core/FSpot.Gui/Makefile
src/Core/FSpot.Gui/FSpot.Gui.dll.config
src/Core/FSpot.Platform/Makefile
src/Clients/Makefile
src/Clients/MainApp/Makefile
src/Clients/MainApp/f-spot.exe.config
src/Extensions/Makefile
src/Extensions/Editors/Makefile
src/Extensions/Editors/FSpot.Editors.Blackout/Makefile
src/Extensions/Editors/FSpot.Editors.BW/Makefile
src/Extensions/Editors/FSpot.Editors.Flip/Makefile
src/Extensions/Editors/FSpot.Editors.Pixelate/Makefile
src/Extensions/Editors/FSpot.Editors.Resize/Makefile
src/Extensions/Exporters/Makefile
src/Extensions/Exporters/FSpot.Exporters.CD/Makefile
src/Extensions/Exporters/FSpot.Exporters.Flickr/Makefile
src/Extensions/Exporters/FSpot.Exporters.Gallery/Makefile
src/Extensions/Exporters/FSpot.Exporters.Facebook/Makefile
src/Extensions/Exporters/FSpot.Exporters.Folder/Makefile
src/Extensions/Exporters/FSpot.Exporters.SmugMug/Makefile
src/Extensions/Exporters/FSpot.Exporters.Tabblo/Makefile
src/Extensions/Exporters/FSpot.Exporters.PicasaWeb/Makefile
src/Extensions/Exporters/FSpot.Exporters.Zip/Makefile
src/Extensions/Tools/Makefile
src/Extensions/Tools/FSpot.Tools.RawPlusJpeg/Makefile
src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Makefile
src/Extensions/Tools/FSpot.Tools.DevelopInUFraw/Makefile
src/Extensions/Tools/FSpot.Tools.LiveWebGallery/Makefile
src/Extensions/Tools/FSpot.Tools.MergeDb/Makefile
src/Extensions/Tools/FSpot.Tools.RetroactiveRoll/Makefile
src/Extensions/Tools/FSpot.Tools.ScreensaverConfig/Makefile
src/Extensions/Transitions/Makefile
src/Extensions/Transitions/FSpot.Transitions.Cover/Makefile
src/Extensions/Transitions/FSpot.Transitions.Dissolve/Makefile
src/Extensions/Transitions/FSpot.Transitions.Push/Makefile
docs/Makefile
icons/Makefile
tools/Makefile
po/Makefile.in
tests/Makefile
])
cat <<EOF
${PACKAGE}-${VERSION}
Build Environment
Install Prefix: ${prefix}
Datadir: ${expanded_datadir}
Libdir: ${expanded_libdir}
C Compiler: ${CC}
Mono C# Compiler: ${MCS} ${GMCS_FLAGS}
Mono Runtime: ${MONO}
Build/Development:
Unit Tests: ${do_tests}
User Help: ${enable_user_help} (requires gnome-doc-utils >= 0.17.3)
Run 'make' to build F-Spot.
EOF
if test -d ${expanded_libdir}/${PACKAGE}; then
if test x$br = xyes; then echo; fi
echo " WARNING: An existing F-Spot install is in ${expanded_libdir}/${PACKAGE}"
echo " Remove the existing install before installing this build."
echo " Installing over an existing install will cause conflicts!"
echo
fi