m4_define([intltool_minimum_version], [0.31]) m4_define([xfpm_version_major], [0]) m4_define([xfpm_version_minor], [9]) m4_define([xfpm_version_micro], [90]) m4_define([xfpm_version_build], [@REVISION@]) m4_define([xfpm_version_tag],[git]) m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [git], [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() m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_USE_SYSTEM_EXTENSIONS() # ===================================================== # # 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.12.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([libxfce4ui_minimum_version],[4.6.0]) m4_define([libxfce4util_minimum_version],[4.6.0]) m4_define([libxfce4panel_minimum_version],[4.6.0]) m4_define([libnotify_minimum_version], [0.4.1]) m4_define([xrandr_minimum_version], [1.2.0]) m4_define([polkit_minimum_version], [0.91]) 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([GMODULE], [gmodule-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([LIBXFCE4UI], [libxfce4ui-1],[libxfce4ui_minimum_version]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_version]) XDT_CHECK_PACKAGE([LIBNOTIFY],[libnotify], [libnotify_minimum_version]) XDT_CHECK_PACKAGE([XRANDR],[xrandr], [xrandr_minimum_version]) POLKIT="no" XDT_CHECK_OPTIONAL_PACKAGE([POLKIT], [polkit-gobject-1], [polkit_minimum_version], [polkit], [Polkit support]) #=======================================================# # Use HAL? # #=======================================================# AC_ARG_ENABLE([hal], [AC_HELP_STRING([--disable-hal], [Do not enable HAL (default=enabled)])], [ac_cv_enable_hal=$enableval], [ac_cv_enable_hal=yes]) if test "x$ac_cv_enable_hal" = "xno"; then enable_hal="no" else enable_hal="yes" AC_DEFINE(WITH_HAL, 1 , [HAL support]) fi AM_CONDITIONAL([ENABLE_HAL], [test "x$enable_hal" = "xyes"]) #=======================================================# # 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]) #=======================================================# # Check for XF86_XK_Suspend && Hibernate # #=======================================================# AC_CHECK_DECL(XF86XK_Suspend,have_XF86XK_Suspend=1,have_XF86XK_Suspend=0,[#include ]) if test "x${ac_cv_have_decl_XF86XK_Suspend}" != "xno"; then AC_DEFINE(HAVE_XF86XK_SUSPEND, 1, [Define if XF86XK_Suspend is available]) fi AC_CHECK_DECL(XF86XK_Hibernate,have_XF86XK_Hibernate=1,have_XF86XK_Hibernate=0,[#include ]) if test "x${ac_cv_have_decl_XF86XK_Hibernate}" != "xno"; then AC_DEFINE(HAVE_XF86XK_HIBERNATE, 1, [Define if XF86XK_Hibernate is available]) fi #=======================================================# # Network Manager support # #=======================================================# AC_ARG_ENABLE([network-manager], AC_HELP_STRING([--disable-network-manager], [Disable network manager support]), [ac_network_manager=$enableval], [ac_network_manager=yes]) AC_MSG_CHECKING([whether to build with network manager support.]) if test "x$ac_network_manager = xyes"; then AC_DEFINE(WITH_NETWORK_MANAGER, 1 , [Network Manager support]) fi AC_MSG_RESULT([$ac_network_manager]) #=======================================================# # 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"]) #=======================================================# # Generate html doc # #=======================================================# AC_ARG_ENABLE([xsltproc], [AC_HELP_STRING([--enable-xsltproc], [Use xsltproc to generate HTML documentation @<:@default=no@:>@])], , [enable_xsltproc=no]) if test "x$enable_xsltproc" = "xyes"; then AC_PATH_PROG([XSLTPROC], [xsltproc], [no]) if test "x$XSLTPROC" = "xno"; then AC_MSG_FAILURE([*** xsltproc was requested, but not found.]) fi fi AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$enable_xsltproc" = "xyes"]) #=======================================================# # Support for doc translations # #=======================================================# AC_ARG_ENABLE([xml2po], [AC_HELP_STRING([--enable-xml2po], [Use xml2po to translate documentation @<:@default=no@:>@])], [], [enable_xml2po=no]) if test "x$enable_xml2po" = "xyes"; then AC_PATH_PROG([XML2PO], [xml2po], [no]) if test "x$XML2PO" = "xno"; then AC_MSG_FAILURE([*** xml2po was requested, but not found.]) fi fi AM_CONDITIONAL([ENABLE_XML2PO], [test "x$enable_xml2po" = "xyes"]) #=======================================================# # Check for debugging support # #=======================================================# XDT_FEATURE_DEBUG AC_OUTPUT([ Makefile libdbus/Makefile libhal/Makefile common/Makefile src/Makefile settings/Makefile panel-plugins/Makefile panel-plugins/brightness/Makefile data/Makefile data/icons/Makefile data/icons/scalable/Makefile data/icons/scalable/status/Makefile data/icons/scalable/actions/Makefile data/interfaces/Makefile doc/Makefile doc/C/Makefile doc/C/xfce4-power-manager.xml doc/C/images/Makefile po/Makefile.in ]) echo " -------------------------------------------------- Xfce Power Manager $VERSION ====================================== prefix: ${prefix} xdg autostart: ${sysconfdir/xdg/autostart} HAL: ${enable_hal} POLKIT: ${POLKIT_FOUND} DPMS: ${have_dpms} Network manager: ${ac_network_manager} Build panel plugins: ${build_panel_plugins} Debug: ${enable_debug} -------------------------------------------------- Configuration finished, type make to compile"