Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / ksysguard / configure.in.in
blob99f80a177511f862a983e4f23abfa969fd3ad770
1 dnl Check whether ksysguardd can run; 
2 AC_MSG_CHECKING([if ksysguardd can be compiled])
3 case "$host" in 
4   *-*-linux*) ksysguardd_compile=yes; UNAME='Linux' ;;
5   *-*-freebsd*) ksysguardd_compile=yes; UNAME='FreeBSD' ;;
6   *-*-netbsd*) ksysguardd_compile=yes; UNAME='NetBSD' ;;
7   *-*-solaris*) ksysguardd_compile=yes; UNAME='Solaris' ;;
8   *-*-osf*) ksysguardd_compile=yes; UNAME='Tru64' ;;
9   *-*-irix*) ksysguardd_compile=yes; UNAME='Irix' ;;
10   *-*-openbsd*) ksysguardd_compile=yes; UNAME='OpenBSD' ;;
11   *) ksysguardd_compile=no; UNAME='' ;;
12 esac
14 AC_MSG_RESULT($ksysguardd_compile)
16 AM_CONDITIONAL(include_ksysguardd, test "$ksysguardd_compile" = "yes")
17 AM_CONDITIONAL(include_ksysguardd_linux, test "$UNAME" = Linux)
18 AM_CONDITIONAL(include_ksysguardd_freebsd, test "$UNAME" = FreeBSD)
19 AM_CONDITIONAL(include_ksysguardd_netbsd, test "$UNAME" = NetBSD)
20 AM_CONDITIONAL(include_ksysguardd_solaris, test "$UNAME" = Solaris)
21 AM_CONDITIONAL(include_ksysguardd_tru64, test "$UNAME" = Tru64)
22 AM_CONDITIONAL(include_ksysguardd_irix, test "$UNAME" = Irix)
23 AM_CONDITIONAL(include_ksysguardd_openbsd, test "$UNAME" = OpenBSD)
24 AC_SUBST(UNAME)
26 AC_ARG_WITH(sensors,
27         [AC_HELP_STRING(--with-sensors,
28                 [enable support for lm_sensors @<:@default=check@:>@])],
29         [], with_sensors=check)
31 if test "x$with_sensors" != xno; then
32         KDE_CHECK_HEADERS(sensors/sensors.h)
33         KDE_CHECK_LIB(sensors, sensors_init, [LIBSENSORS="-lsensors"])
35         if test "x$with_sensors" != xcheck && test -z "$LIBSENSORS"; then
36                 AC_MSG_ERROR([--with-sensors was given, but test for lm_sensors failed])
37         fi
40 case "$UNAME" in
41         Linux) LIBHOSTS="$LIBSENSORS" ;;
42         FreeBSD) LIBHOSTS="$LIBSENSORS -lkvm" ;;
43         Solaris) LIBHOSTS="$LIBSENSORS -lkstat -lsocket" ;;
44 esac
45 AC_SUBST(LIBHOSTS)
46 AC_SUBST(LIBSENSORS)
48 dnl Check for dell laptop support
49 AM_CONDITIONAL(supports_i8k, test -f /proc/i8k)
51 dnl XRes check
52 KDE_CHECK_HEADER(X11/extensions/XRes.h, [xres_h=yes], [xres_h=no], [#include <X11/Xlib.h>])
53 if test "x$xres_h" = "xyes"; then
54   KDE_CHECK_LIB(XRes, XResQueryClientResources, [
55     LIB_XRES=-lXRes
56     AC_DEFINE(HAVE_XRES, 1, [Define if you have the XRes extension])
57   ], [], -lXext -X11 $X_EXTRA_LIBS)
58 else
59   LIB_XRES=
61 AC_SUBST(LIB_XRES)