-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
56 lines (48 loc) · 1.35 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.67])
AC_INIT([mod_vhost_ldap_n],[1.1.x])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([mod_vhost_ldap_ng.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lldap_r':
AC_CHECK_LIB([ldap_r], [main])
AC_ARG_ENABLE([php], [ --enable-php enable mod_php options],
[php=${enableval}], [php=no])
if test "x${php}" = xyes; then
PHP="-DHAVEPHP"
fi
AC_ARG_ENABLE([debug], [ --enable-debug enable debugging symbols],
[debug=${enableval}], [debug=no])
if test "x${debug}" = xyes; then
DEBUG="-Wc,-g"
else
DEBUG="-Wc,-O3"
fi
AC_ARG_WITH([apxs-path],
[AS_HELP_STRING([--with-apxs-path], [Apxs Path])],
[APXSPATH=$withval],
[])
if test "x${APXSPATH}" = "x"; then
AC_CHECK_PROGS(APXS, [apxs2 apxs], ["no"])
else
AC_CHECK_PROGS(APXS, [apxs2 apxs], ["no"], [$APXSPATH])
APXS=$APXSPATH"/"$APXS
fi
if test "${APXS}" = no;then
AC_MSG_ERROR("No APXS found")
fi
AC_SUBST(APXS)
AC_SUBST(PHP)
AC_SUBST(DEBUG)
# Checks for header files.
AC_CHECK_HEADERS([unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CHECK_FUNCS([memset strcasecmp strchr])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT