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
|
dnl Process this file with autoconf to produce a configure script.
dnl required versions of other tools.
m4_define([req_ver_glib], [1.3.11])
m4_define([req_ver_gtk], [2.1.0])
m4_define([req_ver_libbonobo], [1.107.0])
m4_define([req_ver_libspi], [0.12.1])
m4_define([req_ver_orbit], [2.3.100])
AC_INIT(magnifier/magnifier.c)
AC_CONFIG_MACRO_DIR([m4])
dnl libtool versioning from libgnome
GNOME_MAG_MAJOR_VERSION=0
GNOME_MAG_MINOR_VERSION=15
GNOME_MAG_INTERFACE_AGE=10
dnl below should change if the interface has additions, changes, removals.
GNOME_MAG_CURRENT=`expr $GNOME_MAG_MINOR_VERSION - $GNOME_MAG_INTERFACE_AGE`
dnl increment any time the source you release changes; set to
dnl 0 if you increment CURRENT
GNOME_MAG_REVISION=5
GNOME_MAG_MICRO_VERSION=$GNOME_MAG_REVISION
dnl increment if any interfaces have been added; set to 0
dnl if any interfaces have been removed. removals has
dnl precedence over adding, so set to 0 if both happened.
GNOME_MAG_AGE=3
AC_SUBST(GNOME_MAG_CURRENT)
AC_SUBST(GNOME_MAG_REVISION)
AC_SUBST(GNOME_MAG_AGE)
LT_VERSION_INFO='-version-info ${GNOME_MAG_CURRENT}:${GNOME_MAG_REVISION}:${GNOME_MAG_AGE}'
AC_SUBST(LT_VERSION_INFO)
AM_CONFIG_HEADER(config.h)
GNOME_MAG_VERSION="$GNOME_MAG_MAJOR_VERSION.$GNOME_MAG_MINOR_VERSION.$GNOME_MAG_MICRO_VERSION"
AM_INIT_AUTOMAKE(gnome-mag, $GNOME_MAG_VERSION)
AM_MAINTAINER_MODE
IT_PROG_INTLTOOL([0.35.0])
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
AC_PROG_CC
AC_LIBTOOL_WIN32_DLL
AC_PROG_INSTALL
AC_ISC_POSIX
GNOME_COMPILE_WARNINGS(maximum)
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
GETTEXT_PACKAGE=gnome-mag
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package])
AM_GLIB_GNU_GETTEXT
AC_MSG_CHECKING([for Win32])
case "$host" in
*-*-mingw*)
gnome_mag_native_win32=yes
;;
*)
gnome_mag_native_win32=no
;;
esac
AC_MSG_RESULT([$gnome_mag_native_win32])
AM_CONDITIONAL(OS_WIN32, test "$gnome_mag_native_win32" = "yes")
if test "$gnome_mag_native_win32" = "yes"; then
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
fi
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
dnl Cache $ACLOCAL_FLAGS
AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
])
ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging [default=no]],,enable_debug=no)
if test "$enable_debug" = "yes"; then
GNOME_MAG_DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
else
GNOME_MAG_DEBUG_CFLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED"
fi
AC_SUBST(GNOME_MAG_DEBUG_CFLAGS)
AC_ARG_ENABLE(colorblind-applet, [ --enable-colorblind-applet=[yes/no] turn on colorblind-applet building [default=yes]],, enable_colorblind_applet=yes)
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
targetdir=x11
AC_SUBST(targetdir)
AC_PATH_XTRA
dnl test for X libraries
if test x$no_x = xyes ; then
AC_MSG_ERROR([X development libraries not found])
else
X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
fi
PKG_PROG_PKG_CONFIG()
dnl Check for XFIXES and XDAMAGE
PKG_CHECK_MODULES(XEXTENSIONS, xfixes xdamage, [have_xextensions=yes])
if test "x$have_xextensions" = xyes; then
dnl path to XRENDER
PKG_CHECK_MODULES(XCOMPOSITE, xcomposite xrender xext, [have_composite=yes])
if test "x$have_composite" = xyes; then
PKG_CHECK_MODULES(XCOMPOSITE, xcomposite >= 0.3, [have_overlay=yes])
fi
fi
if test "x$have_composite" = xyes; then
AC_DEFINE(HAVE_COMPOSITE, 1, [The X Composite extension is present.])
AC_DEFINE(HAVE_SHAPEINPUT, 1, [The Shape extension have ShapeInput])
if test "x$have_overlay" = xyes; then
AC_DEFINE(HAVE_OVERLAY, 1, [The X Composite extenions have overlay window])
fi
fi
X_LIBS="$X_LIBS $XEXTENSIONS_LIBS $XCOMPOSITE_LIBS"
AC_SUBST(X_LIBS)
dnl Test for the colorblind lib
AC_CHECK_LIB(colorblind, colorblind_create, COLORBLIND_LIBS=-lcolorblind)
if test "x$COLORBLIND_LIBS" != x; then
AC_CHECK_HEADER(colorblind.h, have_colorblind=yes)
AC_DEFINE(HAVE_COLORBLIND, 1, [The Color Blind library is present])
fi
AC_SUBST(COLORBLIND_LIBS)
if test "x$have_colorblind" = xyes; then
if test "x$enable_colorblind_applet" = xyes; then
dnl check for python
AM_PATH_PYTHON
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
PKG_CHECK_MODULES(PYGTK, pygtk-2.0)
AC_SUBST(PYGTK_CFLAGS)
AC_SUBST(PYGTK_LIBS)
dnl check for colorblind-applet required modules
PKG_CHECK_MODULES(CBAPPLET,
gtk+-2.0 >= 2.6
pygtk-2.0 >= 2.6
pygobject-2.0 >= 2.6
gnome-python-2.0 >= 2.10
gnome-desktop-2.0 >= 2.10
)
AC_SUBST(CBAPPLET_CFLAGS)
AC_SUBST(CBAPPLET_LIBS)
dnl ***************************************************************************
dnl * PyGTK Codegen and defs files
dnl ***************************************************************************
AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
if test "x$PYGTK_CODEGEN" = xno; then
AC_MSG_ERROR(could not find pygtk-codegen-2.0 script)
fi
AC_MSG_CHECKING(for pygtk defs)
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
AC_SUBST(PYGTK_DEFSDIR)
AC_MSG_RESULT($PYGTK_DEFSDIR)
dnl ***************************************************************************
dnl * Check for prctl()
dnl ***************************************************************************
AC_CHECK_FUNC(prctl, HAVE_PRCTL="yes", HAVE_PRCTL="yes")
if test "x$HAVE_PRCTL" = "xyes"; then
AC_CHECK_DECL(PR_SET_NAME, STILL_HAVE_PRCTL="yes", STILL_HAVE_PRCTL="no", [#include <sys/prctl.h>])
if test "x$STILL_HAVE_PRCTL" = "xyes"; then
AC_DEFINE(HAVE_PRCTL, 1, [Defined as 1 if prctl and PR_SET_NAME are available])
fi
fi
AC_MSG_CHECKING([for gnomeapplet module])
if AC_RUN_LOG([DISPLAY= $PYTHON -c '
try:
import gnomeapplet
except ImportError, e:
if str(e).find("gnomeapplet") >= 0:
raise
except:
pass
']); then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([gnomeapplet Python module required to build colorblind applet])
fi
dnl ***************************************************************************
dnl * Write the values of various paths in defs.py
dnl ***************************************************************************
AS_AC_EXPAND(DATADIR, $datarootdir)
AC_SUBST(DATADIR)
AS_AC_EXPAND(LIBDIR, $libdir)
AC_SUBST(LIBDIR)
AS_AC_EXPAND(PYTHONDIR, $pythondir)
AC_SUBST(PYTHONDIR)
CB_DIR=colorblind
AC_SUBST(CB_DIR)
fi
fi
dnl ***************************************************************************
dnl * GConf support
dnl ***************************************************************************
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
PKG_CHECK_MODULES(LIBDEPS, [
ORBit-2.0 >= 2.3.100
glib-2.0 >= 2.11.1
gmodule-2.0 >= 1.3.11
gobject-2.0 >= 1.3.11
gthread-2.0 >= 1.3.11
])
AC_SUBST(LIBDEPS_LIBS)
AC_SUBST(LIBDEPS_CFLAGS)
PKG_CHECK_MODULES(DEPS, [
libloginhelper-1.0 >= 1.5.2
libbonobo-2.0 >= 1.107.0
ORBit-2.0 >= 2.3.100
glib-2.0 >= 2.11.1
gtk+-2.0 >= 2.1.0
gdk-pixbuf-2.0 >= 2.1.0
gdk-pixbuf-xlib-2.0 >= 2.1.0
])
AC_SUBST(DEPS_LIBS)
AC_SUBST(DEPS_CFLAGS)
PKG_CHECK_MODULES(TEST, [
libspi-1.0 >= 1.5.0
libbonobo-2.0 >= 1.107.0
ORBit-2.0 >= 2.3.100
glib-2.0 >= 1.3.11
gtk+-2.0 >= 2.1.0
gdk-pixbuf-2.0 >= 2.1.0
gdk-pixbuf-xlib-2.0 >= 2.1.0
])
AC_SUBST(TEST_LIBS)
AC_SUBST(TEST_CFLAGS)
PKG_CHECK_MODULES(ORBIT, ORBit-2.0 >= 2.3.100)
AC_SUBST(ORBIT_CFLAGS)
AC_SUBST(ORBIT_LIBS)
old_LIBS="$LIBS"
dnl Checks for inet libraries:
AC_SEARCH_LIBS(gethostent, nsl)
AC_SEARCH_LIBS(setsockopt, socket)
AC_SEARCH_LIBS(connect, inet)
INET_LIBS="$LIBS"
AC_SUBST(INET_LIBS)
LIBS="$old_LIBS"
dnl orbit-idl.
ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
AC_SUBST(ORBIT_IDL)
dnl Bonobo and Bonobo-Activation idl files
BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
LIBBONOBO_IDL_DIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
AC_SUBST(BONOBO_ACTIVATION_IDL_DIR)
AC_SUBST(LIBBONOBO_IDL_DIR)
AC_OUTPUT([
Makefile
gnome-mag-1.0.pc
gnome-mag-1.0-uninstalled.pc
po/Makefile.in
idl/Makefile
magnifier/Makefile
cursors/Makefile
cursors/1_32/Makefile
test/Makefile
docs/Makefile
docs/reference/Makefile
docs/man/Makefile
colorblind/Makefile
colorblind/defs.py
colorblind/ui/Makefile
colorblind/osutils/Makefile
colorblind/data/Makefile
colorblind/data/art/Makefile
colorblind/keybinder/Makefile
])
|