aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorJerome Guitton <guitton@adacore.com>2009-01-28 15:01:00 +0000
committerJerome Guitton <guitton@adacore.com>2009-01-28 15:01:00 +0000
commit16e7150e45f1220e9aafb85a80b967b43f93d75b (patch)
treed32a16cdfb91a052da606685f6191eff3a49b924 /gdb/configure.ac
parent159073e6aa7586b0bc132f4e5f1c578c137b158b (diff)
downloadgdb-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.ac')
-rw-r--r--gdb/configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 56d40ad..c07eb10 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1489,6 +1489,34 @@ AC_ARG_WITH(sysroot,
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+system_gdbinit=
+AC_ARG_WITH(system-gdbinit,
+[ --with-system-gdbinit=file Automatically load a system-wide gdbinit file],
+[system_gdbinit=${withval}])
+
+AC_DEFINE_DIR(SYSTEM_GDBINIT, system_gdbinit,
+ [System-wide gdbinit file.])
+
+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}/'*)
+ AC_DEFINE(SYSTEM_GDBINIT_RELOCATABLE, 1,
+ [Define if the system-wide gdbinit file should be relocated when GDB is moved.])
+ ;;
+esac
+
AC_ARG_ENABLE(werror,
[ --enable-werror treat compile warnings as errors],
[case "${enableval}" in