summaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-05-11 18:13:22 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-05-11 18:13:22 +0000
commite7dce50ad0b3c0437d3d4541bc4197cd2452baab (patch)
tree2f064034e40ee9572fc1f59a57df2c7ee130d9cc /gdb/configure.ac
parent27e670ef3c91ca1f6146ef0da19df2e8fd5fb938 (diff)
downloadgdb-e7dce50ad0b3c0437d3d4541bc4197cd2452baab.tar.gz
gdb/
Provide $ddir substitution for --with-auto-load-safe-path. * NEWS (--with-auto-load-safe-path, --without-auto-load-safe-path): New entries. * auto-load.c: Include observer.h. (auto_load_safe_path_vec_update): Call substitute_path_component for each component. New variable ddir_subst. (auto_load_gdb_datadir_changed): New function. (set_auto_load_safe_path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH. New comment. (_initialize_auto_load): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH. Install auto_load_gdb_datadir_changed. * config.in: Regenerate. * configure: Regenerate. * configure.ac (--auto-load-safe-path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH. Default to GDB_DATADIR/auto-load. * defs.h (substitute_path_component): New declaration. * top.c: Include observer.h. (set_gdb_datadir): New function. (init_main): Install it for "set data-directory". * utils.c (substitute_path_component): New function. gdb/doc/ Provide $ddir substitution for --with-auto-load-safe-path. * gdb.texinfo (Auto-loading): Replace /usr/local by $ddir/auto-load. (Auto-loading safe path): Likewise. Mention the default value, $ddir substitution, --with-auto-load-safe-path and --without-auto-load-safe-path. * observer.texi (gdb_datadir_changed): New.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac17
1 files changed, 10 insertions, 7 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index ce7515b195c..1a889d9c697 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -138,13 +138,16 @@ AS_HELP_STRING([--with-relocated-sources=PATH], [automatically relocate this pat
AC_MSG_CHECKING([for default auto-load safe-path])
AC_ARG_WITH(auto-load-safe-path,
-AS_HELP_STRING([--with-auto-load-safe-path=PATH], [directories safe to hold auto-loaded files])
-AS_HELP_STRING([--without-auto-load-safe-path], [do not restrict auto-loaded files locations]),
-[if test "$with_auto_load_safe_path" = "no"; then
- with_auto_load_safe_path="/"
- fi],
-[with_auto_load_safe_path="$prefix"])
-AC_DEFINE_DIR(DEFAULT_AUTO_LOAD_SAFE_PATH, with_auto_load_safe_path,
+AS_HELP_STRING([--with-auto-load-safe-path=PATH],
+ [directories safe to hold auto-loaded files, use $ddir for --with-gdb-datadir path @<:@$ddir/auto-load@:>@])
+AS_HELP_STRING([--without-auto-load-safe-path],
+ [do not restrict auto-loaded files locations]),
+ [if test "$with_auto_load_safe_path" = "no"; then
+ with_auto_load_safe_path="/"
+ fi],
+[with_auto_load_safe_path='$ddir/auto-load'])
+escape_dir=`echo $with_auto_load_safe_path | sed 's/[[$]]ddir\>/\\\\\\\\\\\\&/g'`
+AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
[Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path])