dnl    This file is part of the KDE libraries/packages
dnl    Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
 
dnl    This file is free software; you can redistribute it and/or
dnl    modify it under the terms of the GNU Library General Public
dnl    License as published by the Free Software Foundation; either
dnl    version 2 of the License, or (at your option) any later version.
 
dnl    This library is distributed in the hope that it will be useful,
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl    Library General Public License for more details.
 
dnl    You should have received a copy of the GNU Library General Public License
dnl    along with this library; see the file COPYING.LIB.  If not, write to
dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl    Boston, MA 02111-1307, USA.

# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas

dnl Process this file with autoconf to produce a configure script.

AC_INIT(acinclude.m4) dnl a source file from your sub dir

dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)

dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH

dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM 
dnl Perform program name transformation
AC_ARG_PROGRAM

dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(kdebase, "3.1.3") dnl searches for some needed programs

KDE_SET_PREFIX

dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done

dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL

dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS

dnl KDE_USE_QT
AC_PATH_KDE
#MIN_CONFIG

dnl PAM, shadow passwords, libcrypt
KDE_PASSWDLIBS

DEF_PAM_SERVICE(kdm, kdm, KDM)
DEF_PAM_SERVICE(kcp, kcheckpass, KCHECKPASS)
DEF_PAM_SERVICE(kss, kscreensaver, KSCREENSAVER)

dnl Image readers/writers
KDE_CHECK_KIMGIO

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/time.h crypt.h \
	sys/select.h sys/ioctl.h sys/stropts.h stropts.h termio.h termios.h sys/termios.h \
	lastlog.h sys/socket.h sys/sockio.h krb5/krb5.h rpc/rpc.h rpc/key_prot.h \
	sys/m_wait.h ncurses.h paths.h login_cap.h syslog.h \
	sys/wait.h sys/ucred.h sys/mount.h floatingpoint.h fstab.h mntent.h \
	Alib.h libutil.h util.h time.h limits.h vfork.h string.h float.h \
	math.h nan.h ieeefp.h
)
AC_CHECK_HEADER(pty.h)
AC_CHECK_FUNC(ptsname,,)


dnl Checks for Alib on HP-UX (added by deller, Apr 29 1999)
AC_CHECK_LIB(Alib, main, [LIBALIB="-lAlib"]) dnl HP-UX network audio server
AC_SUBST(LIBALIB)

dnl Check for ossaudio on NetBSD
AC_CHECK_LIB(ossaudio, main, [LIBOSSAUDIO="-lossaudio"])
AC_SUBST(LIBOSSAUDIO)

dnl Check for AIX stuff
AC_CHECK_LIB(cfg, main, [LIBCFG="-lcfg"]) dnl for AIX
AC_SUBST(LIBCFG)
AC_CHECK_LIB(odm, main, [LIBODM="-lodm"]) dnl for AIX
AC_SUBST(LIBODM)

dnl SMB checks moved to their own configure.in.in

kde_have_setupterm=yes
AC_CHECK_LIB(curses, setupterm, [LIBCURSES=-lcurses],
  AC_CHECK_LIB(ncurses, setupterm, [LIBCURSES=-lncurses],
    AC_CHECK_LIB(mytinfo, setupterm, [LIBCURSES=-lmytinfo],
       kde_have_setupterm=no)))

AC_SUBST(LIBCURSES)

if test "$kde_have_setupterm" = "yes"; then
  AC_DEFINE_UNQUOTED(HAVE_SETUPTERM, 1, [Define if you have setupterm in -l(n)curses])
fi

kde_have_utempter=yes
AC_CHECK_LIB(utempter, addToUtmp, [LIBUTEMPTER=-lutempter], kde_have_utempter=no)
AC_SUBST(LIBUTEMPTER)
if test "$kde_have_utempter" = "yes"; then
  AC_DEFINE_UNQUOTED(HAVE_UTEMPTER, 1, [Define if you have the utempter helper for utmp managment])
fi

AC_CHECK_FUNC(res_init, ,
  AC_CHECK_LIB(resolv, res_init, [LIBRESOLV="-lresolv"], , $LIBSOCKET)) dnl for Sun

AC_SUBST(LIBRESOLV)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_LANG_CPLUSPLUS
AC_HEADER_TIME

dnl check if the compiler has bool
AC_CHECK_BOOL
AC_LANG_C
AC_C_LONG_DOUBLE
AC_TYPE_GETGROUPS

dnl for libsmb
AC_CHECK_SIZEOF(char,1)
AC_CHECK_SIZEOF(short,2)
AC_CHECK_SIZEOF(int,4)
AC_CHECK_SIZEOF(long,4)
AC_C_BIGENDIAN

AC_CHECK_FUNCS(socket powl sqrtl strdup getdtablesize setpgid nice seteuid vsyslog initgroups setgroups getgroups grantpt pw_encrypt setpriority getpt unlockpt ptsname waitpid)
AC_CHECK_MKSTEMP
AC_CHECK_SETENV
AC_CHECK_UNSETENV
AC_CHECK_GETDOMAINNAME
AC_CHECK_GETHOSTNAME
AC_CHECK_USLEEP
AC_CHECK_RANDOM
AC_CHECK_S_ISSOCK
AC_CHECK_KDEMAXPATHLEN
KDE_CHECK_STRLCPY

AC_MSG_CHECKING([if it's safe to enable UTMP])

case "$host_os" in
linux*) utmp_support=yes;
     ;;
freebsd*) utmp_support=yes;
     ;;
*) utmp_support=no;
esac

AC_MSG_RESULT($utmp_support)

if test "$utmp_support" = yes; then
   AC_DEFINE_UNQUOTED(UTMP_SUPPORT, 1, [Define if you want to use utmp entries])
fi

AC_CHECK_UTMP_FILE

dnl Checks for Solaris' libkstat
kde_have_kstat=yes
AC_CHECK_LIB(kstat, kstat_open, [LIBKSTAT=-lkstat], kde_have_kstat=no)
AC_SUBST(LIBKSTAT)
if test "$kde_have_kstat" = "yes"; then
  AC_DEFINE(HAVE_KSTAT, 1, [Defines if you have Solaris' libkstat])
fi

dnl Checks for libdevinfo (Solaris 7 and later)
dnl since the library is available on earlier Solaris releases (but
dnl with a completely different and undocumented interface),
dnl we have to verfy that the required header is present as well
AC_CHECK_HEADER(libdevinfo.h,
	kde_have_libdevinfo_h=yes,
	kde_have_libdevinfo_h=no)
if test "$kde_have_libdevinfo_h" = "yes"; then
   kde_have_libdevinfo_lib=yes
   AC_CHECK_LIB(devinfo, di_init, [LIBDEVINFO=-ldevinfo], kde_have_libdevinfo_lib=no)
   if test "$kde_have_libdevinfo_lib" = "yes"; then
      AC_DEFINE(HAVE_LIBDEVINFO_H, 1, [Defines if you have libdevinfo of Solaris 7 or later])
      AC_SUBST(LIBDEVINFO)
   fi
fi

dnl check for java
KDE_CHECK_JAVA_DIR

dnl -----  Checks for X11 extensions -----
ac_save_ldflags="$LDFLAGS"
LDFLAGS="$X_LDFLAGS"

dnl --- XTEST check
XTESTLIB=
KDE_CHECK_HEADER(X11/extensions/XTest.h, 
    [AC_CHECK_LIB( Xtst, XTestFakeKeyEvent,
	[AC_DEFINE(HAVE_XTEST, 1, [Define if you have the XTest extension])
	 XTESTLIB=-lXtst], 
	, [ -lXext -lX11 $X_PRE_LIBS ])
    ])
AC_SUBST(XTESTLIB)

dnl --- XKB check
KDE_CHECK_HEADER(X11/XKBlib.h, 
    [AC_CHECK_LIB( X11, XkbLockModifiers,
	[AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension])], 
	, [ -lXext -lX11 $X_PRE_LIBS ])
     AC_CHECK_LIB( X11, XkbSetPerClientControls,
	[AC_DEFINE(HAVE_XKBSETPERCLIENTCONTROLS, 1, [Define if you have XkbSetPerClientControls])],
	, [ -lXext -lX11 $X_PRE_LIBS ])
    ])

LDFLAGS="$ac_save_ldflags"
dnl ----- end of X11 extension checks -----


CXXFLAGS="$CXXFLAGS -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST"

KDE_INIT_DOXYGEN([The Kdebase API Reference], [Version $VERSION])

dnl Ok, kdebase has _sooo_ many Makefiles, that the check for uniqueness
dnl of those filenames in the list of the files (done by autoconf macros
dnl itself) is taking more that nine minutes (!).  For kdebase only we take
dnl out that test.  (matz@kde.org)
m4_define([_AC_CONFIG_UNIQUE], [])dnl

AH_VERBATIM(_osf_stuff, [
#if !defined(HAVE_SETEUID)
#define seteuid(_eu) setresuid(-1, _eu, -1)
#endif

#if defined(__osf__)
#define AVOID_XKB                 /* for konsole to avoid XKB and XTEST */
#endif
])
if test -z "$RUN_KAPPFINDER"; then
  RUN_KAPPFINDER="no"
fi
AC_SUBST(RUN_KAPPFINDER)
ACCESS_SUBDIR=
KDE_CHECK_HEADER(X11/extensions/XKBstr.h, ACCESS_SUBDIR=access)
AM_CONDITIONAL(include_kcontrol_access, test -n "$ACCESS_SUBDIR")
KDE_CHECK_SSL
AC_HAVE_DPMS()
KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  AC_MSG_WARN([Could not find libfontconfig anywhere, check http://www.fontconfig.org/])
])

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)
# $Id: configure.in.in,v 1.7 2002/10/30 09:14:22 hausmann Exp $

