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

acx_options.m4: added OpenDAP support

parent b499903e
......@@ -784,6 +784,7 @@ enable_fast_install
enable_dependency_tracking
with_gnu_ld
enable_libtool_lock
with_gnu_ld
enable_largefile
with_threads
with_zlib
......@@ -810,8 +811,12 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
CPPFLAGS
CXX
CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC
CXXCPP'
ac_subdirs_all='libcdi'
......@@ -17576,7 +17581,7 @@ $as_echo_n "checking netcdf's nc4 support... " >&6; }
 
$as_echo "#define HAVE_NETCDF4 1" >>confdefs.h
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
......@@ -17664,6 +17669,7 @@ fi
 
NETCDF_LIBS=" -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.
......@@ -17715,6 +17721,30 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking netcdf's nc2 support" >&5
$as_echo_n "checking netcdf's nc2 support... " >&6; }
if test "x$($NC_CONFIG --has-nc2)" = "xyes"; then :
$as_echo "#define HAVE_NETCDF2 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking netcdf's nc4 support" >&5
$as_echo_n "checking netcdf's nc4 support... " >&6; }
if test "x$($NC_CONFIG --has-nc4)" = "xyes"; then :
$as_echo "#define HAVE_NETCDF4 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Could not find nc-config! go on with default configuration" >&5
......
......@@ -157,8 +157,8 @@ AC_ARG_WITH([netcdf],
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([netcdf's nc4 support])
AS_IF([test "x$($NC_CONFIG --has-nc4)" = "xyes"],
[AC_DEFINE([HAVE_NETCDF4],[1],[Define to 1 for NETCDF4 support])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])],
[AC_DEFINE([HAVE_NETCDF4],[1],[Define to 1 for NETCDF4 support])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])],
[AS_ECHO([Could not find nc-config! go on with default configuration])])],
[*],[AS_IF([test -d "$with_netcdf"],
[NETCDF_ROOT=$with_netcdf
......@@ -171,12 +171,21 @@ AC_ARG_WITH([netcdf],
[AC_MSG_ERROR([Could not link to netcdf library])])
NETCDF_LIBS=" -L$NETCDF_ROOT/lib -lnetcdf"
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_IF([test "x$NC_CONFIG" != "x"],
[AC_MSG_CHECKING([netcdf's OpenDAP support])
AS_IF([test "x$($NC_CONFIG --has-dap)" = "xyes"],
[AC_DEFINE([HAVE_LIBNC_DAP],[1],[Define to 1 for NETCDF OpenDAP])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])]
[AC_MSG_CHECKING([netcdf's nc2 support])
AS_IF([test "x$($NC_CONFIG --has-nc2)" = "xyes"],
[AC_DEFINE([HAVE_NETCDF2],[1],[Define to 1 for NETCDF2 support])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([netcdf's nc4 support])
AS_IF([test "x$($NC_CONFIG --has-nc4)" = "xyes"],
[AC_DEFINE([HAVE_NETCDF4],[1],[Define to 1 for NETCDF4 support])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])],
[AC_MSG_RESULT([Could not find nc-config! go on with default configuration])])],
[AC_MSG_NOTICE([$with_netcdf is not a directory! NETCDF suppressed])])])],
......
......@@ -135,15 +135,18 @@ void cdo_version(void)
fprintf(stderr, " version: %s\n", COMP_VERSION);
#endif
fprintf(stderr, " with:");
#if defined (HAVE_LIBPTHREAD)
fprintf(stderr, " PTHREADS");
#endif
#if defined (_OPENMP)
fprintf(stderr, " OpenMP");
#endif
#if defined (HAVE_NETCDF4)
fprintf(stderr, " NC4");
#endif
#if defined (HAVE_LIBNC_DAP)
fprintf(stderr, " OPeNDAP");
#endif
#if defined (HAVE_LIBPTHREAD)
fprintf(stderr, " PTHREADS");
#endif
#if defined (HAVE_LIBSZ)
fprintf(stderr, " SZ");
#endif
......@@ -161,9 +164,6 @@ void cdo_version(void)
#endif
#if defined (HAVE_LIBCURL)
fprintf(stderr, " CURL");
#endif
#if defined (_OPENMP)
fprintf(stderr, " OpenMP");
#endif
fprintf(stderr, "\n");
#if defined (USER_NAME) && defined(HOST_NAME) && defined(SYSTEM_TYPE)
......@@ -174,7 +174,6 @@ void cdo_version(void)
fprintf(stderr, "\n");
}
static
void usage(void)
{
......
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