[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFT PATCH v3 3/9] add --with-sysroot
From: |
Paolo Bonzini |
Subject: |
[RFT PATCH v3 3/9] add --with-sysroot |
Date: |
Thu, 29 Jul 2010 01:23:16 +0200 |
* libltdl/m4/libtool.m4 (_LT_HOST_NONCANONICAL, _LT_WITH_SYSROOT): New.
(LT_SETUP): Require _LT_WITH_SYSROOT.
Signed-off-by: Paolo Bonzini <address@hidden>
---
Right now the default is to use a sysroot. Probably it is
a bit too aggressive, especially because most existing
cross-compilation setups are using the wrong prefix that
includes the sysroot. They would thus stop working until
they switched to --prefix and installing with DESTDIR.
libltdl/m4/libtool.m4 | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index f61be28..52efd48 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -173,6 +173,7 @@ m4_require([_LT_CHECK_MAGIC_METHOD])dnl
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
_LT_CONFIG_LIBTOOL_INIT([
# See if we are running on zsh, and set the options which allow our
@@ -1163,6 +1164,55 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects
backslashes])
])# _LT_PROG_ECHO_BACKSLASH
+# _LT_HOST_NONCANONICAL
+# ----------------
+AC_DEFUN([_LT_HOST_NONCANONICAL],
+[build_noncanonical=${build_alias:-$ac_build_alias}
+host_noncanonical=${host_alias:-$build_noncanonical}
+target_noncanonical=${target_alias:-$host_noncanonical}
+_LT_DECL([], [build_noncanonical], [0],
+ [The user-supplied name of the build machine.])dnl
+_LT_DECL([], [host_noncanonical], [0],
+ [The user-supplied name of the host machine.])dnl
+_LT_DECL([], [target_noncanonical], [0],
+ [The user-supplied name of the target machine.])
+])# _LT_HOST_NONCANONICAL
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_REQUIRE([_LT_HOST_NONCANONICAL])
+AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$GCC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ AC_MSG_RESULT([$with_sysroot])
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no)
+ ;; #(
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${with_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libs should be installed.])])
+
# _LT_ENABLE_LOCK
# ---------------
m4_defun([_LT_ENABLE_LOCK],
--
1.7.1
- [RFT PATCH v3 0/9] Sysroot patches, Paolo Bonzini, 2010/07/28
- [RFT PATCH v3 1/9] fix bug in postdeps computation, Paolo Bonzini, 2010/07/28
- [RFT PATCH v3 2/9] handle sysroot flags, Paolo Bonzini, 2010/07/28
- [RFT PATCH v3 3/9] add --with-sysroot,
Paolo Bonzini <=
- [RFT PATCH v3 4/9] teach libtool -L= and -R=, Paolo Bonzini, 2010/07/28
- [RFT PATCH v3 6/9] process postdeps to include sysrooted paths, Paolo Bonzini, 2010/07/28
- [RFT PATCH v3 7/9] emit sysrooted paths when installing .la files, Paolo Bonzini, 2010/07/28
- [RFT PATCH v3 9/9] initial version of the NEWS entry, Paolo Bonzini, 2010/07/28
- [RFT PATCH v3 8/9] add sysroot test, Paolo Bonzini, 2010/07/28
- [RFT PATCH v3 5/9] handle sysrooted paths when reading dependencies to la files, Paolo Bonzini, 2010/07/28
- Re: [RFT PATCH v3 0/9] Sysroot patches, Charles Wilson, 2010/07/29