[Date Prev][Date Next]
Re: (ITS#3982) libldap compile settings
At 12:26 PM 9/3/2005, firstname.lastname@example.org wrote:
>Kurt D. Zeilenga wrote:
>> I note the same problem you have in determining the dependencies
>> of -lldap/-lldap, we would have in determining dependendencies of
>> -lsasl, -lssl, and various other libraries we might depend on.
>> Without a sasl_config, ssl_config, and other such scripts for
>> these dependencies, or autoconf detection of their dependencies,
>> I think any openldap_config script we would provide would be broken.
>> I vaguely recall having this discussion before.
>Indeed it is very difficult to write a m4 script for autoconf for the
>reasons you have given: it's a lot of work to check the dependancy's
>However, the ldap-config script works differently. When building the
>openldap binaries, we know somehow the compile options for the local
>setup: either detected by autoconf or provided on the command
>line. (otherwise the build would fail) Therefore if you save these
>options in the ldap-config script, you can build later other programs
>with the libldap, too.
Sorry, but generally no. Generally, we detect (or env is
provided) for dynamic linking. For instance, we likely
only know that -lsasl links in SASL using some provided
-L's (and/or whatever), but we don't know what libraries
-lsasl might dynamically link in. If, like you, the
user wants to statically link in -lldap, then -lsasl
and its dependencies will also need to be statically
linked in. Using -lsasl and those -L's (and/or whatever)
simply won't cut it.
Also, there is no guarantee (*) that the client developer is
using the same compiler tool chain as was used to build
ldap libraries. That can cause all kinds of problems.
(* given that we use a custom libtool, one can argue
its guaranteed that the -lldap installer is using a
different build environment/tool chain...)
I note that your script assumes that the complier tool
chain accepts -I/..., that's actually a bad assumption.
There are certainly compiler tool chains for POSIX
-based (or -like) systems which don't take -I's.
My point here not to ding this particular assumption,
but to ding the more general assumption that client
developer has a comparable environment/tool chain
to that used by the -lldap installer.
Personally, I have never found these scripts to be