Changeset fb87924


Ignore:
Timestamp:
2014-07-24T03:51:08Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
72721cd
Parents:
f93fd2d
git-author:
Jason Copenhaver <jcopenha@…> (24-07-14 03:51:08)
git-committer:
dequis <dx@…> (24-07-14 03:51:08)
Message:

fix latest HAS_NAMESER code on cygwin, mac and openbsd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    rf93fd2d rfb87924  
    369369        ns_rr rr;
    370370
    371         ns_initparse( NULL, 0, NULL );
    372         ns_parserr( NULL, ns_s_an, 0, NULL );
     371        /* Not all platforms we want to work on have
     372         ns_* routines, so use this to make sure
     373         the compiler uses it.*/
     374        return (int)(sizeof(nsh) + sizeof(rr));
    373375}
    374376'
     
    458460detect_nameser_has_ns_types()
    459461{
    460         TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
    461         case "$arch" in
    462         FreeBSD )
    463                 # In FreeBSD ns_ routines are present in libc.so
    464                 LIBRESOLV=;;
    465         * )
    466                 LIBRESOLV=-lresolv;;
    467         esac
    468         ret=1
    469     if detect_resolv_ns_dynamic; then
    470             echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c $LIBRESOLV -  >/dev/null 2>/dev/null
    471         if [ "$?" = "0" ]; then
    472             ret=0
    473         fi
    474     elif detect_resolv_ns_static; then
    475             for i in $systemlibdirs; do
    476                     if [ -f $i/libresolv.a ]; then
    477                             echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c -  >/dev/null 2>/dev/null
    478                     if [ "$?" = "0" ]; then
    479                         ret=0
    480                     fi
    481                     fi
    482             done
     462    TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
     463    ret=1
     464    # since we aren't actually linking with ns_* routines
     465    # we can just compile the test code
     466    echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c -  >/dev/null 2>/dev/null
     467    if [ "$?" = "0" ]; then
     468        ret=0
    483469    fi
    484470
    485         rm -f $TMPFILE
    486         return $ret
     471    rm -f $TMPFILE
     472    return $ret
    487473}
    488474
Note: See TracChangeset for help on using the changeset viewer.