dnl =======================================================
dnl FILE: ./admin/configure.in.min
dnl =======================================================

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., 51 Franklin Street, Fifth Floor,
dnl    Boston, MA 02110-1301, 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(kdesdk, "3.5.7") 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
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================

#MIN_CONFIG
KDE_ENABLE_HIDDEN_VISIBILITY

DO_NOT_COMPILE="$DO_NOT_COMPILE kappgen kstartperf"
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
dnl =======================================================
dnl FILE: ./kbabel/configure.in.in
dnl =======================================================

AM_PROG_LEX

AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER(FlexLexer.h,
  [kde_have_flex=yes],
  [kde_have_flex=no])

if test "$kde_have_flex" = "no"; then
  DO_NOT_COMPILE="$DO_NOT_COMPILE kbabel"
fi
AC_LANG_RESTORE
dnl =======================================================
dnl FILE: ./kbabel/kbabeldict/modules/dbsearchengine/configure.in.in
dnl =======================================================

AC_ARG_WITH(berkeley-db,
  [AC_HELP_STRING(--with-berkeley-db,
    [enable the dictionary plugin based on Berkeley DB IV @<:@default=check@:>@])],
  [], with_berkeley_db=check)

LIB_DBIV=""
if test "x$with_berkeley_db" != xno; then

AC_MSG_CHECKING([for Berkeley Database IV])

db_libraries=""
db_includes=""
db_name=""
ac_db_name="db"
ac_db_includes=""
ac_db_libraries=""
ac_db_include_file="db.h"

AC_ARG_WITH(db-dir,
    AC_HELP_STRING([--with-db-dir=DIR],[where the root of Berkeley DB IV is installed]),
    [  ac_db_includes=-I"$withval"/include
       ac_db_libraries=-L"$withval"/lib
    ])
AC_ARG_WITH(db-include-dir,
    AC_HELP_STRING([--with-db-include-dir=DIR],[where the includes of Berkeley DB IV are installed]),
    [  ac_db_includes=-I"$withval"
    ])
AC_ARG_WITH(db-include,
    AC_HELP_STRING([--with-db-include=FILE],[path to the Berkeley DB IV header file]),
    [  ac_db_include_file=-I"$withval"
    ])
AC_ARG_WITH(db-lib-dir,
    AC_HELP_STRING([--with-db-lib-dir=DIR],[where the libs of Berkeley DB IV are installed]),
    [  ac_db_libraries=-L"$withval"
    ])
AC_ARG_WITH(db-name,
    AC_HELP_STRING([--with-db-name=NAME],[name of the Berkeley DB IV library (default db)]),
    [  ac_db_name="$withval"
    ])

AC_DEFUN([KDE_CHECK_DB_VERSION],
[
ifelse($3,,,[LIBS="$kde_db_safe -l$3"])
AC_TRY_LINK([
#include <$2>
],
[
#if DB_VERSION_MAJOR == 4
DB *db;
#if DB_VERSION_MINOR > 0
db->open( db, NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0644 );
#else
db->open( db, "test.db", NULL, DB_BTREE, DB_CREATE, 0644 );
#endif
#else
error
#endif
],
kde_cv_berk_database=$1
)
])

AC_CACHE_VAL(kde_cv_berk_database,
[
kde_safe_LDFLAGS=$LDFLAGS
kde_db_safe_LIBS=$LIBS
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $all_libraries $ac_db_libraries $all_includes $ac_db_includes"

kde_cv_berk_database=NO
if test "xNO" = "x$kde_cv_berk_database" ; then
	KDE_CHECK_DB_VERSION($ac_db_name, $ac_db_include_file, $ac_db_name)
fi
if test "xNO" = "x$kde_cv_berk_database" ; then
	KDE_CHECK_DB_VERSION(db4, db4/db.h, db4)
fi
if test "xNO" = "x$kde_cv_berk_database" ; then
	KDE_CHECK_DB_VERSION(db4-db, db.h, db4)
fi
if test "xNO" = "x$kde_cv_berk_database" ; then
	KDE_CHECK_DB_VERSION(db, db.h, db)
fi

LIBS=$kde_db_safe_LIBS
LDFLAGS=$kde_safe_LDFLAGS

])

kde_db_header=""
DBSEARCHENGINE=dbsearchengine

