diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 64 |
1 files changed, 52 insertions, 12 deletions
@@ -157,7 +157,7 @@ else fi echo CFLAGS=$CFLAGS >> Makefile.settings -echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings +echo CFLAGS+=-I`pwd` -iquote`pwd`/lib -iquote`pwd`/protocols -I. >> Makefile.settings echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings @@ -268,7 +268,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 @@ -283,6 +283,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 @@ -324,11 +361,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 @@ -350,13 +387,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" @@ -434,6 +467,12 @@ else echo '#undef WITH_OTR' >> config.h fi +if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; then + echo + echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.' + echo 'Install xmlto if you want online help to work.' +fi + echo if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then nick=`bzr nick` @@ -519,6 +558,7 @@ GNU/* ) *BSD ) ;; Darwin ) + echo 'STRIP=\# skip strip' >> Makefile.settings ;; IRIX ) ;; |