Commit 032b7a81 authored by Fabian Wachsmann's avatar Fabian Wachsmann
Browse files

Merged and adapted files

parent a8eabe25
......@@ -34,63 +34,6 @@ dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl Commentary:
dnl
dnl
dnl
dnl Code:
dnl
dnl
dnl Local Variables:
dnl mode: autoconf
dnl license-project-url: "https://www.dkrz.de/redmine/projects/show/scales-ppm"
dnl license-default: "bsd"
dnl End:
dnl acinclude.m4 --- m4 files that are unconditionally included by autoconf
dnl
dnl Copyright (C) 2010 Thomas Jahns <jahns@dkrz.de>
dnl
dnl Version: 1.0
dnl Keywords: configure configure.ac autotools
dnl Author: Thomas Jahns <jahns@dkrz.de>
dnl Maintainer: Thomas Jahns <jahns@dkrz.de>
dnl URL: https://www.dkrz.de/redmine/projects/show/scales-ppm
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions are
dnl met:
dnl
dnl Redistributions of source code must retain the above copyright notice,
dnl this list of conditions and the following disclaimer.
dnl
dnl Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in the
dnl documentation and/or other materials provided with the distribution.
dnl
dnl Neither the name of the DKRZ GmbH nor the names of its contributors
dnl may be used to endorse or promote products derived from this software
dnl without specific prior written permission.
dnl
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
dnl IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
dnl TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
dnl OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl Commentary:
dnl
dnl
dnl
dnl Code:
dnl
dnl
m4_include([libcdi/m4/acx_lang_c_check_include.m4])
dnl Local Variables:
dnl mode: autoconf
......
# generated automatically by aclocal 1.14 -*- Autoconf -*-
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
......@@ -14,8 +14,8 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
......@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.14], [],
m4_if([$1], [1.14.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.14])dnl
[AM_AUTOMAKE_VERSION([1.14.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
......
......@@ -24651,6 +24651,11 @@ $as_echo_n "checking for the UDUNITS2 library... " >&6; }
$as_echo "suppressed" >&6; }
fi
 
# -----------------------------------------------------------------------
# test for UUID libraries needed by CMOR
# (util-linux libuuid in 3.1.1 and before, OSSP UUID in 3.1.2 and after)
ACX_UUID
# ----------------------------------------------------------------------
# Link application with CMOR library
CMOR_LIBS=''
......@@ -24676,6 +24681,7 @@ fi
 
done
 
LIBS="${LIBS+${LIBS} }$UUID_C_LIB"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cmor_load_table" >&5
$as_echo_n "checking for library containing cmor_load_table... " >&6; }
if ${ac_cv_search_cmor_load_table+:} false; then :
......@@ -24742,7 +24748,6 @@ fi
CMOR_ROOT=$with_cmor
if test -d "$CMOR_ROOT"; then :
LDFLAGS="$LDFLAGS -L$CMOR_ROOT/lib"
LIBS_saved=$LIBS
LIBS="${LIBS+${LIBS} }$UUID_C_LIB"
CPPFLAGS="$CPPFLAGS -I$CMOR_ROOT/include -I$CMOR_ROOT/include/cdTime -I$CMOR_ROOT/include/json-c"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cmor_load_table" >&5
......@@ -24805,8 +24810,7 @@ else
as_fn_error $? "Could not link to cmor library!" "$LINENO" 5
fi
 
