1 dnl Process this file with autoconf to produce a configure script.
4 dnl ---------------------------------------------------------------------------
6 dnl ---------------------------------------------------------------------------
7 m4_define([glabels_major_version], [3])
8 m4_define([glabels_minor_version], [2])
9 m4_define([glabels_micro_version], [1+])
11 m4_define([glabels_version],
12 [glabels_major_version.glabels_minor_version.glabels_micro_version])
14 dnl ---------------------------------------------------------------------------
18 AC_INIT([glabels],[glabels_version],
19 [http://bugzilla.gnome.org/enter_bug.cgi?product=glabels],
22 AC_CONFIG_SRCDIR(src/glabels.c)
24 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
27 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
29 AC_CONFIG_HEADERS(config.h)
31 IT_PROG_INTLTOOL([0.21])
42 AC_SEARCH_LIBS([strerror],[cposix])
46 GNOME_COMPILE_WARNINGS
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)
53 dnl ---------------------------------------------------------------------------
55 dnl ---------------------------------------------------------------------------
56 GLABELS_BRANCH=glabels-3.0
57 AC_SUBST(GLABELS_BRANCH)
59 dnl ---------------------------------------------------------------------------
60 dnl - LIBGLABELS branch
61 dnl ---------------------------------------------------------------------------
62 LIBGLABELS_BRANCH=libglabels-3.0
63 AC_SUBST(LIBGLABELS_BRANCH)
65 dnl ---------------------------------------------------------------------------
66 dnl - LIBGLBARCODE branch
67 dnl ---------------------------------------------------------------------------
68 LIBGLBARCODE_BRANCH=libglbarcode-3.0
69 AC_SUBST(LIBGLBARCODE_BRANCH)
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
90 LIBGLABELS_API_VERSION=${LIBGLABELS_C}:${LIBGLABELS_R}:${LIBGLABELS_A}
91 AC_SUBST(LIBGLABELS_API_VERSION)
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
112 LIBGLBARCODE_API_VERSION=${LIBGLBARCODE_C}:${LIBGLBARCODE_R}:${LIBGLBARCODE_A}
113 AC_SUBST(LIBGLBARCODE_API_VERSION)
115 dnl ---------------------------------------------------------------------------
116 dnl - Library dependencies
117 dnl ---------------------------------------------------------------------------
118 dnl Required dependencies
121 LIBXML_REQUIRED=2.7.8
122 LIBRSVG_REQUIRED=2.32.0
123 CAIRO_REQUIRED=1.10.0
124 PANGO_REQUIRED=1.28.1
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
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)
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 \
157 AC_SUBST(GLABELS_CFLAGS)
158 AC_SUBST(GLABELS_LIBS)
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 \
170 AC_SUBST(LIBGLABELS_CFLAGS)
171 AC_SUBST(LIBGLABELS_LIBS)
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 \
184 AC_SUBST(LIBGLBARCODE_CFLAGS)
185 AC_SUBST(LIBGLBARCODE_LIBS)
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])])
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])
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)
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])])
212 if test "x$with_libbarcode" != xno; then
213 AC_CHECK_LIB(barcode, Barcode_Create,
214 [have_libbarcode=yes], [have_libbarcode=no])
217 if test "x$have_libbarcode" = "xyes"; then
218 AC_DEFINE(HAVE_LIBBARCODE,1,[Define to 1 for GNU Barcode support])
220 LIBBARCODE_LIBS="-lbarcode"
221 AC_SUBST(LIBBARCODE_CFLAGS)
222 AC_SUBST(LIBBARCODE_LIBS)
224 help_libbarcode="(See http://www.gnu.org/software/barcode/barcode.html)"
227 dnl ---------------------------------------------------------------------------
228 dnl - Check for optional Zint backend
229 dnl ---------------------------------------------------------------------------
231 [AS_HELP_STRING([--without-libzint],[build without Zint Barcode support])])
233 if test "x$with_libzint" != xno; then
234 AC_CHECK_LIB(zint, ZBarcode_Render,
235 [have_libzint=yes], [have_libzint=no])
238 if test "x$have_libzint" = "xyes"; then
239 AC_DEFINE(HAVE_LIBZINT,1,[Define to 1 for Zint Barcode support])
241 LIBZINT_LIBS="-lzint"
242 AC_SUBST(LIBZINT_CFLAGS)
243 AC_SUBST(LIBZINT_LIBS)
245 help_libzint="(See http://www.zint.org.uk)"
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])])
255 if test "x$with_libqrencode" != xno; then
256 PKG_CHECK_MODULES(LIBQRENCODE, libqrencode >= $LIBQRENCODE_REQUIRED,
257 [have_libqrencode=yes], [have_libqrencode=no])
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)
265 help_libqrencode="(See http://megaui.net/fukuchi/works/qrencode/index.en.html)"
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])])
275 if test "x$with_libiec16022" != xno; then
276 PKG_CHECK_MODULES(LIBIEC16022, libiec16022 >= $LIBIEC16022_REQUIRED,
277 [have_libiec16022=yes], [have_libiec16022=no])
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)
285 help_libiec16022="(See http://datenfreihafen.org/projects/iec16022.html)"
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])
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 \
303 AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
307 dnl ---------------------------------------------------------------------------
309 dnl ---------------------------------------------------------------------------
310 GETTEXT_PACKAGE=${GLABELS_BRANCH}
311 AC_SUBST(GETTEXT_PACKAGE)
312 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
317 dnl ---------------------------------------------------------------------------
318 dnl - Makefiles, etc.
319 dnl ---------------------------------------------------------------------------
323 libglabels/${LIBGLABELS_BRANCH}.pc
324 libglbarcode/Makefile
325 libglbarcode/${LIBGLBARCODE_BRANCH}.pc
330 data/appdata/Makefile
331 data/desktop/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
341 data/pixmaps/Makefile
342 data/schemas/Makefile
343 data/schemas/org.gnome.glabels-3.gschema.xml.in
349 docs/libglabels/Makefile
350 docs/libglbarcode/Makefile
356 dnl ---------------------------------------------------------------------------
357 dnl - Print configuration information
358 dnl ---------------------------------------------------------------------------
363 Package ................. ${PACKAGE}-${VERSION}
364 Installation prefix ..... ${prefix}
365 Source code location .... ${srcdir}
366 Compiler ................ ${CC}
369 Optional data merge backends:
371 Evolution Data Server ... ${have_libebook}
374 Optional barcode backends:
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}