-have_resolved=no
-AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
-if test "x$enable_resolved" != "xno"; then
- have_resolved=yes
- M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
-fi
-AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
-
-AC_ARG_WITH(dns-servers,
- AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
- [Space-separated list of default DNS servers]),
- [DNS_SERVERS="$withval"],
- [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
-
-AC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
-AC_SUBST(DNS_SERVERS)
-
-# ------------------------------------------------------------------------------
-have_efi=no
-AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
-if test "x$enable_efi" != "xno"; then
- AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
- have_efi=yes
-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])
-
-# ------------------------------------------------------------------------------
-have_kdbus=no
-AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default]))
-if test "x$enable_kdbus" = "xyes"; then
- AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
- have_kdbus=yes
- M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
-fi
-AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
-
-# ------------------------------------------------------------------------------
-AC_ARG_WITH(rc-local-script-path-start,
- AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
- [Path to /etc/rc.local]),
- [RC_LOCAL_SCRIPT_PATH_START="$withval"],
- [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
-
-AC_ARG_WITH(rc-local-script-path-stop,
- AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
- [Path to /usr/sbin/halt.local]),
- [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
- [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
-
-AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
-AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
-
-AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
-AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
-
-# ------------------------------------------------------------------------------
-AC_ARG_WITH(kbd-loadkeys,
- AS_HELP_STRING([--with-kbd-loadkeys=PATH],
- [Path to loadkeys]),
- [KBD_LOADKEYS="$withval"],
- [KBD_LOADKEYS="/usr/bin/loadkeys"])
-
-AC_ARG_WITH(kbd-setfont,
- AS_HELP_STRING([--with-kbd-setfont=PATH],
- [Path to setfont]),
- [KBD_SETFONT="$withval"],
- [KBD_SETFONT="/usr/bin/setfont"])
-
-AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
-AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
-
-AC_SUBST(KBD_LOADKEYS)
-AC_SUBST(KBD_SETFONT)
-
-AC_ARG_WITH(telinit,
- AS_HELP_STRING([--with-telinit=PATH],
- [Path to telinit]),
- [TELINIT="$withval"],
- [TELINIT="/lib/sysvinit/telinit"])
-
-AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
-
-AC_SUBST(TELINIT)
-