gtest: Fix up import of gtest 1.6.0
[mesa.git] / configure.ac
index 519662b7a051cdb196155dad3f525537d7fa13fa..9baccab3624b769a27b663d8e6cc49253cfb7501 100644 (file)
@@ -37,7 +37,7 @@ USER_CXXFLAGS="$CXXFLAGS"
 dnl Versions for external dependencies
 LIBDRM_REQUIRED=2.4.24
 LIBDRM_RADEON_REQUIRED=2.4.31
-LIBDRM_INTEL_REQUIRED=2.4.30
+LIBDRM_INTEL_REQUIRED=2.4.32
 LIBDRM_NOUVEAU_REQUIRED=0.6
 DRI2PROTO_REQUIRED=2.6
 GLPROTO_REQUIRED=1.4.14
@@ -1779,6 +1779,13 @@ AC_ARG_ENABLE([gallium-llvm],
         [build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
     [enable_gallium_llvm="$enableval"],
     [enable_gallium_llvm=auto])
+
+AC_ARG_WITH([llvm-shared-libs],
+    [AS_HELP_STRING([--with-llvm-shared-libs],
+        [link with LLVM shared libraries @<:@default=disabled@:>@])],
+    [with_llvm_shared_libs=yes],
+    [with_llvm_shared_libs=no])
+
 if test "x$with_gallium_drivers" = x; then
     enable_gallium_llvm=no
 fi
@@ -1793,8 +1800,12 @@ if test "x$enable_gallium_llvm" = xyes; then
     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'`
-       LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter`"
-
+       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_LIBS="`$LLVM_CONFIG --libs engine bitwriter`"
+       fi
        LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
        DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"
        MESA_LLVM=1
@@ -1805,6 +1816,14 @@ else
     MESA_LLVM=0
 fi
 
+dnl Directory for XVMC libs
+AC_ARG_WITH([xvmc-libdir],
+    [AS_HELP_STRING([--with-xvmc-libdir=DIR],
+        [directory for the XVMC libraries @<:@default=${libdir}@:>@])],
+    [XVMC_LIB_INSTALL_DIR="$withval"],
+    [XVMC_LIB_INSTALL_DIR='${libdir}'])
+AC_SUBST([XVMC_LIB_INSTALL_DIR])
+
 dnl Directory for VDPAU libs
 AC_ARG_WITH([vdpau-libdir],
     [AS_HELP_STRING([--with-vdpau-libdir=DIR],
@@ -1844,15 +1863,12 @@ gallium_check_st() {
     fi
     if test "x$HAVE_ST_XVMC" = xyes && test "x$5" != x; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
-         NEED_G3DVL_DRI="yes"
     fi
     if test "x$HAVE_ST_VDPAU" = xyes && test "x$6" != x; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
-         NEED_G3DVL_DRI="yes"
     fi
     if test "x$HAVE_ST_VA" = xyes && test "x$7" != x; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $7"
-         NEED_G3DVL_DRI="yes"
     fi
 }
 
@@ -1932,10 +1948,6 @@ if test "x$with_gallium_drivers" != x; then
     done
 fi
 
-if test "x$NEED_G3DVL_DRI" = xyes; then
-    GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS g3dvl/dri"
-fi
-
 dnl Tell Automake which drivers to build
 for driver in $GALLIUM_DRIVERS_DIRS; do
     case "x$driver" in
@@ -1987,6 +1999,7 @@ AC_CONFIG_FILES([configs/autoconf
                src/egl/wayland/wayland-drm/Makefile
                src/glx/Makefile
                src/mapi/shared-glapi/Makefile
+               src/gtest/Makefile
                src/mesa/drivers/dri/dri.pc
                src/mesa/drivers/dri/Makefile
                src/mesa/drivers/dri/common/Makefile