X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure.ac;h=2265e854a8027d8f5123fa850322460b6e795d51;hb=bf86e0e050279394c80062e2d910c8619c1d1fe1;hp=805a355729d7ae327e04a06f5934fae881f3c916;hpb=2f7a37d858ecafa51e70eb8aeb9b7cfcfaf2fa0e;p=mesa.git diff --git a/configure.ac b/configure.ac index 805a355729d..2265e854a80 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl Tell the user about autoconf.html in the --help output m4_divert_once([HELP_END], [ See docs/autoconf.html for more details on the options for Mesa.]) -AC_INIT([Mesa], [9.2.0], +AC_INIT([Mesa], [9.2.0-devel], [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) AC_CONFIG_AUX_DIR([bin]) AC_CONFIG_MACRO_DIR([m4]) @@ -31,7 +31,7 @@ AC_SUBST([OSMESA_VERSION]) dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.24 -LIBDRM_RADEON_REQUIRED=2.4.42 +LIBDRM_RADEON_REQUIRED=2.4.46 LIBDRM_INTEL_REQUIRED=2.4.38 LIBDRM_NVVIEUX_REQUIRED=2.4.33 LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41" @@ -652,7 +652,7 @@ GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast" AC_ARG_WITH([gallium-drivers], [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@], [comma delimited Gallium drivers list, e.g. - "i915,nouveau,r300,r600,radeonsi,freedreno,svga,swrast" + "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast" @<:@default=r300,r600,svga,swrast@:>@])], [with_gallium_drivers="$withval"], [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"]) @@ -676,19 +676,16 @@ if test "x$enable_opengl" = xno -a \ AC_MSG_ERROR([at least one API should be enabled]) fi -API_DEFINES="" -if test "x$enable_opengl" = xno; then - API_DEFINES="$API_DEFINES -DFEATURE_GL=0" -else - API_DEFINES="$API_DEFINES -DFEATURE_GL=1" -fi -if test "x$enable_gles1" = xyes; then - API_DEFINES="$API_DEFINES -DFEATURE_ES1=1" +# Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x +if test "x$enable_opengl" = xno -a \ + "x$enable_gles1" = xyes; then + AC_MSG_ERROR([Building OpenGL ES1 without OpenGL is not supported]) fi -if test "x$enable_gles2" = xyes; then - API_DEFINES="$API_DEFINES -DFEATURE_ES2=1" + +if test "x$enable_opengl" = xno -a \ + "x$enable_gles2" = xyes; then + AC_MSG_ERROR([Building OpenGL ES2 without OpenGL is not supported]) fi -AC_SUBST([API_DEFINES]) AM_CONDITIONAL(HAVE_OPENGL, test "x$enable_opengl" = xyes) AM_CONDITIONAL(HAVE_OPENGL_ES1, test "x$enable_gles1" = xyes) @@ -742,11 +739,6 @@ if test "x$enable_dri" = xno; then enable_shared_glapi=no fi -if test "x$enable_shared_glapi" = xyes; then - # libGL will use libglapi for function lookups (IN_DRI_DRIVER means to use - # the remap table) - DEFINES="$DEFINES -DIN_DRI_DRIVER" -fi AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes) dnl @@ -762,7 +754,7 @@ xyesyes) GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib" GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS libgl-xlib" GALLIUM_STATE_TRACKERS_DIRS="glx $GALLIUM_STATE_TRACKERS_DIRS" - HAVE_WINSYS_XLIB="yes" + NEED_WINSYS_XLIB="yes" ;; esac @@ -776,8 +768,6 @@ if test "x$enable_osmesa" = xyes; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS osmesa" fi -AC_SUBST([GALLIUM_TARGET_DIRS]) -AC_SUBST([GALLIUM_WINSYS_DIRS]) AC_SUBST([MESA_LLVM]) # Check for libdrm @@ -948,7 +938,7 @@ DRI_DIRS="" case "$with_dri_drivers" in no) ;; yes) - # classic DRI drivers require FEATURE_GL to build + # classic DRI drivers if test "x$enable_opengl" = xyes; then DRI_DIRS="yes" fi @@ -972,7 +962,7 @@ if test "x$enable_dri" = xyes; then # Platform specific settings and drivers to build case "$host_os" in linux*) - DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" DEFINES="$DEFINES -DHAVE_ALIAS" case "$host_cpu" in @@ -997,21 +987,21 @@ if test "x$enable_dri" = xyes; then ;; freebsd* | dragonfly* | *netbsd*) DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1" - DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS" + DEFINES="$DEFINES -DHAVE_ALIAS" if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="i915 i965 nouveau r200 radeon swrast" fi ;; gnu*) - DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" DEFINES="$DEFINES -DHAVE_ALIAS" ;; solaris*) - DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" ;; cygwin*) - DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="swrast" fi @@ -1319,16 +1309,7 @@ AM_CONDITIONAL(HAVE_OPENVG, test "x$enable_openvg" = xyes) dnl dnl Gallium G3DVL configuration dnl -AC_ARG_ENABLE([gallium-g3dvl], - [AS_HELP_STRING([--enable-gallium-g3dvl], - [build gallium g3dvl @<:@default=disabled@:>@])], - [enable_gallium_g3dvl="$enableval"], - [enable_gallium_g3dvl=no]) -if test "x$enable_gallium_g3dvl" = xyes; then - if test "x$with_gallium_drivers" = x; then - AC_MSG_ERROR([cannot enable G3DVL without Gallium]) - fi - +if test -n "$with_gallium_drivers"; then if test "x$enable_xvmc" = xauto; then PKG_CHECK_EXISTS([xvmc], [enable_xvmc=yes], [enable_xvmc=no]) fi @@ -1446,10 +1427,6 @@ fi egl_platforms=`IFS=', '; echo $with_egl_platforms` for plat in $egl_platforms; do case "$plat" in - fbdev|null) - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/$plat" - ;; - wayland) PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.0.2 wayland-server >= 1.0.2]) GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland" @@ -1472,7 +1449,7 @@ for plat in $egl_platforms; do AC_MSG_ERROR([EGL platform drm needs gbm]) ;; - android|gdi) + android|fbdev|gdi|null) ;; *) @@ -1497,6 +1474,9 @@ fi EGL_PLATFORMS="$egl_platforms" +if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then + NEED_WINSYS_XLIB=yes +fi AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1) AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND, echo "$egl_platforms" | grep 'wayland' >/dev/null 2>&1) AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep 'drm' >/dev/null 2>&1) @@ -1510,6 +1490,13 @@ AC_SUBST([EGL_NATIVE_PLATFORM]) AC_SUBST([EGL_PLATFORMS]) AC_SUBST([EGL_CFLAGS]) +# If we don't have the X11 platform, set this define so we don't try to include +# the X11 headers. +if ! echo "$egl_platforms" | grep -q 'x11'; then + DEFINES="$DEFINES -DMESA_EGL_NO_X11_HEADERS" + GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS" +fi + AC_ARG_WITH([egl-driver-dir], [AS_HELP_STRING([--with-egl-driver-dir=DIR], [directory for EGL drivers [[default=${libdir}/egl]]])], @@ -1604,13 +1591,6 @@ if test "x$enable_gallium_llvm" = xyes; then LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit" fi - if test "x$enable_debug" = xyes; then - # Debug builds require OProfileJIT if LLVM was built with support for it - if $LLVM_CONFIG --components | grep -q '\'; then - LLVM_COMPONENTS="${LLVM_COMPONENTS} oprofilejit" - fi - fi - if test "x$enable_opencl" = xyes; then LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation" # LLVM 3.3 >= 177971 requires IRReader @@ -1665,6 +1645,7 @@ AM_CONDITIONAL(HAVE_GALLIUM_TESTS, test "x$enable_gallium_tests" = xyes) if test "x$enable_gallium_loader" = xyes; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS pipe-loader" fi +AM_CONDITIONAL(NEED_GALLIUM_LOADER, test "x$enable_gallium_loader" = xyes) dnl Directory for VDPAU libs AC_ARG_WITH([vdpau-libdir], @@ -1686,9 +1667,7 @@ dnl dnl Gallium helper functions dnl gallium_check_st() { - if test "x$enable_dri" = xyes -o "x$enable_xorg" = xyes -o \ - "x$enable_xa" = xyes -o "x$enable_xvmc" = xyes -o \ - "x$enable_vdpau" = xyes; then + if test "x$NEED_NONNULL_WINSYS" = xyes; then if test "x$have_libdrm" != xyes; then AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED]) fi @@ -1742,13 +1721,20 @@ radeon_llvm_check() { sources with the --enable-experimental-targets=R600 configure flag]) fi - LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader" + LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader ipo" NEED_RADEON_LLVM=yes AC_CHECK_LIB([elf], [elf_memory], [ELF_LIB=-lelf], [AC_MSG_ERROR([radeonsi and r600g require libelf when using LLVM])]) } dnl Gallium drivers +if test "x$enable_dri" = xyes -o "x$enable_xorg" = xyes -o \ + "x$enable_xa" = xyes -o "x$enable_xvmc" = xyes -o \ + "x$enable_vdpau" = xyes; then + NEED_NONNULL_WINSYS=yes +fi +AM_CONDITIONAL(NEED_NONNULL_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes) + dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block if test "x$with_gallium_drivers" != x; then gallium_drivers=`IFS=', '; echo $with_gallium_drivers` @@ -1769,6 +1755,13 @@ if test "x$with_gallium_drivers" != x; then GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw" gallium_check_st "i915/drm" "dri-i915" "xorg-i915" ;; + xilo) + HAVE_GALLIUM_ILO=yes + PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED]) + gallium_require_drm_loader + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS ilo" + gallium_check_st "intel/drm" "dri-ilo" + ;; xr300) HAVE_GALLIUM_R300=yes PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) @@ -1784,7 +1777,7 @@ if test "x$with_gallium_drivers" != x; then if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then radeon_llvm_check R600_NEED_RADEON_GALLIUM=yes; - LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo bitreader asmparser" + LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser" fi if test "x$enable_r600_llvm" = xyes; then USE_R600_LLVM_COMPILER=yes; @@ -1826,6 +1819,7 @@ if test "x$with_gallium_drivers" != x; then if test "x$enable_dri" = xyes; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast" + HAVE_COMMON_DRI=yes fi if test "x$enable_vdpau" = xyes; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe" @@ -1834,9 +1828,8 @@ if test "x$with_gallium_drivers" != x; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe" fi if test "x$enable_vdpau" = xyes -o "x$enable_xvmc" = xyes; then - if test "x$HAVE_WINSYS_XLIB" != xyes; then - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib" - fi + NEED_WINSYS_XLIB=yes + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib" fi ;; *) @@ -1891,6 +1884,7 @@ fi AM_CONDITIONAL(HAVE_GALLIUM_SVGA, test "x$HAVE_GALLIUM_SVGA" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_I915, test "x$HAVE_GALLIUM_I915" = xyes) +AM_CONDITIONAL(HAVE_GALLIUM_ILO, test "x$HAVE_GALLIUM_ILO" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_R300, test "x$HAVE_GALLIUM_R300" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_R600, test "x$HAVE_GALLIUM_R600" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_RADEONSI, test "x$HAVE_GALLIUM_RADEONSI" = xyes) @@ -1908,21 +1902,13 @@ AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_I915" = xyes - if test "x$enable_gallium_loader" = xyes; then GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null" - GALLIUM_PIPE_LOADER_DEFINES="-DHAVE_PIPE_LOADER_SW" - GALLIUM_PIPE_LOADER_LIBS="\$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la" - GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/null/libws_null.la" - - if test "x$HAVE_WINSYS_XLIB" = xyes; then - GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB" - GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la" - fi if test "x$enable_gallium_drm_loader" = xyes; then GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_DRM" PKG_CHECK_MODULES([GALLIUM_PIPE_LOADER_XCB], [xcb xcb-dri2], pipe_loader_have_xcb=yes, pipe_loader_have_xcb=no) if test "x$pipe_loader_have_xcb" = xyes; then - GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DPIPE_LOADER_HAVE_XCB" + GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XCB" GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS $GALLIUM_PIPE_LOADER_XCB_LIBS $LIBDRM_LIBS" fi fi @@ -1939,6 +1925,13 @@ AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes) AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes) AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes) +AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes -a \ + "x$HAVE_GALLIUM_R300" = xyes -o \ + "x$HAVE_GALLIUM_R600" = xyes -o \ + "x$HAVE_GALLIUM_RADEONSI" = xyes) +AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test "x$HAVE_GALLIUM_I915" = xyes -o \ + "x$HAVE_GALLIUM_SVGA" = xyes) +AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$NEED_WINSYS_XLIB" = xyes) AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes) AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_NEED_RADEON_GALLIUM = xyes) AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes) @@ -1998,7 +1991,10 @@ AC_CONFIG_FILES([Makefile src/gallium/auxiliary/pipe-loader/Makefile src/gallium/drivers/Makefile src/gallium/drivers/freedreno/Makefile + src/gallium/drivers/freedreno/a2xx/Makefile + src/gallium/drivers/freedreno/a3xx/Makefile src/gallium/drivers/i915/Makefile + src/gallium/drivers/ilo/Makefile src/gallium/drivers/llvmpipe/Makefile src/gallium/drivers/nouveau/Makefile src/gallium/drivers/nv30/Makefile @@ -2029,6 +2025,7 @@ AC_CONFIG_FILES([Makefile src/gallium/targets/Makefile src/gallium/targets/dri-freedreno/Makefile src/gallium/targets/dri-i915/Makefile + src/gallium/targets/dri-ilo/Makefile src/gallium/targets/dri-nouveau/Makefile src/gallium/targets/dri-r300/Makefile src/gallium/targets/dri-r600/Makefile @@ -2062,10 +2059,10 @@ AC_CONFIG_FILES([Makefile src/gallium/winsys/freedreno/drm/Makefile src/gallium/winsys/i915/drm/Makefile src/gallium/winsys/i915/sw/Makefile + src/gallium/winsys/intel/drm/Makefile src/gallium/winsys/nouveau/drm/Makefile src/gallium/winsys/radeon/drm/Makefile src/gallium/winsys/svga/drm/Makefile - src/gallium/winsys/sw/Makefile src/gallium/winsys/sw/dri/Makefile src/gallium/winsys/sw/fbdev/Makefile src/gallium/winsys/sw/null/Makefile