LIBDRM_RADEON_REQUIRED=2.4.40
LIBDRM_INTEL_REQUIRED=2.4.38
LIBDRM_NVVIEUX_REQUIRED=2.4.33
-LIBDRM_NOUVEAU_REQUIRED=2.4.33
+LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41"
DRI2PROTO_REQUIRED=2.6
GLPROTO_REQUIRED=1.4.14
LIBDRM_XORG_REQUIRED=2.4.24
AM_PROG_AS
AC_CHECK_PROGS([MAKE], [gmake make])
AC_CHECK_PROGS([PYTHON2], [python2 python])
+AX_PYTHON_MODULE([libxml2], [needed])
AC_PROG_SED
AC_PROG_MKDIR_P
-AC_PATH_PROG([MKDEP], [makedepend])
LT_PREREQ([2.2])
LT_INIT([disable-static])
-if test "x$MKDEP" = "x"; then
- AC_MSG_ERROR([makedepend is required to build Mesa])
-fi
-
AC_PROG_YACC
AC_PATH_PROG([YACC_INST], $YACC)
if test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.c"; then
AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -TGLubyte -TGLbyte -TBool')
fi
-dnl Our fallback install-sh is a symlink to minstall. Use the existing
-dnl configuration in that case.
AC_PROG_INSTALL
-test "x$INSTALL" = "x$ac_install_sh" && INSTALL='$(MINSTALL)'
dnl We need a POSIX shell for parts of the build. Assume we have one
dnl in most cases.
fi
fi
-
-MKDEP_OPTIONS=-fdepend
-dnl Ask gcc where it's keeping its secret headers
-if test "x$GCC" = xyes; then
- for dir in include include-fixed; do
- GCC_INCLUDES=`$CC -print-file-name=$dir`
- if test "x$GCC_INCLUDES" != x && \
- test "$GCC_INCLUDES" != "$dir" && \
- test -d "$GCC_INCLUDES"; then
- MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
- fi
- done
-fi
-AC_SUBST([MKDEP_OPTIONS])
-
dnl Make sure the pkg-config macros are defined
m4_ifndef([PKG_PROG_PKG_CONFIG],
[m4_fatal([Could not locate the pkg-config autoconf macros.
AM_CONDITIONAL(BUILD_SHARED, test "x$enable_shared" = xyes)
-dnl
-dnl mklib options
-dnl
-AC_ARG_VAR([MKLIB_OPTIONS],[Options for the Mesa library script, mklib])
-if test "$enable_static" = yes; then
- MKLIB_OPTIONS="$MKLIB_OPTIONS -static"
-fi
-AC_SUBST([MKLIB_OPTIONS])
-
dnl
dnl other compiler options
dnl
fi
AC_SUBST([MESA_ASM_FILES])
-dnl PIC code macro
-MESA_PIC_FLAGS
-
dnl Check to see if dlopen is in default libraries (like Solaris, which
dnl has it in libc), or if libdl is needed to get it.
AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
[enable_gallium_tests=no])
# Option for Gallium drivers
+
+# Keep this in sync with the --with-gallium-drivers help string default value
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,svga,swrast"
- @<:@default=r300,r600,swrast@:>@])],
+ @<:@default=r300,r600,svga,swrast@:>@])],
[with_gallium_drivers="$withval"],
[with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
dnl
dnl Driver specific build directories
dnl
-SRC_DIRS="gtest"
GALLIUM_DIRS="auxiliary drivers state_trackers"
GALLIUM_TARGET_DIRS=""
GALLIUM_WINSYS_DIRS="sw"
# build glsl and mesa if OpenGL or OpenGL ES is enabled
case "x$enable_opengl$enable_gles1$enable_gles2" in
x*yes*)
- CORE_DIRS="mapi/glapi/gen $CORE_DIRS glsl mesa"
+ CORE_DIRS="mapi/glapi/gen $CORE_DIRS gtest glsl mesa"
;;
esac
LIBS="$save_LIBS"
fi
- # if we are building any dri driver other than swrast ...
- if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast; then
+ # if we are building any dri driver other than swrast or using the dri state tracker ...
+ if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast || test "x$enable_dri" = xyes; then
# ... libdrm is required
if test "x$have_libdrm" != xyes; then
AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
VG_PC_LIB_PRIV="-lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
AC_SUBST([VG_PC_LIB_PRIV])
fi
+AM_CONDITIONAL(HAVE_OPENVG, test "x$enable_openvg" = xyes)
dnl
dnl D3D1X configuration
enable_gallium_loader=yes
fi
+if test "x$enable_gallium_gbm" = xyes || test "x$enable_opencl" = xyes; then
+ GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS pipe-loader"
+fi
+
dnl
dnl Gallium configuration
dnl
case "x$enable_opengl$enable_gles1$enable_gles2" in
x*yes*)
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)'
+ HAVE_OPENGL=yes
;;
esac
+AM_CONDITIONAL(HAVE_OPENGL, test "x$HAVE_OPENGL" = xyes)
AC_SUBST([VG_LIB_DEPS])
AC_SUBST([EGL_CLIENT_APIS])
dnl Gallium Tests
dnl
if test "x$enable_gallium_tests" = xyes; then
- SRC_DIRS="$SRC_DIRS gallium/tests/trivial"
+ SRC_DIRS="$SRC_DIRS gallium/tests/trivial gallium/tests/unit"
enable_gallium_loader=yes
fi
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
gallium_require_llvm "Gallium R300"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
- gallium_check_st "radeon/drm" "dri-r300" "xorg-r300" "" "xvmc-r300" "vdpau-r300"
+ gallium_check_st "radeon/drm" "dri-r300" "" "" "xvmc-r300" "vdpau-r300"
;;
xr600)
HAVE_GALLIUM_R600=yes
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)/src/gallium/auxiliary/pipe-loader/libpipe_loader.a"
- GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(TOP)/src/gallium/winsys/sw/null/libws_null.a"
+ 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)/src/gallium/winsys/sw/xlib/libws_xlib.a"
+ 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
AC_SUBST([VDPAU_MAJOR], 1)
AC_SUBST([VDPAU_MINOR], 0)
+AC_SUBST([XVMC_MAJOR], 1)
+AC_SUBST([XVMC_MINOR], 0)
+
+AC_SUBST([XA_MAJOR], 1)
+AC_SUBST([XA_MINOR], 0)
+AC_SUBST([XA_TINY], 0)
+AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
+
dnl prepend CORE_DIRS to SRC_DIRS
SRC_DIRS="$CORE_DIRS $SRC_DIRS"
CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
dnl Substitute the config
-AC_CONFIG_FILES([configs/current
- Makefile
+AC_CONFIG_FILES([Makefile
src/Makefile
src/egl/Makefile
src/egl/drivers/Makefile
src/gallium/targets/dri-radeonsi/Makefile
src/gallium/targets/dri-swrast/Makefile
src/gallium/targets/dri-vmwgfx/Makefile
+ src/gallium/targets/egl-static/Makefile
+ src/gallium/targets/gbm/Makefile
src/gallium/targets/opencl/Makefile
+ src/gallium/targets/pipe-loader/Makefile
src/gallium/targets/libgl-xlib/Makefile
src/gallium/targets/vdpau-nouveau/Makefile
src/gallium/targets/vdpau-r300/Makefile
src/gallium/targets/vdpau-r600/Makefile
src/gallium/targets/vdpau-radeonsi/Makefile
src/gallium/targets/vdpau-softpipe/Makefile
+ src/gallium/targets/xa-vmwgfx/Makefile
+ src/gallium/targets/xa-vmwgfx/xatracker.pc
src/gallium/targets/xorg-i915/Makefile
src/gallium/targets/xorg-nouveau/Makefile
+ src/gallium/targets/xorg-r600/Makefile
+ src/gallium/targets/xorg-radeonsi/Makefile
+ src/gallium/targets/xvmc-nouveau/Makefile
+ src/gallium/targets/xvmc-r300/Makefile
+ src/gallium/targets/xvmc-r600/Makefile
+ src/gallium/targets/xvmc-softpipe/Makefile
+ src/gallium/tests/trivial/Makefile
+ src/gallium/tests/unit/Makefile
src/gallium/winsys/Makefile
src/gallium/winsys/i915/drm/Makefile
src/gallium/winsys/i915/sw/Makefile
src/mesa/drivers/Makefile
src/mesa/drivers/dri/dri.pc
src/mesa/drivers/dri/common/Makefile
+ src/mesa/drivers/dri/common/xmlpool/Makefile
src/mesa/drivers/dri/i915/Makefile
src/mesa/drivers/dri/i965/Makefile
src/mesa/drivers/dri/Makefile
dnl Compiler options
# cleanup the CFLAGS/CXXFLAGS/DEFINES vars
-cflags=`echo $CFLAGS $PIC_FLAGS | \
+cflags=`echo $CFLAGS | \
$SED 's/^ *//;s/ */ /;s/ *$//'`
-cxxflags=`echo $CXXFLAGS $PIC_FLAGS | \
+cxxflags=`echo $CXXFLAGS | \
$SED 's/^ *//;s/ */ /;s/ *$//'`
defines=`echo $DEFINES | $SED 's/^ *//;s/ */ /;s/ *$//'`
echo ""