From 7ccc7eff1457c17afdce73d5c5fa8839efce2e99 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 13 Jan 2003 18:00:16 +0000 Subject: * Makefile.in (TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_DEFINE): New variables. (main.o): Custom rule which uses $(TARGET_SYSTEM_ROOT_DEFINE). * configure.in: Add --with-sysroot. * configure: Regenerated. * main.c (gdb_sysroot): New variable. (captured_main): Initialize gdb_sysroot. * defs.h (gdb_sysroot): New extern declaration. * solib.c (_initialize_solib): Initialize solib_absolute_prefix. --- gdb/configure.in | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'gdb/configure.in') diff --git a/gdb/configure.in b/gdb/configure.in index 064ff4e90f4..96694dec91b 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -851,6 +851,38 @@ fi dnl Handle optional features that can be enabled. +AC_ARG_WITH(sysroot, +[ --with-sysroot[=DIR] Search for usr/lib et al within DIR.], +[ + case ${with_sysroot} in + yes) AC_ERROR(with-sysroot must specify path) ;; + *) TARGET_SYSTEM_ROOT=$with_sysroot ;; + esac + + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' + + if test "x$exec_prefix" = xNONE; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + case ${TARGET_SYSTEM_ROOT} in + ${test_prefix}*) + t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" + TARGET_SYSTEM_ROOT_DEFINE="$t" + ;; + esac +], [ + TARGET_SYSTEM_ROOT= + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' +]) +AC_SUBST(TARGET_SYSTEM_ROOT) +AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + # NOTE: Don't add -Wall or -Wunused, they both include # -Wunused-parameter which reports bogus warnings. # NOTE: If you add to this list, remember to update -- cgit v1.2.1