2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>

Jerome Guitton  <guitton@adacore.com>

	* configure, config.in: Regenerated.
	* configure.ac: Add --with-system-gdbinit.
	* main.c (get_init_files): New.
	(captured_main): Use get_init_files.  Load system gdbinit before
	$HOME/.gdbinit.
	(print_gdb_help): Print location of init files.
This commit is contained in:
Jerome Guitton 2009-01-28 15:01:00 +00:00
parent 159073e6aa
commit 16e7150e45
4 changed files with 198 additions and 31 deletions

44
gdb/configure vendored
View file

@ -895,6 +895,7 @@ Optional Packages:
on systems with version 2 of the GNU C library
(use with caution on other system)
--with-sysroot=DIR Search for usr/lib et al within DIR.
--with-system-gdbinit=file Automatically load a system-wide gdbinit file
--with-tcl directory containing tcl configuration (tclConfig.sh)
--with-tk directory containing tk configuration (tkConfig.sh)
--with-x use the X Window System
@ -19482,6 +19483,49 @@ fi;
system_gdbinit=
# Check whether --with-system-gdbinit or --without-system-gdbinit was given.
if test "${with_system_gdbinit+set}" = set; then
withval="$with_system_gdbinit"
system_gdbinit=${withval}
fi;
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $system_gdbinit`
ac_define_dir=`eval echo $ac_define_dir`
cat >>confdefs.h <<_ACEOF
#define SYSTEM_GDBINIT "$ac_define_dir"
_ACEOF
if test "x$prefix" = xNONE; then
test_prefix=$ac_default_prefix
else
test_prefix=$prefix
fi
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
test_exec_prefix=$test_prefix
else
test_exec_prefix=$exec_prefix
fi
case ${system_gdbinit} in
"${test_prefix}"|"${test_prefix}/"*|\
"${test_exec_prefix}"|"${test_exec_prefix}/"*|\
'${prefix}'|'${prefix}/'*|\
'${exec_prefix}'|'${exec_prefix}/'*)
cat >>confdefs.h <<\_ACEOF
#define SYSTEM_GDBINIT_RELOCATABLE 1
_ACEOF
;;
esac
# Check whether --enable-werror or --disable-werror was given.
if test "${enable_werror+set}" = set; then
enableval="$enable_werror"