blob: b0a5ed23187fcd868000b24f756655d3a44f0323 [file] [log] [blame]
Miklos Szeredi83deefd2006-01-23 17:11:24 +00001AC_INIT(fuse, 2.6.0-pre0)
Miklos Szeredib3f99722005-11-16 13:00:24 +00002AC_CANONICAL_TARGET
Miklos Szeredi51ec1032004-11-10 11:52:26 +00003AM_INIT_AUTOMAKE
Miklos Szeredi97c61e92001-11-07 12:09:43 +00004AM_CONFIG_HEADER(include/config.h)
5
Miklos Szeredicb264512004-06-23 18:52:50 +00006m4_ifdef([LT_INIT],
7 [LT_INIT],
8 [AC_PROG_LIBTOOL])
Miklos Szeredi97c61e92001-11-07 12:09:43 +00009AC_PROG_CC
Miklos Szeredi97c61e92001-11-07 12:09:43 +000010
Miklos Szeredie5183742005-02-02 11:14:04 +000011# compatibility for automake < 1.8
Miklos Szeredic6f5bb42004-05-27 10:29:19 +000012if test -z "$mkdir_p"; then
Miklos Szeredi3a11e5c2004-05-27 10:43:18 +000013 mkdir_p="../mkinstalldirs"
Miklos Szeredie5183742005-02-02 11:14:04 +000014 AC_SUBST(mkdir_p)
Miklos Szeredic6f5bb42004-05-27 10:29:19 +000015fi
16
Miklos Szeredib3f99722005-11-16 13:00:24 +000017case $target_os in
18 *linux*) arch=linux;;
19 *bsd*) arch=bsd;;
20 *) arch=unknown;;
21esac
22
Miklos Szeredi079db8d2005-09-08 14:05:58 +000023if test "$ac_env_CFLAGS_set" != set; then
Miklos Szeredif6e0ec62005-08-03 09:11:06 +000024 CFLAGS="-Wall -W -g -O2"
25fi
Miklos Szeredi065f2222006-01-20 15:15:21 +000026CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=27"
Miklos Szeredi97c61e92001-11-07 12:09:43 +000027
Roland Bauerschmidt45c70192002-04-08 09:16:25 +000028AC_ARG_ENABLE(kernel-module,
Miklos Szeredi51ec1032004-11-10 11:52:26 +000029 [ --enable-kernel-module Compile kernel module ])
Roland Bauerschmidt45c70192002-04-08 09:16:25 +000030AC_ARG_ENABLE(lib,
31 [ --enable-lib Compile with library ])
32AC_ARG_ENABLE(util,
33 [ --enable-util Compile with util ])
34AC_ARG_ENABLE(example,
35 [ --enable-example Compile with examples ])
Miklos Szeredi35200932005-09-28 14:50:49 +000036AC_ARG_ENABLE(mtab,
37 [ --disable-mtab Disable and ignore usage of /etc/mtab ])
Miklos Szeredi97c61e92001-11-07 12:09:43 +000038
Miklos Szeredib3f99722005-11-16 13:00:24 +000039AC_ARG_WITH(pkgconfigdir,
40 [ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
41 [pkgconfigdir=$withval],
42 [pkgconfigdir='${libdir}/pkgconfig'])
43AC_SUBST(pkgconfigdir)
44
Miklos Szeredi51ec1032004-11-10 11:52:26 +000045subdirs2="include"
Miklos Szeredi5f054812002-12-03 18:45:21 +000046
Miklos Szeredib3f99722005-11-16 13:00:24 +000047if test "$arch" = linux -a "$enable_kernel_module" != "no"; then
Miklos Szeredi51ec1032004-11-10 11:52:26 +000048 AC_CONFIG_SUBDIRS(kernel)
Roland Bauerschmidt45c70192002-04-08 09:16:25 +000049fi
50
51if test "$enable_lib" != "no"; then
Miklos Szeredi51ec1032004-11-10 11:52:26 +000052 subdirs2="$subdirs2 lib";
Roland Bauerschmidt45c70192002-04-08 09:16:25 +000053fi
Miklos Szeredib3f99722005-11-16 13:00:24 +000054if test "$arch" = linux -a "$enable_util" != "no"; then
Miklos Szeredi51ec1032004-11-10 11:52:26 +000055 subdirs2="$subdirs2 util";
Roland Bauerschmidt45c70192002-04-08 09:16:25 +000056fi
57if test "$enable_example" != "no"; then
Miklos Szeredi51ec1032004-11-10 11:52:26 +000058 subdirs2="$subdirs2 example";
Roland Bauerschmidt45c70192002-04-08 09:16:25 +000059fi
Miklos Szeredi35200932005-09-28 14:50:49 +000060if test "$enable_mtab" = "no"; then
61 AC_DEFINE(IGNORE_MTAB, 1, [Don't update /etc/mtab])
62fi
Miklos Szeredib3f99722005-11-16 13:00:24 +000063AC_CHECK_FUNCS([fork setxattr fdatasync])
Miklos Szeredicb264512004-06-23 18:52:50 +000064AC_CHECK_MEMBERS([struct stat.st_atim])
Miklos Szeredi03cebae2004-03-31 10:19:18 +000065
Miklos Szeredibfb99462005-07-26 11:07:55 +000066if test -z "$MOUNT_FUSE_PATH"; then
67 MOUNT_FUSE_PATH=/sbin
68fi
69AC_SUBST(MOUNT_FUSE_PATH)
Miklos Szeredid51fca12005-09-15 12:51:00 +000070if test -z "$UDEV_RULES_PATH"; then
71 UDEV_RULES_PATH=/etc/udev/rules.d
72fi
73AC_SUBST(UDEV_RULES_PATH)
Miklos Szeredibfb99462005-07-26 11:07:55 +000074
Miklos Szeredi51ec1032004-11-10 11:52:26 +000075AC_SUBST(subdirs2)
Miklos Szeredi97c61e92001-11-07 12:09:43 +000076
Miklos Szeredib3f99722005-11-16 13:00:24 +000077AM_CONDITIONAL(LINUX, test "$arch" = linux)
78AM_CONDITIONAL(BSD, test "$arch" = bsd)
79
Miklos Szeredib9b94cd2004-12-01 18:56:39 +000080AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile])
Miklos Szeredidb1c3652004-11-08 21:11:53 +000081AC_OUTPUT