LIBS="${LIBS_saved} -lcmor"
CMOR_LIBS=" -L$CMOR_ROOT/lib -lcmor"
CMOR_LIBS=" -L$CMOR_ROOT/lib -lcmor $UUID_C_LIB"
else
as_fn_error $? "$CMOR_ROOT is not a directory! CMOR suppressed" "$LINENO" 5
fi ;; #(
......
......@@ -233,6 +233,11 @@ AC_ARG_WITH([udunits2],
[AC_MSG_ERROR([$UDUNITS_ROOT is not a directory! UDUNITS2 suppressed])])])],
[AC_MSG_CHECKING([for the UDUNITS2 library])
AC_MSG_RESULT([suppressed])])
# -----------------------------------------------------------------------
# test for UUID libraries needed by CMOR
# (util-linux libuuid in 3.1.1 and before, OSSP UUID in 3.1.2 and after)
ACX_UUID
# ----------------------------------------------------------------------
# Link application with CMOR library
CMOR_LIBS=''
......@@ -242,21 +247,20 @@ AC_ARG_WITH([cmor],
[no],[AC_MSG_CHECKING([for cmor library])
AC_MSG_RESULT([suppressed])],
[yes],[AC_CHECK_HEADERS([cmor.h])
LIBS="${LIBS+${LIBS} }$UUID_C_LIB"
AC_SEARCH_LIBS([cmor_load_table],[cmor],[AC_DEFINE([HAVE_LIBCMOR],[1],[Define to 1 for CMOR support])],
[AC_MSG_ERROR([Could not link to cmor library!])])
AC_SUBST([CMOR_LIBS],[" -lcmor"])],
[*],[CMOR_ROOT=$with_cmor
AS_IF([test -d "$CMOR_ROOT"],
[LDFLAGS="$LDFLAGS -L$CMOR_ROOT/lib"
LIBS_saved=$LIBS
LIBS="${LIBS+${LIBS} }$UUID_C_LIB"
CPPFLAGS="$CPPFLAGS -I$CMOR_ROOT/include -I$CMOR_ROOT/include/cdTime -I$CMOR_ROOT/include/json-c"
AC_SEARCH_LIBS([cmor_load_table],
[cmor],
[AC_DEFINE([HAVE_LIBCMOR],[1],[Define to 1 for CMOR support])],
[AC_MSG_ERROR([Could not link to cmor library!])])
LIBS="${LIBS_saved} -lcmor"
CMOR_LIBS=" -L$CMOR_ROOT/lib -lcmor"],
CMOR_LIBS=" -L$CMOR_ROOT/lib -lcmor $UUID_C_LIB"],
[AC_MSG_ERROR([$CMOR_ROOT is not a directory! CMOR suppressed])])])],
[AC_MSG_CHECKING([for the CMOR library])
AC_MSG_RESULT([suppressed])])
......
......@@ -733,7 +733,7 @@ static void maptab_via_cmd(list_t *pml, const char *origValue, int vlistID, int
{
int varIDToMap = getVarIDToMap(vlistID, nvars, key, origValue);
if ( varIDToMap == CDI_UNDEFID )
cdoAbort("ERROR! In variable mapping:\n Variable with '%s': '%s' configured via cmdline could not be found in infile '%s'.", key, origValue, cdoStreamName(0).c_str());
cdoAbort("ERROR! In variable mapping:\n Variable with '%s': '%s' configured via cmdline could not be found in infile '%s'.", key, origValue, cdoGetStreamName(0).c_str());
list_t *kvl_maptab = maptab_search_miptab(pml, cmorName, miptabfreq, "cmor_name");
if ( !kvl_maptab )
{
......@@ -873,7 +873,7 @@ static void addcharvar(keyValues_t *charvars, int vlistID, const char *key, stru
{
varIDs[i] = getVarIDToMap(vlistID, nvars, key, charvars->values[i]);
if ( varIDs[i] == CDI_UNDEFID )
cdoAbort("ERROR! In merging variables to a variable with a character coordinate:\n Could not find '%s' in infile '%s' to build a variable with character coordinate.", charvars->values[i], cdoStreamName(0).c_str());
cdoAbort("ERROR! In merging variables to a variable with a character coordinate:\n Could not find '%s' in infile '%s' to build a variable with character coordinate.", charvars->values[i], cdoGetStreamName(0).c_str());
}
int gridID = vlistInqVarGrid(vlistID, varIDs[0]);
......@@ -882,7 +882,7 @@ static void addcharvar(keyValues_t *charvars, int vlistID, const char *key, stru
int subzaxisID;
int ntsteps = vlistNtsteps(vlistID);
if ( cdoStreamName(0).c_str()[0] == '-' )
if ( cdoGetStreamName(0).c_str()[0] == '-' )
cdoAbort("ERROR! No variables can be merged to one character axis since you piped several cdo operators.");
int streamID2 = cdoStreamOpenRead(cdoStreamName(0));
......@@ -5113,8 +5113,7 @@ static void switch_grid_info(list_t *kvl, int streamID, char *grid_file)
int filetype = cdiGetFiletype(grid_file, &byteorder);
if ( (filetype == CDI_FILETYPE_NC ) || (filetype == CDI_FILETYPE_NC2 ) || (filetype == CDI_FILETYPE_NC4 ) || (filetype == CDI_FILETYPE_NC4C ) )
{
argument_t *fileargument = file_argument_new(grid_file);
int streamID2 = pstreamOpenRead(fileargument);
int streamID2 = streamOpenRead(grid_file);
int vlistID2 = pstreamInqVlist(streamID2);
int gridID2 = vlistInqVarGrid(vlistID2, 0);
int zaxisID2 = vlistInqVarZaxis(vlistID2, 0);
......@@ -5139,12 +5138,9 @@ void *CMOR(void *process)
{
if ( cdoVerbose )
{
int argc = ((argument_t *) argument)->argc;
std::vector<char *> &argv = ((argument_t *) argument)->argv;
printf("cdo cmor: You want to use the following streams for conversion to a project standard:\n");
for ( int args = 1; args < argc; args++)
printf(" %s\n", (char *)argv[args]);
cdoPrint("You want to use the following streams for conversion to a project standard:");
for ( int streamIDX = 1; streamIDX < processSelf().getInStreamCnt(); streamIDX++)
cdoPrint("%s\n", (char *)cdoGetStreamName(streamIDX).c_str());
}
cdoInitialize(process);
......@@ -5188,8 +5184,8 @@ void *CMOR(void *process)
cdoPrint("2. Successfully found a MIP table '%s' and deduced a MIP table frequency '%s'.", mip_table, miptab_freqptr);
if ( cdoVerbose )
cdoPrint("3. Start to open infile '%s'.", cdoStreamName(0).c_str());
int streamID = pstreamOpenRead(cdoStreamName(0));
cdoPrint("3. Start to open infile '%s'.", cdoGetStreamName(0).c_str());
int streamID = cdoStreamOpenRead(cdoStreamName(0));
int vlistID = pstreamInqVlist(streamID);
if ( cdoVerbose )
......
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
 
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -16,17 +16,7 @@
 
 
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -95,6 +85,9 @@ bin_PROGRAMS = cdo$(EXEEXT)
noinst_PROGRAMS = cdotest$(EXEEXT)
@ENABLE_ALL_STATIC_TRUE@am__append_3 = -all-static
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/config.h.in $(top_srcdir)/config/mkinstalldirs \
$(top_srcdir)/config/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libcdi/m4/acx_c_package.m4 \
$(top_srcdir)/libcdi/m4/acx_lang_check_include.m4 \
......@@ -114,7 +107,6 @@ am__aclocal_m4_deps = $(top_srcdir)/libcdi/m4/acx_c_package.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
......@@ -378,9 +370,6 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/config/depcomp \
$(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
......@@ -699,6 +688,7 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -5152,8 +5142,6 @@ uninstall-am: uninstall-binPROGRAMS
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-binPROGRAMS
 
.PRECIOUS: Makefile
#
clean-local: clean-local-dirs
.PHONY: clean-local-dirs
......
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -15,17 +15,7 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -89,6 +79,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/lib/ncl
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/config/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libcdi/m4/acx_c_package.m4 \
$(top_srcdir)/libcdi/m4/acx_lang_check_include.m4 \
......@@ -108,7 +100,6 @@ am__aclocal_m4_deps = $(top_srcdir)/libcdi/m4/acx_c_package.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
......@@ -177,8 +168,6 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
......@@ -386,6 +375,7 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/ncl/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/lib/ncl/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -640,8 +630,6 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
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