]> git.sur5r.net Git - glabels/blob - configure.ac
Reconcile whitespace styles.
[glabels] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3
4 dnl ---------------------------------------------------------------------------
5 dnl - GLABELS version
6 dnl ---------------------------------------------------------------------------
7 m4_define([glabels_major_version], [3])
8 m4_define([glabels_minor_version], [2])
9 m4_define([glabels_micro_version], [1+])
10
11 m4_define([glabels_version],
12           [glabels_major_version.glabels_minor_version.glabels_micro_version])
13
14 dnl ---------------------------------------------------------------------------
15
16
17 AC_PREREQ(2.64)
18 AC_INIT([glabels],[glabels_version],
19         [http://bugzilla.gnome.org/enter_bug.cgi?product=glabels],
20         [glabels])
21
22 AC_CONFIG_SRCDIR(src/glabels.c)
23
24 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
25
26 AM_MAINTAINER_MODE
27 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
28
29 AC_CONFIG_HEADERS(config.h)
30
31 IT_PROG_INTLTOOL([0.21])
32
33 PKG_PROG_PKG_CONFIG
34
35 LT_INIT
36
37 YELP_HELP_INIT
38 GTK_DOC_CHECK(1.0)
39
40 GLIB_GSETTINGS
41
42 AC_SEARCH_LIBS([strerror],[cposix])
43 AC_PROG_CC
44 AC_PROG_INSTALL
45
46 GNOME_COMPILE_WARNINGS
47
48 AC_PATH_PROG(GLIB_GENMARSHAL,         glib-genmarshal)
49 AC_PATH_PROG(GDK_PIXBUF_CSOURCE,      gdk-pixbuf-csource)
50 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE,   gtk-update-icon-cache)
51
52
53 dnl ---------------------------------------------------------------------------
54 dnl - GLABELS branch
55 dnl ---------------------------------------------------------------------------
56 GLABELS_BRANCH=glabels-3.0
57 AC_SUBST(GLABELS_BRANCH)
58
59 dnl ---------------------------------------------------------------------------
60 dnl - LIBGLABELS branch
61 dnl ---------------------------------------------------------------------------
62 LIBGLABELS_BRANCH=libglabels-3.0
63 AC_SUBST(LIBGLABELS_BRANCH)
64
65 dnl ---------------------------------------------------------------------------
66 dnl - LIBGLBARCODE branch
67 dnl ---------------------------------------------------------------------------
68 LIBGLBARCODE_BRANCH=libglbarcode-3.0
69 AC_SUBST(LIBGLBARCODE_BRANCH)
70
71 dnl ---------------------------------------------------------------------------
72 dnl - LIBGLABELS API versioning
73 dnl ---------------------------------------------------------------------------
74 dnl From the libtool manual:
75 dnl 1. Start with version information of `0:0:0' for each libtool library.
76 dnl 2. Update the version information only immediately before a public release.
77 dnl    More frequent updates are unnecessary, and only guarantee that the current
78 dnl    interface number gets larger faster.
79 dnl 3. If the library source code has changed at all since the last update, then increment
80 dnl    revision (`c:r:a' becomes `c:r+1:a').
81 dnl 4. If any interfaces have been added, removed, or changed since the last update,
82 dnl    increment current, and set revision to 0.
83 dnl 5. If any interfaces have been added since the last public release, then increment age.
84 dnl 6. If any interfaces have been removed since the last public release, then set age
85 dnl    to 0.
86 LIBGLABELS_C=8
87 LIBGLABELS_R=0
88 LIBGLABELS_A=0
89
90 LIBGLABELS_API_VERSION=${LIBGLABELS_C}:${LIBGLABELS_R}:${LIBGLABELS_A}
91 AC_SUBST(LIBGLABELS_API_VERSION)
92
93 dnl ---------------------------------------------------------------------------
94 dnl - LIBGLBARCODE API versioning
95 dnl ---------------------------------------------------------------------------
96 dnl From the libtool manual:
97 dnl 1. Start with version information of `0:0:0' for each libtool library.
98 dnl 2. Update the version information only immediately before a public release.
99 dnl    More frequent updates are unnecessary, and only guarantee that the current
100 dnl    interface number gets larger faster.
101 dnl 3. If the library source code has changed at all since the last update, then increment
102 dnl    revision (`c:r:a' becomes `c:r+1:a').
103 dnl 4. If any interfaces have been added, removed, or changed since the last update,
104 dnl    increment current, and set revision to 0.
105 dnl 5. If any interfaces have been added since the last public release, then increment age.
106 dnl 6. If any interfaces have been removed since the last public release, then set age
107 dnl    to 0.
108 LIBGLBARCODE_C=0
109 LIBGLBARCODE_R=0
110 LIBGLBARCODE_A=0
111
112 LIBGLBARCODE_API_VERSION=${LIBGLBARCODE_C}:${LIBGLBARCODE_R}:${LIBGLBARCODE_A}
113 AC_SUBST(LIBGLBARCODE_API_VERSION)
114
115 dnl ---------------------------------------------------------------------------
116 dnl - Library dependencies
117 dnl ---------------------------------------------------------------------------
118 dnl Required dependencies
119 GLIB_REQUIRED=2.28.2
120 GTK_REQUIRED=3.0.9
121 LIBXML_REQUIRED=2.7.8
122 LIBRSVG_REQUIRED=2.32.0
123 CAIRO_REQUIRED=1.10.0
124 PANGO_REQUIRED=1.28.1
125
126 dnl Optional dependencies
127 LIBEBOOK_REQUIRED=2.30.3
128 LIBBARCODE_REQUIRED=0.98
129 LIBQRENCODE_REQUIRED=3.1.0
130 LIBIEC16022_REQUIRED=0.2.4
131 LIBZINT_REQUIRED=2.4.0
132
133 dnl Make above strings available for packaging files (e.g. rpm spec files)
134 AC_SUBST(GLIB_REQUIRED)
135 AC_SUBST(GTK_REQUIRED)
136 AC_SUBST(LIBXML_REQUIRED)
137 AC_SUBST(LIBRSVG_REQUIRED)
138 AC_SUBST(CAIRO_REQUIRED)
139 AC_SUBST(PANGO_REQUIRED)
140 AC_SUBST(LIBEBOOK_REQUIRED)
141 AC_SUBST(LIBBARCODE_REQUIRED)
142 AC_SUBST(LIBQRENCODE_REQUIRED)
143 AC_SUBST(LIBIEC16022_REQUIRED)
144 AC_SUBST(LIBZINT_REQUIRED)
145
146
147 dnl ---------------------------------------------------------------------------
148 dnl - GLABELS prerequisites
149 dnl ---------------------------------------------------------------------------
150 PKG_CHECK_MODULES(GLABELS, [\
151         glib-2.0 >= $GLIB_REQUIRED \
152         gtk+-3.0 >= $GTK_REQUIRED \
153         libxml-2.0 >= $LIBXML_REQUIRED \
154         librsvg-2.0 >= $LIBRSVG_REQUIRED \
155 ])
156
157 AC_SUBST(GLABELS_CFLAGS)
158 AC_SUBST(GLABELS_LIBS)
159
160
161 dnl ---------------------------------------------------------------------------
162 dnl - LIBGLABELS more modest prerequisites
163 dnl ---------------------------------------------------------------------------
164 PKG_CHECK_MODULES(LIBGLABELS, [\
165         glib-2.0 >= $GLIB_REQUIRED \
166         gobject-2.0 >= $GLIB_REQUIRED \
167         libxml-2.0 >= $LIBXML_REQUIRED \
168 ])
169
170 AC_SUBST(LIBGLABELS_CFLAGS)
171 AC_SUBST(LIBGLABELS_LIBS)
172
173
174 dnl ---------------------------------------------------------------------------
175 dnl - LIBGLBARCODE more modest prerequisites
176 dnl ---------------------------------------------------------------------------
177 PKG_CHECK_MODULES(LIBGLBARCODE, [\
178         glib-2.0 >= $GLIB_REQUIRED \
179         cairo >= $CAIRO_REQUIRED \
180         pango >= $PANGO_REQUIRED \
181         pangocairo >= $PANGO_REQUIRED \
182 ])
183
184 AC_SUBST(LIBGLBARCODE_CFLAGS)
185 AC_SUBST(LIBGLBARCODE_LIBS)
186
187
188 dnl ---------------------------------------------------------------------------
189 dnl - Check for optional evolution data server
190 dnl ---------------------------------------------------------------------------
191 AC_ARG_WITH(libebook,
192             [AS_HELP_STRING([--without-libebook],[build without Evolution Data Server support])])
193 have_libebook=no
194 if test "x$with_libebook" != xno; then
195         PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2 >= $LIBEBOOK_REQUIRED,
196                           [have_libebook=yes], [have_libebook=no])
197 fi
198
199 if test "x$have_libebook" = "xyes"; then
200         AC_DEFINE(HAVE_LIBEBOOK,1,[Define to 1 for EDS support])
201         AC_SUBST(LIBEBOOK_CFLAGS)
202         AC_SUBST(LIBEBOOK_LIBS)
203 fi
204
205
206 dnl ---------------------------------------------------------------------------
207 dnl - Check for optional GNU Barcode backend
208 dnl ---------------------------------------------------------------------------
209 AC_ARG_WITH(libbarcode,
210             [AS_HELP_STRING([--without-libbarcode],[build without GNU Barcode support])])
211 have_libbarcode=no
212 if test "x$with_libbarcode" != xno; then
213    AC_CHECK_LIB(barcode, Barcode_Create,
214                 [have_libbarcode=yes], [have_libbarcode=no])
215 fi
216
217 if test "x$have_libbarcode" = "xyes"; then
218         AC_DEFINE(HAVE_LIBBARCODE,1,[Define to 1 for GNU Barcode support])
219         LIBBARCODE_CFLAGS=""
220         LIBBARCODE_LIBS="-lbarcode"
221         AC_SUBST(LIBBARCODE_CFLAGS)
222         AC_SUBST(LIBBARCODE_LIBS)
223 else
224         help_libbarcode="(See http://www.gnu.org/software/barcode/barcode.html)"
225 fi
226
227 dnl ---------------------------------------------------------------------------
228 dnl - Check for optional Zint backend
229 dnl ---------------------------------------------------------------------------
230 AC_ARG_WITH(libzint,
231             [AS_HELP_STRING([--without-libzint],[build without Zint Barcode support])])
232 have_libzint=no
233 if test "x$with_libzint" != xno; then
234    AC_CHECK_LIB(zint, ZBarcode_Render,
235                 [have_libzint=yes], [have_libzint=no])
236 fi
237
238 if test "x$have_libzint" = "xyes"; then
239         AC_DEFINE(HAVE_LIBZINT,1,[Define to 1 for Zint Barcode support])
240         LIBZINT_CFLAGS=""
241         LIBZINT_LIBS="-lzint"
242         AC_SUBST(LIBZINT_CFLAGS)
243         AC_SUBST(LIBZINT_LIBS)
244 else
245         help_libzint="(See http://www.zint.org.uk)"
246 fi
247
248
249 dnl ---------------------------------------------------------------------------
250 dnl - Check for optional QRencode Barcode backend
251 dnl ---------------------------------------------------------------------------
252 AC_ARG_WITH(libqrencode,
253             [AS_HELP_STRING([--without-libqrencode],[build without QR code support])])
254 have_libqrencode=no
255 if test "x$with_libqrencode" != xno; then
256         PKG_CHECK_MODULES(LIBQRENCODE, libqrencode >= $LIBQRENCODE_REQUIRED,
257                           [have_libqrencode=yes], [have_libqrencode=no])
258 fi
259
260 if test "x$have_libqrencode" = "xyes"; then
261         AC_DEFINE(HAVE_LIBQRENCODE,1,[Define to 1 for QR code support])
262         AC_SUBST(LIBQRENCODE_CFLAGS)
263         AC_SUBST(LIBQRENCODE_LIBS)
264 else
265         help_libqrencode="(See http://megaui.net/fukuchi/works/qrencode/index.en.html)"
266 fi
267
268
269 dnl ---------------------------------------------------------------------------
270 dnl - Check for IEC16022 Barcode backend
271 dnl ---------------------------------------------------------------------------
272 AC_ARG_WITH(libiec16022,
273             [AS_HELP_STRING([--without-libiec16022],[build without IEC 16022 support])])
274 have_libiec16022=no
275 if test "x$with_libiec16022" != xno; then
276         PKG_CHECK_MODULES(LIBIEC16022, libiec16022 >= $LIBIEC16022_REQUIRED,
277                           [have_libiec16022=yes], [have_libiec16022=no])
278 fi
279
280 if test "x$have_libiec16022" = "xyes"; then
281         AC_DEFINE(HAVE_LIBIEC16022,1,[Define to 1 for IEC 16022 support])
282         AC_SUBST(LIBIEC16022_CFLAGS)
283         AC_SUBST(LIBIEC16022_LIBS)
284 else
285         help_libiec16022="(See http://datenfreihafen.org/projects/iec16022.html)"
286 fi
287
288
289 dnl ---------------------------------------------------------------------------
290 dnl - Enable deprecation testing
291 dnl ---------------------------------------------------------------------------
292 AC_ARG_ENABLE(deprecations,
293               [AS_HELP_STRING([--enable-deprecations],[warn about deprecated usages [default=no]])],,
294               [enable_deprecations=no])
295
296 if test "x$enable_deprecations" = "xyes"; then
297    DISABLE_DEPRECATED_CFLAGS="\
298 -DG_DISABLE_DEPRECATED \
299 -DGDK_DISABLE_DEPRECATED \
300 -DGTK_DISABLE_DEPRECATED \
301 -DGDK_PIXBUF_DISABLE_DEPRECATED \
302 "
303    AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
304 fi
305
306
307 dnl ---------------------------------------------------------------------------
308 dnl - i18n support
309 dnl ---------------------------------------------------------------------------
310 GETTEXT_PACKAGE=${GLABELS_BRANCH}
311 AC_SUBST(GETTEXT_PACKAGE)
312 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
313
314 AM_GLIB_GNU_GETTEXT
315
316
317 dnl ---------------------------------------------------------------------------
318 dnl - Makefiles, etc.
319 dnl ---------------------------------------------------------------------------
320 AC_CONFIG_FILES([
321 Makefile
322 libglabels/Makefile
323 libglabels/${LIBGLABELS_BRANCH}.pc
324 libglbarcode/Makefile
325 libglbarcode/${LIBGLBARCODE_BRANCH}.pc
326 src/Makefile
327 src/cursors/Makefile
328 src/pixmaps/Makefile
329 data/Makefile
330 data/appdata/Makefile
331 data/desktop/Makefile
332 data/icons/Makefile
333 data/icons/16x16/Makefile
334 data/icons/22x22/Makefile
335 data/icons/24x24/Makefile
336 data/icons/32x32/Makefile
337 data/icons/48x48/Makefile
338 data/icons/scalable/Makefile
339 data/man/Makefile
340 data/mime/Makefile
341 data/pixmaps/Makefile
342 data/schemas/Makefile
343 data/schemas/org.gnome.glabels-3.gschema.xml.in
344 data/ui/Makefile
345 templates/Makefile
346 po/Makefile.in
347 help/Makefile
348 docs/Makefile
349 docs/libglabels/Makefile
350 docs/libglbarcode/Makefile
351 glabels.spec
352 ])
353 AC_OUTPUT
354
355
356 dnl ---------------------------------------------------------------------------
357 dnl - Print configuration information
358 dnl ---------------------------------------------------------------------------
359 echo "
360
361 Configuration:
362
363         Package ................. ${PACKAGE}-${VERSION}
364         Installation prefix ..... ${prefix}
365         Source code location .... ${srcdir}
366         Compiler ................ ${CC} 
367
368
369 Optional data merge backends:
370
371         Evolution Data Server ... ${have_libebook}
372
373
374 Optional barcode backends:
375
376         GNU Barcode ............. ${have_libbarcode} ${help_libbarcode}
377         QR Code ................. ${have_libqrencode} ${help_libqrencode}
378         IEC 16022 ............... ${have_libiec16022} ${help_libiec16022}
379         Zint .................... ${have_libzint} ${help_libzint}
380
381
382 "