2010-04-26 23:34:56 +08:00
|
|
|
AC_INIT(fuse, 2.7.6)
|
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)
|
|
|
|
|
2006-07-31 01:33:40 +08:00
|
|
|
AC_PROG_LIBTOOL
|
2001-11-07 20:09:43 +08:00
|
|
|
AC_PROG_CC
|
2006-10-28 15:59:22 +08:00
|
|
|
AM_PROG_CC_C_O
|
2001-11-07 20:09:43 +08:00
|
|
|
|
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
|
2006-12-04 20:45:19 +08:00
|
|
|
CFLAGS="-Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing"
|
2005-08-03 17:11:06 +08:00
|
|
|
fi
|
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])
|
2006-09-24 22:53:29 +08:00
|
|
|
AC_CHECK_MEMBERS([struct stat.st_atimespec])
|
2004-03-31 18:19:18 +08:00
|
|
|
|
2007-02-04 07:32:47 +08:00
|
|
|
libfuse_libs="-pthread"
|
2006-01-31 02:14:51 +08:00
|
|
|
LIBS=
|
2007-02-04 07:32:47 +08:00
|
|
|
AC_SEARCH_LIBS(dlopen, [dl])
|
2006-02-10 14:22:15 +08:00
|
|
|
AC_SEARCH_LIBS(clock_gettime, [rt])
|
2006-02-15 22:25:17 +08:00
|
|
|
libfuse_libs="$libfuse_libs $LIBS"
|
2006-02-10 14:22:15 +08:00
|
|
|
LIBS=
|
2007-04-06 01:39:58 +08:00
|
|
|
AC_ARG_WITH([libiconv-prefix],
|
|
|
|
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
|
|
|
for dir in `echo "$withval" | tr : ' '`; do
|
|
|
|
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
|
|
|
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
|
|
|
done
|
|
|
|
])
|
|
|
|
AM_ICONV
|
|
|
|
libfuse_libs="$libfuse_libs $LIBICONV"
|
|
|
|
AM_CONDITIONAL(ICONV, test "$am_cv_func_iconv" = yes)
|
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)
|
2006-10-01 21:46:02 +08:00
|
|
|
if test -z "$INIT_D_PATH"; then
|
|
|
|
INIT_D_PATH=/etc/init.d
|
|
|
|
fi
|
|
|
|
AC_SUBST(INIT_D_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
|