[Kst] creating a new datasource reader

Brisset, Nicolas Nicolas.Brisset at eurocopter.com
Wed Mar 16 16:22:28 CET 2005


> > Can you tell me what I'm doing wrong, and what this error 
> message means?
> 
>    It probably means that you don't have the CDF libraries 
> installed, or they were not found by Kst.  If you run 
> ./configure --help you will see some Kst options.  One of them is:
> 
>   --with-cdf=DIR          where the root of CDF is installed
George, CDF and netCDF are different libraries even though the names are
similar ! netCDf is the extra datasource I sent you recently, I believe
you only need to add the following lines to autoconf.in (just after the
corresponding cdf lines):


# netCDF Test
ac_cdf_includes=""
ac_cdf_libraries=""
AC_ARG_WITH(netcdf,
    AC_HELP_STRING([--with-netcdf=DIR],[where the root of netCDF is
installed ]),
    [  ac_cdf_includes="-I$withval/include"
       ac_cdf_libraries="-L$withval/lib"
    ])

all_includes_save="$all_includes"
all_includes="$all_includes $ac_netcdf_includes"
KDE_CHECK_HEADER(netcdfcpp.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_cdf_libraries"
KDE_CHECK_LIB(netcdf, nc_open, NETCDFLIBS="$ac_cdf_libraries -lnetcdf
$CDFLIBS", , )
LDFLAGS="$ldflags_save"

if test $ac_cv_lib_netcdf_netCDFlib = 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")

There may still be some hitches, but if you commit this (and regenerate
configure ?) we'll at least be close to a working configure...

Nicolas


More information about the Kst mailing list