1 AC_INIT(fuse, 2.6.0-rc1)
4 AM_CONFIG_HEADER(include/config.h)
9 # compatibility for automake < 1.8
10 if test -z "$mkdir_p"; then
11 mkdir_p="../mkinstalldirs"
21 if test "$ac_env_CFLAGS_set" != set; then
22 CFLAGS="-Wall -W -g -O2"
24 CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26"
26 AC_ARG_ENABLE(kernel-module,
27 [ --enable-kernel-module Compile kernel module ])
29 [ --enable-lib Compile with library ])
31 [ --enable-util Compile with util ])
32 AC_ARG_ENABLE(example,
33 [ --enable-example Compile with examples ])
35 [ --disable-mtab Disable and ignore usage of /etc/mtab ])
37 AC_ARG_WITH(pkgconfigdir,
38 [ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
39 [pkgconfigdir=$withval],
40 [pkgconfigdir='${libdir}/pkgconfig'])
41 AC_SUBST(pkgconfigdir)
45 if test "$arch" = linux -a "$enable_kernel_module" != "no"; then
46 AC_CONFIG_SUBDIRS(kernel)
49 if test "$enable_lib" != "no"; then
50 subdirs2="$subdirs2 lib";
52 if test "$arch" = linux -a "$enable_util" != "no"; then
53 subdirs2="$subdirs2 util";
55 if test "$enable_example" != "no"; then
56 subdirs2="$subdirs2 example";
58 if test "$enable_mtab" = "no"; then
59 AC_DEFINE(IGNORE_MTAB, 1, [Don't update /etc/mtab])
61 AC_CHECK_FUNCS([fork setxattr fdatasync])
62 AC_CHECK_MEMBERS([struct stat.st_atim])
63 AC_CHECK_MEMBERS([struct stat.st_atimespec])
67 AC_SEARCH_LIBS(clock_gettime, [rt])
68 libfuse_libs="$libfuse_libs $LIBS"
70 AC_SUBST(libfuse_libs)
72 if test -z "$MOUNT_FUSE_PATH"; then
75 AC_SUBST(MOUNT_FUSE_PATH)
76 if test -z "$UDEV_RULES_PATH"; then
77 UDEV_RULES_PATH=/etc/udev/rules.d
79 AC_SUBST(UDEV_RULES_PATH)
83 AM_CONDITIONAL(LINUX, test "$arch" = linux)
84 AM_CONDITIONAL(BSD, test "$arch" = bsd)
86 AC_CHECK_HEADERS(selinux/selinux.h, AC_CHECK_LIB(selinux, getfilecon))
88 AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile])