configure.in
changeset 1569 50d9888d201d
parent 1567 12b6d331d82a
child 1571 0160eb7cccee
--- a/configure.in	Tue Mar 21 09:40:01 2006 +0000
+++ b/configure.in	Tue Mar 21 09:51:33 2006 +0000
@@ -773,11 +773,15 @@
                     x11ext_lib='libXext.so'
                     ;;
                 *)
-                    if test "x$X_LIBS" = "x"; then X_LIBS="-L/usr/lib"; fi
-                    x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libX11.so.[0-9]/'`]
-                    x11_lib=`ls $x11_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
-                    x11ext_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libXext.so.[0-9]/'`]
-                    x11ext_lib=`ls $x11ext_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
+                    x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`]
+                    for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib
+                    do if test "x$x11_lib" = "x"; then
+                           x11_lib=[`ls $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
+                       fi
+                       if test "x$x11ext_lib" = "x"; then
+                           x11ext_lib=[`ls $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
+                       fi
+                    done
                     ;;
             esac