1 dnl Process this file with autoconf to produce a configure script.
5 AC_INIT([glabels],[2.3.0],[http://sourceforge.net/tracker/?func=add&group_id=46122&atid=445116])
6 AC_CONFIG_SRCDIR(src/glabels.c)
8 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
11 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
13 AC_CONFIG_HEADERS(config.h)
15 IT_PROG_INTLTOOL([0.21])
24 AC_SEARCH_LIBS([strerror],[cposix])
28 GNOME_COMPILE_WARNINGS
30 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
31 AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database)
32 AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database)
33 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache)
35 dnl ---------------------------------------------------------------------------
37 dnl ---------------------------------------------------------------------------
38 GLABELS_BRANCH=glabels-3.0
39 AC_SUBST(GLABELS_BRANCH)
41 dnl ---------------------------------------------------------------------------
42 dnl - LIBGLABELS branch
43 dnl ---------------------------------------------------------------------------
44 LIBGLABELS_BRANCH=libglabels-3.0
45 AC_SUBST(LIBGLABELS_BRANCH)
47 dnl ---------------------------------------------------------------------------
48 dnl - LIBGLABELS API versioning
49 dnl ---------------------------------------------------------------------------
50 dnl From the libtool manual:
51 dnl 1. Start with version information of `0:0:0' for each libtool library.
52 dnl 2. Update the version information only immediately before a public release.
53 dnl More frequent updates are unnecessary, and only guarantee that the current
54 dnl interface number gets larger faster.
55 dnl 3. If the library source code has changed at all since the last update, then increment
56 dnl revision (`c:r:a' becomes `c:r+1:a').
57 dnl 4. If any interfaces have been added, removed, or changed since the last update,
58 dnl increment current, and set revision to 0.
59 dnl 5. If any interfaces have been added since the last public release, then increment age.
60 dnl 6. If any interfaces have been removed since the last public release, then set age
66 LIBGLABELS_API_VERSION=${LIBGLABELS_C}:${LIBGLABELS_R}:${LIBGLABELS_A}
67 AC_SUBST(LIBGLABELS_API_VERSION)
69 dnl ---------------------------------------------------------------------------
70 dnl - Library dependencies
71 dnl ---------------------------------------------------------------------------
72 dnl Required dependencies
77 LIBRSVG_REQUIRED=2.26.0
79 dnl Optional dependencies
80 LIBEBOOK_REQUIRED=2.28.0
81 LIBBARCODE_REQUIRED=0.98
82 LIBQRENCODE_REQUIRED=3.1.0
83 LIBIEC16022_REQUIRED=0.2.4
84 LIBZINT_REQUIRED=2.3.1
86 dnl Make above strings available for packaging files (e.g. rpm spec files)
87 AC_SUBST(GLIB_REQUIRED)
88 AC_SUBST(GTK_REQUIRED)
89 AC_SUBST(GCONF_REQUIRED)
90 AC_SUBST(LIBXML_REQUIRED)
91 AC_SUBST(LIBEBOOK_REQUIRED)
92 AC_SUBST(LIBBARCODE_REQUIRED)
93 AC_SUBST(LIBQRENCODE_REQUIRED)
94 AC_SUBST(LIBIEC16022_REQUIRED)
95 AC_SUBST(LIBZINT_REQUIRED)
98 dnl ---------------------------------------------------------------------------
99 dnl - GLABELS prerequisites
100 dnl ---------------------------------------------------------------------------
101 PKG_CHECK_MODULES(GLABELS, [\
102 glib-2.0 >= $GLIB_REQUIRED \
103 gtk+-2.0 >= $GTK_REQUIRED \
104 gconf-2.0 >= $GCONF_REQUIRED \
105 libxml-2.0 >= $LIBXML_REQUIRED \
106 librsvg-2.0 > $LIBRSVG_REQUIRED \
109 AC_SUBST(GLABELS_CFLAGS)
110 AC_SUBST(GLABELS_LIBS)
113 dnl ---------------------------------------------------------------------------
114 dnl - LIBGLABELS more modest prerequisites
115 dnl ---------------------------------------------------------------------------
116 PKG_CHECK_MODULES(LIBGLABELS, [\
117 glib-2.0 >= $GLIB_REQUIRED \
118 gconf-2.0 >= $GCONF_REQUIRED \
119 libxml-2.0 >= $LIBXML_REQUIRED \
122 AC_SUBST(LIBGLABELS_CFLAGS)
123 AC_SUBST(LIBGLABELS_LIBS)
126 dnl ---------------------------------------------------------------------------
127 dnl - Check for optional evolution data server
128 dnl ---------------------------------------------------------------------------
129 AC_ARG_WITH(libebook,
130 [AS_HELP_STRING([--without-libebook],[build without Evolution Data Server support])])
132 if test "x$with_libebook" != xno; then
133 PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2 >= $LIBEBOOK_REQUIRED,
134 [have_libebook=yes], [have_libebook=no])
137 if test "x$have_libebook" = "xyes"; then
138 AC_DEFINE(HAVE_LIBEBOOK,1,[Define to 1 for EDS support])
139 AC_SUBST(LIBEBOOK_CFLAGS)
140 AC_SUBST(LIBEBOOK_LIBS)
144 dnl ---------------------------------------------------------------------------
145 dnl - Check for optional GNU Barcode backend
146 dnl ---------------------------------------------------------------------------
147 AC_ARG_WITH(libbarcode,
148 [AS_HELP_STRING([--without-libbarcode],[build without GNU Barcode support])])
150 if test "x$with_libbarcode" != xno; then
151 AC_CHECK_LIB(barcode, Barcode_Create,
152 [have_libbarcode=yes], [have_libbarcode=no])
155 if test "x$have_libbarcode" = "xyes"; then
156 AC_DEFINE(HAVE_LIBBARCODE,1,[Define to 1 for GNU Barcode support])
158 LIBBARCODE_LIBS="-lbarcode"
159 AC_SUBST(LIBBARCODE_CFLAGS)
160 AC_SUBST(LIBBARCODE_LIBS)
162 help_libbarcode="(See http://www.gnu.org/software/barcode/barcode.html)"
165 dnl ---------------------------------------------------------------------------
166 dnl - Check for optional Zint backend
167 dnl ---------------------------------------------------------------------------
169 [AS_HELP_STRING([--without-libzint],[build without Zint Barcode support])])
171 if test "x$with_libzint" != xno; then
172 AC_CHECK_LIB(zint, ZBarcode_Create,
173 [have_libzint=yes], [have_libzint=no])
176 if test "x$have_libzint" = "xyes"; then
177 AC_DEFINE(HAVE_LIBZINT,1,[Define to 1 for Zint Barcode support])
179 LIBZINT_LIBS="-lzint"
180 AC_SUBST(LIBZINT_CFLAGS)
181 AC_SUBST(LIBZINT_LIBS)
183 help_libzint="(See http://www.zint.org.uk)"
187 dnl ---------------------------------------------------------------------------
188 dnl - Check for optional QRencode Barcode backend
189 dnl ---------------------------------------------------------------------------
190 AC_ARG_WITH(libqrencode,
191 [AS_HELP_STRING([--without-libqrencode],[build without QR code support])])
193 if test "x$with_libqrencode" != xno; then
194 PKG_CHECK_MODULES(LIBQRENCODE, libqrencode >= $LIBQRENCODE_REQUIRED,
195 [have_libqrencode=yes], [have_libqrencode=no])
198 if test "x$have_libqrencode" = "xyes"; then
199 AC_DEFINE(HAVE_LIBQRENCODE,1,[Define to 1 for QR code support])
200 AC_SUBST(LIBQRENCODE_CFLAGS)
201 AC_SUBST(LIBQRENCODE_LIBS)
203 help_libqrencode="(See http://megaui.net/fukuchi/works/qrencode/index.en.html)"
207 dnl ---------------------------------------------------------------------------
208 dnl - Check for IEC16022 Barcode backend
209 dnl ---------------------------------------------------------------------------
210 AC_ARG_WITH(libiec16022,
211 [AS_HELP_STRING([--without-libiec16022],[build without IEC 16022 support])])
213 if test "x$with_libiec16022" != xno; then
214 PKG_CHECK_MODULES(LIBIEC16022, libiec16022 >= $LIBIEC16022_REQUIRED,
215 [have_libiec16022=yes], [have_libiec16022=no])
218 if test "x$have_libiec16022" = "xyes"; then
219 AC_DEFINE(HAVE_LIBIEC16022,1,[Define to 1 for IEC 16022 support])
220 AC_SUBST(LIBIEC16022_CFLAGS)
221 AC_SUBST(LIBIEC16022_LIBS)
223 help_libiec16022="(See http://datenfreihafen.org/projects/iec16022.html)"
227 dnl ---------------------------------------------------------------------------
228 dnl - Enable deprecation testing
229 dnl ---------------------------------------------------------------------------
230 AC_ARG_ENABLE(deprecations,
231 [AS_HELP_STRING([--enable-deprecations],[warn about deprecated usages [default=no]])],,
232 [enable_deprecations=no])
234 if test "x$enable_deprecations" = "xyes"; then
235 DISABLE_DEPRECATED_CFLAGS="\
236 -DG_DISABLE_DEPRECATED \
237 -DGDK_DISABLE_DEPRECATED \
238 -DGTK_DISABLE_DEPRECATED \
239 -DGDK_PIXBUF_DISABLE_DEPRECATED \
241 AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
245 dnl ---------------------------------------------------------------------------
246 dnl - Disable updating of mime and desktop databases
247 dnl ---------------------------------------------------------------------------
248 AC_ARG_ENABLE(update-mimedb, AS_HELP_STRING([--disable-update-mimedb],[disable the update-mime-database after install [default=no]]),,
249 enable_update_mimedb=yes)
250 AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
252 AC_ARG_ENABLE(update-desktopdb, AS_HELP_STRING([--disable-update-desktopdb],[disable the update-desktop-database after install [default=no]]),,
253 enable_update_desktopdb=yes)
254 AM_CONDITIONAL(ENABLE_UPDATE_DESKTOPDB, test x$enable_update_desktopdb = xyes)
257 dnl ---------------------------------------------------------------------------
259 dnl ---------------------------------------------------------------------------
260 GETTEXT_PACKAGE=${GLABELS_BRANCH}
261 AC_SUBST(GETTEXT_PACKAGE)
262 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
267 dnl ---------------------------------------------------------------------------
268 dnl - Makefiles, etc.
269 dnl ---------------------------------------------------------------------------
273 libglabels/${LIBGLABELS_BRANCH}.pc
277 data/desktop/Makefile
279 data/icons/16x16/Makefile
280 data/icons/22x22/Makefile
281 data/icons/24x24/Makefile
282 data/icons/32x32/Makefile
283 data/icons/48x48/Makefile
286 data/pixmaps/Makefile
292 docs/libglabels/Makefile
298 dnl ---------------------------------------------------------------------------
299 dnl - Print configuration information
300 dnl ---------------------------------------------------------------------------
305 Package ................. ${PACKAGE}-${VERSION}
306 Installation prefix ..... ${prefix}
307 Source code location .... ${srcdir}
308 Compiler ................ ${CC}
311 Optional data merge backends:
313 Evolution Data Server ... ${have_libebook}
316 Optional barcode backends:
318 GNU Barcode ............. ${have_libbarcode} ${help_libbarcode}
319 QR Code ................. ${have_libqrencode} ${help_libqrencode}
320 IEC 16022 ............... ${have_libiec16022} ${help_libiec16022}
321 Zint .................... ${have_libzint} ${help_libzint}
327 cat ${srcdir}/MESSAGE-OF-DOOM