Author: akira yamada <akira@debian.org>
Description: Debian specific patch
--- a/configure.in
+++ b/configure.in
@@ -1852,6 +1852,19 @@ if test "$search_path" != ""; then
     AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path")
 fi
 
+AC_ARG_WITH(extra-site-search-path,
+		[  --with-extra-site-search-path=DIR specify the extra site search path],
+		[extra_site_search_path=$withval])
+if test "$extra_site_search_path" != ""; then
+    AC_DEFINE_UNQUOTED(RUBY_EXTRA_SITE_SEARCH_PATH,"$extra_site_search_path")
+fi
+AC_ARG_WITH(extra-search-path,
+		[  --with--site-search-path=DIR specify the extra search path],
+		[extra_search_path=$withval])
+if test "$extra_search_path" != ""; then
+    AC_DEFINE_UNQUOTED(RUBY_EXTRA_SEARCH_PATH,"$extra_search_path")
+fi
+
 AC_ARG_WITH(mantype,
 		[  --with-mantype=TYPE specify man page type; TYPE is one of man and doc],
 		[
--- a/ruby.c
+++ b/ruby.c
@@ -320,6 +320,9 @@ ruby_init_loadpath()
     incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB));
 #endif
     incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
+#ifdef RUBY_EXTRA_SITE_SEARCH_PATH
+    ruby_incpush(RUBY_RELATIVE(RUBY_EXTRA_SITE_SEARCH_PATH));
+#endif
     incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
 
     incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2));
@@ -334,6 +337,9 @@ ruby_init_loadpath()
     incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
 #endif
     incpush(RUBY_RELATIVE(RUBY_ARCHLIB));
+#ifdef RUBY_EXTRA_SEARCH_PATH
+    ruby_incpush(RUBY_RELATIVE(RUBY_EXTRA_SEARCH_PATH));
+#endif
 
     if (rb_safe_level() == 0) {
 	incpush(".");
