summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-05-31 21:42:15 +0300
committerAndrei Karas <akaras@inbox.ru>2019-05-31 21:46:40 +0300
commitbdbab22de6556e904343d5d4bb21c20595f57b0b (patch)
treec3bca4cd18b12c8911e999389fd36979369de9c1 /configure.ac
parent27004e91dc0f1a38886008d419b85e5fdbab369c (diff)
downloadplus-bdbab22de6556e904343d5d4bb21c20595f57b0b.tar.gz
plus-bdbab22de6556e904343d5d4bb21c20595f57b0b.tar.bz2
plus-bdbab22de6556e904343d5d4bb21c20595f57b0b.tar.xz
plus-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-xconfigure.ac34
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