]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - configure.ac
AOSP: Allow resize2fs to compile with BUILD_HOST_static
[thirdparty/e2fsprogs.git] / configure.ac
index 0c2b2421e1de33e62fffed51ef276ac212cee28d..cf03444d8f178fd28b08ed4aef69ce4e0cf5bbdb 100644 (file)
@@ -566,6 +566,24 @@ AC_SUBST(PROFILED_LIBBLKID)
 AC_SUBST(DEPPROFILED_LIBBLKID)
 AC_SUBST(BLKID_CMT)
 dnl
+dnl handle --enable-subset
+dnl
+ALL_CMT=
+SUBSET_CMT=
+AC_ARG_ENABLE([subset],
+[  --enable-subset       enable subset-only build],
+if test "$enableval" = "no"
+then
+       SUBSET_CMT=#
+       AC_MSG_RESULT([Disabling subset-only build])
+else
+       ALL_CMT=#
+       AC_MSG_RESULT([Enabling subset-only-build])
+fi
+,)
+AC_SUBST(ALL_CMT)
+AC_SUBST(SUBSET_CMT)
+dnl
 dnl handle --disable-backtrace
 dnl
 AH_TEMPLATE([DISABLE_BACKTRACE], [Define to 1 to disable use of backtrace])
@@ -1096,11 +1114,16 @@ AC_CHECK_MEMBER(struct sockaddr.sa_len,
        [#include <sys/types.h>
         #include <sys/socket.h>])
 dnl
-dnl This will add -lblkid to the AC_CHECK_FUNCS search if we are using
-dnl the system-provided blkid library
+dnl If we are using the system-provided blkid library, check for
+dnl the functions added after migrating that library to util-linux
 dnl
 if test -n "$BLKID_CMT"; then
-  AC_SEARCH_LIBS([blkid_probe_all], [blkid])
+  AC_CHECK_LIB(blkid, blkid_probe_get_topology,
+                     AC_DEFINE(HAVE_BLKID_PROBE_GET_TOPOLOGY, 1,
+                               [Define to 1 if blkid has blkid_probe_get_topology]))
+  AC_CHECK_LIB(blkid, blkid_probe_enable_partitions,
+                     AC_DEFINE(HAVE_BLKID_PROBE_ENABLE_PARTITIONS, 1,
+                               [Define to 1 if blkid has blkid_probe_enable_partitions]))
 fi
 dnl
 if test -n "$DLOPEN_LIB" ; then
@@ -1110,8 +1133,6 @@ AC_CHECK_FUNCS(m4_flatten([
        __secure_getenv
        add_key
        backtrace
-       blkid_probe_get_topology
-       blkid_probe_enable_partitions
        chflags
        dlopen
        fadvise64
@@ -1297,6 +1318,10 @@ linux*)
        ;;
 esac
 dnl
+dnl Check the available mount options
+dnl
+AX_CHECK_MOUNT_OPT(nosuid)
+AX_CHECK_MOUNT_OPT(nodev)
 dnl Enable LTO for all packages
 dnl
 AC_ARG_ENABLE([lto],
@@ -1649,7 +1674,8 @@ AS_IF([test "x${with_crond_dir}" != "xno"],
        AS_IF([test "x${with_crond_dir}" = "xyes"],
          [
                AS_IF([test -d "/etc/cron.d"],
-                 [with_crond_dir="/etc/cron.d"])
+                 [with_crond_dir="/etc/cron.d"],
+                 [have_crond="no"; with_crond_dir=""])
          ])
        AC_MSG_CHECKING([for system crontab dir])
        crond_dir="${with_crond_dir}"
@@ -1723,7 +1749,7 @@ if test -z "$BLKID_CMT" ; then
        blkid_out_list="lib/blkid/Makefile lib/blkid/blkid.pc \
                lib/blkid/blkid_types.h"
 fi
-for i in MCONFIG Makefile e2fsprogs.spec \
+for i in MCONFIG Makefile \
        util/Makefile util/subst.conf util/gen-tarball util/install-symlink \
        lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \
        lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \