1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.63)
AC_INIT([glabels],[2.3.pre0git],[http://sourceforge.net/tracker/?func=add&group_id=46122&atid=445116])
AC_CONFIG_SRCDIR(src/glabels.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS(config.h)
IT_PROG_INTLTOOL([0.21])
PKG_PROG_PKG_CONFIG
LT_INIT
GNOME_DOC_INIT
GTK_DOC_CHECK(1.0)
AC_SEARCH_LIBS([strerror],[cposix])
AC_PROG_CC
AC_PROG_INSTALL
GNOME_COMPILE_WARNINGS
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database)
AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database)
dnl ---------------------------------------------------------------------------
dnl - GLABELS branch
dnl ---------------------------------------------------------------------------
GLABELS_BRANCH=glabels-3.0
AC_SUBST(GLABELS_BRANCH)
dnl ---------------------------------------------------------------------------
dnl - LIBGLABELS branch
dnl ---------------------------------------------------------------------------
LIBGLABELS_BRANCH=libglabels-3.0
AC_SUBST(LIBGLABELS_BRANCH)
dnl ---------------------------------------------------------------------------
dnl - LIBGLABELS API versioning
dnl ---------------------------------------------------------------------------
dnl From the libtool manual:
dnl 1. Start with version information of `0:0:0' for each libtool library.
dnl 2. Update the version information only immediately before a public release.
dnl More frequent updates are unnecessary, and only guarantee that the current
dnl interface number gets larger faster.
dnl 3. If the library source code has changed at all since the last update, then increment
dnl revision (`c:r:a' becomes `c:r+1:a').
dnl 4. If any interfaces have been added, removed, or changed since the last update,
dnl increment current, and set revision to 0.
dnl 5. If any interfaces have been added since the last public release, then increment age.
dnl 6. If any interfaces have been removed since the last public release, then set age
dnl to 0.
LIBGLABELS_C=7
LIBGLABELS_R=0
LIBGLABELS_A=0
LIBGLABELS_API_VERSION=${LIBGLABELS_C}:${LIBGLABELS_R}:${LIBGLABELS_A}
AC_SUBST(LIBGLABELS_API_VERSION)
dnl ---------------------------------------------------------------------------
dnl - Library dependencies
dnl ---------------------------------------------------------------------------
dnl Required dependencies
GLIB_REQUIRED=2.22.0
GTK_REQUIRED=2.18.0
GCONF_REQUIRED=2.28.0
LIBXML_REQUIRED=2.7.0
dnl Optional dependencies
LIBEBOOK_REQUIRED=2.28.0
LIBBARCODE_REQUIRED=0.98
LIBQRENCODE_REQUIRED=3.1.0
LIBIEC16022_REQUIRED=0.2.4
LIBZINT_REQUIRED=2.3.1
dnl Make above strings available for packaging files (e.g. rpm spec files)
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
AC_SUBST(GCONF_REQUIRED)
AC_SUBST(LIBXML_REQUIRED)
AC_SUBST(LIBEBOOK_REQUIRED)
AC_SUBST(LIBBARCODE_REQUIRED)
AC_SUBST(LIBQRENCODE_REQUIRED)
AC_SUBST(LIBIEC16022_REQUIRED)
AC_SUBST(LIBZINT_REQUIRED)
dnl ---------------------------------------------------------------------------
dnl - GLABELS prerequisites
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(GLABELS, [\
glib-2.0 >= $GLIB_REQUIRED \
gtk+-2.0 >= $GTK_REQUIRED \
gconf-2.0 >= $GCONF_REQUIRED \
libxml-2.0 >= $LIBXML_REQUIRED \
])
AC_SUBST(GLABELS_CFLAGS)
AC_SUBST(GLABELS_LIBS)
dnl ---------------------------------------------------------------------------
dnl - LIBGLABELS more modest prerequisites
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(LIBGLABELS, [\
glib-2.0 >= $GLIB_REQUIRED \
gconf-2.0 >= $GCONF_REQUIRED \
libxml-2.0 >= $LIBXML_REQUIRED \
])
AC_SUBST(LIBGLABELS_CFLAGS)
AC_SUBST(LIBGLABELS_LIBS)
dnl ---------------------------------------------------------------------------
dnl - Check for optional evolution data server
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libebook,
[AS_HELP_STRING([--without-libebook],[build without Evolution Data Server support])])
have_libebook=no
if test "x$with_libebook" != xno; then
PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2 >= $LIBEBOOK_REQUIRED,
[have_libebook=yes], [have_libebook=no])
fi
if test "x$have_libebook" = "xyes"; then
AC_DEFINE(HAVE_LIBEBOOK,1,[Define to 1 for EDS support])
AC_SUBST(LIBEBOOK_CFLAGS)
AC_SUBST(LIBEBOOK_LIBS)
fi
dnl ---------------------------------------------------------------------------
dnl - Check for optional GNU Barcode backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libbarcode,
[AS_HELP_STRING([--without-libbarcode],[build without GNU Barcode support])])
have_libbarcode=no
if test "x$with_libbarcode" != xno; then
AC_CHECK_LIB(barcode, Barcode_Create,
[have_libbarcode=yes], [have_libbarcode=no])
fi
if test "x$have_libbarcode" = "xyes"; then
AC_DEFINE(HAVE_LIBBARCODE,1,[Define to 1 for GNU Barcode support])
LIBBARCODE_CFLAGS=""
LIBBARCODE_LIBS="-lbarcode"
AC_SUBST(LIBBARCODE_CFLAGS)
AC_SUBST(LIBBARCODE_LIBS)
else
help_libbarcode="(See http://www.gnu.org/software/barcode/barcode.html)"
fi
dnl ---------------------------------------------------------------------------
dnl - Check for optional Zint backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libzint,
[AS_HELP_STRING([--without-libzint],[build without Zint Barcode support])])
have_libzint=no
if test "x$with_libzint" != xno; then
AC_CHECK_LIB(zint, ZBarcode_Create,
[have_libzint=yes], [have_libzint=no])
fi
if test "x$have_libzint" = "xyes"; then
AC_DEFINE(HAVE_LIBZINT,1,[Define to 1 for Zint Barcode support])
LIBZINT_CFLAGS=""
LIBZINT_LIBS="-lzint"
AC_SUBST(LIBZINT_CFLAGS)
AC_SUBST(LIBZINT_LIBS)
else
help_libzint="(See http://www.zint.org.uk)"
fi
dnl ---------------------------------------------------------------------------
dnl - Check for optional QRencode Barcode backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libqrencode,
[AS_HELP_STRING([--without-libqrencode],[build without QR code support])])
have_libqrencode=no
if test "x$with_libqrencode" != xno; then
PKG_CHECK_MODULES(LIBQRENCODE, libqrencode >= $LIBQRENCODE_REQUIRED,
[have_libqrencode=yes], [have_libqrencode=no])
fi
if test "x$have_libqrencode" = "xyes"; then
AC_DEFINE(HAVE_LIBQRENCODE,1,[Define to 1 for QR code support])
AC_SUBST(LIBQRENCODE_CFLAGS)
AC_SUBST(LIBQRENCODE_LIBS)
else
help_libqrencode="(See http://megaui.net/fukuchi/works/qrencode/index.en.html)"
fi
dnl ---------------------------------------------------------------------------
dnl - Check for IEC16022 Barcode backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(libiec16022,
[AS_HELP_STRING([--without-libiec16022],[build without IEC 16022 support])])
have_libiec16022=no
if test "x$with_libiec16022" != xno; then
PKG_CHECK_MODULES(LIBIEC16022, libiec16022 >= $LIBIEC16022_REQUIRED,
[have_libiec16022=yes], [have_libiec16022=no])
fi
if test "x$have_libiec16022" = "xyes"; then
AC_DEFINE(HAVE_LIBIEC16022,1,[Define to 1 for IEC 16022 support])
AC_SUBST(LIBIEC16022_CFLAGS)
AC_SUBST(LIBIEC16022_LIBS)
else
help_libiec16022="(See http://datenfreihafen.org/projects/iec16022.html)"
fi
dnl ---------------------------------------------------------------------------
dnl - Enable deprecation testing
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(deprecations,
[AS_HELP_STRING([--enable-deprecations],[warn about deprecated usages [default=no]])],,
[enable_deprecations=no])
if test "x$enable_deprecations" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS="\
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
"
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
dnl ---------------------------------------------------------------------------
dnl - Disable updating of mime and desktop databases
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(update-mimedb, AS_HELP_STRING([--disable-update-mimedb],[disable the update-mime-database after install [default=no]]),,
enable_update_mimedb=yes)
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
AC_ARG_ENABLE(update-desktopdb, AS_HELP_STRING([--disable-update-desktopdb],[disable the update-desktop-database after install [default=no]]),,
enable_update_desktopdb=yes)
AM_CONDITIONAL(ENABLE_UPDATE_DESKTOPDB, test x$enable_update_desktopdb = xyes)
dnl ---------------------------------------------------------------------------
dnl - i18n support
dnl ---------------------------------------------------------------------------
GETTEXT_PACKAGE=${GLABELS_BRANCH}
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
dnl ---------------------------------------------------------------------------
dnl - Makefiles, etc.
dnl ---------------------------------------------------------------------------
AC_CONFIG_FILES([
Makefile
libglabels/Makefile
libglabels/${LIBGLABELS_BRANCH}.pc
src/Makefile
src/pixmaps/Makefile
src/stock-pixmaps/Makefile
data/Makefile
data/pixmaps/Makefile
data/mime/Makefile
data/ui/Makefile
data/desktop/Makefile
data/man/Makefile
templates/Makefile
po/Makefile.in
help/Makefile
docs/Makefile
docs/libglabels/Makefile
glabels.spec
])
AC_OUTPUT
dnl ---------------------------------------------------------------------------
dnl - Print configuration information
dnl ---------------------------------------------------------------------------
echo "
Configuration:
Package ................. ${PACKAGE}-${VERSION}
Installation prefix ..... ${prefix}
Source code location .... ${srcdir}
Compiler ................ ${CC}
Optional data merge backends:
Evolution Data Server ... ${have_libebook}
Optional barcode backends:
GNU Barcode ............. ${have_libbarcode} ${help_libbarcode}
QR Code ................. ${have_libqrencode} ${help_libqrencode}
IEC 16022 ............... ${have_libiec16022} ${help_libiec16022}
Zint .................... ${have_libzint} ${help_libzint}
"
cat ${srcdir}/MESSAGE-OF-DOOM
|