docker-engine: new package
[buildroot-gz.git] / package / screen / 0003-cross-compilation-AC_TRY_RUN.patch
blobeafe3d5ad150897a962fb9e37b0f697bb9ebdec3
1 From: Maarten ter Huurne <maarten@treewalker.org>
2 Date: Sat, 13 Sep 2014 12:04:41 +0200
3 Subject: Provide cross compilation alternatives for all AC_TRY_RUN uses
5 Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
6 [Ricardo: rebase on top of 4.3.1]
7 Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
8 ---
9 configure.ac | 30 +++++++++++++++++++-----------
10 1 file changed, 19 insertions(+), 11 deletions(-)
12 diff --git a/configure.ac b/configure.ac
13 index b8e3bec..c4b7cd4 100644
14 --- a/configure.ac
15 +++ b/configure.ac
16 @@ -348,7 +348,8 @@ main()
17 exit(0);
19 ], AC_NOTE(- your fifos are usable) fifo=1,
20 -AC_NOTE(- your fifos are not usable))
21 +AC_NOTE(- your fifos are not usable),
22 +AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
23 rm -f /tmp/conftest*
25 if test -n "$fifo"; then
26 @@ -396,7 +397,8 @@ main()
27 exit(0);
29 ], AC_NOTE(- your implementation is ok),
30 -AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
31 +AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
32 +AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
33 rm -f /tmp/conftest*
36 @@ -458,7 +460,8 @@ main()
37 exit(0);
39 ], AC_NOTE(- your sockets are usable) sock=1,
40 -AC_NOTE(- your sockets are not usable))
41 +AC_NOTE(- your sockets are not usable),
42 +AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
43 rm -f /tmp/conftest*
45 if test -n "$sock"; then
46 @@ -497,7 +500,8 @@ main()
48 ],AC_NOTE(- you are normal),
49 AC_NOTE(- unix domain sockets are not kept in the filesystem)
50 -AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
51 +AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
52 +AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
53 rm -f /tmp/conftest*
56 @@ -624,7 +628,8 @@ main()
57 exit(0);
59 ],AC_NOTE(- select is ok),
60 -AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
61 +AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
62 +AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
64 dnl
65 dnl **** termcap or terminfo ****
66 @@ -666,7 +671,8 @@ main()
68 exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
69 }], AC_NOTE(- you use the termcap database),
70 -AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
71 +AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
72 +AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
73 AC_CHECKING(ospeed)
74 AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
76 @@ -801,7 +807,8 @@ main()
77 else
78 AC_NOTE(- can't determine - assume ptys are world accessable)
80 - ]
81 + ],
82 + AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
84 rm -f conftest_grp
86 @@ -885,7 +892,7 @@ AC_EGREP_CPP(yes,
87 #endif
88 ], load=1)
90 -if test -z "$load" ; then
91 +if test -z "$load" && test "$cross_compiling" = no ; then
92 AC_CHECKING(for kernelfile)
93 for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
94 if test -f $core || test -c $core; then
95 @@ -1078,7 +1085,7 @@ main()
96 #endif
97 exit(0);
99 -],,AC_DEFINE(SYSVSIGS))
100 +],,AC_DEFINE(SYSVSIGS),:)
104 @@ -1158,7 +1165,7 @@ main() {
105 if (strncmp(buf, "cdedef", 6))
106 exit(1);
107 exit(0); /* libc version works properly. */
108 -}], AC_DEFINE(USEBCOPY))
109 +}], AC_DEFINE(USEBCOPY),,:)
111 AC_TRY_RUN([
112 #define bcopy(s,d,l) memmove(d,s,l)
113 @@ -1173,7 +1180,8 @@ main() {
114 if (strncmp(buf, "cdedef", 6))
115 exit(1);
116 exit(0); /* libc version works properly. */
117 -}], AC_DEFINE(USEMEMMOVE))
118 +}], AC_DEFINE(USEMEMMOVE),,
119 + AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
121 AC_SYS_LONG_FILE_NAMES
124 1.8.4.5