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], [10]) m4_define([xfsm_version_micro], [1]) 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([1.8 dist-bzip2 tar-ustar no-dist-gzip]) AC_CONFIG_HEADERS([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() m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_CHECK_PROG(SED, sed, sed)]) dnl check for libtool LT_PREREQ([2.2.6]) LT_INIT([disable-static]) 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 math.h sys/types.h]) AC_CHECK_FUNCS([getaddrinfo gethostbyname gethostname getpwuid setsid \ sigaction strdup sync vfork]) dnl Check for required libraries AC_CHECK_LIBM AC_SUBST(LIBM) 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.9.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.24.0]) XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.30]) XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0]) dnl Check for polkit / systemd integration XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100], [systemd], [Systemd support (through polit)]) 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 Find a location for the session desktop file AC_MSG_CHECKING([what xsession-prefix to use]) AC_ARG_WITH([xsession-prefix], AC_HELP_STRING([--with-xsession-prefix=XSESSION_PREFIX], [What should be the prefix for the xsession .desktop file?]), [], [with_xsession_prefix="/usr"]) XSESSION_PREFIX=$with_xsession_prefix AC_SUBST([XSESSION_PREFIX]) AC_MSG_RESULT([$with_xsession_prefix]) 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 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 check for location Xfce glade files were installed to XFCE_GLADE_CATALOG_PATH="`pkg-config --variable glade_catalogdir libxfce4ui-1`" XFCE_GLADE_PIXMAP_PATH="`pkg-config --variable glade_pixmapdir libxfce4ui-1`" XFCE_GLADE_MODULE_PATH="`pkg-config --variable glade_moduledir libxfce4ui-1`" AC_SUBST(XFCE_GLADE_CATALOG_PATH) AC_SUBST(XFCE_GLADE_PIXMAP_PATH) AC_SUBST(XFCE_GLADE_MODULE_PATH) AC_OUTPUT([ Makefile doc/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/128x128/Makefile icons/scalable/Makefile libxfsm/Makefile libxfsm/xfce4-session-2.0.pc po/Makefile.in settings/Makefile scripts/Makefile scripts/xinitrc.in 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_legacy_sm" = x"yes"; then echo " * Legacy session management: yes" else echo " * Legacy session management: no" fi if test x"$GNOME_KEYRING_FOUND" = x"yes"; then echo " * Gnome Keyring support: yes" else echo " * Gnome Keyring support: no" fi echo