Using pkg-config Was: [SVN] r4939

Hello !

Fixed bug #522

Mike Frysinger 2007-12-10 16:47:36 PST

it’s much easier to manage .pc files for cross-compiling setups than
it is for
random *-config scripts … the cross-compiled pkg-config files can all be
easily/tightly controlled and separate from the host pkg-config files. the
*-config files however are to be found in $PATH and can easily pick the wrong
one.

In what way is pkg-config more flexible then sdl-config ?

Is it possible to tell pkg-config somehow to use sdl-trunk.pc
as the actual sdl.pc ?

I can set a symlink from sdl-trunk.pc
to sdl.pc, but this not really a good idea.

CU

2009/10/4 Torsten Giebl :

In what way is pkg-config more flexible then sdl-config ?

Is it possible to tell pkg-config somehow to use sdl-trunk.pc
as the actual sdl.pc ?

I can set a symlink from sdl-trunk.pc
to sdl.pc, but this not really a good idea.

If you want to be able to compile from several separate SDL libraries,
you need to make separate packages.
For SDL-1.2 vs. SDL-1.3 for example, I typically make an sdl package
and an sdl-1.3 package.
Then to use SDL-1.3 you use pkg-config sdl-1.3 --cflags --libs.

If you don’t want to do this by hand, look here:
http://forums.libsdl.org/viewtopic.php?t=4800

and here:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090828/609fcd4c/attachment.bin

You can use that script to create your SDL 1.3 package or modify it to
produce a 1.2 package.

Hello !

If you want to be able to compile from several separate SDL libraries,
you need to make separate packages.
For SDL-1.2 vs. SDL-1.3 for example, I typically make an sdl package
and an sdl-1.3 package.
Then to use SDL-1.3 you use pkg-config sdl-1.3 --cflags --libs.

Thanks. I was sitting on the line, you
just create different .pc files with different names :slight_smile:

CU

2009/10/4 Torsten Giebl :

Thanks. I was sitting on the line, you
just create different .pc files with different names :slight_smile:

A bit more than that… you also need the right set of headers,
libraries, m4 scripts, etc.