[Kst] kdeextragear-2/kst
George Staikos
staikos at kde.org
Mon Oct 4 12:22:43 CEST 2004
CVS commit by staikos:
enable compilation of the JS plugin on systems that support it and will remain
compatible
M +39 -0 configure.in.in 1.31
M +4 -1 kst/extensions/Makefile.am 1.3
--- kdeextragear-2/kst/configure.in.in #1.30:1.31
@@ -118,4 +118,43 @@
KST_CHECK_MDI
+AC_DEFUN([KST_CHECK_JSE],
+[
+ AC_MSG_CHECKING(whether to compile the Kst JS extension)
+ AC_CACHE_VAL(ac_cv_kjs_setup,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$KDE_INCLUDES $QT_INCLUDES"
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$KDEDIR/lib -lkjsembed"
+
+ AC_TRY_LINK([
+ #include <kdeversion.h>
+ #include <kjsembed/jssecuritypolicy.h>
+ ],
+ [
+ #if KDE_VERSION < ((3<<16) | (2<<8) | (0))
+ KDE_choke me
+ #endif
+ ],
+ ac_cv_kjs_setup=yes,
+ ac_cv_kjs_setup=no
+ )
+ LDFLAGS="$save_LDFLAGS"
+ CXXFLAGS="$save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ AM_CONDITIONAL(include_kjse, test "$ac_cv_kjs_setup" = "yes")
+ if test "$ac_cv_kjs_setup" = "yes"; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+])
+
+KST_CHECK_JSE
+
KDE_CHECK_HEADER(linux/vt.h, AC_DEFINE(HAVE_LINUX, 1, [If we have a Linux platform]) have_linux=yes, , )
AM_CONDITIONAL(include_linux, test $have_linux = yes)
--- kdeextragear-2/kst/kst/extensions/Makefile.am #1.2:1.3
@@ -1 +1,4 @@
-SUBDIRS=elog
+if include_kjse
+KJSE_SUBDIR=js
+endif
+SUBDIRS=elog $(KJSE_SUBDIR)
More information about the Kst
mailing list