1From: Andrew Ruder <andrew.ruder@elecsyscorp.com> 2Subject: [PATCH] enable cross compilation for expect 3 4This patch was created by running ./configure on a modern Linux machine 5and inserting the results into the cross compilation section of 6each AC_MSG_CHECKING that bombed out with an error. 7 8Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> 9--- 10 11Index: expect-5.45/configure.in 12=================================================================== 13--- expect-5.45.orig/configure.in 2013-11-14 07:59:58.732100595 -0600 14+++ expect-5.45/configure.in 2013-11-14 07:59:58.732100595 -0600 15@@ -481,7 +481,7 @@ 16 , 17 AC_MSG_RESULT(no) 18 , 19- AC_MSG_ERROR([Expect can't be cross compiled]) 20+ AC_MSG_RESULT(no) 21 ) 22 23 AC_MSG_CHECKING([if any value exists for WNOHANG]) 24@@ -506,7 +506,8 @@ 25 AC_MSG_RESULT(no) 26 AC_DEFINE(WNOHANG_BACKUP_VALUE, 1) 27 , 28- AC_MSG_ERROR([Expect can't be cross compiled]) 29+ AC_MSG_RESULT(yes) 30+ AC_DEFINE(WNOHANG_BACKUP_VALUE, 1) 31 ) 32 33 # 34@@ -574,7 +575,7 @@ 35 AC_DEFINE(REARM_SIG) 36 , 37 AC_MSG_RESULT(no) 38-, AC_MSG_WARN([Expect can't be cross compiled]) 39+, AC_MSG_RESULT(no) 40 ) 41 42 # HPUX7 has trouble with the big cat so split it 43@@ -725,7 +726,7 @@ 44 , 45 AC_MSG_RESULT(no) 46 , 47- AC_MSG_ERROR([Expect can't be cross compiled]) 48+ AC_MSG_RESULT(no) 49 ) 50 51 # mach systems have include files for unimplemented features 52@@ -749,7 +750,9 @@ 53 , 54 AC_MSG_RESULT(no) 55 , 56- AC_MSG_ERROR([Expect can't be cross compiled]) 57+ AC_DEFINE(HAVE_TERMIO) 58+ PTY_TYPE=termios 59+ AC_MSG_RESULT(yes) 60 ) 61 62 # now check for the new style ttys (not yet posix) 63@@ -771,7 +774,9 @@ 64 , 65 AC_MSG_RESULT(no) 66 , 67- AC_MSG_ERROR([Expect can't be cross compiled]) 68+ AC_DEFINE(HAVE_TERMIOS) 69+ PTY_TYPE=termios 70+ AC_MSG_RESULT(yes) 71 ) 72 fi 73 74@@ -794,7 +799,7 @@ 75 , 76 AC_MSG_RESULT(no) 77 , 78- AC_MSG_ERROR([Expect can't be cross compiled]) 79+ AC_MSG_RESULT(no) 80 ) 81 82 AC_MSG_CHECKING([if TIOCGWINSZ in termios.h]) 83@@ -816,7 +821,7 @@ 84 , 85 AC_MSG_RESULT(no) 86 , 87- AC_MSG_ERROR([Expect can't be cross compiled]) 88+ AC_MSG_RESULT(no) 89 ) 90 91 # finally check for Cray style ttys 92@@ -837,7 +842,7 @@ 93 , 94 AC_MSG_RESULT(no) 95 , 96- AC_MSG_ERROR([Expect can't be cross compiled]) 97+ AC_MSG_RESULT(no) 98 ) 99 100 # 101@@ -869,7 +874,9 @@ 102 AC_HAVE_FUNCS(getpty) 103 104 # following test sets SETPGRP_VOID if setpgrp takes 0 args, else takes 2 105-AC_FUNC_SETPGRP 106+cat >>expect_cf.h <<\_ACEOF 107+#define SETPGRP_VOID 1 108+_ACEOF 109 110 # 111 # check for timezones 112@@ -889,7 +896,7 @@ 113 AC_MSG_RESULT(yes), 114 AC_MSG_RESULT(no) 115 , 116- AC_MSG_ERROR([Expect can't be cross compiled]) 117+ AC_MSG_RESULT(yes) 118 ) 119 120 121