Code

Add an option to disable building with XFS support
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 13 Aug 2016 11:23:34 +0000 (13:23 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 13 Aug 2016 11:23:34 +0000 (13:23 +0200)
Right now, if you have the xfs development headers installed,
they will be picked up. Add an option to disable this behaviour.

Fixes #1878

configure.ac

index 2d4c68105ffcd59de132eafdbfe32156a976083b..e4329757eb51f8e9be83df89ca69aa7cd2fdc0d4 100644 (file)
@@ -683,10 +683,26 @@ AC_CHECK_HEADERS([ \
   wordexp.h \
 ])
 
-AC_CHECK_HEADERS([xfs/xqm.h], [], [],
-[
-#define _GNU_SOURCE
-])
+# --enable-xfs {{{
+AC_ARG_ENABLE([xfs],
+  [AS_HELP_STRING([--enable-xfs], [xfs support in df plugin @<:@default=yes@:>@])],
+  [],
+  [enable_xfs="auto"]
+)
+
+if test "x$enable_xfs" != "xno"; then
+  AC_CHECK_HEADERS([xfs/xqm.h],
+    [],
+    [
+      if test "x$enable_xfs" = "xyes"; then
+        AC_MSG_ERROR([xfs/xqm.h not found])
+      fi
+    ],
+    [[#define _GNU_SOURCE]]
+  )
+fi
+
+# }}}
 
 # For the dns plugin
 AC_CHECK_HEADERS(arpa/nameser.h)