diff options
author | Jerome Guitton <guitton@adacore.com> | 2009-01-28 15:01:00 +0000 |
---|---|---|
committer | Jerome Guitton <guitton@adacore.com> | 2009-01-28 15:01:00 +0000 |
commit | 16e7150e45f1220e9aafb85a80b967b43f93d75b (patch) | |
tree | d32a16cdfb91a052da606685f6191eff3a49b924 /gdb/configure | |
parent | 159073e6aa7586b0bc132f4e5f1c578c137b158b (diff) | |
download | gdb-16e7150e45f1220e9aafb85a80b967b43f93d75b.zip gdb-16e7150e45f1220e9aafb85a80b967b43f93d75b.tar.gz gdb-16e7150e45f1220e9aafb85a80b967b43f93d75b.tar.bz2 |
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.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure index 59681f5..ede5504 100755 --- a/gdb/configure +++ b/gdb/configure @@ -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" |