forked from acw/xmonad-log-applet
-
Notifications
You must be signed in to change notification settings - Fork 17
/
configure.ac
67 lines (58 loc) · 2.5 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
AC_INIT([Xmonad Log Applet], [2.1.0])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_SED
AC_PROG_INSTALL
AC_HEADER_STDC
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.20.0)
PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.80)
SESSION_BUS_SERVICES_DIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
AC_SUBST([SESSION_BUS_SERVICES_DIR])
AC_ARG_WITH(
[panel],
[AS_HELP_STRING([--with-panel], [target gnome2, gnome3, mate or xfce4 (default) panel])],
[panel=$withval],
[panel=xfce4]
)
AS_IF(
[test "x$panel" = xgnome2],
[PKG_CHECK_MODULES(LIBPANEL, libpanelapplet-3.0 >= 2.32.0)]
LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-3.0`/share/gnome-panel/applets
PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-3.0`/libexec
[AC_DEFINE(PANEL_GNOME, 1, [panel type])]
[AC_DEFINE(PANEL_GNOME2, 1, [panel type])]
,
[test "x$panel" = xgnome3],
[PKG_CHECK_MODULES(LIBPANEL, libpanelapplet-4.0 >= 3.0.0)]
LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanelapplet-4.0`
PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-4.0`/libexec
[AC_DEFINE(PANEL_GNOME, 1, [panel type])]
[AC_DEFINE(PANEL_GNOME3, 1, [panel type])]
,
[test "x$panel" = xmate],
[PKG_CHECK_MODULES(LIBPANEL, libmatepanelapplet-3.0 >= 1.4.0)]
LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libmatepanelapplet-3.0`/share/mate-panel/applets
PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libmatepanelapplet-3.0`/libexec
[AC_DEFINE(PANEL_MATE, 1, [panel type])]
,
[test "x$panel" = xxfce4],
[PKG_CHECK_MODULES(LIBPANEL, libxfce4panel-1.0 >= 4.6.0)]
LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libxfce4panel-1.0`/share/xfce4/panel-plugins
PLUGIN_DIR=`$PKG_CONFIG --variable=libdir libxfce4panel-1.0`/xfce4/panel/plugins
[AC_DEFINE(PANEL_XFCE4, 1, [panel type])]
,
[AC_MSG_ERROR([Unknown panel type, use gnome2, gnome3, mate or xfce4])]
)
AC_SUBST([LIBPANEL_APPLET_DIR])
AC_SUBST([PLUGIN_DIR])
AM_CONDITIONAL([PANEL_GNOME], [test "x$panel" = xgnome2 -o "x$panel" = xgnome3])
AM_CONDITIONAL([PANEL_GNOME2], [test "x$panel" = xgnome2])
AM_CONDITIONAL([PANEL_GNOME3], [test "x$panel" = xgnome3])
AM_CONDITIONAL([PANEL_MATE], [test "x$panel" = xmate])
AM_CONDITIONAL([PANEL_XFCE4], [test "x$panel" = xxfce4])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT