[Kst] kdeextragear-2/kst

George Staikos staikos at kde.org
Sun Apr 25 06:48:13 CEST 2004


CVS commit by staikos: 

configure check for kmdi


  M +45 -0     configure.in.in   1.19
  M +1 -1      kst/Makefile.am   1.90


--- kdeextragear-2/kst/configure.in.in  #1.18:1.19
@@ -48,2 +48,47 @@
 KDE_CHECK_LIB(cfitsio, main, ,[FITSIO_SUBDIR=""], -lm )
 AM_CONDITIONAL(include_fitsio_datasource, test -n "$FITSIO_SUBDIR")
+
+AC_DEFUN([KST_CHECK_MDI],
+[
+  AC_MSG_CHECKING(whether to use kmdi lib from kdelibs)
+  AC_CACHE_VAL(ac_cv_mdi_setup,
+  [
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS="$KDE_INCLUDES"
+
+    AC_TRY_LINK([
+      #include <kdeversion.h>
+    ],
+    [
+      #if KDE_VERSION < ((3<<16) | (2<<8) | (90))
+         KDE_choke me
+      #endif
+    ],
+      ac_cv_mdi_setup=yes,
+      ac_cv_mdi_setup=no
+    )
+    CXXFLAGS="$save_CXXFLAGS"
+    AC_LANG_RESTORE
+   ])
+
+  if test "$ac_cv_mdi_setup" = "yes"; then
+    LIB_KMDI="-lkmdi"
+    KMDI_INCLUDES=""
+    KMDI_SUBDIR=""
+    AC_MSG_RESULT(yes)
+  else
+    LIB_KMDI='$(top_builddir)/kst/kst/libkstkmdi/libkstkmdi.la'
+    KMDI_INCLUDES='-I$(top_srcdir)/kst/kst/libkstkmdi'
+    KMDI_SUBDIR="libkstkmdi"
+    CXXFLAGS="$CXXFLAGS -DCOMPAT_KMDI"
+    AC_MSG_RESULT(no)
+  fi
+
+  AC_SUBST(LIB_KMDI)
+  AC_SUBST(KMDI_INCLUDES)
+])
+
+KST_CHECK_MDI
+

--- kdeextragear-2/kst/kst/Makefile.am  #1.89:1.90
@@ -4,5 +4,5 @@
 KDE_CXXFLAGS = -DKST_TEST_VIEW
 
-SUBDIRS=. datasources extensions
+SUBDIRS=$(KMDI_SUBDIR) . datasources extensions
 
 METASOURCES=AUTO





More information about the Kst mailing list