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