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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
m4_define([intltool_minimum_version], [0.31])
m4_define([xfpm_version_major], [0])
m4_define([xfpm_version_minor], [8])
m4_define([xfpm_version_micro], [0])
m4_define([xfpm_version_build], [r@REVISION@])
m4_define([xfpm_version_tag],[svn])
m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [svn], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])])
AC_INIT([xfce4-power-manager], [xfpm_version], [http://bugzilla.xfce.org/])
AC_PREREQ(2.50)
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
# ===================================================== #
# Check for UNIX variants #
# ===================================================== #
AC_AIX
AC_ISC_POSIX
AC_MINIX
# ===================================================== #
# Basic compiler settings #
# ===================================================== #
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LD
AC_PROG_INSTALL
AC_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
# ===================================================== #
# Initialize libtool #
# ===================================================== #
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
# ==================================================== #
# Check for headers needed for standard interfaces #
# ==================================================== #
AC_HEADER_STDC
AC_CHECK_HEADERS([errno.h signal.h stddef.h \
string.h sys/stat.h sys/types.h sys/wait.h time.h \
unistd.h])
# ===================================================== #
# Check for i18n support #
# ===================================================== #
XDT_I18N([@LINGUAS@])
#==================================================== #
# Check for required packages #
#=====================================================#
m4_define([gtk_minimum_version], [2.10.0])
m4_define([glib_minimum_version], [2.16.0])
m4_define([dbus_minimum_version], [0.60])
m4_define([dbus_glib_minimum_version], [0.70])
m4_define([xfconf_minimum_version], [4.6.0])
m4_define([libxfcegui4_minimum_version],[4.6.0])
m4_define([libxfce4util_minimum_version],[4.6.0])
m4_define([libxfce4panel_minimum_version],[4.6.0])
m4_define([glade_minimum_version], [2.0.0])
m4_define([libnotify_minimum_version], [0.4.1])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [gtk_minimum_version])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([DBUS], [dbus-1], [dbus_minimum_version])
XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [dbus_glib_minimum_version])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0],[xfconf_minimum_version])
XDT_CHECK_PACKAGE([LIBXFCE4GUI], [libxfcegui4-1.0],[libxfcegui4_minimum_version])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_version])
XDT_CHECK_PACKAGE([LIBGLADE], [libglade-2.0],[glade_minimum_version])
XDT_CHECK_PACKAGE([LIBNOTIFY],[libnotify], [libnotify_minimum_version])
#=======================================================#
# Check for DPMS support #
#=======================================================#
DPMS_LIBS=
AC_ARG_ENABLE([dpms],
AC_HELP_STRING([--enable-dpms], [use dpms extension])
AC_HELP_STRING([--disable-dpms], [don't use dpms extension]),
[], [enable_dpms=yes])
have_dpms="no"
if test x"$enable_dpms" = x"yes"; then
AC_CHECK_LIB([Xext], [DPMSQueryExtension],
[ have_dpms="yes"
DPMS_LIBS=" -lXext -lX11"
AC_DEFINE([HAVE_DPMS], [1], [Define to enable dpms])
],[])
fi
AC_SUBST([DPMS_LIBS])
#=======================================================#
# Panel plugins ? #
#=======================================================#
AC_ARG_ENABLE([panel_plugins],
[AC_HELP_STRING([--disable-panel-plugins],
[Do not build panel plugins (default=enabled)])],
[ac_cv_enable_panel_plugins=$enableval],
[ac_cv_enable_panel_plugins=yes])
if test "x$ac_cv_enable_panel_plugins" = "xno"; then
build_panel_plugins="no"
else
build_panel_plugins="yes"
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0],
[libxfce4panel_minimum_version])
fi
AM_CONDITIONAL([BUILD_PANEL_PLUGINS], [test "x$build_panel_plugins" = "xyes"])
#=======================================================#
# Check for debugging support #
#=======================================================#
XDT_FEATURE_DEBUG
AC_OUTPUT([
Makefile
libxfpm/Makefile
src/Makefile
settings/Makefile
panel-plugins/Makefile
panel-plugins/brightness/Makefile
panel-plugins/inhibit/Makefile
data/Makefile
data/icons/Makefile
data/icons/scalable/Makefile
data/icons/scalable/apps/Makefile
data/icons/scalable/status/Makefile
data/icons/scalable/actions/Makefile
doc/Makefile
doc/C/Makefile
doc/C/images/Makefile
po/Makefile.in
])
echo "
--------------------------------------------------
Xfce Power Manager $VERSION
======================================
prefix: $prefix
xdg autostart: $sysconfdir/xdg/autostart
DPMS support: $have_dpms
Build panel plugins: $build_panel_plugins
Debug support: $enable_debug
--------------------------------------------------
Configuration finished, type make to compile"
|