From: Tasos L. <tla...@gm...> - 2011-02-09 07:07:16
|
On 02/09/2011 02:20 AM, Volker Grabsch wrote: > David Bruce schrieb: >> I think the problem is in t4k_common's pkg-config file, >> t4k_common.pc.in (reproduced below). My knowledge of pkg-config is >> limited, but looking at the file it's pretty clear that I hard-coded a >> dependency on SDL_ttf into the "Libs" section. t4k_common's build >> process can detect if SDL_Pango is available, but the problem comes in >> with the static linking needed for the mingw-cross-env build. For >> static linking, t4k_common needs to supply all the compiler arguments >> for all the dependencies, and this only works "automagically" for >> dependencies that themselves have pkg-config *.pc files. > > Note that a *.pc file can "Require" another package. The idea is > that you don't have to specify anything but your own stuff in the > "Libs" section. > > However, this works only for dependencies that provide a *.pc file. > All other libs you'll have to specify in your "Libs.private" section. > (which will only be used for static builds, in contrast to "Libs") > >> I haven't >> figured out how to write a *.pc file that conditionally passes the >> arguments for either SDL_Pango (plus its deps) or SDL_ttf (plus deps) >> to the tuxmath linking step. > > This is not a question of pkg-config. It is a question of Autoconf. > If you collect some helper variables during the checks in configure.ac, > you can simply include those variables in your *.pc.in file. (something > like @DEP_PKGS@, @DEP_LIBS@) > > In general, I recommend to check for each library whether it is > available via pkg-config. If it isn't, try something like AC_CHECK_LIB > as a workaround. > > PKG_CHECK_EXISTS([...], > PKG_CHECK_MODULES([...], > AC_CHECK_LIB(...) > ) > I will also look into it, see how I can help, but I don't promise as pkg-config/Autoconf stuff are new to me.. > One final thought: Nowadays almost all libraries ship with *.pc files. > However, some distributions like Debian don't install those, maybe > because their build scripts were written in a time where those libraries > didn't provide a *.pc file. I think it would be a good idea to provide > bug reports for those distributions, but I didn't yet find the time > to do that. Any volunteers? > From a quick look here [1] only Archlinux and Fedora from the major distributions ship SDL_ttf.pc (i dont know if this list is up-to-date though). I could file those bug reports if the Autoconf solution doesn't work. > > Greets, > Volker > Cheers [1] http://pkgs.org/search/?keyword=sdl_ttf&search_on=smart&distro=0&arch=32-bit&exact=0 -- Tasos Latsas GPG : 0x219810C9 / B487 351A 6EEC B7C3 E78E F4D9 7217 5B4B 2198 10C9 Jabber: tl...@ja... www : http://ttys.homelinux.net |