nvc0: fix reloc domain conflict on buffer migration
[mesa.git] / configure.ac
index feb8c7fd08499f3c942639263d62e337d37542c2..bcf7cd38a612f855e38a352363ad6309b1815eb3 100644 (file)
@@ -377,14 +377,14 @@ if test "x$enable_asm" = xyes; then
     case "$host_cpu" in
     i?86)
         case "$host_os" in
-        linux* | *freebsd* | dragonfly*)
+        linux* | *freebsd* | dragonfly* | *netbsd*)
             test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
             ;;
         esac
         ;;
     x86_64)
         case "$host_os" in
-        linux* | *freebsd* | dragonfly*)
+        linux* | *freebsd* | dragonfly* | *netbsd*)
             test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
             ;;
         esac
@@ -542,7 +542,7 @@ linux*)
     i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
     esac
     ;;
-*freebsd* | dragonfly*)
+*freebsd* | dragonfly* | *netbsd*)
     case "$host_cpu" in
     i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
     esac
@@ -909,16 +909,13 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
             ;;
         esac
         ;;
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | *netbsd*)
         DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
         DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
         DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
         if test "x$driglx_direct" = xyes; then
             DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
         fi
-        if test "x$GXX" = xyes; then
-            CXXFLAGS="$CXXFLAGS -ansi -pedantic"
-        fi
 
         if test "x$DRI_DIRS" = "xyes"; then
             DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
@@ -972,7 +969,7 @@ AC_SUBST([DRI_LIB_DEPS])
 
 case $DRI_DIRS in
 *i915*|*i965*)
-    PKG_CHECK_MODULES([INTEL], [libdrm_intel >= 2.4.21])
+    PKG_CHECK_MODULES([INTEL], [libdrm_intel >= 2.4.23])
     ;;
 esac
 
@@ -1340,6 +1337,27 @@ AC_SUBST([LLVM_VERSION])
 dnl
 dnl Gallium state trackers configuration
 dnl
+
+AC_ARG_ENABLE([gallium-egl],
+    [AS_HELP_STRING([--enable-gallium-egl],
+        [enable gallium EGL state tracker @<:@default=auto@:>@])],
+    [enable_gallium_egl="$enableval"],
+    [enable_gallium_egl=auto])
+if test "x$enable_gallium_egl" = xauto; then
+    case "$mesa_driver" in
+    dri|no)
+        enable_gallium_egl=$enable_egl
+        ;;
+    *)
+        enable_gallium_egl=$enable_openvg
+        ;;
+    esac
+fi
+case "x$enable_egl$enable_gallium_egl" in
+xnoyes)
+    AC_MSG_ERROR([cannot build Gallium EGL state tracker without EGL])
+esac
+
 AC_ARG_WITH([state-trackers],
     [AS_HELP_STRING([--with-state-trackers@<:@=DIRS...@:>@],
         [comma delimited state_trackers list, e.g.
@@ -1352,8 +1370,6 @@ no)
     GALLIUM_STATE_TRACKERS_DIRS=""
     ;;
 yes)
-    st_egl="no"
-
     # look at what else is built
     case "$mesa_driver" in
     xlib)
@@ -1362,14 +1378,11 @@ yes)
     dri)
         GALLIUM_STATE_TRACKERS_DIRS="dri"
         HAVE_ST_DRI="yes"
-        st_egl="yes"
         # Have only tested st/xorg on 1.6.0 servers
         PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED],
             HAVE_ST_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg",
             HAVE_ST_XORG="no")
         ;;
-    no)
-        st_egl="yes"
     esac
 
     if test "x$enable_egl" = xyes; then
@@ -1378,7 +1391,7 @@ yes)
             st_egl="yes"
         fi
 
-        if test "$st_egl" = yes; then
+        if test "$enable_gallium_egl" = yes; then
             GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl"
             HAVE_ST_EGL="yes"
         fi
@@ -1451,10 +1464,6 @@ AC_SUBST([EGL_CLIENT_APIS])
 
 if test "x$HAVE_ST_EGL" = xyes; then
        GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl"
-       # define GLX_DIRECT_RENDERING even when the driver is not dri
-       if test "x$mesa_driver" != xdri -a "x$driglx_direct" = xyes; then
-            DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
-       fi
 fi
 
 if test "x$HAVE_ST_XORG" = xyes; then
@@ -1542,7 +1551,7 @@ AC_ARG_ENABLE([gallium-llvm],
 if test "x$enable_gallium_llvm" = xyes; then
     if test "x$LLVM_CONFIG" != xno; then
        LLVM_VERSION=`$LLVM_CONFIG --version`
-       LLVM_CFLAGS=`$LLVM_CONFIG --cflags`
+       LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
        LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen bitwriter` -lstdc++"
 
        if test "x$HAS_UDIS86" != xno; then
@@ -1674,7 +1683,7 @@ AC_ARG_ENABLE([gallium-nouveau],
     [enable_gallium_nouveau="$enableval"],
     [enable_gallium_nouveau=no])
 if test "x$enable_gallium_nouveau" = xyes; then
-    GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50"
+    GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0"
     gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau"
 fi
 
@@ -1692,6 +1701,19 @@ if test "x$enable_gallium_swrast" = xyes || test "x$enable_gallium_swrast" = xau
     fi
 fi
 
+dnl
+dnl Gallium noop configuration
+dnl
+AC_ARG_ENABLE([gallium-noop],
+    [AS_HELP_STRING([--enable-gallium-noop],
+        [build gallium radeon @<:@default=disabled@:>@])],
+    [enable_gallium_noop="$enableval"],
+    [enable_gallium_noop=auto])
+if test "x$enable_gallium_noop" = xyes; then
+    GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS noop"
+    GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-noop"
+fi
+
 dnl prepend CORE_DIRS to SRC_DIRS
 SRC_DIRS="$CORE_DIRS $SRC_DIRS"