configure
changeset 5471 179adad3ae6f
parent 5449 1a6f882e4a55
child 5474 c2a1f62433e1
     1.1 --- a/configure	Fri Mar 11 13:27:25 2011 -0800
     1.2 +++ b/configure	Fri Mar 11 13:56:53 2011 -0800
     1.3 @@ -1537,6 +1537,8 @@
     1.4    --enable-dummyaudio     support the dummy audio driver [default=yes]
     1.5    --enable-video-x11      use X11 video driver [default=yes]
     1.6    --enable-x11-shared     dynamically load X11 support [default=maybe]
     1.7 +  --enable-video-x11-xcursor
     1.8 +                          enable X11 Xcursor support [default=yes]
     1.9    --enable-video-x11-xinerama
    1.10                            enable X11 Xinerama support [default=yes]
    1.11    --enable-video-x11-xinput
    1.12 @@ -3769,13 +3771,13 @@
    1.13  else
    1.14    lt_cv_nm_interface="BSD nm"
    1.15    echo "int some_variable = 0;" > conftest.$ac_ext
    1.16 -  (eval echo "\"\$as_me:3772: $ac_compile\"" >&5)
    1.17 +  (eval echo "\"\$as_me:3774: $ac_compile\"" >&5)
    1.18    (eval "$ac_compile" 2>conftest.err)
    1.19    cat conftest.err >&5
    1.20 -  (eval echo "\"\$as_me:3775: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    1.21 +  (eval echo "\"\$as_me:3777: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    1.22    (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    1.23    cat conftest.err >&5
    1.24 -  (eval echo "\"\$as_me:3778: output\"" >&5)
    1.25 +  (eval echo "\"\$as_me:3780: output\"" >&5)
    1.26    cat conftest.out >&5
    1.27    if $GREP 'External.*some_variable' conftest.out > /dev/null; then
    1.28      lt_cv_nm_interface="MS dumpbin"
    1.29 @@ -5002,7 +5004,7 @@
    1.30    ;;
    1.31  *-*-irix6*)
    1.32    # Find out which ABI we are using.
    1.33 -  echo '#line 5005 "configure"' > conftest.$ac_ext
    1.34 +  echo '#line 5007 "configure"' > conftest.$ac_ext
    1.35    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    1.36    (eval $ac_compile) 2>&5
    1.37    ac_status=$?
    1.38 @@ -6118,7 +6120,7 @@
    1.39  else
    1.40    ac_cv_header_stdc=no
    1.41  fi
    1.42 -rm -f -r conftest*
    1.43 +rm -f conftest*
    1.44  
    1.45  fi
    1.46  
    1.47 @@ -6139,7 +6141,7 @@
    1.48  else
    1.49    ac_cv_header_stdc=no
    1.50  fi
    1.51 -rm -f -r conftest*
    1.52 +rm -f conftest*
    1.53  
    1.54  fi
    1.55  
    1.56 @@ -7163,11 +7165,11 @@
    1.57     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.58     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.59     -e 's:$: $lt_compiler_flag:'`
    1.60 -   (eval echo "\"\$as_me:7166: $lt_compile\"" >&5)
    1.61 +   (eval echo "\"\$as_me:7168: $lt_compile\"" >&5)
    1.62     (eval "$lt_compile" 2>conftest.err)
    1.63     ac_status=$?
    1.64     cat conftest.err >&5
    1.65 -   echo "$as_me:7170: \$? = $ac_status" >&5
    1.66 +   echo "$as_me:7172: \$? = $ac_status" >&5
    1.67     if (exit $ac_status) && test -s "$ac_outfile"; then
    1.68       # The compiler can only warn and ignore the option if not recognized
    1.69       # So say no if there are warnings other than the usual output.
    1.70 @@ -7502,11 +7504,11 @@
    1.71     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.72     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.73     -e 's:$: $lt_compiler_flag:'`
    1.74 -   (eval echo "\"\$as_me:7505: $lt_compile\"" >&5)
    1.75 +   (eval echo "\"\$as_me:7507: $lt_compile\"" >&5)
    1.76     (eval "$lt_compile" 2>conftest.err)
    1.77     ac_status=$?
    1.78     cat conftest.err >&5
    1.79 -   echo "$as_me:7509: \$? = $ac_status" >&5
    1.80 +   echo "$as_me:7511: \$? = $ac_status" >&5
    1.81     if (exit $ac_status) && test -s "$ac_outfile"; then
    1.82       # The compiler can only warn and ignore the option if not recognized
    1.83       # So say no if there are warnings other than the usual output.
    1.84 @@ -7607,11 +7609,11 @@
    1.85     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.86     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.87     -e 's:$: $lt_compiler_flag:'`
    1.88 -   (eval echo "\"\$as_me:7610: $lt_compile\"" >&5)
    1.89 +   (eval echo "\"\$as_me:7612: $lt_compile\"" >&5)
    1.90     (eval "$lt_compile" 2>out/conftest.err)
    1.91     ac_status=$?
    1.92     cat out/conftest.err >&5
    1.93 -   echo "$as_me:7614: \$? = $ac_status" >&5
    1.94 +   echo "$as_me:7616: \$? = $ac_status" >&5
    1.95     if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1.96     then
    1.97       # The compiler can only warn and ignore the option if not recognized
    1.98 @@ -7662,11 +7664,11 @@
    1.99     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.100     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.101     -e 's:$: $lt_compiler_flag:'`
   1.102 -   (eval echo "\"\$as_me:7665: $lt_compile\"" >&5)
   1.103 +   (eval echo "\"\$as_me:7667: $lt_compile\"" >&5)
   1.104     (eval "$lt_compile" 2>out/conftest.err)
   1.105     ac_status=$?
   1.106     cat out/conftest.err >&5
   1.107 -   echo "$as_me:7669: \$? = $ac_status" >&5
   1.108 +   echo "$as_me:7671: \$? = $ac_status" >&5
   1.109     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.110     then
   1.111       # The compiler can only warn and ignore the option if not recognized
   1.112 @@ -10420,7 +10422,7 @@
   1.113    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   1.114    lt_status=$lt_dlunknown
   1.115    cat > conftest.$ac_ext <<_LT_EOF
   1.116 -#line 10423 "configure"
   1.117 +#line 10425 "configure"
   1.118  #include "confdefs.h"
   1.119  
   1.120  #if HAVE_DLFCN_H
   1.121 @@ -10516,7 +10518,7 @@
   1.122    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   1.123    lt_status=$lt_dlunknown
   1.124    cat > conftest.$ac_ext <<_LT_EOF
   1.125 -#line 10519 "configure"
   1.126 +#line 10521 "configure"
   1.127  #include "confdefs.h"
   1.128  
   1.129  #if HAVE_DLFCN_H
   1.130 @@ -14198,11 +14200,11 @@
   1.131     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.132     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.133     -e 's:$: $lt_compiler_flag:'`
   1.134 -   (eval echo "\"\$as_me:14201: $lt_compile\"" >&5)
   1.135 +   (eval echo "\"\$as_me:14203: $lt_compile\"" >&5)
   1.136     (eval "$lt_compile" 2>conftest.err)
   1.137     ac_status=$?
   1.138     cat conftest.err >&5
   1.139 -   echo "$as_me:14205: \$? = $ac_status" >&5
   1.140 +   echo "$as_me:14207: \$? = $ac_status" >&5
   1.141     if (exit $ac_status) && test -s "$ac_outfile"; then
   1.142       # The compiler can only warn and ignore the option if not recognized
   1.143       # So say no if there are warnings other than the usual output.
   1.144 @@ -14297,11 +14299,11 @@
   1.145     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.146     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.147     -e 's:$: $lt_compiler_flag:'`
   1.148 -   (eval echo "\"\$as_me:14300: $lt_compile\"" >&5)
   1.149 +   (eval echo "\"\$as_me:14302: $lt_compile\"" >&5)
   1.150     (eval "$lt_compile" 2>out/conftest.err)
   1.151     ac_status=$?
   1.152     cat out/conftest.err >&5
   1.153 -   echo "$as_me:14304: \$? = $ac_status" >&5
   1.154 +   echo "$as_me:14306: \$? = $ac_status" >&5
   1.155     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.156     then
   1.157       # The compiler can only warn and ignore the option if not recognized
   1.158 @@ -14349,11 +14351,11 @@
   1.159     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.160     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.161     -e 's:$: $lt_compiler_flag:'`
   1.162 -   (eval echo "\"\$as_me:14352: $lt_compile\"" >&5)
   1.163 +   (eval echo "\"\$as_me:14354: $lt_compile\"" >&5)
   1.164     (eval "$lt_compile" 2>out/conftest.err)
   1.165     ac_status=$?
   1.166     cat out/conftest.err >&5
   1.167 -   echo "$as_me:14356: \$? = $ac_status" >&5
   1.168 +   echo "$as_me:14358: \$? = $ac_status" >&5
   1.169     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.170     then
   1.171       # The compiler can only warn and ignore the option if not recognized
   1.172 @@ -15962,7 +15964,7 @@
   1.173  else
   1.174    ac_cv_header_stdc=no
   1.175  fi
   1.176 -rm -f -r conftest*
   1.177 +rm -f conftest*
   1.178  
   1.179  fi
   1.180  
   1.181 @@ -15983,7 +15985,7 @@
   1.182  else
   1.183    ac_cv_header_stdc=no
   1.184  fi
   1.185 -rm -f -r conftest*
   1.186 +rm -f conftest*
   1.187  
   1.188  fi
   1.189  
   1.190 @@ -16374,7 +16376,7 @@
   1.191  else
   1.192    ac_cv_define_M_PI=no
   1.193  fi
   1.194 -rm -f -r conftest*
   1.195 +rm -f conftest*
   1.196  
   1.197  
   1.198  fi
   1.199 @@ -16571,7 +16573,7 @@
   1.200  else
   1.201    ac_cv_os_cray=no
   1.202  fi
   1.203 -rm -f -r conftest*
   1.204 +rm -f conftest*
   1.205  
   1.206  fi
   1.207  { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
   1.208 @@ -22639,7 +22641,7 @@
   1.209        eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
   1.210      done
   1.211      # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
   1.212 -    for ac_extension in a so sl dylib la dll; do
   1.213 +    for ac_extension in a so sl; do
   1.214        if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
   1.215  	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
   1.216  	ac_im_usrlibdir=$ac_im_libdir; break
   1.217 @@ -22792,7 +22794,7 @@
   1.218  for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
   1.219  do
   1.220    # Don't even attempt the hair of trying to link an X program!
   1.221 -  for ac_extension in a so sl dylib la dll; do
   1.222 +  for ac_extension in a so sl; do
   1.223      if test -r "$ac_dir/libX11.$ac_extension"; then
   1.224        ac_x_libraries=$ac_dir
   1.225        break 2
   1.226 @@ -23928,10 +23930,11 @@
   1.227  
   1.228  
   1.229              case "$host" in
   1.230 -                *-*-darwin*) # Latest Mac OS X actually ships with Xrandr/Xrender libs...
   1.231 +                *-*-darwin*)
   1.232                      x11_symbols_private=yes
   1.233                      x11_lib='/usr/X11R6/lib/libX11.6.dylib'
   1.234                      x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
   1.235 +                    xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
   1.236                      xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
   1.237                      xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
   1.238                      xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
   1.239 @@ -23942,6 +23945,7 @@
   1.240                  *)
   1.241                      x11_lib=`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.242                      x11ext_lib=`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.243 +                    xcursor_lib=`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.244                      xinerama_lib=`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.245                      xinput_lib=`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.246                      xrandr_lib=`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.247 @@ -23998,6 +24002,154 @@
   1.248              fi
   1.249              have_video=yes
   1.250  
   1.251 +            # Check whether --enable-video-x11-xcursor was given.
   1.252 +if test "${enable_video_x11_xcursor+set}" = set; then
   1.253 +  enableval=$enable_video_x11_xcursor;
   1.254 +else
   1.255 +  enable_video_x11_xcursor=yes
   1.256 +fi
   1.257 +
   1.258 +            if test x$enable_video_x11_xcursor = xyes; then
   1.259 +                definitely_enable_video_x11_xcursor=no
   1.260 +                { echo "$as_me:$LINENO: checking for X11/Xcursor/Xcursor.h" >&5
   1.261 +echo $ECHO_N "checking for X11/Xcursor/Xcursor.h... $ECHO_C" >&6; }
   1.262 +if test "${ac_cv_header_X11_Xcursor_Xcursor_h+set}" = set; then
   1.263 +  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.264 +else
   1.265 +  cat >conftest.$ac_ext <<_ACEOF
   1.266 +/* confdefs.h.  */
   1.267 +_ACEOF
   1.268 +cat confdefs.h >>conftest.$ac_ext
   1.269 +cat >>conftest.$ac_ext <<_ACEOF
   1.270 +/* end confdefs.h.  */
   1.271 +#include <X11/Xlib.h>
   1.272 +
   1.273 +
   1.274 +#include <X11/Xcursor/Xcursor.h>
   1.275 +_ACEOF
   1.276 +rm -f conftest.$ac_objext
   1.277 +if { (ac_try="$ac_compile"
   1.278 +case "(($ac_try" in
   1.279 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.280 +  *) ac_try_echo=$ac_try;;
   1.281 +esac
   1.282 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.283 +  (eval "$ac_compile") 2>conftest.er1
   1.284 +  ac_status=$?
   1.285 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.286 +  rm -f conftest.er1
   1.287 +  cat conftest.err >&5
   1.288 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.289 +  (exit $ac_status); } && {
   1.290 +	 test -z "$ac_c_werror_flag" ||
   1.291 +	 test ! -s conftest.err
   1.292 +       } && test -s conftest.$ac_objext; then
   1.293 +  ac_cv_header_X11_Xcursor_Xcursor_h=yes
   1.294 +else
   1.295 +  echo "$as_me: failed program was:" >&5
   1.296 +sed 's/^/| /' conftest.$ac_ext >&5
   1.297 +
   1.298 +	ac_cv_header_X11_Xcursor_Xcursor_h=no
   1.299 +fi
   1.300 +
   1.301 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.302 +fi
   1.303 +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xcursor_Xcursor_h" >&5
   1.304 +echo "${ECHO_T}$ac_cv_header_X11_Xcursor_Xcursor_h" >&6; }
   1.305 +if test $ac_cv_header_X11_Xcursor_Xcursor_h = yes; then
   1.306 +  have_xcursor_h_hdr=yes
   1.307 +else
   1.308 +  have_xcursor_h_hdr=no
   1.309 +fi
   1.310 +
   1.311 +
   1.312 +                if test x$have_xcursor_h_hdr = xyes; then
   1.313 +                    if test x$enable_x11_shared = xyes && test x$xcursor_lib != x ; then
   1.314 +                        echo "-- dynamic libXcursor -> $xcursor_lib"
   1.315 +                        cat >>confdefs.h <<_ACEOF
   1.316 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "$xcursor_lib"
   1.317 +_ACEOF
   1.318 +
   1.319 +                        definitely_enable_video_x11_xcursor=yes
   1.320 +                    else
   1.321 +                        { echo "$as_me:$LINENO: checking for XcursorImageCreate in -lXcursor" >&5
   1.322 +echo $ECHO_N "checking for XcursorImageCreate in -lXcursor... $ECHO_C" >&6; }
   1.323 +if test "${ac_cv_lib_Xcursor_XcursorImageCreate+set}" = set; then
   1.324 +  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.325 +else
   1.326 +  ac_check_lib_save_LIBS=$LIBS
   1.327 +LIBS="-lXcursor  $LIBS"
   1.328 +cat >conftest.$ac_ext <<_ACEOF
   1.329 +/* confdefs.h.  */
   1.330 +_ACEOF
   1.331 +cat confdefs.h >>conftest.$ac_ext
   1.332 +cat >>conftest.$ac_ext <<_ACEOF
   1.333 +/* end confdefs.h.  */
   1.334 +
   1.335 +/* Override any GCC internal prototype to avoid an error.
   1.336 +   Use char because int might match the return type of a GCC
   1.337 +   builtin and then its argument prototype would still apply.  */
   1.338 +#ifdef __cplusplus
   1.339 +extern "C"
   1.340 +#endif
   1.341 +char XcursorImageCreate ();
   1.342 +int
   1.343 +main ()
   1.344 +{
   1.345 +return XcursorImageCreate ();
   1.346 +  ;
   1.347 +  return 0;
   1.348 +}
   1.349 +_ACEOF
   1.350 +rm -f conftest.$ac_objext conftest$ac_exeext
   1.351 +if { (ac_try="$ac_link"
   1.352 +case "(($ac_try" in
   1.353 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.354 +  *) ac_try_echo=$ac_try;;
   1.355 +esac
   1.356 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.357 +  (eval "$ac_link") 2>conftest.er1
   1.358 +  ac_status=$?
   1.359 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.360 +  rm -f conftest.er1
   1.361 +  cat conftest.err >&5
   1.362 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.363 +  (exit $ac_status); } && {
   1.364 +	 test -z "$ac_c_werror_flag" ||
   1.365 +	 test ! -s conftest.err
   1.366 +       } && test -s conftest$ac_exeext &&
   1.367 +       $as_test_x conftest$ac_exeext; then
   1.368 +  ac_cv_lib_Xcursor_XcursorImageCreate=yes
   1.369 +else
   1.370 +  echo "$as_me: failed program was:" >&5
   1.371 +sed 's/^/| /' conftest.$ac_ext >&5
   1.372 +
   1.373 +	ac_cv_lib_Xcursor_XcursorImageCreate=no
   1.374 +fi
   1.375 +
   1.376 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
   1.377 +      conftest$ac_exeext conftest.$ac_ext
   1.378 +LIBS=$ac_check_lib_save_LIBS
   1.379 +fi
   1.380 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xcursor_XcursorImageCreate" >&5
   1.381 +echo "${ECHO_T}$ac_cv_lib_Xcursor_XcursorImageCreate" >&6; }
   1.382 +if test $ac_cv_lib_Xcursor_XcursorImageCreate = yes; then
   1.383 +  have_xcursor_lib=yes
   1.384 +fi
   1.385 +
   1.386 +                        if test x$have_xcursor_lib = xyes ; then
   1.387 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXcursor"
   1.388 +                            definitely_enable_video_x11_xcursor=yes
   1.389 +                        fi
   1.390 +                    fi
   1.391 +                fi
   1.392 +            fi
   1.393 +            if test x$definitely_enable_video_x11_xcursor = xyes; then
   1.394 +                cat >>confdefs.h <<\_ACEOF
   1.395 +#define SDL_VIDEO_DRIVER_X11_XCURSOR 1
   1.396 +_ACEOF
   1.397 +
   1.398 +            fi
   1.399              # Check whether --enable-video-x11-xinerama was given.
   1.400  if test "${enable_video_x11_xinerama+set}" = set; then
   1.401    enableval=$enable_video_x11_xinerama;