aboutsummaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-01-25 11:23:24 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-01-25 11:23:24 (GMT)
commit83f8f595695c0669b632b8b5d45306a6f63b3fa5 (patch)
tree16262c75ab9a442b5845b0c37871f833ec9d2b63 /acinclude.m4
parentdd6014102ada69a792c3ac2fcb13baf17f6b9dc1 (diff)
downloadfluxbox_paul-83f8f595695c0669b632b8b5d45306a6f63b3fa5.zip
fluxbox_paul-83f8f595695c0669b632b8b5d45306a6f63b3fa5.tar.bz2
build fix: revert e38994ae727a3bc7fa77f45d5bdbb97dffcbd1e5
'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
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m422
1 files changed, 11 insertions, 11 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index aad7dc8..ca5a789 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -170,24 +170,24 @@ AC_DEFUN([AM_PATH_XFT2],
170[ 170[
171 if test x$pkg_exec_prefix != x ; then 171 if test x$pkg_exec_prefix != x ; then
172 xft_args="$xft_args --exec-prefix=$pkg_exec_prefix" 172 xft_args="$xft_args --exec-prefix=$pkg_exec_prefix"
173 if test x${XFT_CONFIG+set} != xset ; then 173 if test x${PKG_CONFIG+set} != xset ; then
174 XFT_CONFIG=$pkg_exec_prefix/bin/xft-config 174 PKG_CONFIG=$pkg_exec_prefix/bin/pkg-config
175 fi 175 fi
176 fi 176 fi
177 177
178 if test x$xft_prefix != x ; then 178 if test x$xft_prefix != x ; then
179 xft_args="$xft_args --prefix=$xft_prefix" 179 xft_args="$xft_args --prefix=$xft_prefix"
180 if test x${XFT_CONFIG+set} != xset ; then 180 if test x${PKG_CONFIG+set} != xset ; then
181 XFT_CONFIG=$xft_prefix/bin/xft-config 181 PKG_CONFIG=$xft_prefix/bin/pkg-config
182 fi 182 fi
183 fi 183 fi
184 184
185 AC_PATH_PROG(XFT_CONFIG, xft-config, no) 185 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
186 if test "x$XFT_CONFIG" = "xno" ; then 186 if test "x$PKG_CONFIG" = "xno" ; then
187 ifelse([$2], , :, [$2]) 187 ifelse([$2], , :, [$2])
188 else 188 else
189 XFT_CFLAGS=`$XFT_CONFIG $xftconf_args --cflags` 189 XFT_CFLAGS=`$PKG_CONFIG $xftconf_args --cflags xft fontconfig`
190 XFT_LIBS=`$XFT_CONFIG $xftconf_args --libs` 190 XFT_LIBS=`$PKG_CONFIG $xftconf_args --libs xft fontconfig`
191 ifelse([$1], , :, [$1]) 191 ifelse([$1], , :, [$1])
192 fi 192 fi
193]) 193])