Delete unused files.
[lxde/lxpanel.git] / configure.ac
CommitLineData
a52c2257 1AC_PREREQ(2.53)
27b2af2a 2AC_INIT(lxpanel, 0.2.5, http://lxde.sourceforge.net/)
42fe8c5f 3AM_INIT_AUTOMAKE
a52c2257
HJYP
4AC_CONFIG_SRCDIR([src/bg.c])
5AC_CONFIG_HEADER([config.h])
6
86db742c
JH
7# Force to dynamic
8AC_DISABLE_STATIC
9
a52c2257
HJYP
10# Checks for programs.
11AC_PROG_CC
12AC_PROG_INSTALL
13AC_PROG_LN_S
1141e22a 14AC_PROG_LIBTOOL
a52c2257
HJYP
15AC_PROG_INTLTOOL(, [no-xml])
16
17# Checks for libraries.
18pkg_modules="gtk+-2.0 >= 2.6.0 \
fb20a9b5
HJYP
19 gthread-2.0"
20# libstartup-notification-1.0"
a52c2257
HJYP
21PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
22AC_SUBST(PACKAGE_CFLAGS)
23AC_SUBST(PACKAGE_LIBS)
24
535ac098
JH
25AC_ARG_ENABLE([cast-checks],
26 AS_HELP_STRING([--enable-cast-checks],
27 [enable Glib casting checks (default: disable)]),
28 cast_checks=$enableval, cast_checks="no")
29G_CAST_CHECKS=""
30if test x"$cast_checks" = "xno"; then
31 G_CAST_CHECKS="-DG_DISABLE_CAST_CHECKS"
32fi
33AC_SUBST(G_CAST_CHECKS)
34
c044bccf
JH
35AC_ARG_ENABLE([alsa],
36 AS_HELP_STRING([--disable-alsa],
37 [compile ALSA providers (default: enable)]),
38 compile_alsa=$enableval, compile_alsa="yes")
39if test x"$compile_alsa" = "xyes"; then
40 AC_CHECK_HEADERS([alsa/asoundlib.h],
41 [AC_CHECK_LIB([asound],
42 [snd_seq_open],
43 compile_alsa=yes,compile_alsa=no)],
44 compile_alsa=no)
45fi
46AM_CONDITIONAL(BUILD_ALSA_PLUGINS, test x$compile_alsa = xyes)
47dnl FIXME: check OSS existence
48AM_CONDITIONAL(BUILD_OSS_PLUGINS, test x$compile_alsa = xno)
49
2d29cc96
JH
50AC_ARG_ENABLE([plugins-loading],
51 AS_HELP_STRING([--disable-plugins-loading],
52 [disable plugin loading (default: enable)]),
53 plugins_loading=$enableval, plugins_loading="yes")
54
31b80004
JH
55AM_CONDITIONAL(BUILD_PLUGIN_LOADER, test x$plugins_loading = xyes)
56
535ac098 57if test x"$plugins_loading" = "xno"; then
2d29cc96 58 AC_DEFINE(DISABLE_PLUGINS_LOADING, [1], [Disable plugin loading])
2d29cc96
JH
59fi
60
199c3ea8
JH
61dnl Here are plugin listing.
62plugin_netstatus=
19348802 63plugin_netstat=
199c3ea8 64plugin_volume=
15556f61 65plugin_volumealsa=
199c3ea8 66plugin_cpu=
ce728cd9 67plugin_deskno=
8f11d5f8 68plugin_batt=
199c3ea8
JH
69
70AC_MSG_CHECKING([which plugins should be built dynamically])
71AC_ARG_WITH(plugins,
72[ --with-plugins=<list> compile dynamic plugins in <list> ]
73[ plugins may be comma separated ]
74[ 'all' builds all plugins (default), 'none' builds none ]
75[ Possible plugins are: ]
19348802 76[ netstatus, netstat, volume, volumealsa, cpu, deskno, batt], plugins="$withval",[plugins="all"])
199c3ea8
JH
77
78if test x"$plugins" != xall -a x"$plugins" != xnone; then
79 if test x"$plugins_loading" = xno; then
80 AC_MSG_ERROR(
81 [--disable-plugins-loading and --with-plugins conflict each other.])
82 fi
83fi
84
85if test x"$plugins" = xall; then
86 plugin_netstatus=netstatus
19348802 87 plugin_netstat=netstat
199c3ea8 88 plugin_volume=volume
15556f61 89 plugin_volumealsa=volumealsa
199c3ea8 90 plugin_cpu=cpu
ce728cd9 91 plugin_deskno=deskno
8f11d5f8 92 plugin_batt=batt
199c3ea8
JH
93 AC_MSG_RESULT(all)
94else
95 if test "$plugins" != "none"; then
96 plugins=`echo $plugins | sed 's/,/ /g'`
97 for plugin in $plugins
98 do
99 case "$plugin" in
100 netstatus)
101 plugin_netstatus=netstatus
102 ;;
19348802
FC
103 netstat)
104 plugin_netstat=netstat
105 ;;
199c3ea8
JH
106 volume)
107 plugin_volume=volume
108 ;;
15556f61
FC
109 volumealsa)
110 plugin_volumealsa=volumealsa
111 ;;
199c3ea8
JH
112 cpu)
113 plugin_cpu=cpu
114 ;;
ce728cd9
JH
115 deskno)
116 plugin_deskno=deskno
117 ;;
8f11d5f8
HJYP
118 batt)
119 plugin_deskno=batt
120 ;;
199c3ea8
JH
121 *)
122 echo "Unknown plugin $plugin."
123 exit 1
124 ;;
125 esac
126 done
127 AC_MSG_RESULT($plugins)
128 fi
129fi
130
c044bccf
JH
131dnl FIXME: OSS/ALSA checking
132if test x"$compile_alsa" = "xno"; then
133 if test ! -z $plugin_volumealsa; then
134 AC_MSG_RESULT([no ALSA headers/libraries found!])
135 plugin_volumealsa=
136 fi
137else
138 dnl force OSS plugin to <null>
139 plugin_volume=
140fi
19348802 141PLUGINS_LIST="$plugin_netstatus $plugin_netstat $plugin_volume $plugin_volumealsa $plugin_cpu $plugin_deskno $plugin_batt"
199c3ea8
JH
142AC_SUBST(PLUGINS_LIST)
143
1141e22a 144
a52c2257
HJYP
145# Checks for header files.
146AC_PATH_X
147AC_HEADER_STDC
148AC_HEADER_SYS_WAIT
149AC_CHECK_HEADERS([locale.h stdlib.h string.h sys/time.h unistd.h])
150
151# Checks for typedefs, structures, and compiler characteristics.
152AC_C_CONST
153AC_C_INLINE
154AC_STRUCT_TM
155
156# Checks for library functions.
157AC_FUNC_MALLOC
158AC_FUNC_MEMCMP
159AC_TYPE_SIGNAL
160AC_FUNC_STAT
161AC_FUNC_STRFTIME
162AC_CHECK_FUNCS([bzero memset mkdir setlocale strchr])
163
164
165GETTEXT_PACKAGE=lxpanel
42fe8c5f 166#AM_GNU_GETTEXT([external])
a52c2257
HJYP
167AM_GNU_GETTEXT_VERSION(0.14.1)
168AC_SUBST(GETTEXT_PACKAGE)
169AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
170
7a8ad5ec 171ALL_LINGUAS="zh_TW ko hu sk pl"
a52c2257
HJYP
172AM_GLIB_GNU_GETTEXT
173
174AC_CONFIG_FILES([
66c88ea4
HJYP
175 Makefile
176 src/Makefile
7fe27201 177 src/plugins/Makefile
1141e22a 178 src/plugins/netstatus/Makefile
19348802 179 src/plugins/netstat/Makefile
31b80004 180 src/plugins/volume/Makefile
15556f61 181 src/plugins/volumealsa/Makefile
3cacc158 182 src/plugins/cpu/Makefile
ce728cd9 183 src/plugins/deskno/Makefile
8f11d5f8 184 src/plugins/batt/Makefile
66c88ea4
HJYP
185 po/Makefile.in
186 data/Makefile
187 data/default
a52c2257
HJYP
188])
189AC_OUTPUT
199c3ea8
JH
190
191echo
ce728cd9 192echo lxpanel ......................... : Version $VERSION
199c3ea8
JH
193echo
194echo Prefix........................... : $prefix
195if test x$plugins_loading = xyes; then
196echo Building dynamic plugins:
197 if test x"$plugin_netstatus" != x; then
198 AC_MSG_RESULT([ netstatus - Monitor networking status])
199 fi
19348802
FC
200 if test x"$plugin_netstat" != x; then
201 AC_MSG_RESULT([ netstat - Monitor networking status (Linux Only)])
202 fi
199c3ea8
JH
203 if test x"$plugin_volume" != x; then
204 AC_MSG_RESULT([ volume - Display and adjust volume of sound card])
205 fi
15556f61
FC
206 if test x"$plugin_volumealsa" != x; then
207 AC_MSG_RESULT([ volumealsa - Display and adjust volume of sound card for ALSA])
208 fi
199c3ea8
JH
209 if test x"$plugin_cpu" != x; then
210 AC_MSG_RESULT([ cpu - Display CPU loading])
211 fi
ce728cd9
JH
212 if test x"$plugin_deskno" != x; then
213 AC_MSG_RESULT([ deskno - Display desktop number])
214 fi
8f11d5f8
HJYP
215 if test x"$plugin_batt" != x; then
216 AC_MSG_RESULT([ batt - Monitor battery status])
217 fi
199c3ea8
JH
218else
219echo Dynamic loader for plugins....... : disabled.
220fi