# libmach for Tru64
# linux/raw.h for Linux
# devinfo.h, libdevinfo for the list of {IRQ,DMA,IOPORTS/MEMRANGES} for FreeBSD

case "$host" in
  *-*-osf*)
    AC_CHECK_LIB(mach, vm_statistics, LIB_TRU64_MACH="-lmach")dnl
    ;;
  *-*-linux*)
    AC_CHECK_HEADERS(linux/raw.h sys/raw.h)dnl
    ;;
  *-*-freebsd*)
    AC_CHECK_HEADERS(devinfo.h)
    AC_CHECK_LIB(devinfo, devinfo_foreach_rman, LIBDEVINFO="-ldevinfo")
    ;;
esac
AC_SUBST(LIB_TRU64_MACH)

KDE_CHECK_LONG_LONG
FOUND_FREETYPE=0

KDE_FIND_PATH(freetype-config, FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  AC_MSG_WARN([Could not find libfreetype anywhere, check http://www.freetype.org/])
])

if test -n "$FREETYPE_CONFIG"; then
  vers=`$FREETYPE_CONFIG --version 2>/dev/null | sed -e 's/libfreetype //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  if test -n "$vers" && test "$vers" -ge 6001000
  then
     LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
     LIBFREETYPE_RPATH=
     for args in $LIBFREETYPE_LIBS; do
          case $args in
            -L*)
               LIBFREETYPE_RPATH="$LIBFREETYPE_RPATH $args"
               ;;
          esac
     done
     LIBFREETYPE_RPATH=`echo $LIBFREETYPE_RPATH | sed -e "s/-L/-R/g"`
     LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
     FOUND_FREETYPE=1
  else
     AC_MSG_WARN([You need at least FreeType 2.0.2])
  fi
fi

if test $FOUND_FREETYPE -eq 1; then
    AC_SUBST(LIBFREETYPE_LIBS)
    AC_SUBST(LIBFREETYPE_CFLAGS)
    AC_SUBST(LIBFREETYPE_RPATH)
    FONTINST_SUBDIR="kfontinst"
else
    AC_MSG_WARN([Missing FreeType2 - disabling kfontinst!])
    FONTINST_SUBDIR=""
fi

AM_CONDITIONAL(include_kcontrol_kfontinst, test -n "$FONTINST_SUBDIR")

FONTINST_TN=""
if test $FOUND_FREETYPE -eq 1; then
    KDE_CHECK_LIB(freetype, FTC_Manager_New, FONTINST_TN="thumbnail",,
    -lm -L/usr/X11R6/lib $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
fi

AM_CONDITIONAL(include_fontinst_tn, test -n "$FONTINST_TN")
AC_CHECK_FUNCS(getifaddrs getnameinfo)
KDE_CHECK_HEADER(kcarddb.h, FOUND_KSMCARD="yes", FOUND_KSMCARD="no")
AM_CONDITIONAL(include_kcontrol_smartcard, test "$FOUND_KSMCARD" = "yes")

dnl -----------------------------------------------------
dnl XRender check
dnl -----------------------------------------------------
KDE_CHECK_HEADER(X11/extensions/Xrender.h, [xrender_h=yes], [xrender_h=no])
if test "$xrender_h" = yes; then
  KDE_CHECK_LIB(Xrender, XRenderComposite, [
    LIB_XRENDER=-lXrender
    AC_DEFINE_UNQUOTED(HAVE_XRENDER, 1, [Defined if your system has XRender support])
  ], [], -lXext -lX11 $X_EXTRA_LIBS)
else
  LIB_XRENDER=
fi
AC_SUBST(LIB_XRENDER)

DO_NOT_COMPILE="$DO_NOT_COMPILE kcmthemes"
case "$host" in
  *-*-linux*)
	FOUND_USBVIEW=yes
	;;
esac

AM_CONDITIONAL(include_kcontrol_usbview, test "$FOUND_USBVIEW" = "yes")
dnl nothing special
AC_CHECK_FUNCS(sigset sigaction)
dnl Check for "struct ucred"
AC_MSG_CHECKING("struct ucred")
AC_EGREP_HEADER([struct ucred], [sys/socket.h], have_ucred=yes)
if test "$have_ucred" = "yes"; then
    AC_DEFINE(HAVE_STRUCT_UCRED, 1, [Define if you have the struct ucred])
    AC_MSG_RESULT(yes)
else
    AC_MSG_RESULT(no)
fi

dnl Check for the group "nogroup" or "nobody" Use -2 otherwise.
AC_MSG_CHECKING(nogroup)
AC_TRY_RUN([
    #include <grp.h>
    #include <sys/types.h>

    int main() 
    {
	struct group *grp = getgrnam("nogroup");
	if (grp) return 0;
	return 1;
    }
], nogroup=nogroup, 
AC_TRY_RUN([
    #include <grp.h>
    #include <sys/types.h>

    int main() 
    {
	struct group *grp = getgrnam("nobody");
	if (grp) return 0;
	return 1;
    }
], nogroup=nobody, 
nogroup=65534, nogroup=65534), nogroup=65534)
AC_MSG_RESULT($nogroup)
AC_SUBST(nogroup)
AC_CHECK_FUNCS(getpeereid)

dnl this is for kdm:

savex="$exec_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
KDE_CONFDIR=`eval echo $kde_confdir`
AC_DEFINE_UNQUOTED(KDE_CONFDIR, "$KDE_CONFDIR", [KDE's configuration directory])
AC_SUBST(KDE_CONFDIR)
KDE_BINDIR=`eval echo $kde_bindir`
AC_DEFINE_UNQUOTED(KDE_BINDIR, "$KDE_BINDIR", [KDE's binaries directory])
AC_SUBST(KDE_BINDIR)
exec_prefix="$savex"

KDE_FIND_PATH(xmkmf, XMKMF, [], [AC_MSG_ERROR([xmkmf/imake not found. Please make sure it's in PATH!])])
AC_SUBST(XMKMF)

dnl ask imake about various X settings
AC_MSG_CHECKING([various X settings])
AC_CACHE_VAL(kde_cv_defines_imake,
[rm -fr conftestdir
if mkdir conftestdir; then
    cd conftestdir
    cat > Imakefile <<'EOF'
BASIC_FLAGS = StandardDefines ConnectionFlags 

#if HasXdmAuth
XDMAUTH_DEFINES = -DHASXDMAUTH
#endif

#if HasBSD44Sockets
SOCK_DEFINES = -DBSD44SOCKETS
#endif

#if defined(i386Architecture) || defined(ia64Architecture) || defined(AmigaArchitecture)
FRAGILE_DEFINES = -DFRAGILE_DEV_MEM
#endif

#ifdef OpenBSDArchitecture
RANDOM_DEFINES = -DARC4_RANDOM
#elif defined(LinuxArchitecture)
RANDOM_DEFINES = -DDEV_RANDOM
#endif

#if HasMkstemp
MKTMP_DEFINES = -DHAS_MKSTEMP
#endif

#if HasLibCrypt && !defined(SpecialLibCrypt) && defined(LynxOSArchitecture)
CRYPT_DEFINES = -DHAS_CRYPT
#endif

VERSION_DEFINES = -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion

XDM_CFLAGS = $(BASIC_FLAGS) $(VERSION_DEFINES) $(SIGNAL_DEFINES) $(XDMAUTH_DEFINES) $(FRAGILE_DEFINES) $(SOCK_DEFINES) $(RANDOM_DEFINES) $(CRYPT_DEFINES) $(MKTMP_DEFINES)

acimake:
	@echo XDM_CFLAGS=\"$(XDM_CFLAGS)\"
#if HasXdmAuth
	@echo HASXDMAUTH=1
#endif
	@echo XBINDIR=$(BINDIR)
	@echo XLIBDIR=$(LIBDIR)
EOF
    if $XMKMF >&5 2>&1 && test -f Makefile; then
	[kde_cv_defines_imake=`${MAKE-make} acimake 2> /dev/null | grep '^[^ ]*='`]
	kde_cv_defines_imake=`echo $kde_cv_defines_imake`
    else
        AC_MSG_RESULT([failed])
	AC_MSG_ERROR([$XMKMF (imake) failed.
Make sure you have all necessary X development packages installed.])
    fi
    cd ..
    rm -fr conftestdir
else
    AC_MSG_RESULT([failed])
    AC_MSG_ERROR([cannot create temporary directory])
fi])
AC_MSG_RESULT([done])
eval $kde_cv_defines_imake

AC_MSG_CHECKING([whether to use xdm authorization])
if test -n "$HASXDMAUTH"; then
    AC_MSG_RESULT([yes])
    AC_DEFINE(HASXDMAUTH, 1, [Use encrypted XDM authorization])
else
    AC_MSG_RESULT([no])
fi

AC_MSG_RESULT([checking for X binary directory... $XBINDIR])
AC_DEFINE_UNQUOTED(XBINDIR, "$XBINDIR", [Define where to find the X binaries])
AC_MSG_RESULT([checking for X library directory... $XLIBDIR])
AC_DEFINE_UNQUOTED(XLIBDIR, "$XLIBDIR", [Define where to find the X libraries])

AC_CHECK_LIB(Xau, main, [:], 
	[
	  AC_MSG_WARN([Cannot build KDM! Make sure that libXau.a is installed!])
	  DO_NOT_COMPILE="$DO_NOT_COMPILE kdm"
	], 
	  $X_LDFLAGS -lX11 $LIBSOCKET)

AC_ARG_WITH(xdmcp,
	[  --without-xdmcp         build kdm without xdmcp support [default=with xdmcp]],
	[ if test "$withval" = yes; then
	    XDMCP=1
	  else
	    XDMCP=
	  fi
	], [XDMCP=1])
if test -n "$XDMCP"; then
  kdmchooserdir=chooser
  AC_CHECK_LIB(Xdmcp, main, [LIBXDMCP="-lXdmcp"], , $X_LDFLAGS -lX11 $LIBSOCKET)
  if test -n "$LIBXDMCP"; then
    ac_cpp_safe=$ac_cpp
    ac_cpp='$CXXCPP $CPPFLAGS $X_INCLUDES'
    KDE_CHECK_HEADERS(X11/Xdmcp.h, [HAVE_X11_XDMCP_H=1])
    ac_cpp=$ac_cpp_safe
  fi
  if test -z "$HAVE_X11_XDMCP_H"; then
    AC_MSG_WARN([Cannot build KDM! Make sure that libXdmcp.a and Xdmcp.h 
are installed or use --without-xdmcp to disable XDMCP support!])
    DO_NOT_COMPILE="$DO_NOT_COMPILE kdm"
  fi
fi
AC_SUBST(LIBXDMCP)
AM_CONDITIONAL(include_kdm_chooser, test -n "$kdmchooserdir") dnl XXX phase out

AC_MSG_CHECKING(whether to use Kerberos v4)
AC_ARG_WITH(krb4,
[  --with-krb4[=PATH]      Compile in Kerberos v4 support.],
[ case "$withval" in
  yes)
    with_krb4=/usr/kerberos
    ;;
  esac ],
[ with_krb4=no ]
)
case "$with_krb4" in
no)
  AC_MSG_RESULT(no)
  ;;
*)
  AC_MSG_RESULT(yes)
  AC_DEFINE_UNQUOTED(KRB4, 1, [ define if you have Kerberos IV ])
  KERBEROS_ROOT="$with_krb4"
  KERBEROS_INCS="-I${KERBEROS_ROOT}/include"
  KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes"
  KRB_RPATH=
  if test "$USE_RPATH" = "yes" ; then
    KRB_RPATH="-R ${KERBEROS_ROOT}/lib"
  fi
  AC_CHECK_LIB(resolv, dn_expand, KERBEROS_LIBS="$KERBEROS_LIBS -lresolv")
  dnl Check whether or not the AFS lifetime conversion routines exist.
  AC_MSG_CHECKING(whether AFS lifetime conversion routines are present)
  keeplibs="$LIBS"
  keepcflags="$CFLAGS"
  LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes $LIBS"
  CFLAGS="-I${KERBEROS_ROOT}/include $CFLAGS"
  AC_TRY_LINK([#include <krb.h>], [ krb_life_to_time(10, 10);],
              [AC_MSG_RESULT(yes)
               AC_DEFINE_UNQUOTED(HAVE_KRB_LIFE_TO_TIME, 1, 
	         [ define if libkrb has krb_life_to_time() ])],
              [AC_MSG_RESULT(no)])
  LIBS="$keeplibs"
  CFLAGS="$keepcflags"
  ;;
esac

AC_MSG_CHECKING(whether to use AFS)
AC_ARG_WITH(afs,
  [  --with-afs              Compile in AFS support (requires KTH krb4).], , 
  [ with_afs=no ])
if test "$with_afs" = no; then
  AC_MSG_RESULT(no)
else
  if test "$with_krb4" = no; then
    AC_MSG_RESULT(no)
    AC_MSG_WARN("AFS requires Kerberos v4 support.")
    with_afs=no
  else
    AC_MSG_RESULT(yes)
    AC_DEFINE_UNQUOTED(AFS, 1, [ define if you have KTH Kerberos IV and AFS ])
    KERBEROS_LIBS="${KERBEROS_LIBS} -lkafs"
    if test -n "$os_aix"; then
      KERBEROS_LIBS="${KERBEROS_LIBS} -lld"
    fi
  fi
fi

AC_SUBST(KERBEROS_ROOT)dnl
AC_SUBST(KERBEROS_INCS)dnl
AC_SUBST(KERBEROS_LIBS)dnl
AC_SUBST(KRB_RPATH)

AC_CHECK_LIB(s, main, [LIB_LIBS="-ls"]) dnl for AIX
AC_SUBST(LIB_LIBS)

AC_MSG_CHECKING([whether to use Kerberos5 for Xauth cookies in kdm])
AC_ARG_WITH(krb5auth,
  [  --with-krb5auth         Use Kerberos5 for Xauth cookies in kdm.], , 
  [ with_krb5auth=no ])
if test "x$with_krb5auth" = xno; then
  AC_MSG_RESULT(no)
else
  AC_MSG_RESULT(yes)
  AC_CHECK_HEADER(krb5/krb5.h, 
    [ XDM_CFLAGS="$XDM_CFLAGS -DK5AUTH" ],
    [ AC_MSG_ERROR([--with-krb5auth requires Kerberos5 header files.])])
fi

AC_MSG_CHECKING([whether to use Sun's secure RPC for Xauth cookies in kdm])
AC_ARG_WITH(rpcauth,
  [  --with-rpcauth          Use Sun's secure RPC for Xauth cookies in kdm.], , 
  [ with_rpcauth=no ])
if test "x$with_rpcauth" = xno; then
  AC_MSG_RESULT(no)
else
  AC_MSG_RESULT(yes)
  AC_CHECK_HEADER(rpc/rpc.h, 
    [ XDM_CFLAGS="$XDM_CFLAGS -DSECURE_RPC" ],
    [ AC_MSG_ERROR([--with-rpcauth requires Sun RPC header files.])])
fi

  dnl should be:
  dnl AC_CHECK_MEMBER(struct passwd.pw_expire, [ XDM_CFLAGS="$XDM_CFLAGS -DHAVE_PW_EXPIRE" ], , [#include <pwd.h>])
  dnl but somehow it doesn't work. so we make it by hand ...
  AC_MSG_CHECKING([for pw_expire in struct passwd])
  AC_CACHE_VAL(ac_cv_have_pw_expire,
      [ AC_TRY_COMPILE(
	  [#include <pwd.h>],
	  [struct passwd pwd; pwd.pw_expire = 0;],
	  [ac_cv_have_pw_expire="yes"],
	  [ac_cv_have_pw_expire="no"])
      ])
  AC_MSG_RESULT($ac_cv_have_pw_expire)
  if test "$ac_cv_have_pw_expire" = "yes"; then
      XDM_CFLAGS="$XDM_CFLAGS -DHAVE_PW_EXPIRE"
  fi

  ac_save_libs=$LIBS
  LIBS="$LIBS $LIBUTIL"
  AC_CHECK_FUNC(setusercontext, [ XDM_CFLAGS="$XDM_CFLAGS -DHAS_SETUSERCONTEXT" ])
  KDE_CHECK_FUNC_EXT(getusershell, [
#include <unistd.h>
], 
		[getusershell();],
	        [char *getusershell()],
		[GETUSERSHELL],
	[ XDM_CFLAGS="$XDM_CFLAGS -DHAVE_GETUSERSHELL" ])
  AC_CHECK_FUNC(login_getclass, [ XDM_CFLAGS="$XDM_CFLAGS -DHAVE_LOGIN_GETCLASS" ])
  AC_CHECK_FUNC(auth_timeok, [ XDM_CFLAGS="$XDM_CFLAGS -DHAVE_AUTH_TIMEOK" ])
  LIBS=$ac_save_libs

AC_CHECK_FUNC(vsyslog, [ XDM_CFLAGS="$XDM_CFLAGS -DUSE_SYSLOG" ])
if test "x$use_pam" = xyes; then
    XDM_CFLAGS="$XDM_CFLAGS -DUSE_PAM"
elif test "x$use_shadow" = xyes; then
    XDM_CFLAGS="$XDM_CFLAGS -DUSESHADOW"
fi
if test "x$XDMCP" != x; then
    XDM_CFLAGS="$XDM_CFLAGS -DXDMCP"
fi
if test "x$with_krb4" != xno; then
    XDM_CFLAGS="$XDM_CFLAGS -DKERBEROS"
    if test "x$with_afs" = xno; then
	XDM_CFLAGS="$XDM_CFLAGS -DNO_AFS"
    fi
fi
AC_MSG_RESULT([xdm CFLAGS: $XDM_CFLAGS])
AC_SUBST(XDM_CFLAGS)
AC_MSG_CHECKING([whether devices kioslave should be compiled])

case `uname -s` in
    FreeBSD)
        DEVICESDIR=devices
        ;;
    Linux)
        DEVICESDIR=devices
        ;;
    *)
        DEVICESDIR=
        ;;
esac

AC_SUBST(DEVICESDIR)
if test x$DEVICESDIR != x; then
    AC_MSG_RESULT([yes])
else
    AC_MSG_RESULT([no])
fi

AM_CONDITIONAL(include_devicesdir, test -n "$DEVICESDIR")

AC_CHECK_FUNCS(setmntent)
AC_FIND_BZIP2

CFLAGS="$CFLAGS -D_GNU_SOURCE"
CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"

AC_CHECK_HEADERS(termios.h pty.h libutil.h util.h sys/types.h sys/ioctl.h stropts.h)

kde_save_LIBS="$LIBS"
LIBS="$LIBS $LIBUTIL"
AC_CHECK_FUNCS(getpt openpty isastream)
LIBS="$kde_save_LIBS"
AC_MSG_CHECKING(whether to compile LDAP support)
AC_ARG_WITH(ldap,
[  --without-ldap=PATH     Set path for LDAP files [default=check]],
[ case "$withval" in
  yes)
    with_ldap=CHECK
    ;;
  esac ],
[ with_ldap=CHECK ]
)dnl

if test "x$with_ldap" = "xCHECK" ; then
  with_ldap=NOTFOUND
  search_incs="$kde_includes /usr/include /usr/local/include"
  AC_FIND_FILE(ldap.h, $search_incs, ldap_incdir)
  if test -r $ldap_incdir/ldap.h ; then
    test "x$ldap_incdir" != "x/usr/include" && LDAP_INCS="-I$ldap_incdir"
    with_ldap=FOUND
  fi
  if test $with_ldap = FOUND ; then
    with_ldap=NOTFOUND
    for ext in la so sl a ; do
      AC_FIND_FILE(libldap.$ext, $kde_libraries /usr/lib /usr/local/lib,
        ldap_libdir)
      if test -r $ldap_libdir/libldap.$ext ; then
        if test "x$ldap_libdir" != "x/usr/lib" ; then
          LDAP_LIBS="-L$ldap_libdir "
          test "$USE_RPATH" = yes && LDAP_RPATH="-R $ldap_libdir"
        fi
        LDAP_LIBS="${LDAP_LIBS}-lldap -llber ${LIBRESOLV}"
        with_ldap=FOUND
        break
      fi
    done
  fi
fi

case "$with_ldap" in
no) AC_MSG_RESULT(no) ;;
NOTFOUND) AC_MSG_RESULT(searched but not found) ;;
*)
  if test "x$with_ldap" = "xFOUND" ; then
    msg="incs=$ldap_incdir libs=$ldap_libdir"
  else
    msg="$with_ldap"
    LDAP_ROOT="$with_ldap"
    if test "x$LDAP_ROOT" != "x/usr" ; then
      LDAP_INCS="-I${LDAP_ROOT}/include"
      LDAP_LIBS="-L${LDAP_ROOT}/lib "
      if test "$USE_RPATH" = "yes" ; then
        LDAP_RPATH="-R ${LDAP_ROOT}/lib"
      fi
    fi
    LDAP_LIBS="${LDAP_LIBS}-lldap -llber ${LIBRESOLV}"
  fi
  kde_safe_LIBS="$LIBS"
  kde_safe_CFLAGS="$CFLAGS"
  LIBS="$LIBS $all_libraries $LDAP_LIBS $KERBEROS_LIBS $X_EXTRA_LIBS"
  CFLAGS="$CFLAGS $all_includes $LDAP_INCS $KERBEROS_INCS"
  AC_LANG_SAVE
  AC_LANG_C
  AC_TRY_LINK(dnl
  [
  #include <lber.h>
  #include <ldap.h>
  #if LDAP_VENDOR_VERSION < 20000
  #error OpenLDAP version too old, please upgrade to version 2 or higher
  #endif
  ],
  [
  LDAP *ldap;
  ],
  , with_ldap=no
  )
  AC_LANG_RESTORE
  CFLAGS=$kde_safe_CFLAGS
  LIBS=$kde_safe_LIBS
  if test "$with_ldap" = "no" ; then
    LDAP_INCS=
    LDAP_LIBS=
    LDAP_RPATH=
    LDAP_SUBDIR=
    AC_MSG_RESULT(no (but first try gave $msg))
  else
    AC_DEFINE_UNQUOTED(HAVE_LIBLDAP, 1, [Define if you have LDAP libraries])
    LDAP_SUBDIR="ldap"
    AC_MSG_RESULT($msg)
  fi
  ;;
esac

AC_SUBST(LDAP_INCS)
AC_SUBST(LDAP_LIBS)
AC_SUBST(LDAP_RPATH)

AM_CONDITIONAL(include_kioslave_ldap, test -n "$LDAP_SUBDIR")

have_libsmbclient=yes
KDE_CHECK_HEADER(libsmbclient.h, ,[have_libsmbclient=no] )
KDE_CHECK_LIB(smbclient, smbc_new_context, [] ,[have_libsmbclient=no])

AM_CONDITIONAL(include_kioslave_smb, test "$have_libsmbclient" = yes)

SMBCLIENT_EXTRA_LIBS=""
AC_CHECK_FUNC(yp_get_default_domain, [],
  [
     KDE_CHECK_LIB(nsl, yp_get_default_domain, 
           [SMBCLIENT_EXTRA_LIBS="-lnsl"] )
  ])

AC_SUBST(SMBCLIENT_EXTRA_LIBS)

dnl beta tests for openpty support
AC_MSG_CHECKING(whether we can use openpty)
ac_use_openpty="yes"
AC_ARG_ENABLE(openpty, [  --disable-openpty       disable openpty (UNIX98 terminals) support [defaul=enabled]], [ac_use_openpty="no"])
if test "$ac_use_openpty" = "yes"; then
	kde_safe_LIBS=$LIBS
	LIBS="$LIBS $LIBUTIL"
	AC_TRY_RUN([
#include <pty.h>

int main(int argc, char* argv) {
	int master_fd, slave_fd;
	int result;

	result = openpty(&master_fd, &slave_fd, 0, 0, 0);

	return 0;
}
], [ac_use_openpty="yes"], [ac_use_openpty="no"])
	LIBS=$kde_safe_LIBS
fi
if test "$ac_use_openpty" = "yes"; then
	AC_DEFINE(HAVE_OPENPTY, 1, [Defines whether we can use the openpty() function])
	AC_MSG_RESULT(yes)
else
	AC_MSG_RESULT(no)
fi

dnl Set preprocessor variable of how to get cwd from a process
AC_MSG_CHECKING(how cwd can be be found by seperate process)
case "$host" in 
  *-*-linux*) cwd_method='proc' ;;
	*) cwd_method='no' ;;
esac
AC_MSG_RESULT($cwd_method)

case "$cwd_method" in
	proc) AC_DEFINE(HAVE_PROC_CWD, 1, [Defines whether /proc/`pid`/cwd exists]) ;;
esac
DO_NOT_COMPILE="$DO_NOT_COMPILE krichtexteditor"
ac_save_LIBS="$LIBS"
LIBS="$LIBS $X_LDFLAGS -lICE"
AC_CHECK_FUNCS(_IceTransNoListen)
LIBS="$ac_save_LIBS"
dnl Check whether ksysguardd can run; 
AC_MSG_CHECKING([if ksysguardd can be compiled])
case "$host" in 
  *-*-linux*) ksysguardd_compile=yes; UNAME='Linux' ;;
  *-*-freebsd*) ksysguardd_compile=yes; UNAME='FreeBSD' ;;
  *-*-netbsd*) ksysguardd_compile=yes; UNAME='NetBSD' ;;
  *-*-solaris*) ksysguardd_compile=yes; UNAME='Solaris' ;;
  *-*-osf*) ksysguardd_compile=yes; UNAME='Tru64' ;;
  *-*-irix*) ksysguardd_compile=yes; UNAME='Irix' ;;
  *) ksysguardd_compile=no; UNAME='' ;;
esac

AC_MSG_RESULT($ksysguardd_compile)

AM_CONDITIONAL(include_ksysguardd, test "$ksysguardd_compile" = "yes")
AM_CONDITIONAL(include_ksysguardd_linux, test "$UNAME" = Linux)
AM_CONDITIONAL(include_ksysguardd_freebsd, test "$UNAME" = FreeBSD)
AM_CONDITIONAL(include_ksysguardd_netbsd, test "$UNAME" = NetBSD)
AM_CONDITIONAL(include_ksysguardd_solaris, test "$UNAME" = Solaris)
AM_CONDITIONAL(include_ksysguardd_tru64, test "$UNAME" = Tru64)
AM_CONDITIONAL(include_ksysguardd_irix, test "$UNAME" = Irix)
AC_SUBST(UNAME)

AC_CHECK_LIB(sensors, sensors_init, [LIBSENSORS="-lsensors"])
AC_SUBST(LIBSENSORS)

dnl Check for dell laptop support
AM_CONDITIONAL(supports_i8k, test -f /proc/i8k)

case "$UNAME" in
	Linux) LIBHOSTS="$LIBSENSORS" ;;
	FreeBSD) LIBHOSTS="$LIBSENSORS -lkvm" ;;
	Solaris) LIBHOSTS="$LIBSENSORS -lkstat -lsocket" ;;
esac
AC_SUBST(LIBHOSTS)

AC_CHECK_HEADERS(sensors/sensors.h)
dnl Check for the X shaped windows extension
KDE_CHECK_HEADERS(X11/extensions/shape.h)

KDE_CHECK_HEADER(X11/extensions/XKBstr.h, ,
  DO_NOT_COMPILE="$DO_NOT_COMPILE kxkb" )
dnl Solaris lacks this file, so we should skip kxkbd here
KDE_CHECK_HEADER(X11/extensions/XKBrules.h, ,
  DO_NOT_COMPILE="$DO_NOT_COMPILE kxkb" )

dnl Don't compile legacyimport, the engine is not yet ported to Qt3...
DO_NOT_COMPILE="$DO_NOT_COMPILE legacyimport"
dnl
dnl
dnl AC_FIND_MOTIF : find OSF/Motif or LessTif, and provide variables
dnl	to easily use them in a Makefile.
dnl
dnl Adapted from a macro by Andreas Zeller.
dnl
dnl The variables provided are :
dnl	link_motif		(e.g. -L/usr/lesstif/lib -lXm)
dnl	include_motif		(e.g. -I/usr/lesstif/lib)
dnl	motif_libraries		(e.g. /usr/lesstif/lib)
dnl	motif_includes		(e.g. /usr/lesstif/include)
dnl
dnl The link_motif and include_motif variables should be fit to put on
dnl your application's link line in your Makefile.
dnl
dnl Oleo CVS Id: motif.m4,v 1.9 1999/04/09 11:46:49 danny
dnl LessTif CVS $Id: configure.in.in,v 1.15 2002/02/14 17:58:49 malte Exp $
dnl
AC_DEFUN(KAC_FIND_MOTIF,
[

AC_REQUIRE([AC_PATH_XTRA])

motif_includes=
motif_libraries=

AC_ARG_WITH(motif,
[  --without-motif         do not use Motif widgets],
[if test "$withval" = "no" ; then
  motif_includes=none
  motif_libraries=none
fi])dnl

AC_ARG_WITH(motif-includes,
[  --with-motif-includes=DIR    Motif include files are in DIR],
motif_includes="$withval")

AC_ARG_WITH(motif-libraries,
[  --with-motif-libraries=DIR   Motif libraries are in DIR],
motif_libraries="$withval")

dnl Check for this first, sometimes required to link lesstif programs
AC_CHECK_LIB(Xp, XpStartPage, [MOTIF_LIBS="-lXp"], [], [$all_libraries -lXext -lX11 $LIBSOCKET])

AC_MSG_CHECKING(for Motif)

#
#
# Search the include files.
#
if test "$motif_includes" = ""; then
AC_CACHE_VAL(ac_cv_motif_includes,
[
ac_motif_save_LIBS="$LIBS"
ac_motif_save_INCLUDES="$INCLUDES"
ac_motif_save_CPPFLAGS="$CPPFLAGS"
ac_motif_save_LDFLAGS="$LDFLAGS"
#
LIBS="$MOTIF_LIBS $X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
INCLUDES="$X_CFLAGS $INCLUDES"
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
LDFLAGS="$X_LIBS $LDFLAGS"
#
ac_cv_motif_includes="none"
AC_TRY_COMPILE([#include <Xm/Xm.h>
#include <Xm/DrawingA.h>
],[int a;],
[
# Xm/Xm.h is in the standard search path.
ac_cv_motif_includes=
],
[
# Xm/Xm.h is not in the standard search path.
# Locate it and put its directory in `motif_includes'
#
# /usr/include/Motif* are used on HP-UX (Motif).
# /usr/include/X11* are used on HP-UX (X and Athena).
# /usr/dt is used on Solaris (Motif).
# /usr/openwin is used on Solaris (X and Athena).
# Other directories are just guesses.
for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
           /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
	   /usr/X11R6/LessTif/Motif2.0/include \
	   /usr/X11R6/LessTif/Motif1.2/include \
           /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
           /usr/dt/include /usr/openwin/include \
           /usr/dt/*/include /opt/*/include /usr/include/Motif* \
           "${prefix}"/*/include /usr/*/include /usr/local/*/include \
           "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
if test -f "$dir/Xm/Xm.h"; then
ac_cv_motif_includes="$dir"
break
fi
done
])
#
LIBS="$ac_motif_save_LIBS"
INCLUDES="$ac_motif_save_INCLUDES"
CPPFLAGS="$ac_motif_save_CPPFLAGS"
LDFLAGS="$ac_motif_save_LDFLAGS"
])
motif_includes="$ac_cv_motif_includes"
fi
#
#
# Now for the libraries.
#
if test "$motif_libraries" = ""; then
AC_CACHE_VAL(ac_cv_motif_libraries,
[
ac_motif_save_LIBS="$LIBS"
ac_motif_save_INCLUDES="$INCLUDES"
ac_motif_save_CPPFLAGS="$CPPFLAGS"
ac_motif_save_LDFLAGS="$LDFLAGS"
#
LIBS="$MOTIF_LIBS $X_PRE_LIBS -lXm -lXext -lXt -lX11 $X_EXTRA_LIBS $LIBS"
INCLUDES="$X_CFLAGS $INCLUDES"
if test "$motif_includes" != "" -a "$motif_includes" != "/usr/include"; then
   CPPFLAGS="$X_CFLAGS $CPPFLAGS -I$motif_includes"
else
   CPPFLAGS="$X_CFLAGS $CPPFLAGS"
fi
LDFLAGS="$X_LIBS $LDFLAGS"
#
ac_cv_motif_libraries="none"
AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
[
# libXm.a is in the standard search path.
ac_cv_motif_libraries=
],
[
# libXm.a is not in the standard search path.
# Locate it and put its directory in `motif_libraries'
#
# /usr/lib/Motif* are used on HP-UX (Motif).
# /usr/lib/X11* are used on HP-UX (X and Athena).
# /usr/dt is used on Solaris (Motif).
# /usr/lesstif is used on Linux (Lesstif).
# /usr/openwin is used on Solaris (X and Athena).
# Other directories are just guesses.
for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
           /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
	   /usr/X11R6/LessTif/Motif2.0/lib \
	   /usr/X11R6/LessTif/Motif1.2/lib \
           /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
           /usr/dt/lib /usr/openwin/lib \
           /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
           /usr/lesstif*/lib /usr/lib/Lesstif* \
           "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
           "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
  LDFLAGS="$X_LIBS $LDFLAGS -L$dir"
  AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
  [
    ac_cv_motif_libraries="$dir"
  ])
  if test "$ac_cv_motif_libraries" != "none"; then
    break
  fi
fi
done
])
#
LIBS="$ac_motif_save_LIBS"
INCLUDES="$ac_motif_save_INCLUDES"
CPPFLAGS="$ac_motif_save_CPPFLAGS"
LDFLAGS="$ac_motif_save_LDFLAGS"
])
#
motif_libraries="$ac_cv_motif_libraries"
fi
#
# Provide an easier way to link
#
if test "$motif_includes" = "none" -o "$motif_libraries" = "none"; then
        with_motif="no"
else
        with_motif="yes"
fi

if test "$with_motif" != "no"; then
        if test "$motif_libraries" = "" -o "$motif_libraries" = "/usr/lib"; then
                dnl link_motif="-lXm"
                MOTIF_LIBS="$MOTIF_LIBS -lXm"
        else
                dnl link_motif="-L$motif_libraries -lXm"
                MOTIF_LIBS="$MOTIF_LIBS -L$motif_libraries -lXm"
        fi
        if test "$motif_includes" != "" -a "$motif_includes" != "/usr/include"; then
                dnl include_motif="-I$motif_includes"
                MOTIF_CFLAGS="-I$motif_includes"
        fi
	AC_DEFINE(HAVE_MOTIF,1,[Define if you have Motif installed])
else
        with_motif="no"
fi
#
dnl AC_SUBST(link_motif)
dnl AC_SUBST(include_motif)
AC_SUBST(MOTIF_CFLAGS)
AC_SUBST(MOTIF_LIBS)
#
#
#
motif_libraries_result="$motif_libraries"
motif_includes_result="$motif_includes"
test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
test "$motif_includes_result" = "" && motif_includes_result="in default path"
test "$motif_libraries_result" = "none" && motif_libraries_result="(none)"
test "$motif_includes_result" = "none" && motif_includes_result="(none)"
AC_MSG_RESULT(
  [libraries $motif_libraries_result, headers $motif_includes_result])
])dnl


