Commit c5d8fabb authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Substitute C compiler flags for netCDF in pkgconfig file.

parent 939e6805
......@@ -648,8 +648,8 @@ ENABLE_GRIB
GRIB_API_INCLUDE
GRIB_API_LDFLAGS
JASPER_LDFLAGS
NC_CONFIG
NETCDF_INCLUDE
NC_CONFIG
NETCDF_LDFLAGS
HDF5_LIBS
HDF5_INCLUDE
......@@ -25135,6 +25135,7 @@ fi
 
# ----------------------------------------------------------------------
# Compile application with netcdf
NETCDF_INCLUDE=''
 
# Check whether --with-netcdf was given.
if test "${with_netcdf+set}" = set; then :
......@@ -25219,8 +25220,6 @@ fi
 
NETCDF_LDFLAGS=" -lnetcdf"
 
NETCDF_INCLUDE=""
# Extract the first word of "nc-config", so it can be a program name with args.
set dummy nc-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
......@@ -25366,7 +25365,6 @@ fi
NETCDF_LDFLAGS=" -L$NETCDF_ROOT/lib -lnetcdf"
 
NETCDF_INCLUDE=" -I$NETCDF_ROOT/include"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking nc-config script" >&5
$as_echo_n "checking nc-config script... " >&6; }
# Extract the first word of "nc-config", so it can be a program name with args.
......@@ -25452,6 +25450,7 @@ $as_echo_n "checking for NETCDF library... " >&6; }
$as_echo "suppressed" >&6; }
fi
 
# ----------------------------------------------------------------------
# Link application with JASPER library (needed for GRIB2 compression)
 
......
......@@ -135,6 +135,7 @@ AC_SUBST([HDF5_INCLUDE])
AC_SUBST([HDF5_LIBS])
# ----------------------------------------------------------------------
# Compile application with netcdf
NETCDF_INCLUDE=''
AC_ARG_WITH([netcdf],
[AS_HELP_STRING([--with-netcdf=<yes|no|directory> (default=yes)],[location of netcdf library (lib and include subdirs)])],
[AS_CASE(["$with_netcdf"],
......@@ -146,7 +147,6 @@ AC_ARG_WITH([netcdf],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])],
[AC_MSG_ERROR([Could not link to netcdf library])])
AC_SUBST([NETCDF_LDFLAGS],[" -lnetcdf"])
AC_SUBST([NETCDF_INCLUDE],[""])
AC_CHECK_PROG(NC_CONFIG,nc-config,nc-config)
AS_IF([test "x$NC_CONFIG" != "x"],
[AC_MSG_CHECKING([netcdf's nc2 support])
......@@ -168,7 +168,7 @@ AC_ARG_WITH([netcdf],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])],
[AC_MSG_ERROR([Could not link to netcdf library])])
AC_SUBST([NETCDF_LDFLAGS],[" -L$NETCDF_ROOT/lib -lnetcdf"])
AC_SUBST([NETCDF_INCLUDE],[" -I$NETCDF_ROOT/include"])
NETCDF_INCLUDE=" -I$NETCDF_ROOT/include"
AC_MSG_CHECKING([nc-config script])
AC_CHECK_PROG(NC_CONFIG,nc-config,[$NETCDF_ROOT/bin/nc-config],,["$NETCDF_ROOT/bin"])
AS_ECHO([$NC_CONFIG])
......@@ -186,6 +186,7 @@ AC_ARG_WITH([netcdf],
[AC_MSG_NOTICE([$NETCDF_ROOT is not a directory! NETCDF suppressed])])])],
[AC_MSG_CHECKING([for NETCDF library])
AC_MSG_RESULT([suppressed])])
AC_SUBST([NETCDF_INCLUDE])
# ----------------------------------------------------------------------
# Link application with JASPER library (needed for GRIB2 compression)
AC_ARG_WITH([jasper],
......
......@@ -15,6 +15,7 @@ szlib_libs=@SZLIB_LIBS@
hdf5_root=@HDF5_ROOT@
hdf5_cflags=@HDF5_INCLUDE@
hdf5_libs=@HDF5_LIBS@
netcdf_cflags=@NETCDF_INCLUDE@
Name: @PACKAGE_NAME@
Description: CDI is an Interface to access Climate and NWP model Data.
......
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