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
- if test -z "$YACC_INST"; then
- AC_MSG_ERROR([yacc not found - unable to compile glcpp-parse.y])
- fi
-fi
-AC_PROG_LEX
+AX_PROG_BISON([],
+ AS_IF([test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.c"]
+ [AC_MSG_ERROR([bison not found - unable to compile glcpp-parse.y])]))
+AX_PROG_FLEX([],
+ AS_IF([test ! -f "$srcdir/src/glsl/glcpp/glcpp-lex.c"]
+ [AC_MSG_ERROR([flex not found - unable to compile glcpp-lex.l])]))
AC_PATH_PROG([PERL], [perl])
AC_CHECK_PROG(INDENT, indent, indent, cat)
if test "x$INDENT" != "xcat"; then
- AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool')
+ 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
if test "x$enable_debug" = xyes; then
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DDEBUG"
if test "x$GCC_FOR_BUILD" = xyes; then
- CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g"
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g -O0"
fi
if test "x$GXX_FOR_BUILD" = xyes; then
- CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g"
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g -O0"
fi
DEFINES="$DEFINES -DDEBUG"
if test "x$GCC" = xyes; then
- CFLAGS="$CFLAGS -g"
+ CFLAGS="$CFLAGS -g -O0"
fi
if test "x$GXX" = xyes; then
- CXXFLAGS="$CXXFLAGS -g"
+ CXXFLAGS="$CXXFLAGS -g -O0"
fi
fi
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"],
[DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
AC_SUBST([DLOPEN_LIBS])
+AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],
+ [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt],
+ [AC_MSG_ERROR([Couldn't find clock_gettime])])])
+AC_SUBST([CLOCK_LIB])
+
dnl See if posix_memalign is available
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
[enable_vdpau=auto])
AC_ARG_ENABLE([opencl],
[AS_HELP_STRING([--enable-opencl],
- [enable OpenCL library @<:@default=no@:>@])],
- [enable_opencl="$enableval"],
+ [enable OpenCL library NOTE: Enabling this option will also enable
+ --with-llvm-shared-libs
+ @<:@default=no@:>@])],
+ [enable_opencl="$enableval" with_llvm_shared_libs="$enableval"],
[enable_opencl=no])
AC_ARG_ENABLE([xlib_glx],
[AS_HELP_STRING([--enable-xlib-glx],
[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"])
enable_shared_glapi=no
fi
-# TODO: Get rid of SHARED_GLAPI variable
-SHARED_GLAPI="0"
if test "x$enable_shared_glapi" = xyes; then
- SHARED_GLAPI="1"
# libGL will use libglapi for function lookups (IN_DRI_DRIVER means to use
# the remap table)
DEFINES="$DEFINES -DIN_DRI_DRIVER"
CORE_DIRS="mapi/shared-glapi"
fi
-AC_SUBST([SHARED_GLAPI])
AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes)
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
esac
AC_ARG_ENABLE([driglx-direct],
[AS_HELP_STRING([--disable-driglx-direct],
- [enable direct rendering in GLX and EGL for DRI \
+ [disable direct rendering in GLX and EGL for DRI \
@<:@default=auto@:>@])],
[driglx_direct="$enableval"],
[driglx_direct="$driglx_direct_default"])
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])
# put all the necessary libs together
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
- GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
+ GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
fi
AM_CONDITIONAL(NEED_LIBDRICORE, test -n "$DRI_DIRS")
AC_SUBST([DRI_DIRS])
if test "$enable_static" != yes; then
# build egl_glx when libGL is built
- if test "x$enable_glx" = xyes; then
- HAVE_EGL_DRIVER_GLX=1
- fi
-
PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
[have_libudev=yes],[have_libudev=no])
if test "$have_libudev" = yes; then
CORE_DIRS="$CORE_DIRS mapi/vgapi"
GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
HAVE_ST_VEGA=yes
- VG_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
+ 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
AC_ARG_WITH([libclc-path],
[AS_HELP_STRING([--with-libclc-path],
- [Path to libclc builtins library. Example: --with-libclc-path=\$HOME/libclc/])],
+ [DEPRECATED: See http://dri.freedesktop.org/wiki/GalliumCompute#How_to_Install])],
[LIBCLC_PATH="$withval"],
[LIBCLC_PATH=""])
+if test "x$LIBCLC_PATH" != x; then
+ AC_MSG_ERROR([The --with-libclc-path option has been deprecated.
+ Please review the updated build instructions for clover:
+ http://dri.freedesktop.org/wiki/GalliumCompute])
+fi
+
+
AC_ARG_WITH([clang-libdir],
[AS_HELP_STRING([--with-clang-libdir],
[Path to Clang libraries @<:@default=llvm-config --libdir@:>@])],
[CLANG_LIBDIR="$withval"],
[CLANG_LIBDIR=""])
-AC_SUBST([LIBCLC_PATH])
+LIBCLC_INCLUDEDIR=`pkg-config --variable=includedir libclc`
+LIBCLC_LIBEXECDIR=`pkg-config --variable=libexecdir libclc`
+AC_SUBST([LIBCLC_INCLUDEDIR])
+AC_SUBST([LIBCLC_LIBEXECDIR])
if test "x$enable_opencl" = xyes; then
if test "x$with_gallium_drivers" = x; then
AC_MSG_ERROR([gcc >= 4.6 is required to build clover])
fi
+ if test "x$LIBCLC_INCLUDEDIR" == x || test "x$LIBCLC_LIBEXECDIR" == x; then
+ AC_MSG_ERROR([pkg-config cannot use libclc.pc which is required to build clover])
+ fi
+
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS clover"
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS opencl"
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])
;;
wayland)
- PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 0.99.0 wayland-server >= 0.99.0],, \
- [AC_MSG_ERROR([cannot find libwayland-client])])
+ PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.0.2 wayland-server >= 1.0.2])
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
x11)
PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 >= 1.8 xcb-xfixes])
+
+ if test "x$enable_glx" = xyes; then
+ HAVE_EGL_DRIVER_GLX=1
+ fi
;;
drm)
[llvm_prefix=""])
+# Call this inside ` ` to get the return value.
+# $1 is the llvm-config command with arguments.
+strip_unwanted_llvm_flags() {
+ # Use \> (marks the end of the word)
+ echo `$1` | sed \
+ -e 's/-DNDEBUG\>//g' \
+ -e 's/-pedantic\>//g' \
+ -e 's/-Wcovered-switch-default\>//g' \
+ -e 's/-O.\>//g' \
+ -e 's/-g\>//g' \
+ -e 's/-Wall\>//g' \
+ -e 's/-fomit-frame-pointer\>//g'
+}
+
+
if test "x$with_gallium_drivers" = x; then
enable_gallium_llvm=no
fi
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
- LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
- if test "x$with_llvm_shared_libs" = xyes; then
- dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
- LLVM_LIBS="-lLLVM-`$LLVM_CONFIG --version`"
- else
+ LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
+ if test "x$with_llvm_shared_libs" != xyes; then
LLVM_COMPONENTS="engine bitwriter"
if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
if test "x$enable_opencl" = xyes; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
fi
- LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
- LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags`
- LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags`
+ LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
+ LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
+ LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
- DEFINES="${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`"
+ DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
MESA_LLVM=1
dnl Check for Clang interanl headers
fi
else
MESA_LLVM=0
+ LLVM_VERSION_INT=0
fi
else
MESA_LLVM=0
+ LLVM_VERSION_INT=0
fi
dnl Directory for XVMC libs
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
gallium_require_drm_loader() {
if test "x$enable_gallium_loader" = xyes; then
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
- AC_MSG_ERROR([Gallium drm loader requrires libudev]))
+ AC_MSG_ERROR([Gallium drm loader requires libudev]))
if test "x$have_libdrm" != xyes; then
AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])
fi
radeon_llvm_check() {
LLVM_REQUIRED_VERSION_MAJOR="3"
LLVM_REQUIRED_VERSION_MINOR="2"
- LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
- LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
- if test "$LLVM_AVAILABLE_VERSION_MAJOR" -lt "$LLVM_REQUIRED_VERSION_MAJOR" -o [ "$LLVM_AVAILABLE_VERSION_MAJOR" -eq "$LLVM_REQUIRED_VERSION_MAJOR" -a "$LLVM_AVAILABLE_VERSION_MINOR" -lt "$LLVM_REQUIRED_VERSION_MINOR" ] ; then
- AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with AMDGPU target enabled is required.
+ if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
+ AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with R600 target enabled is required.
To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
git://people.freedesktop.org/~tstellar/llvm master
- and build with --enable-experimental-targets=AMDGPU])
+ and build with --enable-experimental-targets=R600])
fi
- if test true && $LLVM_CONFIG --targets-built | grep -qv '\<AMDGPU\>' ; then
- AC_MSG_ERROR([LLVM AMDGPU Target not enabled.
- To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
- git://people.freedesktop.org/~tstellar/llvm master
- and build with --enable-experimental-targets=AMDGPU])
+ if test true && $LLVM_CONFIG --targets-built | grep -qv '\<R600\>' ; then
+ AC_MSG_ERROR([LLVM R600 Target not enabled. You can enable it when building the LLVM
+ sources with the --enable-experimental-targets=R600
+ configure flag])
fi
AC_MSG_WARN([Please ensure you use the latest llvm tree from git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])
- if test "x$LLVM_VERSION" = "x3.2"; then
- LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`"
- fi
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} r600"
}
dnl Gallium drivers
for driver in $gallium_drivers; do
case "x$driver" in
xsvga)
+ HAVE_GALLIUM_SVGA=yes
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
gallium_check_st "svga/drm" "dri-vmwgfx" "" "xa-vmwgfx"
;;
xi915)
+ HAVE_GALLIUM_I915=yes
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 softpipe"
if test "x$MESA_LLVM" = x1; then
gallium_check_st "i915/drm" "dri-i915" "xorg-i915"
;;
xr300)
+ HAVE_GALLIUM_R300=yes
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
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then
radeon_llvm_check
NEED_RADEON_GALLIUM=yes;
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo"
fi
if test "x$enable_r600_llvm" = xyes; then
USE_R600_LLVM_COMPILER=yes;
fi
if test "x$enable_opencl" = xyes -a "x$with_llvm_shared_libs" = xno; then
- LLVM_LIBS="${LLVM_LIBS} `$LLVM_CONFIG --libs bitreader asmparser`"
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
fi
gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600"
;;
xradeonsi)
+ HAVE_GALLIUM_RADEONSI=yes
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" "" "" "vdpau-radeonsi" ""
;;
xnouveau)
+ HAVE_GALLIUM_NOUVEAU=yes
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv50 nvc0"
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
;;
xswrast)
+ HAVE_GALLIUM_SOFTPIPE=yes
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS softpipe"
if test "x$MESA_LLVM" = x1; then
+ HAVE_GALLIUM_LLVMPIPE=yes
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
fi
done
fi
+dnl Set LLVM_LIBS - This is done after the driver configuration so
+dnl that drivers can add additonal components to LLVM_COMPONENTS.
+dnl Previously, gallium drivers were updating LLVM_LIBS directly
+dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
+dnl this was causing the same libraries to be appear multiple times
+dnl in LLVM_LIBS.
+
+if test "x$MESA_LLVM" != x0; then
+
+ LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
+
+ if test "x$with_llvm_shared_libs" = xyes; then
+ dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
+ LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
+ AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
+
+ if test "x$llvm_have_one_so" = xyes; then
+ dnl LLVM was built using auto*, so there is only one shared object.
+ LLVM_LIBS="-l$LLVM_SO_NAME"
+ else
+ dnl If LLVM was built with CMake, there will be one shared object per
+ dnl component.
+ AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
+ AC_MSG_ERROR([Could not find llvm shared libraries:
+ Please make sure you have built llvm with the --enable-shared option
+ and that your llvm libraries are installed in $LLVM_LIBDIR
+ If you have installed your llvm libraries to a different directory you
+ can use the --with-llvm-prefix= configure flag to specify this directory.
+ NOTE: Mesa is attempting to use llvm shared libraries because you have
+ passed one of the following options to configure:
+ --with-llvm-shared-libs
+ --enable-opencl
+ If you do not want to build with llvm shared libraries and instead want to
+ use llvm static libraries then remove these options from your configure
+ invocation and reconfigure.]))
+
+ dnl We don't need to update LLVM_LIBS in this case because the LLVM
+ dnl install uses a shared object for each compoenent and we have
+ dnl already added all of these objects to LLVM_LIBS.
+ fi
+ fi
+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_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)
+AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = 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)/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
AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
+AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
+AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
+
AC_SUBST([GALLIUM_MAKE_DIRS])
+AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \
+ "x$enable_xlib_glx" = xyes -o \
+ "x$enable_osmesa" = xyes)
AM_CONDITIONAL(HAVE_X11_DRIVER, echo "$DRIVER_DIRS" | grep 'x11' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_SPARC_ASM, echo "$DEFINES" | grep 'SPARC_ASM' >/dev/null 2>&1)
+AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
+
+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/egl/wayland/wayland-egl/Makefile
src/egl/wayland/wayland-egl/wayland-egl.pc
src/gallium/Makefile
+ src/gallium/auxiliary/Makefile
src/gallium/auxiliary/pipe-loader/Makefile
src/gallium/drivers/Makefile
+ src/gallium/drivers/i915/Makefile
+ src/gallium/drivers/llvmpipe/Makefile
+ src/gallium/drivers/nouveau/Makefile
+ src/gallium/drivers/nv30/Makefile
+ src/gallium/drivers/nv50/Makefile
+ src/gallium/drivers/nvc0/Makefile
src/gallium/drivers/r300/Makefile
src/gallium/drivers/r600/Makefile
+ src/gallium/drivers/radeon/Makefile
+ src/gallium/drivers/radeonsi/Makefile
+ src/gallium/drivers/rbug/Makefile
+ src/gallium/drivers/softpipe/Makefile
+ src/gallium/drivers/svga/Makefile
+ src/gallium/drivers/trace/Makefile
+ src/gallium/state_trackers/Makefile
src/gallium/state_trackers/clover/Makefile
+ src/gallium/state_trackers/dri/Makefile
+ src/gallium/state_trackers/dri/drm/Makefile
+ src/gallium/state_trackers/dri/sw/Makefile
+ src/gallium/state_trackers/egl/Makefile
+ src/gallium/state_trackers/gbm/Makefile
+ src/gallium/state_trackers/glx/Makefile
+ src/gallium/state_trackers/vdpau/Makefile
+ src/gallium/state_trackers/vega/Makefile
+ src/gallium/state_trackers/xa/Makefile
+ src/gallium/state_trackers/xorg/Makefile
+ src/gallium/state_trackers/xvmc/Makefile
+ src/gallium/targets/Makefile
+ src/gallium/targets/dri-i915/Makefile
+ src/gallium/targets/dri-nouveau/Makefile
+ src/gallium/targets/dri-r300/Makefile
+ src/gallium/targets/dri-r600/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/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
+ src/gallium/winsys/sw/wayland/Makefile
+ src/gallium/winsys/sw/wrapper/Makefile
+ src/gallium/winsys/sw/xlib/Makefile
src/gbm/Makefile
src/gbm/main/gbm.pc
src/glsl/Makefile
src/glsl/builtin_compiler/Makefile
- src/glsl/glcpp/Makefile
- src/glsl/tests/Makefile
src/glx/Makefile
src/glx/tests/Makefile
src/gtest/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
src/mesa/drivers/x11/Makefile
src/mesa/libdricore/Makefile
src/mesa/main/tests/Makefile
+ src/mesa/main/tests/hash_table/Makefile
+ src/mesa/program/Makefile
src/mesa/x86-64/Makefile
src/mesa/x86/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 ""
echo " CXXFLAGS: $cxxflags"
echo " Macros: $defines"
echo ""
+if test "x$MESA_LLVM" = x1; then
+ echo " LLVM_CFLAGS: $LLVM_CFLAGS"
+ echo " LLVM_CXXFLAGS: $LLVM_CXXFLAGS"
+ echo " LLVM_CPPFLAGS: $LLVM_CPPFLAGS"
+ echo ""
+fi
echo " PYTHON2: $PYTHON2"
echo ""