From 0c4a40633c767da2c7659a3f460cf1e8e3dd3a5c Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 27 May 2010 03:40:45 +0000 Subject: Allow python to find its files if moved from original location. * acinclude.m4 (GDB_AC_DEFINE_RELOCATABLE): New function. (GDB_AC_WITH_DIR): Call it. * configure.ac: Define WITH_PYTHON_PATH if we can find the python installation directory. * config.in: Regenerate. * configure: Regenerate. * defs.h (python_libdir): Declare. * main.c (python_libdir): Define. (captured_main): Initialize python_libdir. * python/python.c (_initialize_python): #ifdef WITH_PYTHON_PATH, call Py_SetProgramName to make sure python can find its libraries and modules. --- gdb/defs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/defs.h') diff --git a/gdb/defs.h b/gdb/defs.h index b18e03f..a727a4b 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -157,6 +157,10 @@ extern char *gdb_sysroot; /* GDB datadir, used to store data files. */ extern char *gdb_datadir; +/* If non-NULL, the possibly relocated path to python's "lib" directory + specified with --with-python. */ +extern char *python_libdir; + /* Search path for separate debug files. */ extern char *debug_file_directory; -- cgit v1.1