-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.ac
95 lines (82 loc) · 2.31 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
dnl -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script.
dnl Semantic Versioning, http://semver.org
m4_define([zbox_version_major], [0])
m4_define([zbox_version_minor], [9])
m4_define([zbox_version_patch], [2])
AC_PREREQ([2.69])
AC_INIT([libzbox],
[zbox_version_major.zbox_version_minor.zbox_version_patch],
[https://github.com/zboxfs/zbox/issues],
[libzbox],
[https://github.com/zboxfs/zbox])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_SRCDIR([src/include/zbox.h])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
dnl ====================
dnl libtool init
dnl ====================
dnl turn on warning flags
CFLAGS="$CFLAGS -Wall -Werror -Wno-unused-function"
LT_INIT()
dnl ====================
dnl Checks for programs
dnl ====================
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC_C99
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
dnl =========================
dnl Checks for header files.
dnl =========================
AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stddef.h stdint.h stdlib.h string.h unistd.h getopt.h])
dnl ================================
dnl Checks for typedefs, structures,
dnl and compiler characteristics.
dnl ================================
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT8_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_CHECK_TYPES([ptrdiff_t])
dnl Define version variables
AC_SUBST(ZBOX_VERSION_MAJOR, zbox_version_major)
AC_SUBST(ZBOX_VERSION_MINOR, zbox_version_minor)
AC_SUBST(ZBOX_VERSION_PATCH, zbox_version_patch)
dnl ==============================
dnl Generate Makefiles and output
dnl ==============================
dnl Makefiles need to be generated
AC_CONFIG_FILES([ \
Makefile \
libzbox.pc \
src/include/Makefile \
src/include/zbox/version.h \
test/Makefile
])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE_NAME $VERSION
CC: ${CC}
CFLAGS: ${CFLAGS}
CXX: ${CXX}
CXXFLAGS: ${CXXFLAGS}
LDFLAGS: ${LDFLAGS}
LIBS: ${LIBS}
prefix: ${prefix}
sysconfdir: ${sysconfdir}
libdir: ${libdir}
includedir: ${includedir}
pkgconfigdir: ${pkgconfigdir}
])