Update NEWS
[fuse.git] / configure.in
blob85ffa354711d111372f87d90ffcd59a0c994e2a7
1 AC_INIT(fuse, 2.9.0-pre0)
2 AC_CONFIG_MACRO_DIR([m4])
3 AC_CANONICAL_TARGET
4 AM_INIT_AUTOMAKE
5 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
6 AM_CONFIG_HEADER(include/config.h)
8 AC_PROG_LIBTOOL
9 AC_PROG_CC
10 AM_PROG_CC_C_O
12 # compatibility for automake < 1.8
13 if test -z "$mkdir_p"; then
14         mkdir_p="../mkinstalldirs"
15         AC_SUBST(mkdir_p)
18 case $target_os in
19      *linux*)   arch=linux;;
20      *netbsd*)  arch=netbsd;;
21      *bsd*)     arch=bsd;;
22      *)         arch=unknown;;
23 esac
25 if test "$ac_env_CFLAGS_set" != set; then
26         CFLAGS="-Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing"
29 AC_ARG_ENABLE(lib,
30         [  --enable-lib            Compile with library ])
31 AC_ARG_ENABLE(util,
32         [  --enable-util           Compile with util ])
33 AC_ARG_ENABLE(example,
34         [  --enable-example        Compile with examples ])
35 AC_ARG_ENABLE(mtab,
36         [  --disable-mtab          Disable and ignore usage of /etc/mtab ])
38 AC_ARG_WITH(pkgconfigdir,
39             [  --with-pkgconfigdir=DIR      pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
40             [pkgconfigdir=$withval],
41             [pkgconfigdir='${libdir}/pkgconfig'])
42 AC_SUBST(pkgconfigdir)
44 subdirs2="include"
46 if test "$enable_lib" != "no"; then
47         subdirs2="$subdirs2 lib";
49 if test "$arch" = linux -a "$enable_util" != "no"; then
50         subdirs2="$subdirs2 util";
52 if test "$enable_example" != "no"; then
53         subdirs2="$subdirs2 example";
55 if test "$enable_mtab" = "no"; then
56         AC_DEFINE(IGNORE_MTAB, 1, [Don't update /etc/mtab])
59 AC_CHECK_FUNCS([fork setxattr fdatasync])
60 AC_CHECK_MEMBERS([struct stat.st_atim])
61 AC_CHECK_MEMBERS([struct stat.st_atimespec])
63 libfuse_libs="-pthread"
64 LIBS=
65 AC_SEARCH_LIBS(dlopen, [dl])
66 AC_SEARCH_LIBS(clock_gettime, [rt])
67 libfuse_libs="$libfuse_libs $LIBS"
68 LIBS=
69 AC_ARG_WITH([libiconv-prefix],
70 [  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
71     for dir in `echo "$withval" | tr : ' '`; do
72       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
73       if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
74     done
75    ])
76 AM_ICONV
77 libfuse_libs="$libfuse_libs $LTLIBICONV"
78 AM_CONDITIONAL(ICONV, test "$am_cv_func_iconv" = yes)
79 AC_SUBST(libfuse_libs)
81 if test -z "$MOUNT_FUSE_PATH"; then
82         MOUNT_FUSE_PATH=/sbin
84 AC_SUBST(MOUNT_FUSE_PATH)
85 if test -z "$UDEV_RULES_PATH"; then
86         UDEV_RULES_PATH=/etc/udev/rules.d
88 AC_SUBST(UDEV_RULES_PATH)
89 if test -z "$INIT_D_PATH"; then
90         INIT_D_PATH=/etc/init.d
92 AC_SUBST(INIT_D_PATH)
94 AC_SUBST(subdirs2)
96 AM_CONDITIONAL(LINUX, test "$arch" = linux)
97 AM_CONDITIONAL(NETBSD, test "$arch" = netbsd)
98 AM_CONDITIONAL(BSD, test "$arch" = bsd)
100 AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile])
101 AC_OUTPUT