4 AC_CONFIG_MACRO_DIR([m4])
7 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
8 AM_CONFIG_HEADER(include/config.h)
17 *netbsd*) arch=netbsd;;
22 if test "$ac_env_CFLAGS_set" != set; then
23 CFLAGS="-Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing"
27 [ --enable-lib Compile with library ])
29 [ --enable-util Compile with util ])
30 AC_ARG_ENABLE(example,
31 [ --enable-example Compile with examples ])
33 [ --disable-mtab Disable and ignore usage of /etc/mtab ])
35 AC_ARG_WITH(pkgconfigdir,
36 [ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
37 [pkgconfigdir=$withval],
38 [pkgconfigdir='${libdir}/pkgconfig'])
39 AC_SUBST(pkgconfigdir)
43 if test "$enable_lib" != "no"; then
44 subdirs2="$subdirs2 lib";
46 if test "$arch" = linux -a "$enable_util" != "no"; then
47 subdirs2="$subdirs2 util";
49 if test "$enable_example" != "no"; then
50 subdirs2="$subdirs2 example";
52 if test "$enable_mtab" = "no"; then
53 AC_DEFINE(IGNORE_MTAB, 1, [Don't update /etc/mtab])
56 AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat])
57 AC_CHECK_FUNCS([posix_fallocate])
58 AC_CHECK_MEMBERS([struct stat.st_atim])
59 AC_CHECK_MEMBERS([struct stat.st_atimespec])
62 AC_SEARCH_LIBS(dlopen, [dl])
63 AC_SEARCH_LIBS(clock_gettime, [rt])
66 AC_ARG_WITH([libiconv-prefix],
67 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
68 for dir in `echo "$withval" | tr : ' '`; do
69 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
70 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
74 libfuse_libs="$libfuse_libs $LTLIBICONV"
75 AM_CONDITIONAL(ICONV, test "$am_cv_func_iconv" = yes)
76 AC_SUBST(libfuse_libs)
78 if test -z "$MOUNT_FUSE_PATH"; then
81 AC_SUBST(MOUNT_FUSE_PATH)
82 if test -z "$UDEV_RULES_PATH"; then
83 UDEV_RULES_PATH=/etc/udev/rules.d
85 AC_SUBST(UDEV_RULES_PATH)
86 if test -z "$INIT_D_PATH"; then
87 INIT_D_PATH=/etc/init.d
93 AM_CONDITIONAL(LINUX, test "$arch" = linux)
94 AM_CONDITIONAL(NETBSD, test "$arch" = netbsd)
95 AM_CONDITIONAL(BSD, test "$arch" = bsd)
98 if test "$arch" = linux -a "$cross_compiling" != "yes"; then
99 AC_MSG_CHECKING([if umount supports --fake --no-canonicalize])
100 # exit code of umount is 1 if option is unrecognised, 2 otherwise
101 umount --fake --no-canonicalize > /dev/null 2>&1
102 if test $? != 1; then
105 firstline=`umount --fake --no-canonicalize 2>&1 | head -1`
106 if test "$firstline" = 'umount: only root can use "--fake" option'; then
109 AC_MSG_RESULT([$firstline])
115 AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile doc/Makefile])
118 if test "$util_linux_ok" = no; then
120 ******************************************************************
121 * Please install util-linux version 2.18 or later which supports *
122 * --fake and --no-canonicalize options in mount and umount *
123 ******************************************************************])