summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac111
1 files changed, 46 insertions, 65 deletions
diff --git a/configure.ac b/configure.ac
index 0efc489..d099f92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,24 +1,25 @@
-AC_PREREQ(2.59c)
+AC_PREREQ([2.68])
AC_INIT([ConsoleKit],
- [0.4.5],
+ [0.4.6],
[https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit],
[ConsoleKit])
AC_CONFIG_SRCDIR([src/ck-manager.c])
-AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
+AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
# for O_NOFOLLOW support
-AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
-AC_ISC_POSIX
+AC_SEARCH_LIBS([strerror],[cposix])
AC_PROG_CC
-AC_STDC_HEADERS
+AM_PROG_CC_C_O
+AC_HEADER_STDC
AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
+LT_INIT
AC_HEADER_STDC
@@ -88,50 +89,15 @@ case "$host" in
;;
esac
-# Find out the version of DBUS we're using
-
-dbus_version=`pkg-config --modversion dbus-1`
-DBUS_VERSION_MAJOR=`echo $dbus_version | awk -F. '{print $1}'`
-DBUS_VERSION_MINOR=`echo $dbus_version | awk -F. '{print $2}'`
-DBUS_VERSION_MICRO=`echo $dbus_version | awk -F. '{print $3}'`
-if test "z$DBUS_VERSION_MAJOR" = "z"; then
- DBUS_VERSION_MAJOR="0"
-fi
-if test "z$DBUS_VERSION_MINOR" = "z"; then
- DBUS_VERSION_MINOR="0"
-fi
-if test "z$DBUS_VERSION_MICRO" = "z"; then
- DBUS_VERSION_MICRO="0"
-fi
-
-if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then echo "Error: Couldn't determine the version of your DBUS package."
- echo " This is probably an error in this script, please report it"
- echo " along with the following information:"
- echo " Base DBUS version ='$dbus_version'"
- echo " DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
- echo " DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
- echo " DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
- exit 1
-else
-
- echo "Your dbus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
-
- AC_SUBST(DBUS_CFLAGS)
-fi
dnl ---------------------------------------------------------------------------
dnl - Are we specifying a different dbus root ?
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(dbus-sys,
- [AC_HELP_STRING([--with-dbus-sys=<dir>],
- [where D-BUS system.d directory is])])
+ [AS_HELP_STRING([--with-dbus-sys=<dir>],[where D-BUS system.d directory is])])
AC_ARG_WITH(dbus-services,
- [AC_HELP_STRING([--with-dbus-services=<dir>],
- [where D-BUS services directory is])])
+ [AS_HELP_STRING([--with-dbus-services=<dir>],[where D-BUS services directory is])])
if ! test -z "$with_dbus_sys" ; then
DBUS_SYS_DIR="$with_dbus_sys"
else
@@ -158,8 +124,7 @@ dnl - PID file
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(pid-file,
- [AC_HELP_STRING([--with-pid-file=<file>],
- [pid file location])])
+ [AS_HELP_STRING([--with-pid-file=<file>],[pid file location])])
if ! test -z "$with_pid_file"; then
CONSOLE_KIT_PID_FILE=$with_pid_file
@@ -190,6 +155,9 @@ case "$host" in
*-*-solaris*)
CK_BACKEND="solaris"
;;
+ *-*-gnu*)
+ CK_BACKEND="gnu"
+ ;;
*)
AC_MSG_ERROR([No sysdeps back-end implemented for host $host])
;;
@@ -200,6 +168,7 @@ AC_SUBST(KVM_LIBS)
AM_CONDITIONAL(CK_COMPILE_LINUX, test x$CK_BACKEND = xlinux, [Compiling for Linux])
AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for FreeBSD])
AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris])
+AM_CONDITIONAL(CK_COMPILE_GNU, test x$CK_BACKEND = xgnu, [Compiling for GNU])
AC_SUBST(CK_BACKEND)
dnl ---------------------------------------------------------------------------
@@ -221,8 +190,7 @@ AC_CHECK_LIB(pam, pam_syslog, [AC_DEFINE(HAVE_PAM_SYSLOG, [], [Define to 1 if yo
# Check if we should build the PAM module
msg_pam_module=no
AC_ARG_ENABLE(pam-module,
- [AC_HELP_STRING([--enable-pam-module],
- [build PAM module])],
+ [AS_HELP_STRING([--enable-pam-module],[build PAM module])],
, enable_pam_module=no)
if test "x$enable_pam_module" = "xyes"; then
if test "x$have_pam" = "xno"; then
@@ -233,13 +201,32 @@ if test "x$enable_pam_module" = "xyes"; then
fi
AM_CONDITIONAL(ENABLE_PAM_MODULE, test "x$enable_pam_module" = "xyes")
+dnl ------------------------------------------------------------------------------
+dnl udev-acl - apply ACLs for users with local forground sessions
+dnl ------------------------------------------------------------------------------
+AC_ARG_ENABLE([udev-acl],
+ AS_HELP_STRING([--enable-udev-acl], [enable local user acl permissions support @<:@default=disabled@:>@]),
+ [], [enable_udev_acl=no])
+AS_IF([test "x$enable_udev_acl" = "xyes"], [
+
+ PKG_CHECK_MODULES([UDEV_ACL], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 libudev])
+ AC_CHECK_LIB([acl], [acl_init], [UDEV_ACL_LIBS="$UDEV_ACL_LIBS -lacl"], AC_MSG_ERROR([libacl not found]))
+ AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found]))
+ UDEVDIR=`$PKG_CONFIG --variable udevdir udev`
+ if test -z "$UDEVDIR" ; then
+ UDEVDIR="/lib/udev"
+ fi
+ AC_SUBST(UDEVDIR)
+])
+AM_CONDITIONAL([ENABLE_UDEV_ACL], [test "x$enable_udev_acl" = "xyes"])
+
+
dnl ---------------------------------------------------------------------------
dnl - Install directory for PAM security module
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(pam-module-dir,
- [AC_HELP_STRING([--with-pam-module-dir=<dir>],
- [directory to install PAM security module])])
+ [AS_HELP_STRING([--with-pam-module-dir=<dir>],[directory to install PAM security module])])
if ! test -z "$with_pam_module_dir"; then
PAM_MODULE_DIR="$with_pam_module_dir"
else
@@ -252,8 +239,7 @@ dnl - DocBook Documentation
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(docbook-docs,
- [AC_HELP_STRING([--enable-docbook-docs],
- [build documentation (requires xmlto)])],
+ [AS_HELP_STRING([--enable-docbook-docs],[build documentation (requires xmlto)])],
enable_docbook_docs=$enableval,enable_docbook_docs=no)
AC_PATH_PROG(XMLTO, xmlto, no)
AC_MSG_CHECKING([whether to build DocBook documentation])
@@ -308,8 +294,7 @@ dnl ---------------------------------------------------------------------------
msg_rbac_shutdown=no
AC_ARG_ENABLE(rbac-shutdown,
- [AC_HELP_STRING([--enable-rbac-shutdown=<key>],
- [Build with RBAC support specifying shutdown/reboot RBAC authentication key])],
+ [AS_HELP_STRING([--enable-rbac-shutdown=<key>],[Build with RBAC support specifying shutdown/reboot RBAC authentication key])],
enable_rbac_shutdown=$enableval,enable_rbac_shutdown=no)
if test "x$enable_rbac_shutdown" != "xno"; then
RBAC_LIBS="-lsecdb -lsocket -lnsl"
@@ -326,8 +311,7 @@ dnl ---------------------------------------------------------------------------
# Turn on the additional warnings last, so -Werror doesn't affect other tests.
AC_ARG_ENABLE(more-warnings,
- [AC_HELP_STRING([--enable-more-warnings],
- [Maximum compiler warnings])],
+ [AS_HELP_STRING([--enable-more-warnings],[Maximum compiler warnings])],
set_more_warnings="$enableval",[
if test -d $srcdir/.git; then
set_more_warnings=yes
@@ -349,9 +333,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[has_option=yes],[has_option=no])
if test $has_option = no; then
CFLAGS="$SAVE_CFLAGS"
fi
@@ -368,8 +350,7 @@ fi
# Enable Debug
#
AC_ARG_ENABLE(debug,
- [AC_HELP_STRING([--enable-debug],
- [turn on debugging])],
+ [AS_HELP_STRING([--enable-debug],[turn on debugging])],
, enable_debug=yes)
if test "$enable_debug" = "yes"; then
DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
@@ -395,10 +376,9 @@ AC_SUBST(LDFLAGS)
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
- [],
- [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
-AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
-AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
+ [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != "xno"])
# Files
@@ -445,6 +425,7 @@ echo "
Build backend: ${CK_BACKEND}
PAM module dir: ${PAM_MODULE_DIR}
Build PAM module: ${msg_pam_module}
+ Build udev-acl: ${enable_udev_acl}
Build docs: ${enable_docbook_docs}
PolicyKit support ${have_polkit}