case "$kde_cv_berk_database" in
 NO)
   AC_MSG_RESULT(no)
   LIB_DBIV=""
   DBSEARCHENGINE=""
   ;;
 db)
   LIB_DBIV="-l$ac_db_name"
   kde_db_header=db.h
   AC_MSG_RESULT(-l$ac_db_name)   
   AC_DEFINE_UNQUOTED(HAVE_DB_DB_H, 1, [DB 4 header location] )
   ;;
 db4-db)
   LIB_DBIV='-ldb4'
   kde_db_header=db.h
   AC_MSG_RESULT("flag is -ldb4 and header is db.h")   
   AC_DEFINE_UNQUOTED(HAVE_DB_DB_H, 1, [DB 4 header location] )
   ;;
 db4)
   LIB_DBIV='-ldb4'
   kde_db_header=db4/db.h
   AC_MSG_RESULT(-ldb4) 
   AC_DEFINE_UNQUOTED(HAVE_DB4_DB_H, 1, [DB 4 header location] )
   ;;
 $ac_db_name)
   LIB_DBIV="-l$ac_db_name"
   kde_db_header="$ac_db_include_file"
   AC_MSG_RESULT(user specified $ac_db_name)
   if test "x$ac_db_include_file" = "xdb.h" ; then
       AC_DEFINE_UNQUOTED(HAVE_DB_DB_H, 1, [DB 4 header location] )
   else
       AC_DEFINE_UNQUOTED(USE_DB_H_PATH, <$ac_db_include_file>, [DB 4 header path])
   fi

   ;;
esac

DBIV_LDFLAGS="$ac_db_libraries"
DBIV_INCLUDES="$ac_db_includes"
DBIV_NAME="$ac_db_name"

if test "x$with_berkeley_db" != xcheck && test -z "$LIB_DBIV"; then
  AC_MSG_ERROR([--with-berkeley-db was given, but test for Berkeley DB IV failed])
fi
fi

AC_SUBST(DBIV_INCLUDES)
AC_SUBST(DBIV_LDFLAGS)
AC_SUBST(DBIV_NAME)

AC_SUBST(LIB_DBIV) 

AM_CONDITIONAL(include_DBSEARCHENGINE, test -n "$DBSEARCHENGINE")
dnl =======================================================
dnl FILE: ./kbugbuster/configure.in.in
dnl =======================================================

