1 --- a/libltdl/config/general.m4sh
2 +++ b/libltdl/config/general.m4sh
3 @@ -53,7 +53,11 @@ test "${ECHO+set}" = set || ECHO=${as_ec
8 +if test -n "$STAGING_DIR"; then
9 + : ${SED="$STAGING_DIR/../host/bin/sed"}
13 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
14 : ${Xsed="$SED -e 1s/^X//"}
18 @@ -334,7 +334,11 @@ test "${ECHO+set}" = set || ECHO=${as_ec
23 +if test -n "$STAGING_DIR"; then
24 + : ${SED="$STAGING_DIR/../host/bin/sed"}
28 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
29 : ${Xsed="$SED -e 1s/^X//"}
31 @@ -2476,10 +2480,17 @@ func_check_macros ()
33 # Locations for important files:
36 - pkgdatadir=@pkgdatadir@
37 - pkgltdldir=@pkgdatadir@
38 - aclocaldir=@aclocaldir@
39 + if test -n "$STAGING_DIR"; then
40 + datadir="$STAGING_DIR/../host/share"
41 + pkgdatadir="$STAGING_DIR/../host/share/libtool"
42 + pkgltdldir="$STAGING_DIR/../host/share/libtool"
43 + aclocaldir="$STAGING_DIR/../host/share/aclocal"
46 + pkgdatadir=@pkgdatadir@
47 + pkgltdldir=@pkgdatadir@
48 + aclocaldir=@aclocaldir@
52 configure_ac=configure.in
55 @@ -1450,10 +1450,17 @@ func_check_macros ()
57 # Locations for important files:
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"
70 + pkgdatadir=@pkgdatadir@
71 + pkgltdldir=@pkgdatadir@
72 + aclocaldir=@aclocaldir@
76 configure_ac=configure.in
77 --- a/libltdl/m4/libtool.m4
78 +++ b/libltdl/m4/libtool.m4
79 @@ -875,9 +875,8 @@ dnl AC_DEFUN([AC_LIBTOOL_RC], [])
81 m4_defun([_LT_TAG_COMPILER],
82 [AC_REQUIRE([AC_PROG_CC])dnl
84 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
85 -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
86 +_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR:-$STAGING_DIR}/../host/include"], [LTCC compiler flags])dnl
87 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
88 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
90 @@ -7544,9 +7543,8 @@ AC_SUBST([DLLTOOL])
91 # as few characters as possible. Prefer GNU sed if found.
92 m4_defun([_LT_DECL_SED],
94 -test -z "$SED" && SED=sed
95 Xsed="$SED -e 1s/^X//"
96 -_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
97 +_LT_DECL([], [SED], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/sed"], [A sed program that does not truncate output])
98 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
99 [Sed that helps us avoid accidentally triggering echo(1) options like -n])