aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2016-02-10 19:53:49 -0800
committerNikolaus Rath <Nikolaus@rath.org>2016-02-10 19:53:49 -0800
commite812e29d39f0e7aaf9ead9a19a9a4f288300a7e2 (patch)
treeff8fd1c17b9be6d1aba7ff365614b10e41a1223b /configure.ac
parentb10d21db3185a2b25e3bd35579f57d3c7b8d882e (diff)
parent80db43d7dce4f3979fe5e92b2d616d635f21029d (diff)
downloadsshfs-e812e29d39f0e7aaf9ead9a19a9a4f288300a7e2.tar
sshfs-e812e29d39f0e7aaf9ead9a19a9a4f288300a7e2.tar.gz
sshfs-e812e29d39f0e7aaf9ead9a19a9a4f288300a7e2.tar.bz2
sshfs-e812e29d39f0e7aaf9ead9a19a9a4f288300a7e2.zip
Merge pull request #5 from jmmv/merge-osxfuse
Merge osxfuse.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 21 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4d7e23c..a91ec3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,5 @@
AC_INIT(sshfs, 2.6)
+AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_CONFIG_HEADER(config.h)
@@ -11,6 +12,12 @@ sshnodelay_libs=$LIBS
AC_SUBST(sshnodelay_libs)
LIBS=
+case "$target_os" in
+ *linux*) osname=linux;;
+ *darwin*) osname=darwin;;
+ *) osname=unknown;;
+esac
+
AC_ARG_ENABLE(sshnodelay,
[ --disable-sshnodelay Don't compile NODELAY workaround for ssh])
@@ -43,10 +50,22 @@ oldlibs="$LIBS"
LIBS="$LIBS $SSHFS_LIBS"
AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes])
LIBS="$oldlibs"
-if test "$have_fuse_opt_parse" = no; then
- CFLAGS="$CFLAGS -Icompat"
+if test "$have_fuse_opt_parse" = no -o "$osname" = darwin; then
+ CFLAGS="$CFLAGS -I${srcdir}/compat"
fi
AM_CONDITIONAL(FUSE_OPT_COMPAT, test "$have_fuse_opt_parse" = no)
+AM_CONDITIONAL(DARWIN_COMPAT, test "$osname" = darwin)
+
+AC_CHECK_PROG(UNMOUNT_COMMAND, fusermount, fusermount -u, umount)
+
+# TODO: Figure out why we special-case this in Darwin. Would be nice if
+# the default setting was consistent across platforms so we wouldn't need
+# to care about it here.
+case "$osname" in
+ darwin) IDMAP_DEFAULT=user ;;
+ *) IDMAP_DEFAULT=none ;;
+esac
+AC_SUBST(IDMAP_DEFAULT)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT