You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.2 KiB
60 lines
2.2 KiB
13 years ago
|
TDEINIT_USE_XFT=1
|
||
15 years ago
|
dnl check if Qt is linked against Xft
|
||
13 years ago
|
KDE_CHECK_LIB(qt-mt,XftInit,[],[TDEINIT_USE_XFT=])
|
||
15 years ago
|
|
||
|
dnl Xft requires freetype to compile
|
||
14 years ago
|
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/ ])
|
||
15 years ago
|
])
|
||
|
])
|
||
|
|
||
|
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`"
|
||
13 years ago
|
TDEINIT_FONTCONFIG=1
|
||
15 years ago
|
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`"
|
||
13 years ago
|
TDEINIT_FONTCONFIG=1
|
||
15 years ago
|
fi
|
||
|
fi
|
||
|
|
||
13 years ago
|
KDE_FIND_PATH(freetype-config, TDEINIT_FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])
|
||
|
if test -n "$TDEINIT_FREETYPE_CONFIG"; then
|
||
|
TDEINIT_XFT_INCLUDES="`$TDEINIT_FREETYPE_CONFIG --cflags` $FONTCONFIG_CFLAGS"
|
||
13 years ago
|
tdeinit_cppflags=$CPPFLAGS
|
||
13 years ago
|
CPPFLAGS="$CPPFLAGS $TDEINIT_XFT_INCLUDES $FONTCONFIG_CFLAGS"
|
||
|
KDE_CHECK_HEADER(X11/Xft/Xft.h,[],[TDEINIT_USE_XFT=])
|
||
13 years ago
|
CPPFLAGS=$tdeinit_cppflags
|
||
15 years ago
|
else
|
||
13 years ago
|
TDEINIT_USE_XFT=
|
||
15 years ago
|
fi
|
||
|
|
||
13 years ago
|
if test -n "$TDEINIT_USE_XFT"; then
|
||
|
AC_DEFINE(TDEINIT_USE_XFT,1,[Use Xft preinitialization in tdeinit])
|
||
15 years ago
|
fi
|
||
13 years ago
|
if test -n "$TDEINIT_FONTCONFIG"; then
|
||
|
AC_DEFINE(TDEINIT_USE_FONTCONFIG,1,[Use FontConfig in tdeinit])
|
||
15 years ago
|
fi
|
||
13 years ago
|
AC_SUBST(TDEINIT_XFT_INCLUDES)
|
||
15 years ago
|
|
||
13 years ago
|
AC_MSG_CHECKING(whether to make tdeinit setuid root in order to protect it from bad Linux OOM-killer)
|
||
|
tdeinit_setuid=
|
||
15 years ago
|
case $target_os in
|
||
|
linux*)
|
||
|
AC_MSG_RESULT(yes)
|
||
13 years ago
|
TDEINIT_SETUID=1
|
||
|
AC_DEFINE(TDEINIT_OOM_PROTECT,1,[Enable prevention against poor Linux OOM-killer])
|
||
15 years ago
|
;;
|
||
|
*) AC_MSG_RESULT(no)
|
||
13 years ago
|
TDEINIT_SETUID=0
|
||
15 years ago
|
;;
|
||
|
esac
|
||
13 years ago
|
AC_SUBST(TDEINIT_SETUID)
|