chiark / gitweb /
Remove src/nss-myhostname
[elogind.git] / configure.ac
index 01ee8dc994f069c1609be3d3e77eca006964a2c8..64d8b213efa8917c55a726c3867d25edd3ddc07b 100644 (file)
 
 AC_PREREQ([2.64])
 
-AC_INIT([systemd],
+# FIXME: Update to proper web page
+AC_INIT([elogind],
         [219],
-        [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
-        [systemd],
-        [http://www.freedesktop.org/wiki/Software/systemd])
+        [http://bugs.freedesktop.org/enter_bug.cgi?product=elogind],
+        [elogind],
+        [http://www.freedesktop.org/wiki/Software/elogind])
 
 AC_CONFIG_SRCDIR([src/core/main.c])
 AC_CONFIG_MACRO_DIR([m4])
@@ -41,8 +42,8 @@ AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
 LT_PREREQ(2.2)
 LT_INIT([disable-static])
 
-AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
-AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
+AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by elogind])])
+AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by elogind])])
 
 SET_ARCH(X86_64, x86_64*)
 SET_ARCH(IA32, i*86*)
@@ -71,9 +72,9 @@ AS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
     AC_SUBST(INTLTOOL_POLICY_RULE)
 ])
 
-GETTEXT_PACKAGE=systemd
+GETTEXT_PACKAGE=elogind
 AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [systemd])
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [elogind])
 
 AC_PROG_MKDIR_P
 AC_PROG_LN_S
@@ -208,13 +209,13 @@ AS_CASE([$CC], [*clang*],
                -Wno-gnu-variable-sized-type-not-at-end \
         ])])
 
-AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
         [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
                -flto -ffat-lto-objects])],
         [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
 AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
 
-AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
                -Wp,-D_FORTIFY_SOURCE=2])],
         [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
@@ -240,54 +241,6 @@ AC_CHECK_SIZEOF(rlim_t,,[
        #include <sys/resource.h>
 ])
 
-# ------------------------------------------------------------------------------
-# we use python to build the man page index, and for systemd-python
-have_python=no
-AC_ARG_WITH([python],
-        [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
-
-have_lxml=no
-AS_IF([test "x$with_python" != "xno"], [
-        AM_PATH_PYTHON(,, [:])
-        AS_IF([test "x$PYTHON" != "x:"], [
-                AC_MSG_CHECKING([for python lxml module])
-                AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
-                AC_MSG_RESULT([$have_lxml])
-                AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes],
-                      [AC_MSG_WARN([*** python support requires python-lxml module installed])])
-        ])
-])
-AS_IF([test "$have_python" != "yes"], [
-      AS_IF([test "$with_python" = "yes"],
-            [AC_MSG_ERROR([*** python support requested but python support not found])])
-      AS_IF([test "$with_python" != "no"],
-            [AC_MSG_WARN([*** python support not found, some documentation cannot be built])])
-])
-
-AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
-AS_IF([test "x$PYTHON_BINARY" = "x"],
-      [AS_IF([test "x$have_python" = "xyes"],
-             [PYTHON_BINARY="$(which "$PYTHON")"],
-             [PYTHON_BINARY=/usr/bin/python])])
-AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
-
-AS_IF([test "x$have_python" != "xyes" -a "x$enable_python_devel" = "xyes"],
-      [AC_MSG_ERROR([*** python-devel support requires --with-python])])
-
-have_python_devel=no
-AC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules]))
-AS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [
-      PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}],
-            [have_python_devel=yes],
-            [PKG_CHECK_MODULES([PYTHON_DEVEL], [python],
-                  [have_python_devel=yes],
-                  [have_python_devel=no])])
-      AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes],
-            [AC_MSG_ERROR([*** python-devel support requested but libraries not found])])
-      AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
-])
-AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
-
 # ------------------------------------------------------------------------------
 
 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
@@ -333,7 +286,8 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
                 IFLA_VXLAN_LOCAL6,
                 IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
                 IFLA_BRIDGE_VLAN_INFO,
-                IFLA_BRPORT_UNICAST_FLOOD],
+                IFLA_BRPORT_UNICAST_FLOOD,
+                NDA_IFINDEX],
 [], [], [[
 #include <inttypes.h>
 #include <netinet/in.h>
@@ -344,6 +298,7 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
 #include <linux/if_tunnel.h>
 #include <linux/if_link.h>
 #include <linux/if_bridge.h>
+#include <linux/neighbour.h>
 ]])
 
 # This makes sure pkg.m4 is available.
