You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dennis Lundberg <de...@mdh.se> on 2003/10/03 19:28:19 UTC

[users@httpd] Can't configure httpd 2.0.45+ and auth_ldap with ldaps support using Netscape SDK

Hi All

I'm trying to compile Apache httpd 2.0.47 with auth_ldap using the 
Netscape SDK. From what I understand this is the only way to get ldaps 
support.

Here is the deal. I've compiled this successfully before using Netscape 
SDK 4.14 with httpd 2.0.44-. Can't remember the exact version. So I feel 
confident that I have the correct options for configure. When I Googled 
for answers I found some info that something changed in httpd at around 
2.0.45 that might be the cause of our problems.

Problem
-------
We've narrowed it down to apr-util. When the configure script for 
apr-util is called it produces the following warnings:

  checking ldap_ssl.h usability... no
  checking ldap_ssl.h presence... yes
  configure: WARNING: ldap_ssl.h: present but cannot be compiled
  configure: WARNING: ldap_ssl.h: check for missing prerequisite headers?
  configure: WARNING: ldap_ssl.h: proceeding with the preprocessor's
   result
  checking for ldap_ssl.h... yes

The configure script continues and exits without errors, but when I try 
to compile - it won't compile. As you can see configure has concluded 
that ldap_ssl.h is present but not usable. Not a good sign.

By the way this happens with both 4.14 and 5.08 of the Netscape SDK. 
After digging into the internals of the Netscape SDK we found that 
ldap_ssl.h is dependant on ldap.h, but it doesn't actually include it 
directly. They leave that as an excercise for the users I guess :-)

So there are two ways to fix this.

Fix 1
-----
Add the following lines to the top of the file include/ldap_ssl.h in the 
Netscape SDK.

  #ifndef _LDAP_H
  #include "ldap.h"
  #endif

Fix 2
-----
Alter the configure script for apr-util. Now I must confess that I am 
not a master when it comes to configure-scripts, so bear with me here. I 
realize that the file configure is generated in some way by autoconf. 
However we have not been able to find a suitable place in configure.in 
to apply a cure. We have managed to apply a rather crude fix to the 
configure file itself, that makes things work.

Alter this section in the configure file:

  for ac_header in ldap_ssl.h
  ...
  #include "confdefs.h"
  $ac_includes_default
  #include <$ac_header>
  _ACEOF

so that it looks like this

  for ac_header in ldap_ssl.h
  ...
  #include "confdefs.h"
  $ac_includes_default
  #include <ldap.h>
  #include <$ac_header>
  _ACEOF

As I said I am unable to provide a patch-file for this but I hope that 
someone else can use this information and create a suitable patch.

To make sure that this has not been fixed I also downloaded apr and 
apr-util nightlies (20031001101908) and the problem is still there.

Environment
-----------
Solaris 8 on Sparc
Netscape SDK: ldapcsdk4.14, ldapcsdk5.08
Apache httpd: 2.0.45, 2.0.47
apr & apr-util: 20031001101908
autoconf 2.54
m4 1.4
gcc 3.3

configure options
-----------------
./configure \
   --prefix=/www/httpd-2.0.47 \
   --disable-ipv6 \
   --with-mpm=prefork \
   --enable-mods-shared=most \
   --enable-ssl=shared \
   --enable-ldap=shared \
   --enable-auth-ldap=shared \
   --with-ldap \
   --with-ldap-include=/usr/local/ldapcsdk/include \
   --with-ldap-lib=/usr/local/ldapcsdk/lib

-- 
Dennis Lundberg



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org