configure.ac 1.7 KB

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