diff options
author | Ian Lance Taylor <iant@google.com> | 2007-10-04 05:49:04 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-10-04 05:49:04 +0000 |
commit | ad2d6943a49fa11ba1e23749973c75feb12dcf6b (patch) | |
tree | bc02409b029014fba4f735d3dea15217bbb58c9b /gold/configure.ac | |
parent | 4638dbaa96a30d93647bb737b9a49ee1ca878a7d (diff) | |
download | gdb-ad2d6943a49fa11ba1e23749973c75feb12dcf6b.zip gdb-ad2d6943a49fa11ba1e23749973c75feb12dcf6b.tar.gz gdb-ad2d6943a49fa11ba1e23749973c75feb12dcf6b.tar.bz2 |
Full support for --sysroot.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r-- | gold/configure.ac | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac index 4efe83d..d01ab91 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -10,6 +10,33 @@ AM_INIT_AUTOMAKE(gold, 0.1) AM_CONFIG_HEADER(config.h:config.in) +AC_ARG_WITH(sysroot, +[ --with-sysroot[=DIR] search for usr/lib et al within DIR], +[sysroot=$withval], [sysroot=no]) + +if test "$sysroot" = "yes"; then + sysroot='${exec_prefix}/${target_alias}/sys-root' +elif test "$sysroot" = "no"; then + sysroot= +fi + +sysroot_relocatable=0 +if test -n "$sysroot"; then + case "sysroot" in + "${prefix}" | "${prefix}/"* | \ + "${exec_prefix}" | "${exec_prefix}/"* | \ + '${prefix}' | '${prefix}/'*| \ + '${exec_prefix}' | '${exec_prefix}/'*) + sysroot_relocatable=1 + ;; + esac +fi + +AC_DEFINE_UNQUOTED(TARGET_SYSTEM_ROOT, "$sysroot", + [System root for target files]) +AC_DEFINE_UNQUOTED(TARGET_SYSTEM_ROOT_RELOCATABLE, $sysroot_relocatable, + [Whether the system root can be relocated]) + AC_ARG_ENABLE([targets], [ --enable-targets alternative target configurations], [case "${enableval}" in |