build_vpl="yes"

#build_vpl="no"
AC_DEFUN([QUANTA_CHECK_VPL],
[
  AC_MSG_CHECKING(whether VPL can be compiled)
  AC_CACHE_VAL(ac_cv_vpl_setup,
  [
    AC_LANG_SAVE
    AC_LANG_CPLUSPLUS
    save_CXXFLAGS="$CXXFLAGS"
    CXXFLAGS="$KDE_INCLUDES $TQT_INCLUDES"

    AC_TRY_LINK([
      #include <tdeversion.h>
    ],
    [
      #if TDE_VERSION < ((3<<16) | (1<<8) | (90))
         KDE_choke me
      #endif
    ],
      ac_cv_vpl_setup=yes,
      ac_cv_vpl_setup=no
    )
    CXXFLAGS="$save_CXXFLAGS"
    AC_LANG_RESTORE
   ])

  if test "$ac_cv_vpl_setup" = "yes"; then
    build_vpl="yes"
    CXXFLAGS="$CXXFLAGS -DBUILD_KAFKAPART"
    AC_MSG_RESULT(yes)
  else
    AC_MSG_RESULT(no)
  fi

])

#QUANTA_CHECK_VPL

AM_CONDITIONAL(BUILD_WYSIWYG, test "$build_vpl" = "yes")

