Whamcloud - gitweb
ci.yml: use actions/checkout@v3 to switch to using Node 16
[tools/e2fsprogs.git] / configure.ac
index af56992..cc6f681 100644 (file)
@@ -845,23 +845,39 @@ dnl
 AH_TEMPLATE([CONFIG_TDB], [Define to 1 to enable tdb support])
 AC_ARG_ENABLE([tdb],
 AS_HELP_STRING([--disable-tdb],[disable tdb support]),
+[
 if test "$enableval" = "no"
 then
        AC_MSG_RESULT([Disabling tdb support])
-       TDB_CMT="#"
-       TDB_MAN_COMMENT='.\"'
+       CONFIG_TDB=0
 else
        AC_MSG_RESULT([Enabling tdb support])
+       CONFIG_TDB=1
+fi
+]
+,
+[
+case "$host_os" in
+mingw*)
+       AC_MSG_RESULT([Disabling tdb support by default])
+       CONFIG_TDB=0
+       ;;
+*)
+       AC_MSG_RESULT([Enabling tdb support by default])
+       CONFIG_TDB=1
+       ;;
+esac
+]
+)
+if test "$CONFIG_TDB" = "1"
+then
        AC_DEFINE(CONFIG_TDB, 1)
        TDB_CMT=""
        TDB_MAN_COMMENT=""
+else
+       TDB_CMT="#"
+       TDB_MAN_COMMENT='.\"'
 fi
-,
-AC_MSG_RESULT([Enabling mmp support by default])
-AC_DEFINE(CONFIG_TDB, 1)
-TDB_CMT=""
-TDB_MAN_COMMENT=""
-)
 AC_SUBST(TDB_CMT)
 AC_SUBST(TDB_MAN_COMMENT)
 dnl
@@ -1020,6 +1036,17 @@ AC_CHECK_HEADERS(m4_flatten([
        sys/wait.h
        sys/xattr.h
 ]))
+case "$host_os" in
+mingw*)
+       # The above checks only detect system headers, not the headers in
+       # ./include/mingw/, so explicitly define them to be available.
+       AC_DEFINE(HAVE_LINUX_TYPES_H, 1)
+       AC_DEFINE(HAVE_SYS_STAT_H, 1)
+       AC_DEFINE(HAVE_SYS_SYSMACROS_H, 1)
+       AC_DEFINE(HAVE_SYS_TYPES_H, 1)
+       AC_DEFINE(HAVE_UNISTD_H, 1)
+       ;;
+esac
 dnl Check where to find a dd(1) that supports iflag=fullblock
 dnl and oflag=append
 AC_MSG_CHECKING([for a dd(1) program that supports iflag=fullblock])
@@ -1722,6 +1749,11 @@ fi
 if test -n "$WITH_DIET_LIBC" ; then
        INCLUDES="$INCLUDES -D_REENTRANT"
 fi
+case "$host_os" in
+mingw*)
+       INCLUDES=$INCLUDES' -I$(top_srcdir)/include/mingw'
+       ;;
+esac
 AC_SUBST(INCLUDES)
 dnl
 dnl Build CFLAGS