summaryrefslogtreecommitdiff
path: root/math/R/patches/patch-m4_R.m4
blob: 579988965f2b5a35db3decf5ea1ef33b6340df4f (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
$NetBSD: patch-m4_R.m4,v 1.1 2017/10/06 20:47:37 rumko Exp $

Ensure tests for clog & co. fail, not just emit warning

--- m4/R.m4.orig	2017-01-05 23:15:05.000000000 +0000
+++ m4/R.m4
@@ -226,7 +226,7 @@ if test -z "${texi2any_version_maj}" \
 elif test ${texi2any_version_maj} -gt 5; then
   r_cv_prog_texi2any_v5=yes
 elif test ${texi2any_version_maj} -lt 5 \
-     || test ${texi2any_version_min} -lt 1; then
+     || test ${texi2any_version_maj} = 5 -a ${texi2any_version_min} -lt 1; then
   r_cv_prog_texi2any_v5=no
 else
   r_cv_prog_texi2any_v5=yes
@@ -1015,6 +1015,9 @@ ${F77} ${FFLAGS} -c conftestf.f 1>&AS_ME
 
 extern void F77_SYMBOL(cftest)(int *a, int *b, double *x, double *y);
 
+int MAIN_ () { return 0; }
+int MAIN__ () { return 0; }
+
 int main () {
   int a[3] = {17, 237, 2000000000}, b[2], res = 0;
   double x[3] = {3.14159265, 123.456789, 2.3e34}, z[3];
@@ -1107,6 +1110,9 @@ typedef struct {
 
 extern void F77_SYMBOL(cftest)(Rcomplex *x);
 
+int MAIN_ () { return 0; }
+int MAIN__ () { return 0; }
+
 int main () {
     Rcomplex z[3];
 
@@ -3639,9 +3645,9 @@ R_CHECK_FUNCS([cabs carg cexp clog csqrt
 AC_DEFUN([R_CHECK_DECL],
 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
 AC_CACHE_CHECK([whether $1 exists and is declared], ac_Symbol,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
-[#ifndef $1
-  char *p = (char *) $1;
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])
+#ifndef $1
+char *p = (char *) $1;
 #endif
 ])],
                    [AS_VAR_SET(ac_Symbol, yes)],