From 9a0ebef8d7d78bd32737ba45afc28d260fd1616b Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 7 Dec 2021 09:45:50 +0100 Subject: [PATCH] Remove bashism in configure.ac Patch courtesy of Jakub Bogusz. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index dfc9d8a..27b8d5b 100644 --- a/configure.ac +++ b/configure.ac @@ -269,7 +269,6 @@ if test "${enable_cocoa}" != "no"; then [ac_cv_my_have_cocoa="yes"]) CFLAGS="$save_CFLAGS" if test "${ac_cv_my_have_cocoa}" = "yes"; then - [[[ "$target_os" =~ [0-9]+ ]]] && darwin_ver="${BASH_REMATCH[[0]]}" case x${target} in xpowerpc*darwin*) # 10.3 needed to link with X11 @@ -297,6 +296,7 @@ if test "${enable_cocoa}" != "no"; then esac CC="${CC:-gcc-${GCC_VERSION}}" CXX="${CXX:-g++-${GCC_VERSION}}" + darwin_ver="$(echo "${target_os}" | sed -ne 's/[^0-9]*\([0-9]\+\).*/\1/p')" if [[ "$darwin_ver" -lt "13" ]]; then MACOSX_SDK_FRAMEWORKS="${MACOSX_SDK_FRAMEWORKS:--F${MACOSX_SDK}/System/Library/Frameworks}" CPPFLAGS="${CPPFLAGS} ${ARCH} ${MACOSX_SDK_FRAMEWORKS}"