From e90d065f11c22f17744e08877bc6b47dc81a5f90 Mon Sep 17 00:00:00 2001
From: Michael Lutz <michi@icosahedron.de>
Date: Fri, 10 Apr 2020 14:13:23 +0200
Subject: [PATCH] Fix: [OSX] Prepend OSX SDK path to the framework search path
 if building with a custom SDK sysroot.

---
 config.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.lib b/config.lib
index 6738561e20..45c0d7f810 100644
--- a/config.lib
+++ b/config.lib
@@ -1657,7 +1657,7 @@ make_cflags_and_ldflags() {
 
 	if [ "$with_cocoa" != "0" ]; then
 		CFLAGS="$CFLAGS -DWITH_COCOA"
-		LIBS="$LIBS -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox"
+		LIBS="$LIBS -F$osx_sdk_path/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox"
 
 		if [ "$enable_cocoa_quartz" != "0" ]; then
 			CFLAGS="$CFLAGS -DENABLE_COCOA_QUARTZ"