summaryrefslogtreecommitdiff
path: root/configure.in
blob: 871ee716a22242498de986015e7125caca6f95e7 (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
AC_INIT(drivemount/drivemount.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnome-applets, 2.1.3)

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(yes)

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
LIBWNCK_REQUIRED=0.13
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 da de el en_GB es et eu fi fr ga gl he hi hu it ja ko lt lv mn ms nl nn no pl pt pt_BR ro ru sk sl 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)
	;;
  *-*-linux*)
	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)  
	;;
  *solaris*)
	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 ******************************************



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 ** PanelMenu applet                          **
dnl ***********************************************

AC_ARG_ENABLE(panelmenu, 
  [  --enable-panelmenu=[no/yes]		Build panel-menu applet [ default=no ]],
   enable_panelmenu="$enableval", enable_panelmenu=no)


AM_CONDITIONAL(BUILD_PANEL_MENU, test "$enable_panelmenu" = yes)

if test x$enable_panelmenu = xyes; then
  PKG_CHECK_MODULES(PANEL_MENU, gtk+-2.0 >= $GTK_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED libpanelapplet-2.0 >= $LIBPANEL_REQUIRED gconf-2.0 >= $GCONF_REQUIRED gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED)
  AC_SUBST(PANEL_MENU_CFLAGS)
  AC_SUBST(PANEL_MENU_LIBS)
fi

# 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
mini-commander/Makefile
mini-commander/src/Makefile
mini-commander/help/Makefile
mini-commander/help/C/Makefile
mixer/Makefile
mixer/docs/Makefile
mixer/docs/C/Makefile
drivemount/Makefile
drivemount/help/Makefile
drivemount/help/C/Makefile
modemlights/Makefile
cdplayer/Makefile
cdplayer/docs/Makefile
cdplayer/docs/C/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
panel-menu/Makefile
panel-menu/help/Makefile
panel-menu/help/C/Makefile
charpick/Makefile
charpick/help/Makefile
charpick/help/C/Makefile
gtik/Makefile
gtik/access/Makefile
gtik/help/Makefile
gtik/help/C/Makefile
gweather/Makefile
gweather/pixmaps/Makefile
gweather/docs/Makefile
gweather/docs/C/Makefile
geyes/Makefile
geyes/themes/Makefile
geyes/docs/Makefile
geyes/docs/C/Makefile
battstat/Makefile
battstat/apmlib/Makefile
battstat/sounds/Makefile
battstat/docs/Makefile
battstat/docs/C/Makefile
man/Makefile
wireless/Makefile
omf-install/Makefile
])