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>
7 configure.in | 30 +++++++++++++++++++-----------
8 1 file changed, 19 insertions(+), 11 deletions(-)
10 diff --git a/configure.in b/configure.in
11 index ff9606d..d53a079 100644
14 @@ -347,7 +347,8 @@ main()
17 ], AC_NOTE(- your fifos are usable) fifo=1,
18 -AC_NOTE(- your fifos are not usable))
19 +AC_NOTE(- your fifos are not usable),
20 +AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
23 if test -n "$fifo"; then
24 @@ -395,7 +396,8 @@ main()
27 ], AC_NOTE(- your implementation is ok),
28 -AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
29 +AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
30 +AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
34 @@ -457,7 +459,8 @@ main()
37 ], AC_NOTE(- your sockets are usable) sock=1,
38 -AC_NOTE(- your sockets are not usable))
39 +AC_NOTE(- your sockets are not usable),
40 +AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
43 if test -n "$sock"; then
44 @@ -496,7 +499,8 @@ main()
46 ],AC_NOTE(- you are normal),
47 AC_NOTE(- unix domain sockets are not kept in the filesystem)
48 -AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
49 +AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
50 +AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
54 @@ -623,7 +627,8 @@ main()
57 ],AC_NOTE(- select is ok),
58 -AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
59 +AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
60 +AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
63 dnl **** termcap or terminfo ****
64 @@ -665,7 +670,8 @@ main()
66 exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
67 }], AC_NOTE(- you use the termcap database),
68 -AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
69 +AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
70 +AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
72 AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
74 @@ -800,7 +806,8 @@ main()
76 AC_NOTE(- can't determine - assume ptys are world accessable)
80 + AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
84 @@ -884,7 +891,7 @@ AC_EGREP_CPP(yes,
88 -if test -z "$load" ; then
89 +if test -z "$load" && test "$cross_compiling" = no ; then
90 AC_CHECKING(for kernelfile)
91 for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
92 if test -f $core || test -c $core; then
93 @@ -1077,7 +1084,7 @@ main()
97 -],,AC_DEFINE(SYSVSIGS))
98 +],,AC_DEFINE(SYSVSIGS),:)
102 @@ -1157,7 +1164,7 @@ main() {
103 if (strncmp(buf, "cdedef", 6))
105 exit(0); /* libc version works properly. */
106 -}], AC_DEFINE(USEBCOPY))
107 +}], AC_DEFINE(USEBCOPY),,:)
110 #define bcopy(s,d,l) memmove(d,s,l)
111 @@ -1172,7 +1179,8 @@ main() {
112 if (strncmp(buf, "cdedef", 6))
114 exit(0); /* libc version works properly. */
115 -}], AC_DEFINE(USEMEMMOVE))
116 +}], AC_DEFINE(USEMEMMOVE),,
117 + AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
119 AC_SYS_LONG_FILE_NAMES