-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigure.ac
292 lines (245 loc) · 6.86 KB
/
configure.ac
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
AC_INIT(README)
PACKAGE=nanny
VERSION=2.31.1
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AM_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_ARG_WITH(init-scripts,
[ --with-init-scripts=[redhat/debian/suse/mandriva/None] Install init.d scripts [default=None]],,
with_init_scripts=None)
AC_ARG_ENABLE([win32],
AS_HELP_STRING([--enable-win32],[Enable support for win32 (default: disabled)]),
[enable_win32=$enableval],
[enable_win32=no])
GNOME_DOC_INIT
dnl check for python
dnl ----------------------------
AM_PATH_PYTHON
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.6)
AC_SUBST(PYGTK_CFLAGS)
AC_SUBST(PYGTK_LIBS)
PKG_CHECK_MODULES(PYDBUS, dbus-python >= 0.80)
AC_SUBST(PYDBUS_CFLAGS)
AC_SUBST(PYDBUS_LIBS)
dnl check for glib
dnl -----------------------------
GLIB_REQUIRED=2.12.0
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
dnl policy-kit support
dnl ------------------------------
POLKIT_POLICY_DIR="${datadir}/polkit-1/actions/"
AC_SUBST(POLKIT_POLICY_DIR)
dnl check for python headers
dnl ------------------------------
AC_MSG_CHECKING(for shared library Python stuff)
PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
PYTHON_LIBS="-lpython$PYTHON_VERSION"
PYTHON_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config"
PYTHON_CFLAGS="-I$PY_PREFIX/include/python$PYTHON_VERSION"
PYTHON_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/Makefile"
PYTHON_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
PYTHON_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
PYTHON_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
PYTHON_EXTRA_LIBS="$PYTHON_LOCALMODLIBS $PYTHON_BASEMODLIBS $PYTHON_OTHER_LIBS"
AC_SUBST([PYTHON_LIBS])
AC_SUBST([PYTHON_LIB_LOC])
AC_SUBST([PYTHON_CFLAGS])
AC_SUBST([PYTHON_EXTRA_LIBS])
dnl check for twisted.web
dnl -----------------------------------------
AC_MSG_CHECKING(for twisted.web)
prog="
import sys
try:
import twisted.web
except RuntimeError:
sys.exit(0)
except ImportError:
sys.exit(1)
sys.exit(0)
"
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT(not found)
AC_MSG_ERROR([You need to have twisted.web installed])
fi
dnl check for python-imaging
dnl -----------------------------------------
AC_MSG_CHECKING(for python-imaging)
prog="
import sys
try:
import Image
except RuntimeError:
sys.exit(0)
except ImportError:
sys.exit(1)
sys.exit(0)
"
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT(not found)
AC_MSG_ERROR([You need to have python-imaging installed])
fi
dnl check for python-hachoir-regex
dnl -----------------------------------------
AC_MSG_CHECKING(for python-hachoir-regex)
prog="
import sys
try:
from hachoir_regex import parse, createRange, createString
except RuntimeError:
sys.exit(0)
except ImportError:
sys.exit(1)
sys.exit(0)
"
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT(not found)
fi
AM_CONDITIONAL(HAS_HACHOIR_REGEX, $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC)
dnl check for python-gtop
dnl -----------------------------------------
AC_MSG_CHECKING(for python-gtop)
prog="
import sys
try:
import gtop
except RuntimeError:
sys.exit(0)
except ImportError:
sys.exit(1)
sys.exit(0)
"
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT(not found)
AC_MSG_ERROR([You need to have python-gtop installed])
fi
dnl OS support
dnl --------------------------------------------
AC_MSG_CHECKING(Win32 support)
if test x$enable_win32 = xyes ; then
AC_MSG_RESULT(enabled)
else
AC_MSG_RESULT(disabled)
fi
AM_CONDITIONAL(NANNY_WIN32_SUPPORT, test x$enable_win32 = xyes)
AM_CONDITIONAL(NANNY_POSIX_SUPPORT, test x$enable_win32 = xno)
dnl checking operative system
dnl --------------------------------------------
SYSCONFDIR_TMP="$sysconfdir"
EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
AC_SUBST(EXPANDED_SYSCONFDIR)
operating_system=unknown
AC_MSG_CHECKING(Checking Redhat)
if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
AC_MSG_RESULT(found)
operative_system=redhat
else
AC_MSG_RESULT(not found)
fi
AC_MSG_CHECKING(Checking Suse)
if test -f /etc/SuSE-release || test -f $EXPANDED_SYSCONFDIR/SuSE-release ; then
AC_MSG_RESULT(found)
operative_system=suse
else
AC_MSG_RESULT(not found)
fi
AC_MSG_CHECKING(Checking Debian/Ubuntu)
if test -f /etc/debian_version || test -f $EXPANDED_SYSCONFDIR/debian_version ; then
AC_MSG_RESULT(found)
operative_system=debian
else
AC_MSG_RESULT(not found)
fi
AC_MSG_CHECKING(Checking Mandriva/CaixaMagica)
if test -f /etc/mandriva-release || test -f $EXPANDED_SYSCONFDIR/mandriva-release ; then
AC_MSG_RESULT(found)
operative_system=mandriva
else
AC_MSG_RESULT(not found)
fi
AM_CONDITIONAL(NANNY_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
AM_CONDITIONAL(NANNY_INIT_SCRIPTS_SUSE, test x$with_init_scripts = xsuse)
AM_CONDITIONAL(NANNY_INIT_SCRIPTS_DEBIAN, test x$with_init_scripts = xdebian)
AM_CONDITIONAL(NANNY_INIT_SCRIPTS_MANDRIVA, test x$with_init_scripts = xmandriva)
dnl *******************************
dnl Internationalization
dnl *******************************
GETTEXT_PACKAGE=nanny
AC_DEFINE(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", "nanny")
AC_SUBST(GETTEXT_PACKAGE)
GNOME_DOC_INIT
dnl Add the languages which your application supports here.
ALL_LINGUAS="es vi"
AM_GLIB_GNU_GETTEXT
AC_PROG_INTLTOOL
AC_OUTPUT([
Makefile
po/Makefile.in
client/Makefile
client/common/Makefile
client/common/src/Makefile
client/common/icons/Makefile
client/common/icons/16x16/Makefile
client/common/icons/22x22/Makefile
client/common/icons/24x24/Makefile
client/common/icons/32x32/Makefile
client/common/icons/48x48/Makefile
client/common/icons/256x256/Makefile
client/common/icons/scalable/Makefile
client/gnome/Makefile
client/gnome/__init__.py
client/gnome/systray/Makefile
client/gnome/systray/src/Makefile
client/gnome/systray/src/__init__.py
client/gnome/systray/data/Makefile
client/gnome/admin/Makefile
client/gnome/admin/data/Makefile
client/gnome/admin/data/ui/Makefile
client/gnome/admin/data/icons/Makefile
client/gnome/admin/src/Makefile
client/gnome/admin/src/__init__.py
client/gnome/nanny-firefox-win32/Makefile
daemon/Makefile
daemon/data/Makefile
daemon/data/applists/Makefile
daemon/data/dbus/Makefile
daemon/data/init.d/Makefile
daemon/data/init.d/debian/Makefile
daemon/data/init.d/redhat/Makefile
daemon/data/init.d/suse/Makefile
daemon/data/init.d/mandriva/Makefile
daemon/data/etld/Makefile
daemon/src/Makefile
daemon/src/etld.py
daemon/src/proxy/Makefile
help/Makefile
man/Makefile
])
echo "
NANNY
=====
prefix: ${prefix}
"