diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-07 21:37:27 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-07 21:37:27 +0000 | 
| commit | aee8c19adbaffb8fe189c626d7e188e5ea008b0d (patch) | |
| tree | e21a9a649f2097a2c96a158924268a89639ea5d2 /configure | |
| parent | b041b521c8b347c4660b0920f17b92b9c1484f49 (diff) | |
Fix libresolv detection on FreeBSD. Based on a patch by ashish@FreeBSD.org.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 13 | 
1 files changed, 11 insertions, 2 deletions
| @@ -325,6 +325,8 @@ EOF  }  RESOLV_TESTCODE=' +#include <sys/types.h> +#include <netinet/in.h>  #include <arpa/nameser.h>  #include <resolv.h>  @@ -337,11 +339,18 @@ int main()  detect_resolv_dynamic()  { +	case "$arch" in +	FreeBSD ) +		# In FreeBSD res_* routines are present in libc.so +		LIBRESOLV=;; +	* ) +		LIBRESOLV=-lresolv;; +	esac  	TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)  	ret=1 -	echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -lresolv >/dev/null 2>/dev/null +	echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null  	if [ "$?" = "0" ]; then -		echo 'EFLAGS+=-lresolv' >> Makefile.settings +		echo "EFLAGS+=$LIBRESOLV" >> Makefile.settings  		ret=0  	fi | 
