summaryrefslogtreecommitdiffstats
path: root/kinit/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
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /kinit/configure.in.in
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.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/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kinit/configure.in.in')
-rw-r--r--kinit/configure.in.in59
1 files changed, 59 insertions, 0 deletions
diff --git a/kinit/configure.in.in b/kinit/configure.in.in
new file mode 100644
index 000000000..2ba692872
--- /dev/null
+++ b/kinit/configure.in.in
@@ -0,0 +1,59 @@
+KDEINIT_USE_XFT=1
+dnl check if Qt is linked against Xft
+KDE_CHECK_LIB(qt-mt,XftInit,[],[KDEINIT_USE_XFT=])
+
+dnl Xft requires freetype to compile
+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
+ FONTCONFIG_CFLAGS="`$PKGCONFIG fontconfig --cflags`"
+ KDEINIT_FONTCONFIG=1
+ 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
+ FONTCONFIG_CFLAGS="`$FONTCONFIG_CONFIG --cflags`"
+ KDEINIT_FONTCONFIG=1
+ fi
+fi
+
+KDE_FIND_PATH(freetype-config, KDEINIT_FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])
+if test -n "$KDEINIT_FREETYPE_CONFIG"; then
+ KDEINIT_XFT_INCLUDES="`$KDEINIT_FREETYPE_CONFIG --cflags` $FONTCONFIG_CFLAGS"
+ kdeinit_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $KDEINIT_XFT_INCLUDES $FONTCONFIG_CFLAGS"
+ KDE_CHECK_HEADER(X11/Xft/Xft.h,[],[KDEINIT_USE_XFT=])
+ CPPFLAGS=$kdeinit_cppflags
+else
+ KDEINIT_USE_XFT=
+fi
+
+if test -n "$KDEINIT_USE_XFT"; then
+ AC_DEFINE(KDEINIT_USE_XFT,1,[Use Xft preinitialization in kdeinit])
+fi
+if test -n "$KDEINIT_FONTCONFIG"; then
+ AC_DEFINE(KDEINIT_USE_FONTCONFIG,1,[Use FontConfig in kdeinit])
+fi
+AC_SUBST(KDEINIT_XFT_INCLUDES)
+
+AC_MSG_CHECKING(whether to make kdeinit setuid root in order to protect it from bad Linux OOM-killer)
+kdeinit_setuid=
+case $target_os in
+ linux*)
+ AC_MSG_RESULT(yes)
+ KDEINIT_SETUID=1
+ AC_DEFINE(KDEINIT_OOM_PROTECT,1,[Enable prevention against poor Linux OOM-killer])
+ ;;
+ *) AC_MSG_RESULT(no)
+ KDEINIT_SETUID=0
+ ;;
+esac
+AC_SUBST(KDEINIT_SETUID)