diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-07 18:43:23 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-07 18:43:23 +0000 |
commit | fb020ac61b1e457de7a44492bb05a84515828ac7 (patch) | |
tree | 5dfdcae592d25251c11068cec8e8b1186de865b0 /configure | |
parent | e08e53c9398700309000c6e6b7ff895185d567a9 (diff) | |
parent | c32f492758759c04d8b6239a7862648c9d32c4d8 (diff) |
Merging in mainline, including improved away/status stuff.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 55 |
1 files changed, 44 insertions, 11 deletions
@@ -269,7 +269,7 @@ EOF detect_ldap() { - TMPFILE=`mktemp` + TMPFILE=$(mktemp) if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then cat<<EOF>>Makefile.settings EFLAGS+=-lldap @@ -284,6 +284,43 @@ EOF fi } +RESOLV_TESTCODE=' +#include <arpa/nameser.h> +#include <resolv.h> + +int main() +{ + ns_initparse( NULL, 0, NULL ); + ns_parserr( NULL, ns_s_an, 0, NULL ); +} +' + +detect_resolv_dynamic() +{ + echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -lresolv >/dev/null 2>/dev/null + if [ "$?" = "0" ]; then + echo 'EFLAGS+=-lresolv' >> Makefile.settings + return 0 + fi + + return 1 +} + +detect_resolv_static() +{ + for i in $systemlibdirs; do + if [ -f $i/libresolv.a ]; then + echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null + if [ "$?" = "0" ]; then + echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings + return 0 + fi + fi + done + + return 1 +} + if [ "$ssl" = "auto" ]; then detect_gnutls if [ "$ret" = "0" ]; then @@ -325,11 +362,11 @@ elif [ "$ssl" = "bogus" ]; then echo 'Using bogus SSL code. This means some features will not work properly.' ## Yes, you, at the console! How can you authenticate if you don't have any SSL!? - if [ "$msn" = "1" ]; then + if [ "$msn" = "1" -o "$yahoo" = "1" ]; then echo - echo 'Real SSL support is necessary for MSN authentication, will build without' - echo 'MSN protocol support.' + echo 'WARNING: The MSN and Yahoo! modules will not work without SSL. Disabling.' msn=0 + yahoo=0 fi ret=1 @@ -351,13 +388,9 @@ fi; echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings -for i in $systemlibdirs; do - if [ -f $i/libresolv.a ]; then - echo '#define HAVE_RESOLV_A' >> config.h - echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings - break - fi -done +if detect_resolv_dynamic || detect_resolv_static; then + echo '#define HAVE_RESOLV_A' >> config.h +fi STORAGES="text xml" |