[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 4/8] Add --with-sysroot
From: |
Paolo Bonzini |
Subject: |
[RFC PATCH 4/8] Add --with-sysroot |
Date: |
Thu, 22 Jul 2010 20:36:26 +0200 |
The first baby step. Support the option, and replace it properly
in the libtool script.
---
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 ef4aa0f..cf24144 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -171,6 +171,7 @@ m4_require([_LT_CMD_RELOAD])dnl
m4_require([_LT_CHECK_MAGIC_METHOD])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
@@ -1135,6 +1136,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
- [RFC PATCH 0/8] sysroot support, Paolo Bonzini, 2010/07/22
- [RFC PATCH 1/8] handle sysroot flags, Paolo Bonzini, 2010/07/22
- [RFC PATCH 2/8] fix buglet, Paolo Bonzini, 2010/07/22
- [RFC PATCH 3/8] provide shell functions to configure, Paolo Bonzini, 2010/07/22
- [RFC PATCH 4/8] Add --with-sysroot,
Paolo Bonzini <=
- [RFC PATCH 5/8] add a basic sysroot test, Paolo Bonzini, 2010/07/22
- [RFC PATCH 6/8] teach libtool -L= and -R=, Paolo Bonzini, 2010/07/22
- [RFC PATCH 7/8] handle sysrooted paths when reading dependencies to la files, Paolo Bonzini, 2010/07/22
- [RFC PATCH 8/8] emit sysrooted paths when installing .la files, Paolo Bonzini, 2010/07/22
- Re: [RFC PATCH 0/8] sysroot support, Charles Wilson, 2010/07/23