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

Substitute C compiler flags for zlib in pkgconfig file.

parent 9f8bb538
......@@ -655,8 +655,8 @@ HDF5_INCLUDE
HDF5_LDFLAGS
SZLIB_INCLUDE
SZLIB_LDFLAGS
ZLIB_LDFLAGS
ZLIB_INCLUDE
ZLIB_LDFLAGS
THREADS_LIBS
THREADS_INCLUDE
PTHREAD_CFLAGS
......@@ -24392,6 +24392,7 @@ esac
 
# ----------------------------------------------------------------------
# Link application to ZLIB library, needed for netcdf
ZLIB_INCLUDE=''
 
# Check whether --with-zlib was given.
if test "${with_zlib+set}" = set; then :
......@@ -24472,7 +24473,6 @@ $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
 
fi
 
ZLIB_LDFLAGS=" -lz"
;; #(
*) :
......@@ -24550,7 +24550,6 @@ $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
fi
 
ZLIB_INCLUDE=" -I$ZLIB_ROOT/include"
ZLIB_LDFLAGS=" -L$ZLIB_ROOT/lib -lz"
;; #(
*) :
......@@ -24631,6 +24630,7 @@ fi
 
fi
 
# ----------------------------------------------------------------------
# Compile application with SZLIB library, needed for GRIB1 or for linking against hdf5/netcdf4
 
......
......@@ -28,6 +28,7 @@ AC_SUBST([THREADS_INCLUDE])
AC_SUBST([THREADS_LIBS])
# ----------------------------------------------------------------------
# Link application to ZLIB library, needed for netcdf
ZLIB_INCLUDE=''
AC_ARG_WITH([zlib],
[AS_HELP_STRING([--with-zlib=<yes|no|directory> (default=yes)],[location of ZLIB compression library (lib and include subdirs), nec. for HDF5/NETCDF4])],
[AS_CASE(["$with_zlib"],
......@@ -35,18 +36,18 @@ AC_ARG_WITH([zlib],
AC_MSG_RESULT([suppressed])],
[yes],[AC_CHECK_HEADERS(zlib.h)
AC_SEARCH_LIBS([deflate],[z],[AC_DEFINE([HAVE_LIBZ],[1],[Define 1 for ZLIB support])])
AC_SUBST([ZLIB_INCLUDE],[])
AC_SUBST([ZLIB_LDFLAGS],[" -lz"])],
[*],[ZLIB_ROOT=$with_zlib
LDFLAGS="-L$ZLIB_ROOT/lib $LDFLAGS"
CPPFLAGS="-I$ZLIB_ROOT/include $CPPFLAGS"
AC_CHECK_HEADERS(zlib.h)
AC_SEARCH_LIBS([deflate],[z],[AC_DEFINE([HAVE_LIBZ],[1],[Define 1 for ZLIB support])])
AC_SUBST([ZLIB_INCLUDE],[" -I$ZLIB_ROOT/include"])
ZLIB_INCLUDE=" -I$ZLIB_ROOT/include"
AC_SUBST([ZLIB_LDFLAGS],[" -L$ZLIB_ROOT/lib -lz"])])],
[AC_CHECK_HEADERS(zlib.h)
AC_SEARCH_LIBS([deflate],[z],[AC_DEFINE([HAVE_LIBZ],[1],[Define 1 for ZLIB support])])
AC_SUBST([ZLIB_LDFLAGS],[" -lz"])])
AC_SUBST([ZLIB_INCLUDE])
# ----------------------------------------------------------------------
# Compile application with SZLIB library, needed for GRIB1 or for linking against hdf5/netcdf4
AC_ARG_WITH([szlib],
......
......@@ -8,6 +8,7 @@ libs=-L@libdir@ -lcdi @GRIB_API_LDFLAGS@ @JASPER_LDFLAGS@ @NETCDF_LDFLAGS@ @HDF5
netcdf_root=@NETCDF_ROOT@
threads_libs=@THREADS_LIBS@
threads_cflags=@THREADS_INCLUDE@
zlib_cflags=@ZLIB_INCLUDE@
Name: @PACKAGE_NAME@
......
Supports Markdown
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