aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libudns/configure.patch
blob: b39e298dba6ac1328aa5d649c63199eafc1b26e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff --git a/configure b/configure
index dda98b3..5594bf3 100755
--- a/configure
+++ b/configure
@@ -26,7 +26,7 @@ enable() {
   opt=`echo "$1" | sed 's/^--[^-]*-//'`
   case "$opt" in
     ipv6) ;;
-    *) echo "configure: unrecognized option \`$1'" >&2; exit 1;;
+    *) echo "configure: unrecognized option \`$1'" >&2; opt=unused;;
   esac
   eval enable_$opt=$2
 }
@@ -50,11 +50,14 @@ Optional features (all enabled by default if system supports a feature):
 EOF
       exit 0
       ;;
-    *) echo "configure: unknown option \`$1'" >&2; exit 1 ;;
+    *) echo "configure: unknown option \`$1'" >&2;;
   esac
   shift
 done
 
+CC="$CC $CPPFLAGS"
+export CC
+
 . ./configure.lib
 
 ac_msg "configure"
@@ -75,7 +78,8 @@ int main(int argc, char **argv) {
 EOF
 
 if ac_library_find_v 'socket and connect' "" "-lsocket -lnsl" <<EOF
-int main() { socket(); connect(); return 0; }
+#include <sys/socket.h>
+int main() { socket(0,0,0); connect(0,0,0); return 0; }
 EOF
 then :
 else
diff --git a/configure.lib b/configure.lib
index 541177a..672c082 100644
--- a/configure.lib
+++ b/configure.lib
@@ -125,7 +125,7 @@ ac_prog_c_compiler_v() {
   echo 'int main(int argc, char **argv) { return 0; }' >conftest.c
 
   if [ -n "$CC" ]; then
-    if ac_run $CC -o conftest conftest.c && ac_run ./conftest; then
+    if ac_run $CC -o conftest conftest.c && true ac_run ./conftest; then
       ac_result "\$CC ($CC)"
     else
       ac_result no
@@ -224,7 +224,7 @@ ac_library_find_v() {
 }
 
 ac_compile_run() {
-  ac_link "$@" && ac_run ./conftest
+  ac_link "$@" && true ac_run ./conftest
 }
 
 ac_grep_cpp() {