changeset 1174:8c43aceeed81

Enable dynamic X11 on Mac OS X.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 17 Nov 2005 03:16:01 +0000
parents e9cf8c1b4590
children 867f521591e5
files configure.in
diffstat 1 files changed, 13 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Thu Nov 17 03:15:05 2005 +0000
+++ b/configure.in	Thu Nov 17 03:16:01 2005 +0000
@@ -614,8 +614,16 @@
                           , enable_x11_shared=yes)
 
             dnl !!! FIXME: if a platform needs more than this, fill it in!
-            x11_lib='libX11.so.6'
-            x11ext_lib='libXext.so.6'
+            case "$target" in
+                *-*-darwin* )
+                    x11_lib='/usr/X11R6/lib/libX11.6.dylib'
+                    x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
+                    ;;
+                *)
+                    x11_lib='libX11.so.6'
+                    x11ext_lib='libXext.so.6'
+                    ;;
+            esac
 
             if test x$have_loadso != xyes && \
                test x$enable_x11_shared = xyes; then
@@ -626,6 +634,8 @@
                test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
                 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -DX11_DYNAMIC=\$(x11_lib) -DX11EXT_DYNAMIC=\$(x11ext_lib) -I$srcdir/include -I$srcdir/src/video"
                 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS"
+                echo "-- dynamic libX11 -> $x11_lib"
+                echo "-- dynamic libX11ext -> $x11ext_lib"
                 AC_SUBST(x11_lib)
                 AC_SUBST(x11ext_lib)
             else
@@ -769,28 +779,6 @@
     fi
 }
 
-
-dnl Check for X11 on Mac OS X / Darwin
-CheckMacX11()
-{
-    AC_ARG_ENABLE(video-x11,
-[  --enable-video-x11      use X11 video driver [default=no]],
-                  , enable_video_x11=no)
-    if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
-        AC_PATH_X
-        AC_PATH_XTRA
-        if test x$have_x = xyes; then
-            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video"
-            if test x$ac_cv_func_shmat != xyes; then
-                CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
-            fi
-            SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
-            VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
-            VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
-        fi
-    fi
-}
-
 dnl Find the X11 DGA 2.0 include and library directories
 CheckDGA()
 {
@@ -2721,7 +2709,7 @@
         CheckDiskAudio
         CheckCOCOA
         CheckCARBON
-        CheckMacX11
+        CheckX11
         CheckMacGL
         CheckPTHREAD
         CheckSIGACTION