From e3dcabb7fdb50d797864a442c5f28c47ebae3600 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 13 Aug 2016 13:23:34 +0200 Subject: [PATCH] Add an option to disable building with XFS support 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 | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 2d4c6810..e4329757 100644 --- a/configure.ac +++ b/configure.ac @@ -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) -- 2.30.2