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