--- configure 2026-02-05 21:26:28.000000000 +0800 +++ configure 2026-05-10 05:45:09.000000000 +0800 @@ -1942,13 +1942,6 @@ if test "$darwin" = "yes" ; then cat > $TMPC << EOF -#include -#include -int main( void ) { glEnable(GL_NORMALIZE); return 0; } -EOF - -else - cat > $TMPC << EOF #include #include int main( void ) { glEnable(GL_NORMALIZE); return 0; } @@ -1965,9 +1958,6 @@ LINK3D="-lopengl32 -lglu32" fi elif test "$darwin" = "yes" ; then - LINK3D="-framework OpenGL -framework GLUT" - DarwinGL="yes" - else LINK3D="-lGL -lGLU -lX11" fi if docc $LINK3D $LDFLAGS ; then @@ -2790,9 +2780,6 @@ elif test "$darwin" = "yes" ; then echo "CONFIG_DARWIN=yes" >> config.mak echo "#define GPAC_CONFIG_DARWIN" >> $TMPH - if test "$DarwinGL" = "yes" ; then - echo "#define CONFIG_DARWIN_GL" >> $TMPH - fi echo "mac_apps=$Mac_Applications" >> config.mak elif test "$sunos" = "yes" ; then echo "CONFIG_SUNOS=yes" >> config.mak --- src/Makefile 2024-04-18 01:18:21.000000000 +0800 +++ src/Makefile 2025-05-13 02:02:33.000000000 +0800 @@ -20,6 +20,10 @@ endif endif +ifeq ($(CONFIG_DARWIN),yes) +CFLAGS+=-Wno-int-conversion +endif + ## libgpac objects gathering: src/utils LIBGPAC_UTILS=utils/os_divers.o utils/os_file.o utils/list.o utils/bitstream.o utils/constants.o utils/error.o utils/alloc.o utils/url.o utils/configfile.o utils/gltools.o utils/gzio.o utils/xml_parser.o LIBGPAC_UTILS+=utils/sha1.o utils/sha256.o utils/base_encoding.o utils/math.o utils/os_net.o utils/os_thread.o utils/os_config_init.o utils/cache.o utils/downloader.o utils/utf.o utils/token.o utils/color.o utils/Remotery.o --- modules/x11_out/Makefile 2024-04-18 01:18:21.000000000 +0800 +++ modules/x11_out/Makefile 2025-05-13 02:00:06.000000000 +0800 @@ -42,7 +42,7 @@ else CFLAGS+=$(OGL_INCLS) EXTRALIBS+=$(OGL_LIBS) -ifeq ($(CONFIG_DARWIN),yes) +ifeq ($(CONFIG_DARWIN_GL),yes) EXTRALIBS+=-framework OpenGL endif --- modules/sdl_out/Makefile 2024-04-18 01:18:21.000000000 +0800 +++ modules/sdl_out/Makefile 2025-05-13 02:00:01.000000000 +0800 @@ -16,7 +16,7 @@ LINKFLAGS=-L../../bin/gcc -lgpac $(sdl_ldflags) -ifeq ($(CONFIG_DARWIN),yes) +ifeq ($(CONFIG_DARWIN_GL),yes) LINKFLAGS+=-framework OpenGL endif --- modules/sdl_out/video.c 2024-04-18 01:18:21.000000000 +0800 +++ modules/sdl_out/video.c 2025-05-13 02:27:51.000000000 +0800 @@ -1551,7 +1551,7 @@ #if SDL_VERSION_ATLEAST(2,0,0) //for CGLSetParameter -#if defined(__APPLE__) && !defined(GPAC_CONFIG_IOS) +#if defined(CONFIG_DARWIN_GL) && !defined(GPAC_CONFIG_IOS) #include #endif @@ -1565,7 +1565,7 @@ if (ctx->output_3d) { //with SDL2 we have to disable vsync by overriding swap interval -#if defined(__APPLE__) && !defined(GPAC_CONFIG_IOS) && !defined(GPAC_DISABLE_3D) +#if defined(CONFIG_DARWIN_GL) && !defined(GPAC_CONFIG_IOS) && !defined(GPAC_DISABLE_3D) if (ctx->disable_vsync) { GLint sync = 0; CGLContextObj gl_ctx = CGLGetCurrentContext();