gallium/hud: set the dump file streams to line buffered
[mesa.git] / configure.ac
index dbf0bf83185b396d58fb5b624f356fadb63f1ad8..7246c6017a28dfa1bdbd1df6d016969075d556e1 100644 (file)
@@ -74,7 +74,7 @@ AC_SUBST([OPENCL_VERSION])
 # in the first entry.
 LIBDRM_REQUIRED=2.4.75
 LIBDRM_RADEON_REQUIRED=2.4.71
-LIBDRM_AMDGPU_REQUIRED=2.4.63
+LIBDRM_AMDGPU_REQUIRED=2.4.79
 LIBDRM_INTEL_REQUIRED=2.4.75
 LIBDRM_NVVIEUX_REQUIRED=2.4.66
 LIBDRM_NOUVEAU_REQUIRED=2.4.66
@@ -415,6 +415,20 @@ if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" = x1; then
 fi
 AM_CONDITIONAL([GCC_ATOMIC_BUILTINS_SUPPORTED], [test x$GCC_ATOMIC_BUILTINS_SUPPORTED = x1])
 
+dnl Check if host supports 64-bit atomics
+dnl note that lack of support usually results in link (not compile) error
+AC_MSG_CHECKING(whether __sync_add_and_fetch_8 is supported)
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
+#include <stdint.h>
+uint64_t v;
+int main() {
+    return __sync_add_and_fetch(&v, (uint64_t)1);
+}]])], GCC_64BIT_ATOMICS_SUPPORTED=yes, GCC_64BIT_ATOMICS_SUPPORTED=no)
+if test "x$GCC_64BIT_ATOMICS_SUPPORTED" != xyes; then
+    DEFINES="$DEFINES -DMISSING_64BIT_ATOMICS"
+fi
+AC_MSG_RESULT($GCC_64BIT_ATOMICS_SUPPORTED)
+
 dnl Check for Endianness
 AC_C_BIGENDIAN(
    little_endian=no,
@@ -803,7 +817,7 @@ fi
 dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the
 dnl project. Even then there's a notable issue as described in the project README
 case "$host_os" in
-linux* | cygwin* | darwin* | solaris* | gnu*)
+linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu*)
     pthread_stubs_possible="no"
     ;;
 * )
@@ -909,9 +923,9 @@ llvm_add_target() {
 strip_unwanted_llvm_flags() {
     echo " `$1` " | sed -E \
         -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \
-        -e 's/[[[:space:]]]+-DNDEBUG[[[:space:]]]//g' \
-        -e 's/[[[:space:]]]+-D_GNU_SOURCE[[[:space:]]]//g' \
-        -e 's/[[[:space:]]]+-pedantic[[[:space:]]]//g' \
+        -e 's/[[[:space:]]]+-DNDEBUG[[[:space:]]]/ /g' \
+        -e 's/[[[:space:]]]+-D_GNU_SOURCE[[[:space:]]]/ /g' \
+        -e 's/[[[:space:]]]+-pedantic[[[:space:]]]/ /g' \
         -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \
         -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \
         -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \
@@ -1025,6 +1039,30 @@ AC_SUBST([LLVM_LIBS])
 AC_SUBST([LLVM_LDFLAGS])
 AC_SUBST([LLVM_INCLUDEDIR])
 
+dnl
+dnl libunwind
+dnl
+AC_ARG_ENABLE([libunwind],
+    [AS_HELP_STRING([--enable-libunwind],
+            [Use libunwind for backtracing (default: auto)])],
+        [LIBUNWIND="$enableval"],
+        [LIBUNWIND="auto"])
+
+PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
+if test "x$LIBUNWIND" = "xauto"; then
+    LIBUNWIND="$HAVE_LIBUNWIND"
+fi
+
+if test "x$LIBUNWIND" = "xyes"; then
+    if test "x$HAVE_LIBUNWIND" != "xyes"; then
+        AC_MSG_ERROR([libunwind requested but not installed.])
+    fi
+    AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
+fi
+
+AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$LIBUNWIND" = xyes])
+
+
 dnl Options for APIs
 AC_ARG_ENABLE([opengl],
     [AS_HELP_STRING([--disable-opengl],
@@ -2358,10 +2396,10 @@ if test -n "$with_gallium_drivers"; then
         xswr)
             llvm_require_version $LLVM_REQUIRED_SWR "swr"
 
-            swr_require_cxx_feature_flags "C++11" "__cplusplus >= 201103L" \
-                ",-std=c++11" \
-                SWR_CXX11_CXXFLAGS
-            AC_SUBST([SWR_CXX11_CXXFLAGS])
+            swr_require_cxx_feature_flags "C++14" "__cplusplus >= 201402L" \
+                "-std=c++14" \
+                SWR_CXX14_CXXFLAGS
+            AC_SUBST([SWR_CXX14_CXXFLAGS])
 
             swr_require_cxx_feature_flags "AVX" "defined(__AVX__)" \
                 ",-mavx,-march=core-avx" \