intel: Add block alignment for RGTC textures.
[mesa.git] / configure.ac
index d8c50ce32f534c5f7e74a27626bc4943688cd59b..69513c1c4e2b4af719d212c4aafe6be31a3daa23 100644 (file)
@@ -21,6 +21,7 @@ dnl Versions for external dependencies
 LIBDRM_REQUIRED=2.4.24
 LIBDRM_RADEON_REQUIRED=2.4.24
 LIBDRM_INTEL_REQUIRED=2.4.24
+LIBDRM_NOUVEAU_REQUIRED=0.6
 DRI2PROTO_REQUIRED=2.1
 GLPROTO_REQUIRED=1.4.11
 LIBDRM_XORG_REQUIRED=2.4.24
@@ -39,6 +40,12 @@ if test "x$MKDEP" = "x"; then
     AC_MSG_ERROR([makedepend is required to build Mesa])
 fi
 
+AC_PATH_PROG([FLEX], [flex])
+test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build Mesa])
+
+AC_PATH_PROG([BISON], [bison])
+test "x$BISON" = "x" && AC_MSG_ERROR([bison is needed to build Mesa])
+
 dnl Our fallback install-sh is a symlink to minstall. Use the existing
 dnl configuration in that case.
 AC_PROG_INSTALL
@@ -998,8 +1005,8 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
             # the new interface.  i810 are missing because there is no
             # x86-64 system where they could *ever* be used.
             if test "x$DRI_DIRS" = "xyes"; then
-                DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \
-                    savage tdfx unichrome swrast"
+                DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
+                    radeon savage tdfx unichrome swrast"
             fi
             ;;
         powerpc*)
@@ -1026,8 +1033,8 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
         fi
 
         if test "x$DRI_DIRS" = "xyes"; then
-            DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
-                unichrome savage sis swrast"
+            DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
+                radeon tdfx unichrome savage sis swrast"
         fi
         ;;
     gnu*)
@@ -1055,7 +1062,7 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
 
     # default drivers
     if test "x$DRI_DIRS" = "xyes"; then
-        DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \
+        DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \
             savage sis tdfx unichrome swrast"
     fi
 
@@ -1091,6 +1098,12 @@ case $DRI_DIRS in
     ;;
 esac
 
+case $DRI_DIRS in
+*nouveau*)
+    PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
+    ;;
+esac
+
 case $DRI_DIRS in
 *radeon*|*r200*|*r300*|*r600*)
     if test "x$HAVE_LIBDRM_RADEON" = xyes; then
@@ -1186,7 +1199,7 @@ if test "x$enable_egl" = xno; then
 fi
 if test "x$enable_egl" = xyes; then
     SRC_DIRS="$SRC_DIRS egl"
-    EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread"
+    EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread"
     EGL_DRIVERS_DIRS=""
     if test "$enable_static" != yes; then
         # build egl_glx when libGL is built
@@ -1194,19 +1207,19 @@ if test "x$enable_egl" = xyes; then
             EGL_DRIVERS_DIRS="glx"
         fi
 
+        PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
+                          [have_libudev=yes],[have_libudev=no])
+        if test "$have_libudev" = yes; then
+            DEFINES="$DEFINES -DHAVE_LIBUDEV"
+        fi
         if test "$mesa_driver" = dri; then
             # build egl_dri2 when xcb-dri2 is available
             PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes],
                          [have_xcb_dri2=yes],[have_xcb_dri2=no])
-            PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
-                         [have_libudev=yes],[have_libudev=no])
             
             if test "$have_xcb_dri2" = yes; then
                 EGL_DRIVER_DRI2=dri2
                 DEFINES="$DEFINES -DHAVE_XCB_DRI2"
-                if test "$have_libudev" = yes; then
-                    DEFINES="$DEFINES -DHAVE_LIBUDEV"
-                fi
                 # workaround a bug in xcb-dri2 generated by xcb-proto 1.6
                 AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
                           [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
@@ -1581,7 +1594,7 @@ x*yes*)
 esac
 if test "x$enable_openvg" = xyes; then
     EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
-    VG_LIB_DEPS="$VG_LIB_DEPS -lpthread"
+    VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS -lpthread"
 fi
 
 AC_SUBST([VG_LIB_DEPS])
@@ -1636,6 +1649,7 @@ yes)
                PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \
                                  [AC_MSG_ERROR([cannot find libwayland-client])])
                WAYLAND_EGL_LIB_DEPS="$WAYLAND_LIBS $LIBDRM_LIBS"
+                GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
        fi
     done
     EGL_PLATFORMS="$egl_platforms"
@@ -1727,6 +1741,14 @@ gallium_check_st() {
     fi
 }
 
+gallium_require_llvm() {
+    if test "x$MESA_LLVM" = x0; then
+        case "$host_cpu" in
+        i*86|x86_64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
+        esac
+    fi
+}
+
 
 dnl
 dnl Gallium SVGA configuration
@@ -1779,16 +1801,16 @@ dnl
 dnl Gallium Radeon r300g configuration
 dnl
 AC_ARG_ENABLE([gallium-r300],
-    [AS_HELP_STRING([--enable-gallium-r300],
-        [build gallium r300 @<:@default=DRI-only@:>@])],
+    [AS_HELP_STRING([--disable-gallium-r300],
+        [build R300 driver @<:@default=enabled@:>@])],
     [enable_gallium_r300="$enableval"],
-    [enable_gallium_r300=auto])
-if test "x$enable_gallium_r300" = xauto; then
-    GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
-    gallium_check_st "radeon/drm" "dri-r300"
-elif test "x$enable_gallium_r300" = xyes; then
+    [enable_gallium_r300=yes])
+
+if test "x$enable_gallium_r300" = xyes && test "x$mesa_driver" = xdri; then
+    gallium_require_llvm "Gallium R300"
+
     GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
-    gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon"
+    gallium_check_st "radeon/drm" "dri-r300" "xorg-r300"
 fi
 
 dnl