@@ -361,14 +316,7 @@ AS_IF([test "x$enable_dbus" != "xno"], [
 AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
 
 # ------------------------------------------------------------------------------
-have_utmp=yes
-AC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
-        AS_CASE("x${enableval}",
-                [xyes], [have_utmp=yes],
-                [xno],  [have_utmp=no],
-                AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
-AS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
-AM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
+PKG_CHECK_MODULES(UDEV, [libudev])
 
 # ------------------------------------------------------------------------------
 have_compat_libs=no
@@ -444,15 +392,6 @@ if test "x$enable_blkid" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
 
-# ------------------------------------------------------------------------------
-have_libmount=no
-PKG_CHECK_MODULES(MOUNT, [ mount >= 2.20 ],
-        [AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
-if test "x$have_libmount" = xno; then
-        AC_MSG_ERROR([*** libmount support required but libraries not found])
-fi
-AM_CONDITIONAL(HAVE_LIBMOUNT, [test "$have_libmount" = "yes"])
-
 # ------------------------------------------------------------------------------
 have_seccomp=no
 AC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support]))
@@ -898,21 +837,6 @@ if test "x$enable_libidn" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
 
-# ------------------------------------------------------------------------------
-have_libiptc=no
-AC_ARG_ENABLE(libiptc, AS_HELP_STRING([--disable-libiptc], [Disable optional LIBIPTC support]))
-if test "x$enable_libiptc" != "xno"; then
-        PKG_CHECK_MODULES(LIBIPTC, [libiptc],
-               [AC_DEFINE(HAVE_LIBIPTC, 1, [Define if libiptc is available])
-                have_libiptc=yes
-                M4_DEFINES="$M4_DEFINES -DHAVE_LIBIPTC"],
-               [have_libiptc=no])
-        if test "x$have_libiptc" = "xno" -a "x$enable_libiptc" = "xyes"; then
-                AC_MSG_ERROR([*** libiptc support requested but libraries not found])
-        fi
-fi
-AM_CONDITIONAL(HAVE_LIBIPTC, [test "$have_libiptc" = "yes"])
-
 # ------------------------------------------------------------------------------
 have_binfmt=no
 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
@@ -1182,9 +1106,10 @@ AS_IF([test "x$enable_gnuefi" != "xno"], [
         have_efi_lds=no
         AC_ARG_WITH(efi-ldsdir,
                 AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
-                [EFI_LDS_DIR="$withval"],
+                [EFI_LDS_DIR="$withval" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
+                        [have_efi_lds=yes])],
                 [AS_FOR([DIR], [EFI_LDS_DIR], ["${efiroot}/gnuefi" "${efiroot}"],
-                        [AC_CHECK_FILE([DIR/elf_${EFI_ARCH}_efi.lds],
+                        [AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
                                        [have_efi_lds=yes && break])])])
         AS_IF([test "x$have_efi_lds" = xyes],
               [AC_SUBST([EFI_LDS_DIR])],
@@ -1331,39 +1256,8 @@ AC_ARG_ENABLE(ldconfig,
        enable_ldconfig=$enableval, enable_ldconfig=yes)
 AM_CONDITIONAL(ENABLE_LDCONFIG, [test x$enable_ldconfig = xyes])
 
-# ------------------------------------------------------------------------------
-# Location of the init scripts as mandated by LSB
-SYSTEM_SYSVINIT_PATH=/etc/init.d
-SYSTEM_SYSVRCND_PATH=/etc/rc.d
-
-AC_ARG_WITH([sysvinit-path],
-        [AS_HELP_STRING([--with-sysvinit-path=PATH],
-                [Specify the path to where the SysV init scripts are located])],
-        [SYSTEM_SYSVINIT_PATH="$withval"],
-        [])
-
-AC_ARG_WITH([sysvrcnd-path],
-        [AS_HELP_STRING([--with-sysvrcnd-path=PATH],
-                [Specify the path to the base directory for the SysV rcN.d directories])],
-        [SYSTEM_SYSVRCND_PATH="$withval"],
-        [])
-
-if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
-        AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
-        SYSTEM_SYSV_COMPAT="yes"
-        M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
-elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
-        AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
-else
-        SYSTEM_SYSV_COMPAT="no"
-fi
-
-AC_SUBST(SYSTEM_SYSVINIT_PATH)
-AC_SUBST(SYSTEM_SYSVRCND_PATH)
 AC_SUBST(M4_DEFINES)
 
-AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
-
 AC_ARG_WITH([tty-gid],
         [AS_HELP_STRING([--with-tty-gid=GID],
                 [Specify the numeric GID of the 'tty' group])],
@@ -1503,10 +1397,6 @@ AC_SUBST([rootlibdir], [$with_rootlibdir])
 
 AC_CONFIG_FILES([
         Makefile po/Makefile.in
-        docs/libudev/Makefile
-        docs/libudev/version.xml
-        docs/gudev/Makefile
-        docs/gudev/version.xml
 ])
 
 AC_OUTPUT
@@ -1533,7 +1423,6 @@ AC_MSG_RESULT([
         GNUTLS:                  ${have_gnutls}
         libcurl:                 ${have_libcurl}
         libidn:                  ${have_libidn}
-        libiptc:                 ${have_libiptc}
         ELFUTILS:                ${have_elfutils}
         binfmt:                  ${have_binfmt}
         vconsole:                ${have_vconsole}
@@ -1570,7 +1459,6 @@ AC_MSG_RESULT([
         kmod:                    ${have_kmod}
         xkbcommon:               ${have_xkbcommon}
         blkid:                   ${have_blkid}
-        libmount:                ${have_libmount}
         dbus:                    ${have_dbus}
         nss-myhostname:          ${have_myhostname}
         gudev:                   ${enable_gudev}
@@ -1586,7 +1474,6 @@ AC_MSG_RESULT([
         Split /usr:              ${enable_split_usr}
         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
         compatibility libraries: ${have_compat_libs}
-        utmp/wtmp support:       ${have_utmp}
         ldconfig support:        ${enable_ldconfig}
         hibernate support:       ${enable_hibernate}
         extra debugging:         ${enable_debug}