diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 35 | 
1 files changed, 35 insertions, 0 deletions
| @@ -27,6 +27,7 @@ yahoo=1  debug=0  strip=1  ipv6=1 +ldap=auto  ssl=auto  arch=`uname -s` @@ -63,6 +64,8 @@ Option		Description				Default  --ipv6=0/1	IPv6 socket support			$ipv6 +--ldap=0/1/auto	LDAP support				$ldap +  --ssl=...	SSL library to use (gnutls, nss, openssl, bogus, auto)  							$ssl  EOF @@ -202,6 +205,20 @@ EOF  	fi;  } +detect_ldap() +{ +	if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG ldb; then +		cat<<EOF>>Makefile.settings +EFLAGS+=`$PKG_CONFIG --libs ldb` +CFLAGS+=`$PKG_CONFIG --cflags ldb` +EOF +		ldap=1 +		ret=1 +	else +		ret=0 +	fi +} +  if [ "$msn" = 1 -o "$jabber" = 1 ]; then  	if [ "$ssl" = "auto" ]; then  		detect_gnutls @@ -262,6 +279,18 @@ if [ "$msn" = 1 -o "$jabber" = 1 ]; then  	echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings  fi +if [ "$ldap" = "auto" ]; then +	detect_ldap +fi + +if [ "$ldap" = 0 ]; then +	echo "LDAP_OBJ=\# no ldap" >> Makefile.settings +	echo "#undef LDAP" >> config.h +elif [ "$ldap" = 1 ]; then +	echo "#define LDAP 1" >> config.h +	echo "LDAP_OBJ=storage_ldap.o" >> Makefile.settings +fi +  if [ "$strip" = 0 ]; then  	echo "STRIP=\# skip strip" >> Makefile.settings;  else @@ -415,3 +444,9 @@ if [ -n "$protocols" ]; then  else  	echo '  Building without IM-protocol support. We wish you a lot of fun...';  fi + +if [ "$ldap" = "0" ]; then +	echo "  LDAP storage backend disabled." +else +	echo "  LDAP storage backend enabled." +fi | 
