chiark / gitweb /
Remove utmp things
[elogind.git] / configure.ac
index 277addb8c32e7f0cbdc5caa01e405cc31b1b1e3d..204b3e00cf40e5fec34e1942b84550d48c4c8cec 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,8 +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", [elogind])
 
 AC_PROG_MKDIR_P
 AC_PROG_LN_S
@@ -185,6 +187,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Wno-unused-parameter \
         -Wno-missing-field-initializers \
         -Wno-unused-result \
+        -Wno-format-signedness \
         -Werror=overflow \
         -Wdate-time \
         -Wnested-externs \
@@ -206,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])])
@@ -331,7 +334,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>
@@ -342,6 +346,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.
@@ -358,16 +363,6 @@ AS_IF([test "x$enable_dbus" != "xno"], [
                 [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
 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"])
-
 # ------------------------------------------------------------------------------
 have_compat_libs=no
 AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
@@ -1164,40 +1159,40 @@ AS_IF([test "x$enable_gnuefi" != "xno"], [
         AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
                 [AC_DEFINE(HAVE_GNUEFI, 1, [Define if gnuefi is available])
                  have_gnuefi=yes],
-                [AS_IF([test "x$have_gnuefi" = xyes], [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
+                [AS_IF([test "x$enable_gnuefi" = xyes],
+                       [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
         ])
-])
-AM_CONDITIONAL(HAVE_GNUEFI, [test "$have_gnuefi" = "yes"])
 
-if test "x$enable_gnuefi" != "xno"; then
         efiroot=$(echo $(cd /usr/lib/$(gcc -print-multi-os-directory); pwd))
 
         EFI_LIB_DIR="$efiroot"
         AC_ARG_WITH(efi-libdir,
-                AS_HELP_STRING([--with-efi-libdir=PATH], [Path to efi lib directory]),
+                AS_HELP_STRING([--with-efi-libdir=PATH], [Path to EFI lib directory]),
                 [EFI_LIB_DIR="$withval"], [EFI_LIB_DIR="$efiroot"]
         )
         AC_SUBST([EFI_LIB_DIR])
 
+        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"],
-                [
-                        for EFI_LDS_DIR in "${efiroot}/gnuefi" "${efiroot}"; do
-                            for lds in ${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds; do
-                                    test -f ${lds} && break 2
-                            done
-                        done
-                ]
-        )
-        AC_SUBST([EFI_LDS_DIR])
+                AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
+                [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([${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])],
+              [AS_IF([test "x$enable_gnuefi" = xyes],
+                     [AC_MSG_ERROR([*** gnuefi support requested but files not found])],
+                     [have_gnuefi=no])])
 
         AC_ARG_WITH(efi-includedir,
-                AS_HELP_STRING([--with-efi-includedir=PATH], [Path to efi include directory]),
+                AS_HELP_STRING([--with-efi-includedir=PATH], [Path to EFI include directory]),
                 [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
         )
         AC_SUBST([EFI_INC_DIR])
-fi
+])
+AM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
 
 # ------------------------------------------------------------------------------
 AC_ARG_WITH(unifont,
@@ -1450,8 +1445,8 @@ AS_IF([test "x$0" != "x./configure"], [
 # 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_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])
 ])
 
@@ -1502,10 +1497,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
@@ -1585,7 +1576,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}