Commit 0eef3411 authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

- Switch to AC_SEARCH_LIBS to check multiple libraries for mod_auth_db

  (the AC_* way of doing what Martin committed)

- Fix the configuration check for mod_auth_digest so that:
  - Everything is on separate lines so that the preprocessor doesn't scream
  - It adds the path to APR.  (APR_SOURCE_DIR looks right, but I'm not sure.)

By the time the modules are configured, the CPPFLAGS and such are not
setup to point at APR.  This should probably be rectified and then this
can be taken out - so you could assume that apr.h is in your CPPFLAGS
somewhere when configuring the modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90392 13f79535-47bb-0310-9956-ffa450edef68
parent 246cd5ff
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -11,16 +11,18 @@ APACHE_MODULE(auth_dbm, DBM-based access databases, , , most)

APACHE_MODULE(auth_db, DB-based access databases, , , , [
  AC_CHECK_HEADERS(db.h,,enable_auth_db=no)
  AC_CHECK_LIB(c,dbopen,,enable_auth_db=yes)
  if test x"$enable_auth_db" = x"no"; then
    AC_CHECK_LIB(db,dbopen,,enable_auth_db=no)
  fi
  AC_SEARCH_LIBS(dbopen,[c db],,enable_auth_db=no)
]) 

APACHE_MODULE(auth_digest, RFC2617 Digest authentication, , , most, [
  _old_cppflags=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$APR_SOURCE_DIR/include"
  AC_TRY_COMPILE([#include <apr.h>], 
                 [#if !APR_HAS_RANDOM #error You need APR random support to use auth_digest. #endif],,
                 [#if !APR_HAS_RANDOM 
                  #error You need APR random support to use auth_digest. 
                  #endif],,
                 enable_auth_digest=no)
  CPPFLAGS=$_old_cppflags
])

APACHE_MODULE(auth_ldap, LDAP based authentication, , , no)