]> git.ozlabs.org Git - petitboot/blobdiff - configure.ac
discover/devmapper: Retry dm-device remove if busy
[petitboot] / configure.ac
index bdd7f70011ce47014cbcba8b510b6a969cf73f3a..4151b002a35b8a2835dcf0b1ff572abd39821498 100644 (file)
@@ -76,6 +76,27 @@ AC_CHECK_LIB([devmapper], [dm_task_create],
        [AC_MSG_FAILURE([The libdevmapper development library is required by petitboot.  Try installing the package libdevmapper-dev or device-mapper-devel.])]
 )
 
+AC_ARG_ENABLE(
+       [crypt],
+       [AS_HELP_STRING(
+               [--enable-crypt],
+               [Include crypt support to enable password use [default=no]]
+       )],
+       [],
+       [enable_crypt=no]
+)
+AM_CONDITIONAL([ENABLE_CRYPT], [test "x$enable_crypt" = "xyes"])
+AS_IF([test "x$enable_crypt" = "xyes"],
+      [AC_DEFINE(CRYPT_SUPPORT, 1, [Enable crypt/password support])],
+      []
+)
+AS_IF([test "x$enable_crypt" = "xyes"],
+       AC_CHECK_LIB([crypt], [crypt],
+               [CRYPT_LIBS=-lcrypt],
+               [AC_MSG_FAILURE([shadow/crypt libs required])]
+       )
+)
+
 AC_ARG_WITH([fdt],
        AS_HELP_STRING([--without-fdt],
                [Build without libfdt (default: no)]))
@@ -135,6 +156,13 @@ AM_CONDITIONAL(
        [WITH_TWIN],
        [test "x$with_twin_x11" = "xyes" || test "x$with_twin_fbdev" = "xyes"])
 
+AS_IF(
+       [test "x$with_twin_x11" != "xyes" && \
+               test "x$with_twin_fbdev" != "xyes" && \
+               test "x$ax_cv_curses" != "xyes"],
+       [AC_MSG_WARN([ No user interface programs configured.  Consider using --with-ncurses, --with-twin-x11 or --with-twin-fbdev'])]
+)
+
 AS_IF(
        [test "x$with_twin_x11" = "xyes" || test "x$with_twin_fbdev" = "xyes"],
        [PKG_CHECK_MODULES(
@@ -239,6 +267,14 @@ AC_ARG_VAR(
 AS_IF([test "x$VERIFY_DIGEST" = x], [VERIFY_DIGEST="sha256"])
 AC_DEFINE_UNQUOTED(VERIFY_DIGEST, "$VERIFY_DIGEST", [openssl verify dgst])
 
+AC_ARG_ENABLE([hard-lockdown],
+             [AS_HELP_STRING([--enable-hard-lockdown],
+                             [if signed boot configured, the absence of the
+                              LOCKDOWN_FILE does not disable signed boot at
+                              runtime @<:@default=no@:>@])],
+             [AC_DEFINE(HARD_LOCKDOWN, 1, [Enable hard lockdown])],
+             [])
+
 AC_ARG_ENABLE(
        [busybox],
        [AS_HELP_STRING(
@@ -288,16 +324,61 @@ AS_IF(
        ]
 )
 
+# platform choice
+AC_ARG_ENABLE(
+       [platform-all],
+       [AS_HELP_STRING(
+               [--enable-platform-all],
+               [build support for all platforms [default=no]]
+       )]
+)
+AS_IF(
+       [test "x$enable_platform_all" = "xyes"],
+       [enable_platform_arm64="yes"; enable_platform_powerpc="yes"; enable_platform_ps3="yes"]
+)
+
 AC_ARG_ENABLE(
-       [ps3],
+       [platform-auto],
        [AS_HELP_STRING(
-               [--enable-ps3],
-               [build additional programs for the PS3 game console [default=no]]
+               [--enable-platform-auto],
+               [auto detect platform support to build [default=yes]]
        )],
        [],
-       [enable_ps3=no]
+       [enable_platform_auto="yes"]
+)
+AS_IF(
+       [test "x$enable_platform_auto" = "xyes"],
+       [AS_CASE([$host],
+               [aarch64-*-*],   [enable_platform_arm64="yes"],
+               [powerpc*-*-*],  [enable_platform_powerpc="yes"],
+       )]
+)
+
+AC_ARG_ENABLE(
+       [platform-arm64],
+       [AS_HELP_STRING(
+               [--enable-platform-arm64],
+               [build support for arm64 platforms [default=no]]
+       )]
 )
-AM_CONDITIONAL([ENABLE_PS3], [test "x$enable_ps3" = "xyes"])
+AM_CONDITIONAL([PLATFORM_ARM64], [test "x$enable_platform_arm64" = "xyes"])
+
+AC_ARG_ENABLE(
+       [platform-powerpc],
+       [AS_HELP_STRING(
+               [--enable-platform-powerpc],
+               [build support for powerpc platforms [default=no]]
+       )]
+)
+AM_CONDITIONAL([PLATFORM_POWERPC], [test "x$enable_platform_powerpc" = "xyes"])
+
+AC_ARG_ENABLE(
+       [platform-ps3],
+       [AS_HELP_STRING(
+               [--enable-platform-ps3],
+               [build support for the PS3 game console [default=no]]
+       )])
+AM_CONDITIONAL([PLATFORM_PS3], [test "x$enable_platform_ps3" = "xyes"])
 
 AC_ARG_ENABLE(
        [debug],
@@ -307,7 +388,6 @@ AC_ARG_ENABLE(
        [],
        [enable_debug=check]
 )
-#AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = "xyes"])
 
 AC_ARG_ENABLE(
        [test-valgrind],
@@ -338,11 +418,14 @@ DEFINE_HOST_PROG(UMOUNT, umount, [/bin/umount])
 DEFINE_HOST_PROG(WGET, wget, [/usr/bin/wget])
 DEFINE_HOST_PROG(IP, ip, [/sbin/ip])
 DEFINE_HOST_PROG(UDHCPC, udhcpc, [/sbin/udhcpc])
+DEFINE_HOST_PROG(UDHCPC6, udhcpc6, [/usr/bin/udhcpc6])
 DEFINE_HOST_PROG(VGSCAN, vgscan, [/usr/sbin/vgscan])
 DEFINE_HOST_PROG(VGCHANGE, vgchange, [/usr/sbin/vgchange])
 DEFINE_HOST_PROG(PB_PLUGIN, pb-plugin, [/usr/sbin/pb-plugin])
 DEFINE_HOST_PROG(PB_EXEC, pb-exec, [/usr/sbin/pb-exec])
 DEFINE_HOST_PROG(SH, sh, [/bin/sh])
+DEFINE_HOST_PROG(SCSI_RESCAN, scsi-rescan, [/usr/sbin/scsi-rescan])
+DEFINE_HOST_PROG(DMIDECODE, dmidecode, [/sbin/dmidecode])
 
 AC_ARG_WITH(
     [tftp],
@@ -393,6 +476,7 @@ AS_IF(
  
 AC_SUBST([UDEV_LIBS])
 AC_SUBST([DEVMAPPER_LIBS])
+AC_SUBST([CRYPT_LIBS])
 AC_SUBST([FDT_LIBS])
 AC_SUBST([LIBFLASH_LIBS])
 AC_SUBST([LIBTOOL_DEPS])