X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=inline;f=configure.ac;h=05dbc733e52e5e2ae1a28073db26889f893dc781;hb=da2d98fac778ed717919c89395ea7c66f2d9c1b1;hp=1294740a482a86bb45fa3b510591f9e2b65b4f65;hpb=122345876479cf5cf553e38162ab105658614ab7;p=mesa.git diff --git a/configure.ac b/configure.ac index 1294740a482..05dbc733e52 100644 --- a/configure.ac +++ b/configure.ac @@ -73,7 +73,7 @@ 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 @@ -1452,17 +1452,27 @@ dnl 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 @@ -1473,6 +1483,10 @@ if test "x$enable_opencl" = xyes; 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 @@ -1677,7 +1691,8 @@ if test "x$enable_gallium_llvm" = xyes; then if test "x$LLVM_CONFIG" != xno; then LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'` - if test "x$with_llvm_shared_libs" = xyes; then + 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 dnl We can't use $LLVM_VERSION because it has 'svn' stripped out, LLVM_LIBS="-lLLVM-`$LLVM_CONFIG --version`" else @@ -1698,7 +1713,7 @@ if test "x$enable_gallium_llvm" = xyes; then 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 @@ -1712,9 +1727,11 @@ if test "x$enable_gallium_llvm" = xyes; then fi else MESA_LLVM=0 + LLVM_VERSION_INT=0 fi else MESA_LLVM=0 + LLVM_VERSION_INT=0 fi dnl Directory for XVMC libs @@ -1789,7 +1806,7 @@ gallium_require_llvm() { 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 @@ -1800,24 +1817,19 @@ gallium_require_drm_loader() { 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 '\' ; 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 '\' ; 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_LIBS="$LLVM_LIBS `$LLVM_CONFIG --libs r600`" } dnl Gallium drivers @@ -1955,8 +1967,14 @@ AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes) 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) @@ -1989,12 +2007,29 @@ AC_CONFIG_FILES([configs/current 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/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/clover/Makefile + src/gallium/targets/Makefile src/gallium/targets/opencl/Makefile + src/gallium/winsys/Makefile + src/gallium/winsys/i915/drm/Makefile + src/gallium/winsys/i915/sw/Makefile + src/gallium/winsys/radeon/drm/Makefile src/gbm/Makefile src/gbm/main/gbm.pc src/glsl/Makefile