---
 gdb-6.3.50/gdb/config.in    |    3 +++
 gdb-6.3.50/gdb/configure    |   15 +++++++++++++++
 gdb-6.3.50/gdb/configure.ac |    8 ++++++++
 gdb-6.3.50/gdb/solib.c      |    3 +++
 4 files changed, 29 insertions(+)

Index: b/gdb-6.3.50/gdb/config.in
===================================================================
--- a/gdb-6.3.50/gdb/config.in
+++ b/gdb-6.3.50/gdb/config.in
@@ -646,3 +646,6 @@
 
 /* Define as `fork' if `vfork' does not work. */
 #undef vfork
+
+/* useful when building cross gcc for particular cross-development environment */
+#undef CONFIG_SOLIB_SEARCH_PATH
Index: b/gdb-6.3.50/gdb/configure
===================================================================
--- a/gdb-6.3.50/gdb/configure
+++ b/gdb-6.3.50/gdb/configure
@@ -891,6 +891,7 @@ Optional Packages:
   --with-itkconfig        Directory containing itk configuration (itkConfig.sh)
   --with-x                use the X Window System
   --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib
+  --with-solib-search-path=DIR:DIR:DIR...   Directories to search for shared libraries on host
 
 Some influential environment variables:
   CC          C compiler command
@@ -6053,6 +6054,19 @@ else
   enable_tui=yes
 fi;
 
+# Check whether --with-solib-search-path or --without-solib-search-path was given.
+if test "${with_solib_search_path+set}" = set; then
+  withval="$with_solib_search_path"
+  with_solib_seach_path=${withval}
+fi;
+
+if test x"${with_solib_seach_path}" != x ; then
+    cat >>confdefs.h <<EOF
+#define CONFIG_SOLIB_SEARCH_PATH "$with_solib_seach_path"
+EOF
+
+fi
+
 # Enable gdbtk.
 # Check whether --enable-gdbtk or --disable-gdbtk was given.
 if test "${enable_gdbtk+set}" = set; then
@@ -22801,6 +22815,7 @@ s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
 s,@WIN32LIBS@,$WIN32LIBS,;t t
 s,@LIBGUI@,$LIBGUI,;t t
 s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
+s,@CONFIG_SOLIB_SEARCH_PATH@,$CONFIG_SOLIB_SEARCH_PATH,;t t
 s,@WIN32LDAPP@,$WIN32LDAPP,;t t
 s,@TCL_VERSION@,$TCL_VERSION,;t t
 s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
Index: b/gdb-6.3.50/gdb/configure.ac
===================================================================
--- a/gdb-6.3.50/gdb/configure.ac
+++ b/gdb-6.3.50/gdb/configure.ac
@@ -185,6 +185,14 @@ AC_ARG_ENABLE(tui,
       AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;;
   esac],enable_tui=yes)
 
+AC_ARG_WITH(solib-search-path, [  --with-solib-search-path=DIR:DIR:DIR...   Directories to search for shared libraries on host], with_solib_seach_path=${withval})
+
+if test x"${with_solib_seach_path}" != x ; then
+    AC_DEFINE_UNQUOTED(CONFIG_SOLIB_SEARCH_PATH,"$with_solib_seach_path")
+fi
+AC_SUBST(CONFIG_SOLIB_SEARCH_PATH)
+
+
 # Enable gdbtk.
 AC_ARG_ENABLE(gdbtk,
 [  --enable-gdbtk          enable gdbtk graphical user interface (GUI)],
Index: b/gdb-6.3.50/gdb/solib.c
===================================================================
--- a/gdb-6.3.50/gdb/solib.c
+++ b/gdb-6.3.50/gdb/solib.c
@@ -974,6 +974,9 @@ For other (relative) files, you can add 
 			    NULL,
 			    &setlist, &showlist);
 
+#ifdef CONFIG_SOLIB_SEARCH_PATH
+  solib_search_path = xstrdup(CONFIG_SOLIB_SEARCH_PATH);
+#endif
   /* Set the default value of "solib-absolute-prefix" from the sysroot, if
      one is set.  */
   solib_absolute_prefix = xstrdup (gdb_sysroot);

