128 lines
4.5 KiB
Plaintext
128 lines
4.5 KiB
Plaintext
$NetBSD: patch-configure.ac,v 1.5 2019/01/20 09:50:28 tnn Exp $
|
|
|
|
Don't check for pthread stubs anywhere, as we don't provide it.
|
|
|
|
From FreeBSD ports graphics/mesa-dri 18.0.0,
|
|
DragonFly dports graphics/mesa-dri 17.3.1,
|
|
files/patch-configure
|
|
|
|
For FreeBSD 11.2-RELEASE
|
|
CXXLD mesa_dri_drivers.la
|
|
/usr/bin/ld: unrecognized option '--build-id=sha1'
|
|
|
|
* But do NOT extend to FreeBSD, instead use binutils ld to link.
|
|
osx: ld does not support --build-ld
|
|
|
|
* For FreeBSD: Use monotonic clock for timeouts.
|
|
|
|
* For FreeBSD: Implement futex_wake() and futex_wait() via _umtx_op()
|
|
|
|
* dri3: Mon Apr 10 19:14:48 2017 UTC
|
|
DRI3 remains enabled at compile time, but it is now disabled at
|
|
runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the
|
|
environment to enable DRI3.
|
|
This change was made to work around a problem in libEGL,
|
|
which fails to fall back to using DRI2 when run on a system
|
|
without DRI3 support.
|
|
|
|
--- configure.ac.orig 2019-01-17 11:26:22.000000000 +0000
|
|
+++ configure.ac
|
|
@@ -726,7 +726,7 @@ dnl
|
|
dnl OSX linker does not support build-id
|
|
dnl
|
|
case "$host_os" in
|
|
-darwin*)
|
|
+darwin* | solaris*)
|
|
LD_BUILD_ID=""
|
|
;;
|
|
*)
|
|
@@ -931,7 +931,7 @@ case "$host_os" in
|
|
darwin*)
|
|
;;
|
|
*)
|
|
- AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],
|
|
+ AC_CHECK_FUNCS([clock_gettime clock_nanosleep], [CLOCK_LIB=],
|
|
[AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt],
|
|
[AC_MSG_ERROR([Could not find clock_gettime])])])
|
|
AC_SUBST([CLOCK_LIB])
|
|
@@ -941,6 +941,9 @@ esac
|
|
dnl See if posix_memalign is available
|
|
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
|
|
|
|
+dnl See if open_memstream is available
|
|
+AC_CHECK_FUNC([open_memstream], [DEFINES="$DEFINES -DHAVE_OPEN_MEMSTREAM"])
|
|
+
|
|
dnl Check for zlib
|
|
PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED])
|
|
DEFINES="$DEFINES -DHAVE_ZLIB"
|
|
@@ -966,7 +969,7 @@ PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
|
|
dnl pthread-stubs is mandatory on some 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* | gnu* | openbsd*)
|
|
+*)
|
|
pthread_stubs_possible="no"
|
|
;;
|
|
* )
|
|
@@ -982,8 +985,12 @@ save_LIBS="$LIBS"
|
|
LIBS="$PTHREAD_LIBS"
|
|
AC_MSG_CHECKING(whether pthread_setaffinity_np is supported)
|
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
+ #if defined(__DragonFly__) || defined(__FreeBSD__)
|
|
+ #include <pthread_np.h>
|
|
+ #else
|
|
#define _GNU_SOURCE
|
|
#include <pthread.h>
|
|
+ #endif
|
|
int main() {
|
|
void *a = (void*) &pthread_setaffinity_np;
|
|
long b = (long) a;
|
|
@@ -995,7 +1002,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
LIBS="$save_LIBS"
|
|
|
|
dnl Check for futex for fast inline simple_mtx_t.
|
|
-AC_CHECK_HEADER([linux/futex.h], [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"])
|
|
+AC_CHECK_HEADERS([linux/futex.h sys/umtx.h],
|
|
+ [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"],,
|
|
+ [#include <errno.h>
|
|
+ #include <sys/types.h>])
|
|
|
|
dnl SELinux awareness.
|
|
AC_ARG_ENABLE([selinux],
|
|
@@ -1278,7 +1288,7 @@ fi
|
|
AC_SUBST(LIBSENSORS_LIBS)
|
|
|
|
case "$host_os" in
|
|
-linux*)
|
|
+linux* | freebsd* | dragonfly*)
|
|
dri3_default=yes
|
|
;;
|
|
*)
|
|
@@ -1908,7 +1918,7 @@ if test x"$enable_dri3" = xyes; then
|
|
dri3_modifier_modules="xcb-dri3 >= $XCBDRI3_MODIFIERS_REQUIRED xcb-present >= $XCBPRESENT_MODIFIERS_REQUIRED"
|
|
PKG_CHECK_MODULES([XCB_DRI3_MODIFIERS], [$dri3_modifier_modules], [have_dri3_modifiers=yes], [have_dri3_modifiers=no])
|
|
|
|
- if test "x$have_dri3_modifiers" == xyes; then
|
|
+ if test "x$have_dri3_modifiers" = xyes; then
|
|
DEFINES="$DEFINES -DHAVE_DRI3_MODIFIERS"
|
|
fi
|
|
fi
|
|
@@ -2505,8 +2515,6 @@ if test "x$enable_opencl" = xyes; then
|
|
CLANG_LIBDIR=${LLVM_LIBDIR}
|
|
fi
|
|
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
|
|
- AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
|
|
- [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
|
|
fi
|
|
AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
|
|
AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
|
|
@@ -2941,7 +2949,7 @@ if test "x$enable_llvm" = xyes; then
|
|
dnl the LLVM library propagated in the Libs.private of the respective .pc
|
|
dnl file which ensures complete dependency information when statically
|
|
dnl linking.
|
|
- if test "x$enable_glx" == xgallium-xlib; then
|
|
+ if test "x$enable_glx" = xgallium-xlib; then
|
|
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $LLVM_LIBS"
|
|
fi
|
|
if test "x$enable_gallium_osmesa" = xyes; then
|