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 282 - 'sdl-config --libs' incomplete (OpenGL missing)
Summary: 'sdl-config --libs' incomplete (OpenGL missing)
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 1.2
Hardware: PowerPC Mac OS X (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL: http://thread.gmane.org/gmane.os.appl...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-17 18:01 UTC by Max Horn
Modified: 2007-02-13 06:57 UTC (History)
0 users

See Also:


Attachments
Fix for the issue against SVN (535 bytes, patch)
2006-07-17 18:03 UTC, Max Horn
Details | Diff
Patch against 1.2.10 (859 bytes, patch)
2006-07-17 18:13 UTC, Max Horn
Details | Diff
Patch against latest SVN (647 bytes, patch)
2006-07-23 13:50 UTC, Max Horn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Horn 2006-07-17 18:01:30 UTC
In previous versions of SDL, we included "--framework OpenGL"  in the output of 'sdl-config --libs'. With the recent cleanup of configure.in, this was lost, resulting in build failures of various SDL projects that use OpenGL. For example, SDL TTF doesn't build correclty anymore.

The solution: If OpenGL is enabled, the we need to add -Wl,framework,OpenGL to the SDL_LIBS list.
Comment 1 Max Horn 2006-07-17 18:03:17 UTC
Created attachment 147 [details]
Fix for the issue against SVN

The attached patch fixes the issue in SVN.
Comment 2 Max Horn 2006-07-17 18:13:56 UTC
Created attachment 148 [details]
Patch against 1.2.10

This second patch works for 1.2.10 (and 1.2.11, too), might be interesting for people packaging SDL (I am using it for the Fink package).
Comment 3 Max Horn 2006-07-23 13:50:04 UTC
Created attachment 152 [details]
Patch against latest SVN
Comment 4 Sam Lantinga 2006-09-23 21:29:20 UTC
Really we should include an --opengl option to sdl-config, which includes the correct header path and libraries for linking with OpenGL applications.

On the other hand, we shouldn't need the OpenGL framework at all if it is dynamically loaded, right?
Comment 5 Ryan C. Gordon 2007-02-13 02:40:07 UTC
> On the other hand, we shouldn't need the OpenGL framework at all if it is
> dynamically loaded, right?

You shouldn't need it at all...apps don't need to link against OpenGL.framework directly unless they use it directly...that SDL uses it doesn't matter, whether it loads it at runtime or not. We don't specify CoreAudio or IOKit in "sdl-config --libs" either and SDL apps still build.

If an application is using OpenGL directly without SDL_GL_LoadLibrary(), then it should link against it directly, and I don't think SDL should shield them from that.

I'm inclined to close this as WONTFIX, but I'll wait a while for a rebuttal.  :)

--ryan.


Comment 6 Max Horn 2007-02-13 06:57:15 UTC
I agree with your analysis, and retract this "report". The real problem was that SDL TTF was incorrectly using OpenGL, but I believe that this has been fixed since then (at least I can't reproduce it anymore with 2.0.8, which also seems to have configure code to add -framework OpenGL on its own).

Not sure if I can close items, I'll try... :-)