summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac6
-rw-r--r--src/Makefile.am4
3 files changed, 12 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index aabfa91..70e1c93 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,8 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src fdi
+DISTCHECK_CONFIGURE_FLAGS = --disable-root-sbin
+
indent:
indent -kr -ut -ts4 -l120 src/*.c
diff --git a/configure.ac b/configure.ac
index 684dcce..fdc35ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,4 +34,10 @@ AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([strcasecmp strdup strerror strndup])
+AC_ARG_ENABLE([root-sbin],
+ AS_HELP_STRING([--disable-root-sbin],
+ [Don't install mount helper in /sbin]),
+ [without_root_sbin=yes],[without_root_sbin=no])
+AM_CONDITIONAL([WITHOUT_ROOT_SBIN], test "x$without_root_sbin" = "xyes")
+
AC_OUTPUT(Makefile src/Makefile fdi/Makefile)
diff --git a/src/Makefile.am b/src/Makefile.am
index 17798c6..11f2815 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,11 @@
AM_CFLAGS = $(libglib2_CFLAGS) $(libfuse_CFLAGS) $(libiphone_CFLAGS) -g
AM_LDFLAGS = $(libglib2_LIBS) $(libfuse_LIBS) $(libiphone_LIBS)
+if WITHOUT_ROOT_SBIN
+rootsbinexecdir = $(sbindir)
+else
rootsbinexecdir = /sbin
+endif
rootsbinexec_PROGRAMS = mount.fuse.ifuse
mount_fuse_ifuse_SOURCES = ifuse.c