-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
106 lines (85 loc) · 2.03 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Autoconf
AC_PREREQ(2.59)
AC_INIT([fsmanifest],[1.0],[[email protected]])
AC_CONFIG_SRCDIR([src/fsmanifest.c])
# Environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
# Automake
AM_INIT_AUTOMAKE(no-dist-gzip dist-bzip2)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
# Options
# pthread_rwlock_t requires _GNU_SOURCE
AC_GNU_SOURCE
# Programs
AC_PROG_CC(gcc cc)
AM_PROG_CC_C_O
ifdef(
[LT_INIT],
[LT_INIT],
[AC_PROG_LIBTOOL]
)
AC_PROG_INSTALL
# Environment
# Libraries
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([ \
fcntl.h \
unistd.h \
])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_STRUCT_ST_BLOCKS
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_CHECK_MEMBERS([struct stat.st_atim])
AC_CHECK_MEMBERS([struct stat.st_atimespec])
AC_CHECK_MEMBERS([struct stat.st_atimensec])
# Checks for library functions.
AC_FUNC_STAT
AC_CHECK_FUNCS([ \
openat \
fdopendir \
statx \
])
AC_SYS_LARGEFILE
# Determine which library to use for SHA512 hashing.
case "${target_os}" in
darwin*)
# On macOS we use the built-in CommonCrypto. No flags needed.
;;
*)
# On other systems we use the OpenSSL library, which is located using
# pkg-config.
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "x${PKG_CONFIG}" = "xno"; then
AC_MSG_ERROR([Unable to locate pkg-config, needed for determining OpenSSL library parameters.])
fi
PKG_CHECK_MODULES(
[OPENSSL_MODULE],
[openssl],
[have_openssl="yes"],
[have_openssl="no"]
)
;;
esac
if test "$GCC" = "yes" ; then
# We add -Wall to enable some compiler warnings.
CFLAGS="${CFLAGS} -Wall"
fi
# Settings
AM_CONDITIONAL([WITH_OPENSSL], [test "x${have_openssl}" = "xyes"])
# generate files
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
echo "You can type now 'make' to build fsmanifest."