* configure.ac (DEBUGDIR_RELOCATABLE): Define for debugdir inside

exec_prefix.
	(TARGET_SYSTEM_ROOT_RELOCATABLE): Allow for exec_prefix being
	'${prefix}'.
	* configure, config.in: Regenerate.
	* defs.h (debug_file_directory): Declare.
	* main.c (captured_main): Canonicalize gdb_sysroot.  Assume
	TARGET_SYSTEM_ROOT is defined.  Initialize debug_file_directory and
	relocate it if DEBUGDIR_RELOCATABLE.
	* symfile.c (debug_file_directory): Make non-static.
	(find_separate_debug_file): Look for debug info for SYSROOT/PATH
	in DEBUGDIR/PATH if DEBUGDIR is inside SYSROOT.
	(_initialize_symfile): Don't initialize debug_file_directory here.
This commit is contained in:
Daniel Jacobowitz
2007-01-09 21:34:30 +00:00
parent 1cfd2c3eed
commit aa28a74efb
7 changed files with 133 additions and 10 deletions

View File

@@ -75,6 +75,22 @@ AC_DEFINE_DIR(DEBUGDIR, debugdir,
[Global directory for separate debug files. ])
#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
else
test_prefix=$prefix
fi
else
test_prefix=$exec_prefix
fi
case ${debugdir} in
"${test_prefix}"|"${test_prefix}/"*|\
'${exec_prefix}'|'${exec_prefix}/'*)
AC_DEFINE(DEBUGDIR_RELOCATABLE, 1, [Define if the debug directory should be relocated when GDB is moved.])
;;
esac
AC_CONFIG_SUBDIRS(doc testsuite)
# Provide defaults for some variables set by the per-host and per-target
@@ -1102,7 +1118,7 @@ AC_ARG_WITH(sysroot,
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
if test "x$exec_prefix" = xNONE; then
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
else