aboutsummaryrefslogtreecommitdiff
path: root/xft.m4
diff options
context:
space:
mode:
authormathias <mathias>2004-12-21 23:42:09 (GMT)
committermathias <mathias>2004-12-21 23:42:09 (GMT)
commitbc7c988561f79edb03b2ece80bb4ba0c8c73fc2e (patch)
treea48f394504f8b44cdab668ef69daf054c178500c /xft.m4
parent7e41a1494a65ecdb05c7a34c274693cbd950647f (diff)
downloadfluxbox_pavel-bc7c988561f79edb03b2ece80bb4ba0c8c73fc2e.zip
fluxbox_pavel-bc7c988561f79edb03b2ece80bb4ba0c8c73fc2e.tar.bz2
adds imlib2-support to fluxbox: allows us to load several imageformats
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
Diffstat (limited to 'xft.m4')
-rw-r--r--xft.m497
1 files changed, 0 insertions, 97 deletions
diff --git a/xft.m4 b/xft.m4
deleted file mode 100644
index 7264e97..0000000
--- a/xft.m4
+++ /dev/null
@@ -1,97 +0,0 @@
1# xft.m4
2# Copyright (c) 2002 Henrik Kinnunen (fluxgen at linuxmail.org)
3
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20# DEALINGS IN THE SOFTWARE.
21
22# AM_PATH_XFT1([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
23AC_DEFUN([AM_PATH_XFT1],
24[
25 AC_CHECK_LIB(Xft, XftFontOpen,
26 XFT_LIBS="-lXft"
27 [$1],
28 [$2]
29 )
30])
31
32# AM_PATH_XFT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
33AC_DEFUN([AM_PATH_XFT2],
34[
35 if test x$pkg_exec_prefix != x ; then
36 xft_args="$xft_args --exec-prefix=$pkg_exec_prefix"
37 if test x${PKG_CONFIG+set} != xset ; then
38 PKG_CONFIG=$pkg_exec_prefix/bin/pkg-config
39 fi
40fi
41
42if test x$xft_prefix != x ; then
43 xft_args="$xft_args --prefix=$xft_prefix"
44 if test x${PKG_CONFIG+set} != xset ; then
45 PKG_CONFIG=$xft_prefix/bin/pkg-config
46 fi
47fi
48
49AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
50if test "x$PKG_CONFIG" = "xno" ; then
51 ifelse([$2], , :, [$2])
52else
53 XFT_CFLAGS=`$PKG_CONFIG $xftconf_args --cflags xft`
54 XFT_LIBS=`$PKG_CONFIG $xftconf_args --libs xft`
55 ifelse([$1], , :, [$1])
56fi
57
58])
59
60# AM_PATH_XFT(default-value, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
61# Test for Xft, and define XFT_CFLAGS and XFT_LIBS
62AC_DEFUN([AM_PATH_XFT],
63[
64 AC_ARG_WITH(xft-prefix,[ --with-xft-prefix=path Prefix where Xft is installed (optional)],
65 xft_prefix="$withval", xft_prefix="")
66 AC_ARG_WITH(pkg-exec-prefix,[ --with-pkg-exec-prefix=path Exec prefix where pkg-config is installed (optional)],
67 pkg_exec_prefix="$withval", pkg_exec_prefix="")
68 AC_ARG_ENABLE(xft, [ --enable-xft Xft (antialias) support (default=$1)],
69 if test "x$enableval" = "xyes"; then
70 TRY_XFT=yes
71 else
72 TRY_XFT=no
73 fi
74 ,
75 TRY_XFT=$1
76 )
77
78if test "x$TRY_XFT" = "xyes"; then
79 AC_MSG_RESULT(yes)
80 AM_PATH_XFT2(
81 [$2],
82 # xft2 failed: try xft1
83 AM_PATH_XFT1(
84 [$2],
85 [$3]
86 AC_MSG_RESULT([Cant find Xft libraries! Disabling Xft]))
87 )
88else
89 AC_MSG_RESULT(no)
90 [$3]
91fi
92
93CFLAGS="$CFLAGS $XFT_CFLAGS"
94CXXFLAGS="$CXXFLAGS $XFT_CFLAGS"
95LIBS="$LIBS $XFT_LIBS"
96
97])