aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBenjamin Fleischer <fleiben@gmail.com>2013-01-08 14:53:09 +0100
committerBenjamin Fleischer <fleiben@gmail.com>2013-01-08 15:32:57 +0100
commit14581937282486ab7ce057ec79f226181ef1d45d (patch)
tree74dc8d75bcc78d1aae3f17d9975ebd9f0c60767c /configure.ac
parent66458931ddd09fc15244c5ddf3c1ec73e2fd08b9 (diff)
downloadsshfs-14581937282486ab7ce057ec79f226181ef1d45d.tar
sshfs-14581937282486ab7ce057ec79f226181ef1d45d.tar.gz
sshfs-14581937282486ab7ce057ec79f226181ef1d45d.tar.bz2
sshfs-14581937282486ab7ce057ec79f226181ef1d45d.zip
Add unnamed semaphore implementation for Mac OS X
In the past we relied on libosxfuse including a working unnamed semaphore implmentation for Mac OS X. This will not be the case in future releases of OSXFUSE, therefore we need to add our own implementation.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d433038..b2556f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,5 @@
AC_INIT(sshfs-fuse, 2.4)
+AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
@@ -11,6 +12,14 @@ sshnodelay_libs=$LIBS
AC_SUBST(sshnodelay_libs)
LIBS=
+case $target_os in
+ *linux*) arch=linux;;
+ *netbsd*) arch=netbsd;;
+ *bsd*) arch=bsd;;
+ *darwin*) arch=darwin;;
+ *) arch=unknown;;
+esac
+
AC_ARG_ENABLE(sshnodelay,
[ --disable-sshnodelay Don't compile NODELAY workaround for ssh])
@@ -43,10 +52,11 @@ 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
+if test "$have_fuse_opt_parse" = no -o "$arch" = darwin; then
CFLAGS="$CFLAGS -Icompat"
fi
AM_CONDITIONAL(FUSE_OPT_COMPAT, test "$have_fuse_opt_parse" = no)
+AM_CONDITIONAL(DARWIN_COMPAT, test "$arch" = darwin)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT