summaryrefslogtreecommitdiff
path: root/configure.in
blob: aa35674a40c93cc5f948a1b7016c840b769076b8 (plain)
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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
AC_INIT(drivemount/drivemount.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnome-applets, 2.3.7)

AM_MAINTAINER_MODE

AC_PROG_INTLTOOL

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AM_PROG_LIBTOOL
AC_PATH_PROGS(PATH_TO_XRDB, "xrdb")
AC_PATH_XTRA
X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
AC_SUBST(X_LIBS)

GNOME_COMPILE_WARNINGS

dnl Stuff we might need, not quite sure yet

GTK_REQUIRED=2.1.0
LIBGNOME_REQUIRED=2.0.0
LIBGNOMEUI_REQUIRED=2.0.0
GNOME_VFS_REQUIRED=1.9.16
GCONF_REQUIRED=1.1.11
SCROLLKEEPER_REQUIRED=0.1.4
LIBPANEL_REQUIRED=2.0.0
LIBGTOP_REQUIRED=2.0.0
LIBGLADE_REQUIRED=2.0.0

dnl configure argument fo disable schema install

AC_ARG_ENABLE(install_schemas,
	[  --disable-install-schemas        Disable installation of the gconf schemas])
AM_CONDITIONAL(INSTALL_SCHEMAS, test x$enable_install_schemas != xno)

dnl ******************************************
dnl ** pkg-config dependacy checks          **
dnl ******************************************

PKG_CHECK_MODULES(GAILUTIL, gail >= 0.13)
AC_SUBST(GAILUTIL_CFLAGS)
AC_SUBST(GAILUTIL_LIBS)

PKG_CHECK_MODULES(GNOME_APPLETS, gtk+-2.0 >= $GTK_REQUIRED libpanelapplet-2.0 >= $LIBPANEL_REQUIRED)
AC_SUBST(GNOME_APPLETS_CFLAGS)
AC_SUBST(GNOME_APPLETS_LIBS)

PKG_CHECK_MODULES(GNOME_LIBS2, libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
AC_SUBST(GNOME_LIBS2_CFLAGS)
AC_SUBST(GNOME_LIBS2_LIBS)

build_gnome_vfs_applets=false
PKG_CHECK_MODULES(GNOME_VFS_APPLETS, 
		  [gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED],
		  build_gnome_vfs_applets=true,)
AC_SUBST(GNOME_VFS_APPLETS_CFLAGS)
AC_SUBST(GNOME_VFS_APPLETS_LIBS)
AM_CONDITIONAL(BUILD_GNOME_VFS_APPLETS, $build_gnome_vfs_applets)

PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
AC_SUBST(LIBGLADE_CFLAGS)
AC_SUBST(LIBGLADE_LIBS)

AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)

if test x"$GDK_PIXBUF_CSOURCE" = xno; then
  AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK])
fi 
  
AC_SUBST(GDK_PIXBUF_CSOURCE)

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 Still need to decide on the checks for these

build_gtop_applets=false
PKG_CHECK_MODULES(GTOP_APPLETS,
                 [libgtop-2.0 >= $LIBGTOP_REQUIRED],
                 build_gtop_applets=true,
		 AC_MSG_WARN([libgtop not found. Not building gtop applets.]))
AC_SUBST(GTOP_APPLETS_CFLAGS)
AC_SUBST(GTOP_APPLETS_LIBS)
AM_CONDITIONAL(BUILD_GTOP_APPLETS, $build_gtop_applets)

dnl ************************
dnl **   Set up gettext   **
dnl ************************
ALL_LINGUAS="am ar az be bg ca cs cy da de el en_GB es et eu fa fi fr ga gl he hi hu is it ja ko lt lv mk ml mn ms nl nn no pl pt pt_BR ro ru sk sl sr sr@Latn sv ta tr uk vi wa zh_CN zh_TW"

GETTEXT_PACKAGE=gnome-applets-2.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")

AM_GLIB_GNU_GETTEXT

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

dnl ******************************************
dnl ** Check for Scrollkeeper               **
dnl ******************************************

AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config, no)
if test x$SCROLLKEEPER_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the Scrollkeeper 0.1.4 package)
fi
AC_SUBST(SCROLLKEEPER_REQUIRED)

