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.

135 lines
3.6 KiB

  1. From c573b89139e7a068f5573abd565605bed60f293f Mon Sep 17 00:00:00 2001
  2. From: Jussi Kukkonen <jussi.kukkonen@intel.com>
  3. Date: Sat, 24 Feb 2018 15:18:33 +0100
  4. Subject: [PATCH] [PATCH 3/4] Skip host file system checks when cross-compiling
  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 | 23 +++++++++++++++++++----
  10. 1 file changed, 19 insertions(+), 4 deletions(-)
  11. diff --git a/src/configure.ac b/src/configure.ac
  12. index 74be368..bd748d9 100644
  13. --- a/configure.ac
  14. +++ b/configure.ac
  15. @@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
  16. dnl
  17. dnl **** special unix variants ****
  18. dnl
  19. -if test -n "$ISC"; then
  20. +if test "$cross_compiling" = no && test -n "$ISC" ; then
  21. AC_DEFINE(ISC) LIBS="$LIBS -linet"
  22. fi
  23. @@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again....
  24. dnl fi
  25. dnl fi
  26. -if test -f /sysV68 ; then
  27. +if test "$cross_compiling" = no && test -f /sysV68 ; then
  28. AC_DEFINE(sysV68)
  29. fi
  30. +if test "$cross_compiling" = no ; then
  31. AC_CHECKING(for MIPS)
  32. if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
  33. oldlibs="$LIBS"
  34. @@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
  35. ))
  36. fi
  37. fi
  38. +fi
  39. AC_CHECKING(for Ultrix)
  40. @@ -132,7 +134,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
  41. #endif
  42. ], ULTRIX=1)
  43. -if test -f /usr/lib/libpyr.a ; then
  44. +if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
  45. oldlibs="$LIBS"
  46. LIBS="$LIBS -lpyr"
  47. AC_CHECKING(Pyramid OSX)
  48. @@ -653,17 +655,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
  49. dnl
  50. dnl **** PTY specific things ****
  51. dnl
  52. +if test "$cross_compiling" = no ; then
  53. AC_CHECKING(for /dev/ptc)
  54. if test -r /dev/ptc; then
  55. AC_DEFINE(HAVE_DEV_PTC)
  56. fi
  57. +fi
  58. +if test "$cross_compiling" = no ; then
  59. AC_CHECKING(for SVR4 ptys)
  60. sysvr4ptys=
  61. if test -c /dev/ptmx ; then
  62. AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
  63. sysvr4ptys=1])
  64. fi
  65. +fi
  66. AC_CHECK_FUNCS(getpt)
  67. @@ -673,6 +679,7 @@ AC_CHECK_FUNCS(openpty,,
  68. [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
  69. fi
  70. +if test "$cross_compiling" = no ; then
  71. AC_CHECKING(for ptyranges)
  72. if test -d /dev/ptym ; then
  73. pdir='/dev/ptym'
  74. @@ -696,6 +703,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\
  75. AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
  76. AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
  77. fi
  78. +fi
  79. dnl **** pty mode/group handling ****
  80. dnl
  81. @@ -843,14 +851,16 @@ fi
  82. dnl
  83. dnl **** loadav ****
  84. dnl
  85. +if test "$cross_compiling" = no ; then
  86. AC_CHECKING(for libutil(s))
  87. test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
  88. test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
  89. +fi
  90. AC_CHECKING(getloadavg)
  91. AC_TRY_LINK(,[getloadavg((double *)0, 0);],
  92. AC_DEFINE(LOADAV_GETLOADAVG) load=1,
  93. -if test -f /usr/lib/libkvm.a ; then
  94. +if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
  95. olibs="$LIBS"
  96. LIBS="$LIBS -lkvm"
  97. AC_CHECKING(getloadavg with -lkvm)
  98. @@ -1068,13 +1078,18 @@ dnl **** libraries ****
  99. dnl
  100. AC_CHECKING(for crypt and sec libraries)
  101. +if test "$cross_compiling" = no ; then
  102. test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
  103. +fi
  104. oldlibs="$LIBS"
  105. LIBS="$LIBS -lcrypt"
  106. AC_CHECKING(crypt)
  107. AC_TRY_LINK(,,,LIBS="$oldlibs")
  108. +if test "$cross_compiling" = no ; then
  109. test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
  110. test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
  111. +fi
  112. +
  113. oldlibs="$LIBS"
  114. LIBS="$LIBS -lsun"
  115. AC_CHECKING(IRIX sun library)
  116. --
  117. 2.17.1