diff options
| author | Jason Copenhaver <jcopenha@typedef.org> | 2014-07-24 00:51:08 -0300 | 
|---|---|---|
| committer | dequis <dx@dxzone.com.ar> | 2014-07-24 00:51:08 -0300 | 
| commit | fb8792474ad6dce88732d43969459717dc718648 (patch) | |
| tree | 15568ac6504e715c3e82241071f9ac3942664059 | |
| parent | f93fd2db1e8a4c2671ccae3cb9311ff47d4ba7e0 (diff) | |
fix latest HAS_NAMESER code on cygwin, mac and openbsd
| -rwxr-xr-x | configure | 40 | 
1 files changed, 13 insertions, 27 deletions
| @@ -368,8 +368,10 @@ int main()  	ns_msg nsh;  	ns_rr rr; -	ns_initparse( NULL, 0, NULL ); -	ns_parserr( NULL, ns_s_an, 0, NULL ); +	/* Not all platforms we want to work on have +	 ns_* routines, so use this to make sure +	 the compiler uses it.*/ +	return (int)(sizeof(nsh) + sizeof(rr));  }  ' @@ -457,33 +459,17 @@ detect_resolv_ns_static()  detect_nameser_has_ns_types()  { -	TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) -	case "$arch" in -	FreeBSD ) -		# In FreeBSD ns_ routines are present in libc.so -		LIBRESOLV=;; -	* ) -		LIBRESOLV=-lresolv;; -	esac -	ret=1 -    if detect_resolv_ns_dynamic; then -	    echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c $LIBRESOLV -  >/dev/null 2>/dev/null -        if [ "$?" = "0" ]; then -            ret=0 -        fi -    elif detect_resolv_ns_static; then -	    for i in $systemlibdirs; do -		    if [ -f $i/libresolv.a ]; then -			    echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c -  >/dev/null 2>/dev/null -                    if [ "$?" = "0" ]; then -                        ret=0 -                    fi -		    fi -	    done +    TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) +    ret=1 +    # since we aren't actually linking with ns_* routines +    # we can just compile the test code +    echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c -  >/dev/null 2>/dev/null +    if [ "$?" = "0" ]; then +        ret=0      fi -	rm -f $TMPFILE -	return $ret +    rm -f $TMPFILE +    return $ret  }  if [ "$ssl" = "auto" ]; then | 
