1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
if test -z "$PKGCONFIG"; then
KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_WARN([Could not find pkg-config ])
])
fi
# Check for freetype
if test -n "$PKGCONFIG"; then
AC_MSG_CHECKING([for freetype >= 5.0])
vers=`$PKGCONFIG freetype2 --modversion 2>/dev/null | $SED -e 's/libfontconfig //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test -n "$vers" && test "$vers" -ge 5000000
then
LIBFREETYPE_LIBS="`$PKGCONFIG freetype2 --libs`"
LIBFREETYPE_RPATH=
for args in $LIBFREETYPE_LIBS; do
case $args in
-L*)
LIBFREETYPE_RPATH="$LIBFREETYPE_RPATH $args"
;;
esac
done
LIBFREETYPE_RPATH=`echo $LIBFREETYPE_RPATH | $SED -e "s/-L/-R/g"`
LIBFREETYPE_CFLAGS="`$PKGCONFIG freetype2 --cflags`"
AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the libfreetype library])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT([no - we have to try freetype-config])
fi
fi
if test -z "$LIBFREETYPE_LIBS"; then
KDE_FIND_PATH(freetype-config, FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
AC_MSG_WARN([Could not find libfreetype anywhere, check http://www.freetype.org/])
])
if test -n "$FREETYPE_CONFIG"; then
vers=`$FREETYPE_CONFIG --version 2>/dev/null | $SED -e 's/libfreetype //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test -n "$vers" && test "$vers" -ge 5000000
then
LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
LIBFREETYPE_RPATH=
for args in $LIBFREETYPE_LIBS; do
case $args in
-L*)
LIBFREETYPE_RPATH="$LIBFREETYPE_RPATH $args"
;;
esac
done
LIBFREETYPE_RPATH=`echo $LIBFREETYPE_RPATH | $SED -e "s/-L/-R/g"`
LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the libfreetype library])
else
AC_MSG_WARN([You need at least libfreetype 5.0])
fi
fi
fi
AC_SUBST(LIBFREETYPE_LIBS)
AC_SUBST(LIBFREETYPE_CFLAGS)
AC_SUBST(LIBFREETYPE_RPATH)
# Check for libart2
KDE_FIND_PATH(libart2-config, LIBART_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
AC_MSG_WARN([Could not find libart anywhere, check http://www.levien.com/libart/])
])
if test -n "$LIBART_CONFIG"; then
vers=`$LIBART_CONFIG --version 2>/dev/null | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test -n "$vers" && test "$vers" -ge 2003008
then
LIBART_LIBS="`$LIBART_CONFIG --libs`"
LIBART_RPATH=
for args in $LIBART_LIBS; do
case $args in
-L*)
LIBART_RPATH="$LIBART_RPATH $args"
;;
esac
done
LIBART_RPATH=`echo $LIBART_RPATH | $SED -e "s/-L/-R/g"`
LIBART_CFLAGS="`$LIBART_CONFIG --cflags`"
AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library])
else
AC_MSG_WARN([You need at least libart 2.3.8])
fi
fi
AC_SUBST(LIBART_LIBS)
AC_SUBST(LIBART_CFLAGS)
AC_SUBST(LIBART_RPATH)
# Check for fontconfig
if test -n "$PKGCONFIG"; then
AC_MSG_CHECKING([for fontconfig >= 1.0])
vers=`$PKGCONFIG fontconfig --modversion 2>/dev/null | $SED -e 's/libfontconfig //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test -n "$vers" && test "$vers" -ge 1000001
then
LIBFONTCONFIG_LIBS="`$PKGCONFIG fontconfig --libs`"
LIBFONTCONFIG_RPATH=
for args in $LIBFONTCONFIG_LIBS; do
case $args in
-L*)
LIBFONTCONFIG_RPATH="$LIBFONTCONFIG_RPATH $args"
;;
esac
done
LIBFONTCONFIG_RPATH=`echo $LIBFONTCONFIG_RPATH | $SED -e "s/-L/-R/g"`
LIBFONTCONFIG_CFLAGS="`$PKGCONFIG fontconfig --cflags`"
AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG, 1, [Defines if your system has the libfontconfig library])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT([no - we have to try fontconfig-config])
fi
fi
if test -z "$LIBFONTCONFIG_LIBS"; then
KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_WARN([Could not find fontconfig-config ])
])
if test -n "$FONTCONFIG_CONFIG"; then
vers=`$FONTCONFIG_CONFIG --version 2>/dev/null | $SED -e 's/libfontconfig //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test -n "$vers" && test "$vers" -ge 1000001
then
LIBFONTCONFIG_LIBS="`$FONTCONFIG_CONFIG --libs`"
LIBFONTCONFIG_RPATH=
for args in $LIBFONTCONFIG_LIBS; do
case $args in
-L*)
LIBFONTCONFIG_RPATH="$LIBFONTCONFIG_RPATH $args"
;;
esac
done
LIBFONTCONFIG_RPATH=`echo $LIBFONTCONFIG_RPATH | $SED -e "s/-L/-R/g"`
LIBFONTCONFIG_CFLAGS="`$FONTCONFIG_CONFIG --cflags`"
AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG, 1, [Defines if your system has the libfontconfig library])
fi
fi
fi
AC_SUBST(LIBFONTCONFIG_LIBS)
AC_SUBST(LIBFONTCONFIG_CFLAGS)
AC_SUBST(LIBFONTCONFIG_RPATH)
if test -z "$LIBART_LIBS"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE karbon"
fi
if test -n "$LIBFREETYPE_LIBS" -a -n "$LIBFONTCONFIG_LIBS"; then
AC_DEFINE_UNQUOTED(HAVE_KARBONTEXT, 1, [Defines if your system has the fontconfig and freetype libraries])
fi
|