Switch to new package format

This commit is contained in:
2026-06-13 19:58:57 +03:00
parent d95dd445fa
commit 197ff7b5c6
3 changed files with 71 additions and 2 deletions
@@ -0,0 +1,65 @@
From 10cbd3bb81979275b05af905f8c6fe8ff0e0ff02 Mon Sep 17 00:00:00 2001
From: Yurakaii <[email protected]>
Date: Sat, 28 Feb 2026 14:22:07 -0500
Subject: [PATCH] Replace broken AX_CHECK_GL with manual check
---
configure.ac | 45 +++++++++++++++++++++++++++++++--------------
1 file changed, 31 insertions(+), 14 deletions(-)
diff --git a/configure.ac b/configure.ac
index dfef96fd..a7ed53e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -317,20 +317,37 @@ AC_CHECK_LIB(SDL2,SDL_Init, have_sdl=yes, have_sdl=no)
[do not include support for output with sdl_glsl])
)
AS_IF([test "x$enable_output_sdl_glsl" != "xno"], [
- m4_ifdef([AX_CHECK_GL], [
- AX_CHECK_GL(have_opengl=yes, have_opengl=no)
- ], [
- AC_MSG_NOTICE([You need to install the autoconf archives to check for opengl. Remember to re-run autogen.sh.])
- have_opengl=no
- ])
- if [[ $have_opengl = "yes" ]] ; then
- LIBS="$LIBS $GL_LIBS"
- CPPFLAGS="$CPPFLAGS -DSDL_GLSL $GL_CFLAGS"
- fi
-
- if [[ $have_opengl = "no" ]] ; then
- AC_MSG_NOTICE([INFO: building without sdl_glsl (opengl) support])
- fi
+ have_opengl=no
+ GL_LIBS=""
+ GL_CFLAGS=""
+ AC_MSG_CHECKING([for OpenGL])
+
+ case $host_os in
+ darwin*)
+ AC_CHECK_HEADER([OpenGL/gl.h],
+ [GL_LIBS="-framework OpenGL"
+ have_opengl=yes],
+ [have_opengl=no])
+ ;;
+ *)
+ AC_CHECK_HEADER([GL/gl.h],
+ [AC_SEARCH_LIBS([glBegin], [GL],
+ [have_opengl=yes
+ AS_IF([test "x$ac_cv_search_glBegin" != "xnone required"],
+ [GL_LIBS="$ac_cv_search_glBegin"])],
+ [have_opengl=no])],
+ [have_opengl=no])
+ ;;
+ esac
+
+ if test "x$have_opengl" = "xyes"; then
+ AC_MSG_RESULT([yes])
+ LIBS="$LIBS $GL_LIBS"
+ CPPFLAGS="$CPPFLAGS -DSDL_GLSL $GL_CFLAGS"
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_NOTICE([INFO: building without sdl_glsl (opengl) support])
+ fi
],
[have_opengl=no]
)