1 dnl Process this file with autoconf to produce a configure script.
4 dnl ---------------------------------------------------------------------------
6 dnl ---------------------------------------------------------------------------
7 m4_define([glabels_major_version], [2])
8 m4_define([glabels_minor_version], [3])
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.7
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 libxml-2.0 >= $LIBXML_REQUIRED \
169 AC_SUBST(LIBGLABELS_CFLAGS)
170 AC_SUBST(LIBGLABELS_LIBS)
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 \
182 AC_SUBST(LIBGLBARCODE_CFLAGS)
183 AC_SUBST(LIBGLBARCODE_LIBS)
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])])
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])
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)
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])])
210 if test "x$with_libbarcode" != xno; then
211 AC_CHECK_LIB(barcode, Barcode_Create,
212 [have_libbarcode=yes], [have_libbarcode=no])
215 if test "x$have_libbarcode" = "xyes"; then
216 AC_DEFINE(HAVE_LIBBARCODE,1,[Define to 1 for GNU Barcode support])
218 LIBBARCODE_LIBS="-lbarcode"
219 AC_SUBST(LIBBARCODE_CFLAGS)
220 AC_SUBST(LIBBARCODE_LIBS)
222 help_libbarcode="(See http://www.gnu.org/software/barcode/barcode.html)"
225 dnl ---------------------------------------------------------------------------
226 dnl - Check for optional Zint backend
227 dnl ---------------------------------------------------------------------------
229 [AS_HELP_STRING([--without-libzint],[build without Zint Barcode support])])
231 if test "x$with_libzint" != xno; then
232 AC_CHECK_LIB(zint, ZBarcode_Render,
233 [have_libzint=yes], [have_libzint=no])
236 if test "x$have_libzint" = "xyes"; then
237 AC_DEFINE(HAVE_LIBZINT,1,[Define to 1 for Zint Barcode support])
239 LIBZINT_LIBS="-lzint"
240 AC_SUBST(LIBZINT_CFLAGS)
241 AC_SUBST(LIBZINT_LIBS)
243 help_libzint="(See http://www.zint.org.uk)"
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])])
253 if test "x$with_libqrencode" != xno; then
254 PKG_CHECK_MODULES(LIBQRENCODE, libqrencode >= $LIBQRENCODE_REQUIRED,
255 [have_libqrencode=yes], [have_libqrencode=no])
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)
263 help_libqrencode="(See http://megaui.net/fukuchi/works/qrencode/index.en.html)"
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])])
273 if test "x$with_libiec16022" != xno; then
274 PKG_CHECK_MODULES(LIBIEC16022, libiec16022 >= $LIBIEC16022_REQUIRED,
275 [have_libiec16022=yes], [have_libiec16022=no])
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)
283 help_libiec16022="(See http://datenfreihafen.org/projects/iec16022.html)"
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])
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 \
301 AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
305 dnl ---------------------------------------------------------------------------
307 dnl ---------------------------------------------------------------------------
308 GETTEXT_PACKAGE=${GLABELS_BRANCH}
309 AC_SUBST(GETTEXT_PACKAGE)
310 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
315 dnl ---------------------------------------------------------------------------
316 dnl - Makefiles, etc.
317 dnl ---------------------------------------------------------------------------
321 libglabels/${LIBGLABELS_BRANCH}.pc
322 libglbarcode/Makefile
323 libglbarcode/${LIBGLBARCODE_BRANCH}.pc
328 data/desktop/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
337 data/pixmaps/Makefile
338 data/schemas/Makefile
339 data/schemas/org.gnome.glabels-3.gschema.xml.in
345 docs/libglabels/Makefile
346 docs/libglbarcode/Makefile
352 dnl ---------------------------------------------------------------------------
353 dnl - Print configuration information
354 dnl ---------------------------------------------------------------------------
359 Package ................. ${PACKAGE}-${VERSION}
360 Installation prefix ..... ${prefix}
361 Source code location .... ${srcdir}
362 Compiler ................ ${CC}
365 Optional data merge backends:
367 Evolution Data Server ... ${have_libebook}
370 Optional barcode backends:
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}
381 cat ${srcdir}/MESSAGE-OF-DOOM