--- configure.ORIG        Sat Dec 24 13:21:58 2005
+++ configure        Thu Dec 22 11:31:08 2005
@@ -5,6 +5,9 @@
 #
 # History / Contributors: check the cvs log !
 #
+# 2005.08.07 hacked by wdw to add -R flag option for extra libs
+# so executables can specify full paths to extra libs.
+#
 # Cleanups all over the place (c) 2001 pl
 #
 #
@@ -327,6 +330,7 @@
 multiple paths separated by ':'):
   --with-extraincdir=DIR   extra headers (png, mad, sdl, ...) in DIR (*)
   --with-extralibdir=DIR   extra library files (png, mad, sdl, ...) in DIR (*)
+  --use-R-option           adds -R to extralibdir -- specify before extralibdir
   --with-x11incdir=DIR     X headers in DIR (*)
   --with-x11libdir=DIR     X library files in DIR (*)
   --with-dxr2incdir=DIR    DXR2 headers in DIR (*)
@@ -407,8 +411,17 @@
   --with-extraincdir=*)
     _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
     ;;
+  --use-R-option)
+    _ld_R_option=R-option
+    ;;
   --with-extralibdir=*)
     _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
+    if [ "$_ld_R_option" = "R-option" ]
+    then
+       _ld_R_extra=-R`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -R,g'`
+       _ld_extra="$_ld_extra $_ld_R_extra"
+    fi
+
     ;;
   --enable-runtime-cpudetection)
     _runtime_cpudetection=yes
@@ -1423,6 +1436,7 @@
   --enable-static*) ;;
   --disable-static*) ;;
   --with-extraincdir=*) ;;
+  --use-R-option) ;;
   --with-extralibdir=*) ;;
   --enable-runtime-cpudetection) ;;
   --disable-runtime-cpudetection) ;;