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 - configury adds Metal.framework to linkage even if it is not available
Summary: configury adds Metal.framework to linkage even if it is not available
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.0
Hardware: All Mac OS X (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-10 21:47 UTC by Ozkan Sezer
Modified: 2018-02-12 01:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!