-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
78 lines (66 loc) · 2.19 KB
/
configure.ac
File metadata and controls
78 lines (66 loc) · 2.19 KB
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
AC_INIT([mod_cachebusting], [0.1], [ingo.walz@googlemail.com], [cachebusting], [])
AC_PREREQ([2.61])
AC_CONFIG_SRCDIR([mod_cachebusting.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_LANG([C])
AC_HEADER_STDC
AC_PROG_LIBTOOL
AM_INIT_AUTOMAKE([1.11 foreign])
# Checks for apxs
AC_ARG_WITH(apxs,
[AC_HELP_STRING([--with-apxs=PATH], [apxs path [default=yes]])],
[APXS_PATH="$withval"],
[APXS_PATH="/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"]
)
AC_PATH_PROG(APXS, apxs, no, ${APXS_PATH})
AS_IF([test "x${APXS}" = xno], AC_MSG_ERROR([apxs not found]),
[test "x${APXS}" = x], AC_MSG_ERROR([apxs not found])
)
APXS_CFLAGS=`${APXS} -q CFLAGS 2> /dev/null`
APXS_CPPFLAGS=`${APXS} -q CPPFLAGS 2> /dev/null`
APXS_LDFLAGS=`${APXS} -q LDFLAGS 2> /dev/null`
APXS_LIBS=`${APXS} -q LIBS 2> /dev/null`
APXS_LIBEXECDIR=`${APXS} -q LIBEXECDIR 2> /dev/null`
APXS_INCLUDEDIR=`${APXS} -q INCLUDEDIR 2> /dev/null`
APXS_INCLUDES="-I${APXS_INCLUDEDIR}"
# Checks for apr
AC_ARG_WITH(apr,
[AC_HELP_STRING([--with-apr=PATH], [apr config path [default=yes]])],
[APR_CONFIG="$withval"],
[with_apr=yes]
)
AC_MSG_CHECKING([whether apr])
AS_IF([test "x$with_apr" != xno],
[
if test ! -x "${APR_CONFIG}" -o -z "${APR_CONFIG}"; then
APR_PATH=`${APXS} -q APR_BINDIR 2> /dev/null`
APR_CONFIG="${APR_PATH}/apr-1-config"
if test ! -x "${APR_CONFIG}"; then
APR_CONFIG="${APR_PATH}/apr-config"
fi
fi
APR_INCLUDES=`${APR_CONFIG} --includes 2> /dev/null`
APR_CFLAGS=`${APR_CONFIG} --cflags 2> /dev/null`
APR_CPPFLAGS=`${APR_CONFIG} --cppflags 2> /dev/null`
APR_LDFLAGS=`${APR_CONFIG} --ldflags 2> /dev/null`
APR_LIBS=`${APR_CONFIG} --libs 2> /dev/null`
AC_MSG_RESULT(enable)
],
AC_MSG_RESULT(disable)
)
# Apache libraries
APACHE_MODULEDIR="${APXS_LIBEXECDIR}"
APACHE_INCLUDES="${APXS_INCLUDES} ${APR_INCLUDES}"
APACHE_CFLAGS="${APXS_CFLAGS} ${APR_CFLAGS}"
APACHE_CPPFLAGS="${APXS_CPPFLAGS} ${APR_CPPFLAGS}"
APACHE_LDFLAGS="${APXS_LDFLAGS} ${APR_LDFLAGS}"
APACHE_LIBS="${APXS_LIBS} ${APR_LIBS}"
AC_SUBST(APACHE_MODULEDIR)
AC_SUBST(APACHE_INCLUDES)
AC_SUBST(APACHE_CFLAGS)
AC_SUBST(APACHE_CPPFLAGS)
AC_SUBST(APACHE_LDFLAGS)
AC_SUBST(APACHE_LIBS)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT