X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=configure.ac;h=248b291dd0d2c928265fab428143c2a2a5e8d02b;hb=68e00dc507acc3f3381f8f60bce71ecae371f794;hp=62581f6b0138e9ea3ceefa71b123d4f513f8b6e6;hpb=5e666e3d8846e695650ae757d3626547cfd05cbf;p=thirdparty%2Fe2fsprogs.git diff --git a/configure.ac b/configure.ac index 62581f6b0..248b291dd 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) @@ -863,6 +881,7 @@ AC_SUBST(BINARY_TYPE) AC_PROG_MAKE_SET CHECK_GNU_MAKE AC_PATH_PROG(LN, ln, ln) +AC_PROG_MKDIR_P AC_PROG_LN_S AC_PATH_PROG(MV, mv, mv) AC_PATH_PROG(CP, cp, cp) @@ -1095,11 +1114,14 @@ AC_CHECK_MEMBER(struct sockaddr.sa_len, [#include #include ]) 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)) + AC_CHECK_LIB(blkid, blkid_probe_enable_partitions, + AC_DEFINE(HAVE_BLKID_PROBE_ENABLE_PARTITIONS, 1)) fi dnl if test -n "$DLOPEN_LIB" ; then @@ -1109,8 +1131,6 @@ AC_CHECK_FUNCS(m4_flatten([ __secure_getenv add_key backtrace - blkid_probe_get_topology - blkid_probe_enable_partitions chflags dlopen fadvise64 @@ -1296,16 +1316,20 @@ 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], [ --enable-lto enable link time optimization],, -enable_lto=probe) +enable_lto=no) if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then AC_MSG_CHECKING([if C compiler supports LTO]) OLD_CFLAGS="$CFLAGS" OLD_LDFLAGS="$LDFLAGS" - LTO_FLAGS="-flto -ffat-lto-objects" + LTO_FLAGS="-g -flto -ffat-lto-objects" CFLAGS="$CFLAGS $LTO_FLAGS" LDFLAGS="$LDFLAGS $LTO_FLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([])], @@ -1386,6 +1410,37 @@ if test "$enable_addrsan" = "yes" && test "$have_addrsan" != "yes"; then AC_MSG_ERROR([ADDRSAN not supported by compiler.]) fi dnl +dnl Enable THREADSAN for all packages +dnl +AC_ARG_ENABLE([threadsan], +[ --enable-threadsan enable thread sanitizer],, +enable_threadsan=no) +if test "$enable_threadsan" = "yes" || test "$enable_threadsan" = "probe"; then + AC_MSG_CHECKING([if C compiler supports THREADSAN]) + OLD_CFLAGS="$CFLAGS" + OLD_LDFLAGS="$LDFLAGS" + THREADSAN_FLAGS="-fsanitize=thread" + CFLAGS="$CFLAGS $THREADSAN_FLAGS" + LDFLAGS="$LDFLAGS $THREADSAN_FLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [threadsan_cflags=$THREADSAN_FLAGS] + [threadsan_ldflags=$THREADSAN_FLAGS] + [have_threadsan=yes], + [AC_MSG_RESULT([no])]) + CFLAGS="${OLD_CFLAGS}" + LDFLAGS="${OLD_LDFLAGS}" + AC_SUBST(have_threadsan) + AC_SUBST(threadsan_cflags) + AC_SUBST(threadsan_ldflags) +fi +if test "$enable_threadsan" = "yes" && test "$have_threadsan" != "yes"; then + AC_MSG_ERROR([THREADSAN not supported by compiler.]) +fi +if test "$have_threadsan" = "yes" && test "$have_addrsan" = "yes"; then + AC_MSG_WARN([ADDRSAN and THREADSAN are not known to work together.]) +fi +dnl dnl OS-specific uncomment control dnl LINUX_CMT="#" @@ -1548,7 +1603,6 @@ if test -n "$WITH_DIET_LIBC" ; then INCLUDES="$INCLUDES -D_REENTRANT" fi AC_SUBST(INCLUDES) -AM_MKINSTALLDIRS dnl dnl Build CFLAGS dnl @@ -1692,7 +1746,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 \