We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4075

Summary: configury adds Metal.framework to linkage even if it is not available
Product: SDL Reporter: Ozkan Sezer <sezeroz>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Mac OS X (All)   

Description Ozkan Sezer 2018-02-10 21:47:05 UTC
Configury adds Metal.framework to linkage even if it is not available.
My solution is setting enable_render_metal to no when Metal.framework
is not found, i.e. like the following:

diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -2086,7 +2086,7 @@
         ],[
         ],[
         have_metal=yes
-        ])
+        ],[enable_render_metal=no])
         CFLAGS="$save_CFLAGS"
         AC_MSG_RESULT($have_metal)
         if test x$have_metal = xyes; then
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -21303,6 +21303,8 @@
 
         have_metal=yes
 
+else
+  enable_render_metal=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
         CFLAGS="$save_CFLAGS"
Comment 1 Sam Lantinga 2018-02-12 01:26:46 UTC
I did basically the same thing slightly more clear to the novice autoconf user.
https://hg.libsdl.org/SDL/rev/2eff89e82b60

Thanks!