summaryrefslogtreecommitdiffstats
path: root/kcontrol/fonts/configure.in.in
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kcontrol/fonts/configure.in.in
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/fonts/configure.in.in')
-rw-r--r--kcontrol/fonts/configure.in.in57
1 files changed, 57 insertions, 0 deletions
diff --git a/kcontrol/fonts/configure.in.in b/kcontrol/fonts/configure.in.in
new file mode 100644
index 000000000..0ecc46d91
--- /dev/null
+++ b/kcontrol/fonts/configure.in.in
@@ -0,0 +1,57 @@
+KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
+ 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 neither pkg-config nor fontconfig-config, check http://www.fontconfig.org/ ])
+ ])
+])
+
+if test -n "$PKGCONFIG"; then
+ 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 1000000
+ 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])
+ fi
+fi
+
+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 1000000
+ 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
+
+AC_SUBST(LIBFONTCONFIG_LIBS)
+AC_SUBST(LIBFONTCONFIG_CFLAGS)
+AC_SUBST(LIBFONTCONFIG_RPATH)
+
+if pkg-config --exists freetype2 2>/dev/null; then
+ FREETYPE2_CFLAGS=`pkg-config --cflags freetype2`
+ FREETYPE2_LDFLAGS=`pkg-config --libs freetype2`
+ AC_DEFINE(HAVE_FREETYPE2, 1, [Define if you have FreeType2 library])
+fi
+AC_SUBST(FREETYPE2_CFLAGS)
+AC_SUBST(FREETYPE2_LDFLAGS)