[ft-devel] using pkg-config

2013-09-15 Thread Werner LEMBERG

Folks,


FreeType's configure script currently uses the `AC_CHECK_LIB' m4 macro
to detect the presence of libz and libbz2.  For libpng, it uses the
`libpng-config' script.  I will soon need the HarfBuzz library which
doesn't provide a `harfbuzz-config' script.

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?

If possible, I would like to avoid a hybrid approach (this is, first
checking for `foo.pc', then trying `foo-config', then using
`AC_CHECK_LIB[foo]').

Any advice is highly welcomed.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] using pkg-config

2013-09-15 Thread suzuki toshiya
Excuse me, just a small off-topic question,

 `libpng-config' script.  I will soon need the HarfBuzz library which
 doesn't provide a `harfbuzz-config' script.

Future release of FreeType2 will depend on HarfBuzz?

Regards,
mpsuzuki

On 09/15/2013 06:06 PM, Werner LEMBERG wrote:
 
 Folks,
 
 
 FreeType's configure script currently uses the `AC_CHECK_LIB' m4 macro
 to detect the presence of libz and libbz2.  For libpng, it uses the
 `libpng-config' script.  I will soon need the HarfBuzz library which
 doesn't provide a `harfbuzz-config' script.
 
 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?
 
 If possible, I would like to avoid a hybrid approach (this is, first
 checking for `foo.pc', then trying `foo-config', then using
 `AC_CHECK_LIB[foo]').
 
 Any advice is highly welcomed.
 
 
  Werner
 
 ___
 Freetype-devel mailing list
 Freetype-devel@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype-devel
 


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] using pkg-config

2013-09-15 Thread Miles Bader
Werner LEMBERG w...@gnu.org 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.

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] using pkg-config

2013-09-15 Thread Werner LEMBERG

 `libpng-config' script.  I will soon need the HarfBuzz library
 which doesn't provide a `harfbuzz-config' script.
 
 Future release of FreeType2 will depend on HarfBuzz?

Optionally only, as with the other libraries.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel