1 | AC_INIT(curlftpfs, 0.9.1) |
---|
2 | AM_INIT_AUTOMAKE |
---|
3 | AM_CONFIG_HEADER(config.h) |
---|
4 | |
---|
5 | AC_PROG_CC |
---|
6 | AC_PROG_CPP |
---|
7 | AC_PROG_INSTALL |
---|
8 | AC_PROG_LN_S |
---|
9 | AC_PROG_MAKE_SET |
---|
10 | AC_PROG_LIBTOOL |
---|
11 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH |
---|
12 | |
---|
13 | PKG_CHECK_MODULES(GLIB, [glib-2.0]) |
---|
14 | PKG_CHECK_MODULES(FUSE, [fuse >= 2.2]) |
---|
15 | |
---|
16 | LIBCURL_CHECK_CONFIG([yes], [7.15.2], [], [AC_MSG_ERROR(["libcurl not found"])]) |
---|
17 | if test "$libcurl_protocol_FTP" != yes; then |
---|
18 | AC_MSG_ERROR(["We need libcurl with support for FTP protocol."]) |
---|
19 | fi |
---|
20 | |
---|
21 | CFLAGS="$CFLAGS -Wall -W -D_REENTRANT $GLIB_CFLAGS $FUSE_CFLAGS $LIBCURL_CPPFLAGS" |
---|
22 | LIBS="$GLIB_LIBS $FUSE_LIBS $LIBCURL" |
---|
23 | |
---|
24 | have_fuse_opt_parse=no |
---|
25 | AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes]) |
---|
26 | |
---|
27 | # Checks for header files. |
---|
28 | AC_HEADER_STDC |
---|
29 | AC_CHECK_HEADERS([fcntl.h netinet/in.h stdint.h stdlib.h string.h unistd.h]) |
---|
30 | |
---|
31 | # Checks for typedefs, structures, and compiler characteristics. |
---|
32 | AC_C_CONST |
---|
33 | AC_TYPE_UID_T |
---|
34 | AC_C_INLINE |
---|
35 | AC_TYPE_MODE_T |
---|
36 | AC_TYPE_OFF_T |
---|
37 | AC_TYPE_SIZE_T |
---|
38 | AC_CHECK_MEMBERS([struct stat.st_blksize]) |
---|
39 | AC_STRUCT_ST_BLOCKS |
---|
40 | AC_CHECK_MEMBERS([struct stat.st_rdev]) |
---|
41 | AC_HEADER_TIME |
---|
42 | AC_STRUCT_TM |
---|
43 | AC_TYPE_UINT32_T |
---|
44 | AC_TYPE_UINT64_T |
---|
45 | AC_TYPE_UINT8_T |
---|
46 | |
---|
47 | # Checks for library functions. |
---|
48 | AC_FUNC_CHOWN |
---|
49 | AC_FUNC_MALLOC |
---|
50 | AC_FUNC_MKTIME |
---|
51 | AC_FUNC_REALLOC |
---|
52 | AC_FUNC_SELECT_ARGTYPES |
---|
53 | AC_FUNC_STRFTIME |
---|
54 | AC_FUNC_UTIME_NULL |
---|
55 | AC_CHECK_FUNCS([ftruncate getpass memmove memset mkdir realpath rmdir select strchr strdup strrchr strstr strtoull utime]) |
---|
56 | |
---|
57 | # Check for iconv |
---|
58 | AM_ICONV |
---|
59 | |
---|
60 | if test "$have_fuse_opt_parse" = no; then |
---|
61 | CFLAGS="$CFLAGS -Icompat -I../compat" |
---|
62 | fi |
---|
63 | AM_CONDITIONAL(FUSE_OPT_COMPAT, test "$have_fuse_opt_parse" = no) |
---|
64 | |
---|
65 | AC_CONFIG_FILES([Makefile compat/Makefile tests/Makefile doc/Makefile]) |
---|
66 | AC_OUTPUT |
---|