-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
120 lines (105 loc) · 3.27 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
AC_INIT([quicsy], [0.1], [[email protected]])
AC_PROG_CC
AC_PROG_CXX([g++])
LT_INIT([dlopen])
LT_CONFIG_LTDL_DIR([libltdl])
LTDL_INIT([recursive])
# Checks for programs
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
# Checks for header files.
AC_CHECK_HEADERS([ \
arpa/inet.h \
netinet/in.h \
stddef.h \
stdint.h \
stdlib.h \
string.h \
unistd.h \
sys/endian.h \
endian.h \
])
AC_CONFIG_FILES([Makefile
third-party/Makefile
include/Makefile
include/quicsy/Makefile
src/Makefile])
AC_CONFIG_SRCDIR([src/quicsy.cc])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([subdir-objects])
AC_SUBST(LT_CURRENT, 0)
AC_SUBST(LT_REVISION, 0)
AC_SUBST(LT_AGE, 0)
AC_SUBST(CRYPTO_OPENSSL_LT_CURRENT, 0)
AC_SUBST(CRYPTO_OPENSSL_LT_REVISION, 0)
AC_SUBST(CRYPTO_OPENSSL_LT_AGE, 0)
# openssl (for examples)
PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.1.1],
[have_openssl=yes], [have_openssl=no])
if test "x${have_openssl}" = "xno"; then
AC_MSG_NOTICE($OPENSSL_PKG_ERRORS)
fi
AM_CONDITIONAL([HAVE_OPENSSL], [ test "x${have_openssl}" = "xyes" ])
# libnghttp3 (for examples)
PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 0.0.0],
[have_libnghttp3=yes], [have_libnghttp3=no])
if test "${have_libnghttp3}" = "xno"; then
AC_MSG_NOTICE($LIBNGHTTP3_PKG_ERRORS)
fi
AM_CONDITIONAL([HAVE_NGHTTP3], [ test "x${have_libnghttp3}" = "xyes" ])
# libev (for examples)
# libev does not have pkg-config file. Check it in an old way.
save_LIBS=$LIBS
# android requires -lm for floor
AC_CHECK_LIB([ev], [ev_time], [have_libev=yes], [have_libev=no], [-lm])
if test "x${have_libev}" = "xyes"; then
AC_CHECK_HEADER([ev.h], [have_libev=yes], [have_libev=no])
if test "x${have_libev}" = "xyes"; then
LIBEV_LIBS=-lev
LIBEV_CFLAGS=
AC_SUBST([LIBEV_LIBS])
AC_SUBST([LIBEV_CFLAGS])
fi
fi
LIBS=$save_LIBS
CXXFLAGS="$CXXFLAGS -std=c++17"
AC_OUTPUT
AC_MSG_NOTICE([summary of build options:
Package version: ${VERSION}
Library version: $LT_CURRENT:$LT_REVISION:$LT_AGE
Install prefix: ${prefix}
System types:
Build: ${build}
Host: ${host}
Target: ${target}
Compiler:
C preprocessor: ${CPP}
CPPFLAGS: ${CPPFLAGS}
C compiler: ${CC}
CFLAGS: ${CFLAGS}
C++ compiler: ${CXX}
CXXFLAGS: ${CXXFLAGS}
LDFLAGS: ${LDFLAGS}
WARNCFLAGS: ${WARNCFLAGS}
WARNCXXFLAGS: ${WARNCXXFLAGS}
EXTRACFLAG: ${EXTRACFLAG}
LIBS: ${LIBS}
Library:
Shared: ${enable_shared}
Static: ${enable_static}
Crypto helper libraries:
libngtcp2_crypto_openssl: ${have_openssl}
Test:
CUnit: ${have_cunit} (CFLAGS='${CUNIT_CFLAGS}' LIBS='${CUNIT_LIBS}')
Debug:
Debug: ${debug} (CFLAGS='${DEBUGCFLAGS}')
Libs:
OpenSSL: ${have_openssl} (CFLAGS='${OPENSSL_CFLAGS}' LIBS='${OPENSSL_LIBS}')
Libev: ${have_libev} (CFLAGS='${LIBEV_CFLAGS}' LIBS='${LIBEV_LIBS}')
Libngtcp2: ${have_libngtcp2} (CFLAGS='${LIBNGTCP@_CFLAGS}' LIBS='${LIBNGTCP2_LIBS}')
Libnghttp3: ${have_libnghttp3} (CFLAGS='${LIBNGHTTP3_CFLAGS}' LIBS='${LIBNGHTTP3_LIBS}')
])