dnl dnl Copyright (c) 2003-2009 dnl The Xfce development team. All rights reserved. dnl dnl Written for Xfce by Benedikt Meurer . dnl dnl Version information m4_define([xfsm_version_major], [4]) m4_define([xfsm_version_minor], [8]) m4_define([xfsm_version_micro], [0]) m4_define([xfsm_version_nano], []) dnl leave this empty to have no nano version m4_define([xfsm_version_build], [@REVISION@]) m4_define([xfsm_version_tag], [git]) m4_define([xfsm_version], [xfsm_version_major().xfsm_version_minor().xfsm_version_micro()ifelse(xfsm_version_nano(), [], [], [.xfsm_version_nano()])ifelse(xfsm_version_tag(), [git], [xfsm_version_tag()-xfsm_version_build()], [xfsm_version_tag()])]) m4_define([xfsm_debug_default], [ifelse(xfsm_version_tag(), [git], [full], [minimum])]) dnl Initialize autoconf AC_COPYRIGHT([Copyright (c) 2003-2011 The Xfce development team. All rights reserved. Written for Xfce by Benedikt Meurer .]) AC_INIT([xfce4-session], [xfsm_version], [http://bugs.xfce.org/]) AC_PREREQ([2.59c]) AC_REVISION([$Id$]) AC_PROG_MAKE_SET() dnl Initialize automake AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()]) AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE() m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl Set helper path prefix AC_ARG_WITH([helper-path-prefix], [AC_HELP_STRING([--with-helper-path-prefix=PATH], [Path prefix under which helper executables will be installed (default: $libdir)])], [HELPER_PATH_PREFIX="$withval"], [HELPER_PATH_PREFIX="$libdir"]) AC_SUBST([HELPER_PATH_PREFIX]) dnl check for UNIX variants AC_USE_SYSTEM_EXTENSIONS AM_CONDITIONAL([HAVE_OS_CYGWIN], [test x"`uname | grep \"CYGWIN\"`" != x""]) if test x"`uname | grep \"CYGWIN\"`" != x""; then AC_DEFINE([HAVE_OS_CYGWIN], [1], [Compiling under cygwin]) fi dnl check for basic programs AC_PROG_CC() AM_PROG_CC_C_O() AC_PROG_INSTALL() AC_PROG_INTLTOOL() AC_PROG_LIBTOOL() dnl check for standard header files AC_HEADER_STDC AC_CHECK_HEADERS([asm/unistd.h errno.h fcntl.h limits.h \ netdb.h pwd.h signal.h stdarg.h sys/param.h sys/resource.h \ sys/socket.h sys/time.h sys/wait.h sys/utsname.h time.h \ unistd.h sys/param.h sys/user.h sys/sysctl.h]) AC_CHECK_FUNCS([getaddrinfo gethostbyname gethostname getpwuid setsid \ sigaction strdup sync vfork]) dnl Check for X11 installed XDT_CHECK_LIBX11_REQUIRE() dnl Check for session management support XDT_CHECK_LIBSM() dnl Check for _IceTransNoListen ac_LIBS="$LIBS" LIBS="$LIBS $LIBSM_LDFLAGS $LIBSM_LIBS" AC_CHECK_FUNCS([_IceTransNoListen]) LIBS="$ac_LIBS" dnl Check for i18n support XDT_I18N([@LINGUAS@]) dnl Check for required packages XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.22]) XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.73]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0]) dnl we provide a panel plugin now XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0], [panel-plugin], [Panel logout menu button], [yes]) dnl Check for gnome support XDT_CHECK_OPTIONAL_PACKAGE([GNOME_KEYRING], [gnome-keyring-1], [2.22], [libgnome-keyring], [Extra gnome-keyring compatibility support], [no]) dnl Check for debugging support XDT_FEATURE_DEBUG([xfsm_debug_default]) dnl Check for linker optimizations XDT_FEATURE_LINKER_OPTS() dnl Check for iceauth AC_PATH_PROG([ICEAUTH], [iceauth]) if test x"$ICEAUTH" != x""; then AC_DEFINE_UNQUOTED([ICEAUTH_CMD], ["$ICEAUTH"], [path to iceauth]) else AC_MSG_ERROR([iceauth missing, please check your X11 installation]) fi dnl Check for rm AC_PATH_PROG([RM], [rm]) if test x"$RM" != x""; then AC_DEFINE_UNQUOTED([RM_CMD], ["$RM"], [path to rm]) fi dnl Check for legacy session management AC_ARG_ENABLE([legacy-sm], AC_HELP_STRING([--enable-legacy-sm], [Enable X11R5 session management]) AC_HELP_STRING([--disable-legacy-sm], [Disable X11R5 session management]), [], [enable_legacy_sm=yes]) AC_MSG_CHECKING([whether to enable X11R5 session management]) if test x"$enable_legacy_sm" != x"yes"; then AC_MSG_RESULT([no]) else AC_DEFINE([LEGACY_SESSION_MANAGEMENT], [1], [Define for X11R5 sm compat]) AC_MSG_RESULT([yes]) fi dnl Check whether to create session screenshots AC_ARG_ENABLE([session-screenshots], AC_HELP_STRING([--enable-session-screenshots], [Create screenshots of sessions on logout]), [], [enable_session_screenshots=no]) AC_MSG_CHECKING([whether to create screenshots of sessions on logout]) if test x"$enable_session_screenshots" != x"yes"; then AC_MSG_RESULT([no]) else AC_DEFINE([SESSION_SCREENSHOTS], [1], [Define for session screenshots]) AC_MSG_RESULT([yes]) fi dnl dnl D-Bus RUNTIME Dependencies dnl dnl HAL? AC_ARG_ENABLE([hal], [AC_HELP_STRING([--disable-hal], [Do not enable HAL (default=enabled)])], [], [enable_hal=yes]) AC_MSG_CHECKING([whether to build with HAL support]) if test "x$enable_hal" != "xyes"; then AC_MSG_RESULT([no]) else AC_DEFINE(ENABLE_HAL, 1 , [HAL support]) AC_MSG_RESULT([yes]) fi dnl upower? AC_ARG_ENABLE([upower], [AC_HELP_STRING([--disable-upower], [Do not enable Upower support (formely devicekit-power) (default=enabled)])], [], [enable_upower=yes]) AC_MSG_CHECKING([whether to build with UPower (formely devicekit-power) support]) if test "x$enable_upower" != "xyes"; then AC_MSG_RESULT([no]) else AC_DEFINE(ENABLE_UPOWER, 1 , [UPower support]) AC_MSG_RESULT([yes]) fi dnl consolekit? AC_ARG_ENABLE([consolekit], [AC_HELP_STRING([--disable-consolekit], [Do not enable ConsoleKit (default=enabled)])], [], [enable_consolekit=yes]) AC_MSG_CHECKING([whether to build with ConsoleKit support]) if test "x$enable_consolekit" != "xyes"; then AC_MSG_RESULT([no]) else AC_DEFINE(ENABLE_CONSOLE_KIT, 1 , [ConsoleKit support]) AC_MSG_RESULT([yes]) fi dnl Polkit ? AC_ARG_ENABLE([polkit], [AC_HELP_STRING([--disable-polkit], [Do not enable PolicyKit support (default=enabled)])], [], [enable_polkit=yes]) AC_MSG_CHECKING([whether to build with polkit support]) if test "x$enable_polkit" != "xyes"; then AC_MSG_RESULT([no]) else AC_DEFINE(ENABLE_POLKIT, 1 , [PolicyKit support]) AC_MSG_RESULT([yes]) fi dnl check for linux/ioprio.h, and also check that the header actually dnl works, as some kernels have bad headers. using AC_CHECK_HEADERS() dnl prints a scary warning with a request to report a bug if it fails, dnl but we do not want that. AC_MSG_CHECKING([whether linux/ioprio.h exists and actually works]) AC_COMPILE_IFELSE([ AC_INCLUDES_DEFAULT #include ], [linux_ioprio_works=yes], [linux_ioprio_works=no]) AC_MSG_RESULT([$linux_ioprio_works]) if test "x$linux_ioprio_works" = "xyes"; then AC_DEFINE([HAVE_WORKING_LINUX_IOPRIO_H], [1], [Defined if linux/ioprio.h not only exists, but works properly]) fi dnl *************************************************** dnl *** Check if we need to build the documentation *** dnl *************************************************** AC_ARG_ENABLE([gen-doc], [AC_HELP_STRING([--enable-gen-doc], [Generate HTML documentation (requires xsltproc, xml2po and xmllint) [default=no]])],, [enable_gen_doc=no]) if test x"$enable_gen_doc" = x"yes"; then AC_PATH_PROG([XSLTPROC], [xsltproc], [no]) if test x"$XSLTPROC" = x"no"; then enable_gen_doc=no fi AC_PATH_PROG([XML2PO], [xml2po], [no]) if test x"$XML2PO" = x"no"; then enable_gen_doc=no fi AC_PATH_PROG([XMLLINT], [xmllint], [no]) if test x"$XML2PO" = x"no"; then enable_gen_doc=no fi if test x"$enable_gen_doc" = x"no"; then AC_MSG_ERROR([Compiling with --enable-gen-doc but one of xml2po, xsltproc or xmllint not found.]) fi fi AM_CONDITIONAL([GENERATE_DOCUMENTATION], [test x"$enable_gen_doc" = x"yes"]) AC_OUTPUT([ Makefile xfce4-session.spec doc/Makefile doc/manual/Makefile doc/manual/images/Makefile doc/manual/images/el/Makefile doc/manual/po/Makefile engines/Makefile engines/balou/Makefile engines/balou/scripts/Makefile engines/balou/themes/Makefile engines/balou/themes/Default/Makefile engines/mice/Makefile engines/simple/Makefile icons/Makefile icons/48x48/Makefile icons/64x64/Makefile icons/72x72/Makefile icons/128x128/Makefile icons/scalable/Makefile libxfsm/Makefile libxfsm/xfce4-session-2.0.pc panel-plugin/Makefile po/Makefile.in settings/Makefile xfce4-session/Makefile xfce4-session-logout/Makefile xfsm-shutdown-helper/Makefile ]) dnl *************************** dnl *** Print configuration *** dnl *************************** echo echo "Build Configuration:" echo echo " * Debugging support: $enable_debug" if test x"$enable_gen_doc" = x"yes"; then echo " * Documentation: yes (generate)" elif test -d "${srcdir}/doc/manual/html"; then echo " * Documentation: yes (in tarball)" else echo " * Documentation: no" fi if test x"$enable_upower" = x"yes"; then echo " * UPower support: yes" else echo " * UPower support: no" fi if test x"$enable_consolekit" = x"yes"; then echo " * Consolekit support: yes" else echo " * Consolekit support: no" fi if test x"$enable_polkit" = x"yes"; then echo " * Policykit support: yes" else echo " * Policykit support: no" fi if test x"$enable_legacy_sm" = x"yes"; then echo " * Legacy session management: yes" else echo " * Legacy session management: no" fi if test x"$LIBXFCE4PANEL_FOUND" = x"yes"; then echo " * Panel plugin: yes" else echo " * Panel plugin: no" fi echo if test x"$GNOME_KEYRING_FOUND" = x"yes"; then echo " * Gnome Keyring support: yes" else echo " * Gnome Keyring support: no" fi echo