Revision 80f2b368e3011f2676f42c66e989504772338554 authored by Eh Tan on 16 October 2013, 05:09:46 UTC, committed by Eh Tan on 16 October 2013, 05:09:46 UTC
1 parent 90690a9
cit_netcdf.m4
# -*- Autoconf -*-
# ======================================================================
# Autoconf macros for netcdf.
# ======================================================================
# ----------------------------------------------------------------------
# CIT_NETCDF_HEADER
# ----------------------------------------------------------------------
AC_DEFUN([CIT_NETCDF_HEADER], [
AC_LANG(C++)
AC_CHECK_HEADER([netcdfcpp.h], [], [
AC_MSG_ERROR([netcdf C++ header not found; try CPPFLAGS="-I<netcdf include dir>"])
])dnl
])dnl CIT_NETCDF_HEADER
# ----------------------------------------------------------------------
# CIT_NETCDF_LIB
# ----------------------------------------------------------------------
AC_DEFUN([CIT_NETCDF_LIB], [
AC_LANG(C++)
AC_REQUIRE_CPP
AC_MSG_CHECKING([for NcFile in -lnetcdfc++])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <netcdfcpp.h>]],
[[NcFile ncfile("filename");]])],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([netcdfc++ library not found; try LDFLAGS="-L<netcdf lib dir>"])
])dnl
]))
])dnl CIT_NETCDF_LIB
dnl end of file

Computing file changes ...