Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r574af7e r5973412  
    2828strip=1
    2929ipv6=1
     30ldap=auto
    3031ssl=auto
    3132
     
    6364
    6465--ipv6=0/1      IPv6 socket support                     $ipv6
     66
     67--ldap=0/1/auto LDAP support                            $ldap
    6568
    6669--ssl=...       SSL library to use (gnutls, nss, openssl, bogus, auto)
     
    140143
    141144if [ -n "$CC" ]; then
    142         echo "CC=$CC" >> Makefile.settings;
     145        CC=$CC
    143146elif type gcc > /dev/null 2> /dev/null; then
    144         echo "CC=gcc" >> Makefile.settings;
     147        CC=gcc
    145148elif type cc > /dev/null 2> /dev/null; then
    146         echo "CC=cc" >> Makefile.settings;
     149        CC=cc
    147150else
    148151        echo 'Cannot find a C compiler, aborting.'
    149152        exit 1;
    150153fi
     154
     155echo "CC=$CC" >> Makefile.settings;
    151156
    152157if [ -n "$LD" ]; then
     
    201206                ret=0;
    202207        fi;
     208}
     209
     210detect_ldap()
     211{
     212        TMPFILE=`mktemp`
     213        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
     214                cat<<EOF>>Makefile.settings
     215EFLAGS+=-lldap
     216CFLAGS+=
     217EOF
     218                ldap=1
     219                rm -f $TMPFILE
     220                ret=1
     221        else
     222                ldap=0
     223                ret=0
     224        fi
    203225}
    204226
     
    263285fi
    264286
     287if [ "$ldap" = "auto" ]; then
     288        detect_ldap
     289fi
     290
     291if [ "$ldap" = 0 ]; then
     292        echo "LDAP_OBJ=\# no ldap" >> Makefile.settings
     293        echo "#undef WITH_LDAP" >> config.h
     294elif [ "$ldap" = 1 ]; then
     295        echo "#define WITH_LDAP 1" >> config.h
     296        echo "LDAP_OBJ=storage_ldap.o" >> Makefile.settings
     297fi
     298
    265299if [ "$strip" = 0 ]; then
    266300        echo "STRIP=\# skip strip" >> Makefile.settings;
     
    416450        echo '  Building without IM-protocol support. We wish you a lot of fun...';
    417451fi
     452
     453if [ "$ldap" = "0" ]; then
     454        echo "  LDAP storage backend disabled."
     455else
     456        echo "  LDAP storage backend enabled."
     457fi
Note: See TracChangeset for help on using the changeset viewer.