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,7 @@ test "${ECHO+set}" = set || ECHO=${as_ec
19 +test "${STAGING_DIR+set}" = set && ${SED="$STAGING_DIR/../host/bin/sed"} || ${SED="@SED@"}
20 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
21 : ${Xsed="$SED -e 1s/^X//"}
23 @@ -2476,10 +2476,17 @@ func_check_macros ()
25 # Locations for important files:
28 - pkgdatadir=@pkgdatadir@
29 - pkgltdldir=@pkgdatadir@
30 - aclocaldir=@aclocaldir@
31 + if test -n "$STAGING_DIR"; then
32 + datadir="$STAGING_DIR/../host/share"
33 + pkgdatadir="$STAGING_DIR/../host/share/libtool"
34 + pkgltdldir="$STAGING_DIR/../host/share/libtool"
35 + aclocaldir="$STAGING_DIR/../host/share/aclocal"
38 + pkgdatadir=@pkgdatadir@
39 + pkgltdldir=@pkgdatadir@
40 + aclocaldir=@aclocaldir@
44 configure_ac=configure.in
47 @@ -1450,10 +1450,17 @@ func_check_macros ()
49 # Locations for important files:
52 - pkgdatadir=@pkgdatadir@
53 - pkgltdldir=@pkgdatadir@
54 - aclocaldir=@aclocaldir@
55 + if test -n "$STAGING_DIR"; then
56 + datadir="$STAGING_DIR/../host/share"
57 + pkgdatadir="$STAGING_DIR/../host/share/libtool"
58 + pkgltdldir="$STAGING_DIR/../host/share/libtool"
59 + aclocaldir="$STAGING_DIR/../host/share/aclocal"
62 + pkgdatadir=@pkgdatadir@
63 + pkgltdldir=@pkgdatadir@
64 + aclocaldir=@aclocaldir@
68 configure_ac=configure.in
69 --- a/libltdl/m4/libtool.m4
70 +++ b/libltdl/m4/libtool.m4
71 @@ -875,9 +875,8 @@ dnl AC_DEFUN([AC_LIBTOOL_RC], [])
73 m4_defun([_LT_TAG_COMPILER],
74 [AC_REQUIRE([AC_PROG_CC])dnl
76 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
77 -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
78 +_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR:-$STAGING_DIR}/../host/include"], [LTCC compiler flags])dnl
79 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
80 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
82 @@ -7544,9 +7543,8 @@ AC_SUBST([DLLTOOL])
83 # as few characters as possible. Prefer GNU sed if found.
84 m4_defun([_LT_DECL_SED],
86 -test -z "$SED" && SED=sed
87 Xsed="$SED -e 1s/^X//"
88 -_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
89 +_LT_DECL([], [SED], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/sed"], [A sed program that does not truncate output])
90 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
91 [Sed that helps us avoid accidentally triggering echo(1) options like -n])