chiark / gitweb /
core: rename SystemdRunningAs to ManagerRunningAs
[elogind.git] / configure.ac
index 529fcf2..fb62a57 100644 (file)
 
 AC_PREREQ([2.64])
 
-# FIXME: Update to proper web page
 AC_INIT([elogind],
-        [219],
-        [http://bugs.freedesktop.org/enter_bug.cgi?product=elogind],
+        [219.14],
+        [https://github.com/wingo/elogind/issues],
         [elogind],
-        [http://www.freedesktop.org/wiki/Software/elogind])
+        [https://github.com/wingo/elogind])
 
 AC_CONFIG_SRCDIR([src/login/logind.c])
 AC_CONFIG_MACRO_DIR([m4])
@@ -87,6 +86,8 @@ AC_PROG_CC_C99
 AC_PATH_PROG([M4], [m4])
 AC_PATH_PROG([XSLTPROC], [xsltproc])
 
+AC_PATH_PROG([HALT], [halt], [halt])
+AC_PATH_PROG([REBOOT], [reboot], [reboot])
 AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
 
 AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
@@ -191,10 +192,10 @@ AS_CASE([$CC], [*clang*],
                -Wno-gnu-variable-sized-type-not-at-end \
         ])])
 
-AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
-        [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-               -flto -ffat-lto-objects])],
-        [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
+dnl AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
+dnl         [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+dnl                -flto -ffat-lto-objects])],
+dnl         [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
 AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
 
 AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
@@ -231,12 +232,22 @@ AC_CHECK_HEADERS([linux/memfd.h], [], [])
 
 # unconditionally pull-in librt with old glibc versions
 AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
+AC_SEARCH_LIBS([mq_unlink], [rt], [], [])
 
+AC_ARG_WITH([libcap],
+            AS_HELP_STRING([--with-libcap=DIR], [Prefix for libcap]),
+            [CAP_LDFLAGS="-L$with_libcap/lib"],
+            [CAP_LDFLAGS=""])
 save_LIBS="$LIBS"
+save_LDFLAGS="$LDFLAGS"
 LIBS=
+LDFLAGS="$LDFLAGS $CAP_LDFLAGS"
 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
 CAP_LIBS="$LIBS"
 AC_SUBST(CAP_LIBS)
+AC_SUBST(CAP_LDFLAGS)
+LIBS="$save_LIBS"
+LDFLAGS="$save_LDFLAGS"
 
 AC_CHECK_FUNCS([memfd_create])
 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
@@ -293,6 +304,13 @@ AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
 # ------------------------------------------------------------------------------
 PKG_CHECK_MODULES(UDEV, [libudev])
 
+AC_ARG_WITH([udevrulesdir],
+            AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules files]),
+            [],
+            [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)/rules.d])
+AC_SUBST([udevrulesdir], [$with_udevrulesdir])
+AC_SUBST([udevbindir], [$($PKG_CONFIG --variable=udevdir udev)/../bin])
+
 # ------------------------------------------------------------------------------
 have_coverage=no
 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
@@ -372,15 +390,6 @@ if test "x$enable_apparmor" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
 
-
-AC_ARG_WITH([certificate-root],
-        AS_HELP_STRING([--with-certificate-root=PATH],
-                [Specify the prefix for TLS certificates [/etc/ssl]]),
-        [CERTIFICATEROOT="$withval"],
-        [CERTIFICATEROOT="/etc/ssl"])
-
-AC_SUBST(CERTIFICATEROOT)
-
 # ------------------------------------------------------------------------------
 AC_ARG_ENABLE([pam],
         AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
@@ -569,10 +578,6 @@ AC_ARG_WITH([zshcompletiondir],
         AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
         [], [with_zshcompletiondir=${datadir}/zsh/site-functions])
 
-AC_ARG_WITH([rootprefix],
-        AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
-        [], [with_rootprefix=${ac_default_prefix}])
-
 AC_ARG_WITH([rootlibdir],
         AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
         [],
@@ -597,14 +602,6 @@ AC_ARG_ENABLE([split-usr],
                 enable_split_usr=no
         ])])
 
