aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-01-13 18:00:16 +0000
committerDaniel Jacobowitz <drow@false.org>2003-01-13 18:00:16 +0000
commit030292b70ecb623482264bd03ddf9ced4d9b0bbe (patch)
treef75fe864f2a5f72c5adc69fff2fc5b45e53b127a /gdb/configure.in
parentf5ebfba0cad0523f81fe510be73c90edd6e2b17b (diff)
downloadgdb-030292b70ecb623482264bd03ddf9ced4d9b0bbe.zip
gdb-030292b70ecb623482264bd03ddf9ced4d9b0bbe.tar.gz
gdb-030292b70ecb623482264bd03ddf9ced4d9b0bbe.tar.bz2
* 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 064ff4e..96694de 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