# 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(qlcrash/qlcrash.cpp) dnl a source file from your sub dir

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

AC_CANONICAL_SYSTEM 
AC_ARG_PROGRAM

dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(qlcrash,1.0)

dnl KDE_SET_PREFIX

AC_PREFIX_DEFAULT(/usr/local)
if test "x$prefix" = "xNONE"; then
  prefix=$ac_default_prefix
  ac_configure_args="$ac_configure_args --prefix $prefix"
fi

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

AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
all_libraries="$all_libraries $USER_LDFLAGS"
all_includes="$all_includes $USER_INCLUDES"
AC_SUBST(all_includes)
AC_SUBST(all_libraries)

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

AC_PATH_QT

AC_DEFINE_UNQUOTED(PREFIX,"$prefix",[Install prefix])

dnl Perform program name transformation
AC_ARG_PROGRAM

dnl PACKAGE set before
KDE_CREATE_SUBDIRSLIST

dnl Misc options
AC_ARG_WITH(regex,
	[  --with-regex            Use regex instead of QRegExp],
	[
		if test "${withval}" = "yes" ; then
			AC_DEFINE(USE_REGEX,1,[Define this to use regex instead of QRegExp])
		fi
	]
)

dnl add here all your Makefiles. This are created by configure
AC_OUTPUT(Makefile lemon/Makefile qlcrash/Makefile Doc/Manual/Makefile Doc/Makefile Doc/Manual/pics/Makefile qlcrash/plugins/Makefile)
