1
0

000-relocatable.patch 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. --- a/libltdl/config/general.m4sh
  2. +++ b/libltdl/config/general.m4sh
  3. @@ -45,15 +45,22 @@ progpath="$0"
  4. M4SH_VERBATIM([[
  5. : ${CP="cp -f"}
  6. test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
  7. -: ${EGREP="@EGREP@"}
  8. -: ${FGREP="@FGREP@"}
  9. -: ${GREP="@GREP@"}
  10. : ${LN_S="@LN_S@"}
  11. : ${MAKE="make"}
  12. : ${MKDIR="mkdir"}
  13. : ${MV="mv -f"}
  14. : ${RM="rm -f"}
  15. -: ${SED="@SED@"}
  16. +if test -n "$STAGING_DIR"; then
  17. + : ${EGREP="$STAGING_DIR/../host/bin/grep -E"}
  18. + : ${FGREP="$STAGING_DIR/../host/bin/grep -F"}
  19. + : ${GREP="$STAGING_DIR/../host/bin/grep"}
  20. + : ${SED="$STAGING_DIR/../host/bin/sed"}
  21. +else
  22. + : ${EGREP="@EGREP@"}
  23. + : ${FGREP="@FGREP@"}
  24. + : ${GREP="@GREP@"}
  25. + : ${SED="@SED@"}
  26. +fi
  27. : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
  28. : ${Xsed="$SED -e 1s/^X//"}
  29. --- a/libtoolize.in
  30. +++ b/libtoolize.in
  31. @@ -326,15 +326,22 @@ as_unset=as_fn_unset
  32. : ${CP="cp -f"}
  33. test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
  34. -: ${EGREP="@EGREP@"}
  35. -: ${FGREP="@FGREP@"}
  36. -: ${GREP="@GREP@"}
  37. : ${LN_S="@LN_S@"}
  38. : ${MAKE="make"}
  39. : ${MKDIR="mkdir"}
  40. : ${MV="mv -f"}
  41. : ${RM="rm -f"}
  42. -: ${SED="@SED@"}
  43. +if test -n "$STAGING_DIR"; then
  44. + : ${EGREP="$STAGING_DIR/../host/bin/grep -E"}
  45. + : ${FGREP="$STAGING_DIR/../host/bin/grep -F"}
  46. + : ${GREP="$STAGING_DIR/../host/bin/grep"}
  47. + : ${SED="$STAGING_DIR/../host/bin/sed"}
  48. +else
  49. + : ${EGREP="@EGREP@"}
  50. + : ${FGREP="@FGREP@"}
  51. + : ${GREP="@GREP@"}
  52. + : ${SED="@SED@"}
  53. +fi
  54. : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
  55. : ${Xsed="$SED -e 1s/^X//"}
  56. @@ -2476,10 +2483,17 @@ func_check_macros ()
  57. # Locations for important files:
  58. prefix=@prefix@
  59. - datadir=@datadir@
  60. - pkgdatadir=@pkgdatadir@
  61. - pkgltdldir=@pkgdatadir@
  62. - aclocaldir=@aclocaldir@
  63. + if test -n "$STAGING_DIR"; then
  64. + datadir="$STAGING_DIR/../host/share"
  65. + pkgdatadir="$STAGING_DIR/../host/share/libtool"
  66. + pkgltdldir="$STAGING_DIR/../host/share/libtool"
  67. + aclocaldir="$STAGING_DIR/../host/share/aclocal"
  68. + else
  69. + datadir=@datadir@
  70. + pkgdatadir=@pkgdatadir@
  71. + pkgltdldir=@pkgdatadir@
  72. + aclocaldir=@aclocaldir@
  73. + fi
  74. auxdir=
  75. macrodir=
  76. configure_ac=configure.in
  77. --- a/libtoolize.m4sh
  78. +++ b/libtoolize.m4sh
  79. @@ -1450,10 +1450,17 @@ func_check_macros ()
  80. # Locations for important files:
  81. prefix=@prefix@
  82. - datadir=@datadir@
  83. - pkgdatadir=@pkgdatadir@
  84. - pkgltdldir=@pkgdatadir@
  85. - aclocaldir=@aclocaldir@
  86. + if test -n "$STAGING_DIR"; then
  87. + datadir="$STAGING_DIR/../host/share"
  88. + pkgdatadir="$STAGING_DIR/../host/share/libtool"
  89. + pkgltdldir="$STAGING_DIR/../host/share/libtool"
  90. + aclocaldir="$STAGING_DIR/../host/share/aclocal"
  91. + else
  92. + datadir=@datadir@
  93. + pkgdatadir=@pkgdatadir@
  94. + pkgltdldir=@pkgdatadir@
  95. + aclocaldir=@aclocaldir@
  96. + fi
  97. auxdir=
  98. macrodir=
  99. configure_ac=configure.in
  100. --- a/libltdl/m4/libtool.m4
  101. +++ b/libltdl/m4/libtool.m4
  102. @@ -875,9 +875,8 @@ dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  103. # ----------------
  104. m4_defun([_LT_TAG_COMPILER],
  105. [AC_REQUIRE([AC_PROG_CC])dnl
  106. -
  107. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  108. -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  109. +_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR:-$STAGING_DIR}/../host/include"], [LTCC compiler flags])dnl
  110. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  111. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  112. @@ -7509,9 +7508,9 @@ m4_defun([_LT_DECL_EGREP],
  113. [AC_REQUIRE([AC_PROG_EGREP])dnl
  114. AC_REQUIRE([AC_PROG_FGREP])dnl
  115. test -z "$GREP" && GREP=grep
  116. -_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  117. -_LT_DECL([], [EGREP], [1], [An ERE matcher])
  118. -_LT_DECL([], [FGREP], [1], [A literal string matcher])
  119. +_LT_DECL([], [GREP], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/grep"], [A grep program that handles long lines])
  120. +_LT_DECL([], [EGREP], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/grep -E"], [An ERE matcher])
  121. +_LT_DECL([], [FGREP], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/grep -F"], [A literal string matcher])
  122. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  123. AC_SUBST([GREP])
  124. ])
  125. @@ -7544,9 +7543,8 @@ AC_SUBST([DLLTOOL])
  126. # as few characters as possible. Prefer GNU sed if found.
  127. m4_defun([_LT_DECL_SED],
  128. [AC_PROG_SED
  129. -test -z "$SED" && SED=sed
  130. Xsed="$SED -e 1s/^X//"
  131. -_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  132. +_LT_DECL([], [SED], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/sed"], [A sed program that does not truncate output])
  133. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  134. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  135. ])# _LT_DECL_SED