Miklos Szeredi | e109e28 | 2006-02-20 11:06:20 +0000 | [diff] [blame] | 1 | AC_INIT(fuse, 2.6.0-pre1) |
Miklos Szeredi | b3f9972 | 2005-11-16 13:00:24 +0000 | [diff] [blame] | 2 | AC_CANONICAL_TARGET |
Miklos Szeredi | 51ec103 | 2004-11-10 11:52:26 +0000 | [diff] [blame] | 3 | AM_INIT_AUTOMAKE |
Miklos Szeredi | 97c61e9 | 2001-11-07 12:09:43 +0000 | [diff] [blame] | 4 | AM_CONFIG_HEADER(include/config.h) |
| 5 | |
Miklos Szeredi | cb26451 | 2004-06-23 18:52:50 +0000 | [diff] [blame] | 6 | m4_ifdef([LT_INIT], |
| 7 | [LT_INIT], |
| 8 | [AC_PROG_LIBTOOL]) |
Miklos Szeredi | 97c61e9 | 2001-11-07 12:09:43 +0000 | [diff] [blame] | 9 | AC_PROG_CC |
Miklos Szeredi | 97c61e9 | 2001-11-07 12:09:43 +0000 | [diff] [blame] | 10 | |
Miklos Szeredi | e518374 | 2005-02-02 11:14:04 +0000 | [diff] [blame] | 11 | # compatibility for automake < 1.8 |
Miklos Szeredi | c6f5bb4 | 2004-05-27 10:29:19 +0000 | [diff] [blame] | 12 | if test -z "$mkdir_p"; then |
Miklos Szeredi | 3a11e5c | 2004-05-27 10:43:18 +0000 | [diff] [blame] | 13 | mkdir_p="../mkinstalldirs" |
Miklos Szeredi | e518374 | 2005-02-02 11:14:04 +0000 | [diff] [blame] | 14 | AC_SUBST(mkdir_p) |
Miklos Szeredi | c6f5bb4 | 2004-05-27 10:29:19 +0000 | [diff] [blame] | 15 | fi |
| 16 | |
Miklos Szeredi | b3f9972 | 2005-11-16 13:00:24 +0000 | [diff] [blame] | 17 | case $target_os in |
| 18 | *linux*) arch=linux;; |
| 19 | *bsd*) arch=bsd;; |
| 20 | *) arch=unknown;; |
| 21 | esac |
| 22 | |
Miklos Szeredi | 079db8d | 2005-09-08 14:05:58 +0000 | [diff] [blame] | 23 | if test "$ac_env_CFLAGS_set" != set; then |
Miklos Szeredi | f6e0ec6 | 2005-08-03 09:11:06 +0000 | [diff] [blame] | 24 | CFLAGS="-Wall -W -g -O2" |
| 25 | fi |
Miklos Szeredi | e045109 | 2006-01-27 11:19:51 +0000 | [diff] [blame] | 26 | CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26" |
Miklos Szeredi | 97c61e9 | 2001-11-07 12:09:43 +0000 | [diff] [blame] | 27 | |
Roland Bauerschmidt | 45c7019 | 2002-04-08 09:16:25 +0000 | [diff] [blame] | 28 | AC_ARG_ENABLE(kernel-module, |
Miklos Szeredi | 51ec103 | 2004-11-10 11:52:26 +0000 | [diff] [blame] | 29 | [ --enable-kernel-module Compile kernel module ]) |
Roland Bauerschmidt | 45c7019 | 2002-04-08 09:16:25 +0000 | [diff] [blame] | 30 | AC_ARG_ENABLE(lib, |
| 31 | [ --enable-lib Compile with library ]) |
| 32 | AC_ARG_ENABLE(util, |
| 33 | [ --enable-util Compile with util ]) |
| 34 | AC_ARG_ENABLE(example, |
| 35 | [ --enable-example Compile with examples ]) |
Miklos Szeredi | 3520093 | 2005-09-28 14:50:49 +0000 | [diff] [blame] | 36 | AC_ARG_ENABLE(mtab, |
| 37 | [ --disable-mtab Disable and ignore usage of /etc/mtab ]) |
Miklos Szeredi | 97c61e9 | 2001-11-07 12:09:43 +0000 | [diff] [blame] | 38 | |
Miklos Szeredi | b3f9972 | 2005-11-16 13:00:24 +0000 | [diff] [blame] | 39 | AC_ARG_WITH(pkgconfigdir, |
| 40 | [ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@], |
| 41 | [pkgconfigdir=$withval], |
| 42 | [pkgconfigdir='${libdir}/pkgconfig']) |
| 43 | AC_SUBST(pkgconfigdir) |
| 44 | |
Miklos Szeredi | 51ec103 | 2004-11-10 11:52:26 +0000 | [diff] [blame] | 45 | subdirs2="include" |
Miklos Szeredi | 5f05481 | 2002-12-03 18:45:21 +0000 | [diff] [blame] | 46 | |
Miklos Szeredi | b3f9972 | 2005-11-16 13:00:24 +0000 | [diff] [blame] | 47 | if test "$arch" = linux -a "$enable_kernel_module" != "no"; then |
Miklos Szeredi | 51ec103 | 2004-11-10 11:52:26 +0000 | [diff] [blame] | 48 | AC_CONFIG_SUBDIRS(kernel) |
Roland Bauerschmidt | 45c7019 | 2002-04-08 09:16:25 +0000 | [diff] [blame] | 49 | fi |
| 50 | |
| 51 | if test "$enable_lib" != "no"; then |
Miklos Szeredi | 51ec103 | 2004-11-10 11:52:26 +0000 | [diff] [blame] | 52 | subdirs2="$subdirs2 lib"; |
Roland Bauerschmidt | 45c7019 | 2002-04-08 09:16:25 +0000 | [diff] [blame] | 53 | fi |
Miklos Szeredi | b3f9972 | 2005-11-16 13:00:24 +0000 | [diff] [blame] | 54 | if test "$arch" = linux -a "$enable_util" != "no"; then |
Miklos Szeredi | 51ec103 | 2004-11-10 11:52:26 +0000 | [diff] [blame] | 55 | subdirs2="$subdirs2 util"; |
Roland Bauerschmidt | 45c7019 | 2002-04-08 09:16:25 +0000 | [diff] [blame] | 56 | fi |
| 57 | if test "$enable_example" != "no"; then |
Miklos Szeredi | 51ec103 | 2004-11-10 11:52:26 +0000 | [diff] [blame] | 58 | subdirs2="$subdirs2 example"; |
Roland Bauerschmidt | 45c7019 | 2002-04-08 09:16:25 +0000 | [diff] [blame] | 59 | fi |
Miklos Szeredi | 3520093 | 2005-09-28 14:50:49 +0000 | [diff] [blame] | 60 | if test "$enable_mtab" = "no"; then |
| 61 | AC_DEFINE(IGNORE_MTAB, 1, [Don't update /etc/mtab]) |
| 62 | fi |
Miklos Szeredi | b3f9972 | 2005-11-16 13:00:24 +0000 | [diff] [blame] | 63 | AC_CHECK_FUNCS([fork setxattr fdatasync]) |
Miklos Szeredi | cb26451 | 2004-06-23 18:52:50 +0000 | [diff] [blame] | 64 | AC_CHECK_MEMBERS([struct stat.st_atim]) |
Miklos Szeredi | 03cebae | 2004-03-31 10:19:18 +0000 | [diff] [blame] | 65 | |
Miklos Szeredi | 320abe4 | 2006-01-30 18:14:51 +0000 | [diff] [blame] | 66 | libfuse_libs=-lpthread |
Csaba Henk | dcce3e5 | 2006-02-10 06:22:15 +0000 | [diff] [blame] | 67 | LIBS= |
| 68 | AC_SEARCH_LIBS(clock_gettime, [rt]) |
Miklos Szeredi | d65cdfe | 2006-02-15 14:25:17 +0000 | [diff] [blame] | 69 | libfuse_libs="$libfuse_libs $LIBS" |
Miklos Szeredi | 320abe4 | 2006-01-30 18:14:51 +0000 | [diff] [blame] | 70 | LIBS= |
Miklos Szeredi | 320abe4 | 2006-01-30 18:14:51 +0000 | [diff] [blame] | 71 | AC_SUBST(libfuse_libs) |
| 72 | |
Miklos Szeredi | bfb9946 | 2005-07-26 11:07:55 +0000 | [diff] [blame] | 73 | if test -z "$MOUNT_FUSE_PATH"; then |
| 74 | MOUNT_FUSE_PATH=/sbin |
| 75 | fi |
| 76 | AC_SUBST(MOUNT_FUSE_PATH) |
Miklos Szeredi | d51fca1 | 2005-09-15 12:51:00 +0000 | [diff] [blame] | 77 | if test -z "$UDEV_RULES_PATH"; then |
| 78 | UDEV_RULES_PATH=/etc/udev/rules.d |
| 79 | fi |
| 80 | AC_SUBST(UDEV_RULES_PATH) |
Miklos Szeredi | bfb9946 | 2005-07-26 11:07:55 +0000 | [diff] [blame] | 81 | |
Miklos Szeredi | 51ec103 | 2004-11-10 11:52:26 +0000 | [diff] [blame] | 82 | AC_SUBST(subdirs2) |
Miklos Szeredi | 97c61e9 | 2001-11-07 12:09:43 +0000 | [diff] [blame] | 83 | |
Miklos Szeredi | b3f9972 | 2005-11-16 13:00:24 +0000 | [diff] [blame] | 84 | AM_CONDITIONAL(LINUX, test "$arch" = linux) |
| 85 | AM_CONDITIONAL(BSD, test "$arch" = bsd) |
| 86 | |
Miklos Szeredi | b9b94cd | 2004-12-01 18:56:39 +0000 | [diff] [blame] | 87 | AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile]) |
Miklos Szeredi | db1c365 | 2004-11-08 21:11:53 +0000 | [diff] [blame] | 88 | AC_OUTPUT |