docker-engine: new package
[buildroot-gz.git] / package / screen / 0004-cross-compilation-ignore-host-fs.patch
blobfa698ef1f7d28157e6ed554f2adb5978041552cd
1 From: Maarten ter Huurne <maarten@treewalker.org>
2 Date: Sun, 14 Sep 2014 07:10:59 +0200
3 Subject: When cross-compiling, skip checks that look in the host file system
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 | 23 +++++++++++++++++++----
10 1 file changed, 19 insertions(+), 4 deletions(-)
12 diff --git a/configure.ac b/configure.ac
13 index c4b7cd4..9cf7cee 100644
14 --- a/configure.ac
15 +++ b/configure.ac
16 @@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
17 dnl
18 dnl **** special unix variants ****
19 dnl
20 -if test -n "$ISC"; then
21 +if test "$cross_compiling" = no && test -n "$ISC" ; then
22 AC_DEFINE(ISC) LIBS="$LIBS -linet"
25 @@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again....
26 dnl fi
27 dnl fi
29 -if test -f /sysV68 ; then
30 +if test "$cross_compiling" = no && test -f /sysV68 ; then
31 AC_DEFINE(sysV68)
34 +if test "$cross_compiling" = no ; then
35 AC_CHECKING(for MIPS)
36 if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
37 oldlibs="$LIBS"
38 @@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
42 +fi
45 AC_CHECKING(for Ultrix)
46 @@ -132,7 +134,7 @@ AC_EGREP_CPP(yes,
47 #endif
48 ], ULTRIX=1)
50 -if test -f /usr/lib/libpyr.a ; then
51 +if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
52 oldlibs="$LIBS"
53 LIBS="$LIBS -lpyr"
54 AC_CHECKING(Pyramid OSX)
55 @@ -679,17 +681,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
56 dnl
57 dnl **** PTY specific things ****
58 dnl
59 +if test "$cross_compiling" = no ; then
60 AC_CHECKING(for /dev/ptc)
61 if test -r /dev/ptc; then
62 AC_DEFINE(HAVE_DEV_PTC)
64 +fi
66 +if test "$cross_compiling" = no ; then
67 AC_CHECKING(for SVR4 ptys)
68 sysvr4ptys=
69 if test -c /dev/ptmx ; then
70 AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
71 sysvr4ptys=1])
73 +fi
75 AC_CHECK_FUNCS(getpt)
77 @@ -699,6 +705,7 @@ AC_CHECK_FUNCS(openpty,,
78 [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
81 +if test "$cross_compiling" = no ; then
82 AC_CHECKING(for ptyranges)
83 if test -d /dev/ptym ; then
84 pdir='/dev/ptym'
85 @@ -722,6 +729,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\
86 AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
87 AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
89 +fi
91 dnl **** pty mode/group handling ****
92 dnl
93 @@ -869,14 +877,16 @@ fi
94 dnl
95 dnl **** loadav ****
96 dnl
97 +if test "$cross_compiling" = no ; then
98 AC_CHECKING(for libutil(s))
99 test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
100 test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
103 AC_CHECKING(getloadavg)
104 AC_TRY_LINK(,[getloadavg((double *)0, 0);],
105 AC_DEFINE(LOADAV_GETLOADAVG) load=1,
106 -if test -f /usr/lib/libkvm.a ; then
107 +if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
108 olibs="$LIBS"
109 LIBS="$LIBS -lkvm"
110 AC_CHECKING(getloadavg with -lkvm)
111 @@ -1094,13 +1104,18 @@ dnl **** libraries ****
114 AC_CHECKING(for crypt and sec libraries)
115 +if test "$cross_compiling" = no ; then
116 test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
118 oldlibs="$LIBS"
119 LIBS="$LIBS -lcrypt"
120 AC_CHECKING(crypt)
121 AC_TRY_LINK(,,,LIBS="$oldlibs")
122 +if test "$cross_compiling" = no ; then
123 test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
124 test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
127 oldlibs="$LIBS"
128 LIBS="$LIBS -lsun"
129 AC_CHECKING(IRIX sun library)
131 1.8.4.5