Changeset c289b6f for configure


Ignore:
Timestamp:
2009-11-19T23:00:56Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e5e795d
Parents:
c48a033 (diff), 36cf9fd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging in head. I want to roll a 1.2.4-2 that fixes the libresolv issues.
Having the include files fixed is a nice extra.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    rc48a033 rc289b6f  
    267267detect_ldap()
    268268{
    269         TMPFILE=`mktemp`
     269        TMPFILE=$(mktemp)
    270270        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
    271271                cat<<EOF>>Makefile.settings
     
    280280                ret=0
    281281        fi
     282}
     283
     284RESOLV_TESTCODE='
     285#include <arpa/nameser.h>
     286#include <resolv.h>
     287
     288int main()
     289{
     290        ns_initparse( NULL, 0, NULL );
     291        ns_parserr( NULL, ns_s_an, 0, NULL );
     292}
     293'
     294
     295detect_resolv_dynamic()
     296{
     297        echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -lresolv >/dev/null 2>/dev/null
     298        if [ "$?" = "0" ]; then
     299                echo 'EFLAGS+=-lresolv' >> Makefile.settings
     300                return 0
     301        fi
     302
     303        return 1
     304}
     305
     306detect_resolv_static()
     307{
     308        for i in $systemlibdirs; do
     309                if [ -f $i/libresolv.a ]; then
     310                        echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null
     311                        if [ "$?" = "0" ]; then
     312                                echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings
     313                                return 0
     314                        fi
     315                fi
     316        done
     317
     318        return 1
    282319}
    283320
     
    349386echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    350387
    351 for i in $systemlibdirs; do
    352         if [ -f $i/libresolv.a ]; then
    353                 echo '#define HAVE_RESOLV_A' >> config.h
    354                 echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings
    355                 break
    356         fi
    357 done
     388if detect_resolv_dynamic || detect_resolv_static; then
     389        echo '#define HAVE_RESOLV_A' >> config.h
     390fi
    358391
    359392STORAGES="text xml"
Note: See TracChangeset for help on using the changeset viewer.