Commit 294bd100 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add pkgconfig description file.

parent da5ea9e1
......@@ -122,14 +122,19 @@ interfaces/ruby/testObj.rb -text
interfaces/testdata/gridTest.nc -text
interfaces/testdata/mulval.grb -text
interfaces/testdata/mulval.nc -text
m4/acx_assert_lang_is_fortran_variant.m4 -text
m4/acx_lang_other_suffix_conftest.m4 -text
m4/acx_options.m4 -text
m4/acx_sl_fc_mod_path_flag.m4 -text
m4/acx_sl_mod_suffix.m4 -text
m4/asx_unset.m4 -text
m4/ax_pthread.m4 -text
m4/libtool.m4 -text
m4/ltoptions.m4 -text
m4/ltsugar.m4 -text
m4/ltversion.m4 -text
m4/lt~obsolete.m4 -text
m4/starlink_fpp.m4 -text
src/Makefile.am -text
src/Makefile.in -text
src/basetime.c -text
......@@ -178,6 +183,7 @@ src/make_cdilib -text
src/make_fint.c -text
src/mo_cdi.f90 -text
src/model.c -text
src/pkgconfig/cdi.pc.in -text
src/service.h -text
src/servicelib.c -text
src/stream.c -text
......
......@@ -36,24 +36,31 @@ host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/cdi.settings.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
config/compile config/config.guess config/config.sub \
config/depcomp config/install-sh config/ltmain.sh \
config/missing config/mkinstalldirs
$(top_srcdir)/configure $(top_srcdir)/src/pkgconfig/cdi.pc.in \
AUTHORS COPYING ChangeLog INSTALL NEWS config/compile \
config/config.guess config/config.sub config/depcomp \
config/install-sh config/ltmain.sh config/missing \
config/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = cdi.settings
CONFIG_CLEAN_FILES = cdi.settings src/pkgconfig/cdi.pc
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
......@@ -118,6 +125,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
......@@ -147,10 +155,16 @@ EXEEXT = @EXEEXT@
F77 = @F77@
FC = @FC@
FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCMODCASE = @FCMODCASE@
FCMODEXT = @FCMODEXT@
FC_MOD_FLAG = @FC_MOD_FLAG@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FPP = @FPP@
FPPFLAGS = @FPPFLAGS@
FPP_DEFOPT = @FPP_DEFOPT@
FPP_INCOPT = @FPP_INCOPT@
GREP = @GREP@
GRIB_API_INCLUDE = @GRIB_API_INCLUDE@
GRIB_API_LDFLAGS = @GRIB_API_LDFLAGS@
......@@ -316,6 +330,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
cdi.settings: $(top_builddir)/config.status $(srcdir)/cdi.settings.in
cd $(top_builddir) && $(SHELL) ./config.status $@
src/pkgconfig/cdi.pc: $(top_builddir)/config.status $(top_srcdir)/src/pkgconfig/cdi.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
......
......@@ -1001,12 +1001,17 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/acx_assert_lang_is_fortran_variant.m4])
m4_include([m4/acx_lang_other_suffix_conftest.m4])
m4_include([m4/acx_options.m4])
m4_include([m4/acx_sl_fc_mod_path_flag.m4])
m4_include([m4/acx_sl_mod_suffix.m4])
m4_include([m4/asx_unset.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
m4_include([m4/starlink_fpp.m4])
m4_include([acinclude.m4])
......@@ -41,12 +41,18 @@ noinst_PROGRAMS = $(am__EXEEXT_2) createtable$(EXEEXT)
subdir = app
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
......@@ -97,6 +103,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
......@@ -126,10 +133,16 @@ EXEEXT = @EXEEXT@
F77 = @F77@
FC = @FC@
FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCMODCASE = @FCMODCASE@
FCMODEXT = @FCMODEXT@
FC_MOD_FLAG = @FC_MOD_FLAG@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FPP = @FPP@
FPPFLAGS = @FPPFLAGS@
FPP_DEFOPT = @FPP_DEFOPT@
FPP_INCOPT = @FPP_INCOPT@
GREP = @GREP@
GRIB_API_INCLUDE = @GRIB_API_INCLUDE@
GRIB_API_LDFLAGS = @GRIB_API_LDFLAGS@
......
This diff is collapsed.
......@@ -38,6 +38,10 @@ LT_INIT([pic-only])
AC_CHECK_TOOL([CC],[gcc],[:])
AC_PROG_CC_C99
AC_PROG_FC
AC_FC_SRCEXT([f90])
AC_LANG_PUSH([Fortran])
AC_PROG_FPP
AC_LANG_POP([Fortran])
AC_PROG_F77
AC_PROG_RANLIB
AC_PROG_CXX
......@@ -95,7 +99,16 @@ AC_ARG_ENABLE(iso-c-interface,
[Create Fortran Interface via iso_c_bindings facility of F2003 [default=no]]).
,enable_isoc=${enableval},enable_isoc=no)
AM_CONDITIONAL([CREATE_ISOC],[test $enable_isoc = 'yes'])
AS_IF([test "x${enable_isoc}" != "xyes"],[AC_SUBST([FC],$F77)])
# in case the Fortran interface uses the more modern F90-style interface,
# the FCFLAGS for users of the library have to include a switch to use the
# .mod file
CDI_F90_INTERFACE_FCFLAGS=''
AS_IF([test "x${enable_isoc}" = "xyes"],
[AC_LANG_PUSH([Fortran])
ACX_SL_FC_CHECK_MOD_PATH_FLAG
AC_LANG_POP([Fortran])
CDI_F90_INTERFACE_FCFLAGS="${FC_MOD_FLAG}${includedir}"])
AC_SUBST([CDI_F90_INTERFACE_FCFLAGS])
# Check the module extension of the fortran compiler
ACX_SL_FC_MOD_SUFFIX(,[FCMODEXT=mod])
# -----------------------------------------------------------------------
......@@ -159,7 +172,8 @@ AC_SUBST([CPPFLAGS])
AS_IF([test "x${replace_cc}" != "x"],[CC=$replace_cc])
AC_OUTPUT(Makefile src/Makefile interfaces/Makefile app/Makefile tests/Makefile examples/Makefile cdi.settings)
AC_OUTPUT([Makefile src/Makefile interfaces/Makefile app/Makefile \
tests/Makefile examples/Makefile cdi.settings src/pkgconfig/cdi.pc])
# ----------------------------------------------------------------------
# Show configuration
......
......@@ -40,12 +40,18 @@ noinst_PROGRAMS = cdi_write$(EXEEXT) cdi_read$(EXEEXT) \
subdir = examples
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
......@@ -126,6 +132,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
......@@ -155,10 +162,16 @@ EXEEXT = @EXEEXT@
F77 = @F77@
FC = @FC@
FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCMODCASE = @FCMODCASE@
FCMODEXT = @FCMODEXT@
FC_MOD_FLAG = @FC_MOD_FLAG@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FPP = @FPP@
FPPFLAGS = @FPPFLAGS@
FPP_DEFOPT = @FPP_DEFOPT@
FPP_INCOPT = @FPP_INCOPT@
GREP = @GREP@
GRIB_API_INCLUDE = @GRIB_API_INCLUDE@
GRIB_API_LDFLAGS = @GRIB_API_LDFLAGS@
......@@ -392,13 +405,13 @@ distclean-compile:
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
.f90.o:
$(FCCOMPILE) -c -o $@ $<
$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
.f90.obj:
$(FCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
.f90.lo:
$(LTFCCOMPILE) -c -o $@ $<
$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
mostlyclean-libtool:
-rm -f *.lo
......
......@@ -48,12 +48,18 @@ noinst_PROGRAMS = $(am__EXEEXT_1)
subdir = interfaces
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
......@@ -114,6 +120,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
......@@ -143,10 +150,16 @@ EXEEXT = @EXEEXT@
F77 = @F77@
FC = @FC@
FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCMODCASE = @FCMODCASE@
FCMODEXT = @FCMODEXT@
FC_MOD_FLAG = @FC_MOD_FLAG@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FPP = @FPP@
FPPFLAGS = @FPPFLAGS@
FPP_DEFOPT = @FPP_DEFOPT@
FPP_INCOPT = @FPP_INCOPT@
GREP = @GREP@
GRIB_API_INCLUDE = @GRIB_API_INCLUDE@
GRIB_API_LDFLAGS = @GRIB_API_LDFLAGS@
......
dnl acx_assert_lang_is_fortran_variant.m4 --- assert a fortran lang is active
dnl
dnl Copyright (C) 2010 Thomas Jahns <jahns@dkrz.de>
dnl
dnl Version: 1.0
dnl Keywords: fortran language version assertion
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
# ACX_ASSERT_LANG_IS_FORTRAN_VARIANT
# Current language must be Fortran or Fortran 77
AC_DEFUN([ACX_ASSERT_LANG_IS_FORTRAN_VARIANT],
[m4_case(_AC_LANG, [Fortran], [],
[Fortran 77], [],
[m4_fatal([$0: current language is not Fortran: ] _AC_LANG)])])
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 acx_lang_other_suffix_conftest.m4 --- create a language test with a suffix
dnl different from the default, i.e.
dnl .inc instead of .f90 for Fortran
dnl headers
dnl
dnl Copyright (C) 2010 Thomas Jahns <jahns@dkrz.de>
dnl
dnl Version: 1.0
dnl Keywords:
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 ACX_LANG_OTHER_SUFFIX_CONFTEST(SUFFIX, SOURCE)
dnl produce source in same language environment as AC_LANG_CONFTEST uses
dnl but change ac_ext to SUFFIX, so that a file conftest.SUFFIX will be
dnl written instead (useful e.g. to produce a header file).
AC_DEFUN([ACX_LANG_OTHER_SUFFIX_CONFTEST],
[m4_define([_ACX_LANG_OLD],_AC_LANG)
AC_LANG_PUSH(_AC_LANG)
ac_ext="$1"
AC_LANG_CONFTEST([$2])
AC_LANG_POP(_ACX_LANG_OLD)
m4_undefine([_ACX_LANG_OLD])
])
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 acx_sl_fc_mod_path_flag.m4 --- find flag to use module from other directory
dnl
dnl Copyright (C) 2010 Thomas Jahns <jahns@dkrz.de>
dnl
dnl Version: 1.0
dnl Keywords:
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
# ACX_SL_FC_MOD_PATH_FLAG([ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
# -------------------------
# Check which flag is necessary to alter the compiler's search path
# for module files.
# This obviously requires that the compiler has some notion of
# module files as separate from object files and some sensible
# method of altering its search path. This will therefore not work
# on early Cray F90 compilers, or on v5 (and 6?) of ifc.
#
# Nearly every compiler I have found uses -Ipath for this purpose;
# Sun F95 v7.1 (at least), uses -Mpath
#
AC_DEFUN([ACX_SL_FC_CHECK_MOD_PATH_FLAG],dnl
[ACX_ASSERT_LANG_IS_FORTRAN_VARIANT
AC_REQUIRE([AC_PROG_FC])
AS_VAR_PUSHDEF([mod_flag],[acx_sl_cv_fc_mod_path_flag_]_AC_LANG_ABBREV)dnl
ASX_VAR_UNSET([mod_flag])
AC_CACHE_CHECK([for flag to alter module search path],[mod_flag],dnl
[mkdir conftestdir
cd conftestdir
AC_COMPILE_IFELSE([AC_LANG_SOURCE([ module cnftst
implicit none
integer :: i
end module cnftst])],,
[AC_MSG_ERROR([Cannot compile fortran modules])])
cd ..
for i in -I -M -module -p; do
FCFLAGS_save=$FCFLAGS
FCFLAGS="$FCFLAGS ${i}conftestdir"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[dnl
use cnftst
implicit none
i = 0
])
],[AS_VAR_SET([mod_flag],[$i]) ; FCFLAGS=$FCFLAGS_save ; break],
[:])
FCFLAGS=$FCFLAGS_save
done
FCFLAGS=$FCFLAGS_save
rm -rf conftestdir
AS_VAR_SET_IF([mod_flag],dnl
[m4_default([$1],[:])],dnl
[m4_default([$2],[AC_MSG_ERROR([Cannot find flag to alter module search path])])])])
FC_MOD_FLAG=AS_VAR_GET([mod_flag])
AC_SUBST([FC_MOD_FLAG])
AS_VAR_POPDEF([mod_flag])dnl
])# ACX_SL_FC_MOD_PATH_FLAG
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 asx_unset.m4 --- unset a shell variable
dnl
dnl Copyright (C) 2010 Thomas Jahns <jahns@dkrz.de>
dnl
dnl Version: 1.0
dnl Keywords:
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 FIXME: this is currently only a placeholder that expects unset to
dnl be present although it's not universally available
dnl
dnl
dnl Code:
dnl
# ASX_VAR_UNSET(VARIABLE)
# ---------------------------
# Unset shell VARIABLE.
# If the variable contains indirections (e.g. `ac_cv_func_$ac_func')
# perform whenever possible at m4 level, otherwise sh level.
AC_DEFUN([ASX_VAR_UNSET],
[AS_LITERAL_IF([$1],
[unset $1],
[unset `eval "$1"`])])
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:
This diff is collapsed.
......@@ -100,7 +100,7 @@ cdilib.c:
cdilib.o: cdilib.c
$(COMPILE) -c $<
LOCALTARGETS =
LOCALTARGETS = pkgconfig/cdi.pc
if CREATE_ISOC
LOCALTARGETS += mo_cdi.o mo_cdi.$(FCMODEXT)
endif
......@@ -113,6 +113,9 @@ mo_cdi.o: mo_cdi.f90
#
mo_cdi.$(FCMODEXT): mo_cdi.f90
$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
pkgconfig/cdi.pc: pkgconfig/cdi.pc.in ../config.status
(cd .. ; ./config.status src/pkgconfig/cdi.pc)
#
all-local: $(LOCALTARGETS)
#
......@@ -121,3 +124,7 @@ CLEANFILES += cdilib.c
if CREATE_ISOC
CLEANFILES += $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o
endif
install-exec-local: pkgconfig/cdi.pc
$(mkinstalldirs) $(libdir)/pkgconfig
$(install_sh_DATA) pkgconfig/cdi.pc $(libdir)/pkgconfig/
......@@ -41,12 +41,18 @@ subdir = src
DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)