[Date Prev][Date Next] [Chronological] [Thread] [Top]

LDFLAGS=-L/dir/with/old/ldap breaks openldap

If LDFLAGS given to configure contains an older version of libldap/liblber,
that version instead of the newly built openldap libraries are linked.

'make dtest' in liblber uses this command to link, where {CC} and so on
are the env.  variables given to configure and {top_builddir} is the
source directory:

/bin/sh {top_builddir}/libtool --mode=link {CC} -g -O2
        -I../../include -I../../include {CPPFLAGS} -DHAVE_CONFIG_H
        {LDFLAGS} -version-info 0:0:0 {LDFLAGS}
        -o dtest dtest.o
        -llber -lresolv -lgen -lnsl -lsocket 

The -L{top_builddir}/libraries should be somewhere in front of the first

CPPFLAGS, on the other hand, are handled in the right order:

{CC} -g -O2 -I../../include -I../../include {CPPFLAGS}
     -DHAVE_CONFIG_H -c dtest.c