summaryrefslogtreecommitdiff
path: root/package/screen/0004-cross-compilation-ignore-host-fs.patch
blob: fa698ef1f7d28157e6ed554f2adb5978041552cd (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
From: Maarten ter Huurne <maarten@treewalker.org>
Date: Sun, 14 Sep 2014 07:10:59 +0200
Subject: When cross-compiling, skip checks that look in the host file system

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
[Ricardo: rebase on top of 4.3.1]
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 configure.ac | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index c4b7cd4..9cf7cee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
 dnl
 dnl    ****  special unix variants  ****
 dnl
-if test -n "$ISC"; then
+if test "$cross_compiling" = no && test -n "$ISC" ; then
   AC_DEFINE(ISC) LIBS="$LIBS -linet"
 fi
 
@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1)	# this disables MIPS again....
 dnl fi
 dnl fi
 
-if test -f /sysV68 ; then
+if test "$cross_compiling" = no && test -f /sysV68 ; then
 AC_DEFINE(sysV68)
 fi
 
+if test "$cross_compiling" = no ; then
 AC_CHECKING(for MIPS)
 if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
 oldlibs="$LIBS"
@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
 ))
 fi
 fi
+fi
 
 
 AC_CHECKING(for Ultrix)
@@ -132,7 +134,7 @@ AC_EGREP_CPP(yes,
 #endif
 ], ULTRIX=1)
 
-if test -f /usr/lib/libpyr.a ; then
+if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
 oldlibs="$LIBS"
 LIBS="$LIBS -lpyr"
 AC_CHECKING(Pyramid OSX)
@@ -679,17 +681,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
 dnl
 dnl    ****  PTY specific things  ****
 dnl
+if test "$cross_compiling" = no ; then
 AC_CHECKING(for /dev/ptc)
 if test -r /dev/ptc; then
 AC_DEFINE(HAVE_DEV_PTC)
 fi
+fi
 
+if test "$cross_compiling" = no ; then
 AC_CHECKING(for SVR4 ptys)
 sysvr4ptys=
 if test -c /dev/ptmx ; then
 AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
 sysvr4ptys=1])
 fi
+fi
 
 AC_CHECK_FUNCS(getpt)
 
@@ -699,6 +705,7 @@ AC_CHECK_FUNCS(openpty,,
 [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
 fi
 
+if test "$cross_compiling" = no ; then
 AC_CHECKING(for ptyranges)
 if test -d /dev/ptym ; then
 pdir='/dev/ptym'
@@ -722,6 +729,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\
 AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
 AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
 fi
+fi
 
 dnl    ****  pty mode/group handling ****
 dnl
@@ -869,14 +877,16 @@ fi
 dnl
 dnl    ****  loadav  ****
 dnl
+if test "$cross_compiling" = no ; then
 AC_CHECKING(for libutil(s))
 test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
 test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
+fi
 
 AC_CHECKING(getloadavg)
 AC_TRY_LINK(,[getloadavg((double *)0, 0);],
 AC_DEFINE(LOADAV_GETLOADAVG) load=1,
-if test -f /usr/lib/libkvm.a ; then
+if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
 olibs="$LIBS"
 LIBS="$LIBS -lkvm"
 AC_CHECKING(getloadavg with -lkvm)
@@ -1094,13 +1104,18 @@ dnl    ****  libraries  ****
 dnl
 
 AC_CHECKING(for crypt and sec libraries)
+if test "$cross_compiling" = no ; then
 test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
+fi
 oldlibs="$LIBS"
 LIBS="$LIBS -lcrypt"
 AC_CHECKING(crypt)
 AC_TRY_LINK(,,,LIBS="$oldlibs")
+if test "$cross_compiling" = no ; then
 test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
 test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
+fi
+
 oldlibs="$LIBS"
 LIBS="$LIBS -lsun"
 AC_CHECKING(IRIX sun library)
-- 
1.8.4.5