forked from jimevins/glabels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
382 lines (310 loc) · 12.3 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
dnl Process this file with autoconf to produce a configure script.
dnl ---------------------------------------------------------------------------
dnl - GLABELS version
dnl ---------------------------------------------------------------------------
m4_define([glabels_major_version], [3])
m4_define([glabels_minor_version], [4])
m4_define([glabels_micro_version], [0])
m4_define([glabels_version],
[glabels_major_version.glabels_minor_version.glabels_micro_version])
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.64)
AC_INIT([glabels],[glabels_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=glabels],
[glabels])
AC_CONFIG_SRCDIR(src/glabels.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS(config.h)
IT_PROG_INTLTOOL([0.21])
PKG_PROG_PKG_CONFIG
LT_INIT
YELP_HELP_INIT
GTK_DOC_CHECK(1.0)
GLIB_GSETTINGS
AC_SEARCH_LIBS([strerror],[cposix])
AC_PROG_CC
AC_PROG_INSTALL
GNOME_COMPILE_WARNINGS
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache)
dnl ---------------------------------------------------------------------------
dnl - GLABELS branch
dnl ---------------------------------------------------------------------------
GLABELS_BRANCH=glabels-3.0
AC_SUBST(GLABELS_BRANCH)
dnl ---------------------------------------------------------------------------
dnl - LIBGLABELS branch
dnl ---------------------------------------------------------------------------
LIBGLABELS_BRANCH=libglabels-3.0
AC_SUBST(LIBGLABELS_BRANCH)
dnl ---------------------------------------------------------------------------
dnl - LIBGLBARCODE branch
dnl ---------------------------------------------------------------------------
LIBGLBARCODE_BRANCH=libglbarcode-3.0
AC_SUBST(LIBGLBARCODE_BRANCH)
dnl ---------------------------------------------------------------------------
dnl - LIBGLABELS API versioning
dnl ---------------------------------------------------------------------------
dnl From the libtool manual:
dnl 1. Start with version information of `0:0:0' for each libtool library.
dnl 2. Update the version information only immediately before a public release.
dnl More frequent updates are unnecessary, and only guarantee that the current
dnl interface number gets larger faster.
dnl 3. If the library source code has changed at all since the last update, then increment
dnl revision (`c:r:a' becomes `c:r+1:a').
dnl 4. If any interfaces have been added, removed, or changed since the last update,
dnl increment current, and set revision to 0.
dnl 5. If any interfaces have been added since the last public release, then increment age.
dnl 6. If any interfaces have been removed since the last public release, then set age
dnl to 0.
LIBGLABELS_C=8
LIBGLABELS_R=0
LIBGLABELS_A=0
LIBGLABELS_API_VERSION=${LIBGLABELS_C}:${LIBGLABELS_R}:${LIBGLABELS_A}
AC_SUBST(LIBGLABELS_API_VERSION)
dnl ---------------------------------------------------------------------------
dnl - LIBGLBARCODE API versioning
dnl ---------------------------------------------------------------------------
dnl From the libtool manual:
dnl 1. Start with version information of `0:0:0' for each libtool library.
dnl 2. Update the version information only immediately before a public release.
dnl More frequent updates are unnecessary, and only guarantee that the current
dnl interface number gets larger faster.
dnl 3. If the library source code has changed at all since the last update, then increment
dnl revision (`c:r:a' becomes `c:r+1:a').
dnl 4. If any interfaces have been added, removed, or changed since the last update,
dnl increment current, and set revision to 0.
dnl 5. If any interfaces have been added since the last public release, then increment age.
dnl 6. If any interfaces have been removed since the last public release, then set age
dnl to 0.
LIBGLBARCODE_C=0
LIBGLBARCODE_R=0
LIBGLBARCODE_A=0
LIBGLBARCODE_API_VERSION=${LIBGLBARCODE_C}:${LIBGLBARCODE_R}:${LIBGLBARCODE_A}
AC_SUBST(LIBGLBARCODE_API_VERSION)
dnl ---------------------------------------------------------------------------
dnl - Library dependencies
dnl ---------------------------------------------------------------------------
dnl Required dependencies
GLIB_REQUIRED=2.42.0
GTK_REQUIRED=3.14.0
LIBXML_REQUIRED=2.9.0
LIBRSVG_REQUIRED=2.39.0
CAIRO_REQUIRED=1.14.0
PANGO_REQUIRED=1.36.0
dnl Optional dependencies
LIBEBOOK_REQUIRED=3.12.0
LIBBARCODE_REQUIRED=0.98
LIBQRENCODE_REQUIRED=3.1.0
LIBIEC16022_REQUIRED=0.2.4
LIBZINT_REQUIRED=2.4.0
dnl Make above strings available for packaging files (e.g. rpm spec files)
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
AC_SUBST(LIBXML_REQUIRED)
AC_SUBST(LIBRSVG_REQUIRED)
AC_SUBST(CAIRO_REQUIRED)
AC_SUBST(PANGO_REQUIRED)
AC_SUBST(LIBEBOOK_REQUIRED)
AC_SUBST(LIBBARCODE_REQUIRED)
AC_SUBST(LIBQRENCODE_REQUIRED)
AC_SUBST(LIBIEC16022_REQUIRED)
AC_SUBST(LIBZINT_REQUIRED)
dnl ---------------------------------------------------------------------------
dnl - GLABELS prerequisites
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(GLABELS, [\
glib-2.0 >= $GLIB_REQUIRED \
gtk+-3.0 >= $GTK_REQUIRED \
libxml-2.0 >= $LIBXML_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
])
AC_SUBST(GLABELS_CFLAGS)
AC_SUBST(GLABELS_LIBS)
dnl ---------------------------------------------------------------------------
dnl - LIBGLABELS more modest prerequisites
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(LIBGLABELS, [\
glib-2.0 >= $GLIB_REQUIRED \
gobject-2.0 >= $GLIB_REQUIRED \
libxml-2.0 >= $LIBXML_REQUIRED \
])
AC_SUBST(LIBGLABELS_CFLAGS)
AC_SUBST(LIBGLABELS_LIBS)
dnl ---------------------------------------------------------------------------
dnl - LIBGLBARCODE more modest prerequisites
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(LIBGLBARCODE, [\
glib-2.0 >= $GLIB_REQUIRED \
cairo >= $CAIRO_REQUIRED \
pango >= $PANGO_REQUIRED \
pangocairo >= $PANGO_REQUIRED \
])
AC_SUBST(LIBGLBARCODE_CFLAGS)
AC_SUBST(LIBGLBARCODE_LIBS)
dnl ---------------------------------------------------------------------------
dnl - Check for optional evolution data server
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libebook,
[AS_HELP_STRING([--without-libebook],[build without Evolution Data Server support])])
have_libebook=no
if test "x$with_libebook" != xno; then
PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2 >= $LIBEBOOK_REQUIRED,
[have_libebook=yes], [have_libebook=no])
fi
if test "x$have_libebook" = "xyes"; then
AC_DEFINE(HAVE_LIBEBOOK,1,[Define to 1 for EDS support])
AC_SUBST(LIBEBOOK_CFLAGS)
AC_SUBST(LIBEBOOK_LIBS)
fi
dnl ---------------------------------------------------------------------------
dnl - Check for optional GNU Barcode backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libbarcode,
[AS_HELP_STRING([--without-libbarcode],[build without GNU Barcode support])])
have_libbarcode=no
if test "x$with_libbarcode" != xno; then
AC_CHECK_LIB(barcode, Barcode_Create,
[have_libbarcode=yes], [have_libbarcode=no])
fi
if test "x$have_libbarcode" = "xyes"; then
AC_DEFINE(HAVE_LIBBARCODE,1,[Define to 1 for GNU Barcode support])
LIBBARCODE_CFLAGS=""
LIBBARCODE_LIBS="-lbarcode"
AC_SUBST(LIBBARCODE_CFLAGS)
AC_SUBST(LIBBARCODE_LIBS)
else
help_libbarcode="(See http://www.gnu.org/software/barcode/barcode.html)"
fi
dnl ---------------------------------------------------------------------------
dnl - Check for optional Zint backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libzint,
[AS_HELP_STRING([--without-libzint],[build without Zint Barcode support])])
have_libzint=no
if test "x$with_libzint" != xno; then
AC_CHECK_LIB(zint, ZBarcode_Render,
[have_libzint=yes], [have_libzint=no])
fi
if test "x$have_libzint" = "xyes"; then
AC_DEFINE(HAVE_LIBZINT,1,[Define to 1 for Zint Barcode support])
LIBZINT_CFLAGS=""
LIBZINT_LIBS="-lzint"
AC_SUBST(LIBZINT_CFLAGS)
AC_SUBST(LIBZINT_LIBS)
else
help_libzint="(See http://www.zint.org.uk)"
fi
dnl ---------------------------------------------------------------------------
dnl - Check for optional QRencode Barcode backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libqrencode,
[AS_HELP_STRING([--without-libqrencode],[build without QR code support])])
have_libqrencode=no
if test "x$with_libqrencode" != xno; then
PKG_CHECK_MODULES(LIBQRENCODE, libqrencode >= $LIBQRENCODE_REQUIRED,
[have_libqrencode=yes], [have_libqrencode=no])
fi
if test "x$have_libqrencode" = "xyes"; then
AC_DEFINE(HAVE_LIBQRENCODE,1,[Define to 1 for QR code support])
AC_SUBST(LIBQRENCODE_CFLAGS)
AC_SUBST(LIBQRENCODE_LIBS)
else
help_libqrencode="(See http://megaui.net/fukuchi/works/qrencode/index.en.html)"
fi
dnl ---------------------------------------------------------------------------
dnl - Check for IEC16022 Barcode backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libiec16022,
[AS_HELP_STRING([--without-libiec16022],[build without IEC 16022 support])])
have_libiec16022=no
if test "x$with_libiec16022" != xno; then
PKG_CHECK_MODULES(LIBIEC16022, libiec16022 >= $LIBIEC16022_REQUIRED,
[have_libiec16022=yes], [have_libiec16022=no])
fi
if test "x$have_libiec16022" = "xyes"; then
AC_DEFINE(HAVE_LIBIEC16022,1,[Define to 1 for IEC 16022 support])
AC_SUBST(LIBIEC16022_CFLAGS)
AC_SUBST(LIBIEC16022_LIBS)
else
help_libiec16022="(See http://datenfreihafen.org/projects/iec16022.html)"
fi
dnl ---------------------------------------------------------------------------
dnl - Enable deprecation testing
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(deprecations,
[AS_HELP_STRING([--enable-deprecations],[warn about deprecated usages [default=no]])],,
[enable_deprecations=no])
if test "x$enable_deprecations" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS="\
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
"
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
dnl ---------------------------------------------------------------------------
dnl - i18n support
dnl ---------------------------------------------------------------------------
GETTEXT_PACKAGE=${GLABELS_BRANCH}
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
dnl ---------------------------------------------------------------------------
dnl - Makefiles, etc.
dnl ---------------------------------------------------------------------------
AC_CONFIG_FILES([
Makefile
libglabels/Makefile
libglabels/${LIBGLABELS_BRANCH}.pc
libglbarcode/Makefile
libglbarcode/${LIBGLBARCODE_BRANCH}.pc
src/Makefile
src/cursors/Makefile
src/pixmaps/Makefile
data/Makefile
data/appdata/Makefile
data/desktop/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/22x22/Makefile
data/icons/24x24/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/scalable/Makefile
data/man/Makefile
data/mime/Makefile
data/pixmaps/Makefile
data/schemas/Makefile
data/schemas/org.gnome.glabels-3.gschema.xml.in
data/ui/Makefile
templates/Makefile
po/Makefile.in
help/Makefile
docs/Makefile
docs/libglabels/Makefile
docs/libglbarcode/Makefile
glabels.spec
])
AC_OUTPUT
dnl ---------------------------------------------------------------------------
dnl - Print configuration information
dnl ---------------------------------------------------------------------------
echo "
Configuration:
Package ................. ${PACKAGE}-${VERSION}
Installation prefix ..... ${prefix}
Source code location .... ${srcdir}
Compiler ................ ${CC}
Optional data merge backends:
Evolution Data Server ... ${have_libebook}
Optional barcode backends:
GNU Barcode ............. ${have_libbarcode} ${help_libbarcode}
QR Code ................. ${have_libqrencode} ${help_libqrencode}
IEC 16022 ............... ${have_libiec16022} ${help_libiec16022}
Zint .................... ${have_libzint} ${help_libzint}
"