configure.in
changeset 11175 cbc6a8a5b701
parent 11138 c936a84f05ba
child 11205 ab9d4689a439
equal deleted inserted replaced
11174:3767cdd2d64b 11175:cbc6a8a5b701
  2082             have_video=yes
  2082             have_video=yes
  2083         fi
  2083         fi
  2084     fi
  2084     fi
  2085 }
  2085 }
  2086 
  2086 
       
  2087 dnl Find KMSDRM
       
  2088 CheckKMSDRM()
       
  2089 {
       
  2090     AC_ARG_ENABLE(video-kmsdrm,
       
  2091 AC_HELP_STRING([--enable-video-kmsdrm], [use KMSDRM video driver [[default=no]]]),
       
  2092                   , enable_video_kmsdrm=no)
       
  2093 
       
  2094     if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
       
  2095         video_kmsdrm=no
       
  2096         libdrm_avail=no
       
  2097         libgbm_avail=no
       
  2098 
       
  2099         LIBDRM_REQUIRED_VERSION=2.4.46
       
  2100         LIBGBM_REQUIRED_VERSION=9.0.0
       
  2101 
       
  2102         AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
       
  2103         if test x$PKG_CONFIG != xno; then
       
  2104             if $PKG_CONFIG --atleast-pkgconfig-version 0.7; then
       
  2105                 if $PKG_CONFIG --atleast-version $LIBDRM_REQUIRED_VERSION libdrm; then
       
  2106                     LIBDRM_CFLAGS=`$PKG_CONFIG --cflags libdrm`
       
  2107                     LIBDRM_LIBS=`$PKG_CONFIG --libs libdrm`
       
  2108                     LIBDRM_PREFIX=`$PKG_CONFIG --variable=prefix libdrm`
       
  2109                     libdrm_avail=yes
       
  2110                 fi
       
  2111                 if $PKG_CONFIG --atleast-version $LIBGBM_REQUIRED_VERSION gbm; then
       
  2112                     LIBGBM_CFLAGS=`$PKG_CONFIG --cflags gbm`
       
  2113                     LIBGBM_LIBS=`$PKG_CONFIG --libs gbm`
       
  2114                     LIBGBM_PREFIX=`$PKG_CONFIG --variable=prefix gbm`
       
  2115                     libgbm_avail=yes
       
  2116                 fi
       
  2117                 if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
       
  2118                     video_kmsdrm=yes
       
  2119                 fi
       
  2120  
       
  2121                 AC_MSG_CHECKING(for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support)
       
  2122                 AC_MSG_RESULT($libdrm_avail)
       
  2123                 AC_MSG_CHECKING(for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support)
       
  2124                 AC_MSG_RESULT($libgbm_avail)
       
  2125 
       
  2126                 if test x$video_kmsdrm = xyes; then
       
  2127                     AC_ARG_ENABLE(kmsdrm-shared,
       
  2128 AC_HELP_STRING([--enable-kmsdrm-shared], [dynamically load kmsdrm support [[default=yes]]]),
       
  2129                               , enable_kmsdrm_shared=yes)
       
  2130 
       
  2131                     AC_DEFINE(SDL_VIDEO_DRIVER_KMSDRM, 1, [ ])
       
  2132                     SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
       
  2133                     EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
       
  2134 
       
  2135                     AC_MSG_CHECKING(for kmsdrm dynamic loading support)
       
  2136                     kmsdrm_shared=no
       
  2137                     drm_lib=[`find_lib "libdrm.so.*" "$DRM_LIBS"`]
       
  2138                     gbm_lib=[`find_lib "libgbm.so.*" "$DRM_LIBS"`]
       
  2139                     if test x$have_loadso != xyes && \
       
  2140                        test x$enable_kmsdrm_shared = xyes; then
       
  2141                         AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic kmsdrm loading])
       
  2142                     fi
       
  2143                     if test x$have_loadso = xyes && \
       
  2144                        test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
       
  2145                         kmsdrm_shared=yes
       
  2146                         AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC, "$drm_lib", [ ])
       
  2147                         AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM, "$gbm_lib", [ ])
       
  2148                         AC_DEFINE_UNQUOTED(HAVE_KMSDRM_SHARED, "TRUE", [ ])
       
  2149                         SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
       
  2150                     else
       
  2151                         EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
       
  2152                         SUMMARY_video="${SUMMARY_video} kmsdrm"
       
  2153                     fi
       
  2154                     AC_MSG_RESULT($kmsdrm_shared)
       
  2155                     have_video=yes
       
  2156                 fi
       
  2157             fi
       
  2158         fi
       
  2159     fi
       
  2160 }
       
  2161 
  2087 dnl rcg04172001 Set up the Null video driver.
  2162 dnl rcg04172001 Set up the Null video driver.
  2088 CheckDummyVideo()
  2163 CheckDummyVideo()
  2089 {
  2164 {
  2090     AC_ARG_ENABLE(video-dummy,
  2165     AC_ARG_ENABLE(video-dummy,
  2091 AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
  2166 AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
  3146         CheckSNDIO
  3221         CheckSNDIO
  3147         CheckFusionSound
  3222         CheckFusionSound
  3148         CheckLibSampleRate
  3223         CheckLibSampleRate
  3149         CheckX11
  3224         CheckX11
  3150         CheckDirectFB
  3225         CheckDirectFB
       
  3226         CheckKMSDRM
  3151         CheckOpenGLX11
  3227         CheckOpenGLX11
  3152         CheckOpenGLESX11
  3228         CheckOpenGLESX11
  3153         CheckMir
  3229         CheckMir
  3154         CheckWayland
  3230         CheckWayland
  3155         CheckLibUDev
  3231         CheckLibUDev