SDL: GNU sort isn't available on older macOS and some BSD systems

From 8c587636dc0ae5d708c7b3ef86ca2bdabe3be311 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 6 Oct 2022 08:25:54 -0700
Subject: [PATCH] GNU sort isn't available on older macOS and some BSD systems

Don't prevent building entirely, just warn that we won't be able to find dynamic libraries in this case.

Fixes https://github.com/libsdl-org/SDL/pull/6338
---
 configure    | 3 ++-
 configure.ac | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index de1b13f72eea..a7a6f3ea45fc 100755
--- a/configure
+++ b/configure
@@ -17955,7 +17955,8 @@ test -n "$SORT" || SORT="false"
 
 if ! "$SORT" -V </dev/null >/dev/null
 then :
-  as_fn_error $? "GNU sort(1) is required" "$LINENO" 5
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU sort(1) is required to find dynamic libraries" >&5
+printf "%s\n" "$as_me: WARNING: GNU sort(1) is required to find dynamic libraries" >&2;}
 fi
 
 # Check whether --enable-largefile was given.
diff --git a/configure.ac b/configure.ac
index b9b10f4990e6..ec9113534a9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,7 @@ if [ test -z "$AWK" ]; then
 fi
 
 AC_CHECK_PROGS([SORT], [gsort sort], [false])
-AS_IF([! "$SORT" -V </dev/null >/dev/null], [AC_MSG_ERROR([GNU sort(1) is required])])
+AS_IF([! "$SORT" -V </dev/null >/dev/null], [AC_MSG_WARN([GNU sort(1) is required to find dynamic libraries])])
 
 dnl 64-bit file offsets if possible unless --disable-largefile is specified
 AC_SYS_LARGEFILE