dnl ******************************************
dnl ******************************************


dnl ******************************************
dnl **  Test whether jw is installed        **
dnl ******************************************

AC_PATH_PROG(JW, jw, no)
if test x$JW = xno; then
  HAVE_JW="no"
else
  HAVE_JW="yes"
fi
AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
AC_SUBST(HAVE_JW)

dnl ******************************************
dnl ** cdplayer applet check                **
dnl ******************************************
dnl FIXME: What's the default device for irix? and is this correct for Netbsd
dnl AC_CANONICAL_HOST
cdplayer_type_sun=false
case "$host" in
*irix*) CDROM_HOST=irix; CDROM_LIBS="-lcdaudio -lmediad -lds";cd_device_path="/dev/cdrom";;
*linux*) CDROM_HOST=linux;cd_device_path="/dev/cdrom";;
*netbsd*) CDROM_HOST=netbsd;cd_device_path="/dev/rcd0";;
*solaris*) CDROM_HOST=solaris;cd_device_path="/vol/dev/aliases/cdrom0";cdplayer_type_sun=true;;
esac
case "$host" in
sparc-*-solaris*)	gkb_type_sun=true;;
*)			gkb_type_sun=false;;
esac
AM_CONDITIONAL(GKB_SUN, $gkb_type_sun)
AM_CONDITIONAL(CDDA_SOLARIS, $cdplayer_type_sun)

