-
Notifications
You must be signed in to change notification settings - Fork 14
/
configure.ac
42 lines (33 loc) · 1.32 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
AC_INIT([mod_oauth2],[4.0.0],[[email protected]])
AM_INIT_AUTOMAKE([foreign no-define subdir-objects])
AC_CONFIG_MACRO_DIRS([m4])
LT_INIT([dlopen])
AC_PROG_CC
AX_CODE_COVERAGE
AC_ARG_WITH([apache], AS_HELP_STRING([--with-apache], [build with Apache support [default=autodetect]]),)
AC_ARG_WITH([apxs],
[AS_HELP_STRING([--with-apxs=PATH/NAME],[path to the apxs binary for Apache [[apxs]]])],
[AC_SUBST(APXS, $with_apxs)],
[AC_PATH_PROGS(APXS, [apxs2 apxs])])
if test "x$with_apache" != "xno"; then
PKG_CHECK_MODULES([APR], [apr-1, apr-util-1], [have_apache="yes"], [have_apache="no"])
AS_IF([test "x${APXS}" != "x" -a -x "${APXS}"],
[AC_MSG_NOTICE([apxs found at $APXS])],
[AC_MSG_FAILURE(["apxs not found. Use --with-apxs"])])
APACHE_CFLAGS="`${APXS} -q CFLAGS` `${APXS} -q EXTRA_CPPFLAGS` -I`${APXS} -q INCLUDEDIR` ${APR_CFLAGS}"
fi
AM_CONDITIONAL(HAVE_APACHE, [test x"$have_apache" = "xyes"])
AC_SUBST(APR_LIBS)
AC_SUBST(APACHE_CFLAGS)
AC_ARG_VAR(APXS_OPTS, [additional command line options to pass to apxs])
PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 2.0.0])
AC_SUBST(OAUTH2_CFLAGS)
AC_SUBST(OAUTH2_LIBS)
PKG_CHECK_MODULES(OAUTH2_APACHE, [liboauth2_apache >= 2.0.0])
AC_SUBST(OAUTH2_APACHE_CFLAGS)
AC_SUBST(OAUTH2_APACHE_LIBS)
# Create Makefile from Makefile.in
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT