[Mesa-dev] [PATCH v2 8/8] Haiku: convert to autotools
Jerome Duval
jerome.duval at gmail.com
Tue Oct 24 16:11:08 UTC 2017
From: Jérôme Duval <jerome.duval at gmail.com>
* -pthread is not available on Haiku.
* Haiku doesn't require --enable-dri
---
configure.ac | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9aa02f5..58795e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -272,6 +272,9 @@ case "$host_os" in
*-android*)
android=yes
;;
+*haiku)
+ haiku=yes
+ ;;
linux*|*-gnu*|gnu*|cygwin*)
DEFINES="$DEFINES -D_GNU_SOURCE"
;;
@@ -281,6 +284,7 @@ solaris*)
esac
AM_CONDITIONAL(HAVE_ANDROID, test "x$android" = xyes)
+AM_CONDITIONAL(HAVE_HAIKU, test "x$haiku" = xyes)
dnl
dnl Check compiler flags
@@ -863,12 +867,18 @@ dnl According to the manual when using pthreads, one should add -pthread to
dnl both compile and link-time arguments.
dnl In practise that should be sufficient for all platforms, since any
dnl platforms build with GCC and Clang support the flag.
-PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
+case "$host_os" in
+haiku*)
+ ;;
+* )
+ PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
+ ;;
+esac
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* | gnu*)
+linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | haiku*)
pthread_stubs_possible="no"
;;
* )
@@ -1518,7 +1528,12 @@ require_dri_shared_libs_and_glapi() {
if test "x$enable_dri" != xyes; then
# There is only a single backend which won't be build/used otherwise.
# XXX: Revisit this as the egl/haiku is a thing.
- AC_MSG_ERROR([$1 requires --enable-dri])
+ case "$host_os" in
+ haiku*)
+ ;;
+ *)
+ AC_MSG_ERROR([$1 requires --enable-dri]) ;;
+ esac
fi
if test "x$enable_shared_glapi" != xyes; then
@@ -1748,6 +1763,10 @@ for plat in $platforms; do
DEFINES="$DEFINES -DHAVE_ANDROID_PLATFORM"
;;
+ haiku)
+ DEFINES="$DEFINES -DHAVE_HAIKU_PLATFORM"
+ ;;
+
*)
AC_MSG_ERROR([platform '$plat' does not exist])
;;
@@ -2892,6 +2911,7 @@ AC_CONFIG_FILES([Makefile
src/gallium/state_trackers/clover/Makefile
src/gallium/state_trackers/dri/Makefile
src/gallium/state_trackers/glx/xlib/Makefile
+ src/gallium/state_trackers/hgl/Makefile
src/gallium/state_trackers/nine/Makefile
src/gallium/state_trackers/omx_bellagio/Makefile
src/gallium/state_trackers/osmesa/Makefile
@@ -2902,6 +2922,7 @@ AC_CONFIG_FILES([Makefile
src/gallium/targets/d3dadapter9/Makefile
src/gallium/targets/d3dadapter9/d3d.pc
src/gallium/targets/dri/Makefile
+ src/gallium/targets/haiku-softpipe/Makefile
src/gallium/targets/libgl-xlib/Makefile
src/gallium/targets/omx-bellagio/Makefile
src/gallium/targets/opencl/Makefile
@@ -2926,6 +2947,7 @@ AC_CONFIG_FILES([Makefile
src/gallium/winsys/amdgpu/drm/Makefile
src/gallium/winsys/svga/drm/Makefile
src/gallium/winsys/sw/dri/Makefile
+ src/gallium/winsys/sw/hgl/Makefile
src/gallium/winsys/sw/kms-dri/Makefile
src/gallium/winsys/sw/null/Makefile
src/gallium/winsys/sw/wrapper/Makefile
@@ -2942,6 +2964,8 @@ AC_CONFIG_FILES([Makefile
src/glx/windows/Makefile
src/glx/windows/windowsdriproto.pc
src/gtest/Makefile
+ src/hgl/Makefile
+ src/hgl/gl.pc
src/intel/Makefile
src/loader/Makefile
src/mapi/Makefile
--
2.7.4
More information about the mesa-dev
mailing list