Skip to content

Commit

Permalink
Enable dynamic X11 on Mac OS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Nov 17, 2005
1 parent 22d1555 commit ac89c74
Showing 1 changed file with 13 additions and 25 deletions.
38 changes: 13 additions & 25 deletions configure.in
Expand Up @@ -614,8 +614,16 @@ CheckX11()
, 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
Expand All @@ -626,6 +634,8 @@ CheckX11()
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
Expand Down Expand Up @@ -769,28 +779,6 @@ CheckX11()
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()
{
Expand Down Expand Up @@ -2721,7 +2709,7 @@ case "$target" in
CheckDiskAudio
CheckCOCOA
CheckCARBON
CheckMacX11
CheckX11
CheckMacGL
CheckPTHREAD
CheckSIGACTION
Expand Down

0 comments on commit ac89c74

Please sign in to comment.