466 lines
9.3 KiB
Plaintext
466 lines
9.3 KiB
Plaintext
$NetBSD: patch-configure,v 1.5 2014/04/08 13:23:31 fhajny Exp $
|
|
|
|
Fix compile vs. link tests, portability.
|
|
|
|
--- configure.orig 2014-02-09 11:52:52.000000000 +0000
|
|
+++ configure
|
|
@@ -15921,7 +15921,7 @@ if test "x$ac_cv_prog_cc_c99" != xno; th
|
|
fi
|
|
|
|
|
|
-if test "x${ac_cv_prog_cc_c99}" == "xno"; then :
|
|
+if test "x${ac_cv_prog_cc_c99}" = "xno"; then :
|
|
as_fn_error $? "No c99 compatible compiler found" "$LINENO" 5
|
|
fi
|
|
|
|
@@ -26560,15 +26560,15 @@ else
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
|
|
+int *p;
|
|
int
|
|
main ()
|
|
{
|
|
-
|
|
- ;
|
|
+ return *p;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -26632,7 +26632,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -26688,15 +26688,17 @@ else
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
|
|
+int f;
|
|
+
|
|
int
|
|
main ()
|
|
{
|
|
-
|
|
+ ++f;
|
|
;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -26752,15 +26754,17 @@ else
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
|
|
+#include <stdlib.h>
|
|
+
|
|
int
|
|
main ()
|
|
{
|
|
-
|
|
- ;
|
|
+ int *p = malloc(sizeof(int));
|
|
+ return *p;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -26824,7 +26828,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -26888,7 +26892,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -26953,7 +26957,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27018,7 +27022,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27083,7 +27087,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27147,7 +27151,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27211,7 +27215,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27275,7 +27279,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27339,7 +27343,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27403,7 +27407,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27468,7 +27472,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27523,16 +27527,19 @@ else
|
|
CFLAGS="$CFLAGS -Werror $flag"
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
+#include <unistd.h>
|
|
|
|
int
|
|
main ()
|
|
{
|
|
-
|
|
- ;
|
|
+ int i = 0;
|
|
+ while (sleep(1))
|
|
+ ++i;
|
|
+ return i;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27596,7 +27603,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27660,7 +27667,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27725,7 +27732,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -27790,7 +27797,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
|
+if ac_fn_c_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -31967,16 +31974,16 @@ else
|
|
CXXFLAGS="$CXXFLAGS -Werror $flag"
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
+int *p;
|
|
|
|
int
|
|
main ()
|
|
{
|
|
-
|
|
- ;
|
|
+ return *p;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32042,7 +32049,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32098,15 +32105,17 @@ else
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
|
|
+int f;
|
|
+
|
|
int
|
|
main ()
|
|
{
|
|
|
|
- ;
|
|
+ ++f;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32165,12 +32174,12 @@ else
|
|
int
|
|
main ()
|
|
{
|
|
-
|
|
- ;
|
|
+ int *p = new int;
|
|
+ return *p;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32234,7 +32243,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32298,7 +32307,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32362,7 +32371,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32426,7 +32435,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32490,7 +32499,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32554,7 +32563,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32618,7 +32627,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32682,7 +32691,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32746,7 +32755,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32810,7 +32819,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32874,7 +32883,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -32929,16 +32938,19 @@ else
|
|
CXXFLAGS="$CXXFLAGS -Werror $flag"
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
+#include <unistd.h>
|
|
|
|
int
|
|
main ()
|
|
{
|
|
-
|
|
- ;
|
|
+ int i = 0;
|
|
+ while (sleep(1))
|
|
+ ++i;
|
|
+ return i;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -33002,7 +33014,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -33066,7 +33078,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -33131,7 +33143,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|
|
@@ -33195,7 +33207,7 @@ main ()
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
eval "$as_CACHEVAR=yes"
|
|
else
|
|
eval "$as_CACHEVAR=no"
|