]> git.ozlabs.org Git - petitboot/blobdiff - configure.ac
discover/device-handler: Attempt to retry failed mounts
[petitboot] / configure.ac
index 58aa6cf39017ae73438f901b1addf72ddc1a79e6..08685ec02feb765c755afab9f884ac5fb4474398 100644 (file)
@@ -35,6 +35,8 @@ AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION(0.18.1)
 LT_INIT
 
+AM_SILENT_RULES([yes])
+
 AX_WITH_CURSES
 AX_WITH_CURSES_MENU
 AX_WITH_CURSES_FORM
@@ -51,10 +53,20 @@ if test "x$ax_cv_curses" = xyes; then
 fi
 
 AC_CHECK_LIB([udev], [udev_new],
-       [],
+       [UDEV_LIBS=-ludev],
        [AC_MSG_FAILURE([The libudev development library is required by petitboot.  Try installing the package libudev-dev or libudev-devel.])]
 )
 
+AC_ARG_WITH([fdt],
+       AS_HELP_STRING([--without-fdt],
+               [Build without libfdt (default: no)]))
+
+AS_IF([test "x$with_fdt" != "xno"],
+       AC_CHECK_LIB([fdt], [fdt_check_header],
+               [FDT_LIBS=-lfdt; have_libfdt=yes]))
+
+AM_CONDITIONAL([HAVE_LIBFDT], [test x"$have_libfdt" = xyes])
+
 AC_CHECK_HEADERS([stdarg.h])
 AC_CHECK_HEADERS([varargs.h])
 
@@ -159,6 +171,21 @@ AC_ARG_ENABLE(
 )
 #AM_CONDITIONAL([ENABLE_BUSYBOX], [test "x$enable_busybox" = "xyes"])
 
+AC_ARG_ENABLE(
+       [mtd],
+       [AS_HELP_STRING(
+               [--enable-mtd],
+               [Add support for MTD devices on certain platforms [default=no]]
+       )],
+       [],
+       [enable_mtd=no]
+)
+AM_CONDITIONAL([ENABLE_MTD], [test "x$enable_mtd" = "xyes"])
+AS_IF([test "x$enable_mtd" = "xyes"],
+      [AC_DEFINE(MTD_SUPPORT, 1, [Enable MTD support])],
+      []
+)
+
 AC_ARG_ENABLE(
        [ps3],
        [AS_HELP_STRING(
@@ -257,7 +284,8 @@ AS_IF(
        ]
 )
  
-
+AC_SUBST([UDEV_LIBS])
+AC_SUBST([FDT_LIBS])
 AC_SUBST([LIBTOOL_DEPS])
 AC_SUBST([DESTDIR])
 AC_SUBST([pkgsysconfdir], ["${sysconfdir}/${package}"])
@@ -265,20 +293,6 @@ AC_SUBST([pkgsysconfdir], ["${sysconfdir}/${package}"])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([
        Makefile
-       discover/Makefile
-       discover/grub2/Makefile
-       lib/Makefile
-       man/Makefile
-       test/Makefile
-       test/lib/Makefile
-       test/parser/Makefile
-       test/urls/Makefile
-       ui/Makefile
-       ui/common/Makefile
-       ui/ncurses/Makefile
-       ui/test/Makefile
-       ui/twin/Makefile
-       utils/Makefile
        po/Makefile.in
 ])