Commit f6ebcc5a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added gribapiLibraryVersion

parent 82c247ab
......@@ -21,7 +21,7 @@ case "${HOSTNAME}" in
# i686-suse-linux
linux | laptop)
./configure --prefix=$HOME/local \
--with-jasper=/usr/lib \
--with-jasper=/usr \
--with-grib_api=$HOME/local \
--with-netcdf=$HOME/local \
--with-szlib=$HOME/local \
......@@ -29,6 +29,8 @@ case "${HOSTNAME}" in
;;
gata)
./configure --prefix=$HOME/local/etch-ia32 \
--with-jasper=/usr \
--with-grib_api=/scratch/local2/m214003/local \
--with-netcdf=/client \
--with-szlib=$HOME/local/etch-ia32 \
CC=gcc CFLAGS="-g -O2 -Wall -W -Wfloat-equal -ansi -pedantic" CFINT=-Df2cFortran
......
......@@ -12,13 +12,21 @@
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
#if defined (HAVE_LIBGRIB_API)
static const char gribapi_libvers[] = "xxx";
#else
static const char gribapi_libvers[] = "";
#endif
static char gribapi_libvers[64] = "";
const char *gribapiLibraryVersion(void)
{
#if defined (HAVE_LIBGRIB_API)
long version = grib_get_api_version();
int major_version, minor_version, revision_version;
major_version = version/10000;
minor_version = (version-major_version*10000)/100;
revision_version = (version-major_version*10000-minor_version*100);
sprintf(gribapi_libvers, "%d.%d.%d",
major_version, minor_version, revision_version);
#endif
return (gribapi_libvers);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment