Fixed bug #167
authorSam Lantinga <slouken@libsdl.org>
Tue, 21 Mar 2006 09:51:33 +0000
changeset 156950d9888d201d
parent 1568 1f3f39f9cfcf
child 1570 a740bca2a1b1
Fixed bug #167

The configure script parses the value of $X_LIBS when looking at the
--enable-x11-shared, which is getting set on Ubuntu 5.10 to "-L/usr/X11R6/lib"
... however, Ubuntu stores all the Xlib stuff in /usr/lib.

The end result in SDL is that the dynamic X11 stuff gets disabled by default,
unless you override like this:

./configure --x-libraries=/usr/lib
configure.in
     1.1 --- a/configure.in	Tue Mar 21 09:40:01 2006 +0000
     1.2 +++ b/configure.in	Tue Mar 21 09:51:33 2006 +0000
     1.3 @@ -773,11 +773,15 @@
     1.4                      x11ext_lib='libXext.so'
     1.5                      ;;
     1.6                  *)
     1.7 -                    if test "x$X_LIBS" = "x"; then X_LIBS="-L/usr/lib"; fi
     1.8 -                    x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libX11.so.[0-9]/'`]
     1.9 -                    x11_lib=`ls $x11_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
    1.10 -                    x11ext_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libXext.so.[0-9]/'`]
    1.11 -                    x11ext_lib=`ls $x11ext_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
    1.12 +                    x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`]
    1.13 +                    for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib
    1.14 +                    do if test "x$x11_lib" = "x"; then
    1.15 +                           x11_lib=[`ls $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
    1.16 +                       fi
    1.17 +                       if test "x$x11ext_lib" = "x"; then
    1.18 +                           x11ext_lib=[`ls $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
    1.19 +                       fi
    1.20 +                    done
    1.21                      ;;
    1.22              esac
    1.23