1 | |
---|
2 | $FreeBSD$ |
---|
3 | |
---|
4 | --- configure.orig |
---|
5 | +++ configure |
---|
6 | @@ -319,6 +319,11 @@ |
---|
7 | } |
---|
8 | |
---|
9 | RESOLV_TESTCODE=' |
---|
10 | +#ifdef __FreeBSD__ |
---|
11 | +#include <sys/types.h> |
---|
12 | +#include <netinet/in.h> |
---|
13 | +#endif |
---|
14 | + |
---|
15 | #include <arpa/nameser.h> |
---|
16 | #include <resolv.h> |
---|
17 | |
---|
18 | @@ -329,13 +334,18 @@ |
---|
19 | } |
---|
20 | ' |
---|
21 | |
---|
22 | +LIBRESOLV=-lresolv |
---|
23 | + |
---|
24 | +# In FreeBSD res_* routines are present in libc.so |
---|
25 | +[ "$arch" = FreeBSD ] && LIBRESOLV= |
---|
26 | + |
---|
27 | detect_resolv_dynamic() |
---|
28 | { |
---|
29 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
30 | ret=1 |
---|
31 | - echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -lresolv >/dev/null 2>/dev/null |
---|
32 | + echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null |
---|
33 | if [ "$?" = "0" ]; then |
---|
34 | - echo 'EFLAGS+=-lresolv' >> Makefile.settings |
---|
35 | + echo "EFLAGS+=$LIBRESOLV" >> Makefile.settings |
---|
36 | ret=0 |
---|
37 | fi |
---|
38 | |
---|