[Kst] kdeextragear-2/kst

George Staikos staikos at kde.org
Wed Mar 16 18:54:34 CET 2005


CVS commit by staikos: 

enable compilation of netcdf support
(resulting plugin untested)


  M +30 -0     configure.in.in   1.46
  M +5 -1      kst/datasources/Makefile.am   1.12
  M +2 -2      kst/datasources/netcdf/Makefile.am   1.2


--- kdeextragear-2/kst/configure.in.in  #1.45:1.46
@@ -68,4 +68,34 @@
 
 
+# netCDF Test
+ac_netcdf_includes=""
+ac_netcdf_libraries=""
+AC_ARG_WITH(netcdf,
+    AC_HELP_STRING([--with-netcdf=DIR],[where the root of NetCDF is installed ]),
+    [  ac_netcdf_includes="-I$withval/include"
+       ac_netcdf_libraries="-L$withval/lib"
+    ])
+
+all_includes_save="$all_includes"
+all_includes="$all_includes $ac_netcdf_includes"
+KDE_CHECK_HEADER(netcdf.h, AC_DEFINE(HAVE_NETCDF_H, 1, [If we have NetCDF headers]) have_netcdf_h=yes NETCDFINCLUDES="$ac_netcdf_includes", , )
+all_includes="$all_includes_save"
+
+ldflags_save="$LDFLAGS"
+LDFLAGS="$LDFLAGS $ac_netcdf_libraries"
+KDE_CHECK_LIB(netcdf, nc_open, NETCDFLIBS="$ac_netcdf_libraries -lnetcdf $NETCDFLIBS", , )
+LDFLAGS="$ldflags_save"
+
+if test $ac_cv_lib_netcdf_nc_open = yes; then
+  if test $have_netcdf_h = yes; then
+    AC_SUBST(NETCDFLIBS)
+    AC_SUBST(NETCDFINCLUDES)
+    AC_DEFINE(KST_HAVE_NETCDF, 1, [If we have the NetCDF libraries.])
+  fi
+fi
+
+AM_CONDITIONAL(include_netcdf, test -n "$NETCDFLIBS")
+
+
 # GSL Tests
 GSL_LIBS="-lgsl -lgslcblas -lm"

--- kdeextragear-2/kst/kst/datasources/Makefile.am  #1.11:1.12
@@ -11,4 +11,8 @@
 endif
 
-SUBDIRS=ascii dirfile frame indirect $(PIOLIB_SUBDIR) $(FITSIO_SUBDIR) $(CDF_SUBDIR)
+if include_netcdf
+NETCDF_SUBDIR=netcdf
+endif
+
+SUBDIRS=ascii dirfile frame indirect $(PIOLIB_SUBDIR) $(FITSIO_SUBDIR) $(CDF_SUBDIR) $(NETCDF_SUBDIR)
 

--- kdeextragear-2/kst/kst/datasources/netcdf/Makefile.am  #1.1:1.2
@@ -1,7 +1,7 @@
-INCLUDES=-I$(srcdir)/../.. $(CDFINCLUDES) $(all_includes)
+INCLUDES=-I$(srcdir)/../.. $(NETCDFINCLUDES) $(all_includes)
 
 kde_module_LTLIBRARIES=kstdata_netcdf.la
 
-kstdata_netcdf_la_LIBADD=$(CDFLIBS)
+kstdata_netcdf_la_LIBADD=$(NETCDFLIBS)
 kstdata_netcdf_la_LDFLAGS=$(all_libraries) -module -avoid-version
 kstdata_netcdf_la_SOURCES=netcdf.cpp




More information about the Kst mailing list