This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure.ac
96 lines (76 loc) · 2.49 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
AC_INIT([mod_token_binding],[1.1.0],[[email protected]])
AC_SUBST(NAMEVER, AC_PACKAGE_TARNAME()-AC_PACKAGE_VERSION())
# This section defines the --with-apxs2 option.
AC_ARG_WITH(
[apxs2],
[ --with-apxs2=PATH Full path to the apxs2 executable.],
[
APXS2=${withval}
],)
if test "x$APXS2" = "x"; then
# The user didn't specify the --with-apxs2-option.
# Search for apxs2 in the specified directories
AC_PATH_PROG(APXS2, apxs2,,
/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
if test "x$APXS2" = "x"; then
# Didn't find apxs2 in any of the specified directories.
# Search for apxs instead.
AC_PATH_PROG(APXS2, apxs,,
/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
fi
fi
# Test if $APXS2 exists and is an executable.
if test ! -x "$APXS2"; then
# $APXS2 isn't a executable file.
AC_MSG_ERROR([
Could not find apxs2. Please specify the path to apxs2
using the --with-apxs2=/full/path/to/apxs2 option.
The executable may also be named 'apxs'.
])
fi
# Replace any occurrences of @APXS2@ with the value of $APXS2 in the Makefile.
AC_SUBST(APXS2)
# Use environment variable APXS2_OPTS to pass params to APXS2 command
AC_ARG_VAR(APXS2_OPTS, [Additional command line options to pass to apxs2.])
PKG_CHECK_MODULES(APR, [apr-1, apr-util-1])
AC_SUBST(APR_CFLAGS)
AC_SUBST(APR_LIBS)
HAVE_OPENSSL=0
AC_ARG_WITH(openssl,
[ --with-openssl=PATH location of your OpenSSL 1.1.x installation])
if test -n "$with_openssl"
then
OPENSSL_CFLAGS="-I$with_openssl/include"
OPENSSL_LIBS="-L$with_openssl/lib -lssl -lcrypto"
CPPFLAGS="$OPENSSL_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS([openssl/ssl.h], , [HAVE_OPENSSL=0])
LDFLAGS="$OPENSSL_LIBS $LDFLAGS"
AC_CHECK_LIB([ssl], [OPENSSL_init_ssl], [HAVE_OPENSSL=1], [HAVE_OPENSSL=0])
if test "x$have_openssl" = "x0" ; then
AC_MSG_WARN("cannot find library for -lssl.")
fi
else
PKG_CHECK_MODULES(OPENSSL, openssl)
fi
AC_SUBST(HAVE_OPENSSL)
AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LIBS)
AC_MSG_CHECKING([for Token Bind library])
AC_ARG_WITH(
[token-binding],
[ --with-token-binding=PATH Full path to the token binding library.],
[
TOKEN_BINDING=${withval}
],)
if test ! -d "$TOKEN_BINDING"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([
Could not find Token Bind. Please specify the path to Token Bind
using the --with-token-binding=/full/path/to/token_bind option.
])
fi
AC_MSG_RESULT([yes])
AC_SUBST(TOKEN_BINDING)
# Create Makefile from Makefile.in
AC_CONFIG_FILES([Makefile])
AC_OUTPUT