Skip to content
Snippets Groups Projects
Commit 912020db authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Include netcdf_XXX.h files after including netcdf.h in the configure script.

See https://github.com/Unidata/netcdf-c/blob/cd39b9d2d83fed40a45e8a8dd748a6bceae5ddfa/include/netcdf_par.h#L13-L18

Also, get rid of ac_fn_c_check_header_mongrel in the configure script.
parent 06b90074
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -243,28 +243,27 @@ dnl test properties of MPI system
dnl
dnl NC_HAS_PNETCDF is useful when available to short-circuit some tests
AS_IF([test x"$ENABLE_NETCDF" = xyes],
[AC_CHECK_HEADERS([netcdf_meta.h])
[AC_CHECK_HEADERS([netcdf_meta.h],,,[AC_INCLUDES_DEFAULT
@%:@include <netcdf.h>])
AS_IF([test "x$NC_CONFIG" != "x"],
[AC_MSG_CHECKING([parallel netcdf's pnetcdf support])
acx_temp=`$NC_CONFIG --has-pnetcdf`
AS_IF([test "x$acx_temp" = "xyes"],
[AC_DEFINE([HAVE_NETCDF_PAR_PNETCDF],[1],
[Defined to 1 if NetCDF parallel open supports NC_PNETCDF])])
AC_MSG_RESULT([$acx_temp])])])
AC_MSG_RESULT([$acx_temp])])])
AS_IF([test x"$ENABLE_NC4" = xyes],
[saved_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $MPI_C_INCLUDE"
AC_CHECK_HEADERS([netcdf_par.h],
[AC_CHECK_DECL([MPI_Bcast],
[HAVE_PARALLEL_NC4=1],
[AC_MSG_WARN([The supplied netCDF library does not support MPI parallel invocations])],
[AC_INCLUDES_DEFAULT
@%:@include <netcdf.h>
@%:@include <netcdf_par.h>])],
[AC_MSG_WARN([The supplied netCDF library does not support MPI parallel invocations])],
[AC_INCLUDES_DEFAULT
@%:@ifdef HAVE_NETCDF_H
AC_CHECK_HEADERS([netcdf_par.h],,,[AC_INCLUDES_DEFAULT
@%:@include <netcdf.h>])
AC_CHECK_DECL([MPI_Bcast],
[HAVE_PARALLEL_NC4=1],
[AC_MSG_WARN([The supplied netCDF library does not support MPI parallel invocations])],
[AC_INCLUDES_DEFAULT
@%:@include <netcdf.h>
@%:@ifdef HAVE_NETCDF_PAR_H
@%:@include <netcdf_par.h>
@%:@endif])
dnl if not both scales-ppm and yaxt are available, netcdf can only be
dnl used in serial mode
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment