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