0001-enable-cross-compilation.patch 2.5 KB

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