-AC_ARG_WITH([dkr-index-url],
-        [AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
-        [DEFAULT_DKR_INDEX_URL="\"$withval\""],
-        [DEFAULT_DKR_INDEX_URL="NULL"])
-
-AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
-AC_SUBST(DEFAULT_DKR_INDEX_URL)
-
 AS_IF([test "x${enable_split_usr}" = "xyes"], [
         AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
 ])
@@ -613,15 +610,7 @@ AS_IF([test "x${enable_split_usr}" = "xyes"], [
 AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
                                        [Define to do gtk-doc tests])
 AS_IF([test "x$0" != "x./configure"], [
-        AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
-])
-
-# QEMU and OVMF UEFI firmware
-AS_IF([test x"$cross_compiling" = "xyes"], [], [
-        AC_PATH_PROG([QEMU], [qemu-system-x86_64])
-        AC_CHECK_FILE([/usr/share/qemu/bios-ovmf.bin], [QEMU_BIOS=/usr/share/qemu/bios-ovmf.bin],
-                [AC_CHECK_FILE([/usr/share/qemu-ovmf/bios.bin], [QEMU_BIOS=/usr/share/qemu-ovmf/bios.bin])])
-        AC_SUBST([QEMU_BIOS])
+        AC_SUBST([INTLTOOL_UPDATE], [/usr/bin/env true])
 ])
 
 AC_ARG_ENABLE(tests,
@@ -666,7 +655,6 @@ AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
 AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
 AC_SUBST([pamlibdir], [$with_pamlibdir])
 AC_SUBST([pamconfdir], [$with_pamconfdir])
-AC_SUBST([rootprefix], [$with_rootprefix])
 AC_SUBST([rootlibdir], [$with_rootlibdir])
 
 AC_CONFIG_FILES([
@@ -687,28 +675,18 @@ AC_MSG_RESULT([
         blkid:                   ${have_blkid}
         dbus:                    ${have_dbus}
         kdbus:                   ${have_kdbus}
-        Python:                  ${have_python}
-        Python Headers:          ${have_python_devel}
         man pages:               ${have_manpages}
         gtk-doc:                 ${enable_gtk_doc}
         test coverage:           ${have_coverage}
         Split /usr:              ${enable_split_usr}
-        SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
         extra debugging:         ${enable_debug}
 
         prefix:                  ${prefix}
-        rootprefix:              ${with_rootprefix}
         sysconf dir:             ${sysconfdir}
         datarootdir:             ${datarootdir}
         includedir:              ${includedir}
-        include_prefix:          ${INCLUDE_PREFIX}
         lib dir:                 ${libdir}
         rootlib dir:             ${with_rootlibdir}
-        SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
-        SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
-        Build Python:            ${PYTHON}
-        Installation Python:     ${PYTHON_BINARY}
-        sphinx binary:           ${SPHINX_BUILD}
         PAM modules dir:         ${with_pamlibdir}
         PAM configuration dir:   ${with_pamconfdir}
         D-Bus policy dir:        ${with_dbuspolicydir}
@@ -718,12 +696,8 @@ AC_MSG_RESULT([
         Zsh completions dir:     ${with_zshcompletiondir}
         Maximum System UID:      ${SYSTEM_UID_MAX}
         Maximum System GID:      ${SYSTEM_GID_MAX}
-        Certificate root:        ${CERTIFICATEROOT}
-        Default dkr Index        ${DEFAULT_DKR_INDEX_URL}
 
         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
         CPPFLAGS:                ${OUR_CPPFLAGS} ${CPPFLAGS}
         LDFLAGS:                 ${OUR_LDFLAGS} ${LDFLAGS}
-        PYTHON_CFLAGS:           ${PYTHON_DEVEL_CFLAGS}
-        PYTHON_LIBS:             ${PYTHON_DEVEL_LIBS}
 ])