AM_CONDITIONAL(APPLET_CDPLAYER, test -n "$CDROM_HOST")
AC_SUBST(CDROM_HOST)
AC_SUBST(CDROM_LIBS)
AC_DEFINE_UNQUOTED(DEV_PATH, "$cd_device_path")
if test -z "$CDROM_HOST"; then
dnl  
  AC_MSG_WARN([*** \`cdplayer' applet will not be built ***])
fi

dnl ******************************************
dnl ******************************************


dnl ******************************************
dnl ** battstat check			    **
dnl ******************************************

build_battstat_applet=yes
case "${host}" in
  powerpc-*-linux*)
  	HAVE_LIBAPM=no
  	AM_CONDITIONAL(HAVE_LIBAPM, test "x$HAVE_LIBAPM" = "xyes")
	AC_SUBST(HAVE_LIBAPM)
	;;
  # list of supported OS cores
  *-*-linux*|*-*-freebsd*|*-*-openbsd*)
	AC_CHECK_LIB(apm,apm_read,[HAVE_LIBAPM=yes],[HAVE_LIBAPM=no])
	AM_CONDITIONAL(HAVE_LIBAPM, test "x$HAVE_LIBAPM" = "xyes")
	AC_SUBST(HAVE_LIBAPM)
	;;
  *)
	echo "warning: ${host} is not supported by battstat_applet, not building" >&2
	build_battstat_applet=no
	;;
esac

AM_CONDITIONAL(BUILD_BATTSTAT_APPLET, test x$build_battstat_applet = xyes)

dnl *******************************************
dnl ** mixer applet check                    **
dnl *******************************************

P_MIXER=
MIXER_LIBS=
AC_CHECK_HEADERS(linux/soundcard.h,[P_MIXER=mixer],[
  AC_CHECK_HEADERS(machine/soundcard.h, [P_MIXER=mixer],[
    AC_CHECK_HEADERS(sys/soundcard.h, [P_MIXER=mixer],[
      AC_CHECK_HEADERS(soundcard.h, [P_MIXER=mixer; MIXER_LIBS="-lossaudio"],[
        AC_CHECK_HEADERS(sys/audioio.h, [P_MIXER=mixer],[
          AC_CHECK_HEADERS(sys/audio.io.h, [P_MIXER=mixer],[
            AC_CHECK_HEADERS(sun/audioio.h, [P_MIXER=mixer],[
	      AC_CHECK_HEADERS(dmedia/audio.h, [P_MIXER=mixer]),]) ]) ]) ]) ]) ]) ])
AC_SUBST(MIXER_LIBS)

AM_CONDITIONAL(APPLET_MIXER, test "$P_MIXER" = "mixer")
if test "$P_MIXER" != "mixer"; then
  AC_MSG_WARN([*** \`mixer' applet will not be built ***])
fi

dnl ******************************************
dnl ** keyboard accessibility status applet check
dnl ******************************************

savecppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_CHECK_HEADER(X11/extensions/XKB.h, HAVE_XKB=true, HAVE_XKB=false)

AM_CONDITIONAL(APPLET_ACCESSX, $HAVE_XKB)
if test "x$APPLET_ACCESSX" = "xtrue"; then
  AC_MSG_WARN([*** \`keyboard accessibility status' applet will not be built ***])
fi
CPPFLAGS=$savecppflags


dnl ******************************************
dnl ** modemlights applet check             **
dnl ******************************************

P_MODEMLIGHTS=
case "$host_os" in
linux*|freebsd*|netbsd*|openbsd*)
  AC_CHECK_HEADERS(net/ppp_defs.h,[P_MODEMLIGHTS=modemlights])
  ;;
esac
AM_CONDITIONAL(APPLET_MODEMLIGHTS, test "$P_MODEMLIGHTS" = "modemlights")
if test "$P_MODEMLIGHTS" != "modemlights"; then
  AC_MSG_WARN([*** \`modemlights' applet will not be built ***])
fi

dnl ====================================================================
dnl Code for checking whether IPv6 is to be enabled on the system.
dnl ====================================================================
AC_MSG_CHECKING([whether to enable ipv6])
AC_ARG_ENABLE(ipv6, [ --enable-ipv6 enable IPv6 extensions], ,enable_ipv6=yes)
if test $enable_ipv6 = yes; then

  dnl ====================================================================
  dnl Code for checking presence of AF_INET6 on the system.
  dnl ====================================================================
  AC_TRY_COMPILE([
    #include <sys/types.h>
    #include <sys/socket.h>], [
    socket(AF_INET6, SOCK_STREAM, 0)
    ],
    have_ipv6=yes,
    have_ipv6=no
  )
  AC_MSG_RESULT($have_ipv6)
  if test $have_ipv6 = yes; then
      AC_DEFINE(ENABLE_IPV6)
  fi
fi

dnl =================================================================
dnl Now we would check for specific function like getaddrinfo.
dnl =================================================================
have_getaddrinfo=no
AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
if test $have_getaddrinfo != yes; then
  # getaddrinfo is not in the default libraries.  See if it's in some other.
  for lib in bsd socket inet; do
    AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes; break])
  done
fi
if test $have_getaddrinfo = yes; then
  AC_DEFINE(HAVE_GETADDRINFO)
fi

dnl =================================================================
dnl End of IPv6 checks
dnl =================================================================

# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${prefix}/share/pixmaps")

#defined the below to enable help to work for applets 

AC_DEFINE_UNQUOTED(DATADIR, "${prefix}/share")
AC_DEFINE_UNQUOTED(SYSCONFDIR, "${prefix}/etc")
AC_DEFINE_UNQUOTED(LIBDIR, "${prefix}/lib")
AC_DEFINE_UNQUOTED(PREFIX, "$prefix")

AC_OUTPUT([
gnome-applets.spec
Makefile
po/Makefile.in
screen-exec/Makefile
accessx-status/Makefile
accessx-status/docs/Makefile
accessx-status/docs/C/Makefile
accessx-status/pixmaps/Makefile
mailcheck/Makefile
mailcheck/help/Makefile
mailcheck/help/C/Makefile
mailcheck/help/de/Makefile
mailcheck/help/es/Makefile
mailcheck/help/fr/Makefile
mailcheck/help/it/Makefile
mailcheck/help/sv/Makefile
mailcheck/help/ja/Makefile
mailcheck/help/ko/Makefile
mailcheck/help/zh_CN/Makefile
mailcheck/help/zh_TW/Makefile
mini-commander/Makefile
mini-commander/src/Makefile
mini-commander/help/Makefile
mini-commander/help/C/Makefile
mini-commander/help/de/Makefile
mini-commander/help/es/Makefile
mini-commander/help/fr/Makefile
mini-commander/help/it/Makefile
mini-commander/help/sv/Makefile
mini-commander/help/ja/Makefile
mini-commander/help/ko/Makefile
mini-commander/help/zh_CN/Makefile
mini-commander/help/zh_TW/Makefile
mixer/Makefile
mixer/docs/Makefile
mixer/docs/C/Makefile
mixer/docs/de/Makefile
mixer/docs/es/Makefile
mixer/docs/fr/Makefile
mixer/docs/sv/Makefile
mixer/docs/ja/Makefile
mixer/docs/ko/Makefile
mixer/docs/zh_CN/Makefile
mixer/docs/zh_TW/Makefile
drivemount/Makefile
drivemount/help/Makefile
drivemount/help/C/Makefile
modemlights/Makefile
modemlights/docs/Makefile
modemlights/docs/C/Makefile
cdplayer/Makefile
cdplayer/docs/Makefile
cdplayer/docs/C/Makefile
cdplayer/docs/de/Makefile
cdplayer/docs/es/Makefile
cdplayer/docs/fr/Makefile
cdplayer/docs/it/Makefile
cdplayer/docs/sv/Makefile
cdplayer/docs/ja/Makefile
cdplayer/docs/ko/Makefile
cdplayer/docs/zh_CN/Makefile
cdplayer/docs/zh_TW/Makefile
multiload/Makefile
gkb-new/Makefile
gkb-new/gkb/Makefile
gkb-new/xmodmap/Makefile
gkb-new/descs/Makefile
gkb-new/xmodmap.sun/Makefile
gkb-new/descs.sun/Makefile
gkb-new/gkb_xmmap.in
gkb-new/help/Makefile
gkb-new/help/C/Makefile
gkb-new/help/de/Makefile
gkb-new/help/es/Makefile
gkb-new/help/fr/Makefile
gkb-new/help/it/Makefile
gkb-new/help/sv/Makefile
gkb-new/help/ja/Makefile
gkb-new/help/ko/Makefile
gkb-new/help/zh_CN/Makefile
gkb-new/help/zh_TW/Makefile
charpick/Makefile
charpick/help/Makefile
charpick/help/C/Makefile
charpick/help/de/Makefile
charpick/help/es/Makefile
charpick/help/fr/Makefile
charpick/help/it/Makefile
charpick/help/sv/Makefile
charpick/help/ja/Makefile
charpick/help/ko/Makefile
charpick/help/zh_CN/Makefile
charpick/help/zh_TW/Makefile
gtik/Makefile
gtik/access/Makefile
gtik/help/Makefile
gtik/help/C/Makefile
gtik/help/de/Makefile
gtik/help/es/Makefile
gtik/help/fr/Makefile
gtik/help/it/Makefile
gtik/help/sv/Makefile
gtik/help/ja/Makefile
gtik/help/ko/Makefile
gtik/help/zh_CN/Makefile
gtik/help/zh_TW/Makefile
gweather/Makefile
gweather/pixmaps/Makefile
gweather/docs/Makefile
gweather/docs/C/Makefile
gweather/docs/de/Makefile
gweather/docs/es/Makefile
gweather/docs/fr/Makefile
gweather/docs/it/Makefile
gweather/docs/sv/Makefile
gweather/docs/ja/Makefile
gweather/docs/ko/Makefile
gweather/docs/zh_CN/Makefile
gweather/docs/zh_TW/Makefile
geyes/Makefile
geyes/themes/Makefile
geyes/docs/Makefile
geyes/docs/C/Makefile
geyes/docs/de/Makefile
geyes/docs/es/Makefile
geyes/docs/fr/Makefile
geyes/docs/it/Makefile
geyes/docs/sv/Makefile
geyes/docs/ja/Makefile
geyes/docs/ko/Makefile
geyes/docs/zh_CN/Makefile
geyes/docs/zh_TW/Makefile
battstat/Makefile
battstat/apmlib/Makefile
battstat/sounds/Makefile
battstat/docs/Makefile
battstat/docs/C/Makefile
battstat/docs/ja/Makefile
man/Makefile
wireless/Makefile
stickynotes/Makefile
stickynotes/pixmaps/Makefile
stickynotes/docs/Makefile
stickynotes/docs/C/Makefile
])