aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch
blob: 248bf087e2bd775f8a228cefea44c653f47b1894 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
From cd0f7f10a3fffbc60fe55eb200474d13fe1da65b Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Fri, 7 Aug 2015 10:34:29 +0300
Subject: [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN

Modified from patch by Maarten ter Huurne.

Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 configure.ac | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 27690a6..ce89f56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -348,7 +348,8 @@ main()
   exit(0);
 }
 ], AC_NOTE(- your fifos are usable) fifo=1,
-AC_NOTE(- your fifos are not usable))
+AC_NOTE(- your fifos are not usable),
+AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
 rm -f /tmp/conftest*
 
 if test -n "$fifo"; then
@@ -396,7 +397,8 @@ main()
   exit(0);
 }
 ], AC_NOTE(- your implementation is ok), 
-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
+AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
+AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
 rm -f /tmp/conftest*
 fi
 
@@ -458,7 +460,8 @@ main()
   exit(0);
 }
 ], AC_NOTE(- your sockets are usable) sock=1,
-AC_NOTE(- your sockets are not usable))
+AC_NOTE(- your sockets are not usable),
+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
 rm -f /tmp/conftest*
 
 if test -n "$sock"; then
@@ -497,7 +500,8 @@ main()
 }
 ],AC_NOTE(- you are normal),
 AC_NOTE(- unix domain sockets are not kept in the filesystem)
-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
+AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
 rm -f /tmp/conftest*
 fi
 
@@ -624,7 +628,8 @@ main()
   exit(0);
 }
 ],AC_NOTE(- select is ok),
-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
+AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
 
 dnl
 dnl    ****  termcap or terminfo  ****
@@ -666,7 +671,8 @@ main()
 {
  exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
 }], AC_NOTE(- you use the termcap database),
-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
+AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
+AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
 AC_CHECKING(ospeed)
 AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
 
@@ -801,7 +807,8 @@ main()
     else
       AC_NOTE(- can't determine - assume ptys are world accessable)
     fi
-  ]
+  ],
+  AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
 )
 rm -f conftest_grp
 fi
@@ -885,7 +892,7 @@ AC_EGREP_CPP(yes,
 #endif
 ], load=1)
 fi
-if test -z "$load" ; then
+if test -z "$load" && test "$cross_compiling" = no ; then
 AC_CHECKING(for kernelfile)
 for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
   if test -f $core || test -c $core; then
@@ -1078,7 +1085,7 @@ main()
 #endif
   exit(0);
 }
-],,AC_DEFINE(SYSVSIGS))
+],,AC_DEFINE(SYSVSIGS),:)
 
 fi
 
@@ -1158,7 +1165,7 @@ main() {
   if (strncmp(buf, "cdedef", 6))
     exit(1);
   exit(0); /* libc version works properly.  */
-}], AC_DEFINE(USEBCOPY))
+}], AC_DEFINE(USEBCOPY),,:)
 
 AC_TRY_RUN([
 #define bcopy(s,d,l) memmove(d,s,l)
@@ -1173,7 +1180,8 @@ main() {
   if (strncmp(buf, "cdedef", 6))
     exit(1);
   exit(0); /* libc version works properly.  */
-}], AC_DEFINE(USEMEMMOVE))
+}], AC_DEFINE(USEMEMMOVE),,
+  AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
 
 
 AC_TRY_RUN([
@@ -1189,7 +1197,7 @@ main() {
   if (strncmp(buf, "cdedef", 6))
     exit(1);
   exit(0); /* libc version works properly.  */
-}], AC_DEFINE(USEMEMCPY))
+}], AC_DEFINE(USEMEMCPY),,:)
 
 AC_SYS_LONG_FILE_NAMES
 
-- 
2.1.4