diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-05-31 21:42:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-05-31 21:46:40 +0300 |
commit | bdbab22de6556e904343d5d4bb21c20595f57b0b (patch) | |
tree | c3bca4cd18b12c8911e999389fd36979369de9c1 /configure.ac | |
parent | 27004e91dc0f1a38886008d419b85e5fdbab369c (diff) | |
download | manaverse-bdbab22de6556e904343d5d4bb21c20595f57b0b.tar.gz manaverse-bdbab22de6556e904343d5d4bb21c20595f57b0b.tar.bz2 manaverse-bdbab22de6556e904343d5d4bb21c20595f57b0b.tar.xz manaverse-bdbab22de6556e904343d5d4bb21c20595f57b0b.zip |
Fix compilation warnings with new mesa and SDL 1.2
Add workaround to fix SDL redefine bug.
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 34 |
1 files changed, 34 insertions, 0 deletions
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 <GL/gl.h> + #include <GL/glext.h> + #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 |