]> git.sur5r.net Git - glabels/blob - configure.ac
Added acknowledgement for new templates
[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], [0])
9 m4_define([glabels_micro_version], [0])
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 GNOME_DOC_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         libxml-2.0 >= $LIBXML_REQUIRED \
167 ])
168
169 AC_SUBST(LIBGLABELS_CFLAGS)
170 AC_SUBST(LIBGLABELS_LIBS)
171
172
173 dnl ---------------------------------------------------------------------------
174 dnl - LIBGLBARCODE more modest prerequisites
175 dnl ---------------------------------------------------------------------------
176 PKG_CHECK_MODULES(LIBGLBARCODE, [\
177         glib-2.0 >= $GLIB_REQUIRED \
178         cairo >= $CAIRO_REQUIRED \
179         pango >= $PANGO_REQUIRED \
180 ])
181
182 AC_SUBST(LIBGLBARCODE_CFLAGS)
183 AC_SUBST(LIBGLBARCODE_LIBS)
184
185
186 dnl ---------------------------------------------------------------------------
187 dnl - Check for optional evolution data server
188 dnl ---------------------------------------------------------------------------
189 AC_ARG_WITH(libebook,
190             [AS_HELP_STRING([--without-libebook],[build without Evolution Data Server support])])
191 have_libebook=no
192 if test "x$with_libebook" != xno; then
193         PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2 >= $LIBEBOOK_REQUIRED,
194                           [have_libebook=yes], [have_libebook=no])
195 fi
196
197 if test "x$have_libebook" = "xyes"; then
198         AC_DEFINE(HAVE_LIBEBOOK,1,[Define to 1 for EDS support])
199         AC_SUBST(LIBEBOOK_CFLAGS)
200         AC_SUBST(LIBEBOOK_LIBS)
201 fi
202
203
204 dnl ---------------------------------------------------------------------------
205 dnl - Check for optional GNU Barcode backend
206 dnl ---------------------------------------------------------------------------
207 AC_ARG_WITH(libbarcode,
208             [AS_HELP_STRING([--without-libbarcode],[build without GNU Barcode support])])
209 have_libbarcode=no
210 if test "x$with_libbarcode" != xno; then
211    AC_CHECK_LIB(barcode, Barcode_Create,
212                 [have_libbarcode=yes], [have_libbarcode=no])
213 fi
214
215 if test "x$have_libbarcode" = "xyes"; then
216         AC_DEFINE(HAVE_LIBBARCODE,1,[Define to 1 for GNU Barcode support])
217         LIBBARCODE_CFLAGS=""
218         LIBBARCODE_LIBS="-lbarcode"
219         AC_SUBST(LIBBARCODE_CFLAGS)
220         AC_SUBST(LIBBARCODE_LIBS)
221 else
222         help_libbarcode="(See http://www.gnu.org/software/barcode/barcode.html)"
223 fi
224
225 dnl ---------------------------------------------------------------------------
226 dnl - Check for optional Zint backend
227 dnl ---------------------------------------------------------------------------
228 AC_ARG_WITH(libzint,
229             [AS_HELP_STRING([--without-libzint],[build without Zint Barcode support])])
230 have_libzint=no
231 if test "x$with_libzint" != xno; then
232    AC_CHECK_LIB(zint, ZBarcode_Render,
233                 [have_libzint=yes], [have_libzint=no])
234 fi
235
236 if test "x$have_libzint" = "xyes"; then
237         AC_DEFINE(HAVE_LIBZINT,1,[Define to 1 for Zint Barcode support])
238         LIBZINT_CFLAGS=""
239         LIBZINT_LIBS="-lzint"
240         AC_SUBST(LIBZINT_CFLAGS)
241         AC_SUBST(LIBZINT_LIBS)
242 else
243         help_libzint="(See http://www.zint.org.uk)"
244 fi
245
246
247 dnl ---------------------------------------------------------------------------
248 dnl - Check for optional QRencode Barcode backend
249 dnl ---------------------------------------------------------------------------
250 AC_ARG_WITH(libqrencode,
251             [AS_HELP_STRING([--without-libqrencode],[build without QR code support])])
252 have_libqrencode=no
253 if test "x$with_libqrencode" != xno; then
254         PKG_CHECK_MODULES(LIBQRENCODE, libqrencode >= $LIBQRENCODE_REQUIRED,
255                           [have_libqrencode=yes], [have_libqrencode=no])
256 fi
257
258 if test "x$have_libqrencode" = "xyes"; then
259         AC_DEFINE(HAVE_LIBQRENCODE,1,[Define to 1 for QR code support])
260         AC_SUBST(LIBQRENCODE_CFLAGS)
261         AC_SUBST(LIBQRENCODE_LIBS)
262 else
263         help_libqrencode="(See http://megaui.net/fukuchi/works/qrencode/index.en.html)"
264 fi
265
266
267 dnl ---------------------------------------------------------------------------
268 dnl - Check for IEC16022 Barcode backend
269 dnl ---------------------------------------------------------------------------
270 AC_ARG_WITH(libiec16022,
271             [AS_HELP_STRING([--without-libiec16022],[build without IEC 16022 support])])
272 have_libiec16022=no
273 if test "x$with_libiec16022" != xno; then
274         PKG_CHECK_MODULES(LIBIEC16022, libiec16022 >= $LIBIEC16022_REQUIRED,
275                           [have_libiec16022=yes], [have_libiec16022=no])
276 fi
277
278 if test "x$have_libiec16022" = "xyes"; then
279         AC_DEFINE(HAVE_LIBIEC16022,1,[Define to 1 for IEC 16022 support])
280         AC_SUBST(LIBIEC16022_CFLAGS)
281         AC_SUBST(LIBIEC16022_LIBS)
282 else
283         help_libiec16022="(See http://datenfreihafen.org/projects/iec16022.html)"
284 fi
285
286
287 dnl ---------------------------------------------------------------------------
288 dnl - Enable deprecation testing
289 dnl ---------------------------------------------------------------------------
290 AC_ARG_ENABLE(deprecations,
291               [AS_HELP_STRING([--enable-deprecations],[warn about deprecated usages [default=no]])],,
292               [enable_deprecations=no])
293
294 if test "x$enable_deprecations" = "xyes"; then
295    DISABLE_DEPRECATED_CFLAGS="\
296 -DG_DISABLE_DEPRECATED \
297 -DGDK_DISABLE_DEPRECATED \
298 -DGTK_DISABLE_DEPRECATED \
299 -DGDK_PIXBUF_DISABLE_DEPRECATED \
300 "
301    AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
302 fi
303
304
305 dnl ---------------------------------------------------------------------------
306 dnl - i18n support
307 dnl ---------------------------------------------------------------------------
308 GETTEXT_PACKAGE=${GLABELS_BRANCH}
309 AC_SUBST(GETTEXT_PACKAGE)
310 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
311
312 AM_GLIB_GNU_GETTEXT
313
314
315 dnl ---------------------------------------------------------------------------
316 dnl - Makefiles, etc.
317 dnl ---------------------------------------------------------------------------
318 AC_CONFIG_FILES([
319 Makefile
320 libglabels/Makefile
321 libglabels/${LIBGLABELS_BRANCH}.pc
322 libglbarcode/Makefile
323 libglbarcode/${LIBGLBARCODE_BRANCH}.pc
324 src/Makefile
325 src/cursors/Makefile
326 src/pixmaps/Makefile
327 data/Makefile
328 data/desktop/Makefile
329 data/icons/Makefile
330 data/icons/16x16/Makefile
331 data/icons/22x22/Makefile
332 data/icons/24x24/Makefile
333 data/icons/32x32/Makefile
334 data/icons/48x48/Makefile
335 data/man/Makefile
336 data/mime/Makefile
337 data/pixmaps/Makefile
338 data/schemas/Makefile
339 data/schemas/org.gnome.glabels-3.gschema.xml.in
340 data/ui/Makefile
341 templates/Makefile
342 po/Makefile.in
343 help/Makefile
344 docs/Makefile
345 docs/libglabels/Makefile
346 docs/libglbarcode/Makefile
347 glabels.spec
348 ])
349 AC_OUTPUT
350
351
352 dnl ---------------------------------------------------------------------------
353 dnl - Print configuration information
354 dnl ---------------------------------------------------------------------------
355 echo "
356
357 Configuration:
358
359         Package ................. ${PACKAGE}-${VERSION}
360         Installation prefix ..... ${prefix}
361         Source code location .... ${srcdir}
362         Compiler ................ ${CC} 
363
364
365 Optional data merge backends:
366
367         Evolution Data Server ... ${have_libebook}
368
369
370 Optional barcode backends:
371
372         GNU Barcode ............. ${have_libbarcode} ${help_libbarcode}
373         QR Code ................. ${have_libqrencode} ${help_libqrencode}
374         IEC 16022 ............... ${have_libiec16022} ${help_libiec16022}
375         Zint .................... ${have_libzint} ${help_libzint}
376
377
378 "