AC_DEFUN([KBUGBUSTER_CHECK_KCAL],[HAVE_KCAL=0
KDE_CHECK_HEADER(libkcal/resourcecalendar.h,HAVE_KCAL=1,
 AC_MSG_WARN([Unable to find libkcal. The Bugzilla todo list \
 resource for KOrganizer won't be compiled.]))
AM_CONDITIONAL(include_kcalresource, test "$HAVE_KCAL" = 1)
])

KBUGBUSTER_CHECK_KCAL
dnl =======================================================
dnl FILE: ./kcachegrind/configure.in.in
dnl =======================================================

KCACHEGRIND_VERSION=0.4.6kde
AC_SUBST(KCACHEGRIND_VERSION)

AC_FUNC_MMAP

dnl AC_OUTPUT( kcachegrind/version.h )
dnl AC_OUTPUT( kcachegrind/kcachegrind.spec )
dnl AC_OUTPUT( kcachegrind/kcachegrind.lsm )
dnl =======================================================
dnl FILE: ./kioslave/svn/configure.in.in
dnl =======================================================

AC_ARG_WITH(subversion,
  [AC_HELP_STRING(--with-subversion,
    [enable support for subversion @<:@default=check@:>@])],
  [], with_subversion=check)

SVN_SUBDIR=""
if test "x$with_subversion" != xno; then

APR_CONFIGS="apr-config /usr/local/apr/bin/apr-config"
SVN_SUBDIR="svn"
AC_ARG_WITH(apr-config,
[[  --with-apr-config=FILE    Use the given path to apr-config when determining
                            APR configuration; defaults to "apr-config"]],
[
    if test "$withval" != "yes" -a "$withval" != ""; then
        APR_CONFIGS=$withval
    fi
])
AC_MSG_CHECKING([for APR])
APR_CONFIG=""
for VALUE in $APR_CONFIGS ; do
	if $VALUE --cflags > /dev/null; then
		APR_CONFIG=$VALUE
		break
	fi
done
test $VALUE && APR_CONFIG=$VALUE
if test $APR_CONFIG ; then
    AC_MSG_RESULT([found])
else
    AC_MSG_RESULT([not found])
	SVN_SUBDIR=
dnl    AC_MSG_ERROR([APR is required. Try --with-apr-config.])
fi
	
APR_CPPFLAGS="`$APR_CONFIG --cppflags`"
APR_INCLUDE="`$APR_CONFIG --includes`"
APR_LIBS="`$APR_CONFIG --link-ld --libs`"

dnl
dnl APR util
dnl

APU_CONFIGS="apu-config /usr/local/apr/bin/apu-config"
AC_ARG_WITH(apu-config,
[[  --with-apu-config=FILE    Use the given path to apu-config when determining
                            APR util configuration; defaults to "apu-config"]],
[
    if test "$withval" != "yes" -a "$withval" != ""; then
        APU_CONFIGS=$withval
    fi
])
AC_MSG_CHECKING([for APR util])
APU_CONFIG=""
for VALUE in $APU_CONFIGS ; do
	if $VALUE --includes > /dev/null; then
		APU_CONFIG=$VALUE
		break
	fi
done
if test $APU_CONFIG ; then
    AC_MSG_RESULT([found])
else
    AC_MSG_RESULT([not found])
	SVN_SUBDIR=
dnl    AC_MSG_ERROR([APR util is required. Try --with-apu-config.])
fi
dnl APR_CPPFLAGS="$APR_CPPFLAGS `$APU_CONFIG --includes`"
APR_INCLUDE="$APR_INCLUDE `$APU_CONFIG --includes`"
APR_LIBS="$APR_LIBS `$APU_CONFIG --link-ld --libs`"

AC_MSG_CHECKING(for Subversion svn-config)
AC_ARG_WITH(subversion-dir,
	 [  --with-subversion-dir=DIR           where Subversion is installed ],
	 [
		 SVNCONFIG="$withval/bin/svn-config"
	])

if test -z "$SVNCONFIG"; then
	_SVNCONFIG="`svn-config --prefix 2> /dev/null`"
	if test -n "$_SVNCONFIG"; then
		SVNCONFIG="$_SVNCONFIG/bin/svn-config"
	fi
fi

AC_SUBST(SVNCONFIG)
if test -x "$SVNCONFIG"; then
	SVNLD="`$SVNCONFIG --ldflags`"
	SVN_LIB="`$SVNCONFIG --libs` -lsvn_client-1"
	SVN_CPPFLAGS="`$SVNCONFIG --cppflags`"
	dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
	SVN_INCLUDE="`$SVNCONFIG --includes` -I$_SVNCONFIG/include/subversion-1/"
	AC_MSG_RESULT(yes)
else
	AC_MSG_RESULT(not found)
	SVNLD=""
	dnl just a fallback to debian's config so that it works for me :)
	SVN_INCLUDES="/usr/local/include /usr/include"
	AC_ARG_WITH(svn-include,
				[[  --with-svn-include=DIR   Use the given path to the subversion headers.]],
				[
				 if test "$withval" != "yes" -a "$withval" != ""; then
					 SVN_INCLUDES=$withval
				 fi
				 ])
	AC_MSG_CHECKING([for Subversion headers])
	SVN_INCLUDE=""
	for VALUE in $SVN_INCLUDES ; do
		if test -f $VALUE/subversion-1/svn_types.h ; then
			SVN_INCLUDE="-I$VALUE"
			break
		fi
	done
	if test $SVN_INCLUDE ; then
		AC_MSG_RESULT([found])
	else
		AC_MSG_RESULT([not found])
		SVN_SUBDIR=
dnl		AC_MSG_ERROR([Subversion headers are required. Try --with-svn-include.])
	fi
	SVN_LIBS="/usr/local/lib /usr/lib /usr/lib64"
	AC_ARG_WITH(svn-lib,
			[[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
			[
			     if test "$withval" != "yes" -a "$withval" != ""; then
			         SVN_LIBS=$withval
			     fi
			 ])
	AC_MSG_CHECKING([for Subversion libraries])
	SVN_LIB=""
	for VALUE in $SVN_LIBS ; do
		if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
			SVN_LIB="-L$VALUE"
			break
		fi
	done
	if test $SVN_LIB ; then
		AC_MSG_RESULT([found])
	else
		AC_MSG_RESULT([not found])
		SVN_SUBDIR=
	fi
fi
SVN_LIB="$SVN_LIB $APR_LIBS -lsvn_client-1"
SVN_INCLUDE="$SVN_INCLUDE $APR_INCLUDE"
SVN_CPPFLAGS="$APR_CPPFLAGS $SVN_CPPFLAGS"

if test "x$with_subversion" != xcheck && test -z "$SVN_SUBDIR"; then
  AC_MSG_ERROR([--with-subversion was given, but test for subversion failed])
fi
fi

AC_SUBST(SVN_INCLUDE)
AC_SUBST(SVN_LIB)
AC_SUBST(SVN_CPPFLAGS)
AC_SUBST(SVNLD)
AM_CONDITIONAL(include_kioslave_svn, test -n "$SVN_SUBDIR")
dnl =======================================================
dnl FILE: ./kmtrace/configure.in.in
dnl =======================================================

dnl AC_OUTPUT( kmtrace/kminspector )

case "$host" in
   *-gnu)
      saved_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-Bstatic -liberty -Wl,-Bdynamic"
      AC_TRY_LINK([], [], [kde_compile_kmtrace=$GCC], [kde_compile_kmtrace=no])
      AC_SUBST(KMTRACE_LIBS, [$LIBS])
      LIBS="$saved_LIBS"
      ;;
   *)
      kde_compile_kmtrace=no
      ;;
esac

if test ! "x$kde_compile_kmtrace" = "xyes"; then
   DO_NOT_COMPILE="$DO_NOT_COMPILE kmtrace"
fi
dnl =======================================================
dnl FILE: ./umbrello/configure.in.in
dnl =======================================================

AC_LANG_SAVE
AC_LANG_CPLUSPLUS

dnl Not GPL compatible
dnl AC_PATH_PROG(DOT_FOUND, dot, no)
dnl KDE_CHECK_HEADER(graphviz/pathgeom.h,
dnl   [kde_have_graphviz=yes],
dnl   [kde_have_graphviz=no])
dnl  
dnl if test "$DOT_FOUND" != "no" -a "$kde_have_graphviz" = "yes"; then
dnl   CXXFLAGS="$CXXFLAGS -DHAVE_DOT"
dnl   GRAPHVIZ_LIB=`pkg-config --libs libgraph`
dnl   AUTOLAYOUT_DIR="autolayout"
dnl   AUTOLAYOUT_LIBS="autolayout/libautolayout.la $GRAPHVIZ_LIB -ldotgen -lgvc"
dnl else
dnl   AUTOLAYOUT_DIR=""
dnl   AUTOLAYOUT_LIBS=""
dnl fi
dnl AC_SUBST(AUTOLAYOUT_DIR)
dnl AC_SUBST(AUTOLAYOUT_LIBS)
dnl End of Not GPL compatible

AC_LANG_RESTORE


AC_CHECK_FUNCS(setenv)

dnl AH_BOTTOM(
dnl [#if !defined(HAVE_SETENV)
dnl #ifdef __cplusplus
dnl extern "C"
dnl #endif
dnl int setenv(const char *name, const char *value, int overwrite);
dnl #endif
dnl ])

HAVE_XSLT=yes

KDE_FIND_PATH(xml2-config, XML_CONFIG, [${prefix}/bin ${exec_prefix}/bin], [
  AC_MSG_WARN([Could not find libxml2 anywhere, check ftp://xmlsoft.org/ for libxml >= 2.4.8. (we also keep a version of it in kdesupport for CVS users' convience)])
  HELP_SUBDIR=
  DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
])

if test -n "$XML_CONFIG"; then
  vers=`$XML_CONFIG --version 2>/dev/null | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  if test -n "$vers" && test "$vers" -ge 2004008
  then
     LIBXML_LIBS="`$XML_CONFIG --libs`"
     LIBXML_RPATH=
     for args in $LIBXML_LIBS; do
	  case $args in
	    -L*)
  	       LIBXML_RPATH="$LIBXML_RPATH $args"
 	       ;;
          esac
     done
     LIBXML_RPATH=`echo $LIBXML_RPATH | sed -e "s/-L/-R/g"`
     LIBXML_CFLAGS="`$XML_CONFIG --cflags`"

     KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
     AC_DEFINE_UNQUOTED(XMLLINT, "$XMLLINT", [Defines the executable of xmllint])
  else
     AC_MSG_WARN([You need at least libxml 2.4.8])
     HAVE_XSLT=no     
     DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
  fi
fi

if test "$HAVE_XSLT" = yes; then

  KDE_FIND_PATH(xslt-config, XSLT_CONFIG, [${prefix}/bin ${exec_prefix}/bin], [
    AC_MSG_WARN([Could not find libxslt anywhere, check ftp://xmlsoft.org/ for libxslt >= 1.0.7. (we also keep a version of it in kdesupport for CVS users' convience)])
    HAVE_XSLT=no 
    DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
  ])

  if test -n "$XSLT_CONFIG"; then
     vers=`$XSLT_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
     if test -n "$vers" && test "$vers" -ge 1000007; then
       LIBXSLT_LIBS="`$XSLT_CONFIG --libs`"
       LIBXSLT_RPATH=
       for args in $LIBXSLT_LIBS; do
	  case $args in
	    -L*)
  	       LIBXSLT_RPATH="$LIBXSLT_RPATH $args"
 	       ;;
          esac
       done
       LIBXSLT_RPATH=`echo $LIBXSLT_RPATH | sed -e "s/-L/-R/g"`
       LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"

     else
       AC_MSG_WARN([You need at least libxslt 1.0.7])
       HAVE_XSLT=no
       DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
     fi
  fi
fi

if test "$have_libxslt" = "no"; then
  DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
fi

AC_SUBST(LIBXSLT_LIBS)
AC_SUBST(LIBXSLT_CFLAGS)
AC_SUBST(LIBXSLT_RPATH)

AC_SUBST(LIBXML_LIBS)
AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_RPATH)

KDE_CREATE_SUBDIRSLIST
AM_CONDITIONAL(cervisia_SUBDIR_included, test "x$cervisia_SUBDIR_included" = xyes)
AM_CONDITIONAL(doc_SUBDIR_included, test "x$doc_SUBDIR_included" = xyes)
AM_CONDITIONAL(kapptemplate_SUBDIR_included, test "x$kapptemplate_SUBDIR_included" = xyes)
AM_CONDITIONAL(kbabel_SUBDIR_included, test "x$kbabel_SUBDIR_included" = xyes)
AM_CONDITIONAL(kbugbuster_SUBDIR_included, test "x$kbugbuster_SUBDIR_included" = xyes)
AM_CONDITIONAL(kcachegrind_SUBDIR_included, test "x$kcachegrind_SUBDIR_included" = xyes)
AM_CONDITIONAL(kdeaccounts_plugin_SUBDIR_included, test "x$kdeaccounts_plugin_SUBDIR_included" = xyes)
AM_CONDITIONAL(kfile_plugins_SUBDIR_included, test "x$kfile_plugins_SUBDIR_included" = xyes)
AM_CONDITIONAL(kioslave_SUBDIR_included, test "x$kioslave_SUBDIR_included" = xyes)
AM_CONDITIONAL(kmtrace_SUBDIR_included, test "x$kmtrace_SUBDIR_included" = xyes)
AM_CONDITIONAL(kompare_SUBDIR_included, test "x$kompare_SUBDIR_included" = xyes)
AM_CONDITIONAL(kprofilemethod_SUBDIR_included, test "x$kprofilemethod_SUBDIR_included" = xyes)
AM_CONDITIONAL(kspy_SUBDIR_included, test "x$kspy_SUBDIR_included" = xyes)
AM_CONDITIONAL(kstartperf_SUBDIR_included, test "x$kstartperf_SUBDIR_included" = xyes)
AM_CONDITIONAL(kuiviewer_SUBDIR_included, test "x$kuiviewer_SUBDIR_included" = xyes)
AM_CONDITIONAL(kunittest_SUBDIR_included, test "x$kunittest_SUBDIR_included" = xyes)
AM_CONDITIONAL(poxml_SUBDIR_included, test "x$poxml_SUBDIR_included" = xyes)
AM_CONDITIONAL(scheck_SUBDIR_included, test "x$scheck_SUBDIR_included" = xyes)
AM_CONDITIONAL(scripts_SUBDIR_included, test "x$scripts_SUBDIR_included" = xyes)
AM_CONDITIONAL(umbrello_SUBDIR_included, test "x$umbrello_SUBDIR_included" = xyes)
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ cervisia/Makefile ])
AC_CONFIG_FILES([ cervisia/cvsservice/Makefile ])
AC_CONFIG_FILES([ cervisia/pics/Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ doc/cervisia/Makefile ])
AC_CONFIG_FILES([ doc/kapptemplate/Makefile ])
AC_CONFIG_FILES([ doc/kbabel/Makefile ])
AC_CONFIG_FILES([ doc/kbugbuster/Makefile ])
AC_CONFIG_FILES([ doc/kcachegrind/Makefile ])
AC_CONFIG_FILES([ doc/kompare/Makefile ])
AC_CONFIG_FILES([ doc/scripts/Makefile ])
AC_CONFIG_FILES([ doc/scripts/kdesvn-build/Makefile ])
AC_CONFIG_FILES([ doc/umbrello/Makefile ])
AC_CONFIG_FILES([ kapptemplate/Makefile ])
AC_CONFIG_FILES([ kapptemplate/admin/Makefile ])
AC_CONFIG_FILES([ kapptemplate/appframework/Makefile ])
AC_CONFIG_FILES([ kapptemplate/appframework/no-exe/Makefile ])
AC_CONFIG_FILES([ kapptemplate/existing/Makefile ])
AC_CONFIG_FILES([ kapptemplate/kapp/Makefile ])
AC_CONFIG_FILES([ kapptemplate/kapp/no-exe/Makefile ])
AC_CONFIG_FILES([ kapptemplate/kpartapp/Makefile ])
AC_CONFIG_FILES([ kapptemplate/kpartapp/no-exe/Makefile ])
AC_CONFIG_FILES([ kapptemplate/kpartplugin/Makefile ])
AC_CONFIG_FILES([ kapptemplate/kpartplugin/no-exe/Makefile ])
AC_CONFIG_FILES([ kbabel/Makefile ])
AC_CONFIG_FILES([ kbabel/addons/Makefile ])
AC_CONFIG_FILES([ kbabel/addons/kfile-plugins/Makefile ])
AC_CONFIG_FILES([ kbabel/addons/preview/Makefile ])
AC_CONFIG_FILES([ kbabel/catalogmanager/Makefile ])
AC_CONFIG_FILES([ kbabel/catalogmanager/icons/Makefile ])
AC_CONFIG_FILES([ kbabel/catalogmanager/libcvs/Makefile ])
AC_CONFIG_FILES([ kbabel/catalogmanager/libsvn/Makefile ])
AC_CONFIG_FILES([ kbabel/common/Makefile ])
AC_CONFIG_FILES([ kbabel/common/libgettext/Makefile ])
AC_CONFIG_FILES([ kbabel/commonui/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/accelerators/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/arguments/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/context/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/equations/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/length/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/not-translated/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/pluralforms/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/punctuation/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/regexp/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/setfuzzy/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/whitespace/Makefile ])
AC_CONFIG_FILES([ kbabel/datatools/xml/Makefile ])
AC_CONFIG_FILES([ kbabel/filters/Makefile ])
AC_CONFIG_FILES([ kbabel/filters/gettext/Makefile ])
AC_CONFIG_FILES([ kbabel/filters/linguist/Makefile ])
AC_CONFIG_FILES([ kbabel/filters/xliff/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabel/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabel/icons/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabel/pics/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabeldict/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabeldict/modules/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabeldict/modules/dbsearchengine/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabeldict/modules/dbsearchengine2/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabeldict/modules/poauxiliary/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabeldict/modules/pocompendium/Makefile ])
AC_CONFIG_FILES([ kbabel/kbabeldict/modules/tmx/Makefile ])
AC_CONFIG_FILES([ kbugbuster/Makefile ])
AC_CONFIG_FILES([ kbugbuster/backend/Makefile ])
AC_CONFIG_FILES([ kbugbuster/gui/Makefile ])
AC_CONFIG_FILES([ kbugbuster/kresources/Makefile ])
AC_CONFIG_FILES([ kbugbuster/pics/Makefile ])
AC_CONFIG_FILES([ kcachegrind/Makefile ])
AC_CONFIG_FILES([ kcachegrind/converters/Makefile ])
AC_CONFIG_FILES([ kcachegrind/kcachegrind/Makefile ])
AC_CONFIG_FILES([ kcachegrind/pics/Makefile ])
AC_CONFIG_FILES([ kcachegrind/pics/hicolor/Makefile ])
AC_CONFIG_FILES([ kdeaccounts-plugin/Makefile ])
AC_CONFIG_FILES([ kfile-plugins/Makefile ])
AC_CONFIG_FILES([ kfile-plugins/c++/Makefile ])
AC_CONFIG_FILES([ kfile-plugins/diff/Makefile ])
AC_CONFIG_FILES([ kfile-plugins/ts/Makefile ])
AC_CONFIG_FILES([ kioslave/Makefile ])
AC_CONFIG_FILES([ kioslave/svn/Makefile ])
AC_CONFIG_FILES([ kioslave/svn/icons/Makefile ])
AC_CONFIG_FILES([ kioslave/svn/ksvnd/Makefile ])
AC_CONFIG_FILES([ kioslave/svn/svnhelper/Makefile ])
AC_CONFIG_FILES([ kmtrace/Makefile ])
AC_CONFIG_FILES([ kompare/Makefile ])
AC_CONFIG_FILES([ kompare/interfaces/Makefile ])
AC_CONFIG_FILES([ kompare/komparenavtreepart/Makefile ])
AC_CONFIG_FILES([ kompare/komparepart/Makefile ])
AC_CONFIG_FILES([ kompare/libdialogpages/Makefile ])
AC_CONFIG_FILES([ kompare/libdiff2/Makefile ])
AC_CONFIG_FILES([ kompare/pics/Makefile ])
AC_CONFIG_FILES([ kprofilemethod/Makefile ])
AC_CONFIG_FILES([ kspy/Makefile ])
AC_CONFIG_FILES([ kstartperf/Makefile ])
AC_CONFIG_FILES([ kuiviewer/Makefile ])
AC_CONFIG_FILES([ kunittest/Makefile ])
AC_CONFIG_FILES([ kunittest/example/Makefile ])
AC_CONFIG_FILES([ kunittest/example/module/Makefile ])
AC_CONFIG_FILES([ kunittest/example/simple/Makefile ])
AC_CONFIG_FILES([ poxml/Makefile ])
AC_CONFIG_FILES([ poxml/antlr/Makefile ])
AC_CONFIG_FILES([ poxml/antlr/antlr/Makefile ])
AC_CONFIG_FILES([ poxml/antlr/src/Makefile ])
AC_CONFIG_FILES([ scheck/Makefile ])
AC_CONFIG_FILES([ scripts/Makefile ])
AC_CONFIG_FILES([ umbrello/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/autolayout/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/clipboard/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/codegenerators/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/codeimport/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/codeimport/kdevcppparser/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/dialogs/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/docgenerators/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/headings/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/pics/Makefile ])
AC_CONFIG_FILES([ umbrello/umbrello/refactoring/Makefile ])
AC_CONFIG_FILES([ kcachegrind/version.h ])
AC_CONFIG_FILES([ kcachegrind/kcachegrind.spec ])
AC_CONFIG_FILES([ kcachegrind/kcachegrind.lsm ])
AC_CONFIG_FILES([ kmtrace/kminspector ])
AC_OUTPUT
if test "x$with_berkeley_db" = xcheck && test -z "$LIB_DBIV"; then
   echo ""
   echo "Dictionary plugin \"Translation Database\" for KBabel will not be built! Please install Berkeley Database IV. See http://www.sleepycat.com for more information.)"
   echo ""
fi
if test "x$with_subversion" = xcheck && test -z "$SVN_SUBDIR"; then
  echo ""
  echo "You're missing Subversion libraries (1.x)"
  echo "KDE will not be able to browse Subversion repositories without it,"
  echo "consider installing it."
  echo "Look at kioslave/svn/README for more information"
  echo ""
  all_tests=bad
fi
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
  # And if so, warn when they don't match
  if test "$kde_libs_prefix" != "$given_prefix"; then
    # And if kde doesn't know about the prefix yet
    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
    if test $? -ne 0; then
      echo ""
      echo "Warning: you chose to install this package in $given_prefix,"
      echo "but KDE was found in $kde_libs_prefix."
      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
      echo "Then restart KDE."
      echo ""
    fi
  fi
fi

if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
  echo ""
  echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
  echo "was not included. Therefore, GCC symbol visibility support remains disabled."
  echo ""
  echo "For better performance, consider including the Qt visibility supporting patch"
  echo "located at:"
  echo ""
  echo "http://bugs.kde.org/show_bug.cgi?id=109386"
  echo ""
  echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
  echo "everything will continue to work just fine without it."
  echo ""
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
