* configure.ac (--with-relocated-sources): New.
	* configure, config.in: Regenerate.
	* source.c (add_substitute_path_rule): Remove static.
	* source.h (add_substitute_path_rule): Declare.
	* main.c: Include "source.h".
	(captured_main): Add substitution rule if RELOC_SRCDIR.

gdb/doc:
	* gdb.texinfo (Source Path): Document --with-relocated-sources.
This commit is contained in:
Joseph Myers
2009-04-21 10:13:05 +00:00
parent ccabeb57ba
commit 29b0e8a24a
9 changed files with 69 additions and 1 deletions

21
gdb/configure vendored
View File

@ -882,6 +882,8 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-separate-debug-dir=path Look for global separate debug info in this path LIBDIR/debug
--with-relocated-sources=PATH
Automatically relocate this path for source files
--with-libunwind Use libunwind frame unwinding support
--with-curses use the curses library instead of the termcap
library
@ -7133,6 +7135,25 @@ _ACEOF
esac
# Check whether --with-relocated-sources or --without-relocated-sources was given.
if test "${with_relocated_sources+set}" = set; then
withval="$with_relocated_sources"
reloc_srcdir="${withval}"
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $reloc_srcdir`
ac_define_dir=`eval echo $ac_define_dir`
cat >>confdefs.h <<_ACEOF
#define RELOC_SRCDIR "$ac_define_dir"
_ACEOF
fi;
subdirs="$subdirs doc testsuite"