1 --- a/libltdl/config/general.m4sh
2 +++ b/libltdl/config/general.m4sh
3 @@ -53,7 +53,7 @@ test "${ECHO+set}" = set || ECHO=${as_ec
8 +test "${STAGING_DIR+set}" = set && ${SED="$STAGING_DIR/../host/bin/sed"} || ${SED="@SED@"}
9 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
10 : ${Xsed="$SED -e 1s/^X//"}
14 @@ -334,7 +334,11 @@ test "${ECHO+set}" = set || ECHO=${as_ec
19 +if test -n "$STAGING_DIR"; then
20 + : ${SED="$STAGING_DIR/../host/bin/sed"}
24 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
25 : ${Xsed="$SED -e 1s/^X//"}
27 @@ -2476,10 +2480,17 @@ func_check_macros ()
29 # Locations for important files:
32 - pkgdatadir=@pkgdatadir@
33 - pkgltdldir=@pkgdatadir@
34 - aclocaldir=@aclocaldir@
35 + if test -n "$STAGING_DIR"; then
36 + datadir="$STAGING_DIR/../host/share"
37 + pkgdatadir="$STAGING_DIR/../host/share/libtool"
38 + pkgltdldir="$STAGING_DIR/../host/share/libtool"
39 + aclocaldir="$STAGING_DIR/../host/share/aclocal"
42 + pkgdatadir=@pkgdatadir@
43 + pkgltdldir=@pkgdatadir@
44 + aclocaldir=@aclocaldir@
48 configure_ac=configure.in
51 @@ -1450,10 +1450,17 @@ func_check_macros ()
53 # Locations for important files:
56 - pkgdatadir=@pkgdatadir@
57 - pkgltdldir=@pkgdatadir@
58 - aclocaldir=@aclocaldir@
59 + if test -n "$STAGING_DIR"; then
60 + datadir="$STAGING_DIR/../host/share"
61 + pkgdatadir="$STAGING_DIR/../host/share/libtool"
62 + pkgltdldir="$STAGING_DIR/../host/share/libtool"
63 + aclocaldir="$STAGING_DIR/../host/share/aclocal"
66 + pkgdatadir=@pkgdatadir@
67 + pkgltdldir=@pkgdatadir@
68 + aclocaldir=@aclocaldir@
72 configure_ac=configure.in
73 --- a/libltdl/m4/libtool.m4
74 +++ b/libltdl/m4/libtool.m4
75 @@ -875,9 +875,8 @@ dnl AC_DEFUN([AC_LIBTOOL_RC], [])
77 m4_defun([_LT_TAG_COMPILER],
78 [AC_REQUIRE([AC_PROG_CC])dnl
80 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
81 -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
82 +_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR:-$STAGING_DIR}/../host/include"], [LTCC compiler flags])dnl
83 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
84 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
86 @@ -7544,9 +7543,8 @@ AC_SUBST([DLLTOOL])
87 # as few characters as possible. Prefer GNU sed if found.
88 m4_defun([_LT_DECL_SED],
90 -test -z "$SED" && SED=sed
91 Xsed="$SED -e 1s/^X//"
92 -_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
93 +_LT_DECL([], [SED], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/sed"], [A sed program that does not truncate output])
94 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
95 [Sed that helps us avoid accidentally triggering echo(1) options like -n])