1 AC_DEFUN([KDE_CONFIG_OPTIONS],
5 [AS_HELP_STRING([--with-kde4-config=PATH],
6 [kde4-config script to use])],
7 [KDE4_CONFIG=$withval], [KDE4_CONFIG=""])
10 [AS_HELP_STRING([--enable-kde-in-home],
11 [install KDE related stuff in your home dir])],
12 [KDE_IN_HOME=$enableval], [KDE_IN_HOME=no])
15 AC_DEFUN([KDE_CONFIG_CHECK],
17 AS_IF([test -z ${KDE4_CONFIG}],
19 AC_PATH_PROG(KDE4_CONFIG, kde4-config)
22 AC_MSG_CHECKING(for kde4-config)
23 AS_IF([test ! -x KDE4_CONFIG],
25 KDE4_CONFIG="not found"
26 AC_MSG_RESULT(not found)
30 AS_IF([ test "${KDE4_CONFIG}" != "not found"],
32 KDE_CONF_VER=`${KDE4_CONFIG} --version | grep KDE | sed -e 's/^.*: //' -e 's/ (.*$//'`
33 AS_IF([test `echo ${KDE_CONF_VER} | sed -e 's/\..*$//'` = 4],
35 AC_MSG_RESULT(found ${KDE4_CONFIG} with version ${KDE_CONF_VER})
38 AC_MSG_RESULT(not found)
42 AC_MSG_RESULT(not found)
47 AC_DEFUN([KDE_HEADER_CHECK],
49 AC_MSG_CHECKING(for kde4 headers)
50 [KDE_HEADER_DIR=`${KDE4_CONFIG} --path include`]
52 AS_IF([test -f ${KDE_HEADER_DIR+kdirwatch.h}],
54 AS_IF([test -f ${KDE_HEADER_DIR+plasma/dataengine.h}],
56 AC_MSG_RESULT($KDE_HEADER_DIR)
59 AC_MSG_RESULT(not found)
63 AC_MSG_RESULT(not found)
65 AC_SUBST(KDE_HEADER_DIR)
68 AC_DEFUN([KDE_SERVICE_PATH_CHECK],
70 AC_MSG_CHECKING(for kde4 services Path)
71 AS_IF([test `echo ${prefix} | grep home | wc -l` == 1],
75 AS_IF([test ${KDE_IN_HOME} = "yes"],
77 KDE_SERVICE_PATH=`${KDE4_CONFIG} --path services | tr ":" "\n" | grep /home | head -1`
80 KDE_SERVICE_PATH=`${KDE4_CONFIG} --path services | tr ":" "\n" | grep /usr | head -1`
82 AC_MSG_RESULT(${KDE_SERVICE_PATH})
83 AC_SUBST(KDE_SERVICE_PATH)
86 AC_DEFUN([KDE_MODULE_PATH_CHECK],
88 AC_MSG_CHECKING(for kde4 plugins Path)
89 AS_IF([test `echo ${prefix} | grep home | wc -l` == 1],
93 AS_IF([test ${KDE_IN_HOME} = "yes"],
95 KDE_MODULE_PATH=`${KDE4_CONFIG} --path module | tr ":" "\n" | grep /home | head -1`
98 KDE_MODULE_PATH=`${KDE4_CONFIG} --path module | tr ":" "\n" | grep /usr | head -1`
100 AC_MSG_RESULT(${KDE_MODULE_PATH})
101 AC_SUBST(KDE_MODULE_PATH)
104 AC_DEFUN([KDE_ICON_PATH_CHECK],
106 AC_MSG_CHECKING(for kde4 icons Path)
107 AS_IF([test `echo ${prefix} | grep home | wc -l` == 1],
111 AS_IF([test ${KDE_IN_HOME} = "yes"],
113 KDE_ICON_PATH=`${KDE4_CONFIG} --path icon | tr ":" "\n" | grep /home | head -1`
116 KDE_ICON_PATH=`${KDE4_CONFIG} --path icon | tr ":" "\n" | grep /usr | head -1`
118 AC_MSG_RESULT(${KDE_ICON_PATH})
119 AC_SUBST(KDE_ICON_PATH)