AC_PREREQ([2.64])
-AC_INIT([systemd],
- [218],
- [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
- [systemd],
- [http://www.freedesktop.org/wiki/Software/systemd])
+# FIXME: Update to proper web page
+AC_INIT([elogind],
+ [219],
+ [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])
AM_SILENT_RULES([yes])
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
-AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
- test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
- [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
-
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])])
-# i18n stuff for the PolicyKit policy files
+SET_ARCH(X86_64, x86_64*)
+SET_ARCH(IA32, i*86*)
+SET_ARCH(MIPS, mips*)
-# Check whether intltool can be found, disable NLS otherwise
+# i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
AC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
AS_IF([test x"$intltool_found" != xyes],
[AS_IF([test x"$enable_nls" = xyes],
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
-Wno-unused-parameter \
-Wno-missing-field-initializers \
-Wno-unused-result \
+ -Wno-format-signedness \
-Werror=overflow \
-Wdate-time \
-Wnested-externs \
-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])])
#include <linux/random.h>
]])
-AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS,
+AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
+ IFLA_MACVLAN_FLAGS,
IFLA_IPVLAN_MODE,
IFLA_VTI_REMOTE,
IFLA_PHYS_PORT_ID,
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>
#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.
[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]),
AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
if test "x$enable_xz" != "xno"; then
PKG_CHECK_MODULES(XZ, [ liblzma ],
- [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes])
+ [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
AC_MSG_ERROR([*** XZ support requested but libraries not found])
fi
AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Disable optional ZLIB support]))
if test "x$enable_zlib" != "xno"; then
PKG_CHECK_MODULES(ZLIB, [ zlib ],
- [AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available]) have_zlib=yes])
+ [AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available]) have_zlib=yes], have_zlib=no)
if test "x$have_zlib" = xno -a "x$enable_zlib" = xyes; then
AC_MSG_ERROR([*** ZLIB support requested but libraries not found])
fi
# ------------------------------------------------------------------------------
have_bzip2=no
-AC_ARG_ENABLE(bzip2, AS_HELP_STRING([--enable-bzip2], [Enable optional BZIP2 support]))
+AC_ARG_ENABLE(bzip2, AS_HELP_STRING([--enable-bzip2], [Disable optional BZIP2 support]))
AS_IF([test "x$enable_bzip2" != "xno"], [
AC_CHECK_HEADERS(bzlib.h,
- [AC_DEFINE(HAVE_BZIP2, 1, [Define in BZIP2 is available]) have_bzip2=yes],
- [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])
+ [AC_DEFINE(HAVE_BZIP2, 1, [Define in BZIP2 is available])
+ have_bzip2=yes],
+ [AS_IF([test "x$have_bzip2" = xyes], [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])
+ ])
])
AM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
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]))
fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
+# ------------------------------------------------------------------------------
+EFI_CC=gcc
+AC_SUBST([EFI_CC])
+
+EFI_ARCH=`echo $host | sed "s/\(-\).*$//"`
+
+AM_COND_IF(ARCH_IA32, [
+ EFI_ARCH=ia32
+ EFI_MACHINE_TYPE_NAME=ia32])
+
+AM_COND_IF(ARCH_X86_64, [
+ EFI_MACHINE_TYPE_NAME=x64])
+
+AC_SUBST([EFI_ARCH])
+AC_SUBST([EFI_MACHINE_TYPE_NAME])
+
+have_gnuefi=no
+AC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [Disable optional gnuefi support]))
+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$enable_gnuefi" = xyes],
+ [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
+ ])
+
+ 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]),
+ [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" && 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]),
+ [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
+ )
+ AC_SUBST([EFI_INC_DIR])
+])
+AM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
+
# ------------------------------------------------------------------------------
AC_ARG_WITH(unifont,
AS_HELP_STRING([--with-unifont=PATH],
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])],
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_ARG_ENABLE(tests,
[AC_HELP_STRING([--disable-tests], [disable tests])],
enable_tests=$enableval, enable_tests=yes)
AC_CONFIG_FILES([
Makefile po/Makefile.in
- docs/libudev/Makefile
- docs/libudev/version.xml
- docs/gudev/Makefile
- docs/gudev/version.xml
])
AC_OUTPUT
GNUTLS: ${have_gnutls}
libcurl: ${have_libcurl}
libidn: ${have_libidn}
- libiptc: ${have_libiptc}
ELFUTILS: ${have_elfutils}
binfmt: ${have_binfmt}
vconsole: ${have_vconsole}
coredump: ${have_coredump}
polkit: ${have_polkit}
efi: ${have_efi}
+ gnuefi: ${have_gnuefi}
+ efi arch: ${EFI_ARCH}
+ EFI machine type: ${EFI_MACHINE_TYPE_NAME}
+ EFI CC ${EFI_CC}
+ EFI libdir: ${EFI_LIB_DIR}
+ EFI ldsdir: ${EFI_LDS_DIR}
+ EFI includedir: ${EFI_INC_DIR}
kmod: ${have_kmod}
xkbcommon: ${have_xkbcommon}
blkid: ${have_blkid}
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}