You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
4.1 KiB

  1. From abba47ce4206506c49858d944e904fff86ae65cc Mon Sep 17 00:00:00 2001
  2. From: Jussi Kukkonen <jussi.kukkonen@intel.com>
  3. Date: Sat, 24 Feb 2018 15:14:48 +0100
  4. Subject: [PATCH] [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN
  5. Modified from patch by Maarten ter Huurne.
  6. Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
  7. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
  8. ---
  9. configure.ac | 32 ++++++++++++++++++++------------
  10. 1 file changed, 20 insertions(+), 12 deletions(-)
  11. diff --git a/src/configure.ac b/src/configure.ac
  12. index a8208ea..74be368 100644
  13. --- a/configure.ac
  14. +++ b/configure.ac
  15. @@ -348,7 +348,8 @@ main()
  16. exit(0);
  17. }
  18. ], AC_NOTE(- your fifos are usable) fifo=1,
  19. -AC_NOTE(- your fifos are not usable))
  20. +AC_NOTE(- your fifos are not usable),
  21. +AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
  22. rm -f /tmp/conftest*
  23. if test -n "$fifo"; then
  24. @@ -396,7 +397,8 @@ main()
  25. exit(0);
  26. }
  27. ], AC_NOTE(- your implementation is ok),
  28. -AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
  29. +AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
  30. +AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
  31. rm -f /tmp/conftest*
  32. fi
  33. @@ -458,7 +460,8 @@ main()
  34. exit(0);
  35. }
  36. ], AC_NOTE(- your sockets are usable) sock=1,
  37. -AC_NOTE(- your sockets are not usable))
  38. +AC_NOTE(- your sockets are not usable),
  39. +AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
  40. rm -f /tmp/conftest*
  41. if test -n "$sock"; then
  42. @@ -497,7 +500,8 @@ main()
  43. }
  44. ],AC_NOTE(- you are normal),
  45. AC_NOTE(- unix domain sockets are not kept in the filesystem)
  46. -AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
  47. +AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
  48. +AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
  49. rm -f /tmp/conftest*
  50. fi
  51. @@ -598,7 +602,8 @@ main()
  52. exit(0);
  53. }
  54. ],AC_NOTE(- select is ok),
  55. -AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
  56. +AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
  57. +AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
  58. dnl
  59. dnl **** termcap or terminfo ****
  60. @@ -640,7 +645,8 @@ main()
  61. {
  62. exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
  63. }], AC_NOTE(- you use the termcap database),
  64. -AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
  65. +AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
  66. +AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
  67. AC_CHECKING(ospeed)
  68. AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
  69. @@ -775,7 +781,8 @@ main()
  70. else
  71. AC_NOTE(- can't determine - assume ptys are world accessable)
  72. fi
  73. - ]
  74. + ],
  75. + AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
  76. )
  77. rm -f conftest_grp
  78. fi
  79. @@ -859,7 +866,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
  80. #endif
  81. ], load=1)
  82. fi
  83. -if test -z "$load" ; then
  84. +if test -z "$load" && test "$cross_compiling" = no ; then
  85. AC_CHECKING(for kernelfile)
  86. for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
  87. if test -f $core || test -c $core; then
  88. @@ -1052,7 +1059,7 @@ main()
  89. #endif
  90. exit(0);
  91. }
  92. -],,AC_DEFINE(SYSVSIGS))
  93. +],,AC_DEFINE(SYSVSIGS),:)
  94. fi
  95. @@ -1132,7 +1139,7 @@ main() {
  96. if (strncmp(buf, "cdedef", 6))
  97. exit(1);
  98. exit(0); /* libc version works properly. */
  99. -}], AC_DEFINE(USEBCOPY))
  100. +}], AC_DEFINE(USEBCOPY),,:)
  101. AC_TRY_RUN([
  102. #define bcopy(s,d,l) memmove(d,s,l)
  103. @@ -1147,7 +1154,8 @@ main() {
  104. if (strncmp(buf, "cdedef", 6))
  105. exit(1);
  106. exit(0); /* libc version works properly. */
  107. -}], AC_DEFINE(USEMEMMOVE))
  108. +}], AC_DEFINE(USEMEMMOVE),,
  109. + AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
  110. AC_TRY_RUN([
  111. @@ -1163,7 +1171,7 @@ main() {
  112. if (strncmp(buf, "cdedef", 6))
  113. exit(1);
  114. exit(0); /* libc version works properly. */
  115. -}], AC_DEFINE(USEMEMCPY))
  116. +}], AC_DEFINE(USEMEMCPY),,:)
  117. AC_SYS_LONG_FILE_NAMES
  118. --
  119. 2.17.1