AC_INIT(acinclude.m4)

dnl Process this file with autoconf to produce a configure script.
AM_INIT_AUTOMAKE(c_cpp_reference, 2.0)

dnl sets the prefix to $KDEDIR or /usr/local/kde (if no $KDEDIR
dnl set) for the case, that there is no --prefix
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})

AC_CHECK_COMPILERS
AC_DISABLE_SHARED
KDE_PROG_LIBTOOL
dnl stolen from kdbg and cervisia 
dnl ask for Qt and KDE version
AC_ARG_WITH(kde-version,
  [  --with-kde-version=N    KDE version to configure for: 1 or 2 (default)],
  :, with_kde_version=2)
if test "x$with_kde_version" = "x1"; then
  AC_MSG_RESULT("configuring for KDE 1.1.x and Qt 1.4x")
elif test "x$with_kde_version" = "x2"; then
  AC_MSG_RESULT("configuring for KDE 2 and Qt 2.0")
else
  AC_ERROR([The argument to --with-kde-version must be
   1    for KDE 1.1.x or
   2    for KDE 2
and nothing else!])
fi
KDE_USE_QT($with_kde_version)                                                   

AC_PATH_KDE
AC_MSG_CHECKING([for KDE HTML directory])
AC_MSG_RESULT([found in $kde_htmldir])


AC_OUTPUT(Makefile \
reference/Makefile \
reference/C/Makefile \
reference/C/CONCEPT/Makefile \
reference/C/CONTRIB/Makefile \
reference/C/CONTRIB/OR_PRACTICAL_C/Makefile \
reference/C/CONTRIB/OR_USING_C/Makefile \
reference/C/CONTRIB/SAWTELL/Makefile \
reference/C/CONTRIB/SNIP/Makefile \
reference/C/CONTRIB/YABL/Makefile \
reference/C/EXAMPLES/Makefile \
reference/C/FUNCTIONS/Makefile \
reference/C/GDB/Makefile \
reference/C/LIBRARIES/Makefile \
reference/C/MAN/Makefile \
reference/C/MISC/Makefile \
reference/C/MISC/CLASSES/Makefile \
reference/C/PROBLEMS/Makefile \
reference/C/SYNTAX/Makefile \
reference/C/TECHNIC/Makefile \
reference/C/X_EXAMPLES/Makefile \
reference/C/backup/Makefile \
reference/CPLUSPLUS/Makefile \
reference/CPLUSPLUS/CONCEPT/Makefile \
reference/CPLUSPLUS/CONTRIB/Makefile \
reference/CPLUSPLUS/CONTRIB/GNU_STDLIB/Makefile \
reference/CPLUSPLUS/EXAMPLES/Makefile \
reference/CPLUSPLUS/FUNCTIONS/Makefile \
reference/CPLUSPLUS/GDB/Makefile \
reference/CPLUSPLUS/LIBRARIES/Makefile \
reference/CPLUSPLUS/MISC/Makefile \
reference/CPLUSPLUS/PROBLEMS/Makefile \
reference/CPLUSPLUS/SYNTAX/Makefile \
reference/CPLUSPLUS/TECHNIC/Makefile \
reference/CPLUSPLUS/X_EXAMPLES/Makefile \
reference/GRAPHICS/Makefile
)
 
