comparison configure.in @ 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
comparison
equal deleted inserted replaced
1173:e9cf8c1b4590 1174:8c43aceeed81
612 AC_ARG_ENABLE(x11-shared, 612 AC_ARG_ENABLE(x11-shared,
613 [ --enable-x11-shared dynamically load X11 support [default=yes]], 613 [ --enable-x11-shared dynamically load X11 support [default=yes]],
614 , enable_x11_shared=yes) 614 , enable_x11_shared=yes)
615 615
616 dnl !!! FIXME: if a platform needs more than this, fill it in! 616 dnl !!! FIXME: if a platform needs more than this, fill it in!
617 x11_lib='libX11.so.6' 617 case "$target" in
618 x11ext_lib='libXext.so.6' 618 *-*-darwin* )
619 x11_lib='/usr/X11R6/lib/libX11.6.dylib'
620 x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
621 ;;
622 *)
623 x11_lib='libX11.so.6'
624 x11ext_lib='libXext.so.6'
625 ;;
626 esac
619 627
620 if test x$have_loadso != xyes && \ 628 if test x$have_loadso != xyes && \
621 test x$enable_x11_shared = xyes; then 629 test x$enable_x11_shared = xyes; then
622 AC_MSG_ERROR([You must have SDL_LoadObject() support]) 630 AC_MSG_ERROR([You must have SDL_LoadObject() support])
623 fi 631 fi
624 632
625 if test x$have_loadso = xyes && \ 633 if test x$have_loadso = xyes && \
626 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then 634 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
627 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -DX11_DYNAMIC=\$(x11_lib) -DX11EXT_DYNAMIC=\$(x11ext_lib) -I$srcdir/include -I$srcdir/src/video" 635 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -DX11_DYNAMIC=\$(x11_lib) -DX11EXT_DYNAMIC=\$(x11ext_lib) -I$srcdir/include -I$srcdir/src/video"
628 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS" 636 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS"
637 echo "-- dynamic libX11 -> $x11_lib"
638 echo "-- dynamic libX11ext -> $x11ext_lib"
629 AC_SUBST(x11_lib) 639 AC_SUBST(x11_lib)
630 AC_SUBST(x11ext_lib) 640 AC_SUBST(x11ext_lib)
631 else 641 else
632 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video" 642 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video"
633 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext" 643 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
763 if test x$video_x11_xme = xyes; then 773 if test x$video_x11_xme = xyes; then
764 CFLAGS="$CFLAGS -DHAVE_XIGXME" 774 CFLAGS="$CFLAGS -DHAVE_XIGXME"
765 SYSTEM_LIBS="$SYSTEM_LIBS -lxme" 775 SYSTEM_LIBS="$SYSTEM_LIBS -lxme"
766 fi 776 fi
767 fi 777 fi
768 fi
769 fi
770 }
771
772
773 dnl Check for X11 on Mac OS X / Darwin
774 CheckMacX11()
775 {
776 AC_ARG_ENABLE(video-x11,
777 [ --enable-video-x11 use X11 video driver [default=no]],
778 , enable_video_x11=no)
779 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
780 AC_PATH_X
781 AC_PATH_XTRA
782 if test x$have_x = xyes; then
783 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video"
784 if test x$ac_cv_func_shmat != xyes; then
785 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
786 fi
787 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
788 VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
789 VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
790 fi 778 fi
791 fi 779 fi
792 } 780 }
793 781
794 dnl Find the X11 DGA 2.0 include and library directories 782 dnl Find the X11 DGA 2.0 include and library directories
2719 have_loadso=yes 2707 have_loadso=yes
2720 CheckDummyVideo 2708 CheckDummyVideo
2721 CheckDiskAudio 2709 CheckDiskAudio
2722 CheckCOCOA 2710 CheckCOCOA
2723 CheckCARBON 2711 CheckCARBON
2724 CheckMacX11 2712 CheckX11
2725 CheckMacGL 2713 CheckMacGL
2726 CheckPTHREAD 2714 CheckPTHREAD
2727 CheckSIGACTION 2715 CheckSIGACTION
2728 CheckAltivec 2716 CheckAltivec
2729 # If either the audio or CD driver is used, add the AudioUnit framework 2717 # If either the audio or CD driver is used, add the AudioUnit framework