2014-09-15 04:39:49 +02:00
|
|
|
From: Maarten ter Huurne <maarten@treewalker.org>
|
|
|
|
Date: Sat, 13 Sep 2014 12:04:41 +0200
|
|
|
|
Subject: Provide cross compilation alternatives for all AC_TRY_RUN uses
|
|
|
|
|
|
|
|
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
|
2016-02-28 01:01:11 +01:00
|
|
|
[Ricardo: rebase on top of 4.3.1]
|
|
|
|
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
|
2014-09-15 04:39:49 +02:00
|
|
|
---
|
2016-02-28 01:01:11 +01:00
|
|
|
configure.ac | 30 +++++++++++++++++++-----------
|
2014-09-15 04:39:49 +02:00
|
|
|
1 file changed, 19 insertions(+), 11 deletions(-)
|
|
|
|
|
2016-02-28 01:01:11 +01:00
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
index b8e3bec..c4b7cd4 100644
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
|
|
|
@@ -348,7 +348,8 @@ main()
|
2014-09-15 04:39:49 +02:00
|
|
|
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
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -396,7 +397,8 @@ main()
|
2014-09-15 04:39:49 +02:00
|
|
|
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
|
|
|
|
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -458,7 +460,8 @@ main()
|
2014-09-15 04:39:49 +02:00
|
|
|
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
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -497,7 +500,8 @@ main()
|
2014-09-15 04:39:49 +02:00
|
|
|
}
|
|
|
|
],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
|
|
|
|
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -624,7 +628,8 @@ main()
|
2014-09-15 04:39:49 +02:00
|
|
|
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 ****
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -666,7 +671,8 @@ main()
|
2014-09-15 04:39:49 +02:00
|
|
|
{
|
|
|
|
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))
|
|
|
|
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -801,7 +807,8 @@ main()
|
2014-09-15 04:39:49 +02:00
|
|
|
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
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -885,7 +892,7 @@ AC_EGREP_CPP(yes,
|
2014-09-15 04:39:49 +02:00
|
|
|
#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
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -1078,7 +1085,7 @@ main()
|
2014-09-15 04:39:49 +02:00
|
|
|
#endif
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
-],,AC_DEFINE(SYSVSIGS))
|
|
|
|
+],,AC_DEFINE(SYSVSIGS),:)
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -1158,7 +1165,7 @@ main() {
|
2014-09-15 04:39:49 +02:00
|
|
|
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)
|
2016-02-28 01:01:11 +01:00
|
|
|
@@ -1173,7 +1180,8 @@ main() {
|
2014-09-15 04:39:49 +02:00
|
|
|
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_SYS_LONG_FILE_NAMES
|
|
|
|
|
|
|
|
--
|
|
|
|
1.8.4.5
|
|
|
|
|