configure.in
changeset 292 eadc0746dfaf
parent 286 3ea69fd0b095
child 294 d2d48e10f370
     1.1 --- a/configure.in	Sat Mar 02 16:50:35 2002 +0000
     1.2 +++ b/configure.in	Tue Mar 05 19:55:32 2002 +0000
     1.3 @@ -372,7 +372,7 @@
     1.4  CheckNAS()
     1.5  {
     1.6      AC_ARG_ENABLE(nas,
     1.7 -[  --enable-nas		  support the NAS audio API [default=yes]],
     1.8 +[  --enable-nas                  support the NAS audio API [default=yes]],
     1.9                    , enable_nas=yes)
    1.10      if test x$enable_audio = xyes -a x$enable_nas = xyes; then
    1.11          AC_MSG_CHECKING(for NAS audio support)
    1.12 @@ -394,7 +394,7 @@
    1.13  CheckDiskAudio()
    1.14  {
    1.15      AC_ARG_ENABLE(diskaudio,
    1.16 -[  --enable-diskaudio  	  support the disk writer audio driver [default=yes]],
    1.17 +[  --enable-diskaudio            support the disk writer audio driver [default=yes]],
    1.18                    , enable_diskaudio=yes)
    1.19      if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
    1.20          CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
    1.21 @@ -445,44 +445,44 @@
    1.22  dnl Find the nanox include and library directories
    1.23  CheckNANOX()
    1.24  {
    1.25 -	AC_ARG_ENABLE(video-nanox,
    1.26 -		[  --enable-video-nanox use nanox video driver [default=no]],
    1.27 -	        , enable_video_nanox=no)
    1.28 -	AC_ARG_ENABLE(nanox-debug,  
    1.29 -		[  --enable-nanox-debug print debug messages [default=no]],
    1.30 -		, enable_nanox_debug=no)
    1.31 -	AC_ARG_ENABLE(nanox-share-memory,  
    1.32 -		[  --enable-nanox-share-memory use share memory [default=no]],
    1.33 -		, enable_nanox_share_memory=no)
    1.34 +    AC_ARG_ENABLE(video-nanox,
    1.35 +        [  --enable-video-nanox use nanox video driver [default=no]],
    1.36 +        , enable_video_nanox=no)
    1.37 +    AC_ARG_ENABLE(nanox-debug,  
    1.38 +        [  --enable-nanox-debug print debug messages [default=no]],
    1.39 +        , enable_nanox_debug=no)
    1.40 +    AC_ARG_ENABLE(nanox-share-memory,  
    1.41 +        [  --enable-nanox-share-memory use share memory [default=no]],
    1.42 +        , enable_nanox_share_memory=no)
    1.43  
    1.44 -	AC_ARG_WITH(nanox_pixel_type, 
    1.45 -		[  --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]])
    1.46 +    AC_ARG_WITH(nanox_pixel_type, 
    1.47 +        [  --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]])
    1.48  
    1.49 -	if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
    1.50 -		if test x$enable_nanox_debug = xyes; then
    1.51 -			CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
    1.52 -		fi
    1.53 +    if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
    1.54 +        if test x$enable_nanox_debug = xyes; then
    1.55 +            CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
    1.56 +        fi
    1.57  
    1.58 -		if test x$enable_nanox_share_memory = xyes; then
    1.59 -			CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
    1.60 -		fi
    1.61 +        if test x$enable_nanox_share_memory = xyes; then
    1.62 +            CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
    1.63 +        fi
    1.64  
    1.65 -		case "$with_nanox_pixel_type" in
    1.66 -			 rgb) CFLAGS="$CFLAGS -DNANOX_PIXEL_RGB" ;;
    1.67 -			0888) CFLAGS="$CFLAGS -DNANOX_PIXEL_0888" ;;
    1.68 -			 888) CFLAGS="$CFLAGS -DNANOX_PIXEL_888"  ;;
    1.69 -			 565) CFLAGS="$CFLAGS -DNANOX_PIXEL_565"  ;;
    1.70 -			 555) CFLAGS="$CFLAGS -DNANOX_PIXEL_555"  ;;
    1.71 -			 332) CFLAGS="$CFLAGS -DNANOX_PIXEL_332"  ;;
    1.72 -			 pal) CFLAGS="$CFLAGS -DNANOX_PIXEL_PAL"  ;;
    1.73 -			   *) AC_MSG_ERROR([Invalid nanox_pixel_type]);;
    1.74 -		esac
    1.75 +        case "$with_nanox_pixel_type" in
    1.76 +             rgb) CFLAGS="$CFLAGS -DNANOX_PIXEL_RGB" ;;
    1.77 +            0888) CFLAGS="$CFLAGS -DNANOX_PIXEL_0888" ;;
    1.78 +             888) CFLAGS="$CFLAGS -DNANOX_PIXEL_888"  ;;
    1.79 +             565) CFLAGS="$CFLAGS -DNANOX_PIXEL_565"  ;;
    1.80 +             555) CFLAGS="$CFLAGS -DNANOX_PIXEL_555"  ;;
    1.81 +             332) CFLAGS="$CFLAGS -DNANOX_PIXEL_332"  ;;
    1.82 +             pal) CFLAGS="$CFLAGS -DNANOX_PIXEL_PAL"  ;;
    1.83 +               *) AC_MSG_ERROR([Invalid nanox_pixel_type]);;
    1.84 +        esac
    1.85  
    1.86 -		CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
    1.87 -		SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
    1.88 -		VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
    1.89 -		VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
    1.90 -	fi
    1.91 +        CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
    1.92 +        SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
    1.93 +        VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
    1.94 +        VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
    1.95 +    fi
    1.96  }
    1.97  
    1.98  dnl Find the X11 include and library directories
    1.99 @@ -495,7 +495,7 @@
   1.100          AC_PATH_X
   1.101          AC_PATH_XTRA
   1.102          if test x$have_x = xyes; then
   1.103 -            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11"
   1.104 +            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -Isrc/video"
   1.105              if test x$ac_cv_func_shmat != xyes; then
   1.106                  CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
   1.107              fi
   1.108 @@ -511,7 +511,7 @@
   1.109                  video_x11_vm=no
   1.110                  AC_TRY_COMPILE([
   1.111                   #include <X11/Xlib.h>
   1.112 -                 #include <X11/extensions/xf86vmode.h>
   1.113 +                 #include <XFree86/extensions/xf86vmode.h>
   1.114                  ],[
   1.115                  ],[
   1.116                  video_x11_vm=yes
   1.117 @@ -519,34 +519,15 @@
   1.118                  AC_MSG_RESULT($video_x11_vm)
   1.119                  if test x$video_x11_vm = xyes; then
   1.120                      CFLAGS="$CFLAGS -DXFREE86_VM"
   1.121 -                    # Check for nasty XFree86 4.0/Glide hack
   1.122 -                    AC_ARG_ENABLE(xfree86_glidehack,
   1.123 -[  --enable-xfree86-glidehack Alternate vidmode lib for old Glide [default=no]],
   1.124 -                                  , enable_xfreeglidehack=no)
   1.125 -                    if test x$enable_xfree86_glidehack = xyes; then
   1.126 -                        ac_save_libs="$LIBS"
   1.127 -                        LIBS="$LIBS $X_LIBS -lX11 -lXext"
   1.128 -                        if test x$xfree86_glidehack = x; then
   1.129 -                            AC_CHECK_LIB(Xxf86vm, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm)
   1.130 -                        fi
   1.131 -                        if test x$xfree86_glidehack = x; then
   1.132 -                            AC_CHECK_LIB(Xxf86vm40, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm40)
   1.133 -                        fi
   1.134 -                        LIBS="$ac_save_libs"
   1.135 -                    fi
   1.136 -                    if test x$xfree86_glidehack != x; then
   1.137 -                        CFLAGS="$CFLAGS -DXFREE86_VM_DYNAMIC_HACK"
   1.138 -                        SYSTEM_LIBS="$SYSTEM_LIBS -l$xfree86_glidehack"
   1.139 -                    else
   1.140 -                        SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86vm"
   1.141 -                    fi
   1.142 +                    VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86vm"
   1.143 +                    VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86vm/libXFree86_Xxf86vm.la"
   1.144                      AC_MSG_CHECKING(for XFree86 VidMode gamma support)
   1.145                      video_x11_vmgamma=no
   1.146                      AC_TRY_COMPILE([
   1.147                       #include <X11/Xlib.h>
   1.148 -                     #include <X11/extensions/xf86vmode.h>
   1.149 +                     #include <XFree86/extensions/xf86vmode.h>
   1.150                      ],[
   1.151 -                     XF86VidModeGamma gamma;
   1.152 +                     SDL_NAME(XF86VidModeGamma) gamma;
   1.153                      ],[
   1.154                      video_x11_vmgamma=yes
   1.155                      ])
   1.156 @@ -567,7 +548,7 @@
   1.157                  video_x11_dga=no
   1.158                  AC_TRY_COMPILE([
   1.159                   #include <X11/Xlib.h>
   1.160 -                 #include <X11/extensions/xf86dga.h>
   1.161 +                 #include <XFree86/extensions/xf86dga.h>
   1.162                  ],[
   1.163                  ],[
   1.164                  video_x11_dga=yes
   1.165 @@ -578,7 +559,8 @@
   1.166                      if test x$enable_video_x11_dgamouse = xyes; then
   1.167                          CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
   1.168                      fi
   1.169 -                    SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86dga"
   1.170 +                    VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86dga"
   1.171 +                    VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86dga/libXFree86_Xxf86dga.la"
   1.172                  fi
   1.173              fi
   1.174              AC_ARG_ENABLE(video-x11-xv,
   1.175 @@ -592,16 +574,17 @@
   1.176                   #include <sys/ipc.h>
   1.177                   #include <sys/shm.h>
   1.178                   #include <X11/extensions/XShm.h>
   1.179 -                 #include <X11/extensions/Xvlib.h>
   1.180 +                 #include <XFree86/extensions/Xvlib.h>
   1.181                  ],[
   1.182 -                 XvImage *image;
   1.183 +                 SDL_NAME(XvImage) *image;
   1.184                  ],[
   1.185                  video_x11_xv=yes
   1.186                  ])
   1.187                  AC_MSG_RESULT($video_x11_xv)
   1.188                  if test x$video_x11_xv = xyes; then
   1.189                      CFLAGS="$CFLAGS -DXFREE86_XV"
   1.190 -                    SYSTEM_LIBS="$SYSTEM_LIBS -lXv"
   1.191 +                    VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xv"
   1.192 +                    VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xv/libXFree86_Xv.la"
   1.193                  fi
   1.194              fi
   1.195              AC_ARG_ENABLE(video-x11-xinerama,
   1.196 @@ -612,16 +595,17 @@
   1.197                  video_x11_xinerama=no
   1.198                  AC_TRY_COMPILE([
   1.199                   #include <X11/Xlib.h>
   1.200 -                 #include <X11/extensions/Xinerama.h>
   1.201 +                 #include <XFree86/extensions/Xinerama.h>
   1.202                  ],[
   1.203 -                 XineramaScreenInfo *xinerama;
   1.204 +                 SDL_NAME(XineramaScreenInfo) *xinerama;
   1.205                  ],[
   1.206                  video_x11_xinerama=yes
   1.207                  ])
   1.208                  AC_MSG_RESULT($video_x11_xinerama)
   1.209                  if test x$video_x11_xinerama = xyes; then
   1.210                      CFLAGS="$CFLAGS -DHAVE_XINERAMA"
   1.211 -                    SYSTEM_LIBS="$SYSTEM_LIBS -lXinerama"
   1.212 +                    VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xinerama"
   1.213 +                    VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xinerama/libXFree86_Xinerama.la"
   1.214                  fi
   1.215              fi
   1.216              AC_ARG_ENABLE(video-x11-xme,
   1.217 @@ -648,6 +632,33 @@
   1.218      fi
   1.219  }
   1.220  
   1.221 +dnl Find the X11 DGA 2.0 include and library directories
   1.222 +CheckDGA()
   1.223 +{
   1.224 +    AC_ARG_ENABLE(video-dga,
   1.225 +[  --enable-video-dga      use DGA 2.0 video driver [default=yes]],
   1.226 +                  , enable_video_dga=yes)
   1.227 +    if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
   1.228 +        save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS -Isrc/video"
   1.229 +        AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
   1.230 +        video_x11_dga2=no
   1.231 +        AC_TRY_COMPILE([
   1.232 +         #include <X11/Xlib.h>
   1.233 +         #include <XFree86/extensions/xf86dga.h>
   1.234 +        ],[
   1.235 +         SDL_NAME(XDGAEvent) xevent;
   1.236 +        ],[
   1.237 +        video_x11_dga2=yes
   1.238 +        ])
   1.239 +        AC_MSG_RESULT($video_x11_dga2)
   1.240 +        if test x$video_x11_dga2 = xyes; then
   1.241 +            CFLAGS="$CFLAGS -DENABLE_DGA"
   1.242 +            VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
   1.243 +            VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
   1.244 +        fi
   1.245 +    fi
   1.246 +}
   1.247 +
   1.248  CheckPHOTON()
   1.249  {
   1.250      AC_ARG_ENABLE(video-photon,
   1.251 @@ -677,32 +688,6 @@
   1.252      fi
   1.253  }
   1.254  
   1.255 -dnl Find the X11 DGA 2.0 include and library directories
   1.256 -CheckDGA()
   1.257 -{
   1.258 -    AC_ARG_ENABLE(video-dga,
   1.259 -[  --enable-video-dga      use DGA 2.0 video driver [default=yes]],
   1.260 -                  , enable_video_dga=yes)
   1.261 -    if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
   1.262 -        AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
   1.263 -        video_x11_dga2=no
   1.264 -        AC_TRY_COMPILE([
   1.265 -         #include <X11/Xlib.h>
   1.266 -         #include <X11/extensions/xf86dga.h>
   1.267 -        ],[
   1.268 -         XDGAEvent xevent;
   1.269 -        ],[
   1.270 -        video_x11_dga2=yes
   1.271 -        ])
   1.272 -        AC_MSG_RESULT($video_x11_dga2)
   1.273 -        if test x$video_x11_dga2 = xyes; then
   1.274 -            CFLAGS="$CFLAGS -DENABLE_DGA"
   1.275 -            VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
   1.276 -            VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
   1.277 -        fi
   1.278 -    fi
   1.279 -}
   1.280 -
   1.281  dnl Find the framebuffer console includes
   1.282  CheckFBCON()
   1.283  {
   1.284 @@ -2335,6 +2320,7 @@
   1.285  CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main"
   1.286  CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
   1.287  CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
   1.288 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/XFree86/extensions"
   1.289  CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
   1.290  CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
   1.291  CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
   1.292 @@ -2391,6 +2377,12 @@
   1.293  src/audio/windx5/Makefile
   1.294  src/audio/disk/Makefile
   1.295  src/video/Makefile
   1.296 +src/video/XFree86/Makefile
   1.297 +src/video/XFree86/extensions/Makefile
   1.298 +src/video/XFree86/Xinerama/Makefile
   1.299 +src/video/XFree86/Xv/Makefile
   1.300 +src/video/XFree86/Xxf86dga/Makefile
   1.301 +src/video/XFree86/Xxf86vm/Makefile
   1.302  src/video/cybergfx/Makefile
   1.303  src/video/x11/Makefile
   1.304  src/video/dga/Makefile