-
Notifications
You must be signed in to change notification settings - Fork 55
/
configure.ac
51 lines (43 loc) · 1.89 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([hubicfuse], [3.0.0], [Pascal Obry <[email protected]>])
AC_SUBST(CPPFLAGS, "$CPPFLAGS -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2")
AC_LANG([C])
AC_CONFIG_SRCDIR([cloudfuse.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MKDIR_P
# Checks that pkg-config is installed
PKG_PROG_PKG_CONFIG
# Checks for libraries.
PKG_CHECK_MODULES(XML, libxml-2.0, , AC_MSG_ERROR('Unable to find libxml2. Please make sure library and header files are installed.'))
PKG_CHECK_MODULES(CURL, libcurl, , AC_MSG_ERROR('Unable to find libcurl. Please make sure library and header files are installed.'))
PKG_CHECK_MODULES(FUSE, fuse, , AC_MSG_ERROR('Unable to find libfuse. Please make sure library and header files are installed.'))
PKG_CHECK_MODULES(JSON, json-c, ,
PKG_CHECK_MODULES(JSON, json, , AC_MSG_ERROR('Unable to find libjson. Please make sure library and header files are installed.')))
PKG_CHECK_MODULES(OPENSSL, openssl, , [])
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdint.h stddef.h stdlib.h string.h strings.h sys/time.h unistd.h pthread.h fuse.h curl/curl.h libxml/tree.h])
AC_CHECK_HEADER([openssl/crypto.h], AC_DEFINE([HAVE_OPENSSL], [], [Openssl headers were found]), , [])
AC_CHECK_HEADER([magic.h], , AC_MSG_ERROR('Unable to find libmagic headers. Please make sure header files are installed.'))
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_STRUCT_ST_BLOCKS
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([ftruncate memmove strcasecmp strchr strdup strncasecmp strrchr strstr])
AC_OUTPUT