summaryrefslogtreecommitdiff
path: root/graphics/mesa/patches/patch-configure_ac
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mesa/patches/patch-configure_ac')
-rw-r--r--graphics/mesa/patches/patch-configure_ac98
1 files changed, 98 insertions, 0 deletions
diff --git a/graphics/mesa/patches/patch-configure_ac b/graphics/mesa/patches/patch-configure_ac
new file mode 100644
index 0000000..331c162
--- /dev/null
+++ b/graphics/mesa/patches/patch-configure_ac
@@ -0,0 +1,98 @@
+$OpenBSD$
+
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -45,6 +45,8 @@ AC_CONFIG_MACRO_DIR([m4])
+ AC_CANONICAL_SYSTEM
+ AM_INIT_AUTOMAKE([foreign tar-ustar dist-xz subdir-objects])
+
++AM_MAINTAINER_MODE
++
+ dnl We only support native Windows builds (MinGW/MSVC) through SCons.
+ case "$host_os" in
+ mingw*)
+@@ -182,6 +184,15 @@ else
+ fi
+ fi
+
++dnl Avoid attempting to rebuild files with python and yacc
++AC_ARG_ENABLE([regen-sources],
++ [AS_HELP_STRING([--disable-regen-sources],
++ [disable regenerating source with python and yacc @<:@default=enabled@:>@])],
++ [regen_sources="$enableval"],
++ [regen_sources=yes])
++
++AM_CONDITIONAL(REGEN_SOURCES, test "x$regen_sources" = xyes)
++
+ AC_PROG_INSTALL
+
+ dnl We need a POSIX shell for parts of the build. Assume we have one
+@@ -503,6 +514,19 @@ if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" = xyes; then
+ fi
+ AC_SUBST([LIBATOMIC_LIBS])
+
++dnl Check if host supports 32-bit atomics
++AC_MSG_CHECKING(whether __sync_add_and_fetch_4 is supported)
++AC_LINK_IFELSE([AC_LANG_SOURCE([[
++#include <stdint.h>
++uint64_t v;
++int main() {
++ return __sync_add_and_fetch(&v, (uint32_t)1);
++}]])], GCC_32BIT_ATOMICS_SUPPORTED=yes, GCC_32BIT_ATOMICS_SUPPORTED=no)
++if test "x$GCC_32BIT_ATOMICS_SUPPORTED" != xyes; then
++ DEFINES="$DEFINES -DMISSING_32BIT_ATOMICS"
++fi
++AC_MSG_RESULT($GCC_32BIT_ATOMICS_SUPPORTED)
++
+ 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)
+@@ -736,16 +760,19 @@ LDFLAGS=$save_LDFLAGS
+ AM_CONDITIONAL(HAVE_LD_DYNAMIC_LIST, test "$have_ld_dynamic_list" = "yes")
+
+ dnl
+-dnl OSX linker does not support build-id
++dnl Check if linker supports build-id
+ dnl
+-case "$host_os" in
+-darwin*)
+- LD_BUILD_ID=""
+- ;;
+-*)
+- LD_BUILD_ID="-Wl,--build-id=sha1"
+- ;;
+-esac
++save_LDFLAGS=$LDFLAGS
++LDFLAGS="$LDFLAGS -Wl,--build-id=sha1"
++AC_MSG_CHECKING([if ld supports build-id])
++AC_LINK_IFELSE(
++ [AC_LANG_SOURCE([int main() { return 0;}])],
++ [AC_MSG_RESULT([yes])
++ LD_BUILD_ID="-Wl,--build-id=sha1";DEFINES="$DEFINES -DHAVE_LD_BUILD_ID";],
++ [AC_MSG_RESULT([no])
++ LD_BUILD_ID="";])
++LDFLAGS=$save_LDFLAGS
++
+ AC_SUBST([LD_BUILD_ID])
+
+ dnl
+@@ -954,6 +981,9 @@ esac
+ dnl See if posix_memalign is available
+ AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
+
++dnl See if arc4random_buf is available
++AC_CHECK_FUNC([arc4random_buf], [DEFINES="$DEFINES -DHAVE_ARC4RANDOM_BUF"])
++
+ dnl Check for zlib
+ PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED])
+ DEFINES="$DEFINES -DHAVE_ZLIB"
+@@ -2704,7 +2734,7 @@ if test -n "$with_gallium_drivers"; then
+ HAVE_GALLIUM_R300=yes
+ PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
+ require_libdrm "r300"
+- r300_require_llvm "r300"
++# r300_require_llvm "r300"
+ ;;
+ xr600)
+ HAVE_GALLIUM_R600=yes