[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] using pkg-config
From: |
Miles Bader |
Subject: |
Re: [ft-devel] using pkg-config |
Date: |
Sun, 15 Sep 2013 21:26:39 +0900 |
Werner LEMBERG <address@hidden> writes:
> Does it make sense to completely switch to pkg-config? All of the
> above libraries provide .pc files. However, I wonder whether there
> are situations where there usage of pkg-config is problematic.
>
> A certain burden is that pkg-config itself must be installed (or
> pkgconf, which does the same in a probably better way). Is this a
> hassle on some platforms?
My impression is that although on "mainstream" linux distros it's a
pretty good bet pkg-config is available, it's far from universal if
you care about the fringes -- and freetype looks very much like the
sort of library that tends to care more about the fringes than usual.
It also used to the case that pkg-config didn't handle
cross-compilation properly (I haven't checked this in a while), which
seems like it would be an issue for freetype.
It's not very hard to try both in turn, e.g.:
have_libfoo=no
PKG_CHECK_MODULES([luafoo], [luafoo], [have_luafoo=yes], [:])
if test $have_libfoo = no; then
AC_CHECK_LIB([foo], [somefun], [have_luafoo=yes])
fi
if test $have_libfoo = yes; then
...do stuff for libfoo...
fi
Should fallback gracefully to traditional checking if pkg-config isn't
installed..
[When libraries are installed in funny places it can be a little more
annoying without pkg-config, but AFAIK, libpng usually isn't one of
those libraries...]
-miles
--
Innards, n. pl. The stomach, heart, soul, and other bowels.
Re: [ft-devel] using pkg-config, Behdad Esfahbod, 2013/09/16