PHP_ARG_WITH(sdl3, [for sdl3 support], [ AS_HELP_STRING([--with-sdl3[=DIR]], [Enable sdl3 support. DIR is the prefix for SDL3 installation.]) ]) PHP_ARG_WITH(sdl3_gfx, [for sdl3_gfx support], [ AS_HELP_STRING([--with-sdl3-gfx[=DIR]], [Enable sdl3_gfx support. DIR is the prefix for SDL3_gfx installation.]) ]) if test "$PHP_SDL3" != "no"; then if test -d "$PHP_SDL3"; then PKG_CONFIG_PATH="$PHP_SDL3/lib/pkgconfig:$PHP_SDL3/share/pkgconfig:$PKG_CONFIG_PATH" fi PKG_CHECK_MODULES([SDL3], [sdl3 >= 3.0.0], [ CFLAGS="$CFLAGS $SDL3_CFLAGS" LDFLAGS="$LDFLAGS $SDL3_LIBS" ],[ AC_MSG_ERROR([SDL3 not found. Please check your installation or use --with-sdl3=/path/to/sdl3]) ]) if test "$PHP_SDL3_GFX" != "no"; then if test -d "$PHP_SDL3_GFX"; then PKG_CONFIG_PATH="$PHP_SDL3_GFX/lib/pkgconfig:$PHP_SDL3_GFX/share/pkgconfig:$PKG_CONFIG_PATH" fi PKG_CHECK_MODULES([SDL3_GFX], [sdl3-gfx >= 1.0.0], [ CFLAGS="$CFLAGS $SDL3_GFX_CFLAGS" LDFLAGS="$LDFLAGS $SDL3_GFX_LIBS" ],[ AC_MSG_ERROR([SDL3_gfx not found. Please check your installation or use --with-sdl3-gfx=/path/to/sdl3_gfx]) ]) fi SDL_SOURCE_FILES="sdl3.c helper.c" PHP_NEW_EXTENSION(sdl3, $SDL_SOURCE_FILES, $ext_shared) fi