source: FTPfs/sshfs-fuse-1.9/configure.ac @ 90

Last change on this file since 90 was 10, checked in by zsjheng, 17 years ago
File size: 1.5 KB
RevLine 
[10]1AC_INIT(sshfs-fuse, 1.9)
2AM_INIT_AUTOMAKE
3AM_CONFIG_HEADER(config.h)
4
5AC_PROG_CC
6AM_PROG_CC_C_O
7CFLAGS="$CFLAGS -Wall -W"
8LIBS=
9AC_SEARCH_LIBS(dlsym, [dl])
10sshnodelay_libs=$LIBS
11AC_SUBST(sshnodelay_libs)
12LIBS=
13
14AC_ARG_ENABLE(sshnodelay,
15  [  --disable-sshnodelay    Don't compile NODELAY workaround for ssh])
16
17if 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
31fi
32
33if test "$enable_sshnodelay" != "no"; then
34  AC_DEFINE(SSH_NODELAY_WORKAROUND, 1, [Compile ssh NODELAY workaround])
35fi
36
37AM_CONDITIONAL(SSH_NODELAY_SO, test "$enable_sshnodelay" != "no")
38
39export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
40PKG_CHECK_MODULES(SSHFS, [fuse >= 2.2 glib-2.0 gthread-2.0])
41have_fuse_opt_parse=no
42oldlibs="$LIBS"
43LIBS="$LIBS $SSHFS_LIBS"
44AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes])
45LIBS="$oldlibs"
46if test "$have_fuse_opt_parse" = no; then
47  CFLAGS="$CFLAGS -Icompat"
48fi
49AM_CONDITIONAL(FUSE_OPT_COMPAT, test "$have_fuse_opt_parse" = no)
50
51AC_CONFIG_FILES([Makefile])
52AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.