aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-11-10 13:11:57 -0800
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-11-10 13:11:57 -0800
commit0e08174044cca6578eb2d39ccb8c0f829e95a97c (patch)
treee50181014d4ee3ddc54027bf0b50f9f05e5a4292 /configure.ac
parenteb9f12639f892906bd5474dd5757449747ebc152 (diff)
Make test for util-linux version more robust
The current version fails on Amazon Linux. This check should work better. Fixes #64.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 8 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index a009c0b..cd9ae75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,20 +109,14 @@ AM_CONDITIONAL(BSD, test "$arch" = bsd)
util_linux_ok=yes
if test "$arch" = linux -a "$cross_compiling" != "yes"; then
- AC_MSG_CHECKING([if umount supports --fake --no-canonicalize])
- # exit code of umount is 1 if option is unrecognised, 2 otherwise
- umount --fake --no-canonicalize > /dev/null 2>&1
- if test $? != 1; then
- AC_MSG_RESULT([yes])
- else
- firstline=`umount --fake --no-canonicalize 2>&1 | head -1`
- if test "$firstline" = 'umount: only root can use "--fake" option'; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([$firstline])
- util_linux_ok=no
- fi
- fi
+ AC_MSG_CHECKING([if umount supports --fake --no-canonicalize])
+ if umount --help 2>&1 | grep -q -- "--fake" &&
+ umount --help 2>&1 | grep -q -- "--no-canonicalize"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ util_linux_ok=no
+ fi
fi
AC_CONFIG_FILES([fuse3.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile doc/Makefile test/Makefile])