]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
configure: error out when LFS does not work
authorFelix Janda <felix.janda@posteo.de>
Mon, 31 Oct 2016 23:40:40 +0000 (10:40 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 31 Oct 2016 23:40:40 +0000 (10:40 +1100)
Signed-off-by: Felix Janda <felix.janda@posteo.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
configure.ac
m4/package_libcdev.m4

index f6a3b4bef71f0b14e21dfa687e3a72fbea8c6f2e..b88ab7f164161c7e280a3c25a52847729add642e 100644 (file)
@@ -108,6 +108,7 @@ AC_MULTILIB($enable_lib64)
 AC_RT($enable_librt)
 
 AC_SYS_LARGEFILE
+AC_NEED_LFS
 
 AC_PACKAGE_NEED_UUID_H
 AC_PACKAGE_NEED_UUIDCOMPARE
index 6de6659310e9e10c1e00570b62f055743049b0a9..13394b6832d13f9fc89d221d78424c2259023940 100644 (file)
@@ -266,6 +266,22 @@ AC_DEFUN([AC_HAVE_MREMAP],
     AC_SUBST(have_mremap)
   ])
 
+#
+# Check if transparent LFS is enabled
+#
+AC_DEFUN([AC_NEED_LFS],
+  [ AC_MSG_CHECKING([whether large file support works])
+    AC_TRY_COMPILE([
+#include <unistd.h>
+    ], [
+         int i[sizeof(off_t)-8];
+    ], AC_MSG_RESULT(yes),
+       [AC_MSG_RESULT(no)
+       echo
+       echo 'FATAL ERROR: C library does not support transparent LFS.'
+       exit 1])
+  ])
+
 #
 # Check if we need to override the system struct fsxattr with
 # the internal definition.  This /only/ happens if the system