configure: move CheckLibDecor into CheckWayland
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
diff --git a/configure b/configure
index c256744..8a42ba0 100755
--- a/configure
+++ b/configure
@@ -859,6 +859,8 @@ enable_libsamplerate
enable_libsamplerate_shared
enable_arm_simd
enable_arm_neon
+enable_libdecor
+enable_libdecor_shared
enable_video_wayland
enable_video_wayland_qt_touch
enable_wayland_shared
@@ -893,8 +895,6 @@ enable_dbus
enable_ime
enable_ibus
enable_fcitx
-enable_libdecor
-enable_libdecor_shared
enable_joystick_mfi
enable_pthreads
enable_pthread_sem
@@ -1638,6 +1638,10 @@ Optional Features:
dynamically load libsamplerate [default=yes]
--enable-arm-simd use SIMD assembly blitters on ARM [default=no]
--enable-arm-neon use NEON assembly blitters on ARM [default=no]
+ --enable-libdecor use libdecor for Wayland client-side decorations
+ [default=yes]
+ --enable-libdecor-shared
+ dynamically load libdecor [default=yes]
--enable-video-wayland use Wayland video driver [default=yes]
--enable-video-wayland-qt-touch
QtWayland server support for Wayland video driver
@@ -1684,10 +1688,6 @@ Optional Features:
--enable-ime enable IME support [default=yes]
--enable-ibus enable IBus support [default=yes]
--enable-fcitx enable fcitx support [default=yes]
- --enable-libdecor use libdecor for Wayland client-side decorations
- [default=yes]
- --enable-libdecor-shared
- dynamically load libdecor [default=yes]
--enable-joystick-mfi include macOS MFI joystick support [default=yes]
--enable-pthreads use POSIX threads for multi-threading
[default=maybe]
@@ -19871,6 +19871,62 @@ $as_echo "$need_gcc_Wno_multichar" >&6; }
fi
}
+CheckLibDecor()
+{
+ # Check whether --enable-libdecor was given.
+if test "${enable_libdecor+set}" = set; then :
+ enableval=$enable_libdecor;
+else
+ enable_libdecor=yes
+fi
+
+ if test x$enable_libdecor = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdecor support" >&5
+$as_echo_n "checking for libdecor support... " >&6; }
+ if $PKG_CONFIG --exists libdecor-0; then :
+ video_libdecor=yes
+else
+ video_libdecor=no
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_libdecor" >&5
+$as_echo "$video_libdecor" >&6; }
+ if test x$video_libdecor = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags libdecor-0`"
+
+$as_echo "#define HAVE_LIBDECOR_H 1" >>confdefs.h
+
+
+ # Check whether --enable-libdecor-shared was given.
+if test "${enable_libdecor_shared+set}" = set; then :
+ enableval=$enable_libdecor_shared;
+else
+ enable_libdecor_shared=yes
+fi
+
+
+ decor_lib=`find_lib "libdecor-0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`
+
+ if test x$have_loadso != xyes && \
+ test x$enable_libdecor_shared = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic libdecor loading" >&5
+$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic libdecor loading" >&2;}
+ fi
+
+ if test x$have_loadso = xyes && \
+ test x$enable_libdecor_shared = xyes && test x$decor_lib != x; then
+ echo "-- dynamic libdecor -> $decor_lib"
+
+cat >>confdefs.h <<_ACEOF
+#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "$decor_lib"
+_ACEOF
+
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs libdecor-0`"
+ fi
+ fi
+ fi
+}
+
CheckWayland()
{
# Check whether --enable-video-wayland was given.
@@ -19989,6 +20045,8 @@ _ACEOF
SUMMARY_video="${SUMMARY_video} wayland"
fi
have_video=yes
+
+ CheckLibDecor
fi
fi
}
@@ -23355,61 +23413,6 @@ $as_echo "$have_fcitx" >&6; }
fi
}
-CheckLibDecor()
-{
- # Check whether --enable-libdecor was given.
-if test "${enable_libdecor+set}" = set; then :
- enableval=$enable_libdecor;
-else
- enable_libdecor=yes
-fi
-
- if test x$enable_libdecor = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdecor support" >&5
-$as_echo_n "checking for libdecor support... " >&6; }
- if $PKG_CONFIG --exists libdecor-0; then :
- video_libdecor=yes
-else
- video_libdecor=no
-fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_libdecor" >&5
-$as_echo "$video_libdecor" >&6; }
- if test x$video_libdecor = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags libdecor-0`"
-
-$as_echo "#define HAVE_LIBDECOR_H 1" >>confdefs.h
-
-
- # Check whether --enable-libdecor-shared was given.
-if test "${enable_libdecor_shared+set}" = set; then :
- enableval=$enable_libdecor_shared;
-else
- enable_libdecor_shared=yes
-fi
-
-
- decor_lib=`find_lib "libdecor-0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`
-
- if test x$have_loadso != xyes && \
- test x$enable_libdecor_shared = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic libdecor loading" >&5
-$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic libdecor loading" >&2;}
- fi
- if test x$have_loadso = xyes && \
- test x$enable_libdecor_shared = xyes && test x$decor_lib != x; then
- echo "-- dynamic libdecor -> $decor_lib"
-
-cat >>confdefs.h <<_ACEOF
-#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "$decor_lib"
-_ACEOF
-
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs libdecor-0`"
- fi
- fi
- fi
-}
-
CheckJoystickMFI()
{
# Check whether --enable-joystick-mfi was given.
@@ -25018,7 +25021,6 @@ $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
CheckInotify
CheckIBus
CheckFcitx
- CheckLibDecor
case $ARCH in
linux)
CheckInputKD
diff --git a/configure.ac b/configure.ac
index 615048e..40cfc0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1511,6 +1511,44 @@ CheckWarnAll()
fi
}
+dnl See if libdecor is available
+CheckLibDecor()
+{
+ AC_ARG_ENABLE(libdecor,
+[AS_HELP_STRING([--enable-libdecor], [use libdecor for Wayland client-side decorations [default=yes]])],
+ , enable_libdecor=yes)
+ if test x$enable_libdecor = xyes; then
+ AC_MSG_CHECKING(for libdecor support)
+ AS_IF([$PKG_CONFIG --exists libdecor-0],
+ [video_libdecor=yes],
+ [video_libdecor=no])
+ AC_MSG_RESULT($video_libdecor)
+ if test x$video_libdecor = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags libdecor-0`"
+ AC_DEFINE(HAVE_LIBDECOR_H, 1, [ ])
+
+ AC_ARG_ENABLE(libdecor-shared,
+[AS_HELP_STRING([--enable-libdecor-shared], [dynamically load libdecor [default=yes]])],
+ , enable_libdecor_shared=yes)
+
+ decor_lib=[`find_lib "libdecor-0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ if test x$have_loadso != xyes && \
+ test x$enable_libdecor_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libdecor loading])
+ fi
+
+ if test x$have_loadso = xyes && \
+ test x$enable_libdecor_shared = xyes && test x$decor_lib != x; then
+ echo "-- dynamic libdecor -> $decor_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR, "$decor_lib", [ ])
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs libdecor-0`"
+ fi
+ fi
+ fi
+}
+
dnl Check for Wayland
CheckWayland()
{
@@ -1595,6 +1633,8 @@ CheckWayland()
SUMMARY_video="${SUMMARY_video} wayland"
fi
have_video=yes
+
+ CheckLibDecor
fi
fi
}
@@ -2777,43 +2817,6 @@ CheckFcitx()
fi
}
-dnl See if libdecor is available
-CheckLibDecor()
-{
- AC_ARG_ENABLE(libdecor,
-[AS_HELP_STRING([--enable-libdecor], [use libdecor for Wayland client-side decorations [default=yes]])],
- , enable_libdecor=yes)
- if test x$enable_libdecor = xyes; then
- AC_MSG_CHECKING(for libdecor support)
- AS_IF([$PKG_CONFIG --exists libdecor-0],
- [video_libdecor=yes],
- [video_libdecor=no])
- AC_MSG_RESULT($video_libdecor)
- if test x$video_libdecor = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags libdecor-0`"
- AC_DEFINE(HAVE_LIBDECOR_H, 1, [ ])
-
- AC_ARG_ENABLE(libdecor-shared,
-[AS_HELP_STRING([--enable-libdecor-shared], [dynamically load libdecor [default=yes]])],
- , enable_libdecor_shared=yes)
-
- decor_lib=[`find_lib "libdecor-0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- if test x$have_loadso != xyes && \
- test x$enable_libdecor_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libdecor loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_libdecor_shared = xyes && test x$decor_lib != x; then
- echo "-- dynamic libdecor -> $decor_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR, "$decor_lib", [ ])
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs libdecor-0`"
- fi
- fi
- fi
-}
-
dnl Check to see if GameController framework support is desired
CheckJoystickMFI()
{
@@ -3609,7 +3612,6 @@ case "$host" in
CheckInotify
CheckIBus
CheckFcitx
- CheckLibDecor
case $ARCH in
linux)
CheckInputKD