[10] | 1 | AC_INIT(sshfs-fuse, 1.9) |
---|
| 2 | AM_INIT_AUTOMAKE |
---|
| 3 | AM_CONFIG_HEADER(config.h) |
---|
| 4 | |
---|
| 5 | AC_PROG_CC |
---|
| 6 | AM_PROG_CC_C_O |
---|
| 7 | CFLAGS="$CFLAGS -Wall -W" |
---|
| 8 | LIBS= |
---|
| 9 | AC_SEARCH_LIBS(dlsym, [dl]) |
---|
| 10 | sshnodelay_libs=$LIBS |
---|
| 11 | AC_SUBST(sshnodelay_libs) |
---|
| 12 | LIBS= |
---|
| 13 | |
---|
| 14 | AC_ARG_ENABLE(sshnodelay, |
---|
| 15 | [ --disable-sshnodelay Don't compile NODELAY workaround for ssh]) |
---|
| 16 | |
---|
| 17 | if test -z "$enable_sshnodelay"; then |
---|
| 18 | AC_MSG_CHECKING([OpenSSH version]) |
---|
| 19 | [eval `ssh -V 2>&1 | sed -n 's/^OpenSSH_\([1-9][0-9]*\)\.\([0-9][0-9]*\).*/ssh_major=\1 ssh_minor=\2/p'`] |
---|
| 20 | if test "x$ssh_major" != x -a "x$ssh_minor" != x; then |
---|
| 21 | if test $ssh_major -gt 4 -o \( $ssh_major = 4 -a $ssh_minor -ge 4 \); then |
---|
| 22 | AC_MSG_RESULT([$ssh_major.$ssh_minor >= 4.4, disabling NODELAY workaround]) |
---|
| 23 | enable_sshnodelay=no |
---|
| 24 | else |
---|
| 25 | AC_MSG_RESULT([$ssh_major.$ssh_minor < 4.4, enabling NODELAY workaround]) |
---|
| 26 | enable_sshnodelay=yes |
---|
| 27 | fi |
---|
| 28 | else |
---|
| 29 | AC_MSG_RESULT([not found]) |
---|
| 30 | fi |
---|
| 31 | fi |
---|
| 32 | |
---|
| 33 | if test "$enable_sshnodelay" != "no"; then |
---|
| 34 | AC_DEFINE(SSH_NODELAY_WORKAROUND, 1, [Compile ssh NODELAY workaround]) |
---|
| 35 | fi |
---|
| 36 | |
---|
| 37 | AM_CONDITIONAL(SSH_NODELAY_SO, test "$enable_sshnodelay" != "no") |
---|
| 38 | |
---|
| 39 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH |
---|
| 40 | PKG_CHECK_MODULES(SSHFS, [fuse >= 2.2 glib-2.0 gthread-2.0]) |
---|
| 41 | have_fuse_opt_parse=no |
---|
| 42 | oldlibs="$LIBS" |
---|
| 43 | LIBS="$LIBS $SSHFS_LIBS" |
---|
| 44 | AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes]) |
---|
| 45 | LIBS="$oldlibs" |
---|
| 46 | if test "$have_fuse_opt_parse" = no; then |
---|
| 47 | CFLAGS="$CFLAGS -Icompat" |
---|
| 48 | fi |
---|
| 49 | AM_CONDITIONAL(FUSE_OPT_COMPAT, test "$have_fuse_opt_parse" = no) |
---|
| 50 | |
---|
| 51 | AC_CONFIG_FILES([Makefile]) |
---|
| 52 | AC_OUTPUT |
---|