configure.in
changeset 5471 179adad3ae6f
parent 5448 8090caeed230
child 5475 9c07ec632b24
     1.1 --- a/configure.in	Fri Mar 11 13:27:25 2011 -0800
     1.2 +++ b/configure.in	Fri Mar 11 13:56:53 2011 -0800
     1.3 @@ -1023,10 +1023,11 @@
     1.4                            , enable_x11_shared=maybe)
     1.5  
     1.6              case "$host" in
     1.7 -                *-*-darwin*) # Latest Mac OS X actually ships with Xrandr/Xrender libs...
     1.8 +                *-*-darwin*)
     1.9                      x11_symbols_private=yes
    1.10                      x11_lib='/usr/X11R6/lib/libX11.6.dylib'
    1.11                      x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
    1.12 +                    xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
    1.13                      xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
    1.14                      xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
    1.15                      xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
    1.16 @@ -1037,6 +1038,7 @@
    1.17                  *)
    1.18                      x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.19                      x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.20 +                    xcursor_lib=[`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.21                      xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.22                      xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.23                      xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.24 @@ -1082,6 +1084,33 @@
    1.25              fi
    1.26              have_video=yes
    1.27  
    1.28 +            AC_ARG_ENABLE(video-x11-xcursor,
    1.29 +AC_HELP_STRING([--enable-video-x11-xcursor], [enable X11 Xcursor support [[default=yes]]]),
    1.30 +                            , enable_video_x11_xcursor=yes)
    1.31 +            if test x$enable_video_x11_xcursor = xyes; then
    1.32 +                definitely_enable_video_x11_xcursor=no
    1.33 +                AC_CHECK_HEADER(X11/Xcursor/Xcursor.h,
    1.34 +                                have_xcursor_h_hdr=yes,
    1.35 +                                have_xcursor_h_hdr=no,
    1.36 +                                [#include <X11/Xlib.h>
    1.37 +                                ])
    1.38 +                if test x$have_xcursor_h_hdr = xyes; then
    1.39 +                    if test x$enable_x11_shared = xyes && test x$xcursor_lib != x ; then
    1.40 +                        echo "-- dynamic libXcursor -> $xcursor_lib"
    1.41 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR, "$xcursor_lib")
    1.42 +                        definitely_enable_video_x11_xcursor=yes
    1.43 +                    else
    1.44 +                        AC_CHECK_LIB(Xcursor, XcursorImageCreate, have_xcursor_lib=yes)
    1.45 +                        if test x$have_xcursor_lib = xyes ; then
    1.46 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXcursor"
    1.47 +                            definitely_enable_video_x11_xcursor=yes
    1.48 +                        fi
    1.49 +                    fi
    1.50 +                fi
    1.51 +            fi
    1.52 +            if test x$definitely_enable_video_x11_xcursor = xyes; then
    1.53 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XCURSOR)
    1.54 +            fi
    1.55              AC_ARG_ENABLE(video-x11-xinerama,
    1.56  AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
    1.57                              , enable_video_x11_xinerama=yes)