summaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-01-13 18:00:16 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-01-13 18:00:16 +0000
commit7ccc7eff1457c17afdce73d5c5fa8839efce2e99 (patch)
treefb62f4894332b1c96736f317a8aed3fa846cb1ba /gdb/configure.in
parentc05432a04386b4e70270833dea6b6c848daf387d (diff)
downloadgdb-7ccc7eff1457c17afdce73d5c5fa8839efce2e99.tar.gz
* 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.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in32
1 files changed, 32 insertions, 0 deletions
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