autotools: Add check for libdecor get min/max functions
diff --git a/configure.ac b/configure.ac
index d815a16..a4fe1ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1787,6 +1787,14 @@ dnl See if libdecor is available
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DECOR_LIBS"
fi
+
+ saved_cflags=$CFLAGS
+ CFLAGS="$CFLAGS $DECOR_CFLAGS"
+ AC_CHECK_DECLS([libdecor_frame_get_min_content_size, libdecor_frame_get_max_content_size], [libdecor_get_min_max=yes], [ ], [[#include <libdecor.h>]])
+ if test x$libdecor_get_min_max = xyes; then
+ AC_DEFINE(SDL_HAVE_LIBDECOR_GET_MIN_MAX, 1, [ ])
+ fi
+ CFLAGS="$saved_cflags"
fi
fi
fi
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 5dc98a3..d6460b7 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -491,4 +491,7 @@
/* Enable dynamic libsamplerate support */
#undef SDL_LIBSAMPLERATE_DYNAMIC
+/* Libdecor get min/max content size functions */
+#undef SDL_HAVE_LIBDECOR_GET_MIN_MAX
+
#endif /* SDL_config_h_ */