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 805 - replacement for sdl-config
Summary: replacement for sdl-config
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-22 08:03 UTC by MatÄ›j TýÄ
Modified: 2009-10-11 10:14 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 MatÄ›j TÃ½Ä 2009-09-22 08:03:21 UTC
Hello, 
currently SDL offers the sdl-config script as a help to use SDL in one's project.
You also have a pkg-config file, (although it should be named probably libsdl.pc, not sdl.pc)
However, pkg-config does not work well with cross-compilation...

If you use libtool well, in the end, you get a .la file that contains all the info libtool needs to link the library. This is the best option for autotools users.

I have tried to find some information how to use SDL in my programs (what CPPFALGS, what to link to, ...) on your website, but after some time I have found nothing. So I suggest that you try to promote the other ways since I can imagine that lot of individuals and projects still use the old sdl-config way. I can write something to the wiki, but it is good to come to an agreement what way do you consider to be the most perspective and best suited for SDL users.
Comment 1 Sam Lantinga 2009-10-10 12:34:09 UTC
I'm trying to support both systems equally, since they're both used about equally.

Is there a specific bug that you'd like to fix?  If you're generally interested in improving the .pc files, you might want to talk to SDL package maintainers on verious distributions and see if there are changes they've made that would be generally useful for everyone...
Comment 2 MatÄ›j TÃ½Ä 2009-10-11 07:04:40 UTC
What I was trying to say was that your .pc file is sdl.pc, whereas most others would probably use libSDL.pc (notice the case)
You can see that there are lots of lib*.pc files in the /usr/lib/pkgconfig directory.
But that is not really substantial when I think about it.

What I consider as far more important is lack of instructions on how to check for your library by people using it. This is more of a documentation and web issue, though. 
But you probably won't like the state when some of developers use sdl-config script, others pkg-config and others just rely on the library name. You probably want free hands regarding library names and you don't want to maintain sdl-config and AM_PATH_SDL.
I would advise you to promote pkg-config, it is easy to maintain and pretty much a standard now. I think that the "how to check for SDL" subject is actually a FAQ that rarely anybody bothers to ask explicitly since one typically needs just a solution that works now and one doesn't care if it is robust or not.
Comment 3 Sam Lantinga 2009-10-11 08:35:36 UTC
Ah yes, I'll add that to the new FAQ we're building.

I think I'll stick with recommending sdl.m4 and AM_PATH_SDL because SDL is used on a lot of platforms that don't have pkg-config by default.  But I'll also mention that you can use pkg-config alone (and more easily) if you're only planning to release your software for recent Linux systems.
Comment 4 Sam Lantinga 2009-10-11 08:36:55 UTC
Oh, regarding the name of the file, we'll revisit that when we handle the larger issue of installing SDL 1.3 and coexisting with SDL 1.2 in a distribution.
Comment 5 MatÄ›j TÃ½Ä 2009-10-11 10:14:03 UTC
OK then, if you are decided to stick with sdl-config, sdl.m4 macro and maintain them, then please try to make sure that it will play nicely with cross-compilation. 
Currently, if you try to cross-compile with it, it says "cross compiling; assumed OK..." although it is not OK :-) I think that Fedora guys could help you with that, they have put a lot of effort to create a cross-compiling environment, so maybe they have some patches or experience you can use.
For autotools users, using a working macro is a much better option than pkg-config.
Someone has asked a question on a autoconf's mailing list, you may be interested:
http://www.nabble.com/Checking-for-a-library-...-different-ways-...-td20128711.html