2006-01-24 01:11:24 +08:00
|
|
|
AC_INIT(fuse, 2.6.0-pre0)
|
2005-11-16 21:00:24 +08:00
|
|
|
AC_CANONICAL_TARGET
|
2004-11-10 19:52:26 +08:00
|
|
|
AM_INIT_AUTOMAKE
|
2001-11-07 20:09:43 +08:00
|
|
|
AM_CONFIG_HEADER(include/config.h)
|
|
|
|
|
2004-06-24 02:52:50 +08:00
|
|
|
m4_ifdef([LT_INIT],
|
|
|
|
[LT_INIT],
|
|
|
|
[AC_PROG_LIBTOOL])
|
2001-11-07 20:09:43 +08:00
|
|
|
AC_PROG_CC
|
|
|
|
|
2005-02-02 19:14:04 +08:00
|
|
|
# compatibility for automake < 1.8
|
2004-05-27 18:29:19 +08:00
|
|
|
if test -z "$mkdir_p"; then
|
2004-05-27 18:43:18 +08:00
|
|
|
mkdir_p="../mkinstalldirs"
|
2005-02-02 19:14:04 +08:00
|
|
|
AC_SUBST(mkdir_p)
|
2004-05-27 18:29:19 +08:00
|
|
|
fi
|
|
|
|
|
2005-11-16 21:00:24 +08:00
|
|
|
case $target_os in
|
|
|
|
*linux*) arch=linux;;
|
|
|
|
*bsd*) arch=bsd;;
|
|
|
|
*) arch=unknown;;
|
|
|
|
esac
|
|
|
|
|
2005-09-08 22:05:58 +08:00
|
|
|
if test "$ac_env_CFLAGS_set" != set; then
|
2005-08-03 17:11:06 +08:00
|
|
|
CFLAGS="-Wall -W -g -O2"
|
|
|
|
fi
|
2006-01-27 19:19:51 +08:00
|
|
|
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26"
|
2001-11-07 20:09:43 +08:00
|
|
|
|
2002-04-08 17:16:25 +08:00
|
|
|
AC_ARG_ENABLE(kernel-module,
|
2004-11-10 19:52:26 +08:00
|
|
|
[ --enable-kernel-module Compile kernel module ])
|
2002-04-08 17:16:25 +08:00
|
|
|
AC_ARG_ENABLE(lib,
|
|
|
|
[ --enable-lib Compile with library ])
|
|
|
|
AC_ARG_ENABLE(util,
|
|
|
|
[ --enable-util Compile with util ])
|
|
|
|
AC_ARG_ENABLE(example,
|
|
|
|
[ --enable-example Compile with examples ])
|
2005-09-28 22:50:49 +08:00
|
|
|
AC_ARG_ENABLE(mtab,
|
|
|
|
[ --disable-mtab Disable and ignore usage of /etc/mtab ])
|
2001-11-07 20:09:43 +08:00
|
|
|
|
2005-11-16 21:00:24 +08:00
|
|
|
AC_ARG_WITH(pkgconfigdir,
|
|
|
|
[ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
|
|
|
|
[pkgconfigdir=$withval],
|
|
|
|
[pkgconfigdir='${libdir}/pkgconfig'])
|
|
|
|
AC_SUBST(pkgconfigdir)
|
|
|
|
|
2004-11-10 19:52:26 +08:00
|
|
|
subdirs2="include"
|
2002-12-04 02:45:21 +08:00
|
|
|
|
2005-11-16 21:00:24 +08:00
|
|
|
if test "$arch" = linux -a "$enable_kernel_module" != "no"; then
|
2004-11-10 19:52:26 +08:00
|
|
|
AC_CONFIG_SUBDIRS(kernel)
|
2002-04-08 17:16:25 +08:00
|
|
|
fi
|
2001-11-07 20:09:43 +08:00
|
|
|
|
2002-04-08 17:16:25 +08:00
|
|
|
if test "$enable_lib" != "no"; then
|
2004-11-10 19:52:26 +08:00
|
|
|
subdirs2="$subdirs2 lib";
|
2002-04-08 17:16:25 +08:00
|
|
|
fi
|
2005-11-16 21:00:24 +08:00
|
|
|
if test "$arch" = linux -a "$enable_util" != "no"; then
|
2004-11-10 19:52:26 +08:00
|
|
|
subdirs2="$subdirs2 util";
|
2002-04-08 17:16:25 +08:00
|
|
|
fi
|
|
|
|
if test "$enable_example" != "no"; then
|
2004-11-10 19:52:26 +08:00
|
|
|
subdirs2="$subdirs2 example";
|
2002-04-08 17:16:25 +08:00
|
|
|
fi
|
2005-09-28 22:50:49 +08:00
|
|
|
if test "$enable_mtab" = "no"; then
|
|
|
|
AC_DEFINE(IGNORE_MTAB, 1, [Don't update /etc/mtab])
|
|
|
|
fi
|
2005-11-16 21:00:24 +08:00
|
|
|
AC_CHECK_FUNCS([fork setxattr fdatasync])
|
2004-06-24 02:52:50 +08:00
|
|
|
AC_CHECK_MEMBERS([struct stat.st_atim])
|
2004-03-31 18:19:18 +08:00
|
|
|
|
2006-01-31 02:14:51 +08:00
|
|
|
libfuse_libs=-lpthread
|
|
|
|
LIBS=
|
2006-02-10 14:22:15 +08:00
|
|
|
AC_SEARCH_LIBS(clock_gettime, [rt])
|
|
|
|
rt_libs=$LIBS
|
2006-01-31 02:14:51 +08:00
|
|
|
|
2006-02-10 14:22:15 +08:00
|
|
|
AC_SUBST(rt_libs)
|
|
|
|
LIBS=
|
|
|
|
|
|
|
|
libfuse_libs="$libfuse_libs $rt_libs"
|
2006-01-31 02:14:51 +08:00
|
|
|
AC_SUBST(libfuse_libs)
|
|
|
|
|
2005-07-26 19:07:55 +08:00
|
|
|
if test -z "$MOUNT_FUSE_PATH"; then
|
|
|
|
MOUNT_FUSE_PATH=/sbin
|
|
|
|
fi
|
|
|
|
AC_SUBST(MOUNT_FUSE_PATH)
|
2005-09-15 20:51:00 +08:00
|
|
|
if test -z "$UDEV_RULES_PATH"; then
|
|
|
|
UDEV_RULES_PATH=/etc/udev/rules.d
|
|
|
|
fi
|
|
|
|
AC_SUBST(UDEV_RULES_PATH)
|
2005-07-26 19:07:55 +08:00
|
|
|
|
2004-11-10 19:52:26 +08:00
|
|
|
AC_SUBST(subdirs2)
|
2001-11-07 20:09:43 +08:00
|
|
|
|
2005-11-16 21:00:24 +08:00
|
|
|
AM_CONDITIONAL(LINUX, test "$arch" = linux)
|
|
|
|
AM_CONDITIONAL(BSD, test "$arch" = bsd)
|
|
|
|
|
2004-12-02 02:56:39 +08:00
|
|
|
AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile])
|
2004-11-09 05:11:53 +08:00
|
|
|
AC_OUTPUT
|