-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
363 lines (294 loc) · 9.92 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
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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
AC_PREREQ(2.60)
AC_INIT(mate-system-tools, 1.8.1, http://wwww.mate-desktop.org/)
AC_CONFIG_SRCDIR(src/common/gst-tool.c)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([no-dist-gzip dist-xz check-news])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
IT_PROG_INTLTOOL([0.35.0])
AM_CONFIG_HEADER(config.h)
YELP_HELP_INIT
AM_MAINTAINER_MODE
dnl Checking the above
AC_CONFIG_SRCDIR(src/common/gst-tool.c)
AM_PROG_LIBTOOL
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl glib-genmarshal
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
GLIB_GSETTINGS
STB_REQUIRED=2.10.1
LIBOOBS_REQUIRED=1.1.0
GTK_REQUIRED=2.19.7
GLIB_REQUIRED=2.25.3
DBUS_REQUIRED=0.32
POLICYKIT_GTK_REQUIRED=0.92
dnl =====================================================
dnl Cracklib checking
dnl =====================================================
dnl AC_CHECK_LIB(crack, FascistCheck, ,[
dnl AC_MSG_WARN()
dnl AC_MSG_WARN(---------- Building without cracklib is not recommended. ----------)
dnl AC_MSG_WARN()
dnl AC_MSG_WARN(-- If you are looking for cracklib you can try :)
dnl AC_MSG_WARN(-- http://www.users.dircon.co.uk/~crypto/)
dnl AC_MSG_WARN(-- or :)
dnl AC_MSG_WARN(-- http://www.rpmfind.net/linux/rpm2html/search.php?query=cracklib)
dnl AC_MSG_WARN(-- or :)
dnl AC_MSG_WARN(-- apt-get install cracklib2-dev)
dnl AC_MSG_WARN()])
dnl if test x"$HAVE_LIBCRACK" = xyes ; then
dnl AC_CHECK_HEADER(crack.h, ,[
dnl AC_MSG_ERROR(cracklib crack.h header file not found.)])
dnl fi
dnl GST_CRACK_LIB_LOCATION="/usr/lib/"
dnl AC_ARG_WITH(cracklib-dict,
dnl [ --with-cracklib-dict[=DIR] specify a cracklib dir ],[
dnl if test "$withval" != "no"; then
dnl GST_CRACK_LIB_LOCATION=$withval
dnl fi
dnl ])
dnl AC_SUBST(GST_CRACK_LIB_LOCATION)
dnl GST_CRACK_LIB_CFLAGS="-DGST_CRACK_LIB_DICT_PATH=\"\\\"\$(GST_CRACK_LIB_LOCATION)\\\"\""
dnl AC_SUBST(GST_CRACK_LIB_CFLAGS)
dnl =====================================================
dnl END: Cracklib checking
dnl =====================================================
dnl =====================================================
dnl Check for Module versions
dnl =====================================================
PKG_CHECK_MODULES(GST_DEPENDS,[
gtk+-2.0 >= $GTK_REQUIRED
atk
gmodule-export-2.0
gio-2.0 >= $GLIB_REQUIRED
pango
liboobs-1 >= $LIBOOBS_REQUIRED
system-tools-backends-2.0 >= $STB_REQUIRED
])
PKG_CHECK_MODULES(DBUS,[
dbus-1 >= $DBUS_REQUIRED
])
DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
AC_SUBST(DBUS_LIBS)
AC_SUBST(DBUS_CFLAGS)
dnl PolicyKit-GTK support
have_polkit=no
AC_ARG_ENABLE(polkit-gtk-mate,
AS_HELP_STRING([--enable-polkit-gtk-mate],[Enable PolicyKit support using polkit-gtk-mate (default yes)]),
[], [enable_polkit_gtk_mate=yes])
if test "x$enable_polkit_gtk_mate" = "xyes"; then
PKG_CHECK_MODULES(POLKIT_GTK_MATE,[polkit-gtk-mate-1 >= $POLICYKIT_GTK_REQUIRED], have_polkit=yes)
if test "$have_polkit" = "yes"; then
AC_DEFINE(HAVE_POLKIT, [1], [whether polkit-gtk-mate was found])
else
AC_MSG_ERROR([PolicyKit support requested but polkit-gtk-mate not found])
fi
fi
AC_SUBST(POLKIT_LIBS)
AC_SUBST(POLKIT_CFLAGS)
AM_CONDITIONAL(HAVE_POLKIT, test x$have_polkit = xyes)
dnl =====================================================
dnl END: Check for Module versions
dnl =====================================================
dnl =====================================================
dnl Check for GST Modules to build
dnl =====================================================
AC_ARG_ENABLE(network,
[ --enable-network Enable build network module (default yes)], ,
enable_network=yes)
AC_ARG_ENABLE(services,
[ --enable-services Enable build services module (default yes)], ,
enable_services=yes)
AC_ARG_ENABLE(time,
[ --enable-time Enable build time module (default yes)], ,
enable_time=yes)
AC_ARG_ENABLE(users,
[ --enable-users Enable build users module (default yes)], ,
enable_users=yes)
AC_ARG_ENABLE(shares,
[ --enable-shares Enable build shares module (default yes)], ,
enable_shares=yes)
AC_ARG_ENABLE(caja,
[ --enable-caja Enable build caja shares module (default yes)], ,
enable_caja=yes)
AM_CONDITIONAL(BUILD_NETWORK, test x$enable_network = xyes)
AM_CONDITIONAL(BUILD_SERVICES, test x$enable_services = xyes)
AM_CONDITIONAL(BUILD_TIME, test x$enable_time = xyes)
AM_CONDITIONAL(BUILD_USERS, test x$enable_users = xyes)
AM_CONDITIONAL(BUILD_SHARES, test x$enable_shares = xyes)
AM_CONDITIONAL(BUILD_CAJA, test x$enable_caja = xyes)
dnl =====================================================
dnl END: Check for GST Modules to build
dnl =====================================================
dnl ========================================================
dnl Translations
dnl ========================================================
GETTEXT_PACKAGE=mate-system-tools
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package name])
AM_GLIB_GNU_GETTEXT
# AM_MATE_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
matelocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(matelocaledir)
dnl ========================================================
dnl END : Translations
dnl ========================================================
dnl =====================================================
dnl GST_LIBS & GST_CFLAGS
dnl =====================================================
#### gcc warning flags (taken from PolicyKit-mate)
if test "x$GCC" = "xyes"; then
changequote(,)dnl
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wcast-align[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wcast-align" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wformat[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wformat" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wformat-security[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wformat-security" ;;
esac
changequote([,])dnl
fi
dnl GST_DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DMATE_DISABLE_DEPRECATED"
GST_DEPRECATED_FLAGS=""
GST_LIBS="$GST_DEPENDS_LIBS $POLKIT_GTK_MATE_LIBS"
GST_CFLAGS="$GST_DEPENDS_CFLAGS $POLKIT_GTK_MATE_CFLAGS $GST_DEPRECATED_FLAGS"
GST_TOOL_LIBS="\$(top_builddir)/src/common/libsetuptool.la $GST_LIBS"
GST_TOOL_CFLAGS="-I\$(top_srcdir)/src/common $GST_CFLAGS"
GST_TOOL_CLEANFILES="\$(desktop) \$(desktop).in"
GST_TOOL_EXTRA_DIST="\$(toolpixmaps) \$(desktop).in.in"
GST_TOOL_DEPENDENCIES="\$(top_builddir)/src/common/libsetuptool.la"
AC_SUBST(GST_LIBS)
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_TOOL_LIBS)
AC_SUBST(GST_TOOL_CFLAGS)
AC_SUBST(GST_TOOL_CLEANFILES)
AC_SUBST(GST_TOOL_EXTRA_DIST)
AC_SUBST(GST_TOOL_DEPENDENCIES)
dnl ==================================
dnl END: GST_LIBS & GST_FLAGS
dnl ==================================
dnl ==================================
dnl LIBIW DETECTION
dnl ==================================
GST_IW_LIBS=
AC_CHECK_HEADER(iwlib.h, [
enable_libiw=yes
AC_DEFINE(HAVE_LIBIW_H, "", [whether libiw is available])
AC_HAVE_LIBRARY(iw, [GST_IW_LIBS="-liw"])
])
AM_CONDITIONAL(HAVE_LIBIW_H, test x$enable_libiw = xyes)
AC_SUBST(GST_IW_LIBS)
dnl ==================================
dnl END: LIBIW DETECTION
dnl ==================================
dnl ===========================
dnl CAJA EXTENSION
dnl ===========================
if test "x$enable_caja" = "xyes"; then
PKG_CHECK_MODULES(CAJA,[
libcaja-extension >= 1.1.0
liboobs-1 >= $LIBOOBS_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
])
fi
AC_ARG_WITH(cajadir,
AS_HELP_STRING([--with-cajadir=DIR],[Installation path for Caja extension @<:@auto@:>@]),
[ac_with_cajadir=$withval],
[ac_with_cajadir=""])
if test "${ac_with_cajadir}" = ""; then
ac_with_cajadir=`pkg-config --variable=extensiondir libcaja-extension`
fi
AC_SUBST(CAJA_LIBS)
AC_SUBST(CAJA_CFLAGS)
dnl Determine the install dir for caja extension.
AC_MSG_NOTICE([installing caja plugin in ${ac_with_cajadir}])
AC_SUBST([CAJADIR],[${ac_with_cajadir}])
dnl ===========================
dnl END: CAJA EXTENSION
dnl ===========================
AC_OUTPUT([
Makefile
doc/Makefile
doc/network/Makefile
doc/services/Makefile
doc/shares/Makefile
doc/time/Makefile
doc/users/Makefile
icons/Makefile
icons/16x16/Makefile
icons/16x16/apps/Makefile
icons/22x22/Makefile
icons/22x22/apps/Makefile
icons/24x24/Makefile
icons/24x24/apps/Makefile
icons/32x32/Makefile
icons/32x32/apps/Makefile
icons/48x48/Makefile
icons/48x48/apps/Makefile
icons/48x48/devices/Makefile
icons/scalable/Makefile
icons/scalable/apps/Makefile
interfaces/Makefile
pixmaps/Makefile
src/Makefile
src/common/Makefile
src/users/mate-users.desktop.in
src/users/Makefile
src/network/mate-network.desktop.in
src/network/Makefile
src/time/mate-time.desktop.in
src/time/Makefile
src/time/e-map/Makefile
src/services/mate-services.desktop.in
src/services/Makefile
src/shares/mate-shares.desktop.in
src/shares/Makefile
src/shares/caja/Makefile
po/Makefile.in
mate-system-tools.pc
])
echo "
Configuration (GST):
Services tool: ${enable_services}
Users tool: ${enable_users}
Network tool: ${enable_network}
Time tool: ${enable_time}
Shares tool: ${enable_shares}
Caja support: ${enable_caja}
Use PolKit-GTK-Mate: ${have_polkit}
Compiler: ${CC}
"