This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Simple little configure.in patch: --with-sysroot
- From: "Kaz Kylheku" <kaz at zeugmasystems dot com>
- To: <libc-alpha at sources dot redhat dot com>
- Date: Fri, 25 Aug 2006 13:57:14 -0700
- Subject: Simple little configure.in patch: --with-sysroot
In cross-compiling glibc, I added a new argument to configure. The
--with-sysroot simply sets the value of the install_root variable. The
option name is consistent with what is used by binutils and gcc, and its
value will typically be the same for all three in a cross-compiling
scenario.
Not being able to configure the install root is a little bit error
prone. People are doing silly things like editing configure-generated
files by hand, or rememebering to override install_root on the make
install command line.
Index: libc/configure.in
===================================================================
--- libc.orig/configure.in 2006-07-10 17:45:29.000000000 -0400
+++ libc/configure.in 2006-08-25 18:47:18.000000000 -0400
@@ -325,6 +325,17 @@
esac
])
+AC_ARG_WITH([sysroot],
+ AS_HELP_STRING([--with-sysroot=DIR], [sets install_root to
DIR]),
+ [dnl
+ case "$withval" in
+ yes|'') AC_MSG_ERROR([--with-sysroot requires an argument]) ;;
+ no) ;;
+ *) install_root="$withval" ;;
+ esac
+])
+
+AC_SUBST(install_root)
# An add-on can set this when it wants to disable the sanity check
below.
libc_config_ok=no
Index: libc/config.make.in
===================================================================
--- libc.orig/config.make.in 2006-08-25 21:45:24.000000000 -0400
+++ libc/config.make.in 2006-08-25 21:46:16.000000000 -0400
@@ -5,7 +5,7 @@
release = @RELEASE@
# Installation prefixes.
-install_root =
+install_root = @install_root@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@