[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[REBASED PATCH 9/9] Configure script should not use libtool-only shell f
From: |
Charles Wilson |
Subject: |
[REBASED PATCH 9/9] Configure script should not use libtool-only shell functions |
Date: |
Sun, 25 Jul 2010 21:13:57 -0400 |
---
libltdl/m4/libtool.m4 | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
This patch is needed so that patch 8/9 (Paolo's 8/8) will work. With the recent
change to how XSI override functions are replaced, you can't rely on those
functions being present in the configure script as well as in the libtool
script.
So, since Paolo's patch causes func_stripname to be used in the configure
script (when configuring cross only), this fix takes the simplistic approach
of providing a similar, but differently named, function for func_stripname
for the use of configure itself. The implementation is taken from the non-XSI
libtool version.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index c24d0f7..b16491d 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -6705,6 +6705,30 @@ AC_LANG_POP
])# _LT_LANG_CXX_CONFIG
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# #
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+# func_strip_suffix prefix name
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
# ---------------------------------
# Figure out "hidden" library dependencies from verbose
@@ -6713,6 +6737,7 @@ AC_LANG_POP
# objects, libraries and library flags.
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
# Dependencies to place before and after the object being linked:
_LT_TAGVAR(predep_objects, $1)=
_LT_TAGVAR(postdep_objects, $1)=
@@ -6787,12 +6812,12 @@ if AC_TRY_EVAL(ac_compile); then
# Expand the sysroot to ease extracting the directories later.
case $p in
- -L*) func_stripname '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
- -R*) func_stripname '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
- -l*) func_stripname '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result
;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result
;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result
;;
esac
case $p in
- =*) func_stripname '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result
;;
esac
if test "$pre_test_object_deps_done" = no; then
case ${prev} in
--
1.7.1
- [REBASED PATCH 2/9] fix buglet, (continued)
- [REBASED PATCH 2/9] fix buglet, Charles Wilson, 2010/07/26
- [REBASED PATCH 3/9] Add --with-sysroot, Charles Wilson, 2010/07/26
- [REBASED PATCH 4/9] add a basic sysroot test, Charles Wilson, 2010/07/26
- [REBASED PATCH 5/9] Fix issue with GROW diversion in testsuite, Charles Wilson, 2010/07/26
- [REBASED PATCH 6/9] teach libtool -L= and -R=, Charles Wilson, 2010/07/26
- [REBASED PATCH 7/9] handle sysrooted paths when reading dependencies to la files, Charles Wilson, 2010/07/26
- [REBASED PATCH 8/9] emit sysrooted paths when installing .la files, Charles Wilson, 2010/07/26
- [REBASED PATCH 9/9] Configure script should not use libtool-only shell functions,
Charles Wilson <=
- Re: [REBASED PATCH 0/9] Paolo's sysroot patches, rebased plus some fixes, Paolo Bonzini, 2010/07/26
- Re: [REBASED PATCH 0/9] Paolo's sysroot patches, rebased plus some fixes, Charles Wilson, 2010/07/28
- Re: [REBASED PATCH 0/9] Paolo's sysroot patches, rebased plus some fixes, Paolo Bonzini, 2010/07/28
- Re: [REBASED PATCH 0/9] Paolo's sysroot patches, rebased plus some fixes, Charles Wilson, 2010/07/28
- Re: [REBASED PATCH 0/9] Paolo's sysroot patches, rebased plus some fixes, Paolo Bonzini, 2010/07/28
- Re: [REBASED PATCH 0/9] Paolo's sysroot patches, rebased plus some fixes, Charles Wilson, 2010/07/28
- Re: [REBASED PATCH 0/9] Paolo's sysroot patches, rebased plus some fixes, Paolo Bonzini, 2010/07/28