SDL: wayland: don't use libdecor_frame_get_* functions when header doesn't have it (e6f63)

From e6f635ca172027f57542b715787ac5b50f3f6d33 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 26 May 2023 23:00:56 +0200
Subject: [PATCH] wayland: don't use libdecor_frame_get_* functions when header
 doesn't have it

and we're statically linking to the library.
This fixes building SDL with -DSDL_WAYLAND_SHARED=OFF

(cherry picked from commit 5b5b67df203e9f8391e7e53aa5de54abf14c482e)
---
 src/video/wayland/SDL_waylandsym.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/video/wayland/SDL_waylandsym.h b/src/video/wayland/SDL_waylandsym.h
index 4d6cdc95474a..c59bb30c9c81 100644
--- a/src/video/wayland/SDL_waylandsym.h
+++ b/src/video/wayland/SDL_waylandsym.h
@@ -217,6 +217,7 @@ SDL_WAYLAND_SYM(bool, libdecor_configuration_get_window_state, (struct libdecor_
                                                                 enum libdecor_window_state *))
 SDL_WAYLAND_SYM(int, libdecor_dispatch, (struct libdecor *, int))
 
+#if defined(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR) || defined(SDL_HAVE_LIBDECOR_GET_MIN_MAX)
 /* Only found in libdecor 0.1.1 or higher, so failure to load them is not fatal. */
 SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_min_content_size, (struct libdecor_frame *,\
                                                             int *,\
@@ -226,6 +227,8 @@ SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_max_content_size, (struct libdecor_
                                                             int *))
 #endif
 
+#endif
+
 #undef SDL_WAYLAND_MODULE
 #undef SDL_WAYLAND_SYM
 #undef SDL_WAYLAND_SYM_OPT