libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[REBASED PATCH 3/9] Add --with-sysroot


From: Charles Wilson
Subject: [REBASED PATCH 3/9] 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.

Signed-off-by: Charles Wilson <...>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]