Install plugins to legal lib path /usr/lib/lxpanel, rather than data dir used previously.
[lxde/lxpanel.git] / configure.ac
CommitLineData
a52c2257 1AC_PREREQ(2.53)
e5d8208f 2AC_INIT(lxpanel, 0.2.1, http://lxpanel.sourceforge.net/)
a52c2257
HJYP
3AM_INIT_AUTOMAKE()
4AC_CONFIG_SRCDIR([src/bg.c])
5AC_CONFIG_HEADER([config.h])
6
7# Checks for programs.
8AC_PROG_CC
9AC_PROG_INSTALL
10AC_PROG_LN_S
1141e22a 11AC_PROG_LIBTOOL
a52c2257
HJYP
12AC_PROG_INTLTOOL(, [no-xml])
13
14# Checks for libraries.
15pkg_modules="gtk+-2.0 >= 2.6.0 \
16 gthread-2.0 \
17 libstartup-notification-1.0"
18PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
19AC_SUBST(PACKAGE_CFLAGS)
20AC_SUBST(PACKAGE_LIBS)
21
2d29cc96
JH
22AC_ARG_ENABLE([plugins-loading],
23 AS_HELP_STRING([--disable-plugins-loading],
24 [disable plugin loading (default: enable)]),
25 plugins_loading=$enableval, plugins_loading="yes")
26
31b80004
JH
27AM_CONDITIONAL(BUILD_PLUGIN_LOADER, test x$plugins_loading = xyes)
28
2d29cc96
JH
29if test "$plugins_loading" = "no"; then
30 AC_DEFINE(DISABLE_PLUGINS_LOADING, [1], [Disable plugin loading])
2d29cc96
JH
31fi
32
199c3ea8
JH
33dnl Here are plugin listing.
34plugin_netstatus=
35plugin_volume=
36plugin_cpu=
37
38AC_MSG_CHECKING([which plugins should be built dynamically])
39AC_ARG_WITH(plugins,
40[ --with-plugins=<list> compile dynamic plugins in <list> ]
41[ plugins may be comma separated ]
42[ 'all' builds all plugins (default), 'none' builds none ]
43[ Possible plugins are: ]
44[ netstatus, volume, cpu], plugins="$withval",[plugins="all"])
45
46if test x"$plugins" != xall -a x"$plugins" != xnone; then
47 if test x"$plugins_loading" = xno; then
48 AC_MSG_ERROR(
49 [--disable-plugins-loading and --with-plugins conflict each other.])
50 fi
51fi
52
53if test x"$plugins" = xall; then
54 plugin_netstatus=netstatus
55 plugin_volume=volume
56 plugin_cpu=cpu
57 AC_MSG_RESULT(all)
58else
59 if test "$plugins" != "none"; then
60 plugins=`echo $plugins | sed 's/,/ /g'`
61 for plugin in $plugins
62 do
63 case "$plugin" in
64 netstatus)
65 plugin_netstatus=netstatus
66 ;;
67 volume)
68 plugin_volume=volume
69 ;;
70 cpu)
71 plugin_cpu=cpu
72 ;;
73 *)
74 echo "Unknown plugin $plugin."
75 exit 1
76 ;;
77 esac
78 done
79 AC_MSG_RESULT($plugins)
80 fi
81fi
82
83PLUGINS_LIST="$plugin_netstatus $plugin_volume $plugin_cpu"
84AC_SUBST(PLUGINS_LIST)
85
1141e22a 86
a52c2257
HJYP
87# Checks for header files.
88AC_PATH_X
89AC_HEADER_STDC
90AC_HEADER_SYS_WAIT
91AC_CHECK_HEADERS([locale.h stdlib.h string.h sys/time.h unistd.h])
92
93# Checks for typedefs, structures, and compiler characteristics.
94AC_C_CONST
95AC_C_INLINE
96AC_STRUCT_TM
97
98# Checks for library functions.
99AC_FUNC_MALLOC
100AC_FUNC_MEMCMP
101AC_TYPE_SIGNAL
102AC_FUNC_STAT
103AC_FUNC_STRFTIME
104AC_CHECK_FUNCS([bzero memset mkdir setlocale strchr])
105
106
107GETTEXT_PACKAGE=lxpanel
108AM_GNU_GETTEXT([external])
109AM_GNU_GETTEXT_VERSION(0.14.1)
110AC_SUBST(GETTEXT_PACKAGE)
111AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
112
e5d8208f 113ALL_LINGUAS="zh_TW ko hu"
a52c2257
HJYP
114AM_GLIB_GNU_GETTEXT
115
116AC_CONFIG_FILES([
66c88ea4
HJYP
117 Makefile
118 src/Makefile
7fe27201 119 src/plugins/Makefile
1141e22a 120 src/plugins/netstatus/Makefile
31b80004 121 src/plugins/volume/Makefile
3cacc158 122 src/plugins/cpu/Makefile
66c88ea4
HJYP
123 po/Makefile.in
124 data/Makefile
125 data/default
a52c2257
HJYP
126])
127AC_OUTPUT
199c3ea8
JH
128
129echo
130echo lxpanel2 ........................ : Version $VERSION
131echo
132echo Prefix........................... : $prefix
133if test x$plugins_loading = xyes; then
134echo Building dynamic plugins:
135 if test x"$plugin_netstatus" != x; then
136 AC_MSG_RESULT([ netstatus - Monitor networking status])
137 fi
138 if test x"$plugin_volume" != x; then
139 AC_MSG_RESULT([ volume - Display and adjust volume of sound card])
140 fi
141 if test x"$plugin_cpu" != x; then
142 AC_MSG_RESULT([ cpu - Display CPU loading])
143 fi
144else
145echo Dynamic loader for plugins....... : disabled.
146fi