KAC_FIND_MOTIF
if test "$with_motif" != "no"; then
  NSPluginDir="nsplugins"
else
  NSPluginDir=""
  DO_NOT_COMPILE="$DO_NOT_COMPILE nsplugins"
fi

KDE_CREATE_SUBDIRSLIST
AM_CONDITIONAL(libkonq_SUBDIR_included, test "x$libkonq_SUBDIR_included" = xyes)
AM_CONDITIONAL(applnk_SUBDIR_included, test "x$applnk_SUBDIR_included" = xyes)
AM_CONDITIONAL(doc_SUBDIR_included, test "x$doc_SUBDIR_included" = xyes)
AM_CONDITIONAL(drkonqi_SUBDIR_included, test "x$drkonqi_SUBDIR_included" = xyes)
AM_CONDITIONAL(kappfinder_SUBDIR_included, test "x$kappfinder_SUBDIR_included" = xyes)
AM_CONDITIONAL(kate_SUBDIR_included, test "x$kate_SUBDIR_included" = xyes)
AM_CONDITIONAL(kcheckpass_SUBDIR_included, test "x$kcheckpass_SUBDIR_included" = xyes)
AM_CONDITIONAL(kcontrol_SUBDIR_included, test "x$kcontrol_SUBDIR_included" = xyes)
AM_CONDITIONAL(kdcop_SUBDIR_included, test "x$kdcop_SUBDIR_included" = xyes)
AM_CONDITIONAL(kdebugdialog_SUBDIR_included, test "x$kdebugdialog_SUBDIR_included" = xyes)
AM_CONDITIONAL(kdeprint_SUBDIR_included, test "x$kdeprint_SUBDIR_included" = xyes)
AM_CONDITIONAL(kdesu_SUBDIR_included, test "x$kdesu_SUBDIR_included" = xyes)
AM_CONDITIONAL(kdialog_SUBDIR_included, test "x$kdialog_SUBDIR_included" = xyes)
AM_CONDITIONAL(kfind_SUBDIR_included, test "x$kfind_SUBDIR_included" = xyes)
AM_CONDITIONAL(khelpcenter_SUBDIR_included, test "x$khelpcenter_SUBDIR_included" = xyes)
AM_CONDITIONAL(khotkeys_SUBDIR_included, test "x$khotkeys_SUBDIR_included" = xyes)
AM_CONDITIONAL(kicker_SUBDIR_included, test "x$kicker_SUBDIR_included" = xyes)
AM_CONDITIONAL(kioslave_SUBDIR_included, test "x$kioslave_SUBDIR_included" = xyes)
AM_CONDITIONAL(klipper_SUBDIR_included, test "x$klipper_SUBDIR_included" = xyes)
AM_CONDITIONAL(kmenuedit_SUBDIR_included, test "x$kmenuedit_SUBDIR_included" = xyes)
AM_CONDITIONAL(konsole_SUBDIR_included, test "x$konsole_SUBDIR_included" = xyes)
AM_CONDITIONAL(kpager_SUBDIR_included, test "x$kpager_SUBDIR_included" = xyes)
AM_CONDITIONAL(kpersonalizer_SUBDIR_included, test "x$kpersonalizer_SUBDIR_included" = xyes)
AM_CONDITIONAL(kreadconfig_SUBDIR_included, test "x$kreadconfig_SUBDIR_included" = xyes)
AM_CONDITIONAL(krichtexteditor_SUBDIR_included, test "x$krichtexteditor_SUBDIR_included" = xyes)
AM_CONDITIONAL(kscreensaver_SUBDIR_included, test "x$kscreensaver_SUBDIR_included" = xyes)
AM_CONDITIONAL(ksmserver_SUBDIR_included, test "x$ksmserver_SUBDIR_included" = xyes)
AM_CONDITIONAL(ksplash_SUBDIR_included, test "x$ksplash_SUBDIR_included" = xyes)
AM_CONDITIONAL(kstart_SUBDIR_included, test "x$kstart_SUBDIR_included" = xyes)
AM_CONDITIONAL(ksysguard_SUBDIR_included, test "x$ksysguard_SUBDIR_included" = xyes)
AM_CONDITIONAL(ksystraycmd_SUBDIR_included, test "x$ksystraycmd_SUBDIR_included" = xyes)
AM_CONDITIONAL(ktip_SUBDIR_included, test "x$ktip_SUBDIR_included" = xyes)
AM_CONDITIONAL(kwin_SUBDIR_included, test "x$kwin_SUBDIR_included" = xyes)
AM_CONDITIONAL(kxkb_SUBDIR_included, test "x$kxkb_SUBDIR_included" = xyes)
AM_CONDITIONAL(l10n_SUBDIR_included, test "x$l10n_SUBDIR_included" = xyes)
AM_CONDITIONAL(legacyimport_SUBDIR_included, test "x$legacyimport_SUBDIR_included" = xyes)
AM_CONDITIONAL(nsplugins_SUBDIR_included, test "x$nsplugins_SUBDIR_included" = xyes)
AM_CONDITIONAL(pics_SUBDIR_included, test "x$pics_SUBDIR_included" = xyes)
AM_CONDITIONAL(konqueror_SUBDIR_included, test "x$konqueror_SUBDIR_included" = xyes)
AM_CONDITIONAL(kdesktop_SUBDIR_included, test "x$kdesktop_SUBDIR_included" = xyes)
AM_CONDITIONAL(kdm_SUBDIR_included, test "x$kdm_SUBDIR_included" = xyes)
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ applnk/Makefile ])
AC_CONFIG_FILES([ applnk/compat/Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ doc/kate/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/arts/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/background/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/bell/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/cache/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/clock/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/colors/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/cookies/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/crypto/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/desktop/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/ebrowsing/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/email/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/energy/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/filemanager/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/filetypes/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/fonts/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/helpindex/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/icons/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmaccess/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmcss/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmfontinst/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmkonsole/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmlaunch/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmnotify/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmsmserver/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmstyle/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kcmtaskbar/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kdm/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/keyboard/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/keys/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/khtml/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kthememgr/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/kwindecoration/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/language/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/mouse/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/netpref/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/panel/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/passwords/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/proxy/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/screensaver/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/smb/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/spellchecking/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/useragent/Makefile ])
AC_CONFIG_FILES([ doc/kcontrol/windowmanagement/Makefile ])
AC_CONFIG_FILES([ doc/kdebugdialog/Makefile ])
AC_CONFIG_FILES([ doc/kdeprint/Makefile ])
AC_CONFIG_FILES([ doc/kdesu/Makefile ])
AC_CONFIG_FILES([ doc/kdm/Makefile ])
AC_CONFIG_FILES([ doc/kfind/Makefile ])
AC_CONFIG_FILES([ doc/khelpcenter/Makefile ])
AC_CONFIG_FILES([ doc/khelpcenter/faq/Makefile ])
AC_CONFIG_FILES([ doc/khelpcenter/glossary/Makefile ])
AC_CONFIG_FILES([ doc/khelpcenter/quickstart/Makefile ])
AC_CONFIG_FILES([ doc/khelpcenter/userguide/Makefile ])
AC_CONFIG_FILES([ doc/khelpcenter/visualdict/Makefile ])
AC_CONFIG_FILES([ doc/kicker/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/devices/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/dma/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/interrupts/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/ioports/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/memory/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/nics/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/partitions/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/pci/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/pcmcia/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/processor/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/protocols/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/samba/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/scsi/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/sound/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/usb/Makefile ])
AC_CONFIG_FILES([ doc/kinfocenter/xserver/Makefile ])
AC_CONFIG_FILES([ doc/kioslave/Makefile ])
AC_CONFIG_FILES([ doc/klipper/Makefile ])
AC_CONFIG_FILES([ doc/kmenuedit/Makefile ])
AC_CONFIG_FILES([ doc/konqueror/Makefile ])
AC_CONFIG_FILES([ doc/konsole/Makefile ])
AC_CONFIG_FILES([ doc/kpager/Makefile ])
AC_CONFIG_FILES([ doc/ksysguard/Makefile ])
AC_CONFIG_FILES([ doc/kwrite/Makefile ])
AC_CONFIG_FILES([ drkonqi/Makefile ])
AC_CONFIG_FILES([ drkonqi/debuggers/Makefile ])
AC_CONFIG_FILES([ drkonqi/pics/Makefile ])
AC_CONFIG_FILES([ drkonqi/presets/Makefile ])
AC_CONFIG_FILES([ kappfinder/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Development/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Editors/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Games/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Games/Arcade/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Games/Board/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Games/Card/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Games/Emulators/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Games/Roguelikes/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Games/TacticStrategy/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Graphics/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Internet/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Internet/Terminal/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Multimedia/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Office/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/System/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/System/Terminal/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Toys/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Utilities/Makefile ])
AC_CONFIG_FILES([ kappfinder/apps/Utilities/xutils/Makefile ])
AC_CONFIG_FILES([ kate/Makefile ])
AC_CONFIG_FILES([ kate/app/Makefile ])
AC_CONFIG_FILES([ kate/data/Makefile ])
AC_CONFIG_FILES([ kate/interfaces/Makefile ])
AC_CONFIG_FILES([ kate/lib/Makefile ])
AC_CONFIG_FILES([ kate/lib/utils/Makefile ])
AC_CONFIG_FILES([ kate/pics/Makefile ])
AC_CONFIG_FILES([ kate/pics/actions/Makefile ])
AC_CONFIG_FILES([ kate/pics/indicators/Makefile ])
AC_CONFIG_FILES([ kate/pics/tabicons/Makefile ])
AC_CONFIG_FILES([ kcheckpass/Makefile ])
AC_CONFIG_FILES([ kcontrol/Makefile ])
AC_CONFIG_FILES([ kcontrol/access/Makefile ])
AC_CONFIG_FILES([ kcontrol/arts/Makefile ])
AC_CONFIG_FILES([ kcontrol/background/Makefile ])
AC_CONFIG_FILES([ kcontrol/background/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/bell/Makefile ])
AC_CONFIG_FILES([ kcontrol/clock/Makefile ])
AC_CONFIG_FILES([ kcontrol/colors/Makefile ])
AC_CONFIG_FILES([ kcontrol/componentchooser/Makefile ])
AC_CONFIG_FILES([ kcontrol/componentchooser/componentservices/Makefile ])
AC_CONFIG_FILES([ kcontrol/crypto/Makefile ])
AC_CONFIG_FILES([ kcontrol/css/Makefile ])
AC_CONFIG_FILES([ kcontrol/ebrowsing/Makefile ])
AC_CONFIG_FILES([ kcontrol/ebrowsing/plugins/Makefile ])
AC_CONFIG_FILES([ kcontrol/ebrowsing/plugins/ikws/Makefile ])
AC_CONFIG_FILES([ kcontrol/ebrowsing/plugins/ikws/searchproviders/Makefile ])
AC_CONFIG_FILES([ kcontrol/ebrowsing/plugins/localdomain/Makefile ])
AC_CONFIG_FILES([ kcontrol/ebrowsing/plugins/shorturi/Makefile ])
AC_CONFIG_FILES([ kcontrol/email/Makefile ])
AC_CONFIG_FILES([ kcontrol/energy/Makefile ])
AC_CONFIG_FILES([ kcontrol/energy/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/fileshare/Makefile ])
AC_CONFIG_FILES([ kcontrol/filetypes/Makefile ])
AC_CONFIG_FILES([ kcontrol/fonts/Makefile ])
AC_CONFIG_FILES([ kcontrol/icons/Makefile ])
AC_CONFIG_FILES([ kcontrol/info/Makefile ])
AC_CONFIG_FILES([ kcontrol/input/Makefile ])
AC_CONFIG_FILES([ kcontrol/input/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/ioslaveinfo/Makefile ])
AC_CONFIG_FILES([ kcontrol/kcontrol/Makefile ])
AC_CONFIG_FILES([ kcontrol/kcontrol/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/kded/Makefile ])
AC_CONFIG_FILES([ kcontrol/kdm/Makefile ])
AC_CONFIG_FILES([ kcontrol/kdm/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/keys/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/kfile-plugin/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/kfontinst/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/kfontinst/docs/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/kfontinst/docs/en/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/other/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/other/StarOffice/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/thumbnail/Makefile ])
AC_CONFIG_FILES([ kcontrol/kfontinst/viewpart/Makefile ])
AC_CONFIG_FILES([ kcontrol/kicker/Makefile ])
AC_CONFIG_FILES([ kcontrol/kio/Makefile ])
AC_CONFIG_FILES([ kcontrol/kio/uasproviders/Makefile ])
AC_CONFIG_FILES([ kcontrol/knotify/Makefile ])
AC_CONFIG_FILES([ kcontrol/knotify/sounds/Makefile ])
AC_CONFIG_FILES([ kcontrol/konq/Makefile ])
AC_CONFIG_FILES([ kcontrol/konqhtml/Makefile ])
AC_CONFIG_FILES([ kcontrol/konsole/Makefile ])
AC_CONFIG_FILES([ kcontrol/krdb/Makefile ])
AC_CONFIG_FILES([ kcontrol/krdb/ad/Makefile ])
AC_CONFIG_FILES([ kcontrol/krdb/kcs/Makefile ])
AC_CONFIG_FILES([ kcontrol/krdb/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/launch/Makefile ])
AC_CONFIG_FILES([ kcontrol/locale/Makefile ])
AC_CONFIG_FILES([ kcontrol/locale/default/Makefile ])
AC_CONFIG_FILES([ kcontrol/locale/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/nics/Makefile ])
AC_CONFIG_FILES([ kcontrol/passwords/Makefile ])
AC_CONFIG_FILES([ kcontrol/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/samba/Makefile ])
AC_CONFIG_FILES([ kcontrol/screensaver/Makefile ])
AC_CONFIG_FILES([ kcontrol/screensaver/pics/Makefile ])
AC_CONFIG_FILES([ kcontrol/smartcard/Makefile ])
AC_CONFIG_FILES([ kcontrol/smserver/Makefile ])
AC_CONFIG_FILES([ kcontrol/spellchecking/Makefile ])
AC_CONFIG_FILES([ kcontrol/style/Makefile ])
AC_CONFIG_FILES([ kcontrol/taskbar/Makefile ])
AC_CONFIG_FILES([ kcontrol/thememgr/Makefile ])
AC_CONFIG_FILES([ kcontrol/usbview/Makefile ])
AC_CONFIG_FILES([ kdcop/Makefile ])
AC_CONFIG_FILES([ kdebugdialog/Makefile ])
AC_CONFIG_FILES([ kdeprint/Makefile ])
AC_CONFIG_FILES([ kdeprint/descriptions/Makefile ])
AC_CONFIG_FILES([ kdeprint/kdeprint_part/Makefile ])
AC_CONFIG_FILES([ kdeprint/kdeprintfax/Makefile ])
AC_CONFIG_FILES([ kdeprint/kjobviewer/Makefile ])
AC_CONFIG_FILES([ kdeprint/kprinter/Makefile ])
AC_CONFIG_FILES([ kdeprint/printmgr/Makefile ])
AC_CONFIG_FILES([ kdeprint/slave/Makefile ])
AC_CONFIG_FILES([ kdeprint/slave/mimetypes/Makefile ])
AC_CONFIG_FILES([ kdeprint/slave/pics/Makefile ])
AC_CONFIG_FILES([ kdeprint/slave/templates/Makefile ])
AC_CONFIG_FILES([ kdesktop/Makefile ])
AC_CONFIG_FILES([ kdesktop/init/Makefile ])
AC_CONFIG_FILES([ kdesktop/init/Templates/Makefile ])
AC_CONFIG_FILES([ kdesktop/kwebdesktop/Makefile ])
AC_CONFIG_FILES([ kdesktop/lock/Makefile ])
AC_CONFIG_FILES([ kdesktop/patterns/Makefile ])
AC_CONFIG_FILES([ kdesktop/pics/Makefile ])
AC_CONFIG_FILES([ kdesktop/programs/Makefile ])
AC_CONFIG_FILES([ kdesu/Makefile ])
AC_CONFIG_FILES([ kdesu/kdesu/Makefile ])
AC_CONFIG_FILES([ kdesu/kdesud/Makefile ])
AC_CONFIG_FILES([ kdialog/Makefile ])
AC_CONFIG_FILES([ kdm/Makefile ])
AC_CONFIG_FILES([ kdm/backend/Makefile ])
AC_CONFIG_FILES([ kdm/chooser/Makefile ])
AC_CONFIG_FILES([ kdm/kfrontend/Makefile ])
AC_CONFIG_FILES([ kdm/kfrontend/pics/Makefile ])
AC_CONFIG_FILES([ kfind/Makefile ])
AC_CONFIG_FILES([ kfind/pics/Makefile ])
AC_CONFIG_FILES([ khelpcenter/Makefile ])
AC_CONFIG_FILES([ khelpcenter/htmlsearch/Makefile ])
AC_CONFIG_FILES([ khelpcenter/pics/Makefile ])
AC_CONFIG_FILES([ khelpcenter/plugins/Makefile ])
AC_CONFIG_FILES([ khelpcenter/plugins/Applications/Makefile ])
AC_CONFIG_FILES([ khelpcenter/plugins/Manpages/Makefile ])
AC_CONFIG_FILES([ khelpcenter/plugins/Tutorials/Makefile ])
AC_CONFIG_FILES([ khotkeys/Makefile ])
AC_CONFIG_FILES([ khotkeys/kcontrol/Makefile ])
AC_CONFIG_FILES([ khotkeys/khotkeys/Makefile ])
AC_CONFIG_FILES([ khotkeys/shared/Makefile ])
AC_CONFIG_FILES([ kicker/Makefile ])
AC_CONFIG_FILES([ kicker/applets/Makefile ])
AC_CONFIG_FILES([ kicker/applets/clock/Makefile ])
AC_CONFIG_FILES([ kicker/applets/launcher/Makefile ])
AC_CONFIG_FILES([ kicker/applets/lockout/Makefile ])
AC_CONFIG_FILES([ kicker/applets/minipager/Makefile ])
AC_CONFIG_FILES([ kicker/applets/naughty/Makefile ])
AC_CONFIG_FILES([ kicker/applets/run/Makefile ])
AC_CONFIG_FILES([ kicker/applets/swallow/Makefile ])
AC_CONFIG_FILES([ kicker/applets/systemtray/Makefile ])
AC_CONFIG_FILES([ kicker/applets/taskbar/Makefile ])
AC_CONFIG_FILES([ kicker/buttons/Makefile ])
AC_CONFIG_FILES([ kicker/core/Makefile ])
AC_CONFIG_FILES([ kicker/data/Makefile ])
AC_CONFIG_FILES([ kicker/data/app_start_anim/Makefile ])
AC_CONFIG_FILES([ kicker/data/icons/Makefile ])
AC_CONFIG_FILES([ kicker/data/icons/actions/Makefile ])
AC_CONFIG_FILES([ kicker/data/kmenu_side/Makefile ])
AC_CONFIG_FILES([ kicker/data/tiles/Makefile ])
AC_CONFIG_FILES([ kicker/data/wallpaper/Makefile ])
AC_CONFIG_FILES([ kicker/extensions/Makefile ])
AC_CONFIG_FILES([ kicker/extensions/childpanel/Makefile ])
AC_CONFIG_FILES([ kicker/extensions/dockbar/Makefile ])
AC_CONFIG_FILES([ kicker/extensions/kasbar/Makefile ])
AC_CONFIG_FILES([ kicker/extensions/taskbar/Makefile ])
AC_CONFIG_FILES([ kicker/menuext/Makefile ])
AC_CONFIG_FILES([ kicker/menuext/kdeprint/Makefile ])
AC_CONFIG_FILES([ kicker/menuext/konsole/Makefile ])
AC_CONFIG_FILES([ kicker/menuext/prefmenu/Makefile ])
AC_CONFIG_FILES([ kicker/menuext/recentdocs/Makefile ])
AC_CONFIG_FILES([ kicker/proxy/Makefile ])
AC_CONFIG_FILES([ kicker/share/Makefile ])
AC_CONFIG_FILES([ kicker/taskbar/Makefile ])
AC_CONFIG_FILES([ kicker/taskmanager/Makefile ])
AC_CONFIG_FILES([ kicker/ui/Makefile ])
AC_CONFIG_FILES([ kioslave/Makefile ])
AC_CONFIG_FILES([ kioslave/about/Makefile ])
AC_CONFIG_FILES([ kioslave/cgi/Makefile ])
AC_CONFIG_FILES([ kioslave/cgi/kcmcgi/Makefile ])
AC_CONFIG_FILES([ kioslave/devices/Makefile ])
AC_CONFIG_FILES([ kioslave/devices/kdedmodule/Makefile ])
AC_CONFIG_FILES([ kioslave/devices/mimetypes/Makefile ])
AC_CONFIG_FILES([ kioslave/devices/mounthelper/Makefile ])
AC_CONFIG_FILES([ kioslave/filter/Makefile ])
AC_CONFIG_FILES([ kioslave/finger/Makefile ])
AC_CONFIG_FILES([ kioslave/fish/Makefile ])
AC_CONFIG_FILES([ kioslave/floppy/Makefile ])
AC_CONFIG_FILES([ kioslave/imap4/Makefile ])
AC_CONFIG_FILES([ kioslave/info/Makefile ])
AC_CONFIG_FILES([ kioslave/ldap/Makefile ])
AC_CONFIG_FILES([ kioslave/mac/Makefile ])
AC_CONFIG_FILES([ kioslave/man/Makefile ])
AC_CONFIG_FILES([ kioslave/nfs/Makefile ])
AC_CONFIG_FILES([ kioslave/nntp/Makefile ])
AC_CONFIG_FILES([ kioslave/pop3/Makefile ])
AC_CONFIG_FILES([ kioslave/sftp/Makefile ])
AC_CONFIG_FILES([ kioslave/smb/Makefile ])
AC_CONFIG_FILES([ kioslave/smbro/Makefile ])
AC_CONFIG_FILES([ kioslave/smtp/Makefile ])
AC_CONFIG_FILES([ kioslave/tar/Makefile ])
AC_CONFIG_FILES([ kioslave/thumbnail/Makefile ])
AC_CONFIG_FILES([ kioslave/zip/Makefile ])
AC_CONFIG_FILES([ klipper/Makefile ])
AC_CONFIG_FILES([ kmenuedit/Makefile ])
AC_CONFIG_FILES([ kmenuedit/pixmaps/Makefile ])
AC_CONFIG_FILES([ konqueror/Makefile ])
AC_CONFIG_FILES([ konqueror/about/Makefile ])
AC_CONFIG_FILES([ konqueror/client/Makefile ])
AC_CONFIG_FILES([ konqueror/iconview/Makefile ])
AC_CONFIG_FILES([ konqueror/keditbookmarks/Makefile ])
AC_CONFIG_FILES([ konqueror/kfmexec/Makefile ])
AC_CONFIG_FILES([ konqueror/listview/Makefile ])
AC_CONFIG_FILES([ konqueror/pics/Makefile ])
AC_CONFIG_FILES([ konqueror/pics/actions/Makefile ])
AC_CONFIG_FILES([ konqueror/pics/indicators/Makefile ])
AC_CONFIG_FILES([ konqueror/pics/tiles/Makefile ])
AC_CONFIG_FILES([ konqueror/shellcmdplugin/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/test/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/bookmark_module/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/dirtree_module/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/history_module/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/init/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/init/remote/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/init/remote/ftp/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/init/remote/web/Makefile ])
AC_CONFIG_FILES([ konqueror/sidebar/trees/init/services/Makefile ])
AC_CONFIG_FILES([ konsole/Makefile ])
AC_CONFIG_FILES([ konsole/doc/Makefile ])
AC_CONFIG_FILES([ konsole/doc/VT100/Makefile ])
AC_CONFIG_FILES([ konsole/fonts/Makefile ])
AC_CONFIG_FILES([ konsole/konsole/Makefile ])
AC_CONFIG_FILES([ konsole/other/Makefile ])
AC_CONFIG_FILES([ kpager/Makefile ])
AC_CONFIG_FILES([ kpersonalizer/Makefile ])
AC_CONFIG_FILES([ kpersonalizer/pics/Makefile ])
AC_CONFIG_FILES([ kreadconfig/Makefile ])
AC_CONFIG_FILES([ krichtexteditor/Makefile ])
AC_CONFIG_FILES([ kscreensaver/Makefile ])
AC_CONFIG_FILES([ ksmserver/Makefile ])
AC_CONFIG_FILES([ ksplash/Makefile ])
AC_CONFIG_FILES([ ksplash/pics/Makefile ])
AC_CONFIG_FILES([ ksplash/pics/locolor/Makefile ])
AC_CONFIG_FILES([ kstart/Makefile ])
AC_CONFIG_FILES([ ksysguard/Makefile ])
AC_CONFIG_FILES([ ksysguard/CContLib/Makefile ])
AC_CONFIG_FILES([ ksysguard/example/Makefile ])
AC_CONFIG_FILES([ ksysguard/gui/Makefile ])
AC_CONFIG_FILES([ ksysguard/gui/SensorDisplayLib/Makefile ])
AC_CONFIG_FILES([ ksysguard/gui/ksgrd/Makefile ])
AC_CONFIG_FILES([ ksysguard/ksysguardd/Makefile ])
AC_CONFIG_FILES([ ksysguard/ksysguardd/FreeBSD/Makefile ])
AC_CONFIG_FILES([ ksysguard/ksysguardd/Irix/Makefile ])
AC_CONFIG_FILES([ ksysguard/ksysguardd/Linux/Makefile ])
AC_CONFIG_FILES([ ksysguard/ksysguardd/NetBSD/Makefile ])
AC_CONFIG_FILES([ ksysguard/ksysguardd/Solaris/Makefile ])
AC_CONFIG_FILES([ ksysguard/ksysguardd/Tru64/Makefile ])
AC_CONFIG_FILES([ ksysguard/pics/Makefile ])
AC_CONFIG_FILES([ ksystraycmd/Makefile ])
AC_CONFIG_FILES([ ktip/Makefile ])
AC_CONFIG_FILES([ ktip/pics/Makefile ])
AC_CONFIG_FILES([ kwin/Makefile ])
AC_CONFIG_FILES([ kwin/clients/Makefile ])
AC_CONFIG_FILES([ kwin/clients/b2/Makefile ])
AC_CONFIG_FILES([ kwin/clients/b2/config/Makefile ])
AC_CONFIG_FILES([ kwin/clients/default/Makefile ])
AC_CONFIG_FILES([ kwin/clients/default/config/Makefile ])
AC_CONFIG_FILES([ kwin/clients/icewm/Makefile ])
AC_CONFIG_FILES([ kwin/clients/icewm/config/Makefile ])
AC_CONFIG_FILES([ kwin/clients/icewm/icewm-themes/Makefile ])
AC_CONFIG_FILES([ kwin/clients/kde1/Makefile ])
AC_CONFIG_FILES([ kwin/clients/keramik/Makefile ])
AC_CONFIG_FILES([ kwin/clients/keramik/config/Makefile ])
AC_CONFIG_FILES([ kwin/clients/kstep/Makefile ])
AC_CONFIG_FILES([ kwin/clients/kwmtheme/Makefile ])
AC_CONFIG_FILES([ kwin/clients/kwmtheme/cli_installer/Makefile ])
AC_CONFIG_FILES([ kwin/clients/laptop/Makefile ])
AC_CONFIG_FILES([ kwin/clients/modernsystem/Makefile ])
AC_CONFIG_FILES([ kwin/clients/modernsystem/config/Makefile ])
AC_CONFIG_FILES([ kwin/clients/quartz/Makefile ])
AC_CONFIG_FILES([ kwin/clients/quartz/config/Makefile ])
AC_CONFIG_FILES([ kwin/clients/redmond/Makefile ])
AC_CONFIG_FILES([ kwin/clients/riscos/Makefile ])
AC_CONFIG_FILES([ kwin/clients/system/Makefile ])
AC_CONFIG_FILES([ kwin/clients/web/Makefile ])
AC_CONFIG_FILES([ kwin/kcmkwin/Makefile ])
AC_CONFIG_FILES([ kwin/kcmkwin/kwindecoration/Makefile ])
AC_CONFIG_FILES([ kwin/kcmkwin/kwinoptions/Makefile ])
AC_CONFIG_FILES([ kwin/pics/Makefile ])
AC_CONFIG_FILES([ kxkb/Makefile ])
AC_CONFIG_FILES([ kxkb/pics/Makefile ])
AC_CONFIG_FILES([ l10n/Makefile ])
AC_CONFIG_FILES([ legacyimport/Makefile ])
AC_CONFIG_FILES([ libkonq/Makefile ])
AC_CONFIG_FILES([ libkonq/favicons/Makefile ])
AC_CONFIG_FILES([ libkonq/pics/Makefile ])
AC_CONFIG_FILES([ nsplugins/Makefile ])
AC_CONFIG_FILES([ nsplugins/test/Makefile ])
AC_CONFIG_FILES([ nsplugins/viewer/Makefile ])
AC_CONFIG_FILES([ nsplugins/wrapper/Makefile ])
AC_CONFIG_FILES([ pics/Makefile ])
AC_CONFIG_FILES([ pics/crystalsvg/Makefile ])
AC_CONFIG_FILES([ pics/wallpapers/Makefile ])
AC_OUTPUT
if test "$have_libsmbclient" = no; then
  echo ""
  echo "You're missing libsmbclient from samba 3.0"
  echo "KDE will use a wrapper for smbclient without it,"
  echo "consider installing it."
  echo "Look at kioslave/smb/libsmbclient-HOWTO.txt"
  echo ""
  all_tests=bad
