From bdbab22de6556e904343d5d4bb21c20595f57b0b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 31 May 2019 21:42:15 +0300 Subject: Fix compilation warnings with new mesa and SDL 1.2 Add workaround to fix SDL redefine bug. --- configure.ac | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d84bec5ea..7bdca2844 100755 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,37 @@ AC_DEFUN([AC_CHECK_LD_FLAG], ] ) +AC_DEFUN([AC_CHECK_GLXEXT], + [ + AC_MSG_CHECKING([whether have glext.h]) + OLD_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="" + $1=no + AC_LINK_IFELSE( + [AC_LANG_SOURCE([ + #include + #include + #ifndef __gl_glext_h_ + #error __gl_glext_h_ not defined + #endif + int main(int argc, char **argv) + { + return 0; + } + ])], + [ + AC_MSG_RESULT([yes]) + $1=yes + ], + [ + AC_MSG_RESULT([no]) + $1=no + ] + ) + CXXFLAGS="$OLD_CXXFLAGS" + ] +) + # Enable -Werror AC_ARG_ENABLE(werror, [ --enable-werror Fail build if warning present], @@ -333,6 +364,9 @@ fi AM_CONDITIONAL(USE_SDL2, test x$with_sdl2 = xyes) +AC_CHECK_GLXEXT(have_glext) +AM_CONDITIONAL(HAVE_GLEXT, test x$have_glext = xyes) + # Option to enable internal sdl-gfx for SDL2 (for now it enabled by default) if test "x$with_internalsdlgfx" == "xno"; then with_internalsdlgfx=no -- cgit v1.2.3-70-g09d2