forked from AnthonyDeroche/mod_authnz_jwt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
70 lines (56 loc) · 1.91 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
AC_INIT([mod_authnz_jwt], [0.8], [[email protected]])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE()
AC_CONFIG_MACRO_DIR([acinclude.d])
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LANG_CPLUSPLUS
AC_CANONICAL_HOST
AC_PROG_INSTALL
AM_PROG_LIBTOOL
AC_HEADER_STDC
# provide flag --enable-debug
AC_ARG_ENABLE([debug],
[ --enable-debug Enable debugging output to Apache error log],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],[debug=false])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
# this will look for apxs command - put it in $APXS, fail on failure
AX_WITH_APXS()
# find apr-config binary
AC_ARG_WITH(apr_config, AC_HELP_STRING([[--with-apr-config=FILE]], [Path to apr-config program]),
[ apr_config="$withval" ],
[AC_PATH_PROGS(apr_config,
[apr-config apr-0-config apr-1-config],
[no],
[$PATH:/usr/sbin/:/usr/local/apache2/bin]
)]
)
if test "$apr_config" = "no"; then
AC_MSG_ERROR(Could not find the apr-config program. You can specify a location with the --with-apr-config=FILE option. It may be named apr-0-config or apr-1-config and can be found in your apache2 bin directory.)
fi
$apr_config --cppflags &> /dev/null
if test "$?" != "0"; then
AC_MSG_ERROR($apr_config is not a valid apr-config program)
fi
APR_LDFLAGS="`${apr_config} --link-ld --libs`"
AC_SUBST(APR_LDFLAGS)
APACHE_CFLAGS="-I`${APXS} -q INCLUDEDIR` -I`${apr_config} --includedir`"
AC_SUBST(APACHE_CFLAGS)
PKG_CHECK_MODULES([JWT], [libjwt >= 1.7])
PKG_CHECK_MODULES([JANSSON], [jansson >= 2.0])
PKG_CHECK_MODULES([Z], [zlib])
# Idea taken from libopekele
nitpick=false
AC_ARG_ENABLE([nitpicking],
AC_HELP_STRING([--enable-nitpicking],[make compiler warn about possible problems]),
[ test "$enableval" = "no" || nitpick=true ]
)
AM_CONDITIONAL(NITPICK, test x$nitpick = xtrue)
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT