'xft-config' is deprecated (http://lists.freedesktop.org/archives/xorg-devel/2010-March/006750.html)
and does not exist anymore on 'bleeding edge' versions (gentoo). 'pkg-config'
is the new way of doing things. 'pkg-config --libs xft' does only report
the libs needed and the linker finds out other dependencies on its own. currently,
'pkg-config' (version 0.25) reports only '-lXft'.
if the user wants for example LDFLAGS="-fuse-ld=gold --no-add-needed" then
all the needed libs must be produced, otherwise linkage fails. at the moment
it seems that fluxbox calls 'XftMatrixRotate()' and 'XftPatternAddMatrix()'
which both seems to trigger the need for 'fontconfig':
undefined reference to 'FcMatrixRotate'
undefined reference to 'FcPatternAddMatrix'
is 'pkg-config --libs xft' reporting to few libs? in comparison to
'xft-config --libs' for sure. bug? feature? i am not sure. there are
several ways to address this issue:
* append the needed libs manually via LIBS or LDFLAGS
env LIBS="-lfontconfig" ./configure
* change build-system of fluxbox to do something like
pkg-config --print-requires-private 'xft' 2> /dev/null || echo xft)`
(pkg-config version < 0.2x does not have --print-requires-private, which
then leads to not print out all libs needed, which would then require
a fallback to xft-config since an older system anyways, evidence is
old pkg-config)
* changing build-system of fluxbox to use something like:
pkg-config --static --libs xft
(which reports really all libs, even more than actually needed, check out
http://osdir.com/ml/debian-bugs-closed/2011-01/msg01112.html)
* fix 'pkg-config' (or the related xft.pc) to report '-lXft -lfontconfig'
(not our code, but preferable)
* use 'pkg-config --libs xft fontconfig' since we know that calling the
xft functions requires linking against 'fontconfig' as well:
pkg-config --libs xft fontconfig
which is what we use to get rid of the build-errors
when linking with binutils-gold and --no-add-needed it is not enough to
just use -lXft but it must be -lXft -fontconfig (and some more). since we
use 'pkg-config --libs' to find out about the needed flags and 'pkg-config'
only returns -lXft (except by using
pkg-config --libs `pkg-config --print-requires-private xft`
) we switched to 'xft-config --libs' which gives us the complete list of
all needed libs.
the issue was brought to attention by
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554386
but the proposed fix was just quick and dirty.
besides xpm. to get imlib2 support in fluxbox one has to
./configure --enable-imblib2
default is disabled. a fluxbox-binary that supports imlib2 will have
IMLIB2 in "fluxbox -info"-output
explanation to the changed files:
* xft.m4 -> acinclude.m4 + added ac_path_generic.m4
(from http://ac-archive.sourceforge.net/Miscellaneous/ac_path_generic.html)
* configure.in, Makefile.am, src/FbTk/Makefile.am changed to handle
imlib2-support
* Font.cc/hh Image.cc/hh App.cc fluxbox.cc consistent way of init for global
stuff for fonts and imagehandlers.
* rest of changes just add the imlib2-code, pretty straightforward