install background.png correctly on make install.
[lxde/lxpanel.git] / configure.ac
CommitLineData
a52c2257 1AC_PREREQ(2.53)
0f732403 2AC_INIT(lxpanel, 0.2.4, http://lxde.sourceforge.net/)
a52c2257
HJYP
3AM_INIT_AUTOMAKE()
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
2d29cc96
JH
35AC_ARG_ENABLE([plugins-loading],
36 AS_HELP_STRING([--disable-plugins-loading],
37 [disable plugin loading (default: enable)]),
38 plugins_loading=$enableval, plugins_loading="yes")
39
31b80004
JH
40AM_CONDITIONAL(BUILD_PLUGIN_LOADER, test x$plugins_loading = xyes)
41
535ac098 42if test x"$plugins_loading" = "xno"; then
2d29cc96 43 AC_DEFINE(DISABLE_PLUGINS_LOADING, [1], [Disable plugin loading])
2d29cc96
JH
44fi
45
199c3ea8
JH
46dnl Here are plugin listing.
47plugin_netstatus=
48plugin_volume=
15556f61 49plugin_volumealsa=
199c3ea8 50plugin_cpu=
ce728cd9 51plugin_deskno=
8f11d5f8 52plugin_batt=
199c3ea8
JH
53
54AC_MSG_CHECKING([which plugins should be built dynamically])
55AC_ARG_WITH(plugins,
56[ --with-plugins=<list> compile dynamic plugins in <list> ]
57[ plugins may be comma separated ]
58[ 'all' builds all plugins (default), 'none' builds none ]
59[ Possible plugins are: ]
15556f61 60[ netstatus, volume, volumealsa, cpu, deskno, batt], plugins="$withval",[plugins="all"])
199c3ea8
JH
61
62if test x"$plugins" != xall -a x"$plugins" != xnone; then
63 if test x"$plugins_loading" = xno; then
64 AC_MSG_ERROR(
65 [--disable-plugins-loading and --with-plugins conflict each other.])
66 fi
67fi
68
69if test x"$plugins" = xall; then
70 plugin_netstatus=netstatus
71 plugin_volume=volume
15556f61 72 plugin_volumealsa=volumealsa
199c3ea8 73 plugin_cpu=cpu
ce728cd9 74 plugin_deskno=deskno
8f11d5f8 75 plugin_batt=batt
199c3ea8
JH
76 AC_MSG_RESULT(all)
77else
78 if test "$plugins" != "none"; then
79 plugins=`echo $plugins | sed 's/,/ /g'`
80 for plugin in $plugins
81 do
82 case "$plugin" in
83 netstatus)
84 plugin_netstatus=netstatus
85 ;;
86 volume)
87 plugin_volume=volume
88 ;;
15556f61
FC
89 volumealsa)
90 plugin_volumealsa=volumealsa
91 ;;
199c3ea8
JH
92 cpu)
93 plugin_cpu=cpu
94 ;;
ce728cd9
JH
95 deskno)
96 plugin_deskno=deskno
97 ;;
8f11d5f8
HJYP
98 batt)
99 plugin_deskno=batt
100 ;;
199c3ea8
JH
101 *)
102 echo "Unknown plugin $plugin."
103 exit 1
104 ;;
105 esac
106 done
107 AC_MSG_RESULT($plugins)
108 fi
109fi
110
15556f61 111PLUGINS_LIST="$plugin_netstatus $plugin_volume $plugin_volumealsa $plugin_cpu $plugin_deskno $plugin_batt"
199c3ea8
JH
112AC_SUBST(PLUGINS_LIST)
113
1141e22a 114
a52c2257
HJYP
115# Checks for header files.
116AC_PATH_X
117AC_HEADER_STDC
118AC_HEADER_SYS_WAIT
119AC_CHECK_HEADERS([locale.h stdlib.h string.h sys/time.h unistd.h])
120
121# Checks for typedefs, structures, and compiler characteristics.
122AC_C_CONST
123AC_C_INLINE
124AC_STRUCT_TM
125
126# Checks for library functions.
127AC_FUNC_MALLOC
128AC_FUNC_MEMCMP
129AC_TYPE_SIGNAL
130AC_FUNC_STAT
131AC_FUNC_STRFTIME
132AC_CHECK_FUNCS([bzero memset mkdir setlocale strchr])
133
134
135GETTEXT_PACKAGE=lxpanel
136AM_GNU_GETTEXT([external])
137AM_GNU_GETTEXT_VERSION(0.14.1)
138AC_SUBST(GETTEXT_PACKAGE)
139AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
140
725b5bb2 141ALL_LINGUAS="zh_TW ko hu sk"
a52c2257
HJYP
142AM_GLIB_GNU_GETTEXT
143
144AC_CONFIG_FILES([
66c88ea4
HJYP
145 Makefile
146 src/Makefile
7fe27201 147 src/plugins/Makefile
1141e22a 148 src/plugins/netstatus/Makefile
31b80004 149 src/plugins/volume/Makefile
15556f61 150 src/plugins/volumealsa/Makefile
3cacc158 151 src/plugins/cpu/Makefile
ce728cd9 152 src/plugins/deskno/Makefile
8f11d5f8 153 src/plugins/batt/Makefile
66c88ea4
HJYP
154 po/Makefile.in
155 data/Makefile
156 data/default
a52c2257
HJYP
157])
158AC_OUTPUT
199c3ea8
JH
159
160echo
ce728cd9 161echo lxpanel ......................... : Version $VERSION
199c3ea8
JH
162echo
163echo Prefix........................... : $prefix
164if test x$plugins_loading = xyes; then
165echo Building dynamic plugins:
166 if test x"$plugin_netstatus" != x; then
167 AC_MSG_RESULT([ netstatus - Monitor networking status])
168 fi
169 if test x"$plugin_volume" != x; then
170 AC_MSG_RESULT([ volume - Display and adjust volume of sound card])
171 fi
15556f61
FC
172 if test x"$plugin_volumealsa" != x; then
173 AC_MSG_RESULT([ volumealsa - Display and adjust volume of sound card for ALSA])
174 fi
199c3ea8
JH
175 if test x"$plugin_cpu" != x; then
176 AC_MSG_RESULT([ cpu - Display CPU loading])
177 fi
ce728cd9
JH
178 if test x"$plugin_deskno" != x; then
179 AC_MSG_RESULT([ deskno - Display desktop number])
180 fi
8f11d5f8
HJYP
181 if test x"$plugin_batt" != x; then
182 AC_MSG_RESULT([ batt - Monitor battery status])
183 fi
199c3ea8
JH
184else
185echo Dynamic loader for plugins....... : disabled.
186fi