aboutsummaryrefslogtreecommitdiff
path: root/configure.in
blob: d9a234a979448af715b559a6b315bc6d0adc1690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
AC_INIT(fuse, 2.1-pre0)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(include/config.h)

m4_ifdef([LT_INIT],
	[LT_INIT],
	[AC_PROG_LIBTOOL])
AC_PROG_CC

# compatibility for automake < 1.8 
if test -z "$mkdir_p"; then
	mkdir_p="../mkinstalldirs"
	AC_SUBST(mkdir_p)	
fi

CFLAGS="-Wall -W -g -O2"
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT"

AC_ARG_ENABLE(kernel-module,
	[  --enable-kernel-module  Compile kernel module ])
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 ])
AC_ARG_ENABLE(auto-modprobe,
	[  --enable-auto-modprobe  Automatically insert kernel module])

subdirs2="include"

if test "$enable_kernel_module" != "no"; then
	AC_CONFIG_SUBDIRS(kernel)
fi

if test "$enable_lib" != "no"; then
	subdirs2="$subdirs2 lib";
fi
if test "$enable_util" != "no"; then
	subdirs2="$subdirs2 util";
fi
if test "$enable_example" != "no"; then
	subdirs2="$subdirs2 example";
fi
if test "$enable_auto_modprobe" = "yes"; then
	AC_DEFINE(AUTO_MODPROBE, 1, [Automatically insert kernel module])
fi

AC_CHECK_FUNCS([setxattr])
AC_CHECK_MEMBERS([struct stat.st_atim])

AC_SUBST(subdirs2)

AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile include/linux/Makefile])
AC_OUTPUT