| Line | Revision | Contents |
| 1 | 1 | AC_INIT(mod_ldap_userdir.c) |
| 2 | ||
| 3 | 3 | AC_ARG_WITH(apxs, |
| 4 | 30 | [AS_HELP_STRING( |
| 5 | [--with-apxs], |
|
| 6 | [Path to Apache's apxs command (version 1.3.x or 2.0.x)] |
|
| 7 | )], |
|
| 8 | APXS=$withval) |
|
| 9 | 3 | AC_ARG_WITH(activate, |
| 10 | 30 | [AS_HELP_STRING( |
| 11 | [--with-activate], |
|
| 12 | [Activate mod_ldap_userdir in httpd.conf] |
|
| 13 | )], |
|
| 14 | test "$withval" != no && ACTIVATE=-a |
|
| 15 | ) |
|
| 16 | 12 | AC_ARG_WITH(sdk-headers, |
| 17 | 30 | [AS_HELP_STRING( |
| 18 | [--with-sdk-headers], |
|
| 19 | [Specify the path to the LDAP SDK header files] |
|
| 20 | )], |
|
| 21 | [CPPFLAGS="-I$withval"] |
|
| 22 | ) |
|
| 23 | 12 | AC_ARG_WITH(sdk-libdir, |
| 24 | 30 | [AS_HELP_STRING( |
| 25 | [--with-sdk-libdir], |
|
| 26 | [Specify the path to the LDAP SDK libraries] |
|
| 27 | )], |
|
| 28 | [LDFLAGS="-L$withval"] |
|
| 29 | ) |
|
| 30 | 3 | |
| 31 | AC_PROG_CC |
|
| 32 | dnl We need to reset CFLAGS after AC_PROG_CC sets it. apxs will provide |
|
| 33 | dnl its own CFLAGS and gets confused when we try to feed ours to it. |
|
| 34 | 12 | CFLAGS= |
| 35 | ||
| 36 | if test -z "$APXS" || test "$APXS" = yes; then |
|
| 37 | 30 | APXS=apxs |
| 38 | for location in /usr/local/apache/bin/apxs \ |
|
| 39 | /usr/local/apache2/bin/apxs /opt/csw/apache2/sbin/apxs; do |
|
| 40 | ||
| 41 | 12 | if test -e $location; then |
| 42 | APXS=$location |
|
| 43 | fi |
|
| 44 | done |
|
| 45 | 3 | fi |
| 46 | 1 | |
| 47 | AC_MSG_CHECKING(whether apxs works) |
|
| 48 | 30 | if $APXS -q CFLAGS >/dev/null; then |
| 49 | 1 | AC_MSG_RESULT(yes) |
| 50 | else |
|
| 51 | AC_MSG_RESULT(no) |
|
| 52 | AC_MSG_ERROR(Cannot build mod_ldap_userdir without a valid apxs program) |
|
| 53 | fi |
|
| 54 | ||
| 55 | 14 | # There must be a better way, but I've yet to find it. |
| 56 | 30 | if echo $APXS | fgrep apxs2 >/dev/null; then |
| 57 | 14 | TARGET=.libs/mod_ldap_userdir.so |
| 58 | 30 | elif echo $APXS | fgrep apache2 >/dev/null; then |
| 59 | 14 | TARGET=.libs/mod_ldap_userdir.so |
| 60 | else |
|
| 61 | TARGET=mod_ldap_userdir.so |
|
| 62 | fi |
|
| 63 | ||
| 64 | 3 | AC_CHECK_LIB(lber, ber_init) |
| 65 | 30 | AC_CHECK_LIB(ldap, ldap_init, |
| 66 | found_openldap_libs=yes; LIBS="-lldap $LIBS", |
|
| 67 | AC_MSG_ERROR(You must have libldap to build mod_ldap_userdir.) |
|
| 68 | ) |
|
| 69 | 12 | |
| 70 | AC_CHECK_HEADERS(lber.h, , |
|
| 71 | 30 | AC_MSG_ERROR(You must have lber.h to build mod_ldap_userdir.) |
| 72 | ) |
|
| 73 | 12 | AC_CHECK_HEADERS(ldap.h, , |
| 74 | AC_MSG_ERROR(You must have ldap.h to build mod_ldap_userdir.), |
|
| 75 | 30 | [#include <lber.h>] |
| 76 | ) |
|
| 77 | 12 | |
| 78 | 13 | AC_CHECK_MEMBER(LDAPURLDesc.lud_scheme, |
| 79 | [AC_DEFINE(HAVE_LDAPURLDESC_LUD_SCHEME, 1, [Define if your LDAPURLDesc has a lud_scheme member.])], , |
|
| 80 | [#include <lber.h> |
|
| 81 | #include <ldap.h>]) |
|
| 82 | ||
| 83 | 30 | AC_ARG_ENABLE([tls], |
| 84 | [AS_HELP_STRING( |
|
| 85 | [--disable-tls], |
|
| 86 | [Don't build with LDAP TLS support] |
|
| 87 | )], |
|
| 88 | [enable_tls=$enableval], |
|
| 89 | [enable_tls=yes] |
|
| 90 | ) |
|
| 91 | AS_IF([test "x$enable_tls" != xno], |
|
| 92 | [AC_CHECK_FUNC(ldap_start_tls_s, TLS=-DTLS)] |
|
| 93 | ) |
|
| 94 | 12 | |
| 95 | 14 | AC_SUBST(APXS TARGET) |
| 96 | AC_SUBST(CPPFLAGS LDFLAGS LIBS) |
|
| 97 | 5 | AC_SUBST(TLS ACTIVATE) |
| 98 | 13 | |
| 99 | AC_CONFIG_HEADER(config.h) |
|
| 100 | 1 | AC_OUTPUT(Makefile) |
Loggerhead 1.17 is a web-based interface for Bazaar branches