~ubuntu-branches/ubuntu/lucid/gnome-system-tools/lucid-updates

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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
AC_PREREQ(2.60)
AC_INIT(gnome-system-tools, 2.30.0, http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-system-tools)
AC_CONFIG_SRCDIR(src/common/gst-tool.c)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

IT_PROG_INTLTOOL([0.35.0])

AM_CONFIG_HEADER(config.h)

GNOME_DOC_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)

STB_REQUIRED=2.9.4
LIBOOBS_REQUIRED=2.29.91
GTK_REQUIRED=2.16
GLIB_REQUIRED=2.15.2
GCONF_REQUIRED=2.2.0
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
			   gmodule-export-2.0
			   pango
			   gconf-2.0 >= $GCONF_REQUIRED
			   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,
	AS_HELP_STRING([--enable-polkit-gtk],[Enable PolicyKit support using polkit-gtk (default yes)]),
	[], [enable_polkit_gtk=yes])

if test "x$enable_polkit_gtk" = "xyes"; then
	PKG_CHECK_MODULES(POLKIT_GTK,[polkit-gtk-1 >= $POLICYKIT_GTK_REQUIRED], have_polkit=yes)

	if test "$have_polkit" = "yes"; then
		AC_DEFINE(HAVE_POLKIT, [1], [whether polkit-gtk was found])
	else
		AC_MSG_ERROR([PolicyKit support requested but polkit-gtk 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(nautilus,
	      [  --enable-nautilus         Enable build nautilus shares module (default yes)], , 
	      enable_nautilus=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_NAUTILUS, test x$enable_nautilus = xyes)

dnl =====================================================
dnl END: Check for GST Modules to build
dnl =====================================================

dnl ========================================================
dnl Translations
dnl ========================================================

GETTEXT_PACKAGE=gnome-system-tools
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package name])
AM_GLIB_GNU_GETTEXT

# AM_GNOME_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
gnomelocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gnomelocaledir)

dnl ========================================================
dnl END : Translations
dnl ========================================================

dnl =====================================================
dnl GCONF
dnl =====================================================

AC_PATH_PROG(GCONFTOOL, gconftool-2, no)

if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
     
AM_GCONF_SOURCE_2

dnl =====================================================
dnl END: GCONF
dnl =====================================================
    
dnl =====================================================
dnl GST_LIBS & GST_CFLAGS 
dnl =====================================================


#### gcc warning flags (taken from PolicyKit-gnome)

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 -DGNOME_DISABLE_DEPRECATED"
GST_DEPRECATED_FLAGS=""

GST_LIBS="$GST_DEPENDS_LIBS $POLKIT_GTK_LIBS"
GST_CFLAGS="$GST_DEPENDS_CFLAGS $POLKIT_GTK_CFLAGS $GST_DEPRECATED_FLAGS"

GST_TOOL_LIBS="\$(top_builddir)/src/common/libsetuptool.a $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.a"

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 GIO
dnl ==================================

PKG_CHECK_MODULES(GIO,[
		  gio-2.0 >= $GLIB_REQUIRED
		  ])

AC_SUBST(GIO_LIBS)
AC_SUBST(GIO_CFLAGS)

dnl ==================================
dnl END: GIO
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 NAUTILUS EXTENSION
dnl ===========================

if test "x$enable_nautilus" = "xyes"; then
	PKG_CHECK_MODULES(NAUTILUS,[
		   libnautilus-extension >= 2.9.3
		   liboobs-1 >= $LIBOOBS_REQUIRED
		   gio-2.0   >= $GLIB_REQUIRED
		   ])
fi

AC_SUBST(NAUTILUS_LIBS)
AC_SUBST(NAUTILUS_CFLAGS)

dnl Determine the install dir for nautilus extension.
NAUTILUSDIR=`pkg-config --variable=extensiondir libnautilus-extension`
AC_SUBST(NAUTILUSDIR)

dnl ===========================
dnl END: NAUTILUS EXTENSION
dnl ===========================

AC_OUTPUT([
Makefile
doc/Makefile
doc/network/Makefile
doc/services/Makefile
doc/services/nl/Makefile
doc/shares/Makefile
doc/time/Makefile
doc/time/nl/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/users.desktop.in
src/users/Makefile
src/network/network.desktop.in
src/network/Makefile
src/time/time.desktop.in
src/time/Makefile
src/time/e-map/Makefile
src/services/services.desktop.in
src/services/Makefile
src/shares/shares.desktop.in
src/shares/Makefile
src/shares/nautilus/Makefile
po/Makefile.in
gnome-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}
	Nautilus support:  ${enable_nautilus}
	Use PolKit-GTK:    ${have_polkit}

	Compiler:          ${CC}
"