fi
dnl put here things which have to be done as very last part of configure

if test "x$with_motif" != xyes; then
  echo ""
  echo "You're missing OSF/Motif or LessTif."
  echo "KDE won't be able to use Netscape plugins without it, so you should"
  echo "consider installing it."
  echo "Have a look at http://www.lesstif.org, or find a binary package for"
  echo "your platform."
  echo ""
  all_tests=bad
fi

if test "$cdparanoia_only_static" = yes; then
  echo ""
  echo "KDE needs a shared version of the cdparanoia libs, but only"
  echo "a static one was found.  Look at http://www.xiph.org/paranoia/"
  echo "and be sure to configure that package with --enable-shared when"
  echo "compiling from source."
  echo ""
  all_tests=bad
fi

if test "$lame_wrong_version" = yes; then
  echo ""
  echo "You have liblame, but it's of a wrong version.  KDE needs at least"
  echo "version 3.89 (alpha or beta)."
  echo "Have a look at http://www.mp3dev.org/ ."
  echo ""
  all_tests=bad
fi

if test -z "$FONTINST_SUBDIR"; then
  echo ""
  echo "KFontInstall control module got disabled from compilation"
  echo "because of missing FreeType 2.x libraries/headers."
  echo "You can download the freetype library from http://www.freetype.org/."
  echo ""
  all_tests=bad
fi
if test "$all_tests" = "bad"; then
  if test ! "$cache_file" = "/dev/null"; then
    echo ""    
    echo "Please remove the file $cache_file after changing your setup"
    echo "so that configure will find the changes next time."
    echo ""
  fi
else
  echo ""
  echo "Good - your configure finished. Start make now"
  echo ""
fi
