Changeset 5973412


Ignore:
Timestamp:
2006-06-03T20:52:40Z (13 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
0025b51
Parents:
9779c18
Message:

Try to detect -lldap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r9779c18 r5973412  
    143143
    144144if [ -n "$CC" ]; then
    145         echo "CC=$CC" >> Makefile.settings;
     145        CC=$CC
    146146elif type gcc > /dev/null 2> /dev/null; then
    147         echo "CC=gcc" >> Makefile.settings;
     147        CC=gcc
    148148elif type cc > /dev/null 2> /dev/null; then
    149         echo "CC=cc" >> Makefile.settings;
     149        CC=cc
    150150else
    151151        echo 'Cannot find a C compiler, aborting.'
    152152        exit 1;
    153153fi
     154
     155echo "CC=$CC" >> Makefile.settings;
    154156
    155157if [ -n "$LD" ]; then
     
    208210detect_ldap()
    209211{
    210         if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG ldb; then
     212        TMPFILE=`mktemp`
     213        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
    211214                cat<<EOF>>Makefile.settings
    212 EFLAGS+=`$PKG_CONFIG --libs ldb`
    213 CFLAGS+=`$PKG_CONFIG --cflags ldb`
     215EFLAGS+=-lldap
     216CFLAGS+=
    214217EOF
    215218                ldap=1
     219                rm -f $TMPFILE
    216220                ret=1
    217221        else
     222                ldap=0
    218223                ret=0
    219224        fi
     
    286291if [ "$ldap" = 0 ]; then
    287292        echo "LDAP_OBJ=\# no ldap" >> Makefile.settings
    288         echo "#undef LDAP" >> config.h
     293        echo "#undef WITH_LDAP" >> config.h
    289294elif [ "$ldap" = 1 ]; then
    290         echo "#define LDAP 1" >> config.h
     295        echo "#define WITH_LDAP 1" >> config.h
    291296        echo "LDAP_OBJ=storage_ldap.o" >> Makefile.settings
    292297fi
Note: See TracChangeset for help on using the changeset viewer.