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
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/glabels.c)
AM_INIT_AUTOMAKE(glabels, 0.4.6)
AM_CONFIG_HEADER(config.h)
dnl Pick up the Gnome macros.
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
GNOME_INIT
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
GNOME_COMPILE_WARNINGS
GNOME_X_CHECKS
dnl *******************************************************************
dnl * Check for required package and version (borrowed from Evolution)
dnl *******************************************************************
AC_DEFUN(GLABELS_CHECK_LIB, [
dispname="$1"
dispvers="$2"
pkgname="$3"
AC_MSG_CHECKING(for $dispname >= $dispvers)
cmpvers=`echo $dispvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
if gnome-config --libs $pkgname > /dev/null 2>&1; then
pkgvers=`gnome-config --modversion $pkgname | sed -e 's/^[[^0-9]]*//'`
else
pkgvers=not
fi
AC_MSG_RESULT($pkgvers found)
pkgvers=`echo $pkgvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
if test "$pkgvers" -lt $cmpvers; then
AC_MSG_ERROR([
""
"You need $dispname $dispvers or later to build gLabels"
"If you think you already have this installed, consult the README."])
fi
])
dnl ****************************************
dnl * LIBXML
dnl ****************************************
GLABELS_CHECK_LIB(LIBXML, 1.8.11, xml)
GNOME_XML_CFLAGS=`gnome-config --cflags xml`
GNOME_XML_LIBS=`gnome-config --libs xml`
AC_SUBST(GNOME_XML_CFLAGS)
AC_SUBST(GNOME_XML_LIBS)
dnl ****************************************
dnl * GNOME-PRINT
dnl ****************************************
GLABELS_CHECK_LIB(GNOME-PRINT, 0.25, print)
GNOME_PRINT_CFLAGS=`gnome-config --cflags print`
GNOME_PRINT_LIBS=`gnome-config --libs print`
AC_SUBST(GNOME_PRINT_CFLAGS)
AC_SUBST(GNOME_PRINT_LIBS)
dnl ****************************************
dnl * GDK-PIXBUF
dnl ****************************************
GLABELS_CHECK_LIB(GDK-PIXBUF, 0.11.0, gdk_pixbuf)
GDK_PIXBUF_CFLAGS=`gnome-config --cflags gdk_pixbuf`
GDK_PIXBUF_LIBS=`gnome-config --libs gdk_pixbuf`
AC_SUBST(GDK_PIXBUF_CFLAGS)
AC_SUBST(GDK_PIXBUF_LIBS)
dnl ****************************************
dnl * GNOME-CANVAS-PIXBUF
dnl ****************************************
GLABELS_CHECK_LIB(GNOME-CANVAS-PIXBUF, 0.11.0, gnomecanvaspixbuf)
GNOME_CANVAS_PIXBUF_CFLAGS=`gnome-config --cflags gnomecanvaspixbuf`
GNOME_CANVAS_PIXBUF_LIBS=`gnome-config --libs gnomecanvaspixbuf`
AC_SUBST(GNOME_CANVAS_PIXBUF_CFLAGS)
AC_SUBST(GNOME_CANVAS_PIXBUF_LIBS)
dnl ****************************************
dnl * Supported languages
dnl ****************************************
dnl Add the languages which your application supports here.
ALL_LINGUAS="fr de ja pt_BR es ru zh_TW.Big5 pl"
AM_GNOME_GETTEXT
dnl ****************************************
dnl * Set PACKAGE_LOCALE_DIR in config.h.
dnl ****************************************
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/${DATADIRNAME}")
else
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/${DATADIRNAME}")
fi
dnl ****************************************
dnl * Configure barcode library
dnl ****************************************
AC_CONFIG_SUBDIRS(barcode-0.98)
dnl ****************************************
dnl * Disable use of hacktext canvas item
dnl ****************************************
AC_ARG_ENABLE(hacktext,
[--disable-hacktext don't use hacktext canvas item for AA text],
enable_hacktext=$enableval,
enable_hacktext=yes)
if test "x$enable_hacktext" = "xyes"; then
AC_DEFINE(HACKTEXT)
fi
dnl ****************************************
dnl * Makefiles
dnl ****************************************
AC_OUTPUT([ m4/Makefile
Makefile
macros/Makefile
src/Makefile
src/pixmaps/Makefile
intl/Makefile
po/Makefile.in
doc/Makefile
doc/C/Makefile
glabels.spec
])
dnl ****************************************
dnl Print configuration summary
dnl ****************************************
echo "
Configuration:
Source code location: ${srcdir}
Compiler: ${CC}
"
|