autotools: Add check for libdecor get min/max functions

This commit is contained in:
Frank Praznik 2023-01-18 13:03:04 -05:00 committed by Sam Lantinga
parent 8efa1f8fc6
commit 44dc90dcc8
2 changed files with 11 additions and 0 deletions

View file

@ -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

View file

@ -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_ */