mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-25 17:40:27 +08:00
fixed build problems for libcf/gridspec, pnetcdf, and hdf4
This commit is contained in:
parent
1e87ea9cbd
commit
57d743dddb
@ -1416,6 +1416,7 @@ AC_SUBST(HAS_DAP,[$enable_dap])
|
||||
AC_SUBST(HAS_NC2,[$nc_build_v2])
|
||||
AC_SUBST(HAS_NC4,[$enable_netcdf_4])
|
||||
AC_SUBST(HAS_HDF4,[$enable_hdf4])
|
||||
AC_SUBST(HAS_PNETCDF,[$enable_pnetcdf])
|
||||
AC_SUBST(HAS_HDF5,[$enable_netcdf_4])
|
||||
AC_SUBST(HAS_F77,[$nc_build_f77])
|
||||
AC_SUBST(HAS_F90,[$nc_build_f90])
|
||||
@ -1449,6 +1450,13 @@ if test "x$enable_netcdf_4" = xyes ; then
|
||||
fi
|
||||
EXTERN_LDFLAGS="${EXTERN_LDFLAGS} -lmfhdf -ldf"
|
||||
fi
|
||||
if test "x$enable_pnetcdf" = xyes; then
|
||||
if test "x$PNETCDFDIR" != x ; then
|
||||
EXTERN_LDFLAGS="${EXTERN_LDFLAGS} -L$PNETCDFDIR/lib"
|
||||
EXTERN_CFLAGS="${EXTERN_CFLAGS} -I$PNETCDFDIR/include"
|
||||
fi
|
||||
EXTERN_LDFLAGS="${EXTERN_LDFLAGS} -lpnetcdf"
|
||||
fi
|
||||
fi # netcdf-4
|
||||
# Do zlib and szlib if either dap or netcdf4 is enabled
|
||||
if test "x$enable_netcdf_4" = xyes -o "x$enable_dap" = xyes ; then
|
||||
|
@ -22,7 +22,7 @@ endif
|
||||
|
||||
# Does the user want to build the gridspec?
|
||||
if BUILD_GRIDSPEC
|
||||
GRIDSPEC = gridspec
|
||||
#GRIDSPEC = gridspec
|
||||
endif
|
||||
|
||||
SUBDIRS = $(GRIDSPEC) src $(CFCHECK) $(DOC)
|
||||
|
@ -5,8 +5,6 @@
|
||||
# This automake file is in charge of building the gridspec
|
||||
# tools/shared convenience library.
|
||||
|
||||
# $Id: Makefile.am,v 1.5 2010/05/29 01:46:31 dmh Exp $
|
||||
|
||||
noinst_LTLIBRARIES = libshared.la
|
||||
libshared_la_SOURCES = constant.h create_xgrid.c create_xgrid.h \
|
||||
gradient_c2l.c gradient_c2l.h interp.c interp.h mosaic_util.c \
|
||||
@ -18,8 +16,8 @@ LDADD =
|
||||
|
||||
AM_CPPFLAGS += -I${top_srcdir}/src
|
||||
|
||||
AM_CPPFLAGS += ${top_srcdir}../liblib
|
||||
AM_LDFLAGS += ${top_builddir}../liblib/libnetcdf.la
|
||||
AM_CPPFLAGS += ${top_srcdir}/../liblib
|
||||
AM_LDFLAGS += ${top_builddir}/../liblib/libnetcdf.la
|
||||
|
||||
AM_LDFLAGS += @EXTERN_LDFLAGS@ -lm
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
# This automake file is in charge of building the gridspec make_hgrid
|
||||
# tools.
|
||||
|
||||
# $Id: Makefile.am,v 1.8 2010/05/29 01:46:33 dmh Exp $
|
||||
|
||||
bin_PROGRAMS = make_hgrid gs_make_hgrid
|
||||
make_hgrid_SOURCES = make_hgrid.c create_conformal_cubic_grid.c \
|
||||
create_gnomonic_cubic_grid.c create_grid_from_file.c create_hgrid.h \
|
||||
@ -15,20 +13,26 @@ gs_make_hgrid_SOURCES = gs_make_hgrid.c create_conformal_cubic_grid.c \
|
||||
create_gnomonic_cubic_grid.c create_grid_from_file.c create_hgrid.h \
|
||||
create_lonlat_grid.c
|
||||
|
||||
AM_CPPFLAGS = -I${top_srcdir}/shared -I${top_srcdir}/shared/mosaic \
|
||||
-I${top_srcdir}/gridspec/shared -I${top_srcdir}/gridspec/shared/mosaic \
|
||||
-I${top_srcdir}/make_hgrid -I${top_srcdir}/gridspec/tools/fregrid \
|
||||
-I${top_srcdir}/gridspec/tools/shared \
|
||||
-I${top_srcdir}/gridspec/tools/make_coupler_mosaic \
|
||||
-I${top_srcdir}/gridspec/tools/make_topog \
|
||||
-I${top_srcdir}/gridspec/tools/make_hgrid \
|
||||
-I${top_srcdir}/gridspec/tools/make_solo_mosaic \
|
||||
-I${top_srcdir}/gridspec/tools/make_vgrid \
|
||||
-I${top_srcdir}/gridspec/tools/river_regrid \
|
||||
-I${top_srcdir}/gridspec/tools/transfer_to_mosaic_grid
|
||||
|
||||
# Initalize these.
|
||||
AM_CPPFLAGS =
|
||||
AM_LDFLAGS =
|
||||
LDADD =
|
||||
|
||||
AM_CPPFLAGS += -I${top_srcdir}/shared -I${top_srcdir}/shared/mosaic
|
||||
AM_LDFLAGS += -L${top_builddir}/shared -L${top_builddir}/shared/mosaic -ltoolsshared -lshared
|
||||
AM_LDFLAGS = -L${top_builddir}/gridspec/shared \
|
||||
-L${top_builddir}/gridspec/shared/mosaic -ltoolsshared -lshared
|
||||
|
||||
if USE_NETCDF_DIR
|
||||
AM_CPPFLAGS += -I@NETCDFDIR@/include
|
||||
AM_LDFLAGS += -L@NETCDFDIR@/lib
|
||||
else
|
||||
AM_CPPFLAGS += -I${top_srcdir}/../liblib
|
||||
AM_CPPFLAGS += -I${top_srcdir}/.. -I${top_srcdir}/../liblib
|
||||
AM_LDFLAGS += ${top_builddir}/../liblib/libnetcdf.la
|
||||
endif
|
||||
|
||||
|
@ -15,33 +15,27 @@ create_conformal_cubic_grid.c fregrid_util.c conserve_interp.c \
|
||||
bilinear_interp.c topog.c get_contact.c create_vgrid.c \
|
||||
transfer_to_mosaic.c
|
||||
|
||||
|
||||
# Initalize these.
|
||||
AM_CPPFLAGS =
|
||||
AM_LDFLAGS =
|
||||
LDADD =
|
||||
|
||||
AM_CPPFLAGS +=\
|
||||
-I${top_srcdir}/shared \
|
||||
-I${top_srcdir}/shared/mosaic \
|
||||
-I${top_srcdir}/make_hgrid \
|
||||
-I${top_srcdir}/fregrid \
|
||||
-I${top_srcdir}/make_coupler_mosaic \
|
||||
-I${top_srcdir}/make_topog \
|
||||
-I${top_srcdir}/make_solo_mosaic \
|
||||
-I${top_srcdir}/make_vgrid \
|
||||
-I${top_srcdir}/river_regrid \
|
||||
-I${top_srcdir}/transfer_to_mosaic_grid
|
||||
AM_CPPFLAGS = -I${top_srcdir}/gridspec/shared \
|
||||
-I${top_srcdir}/gridspec/shared/mosaic -I${top_srcdir}/make_hgrid \
|
||||
-I${top_srcdir}/gridspec/tools/fregrid \
|
||||
-I${top_srcdir}/gridspec/tools/make_coupler_mosaic \
|
||||
-I${top_srcdir}/gridspec/tools/make_topog \
|
||||
-I${top_srcdir}/gridspec/tools/make_hgrid \
|
||||
-I${top_srcdir}/gridspec/tools/make_solo_mosaic \
|
||||
-I${top_srcdir}/gridspec/tools/make_vgrid \
|
||||
-I${top_srcdir}/gridspec/tools/river_regrid \
|
||||
-I${top_srcdir}/gridspec/tools/transfer_to_mosaic_grid
|
||||
|
||||
if USE_NETCDF_DIR
|
||||
AM_CPPFLAGS += -I@NETCDFDIR@/include
|
||||
AM_LDFLAGS += -L@NETCDFDIR@/lib
|
||||
else
|
||||
AM_CPPFLAGS += -I${top_srcdir}/../liblib
|
||||
AM_CPPFLAGS += -I${top_srcdir}/.. -I${top_srcdir}/../liblib
|
||||
AM_LDFLAGS += ${top_builddir}/../liblib/libnetcdf.la
|
||||
endif
|
||||
|
||||
AM_LDFLAGS += @EXTERN_LDFLAGS@ -lm
|
||||
|
||||
|
||||
|
||||
|
@ -167,26 +167,10 @@ tst_interops4 tst_interops5 tst_enums tst_vars2 tst_vars3 tst_chunks \
|
||||
tst_coords tst_coords2 tst_coords3 tst_utf8 tst_fills tst_fillbug \
|
||||
$(TST_V2) tst_xplatform tst_xplatform2 tst_h_atts2 tst_endian_fill
|
||||
|
||||
if USE_HDF4
|
||||
check_PROGRAMS += tst_interops2
|
||||
TESTS += tst_interops2
|
||||
if USE_HDF4_FILE_TESTS
|
||||
check_PROGRAMS += tst_interops3
|
||||
TESTS += run_get_hdf4_files.sh tst_interops3
|
||||
endif # USE_HDF4_FILE_TESTS
|
||||
tst_interops2_LDADD = ${lib_LTLIBRARIES} -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lz
|
||||
endif # USE_HDF4
|
||||
|
||||
# Thee tst_lists programs needs to be fixed
|
||||
# to match libsrc/nclistmgr.c
|
||||
#check_PROGRAMS += tst_lists
|
||||
#TESTS += tst_lists
|
||||
|
||||
EXTRA_DIST = ref_tst_compounds.nc ref_tst_h_compounds.h5 \
|
||||
ref_tst_h_compounds2.h5 run_par_tests.sh run_valgrind_tests.sh \
|
||||
run_hdf4_valgrind_tests.sh ref_tst_xplatform2_1.nc \
|
||||
ref_tst_xplatform2_2.nc ref_tst_dims.nc run_get_hdf4_files.sh \
|
||||
ref_tst_interops4.nc stub4.c
|
||||
EXTRA_DIST = ref_tst_compounds.nc ref_tst_h_compounds.h5 \
|
||||
ref_tst_h_compounds2.h5 run_par_tests.sh run_valgrind_tests.sh \
|
||||
run_hdf4_valgrind_tests.sh ref_tst_xplatform2_1.nc \
|
||||
ref_tst_xplatform2_2.nc ref_tst_dims.nc ref_tst_interops4.nc stub4.c
|
||||
|
||||
# (The above does not include tst_h_converts, which won't work until I
|
||||
# sort out the MAX_INT problem. - Ed)
|
||||
@ -235,14 +219,3 @@ endif # USE_VALGRIND_TESTS
|
||||
CLEANFILES = tst_nc_converts.nc tst_h_*.h5 tst_*.nc tst_interops*.h5 \
|
||||
tst_interops2.h4 tst_interops4.nc AMSR_E_* MYD29.A2*
|
||||
|
||||
DISTCLEANFILES =
|
||||
|
||||
if USE_HDF4_FILE_TESTS
|
||||
DISTCLEANFILES += AMSR_E_L2_Rain_V10_200905312326_A.hdf \
|
||||
AMSR_E_L3_DailyLand_V06_20020619.hdf \
|
||||
MYD29.A2009152.0000.005.2009153124331.hdf \
|
||||
MYD29.A2002185.0000.005.2007160150627.hdf \
|
||||
MOD29.A2000055.0005.005.2006267200024.hdf
|
||||
endif # HDF4_FILE_TESTS
|
||||
|
||||
test: check
|
||||
|
@ -22,6 +22,7 @@ has_dap="@HAS_DAP@"
|
||||
has_nc2="@HAS_NC2@"
|
||||
has_nc4="@HAS_NC4@"
|
||||
has_hdf4="@HAS_HDF4@"
|
||||
has_pnetcdf="@HAS_PNETCDF@"
|
||||
has_hdf5="@HAS_HDF5@"
|
||||
has_f77="@HAS_F77@"
|
||||
has_f90="@HAS_F90@"
|
||||
@ -48,6 +49,7 @@ Available values for OPTION include:
|
||||
--has-nc4 whether NetCDF-4/HDF-5 is enabled in this build
|
||||
--has-hdf5 whether HDF5 is used in build (always the same as --has-nc4)
|
||||
--has-hdf4 whether HDF4 was used in build
|
||||
--has-pnetcdf whether parallel-netcdf (a.k.a. pnetcdf) was used in build
|
||||
--has-f77 whether Fortran 77 API is enabled in this build
|
||||
--has-f90 whether Fortran 90 API is enabled in this build
|
||||
--has-c++ whether C++ API is enabled in this build
|
||||
@ -86,6 +88,7 @@ all()
|
||||
echo " --has-nc4 -> $has_nc4"
|
||||
echo " --has-hdf5 -> $has_hdf5"
|
||||
echo " --has-hdf4 -> $has_hdf4"
|
||||
echo " --has-pnetcdf-> $has_pnetcdf"
|
||||
echo " --has-szlib -> $has_szlib"
|
||||
echo
|
||||
echo " --prefix -> $prefix"
|
||||
@ -161,6 +164,10 @@ while test $# -gt 0; do
|
||||
echo $has_hdf4
|
||||
;;
|
||||
|
||||
--has-pnetcdf)
|
||||
echo $has_pnetcdf
|
||||
;;
|
||||
|
||||
--has-hdf5)
|
||||
echo $has_hdf5
|
||||
;;
|
||||
|
@ -7,8 +7,6 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.72 2010/05/29 00:44:02 dmh Exp $
|
||||
|
||||
if USE_NETCDF4
|
||||
|
||||
AM_LDFLAGS = ${top_builddir}/liblib/libnetcdf.la @EXTERN_LDFLAGS@
|
||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)/liblib @EXTERN_CFLAGS@
|
||||
|
||||
@ -47,6 +45,18 @@ benchmarks: check
|
||||
./run_bm_ar4.sh
|
||||
endif # BUILD_BENCHMARKS
|
||||
|
||||
# These are the tests for HDF4.
|
||||
if USE_HDF4
|
||||
check_PROGRAMS += tst_interops2
|
||||
TESTS += tst_interops2
|
||||
if USE_HDF4_FILE_TESTS
|
||||
check_PROGRAMS += tst_interops3
|
||||
TESTS += run_get_hdf4_files.sh tst_interops3
|
||||
endif # USE_HDF4_FILE_TESTS
|
||||
tst_interops2_LDADD = ${lib_LTLIBRARIES} -lmfhdf -ldf -ljpeg -lhdf5_hl \
|
||||
-lhdf5 -lz
|
||||
endif # USE_HDF4
|
||||
|
||||
CLEANFILES = cdm_sea_soundings.nc tst_large.nc bm_chunking.nc \
|
||||
bm_radar.nc bm_radar1.nc radar_3d_compression_test.txt \
|
||||
radar_3d_compression.txt radar_2d_compression.txt \
|
||||
@ -73,9 +83,17 @@ endif
|
||||
|
||||
EXTRA_DIST = run_par_test.sh run_bm.sh run_bm_test1.sh run_bm_test2.sh \
|
||||
run_bm_radar_2D.sh run_bm_radar_2D_compression1.sh run_par_bm_test.sh \
|
||||
run_bm_elena.sh run_par_bm_radar_2D.sh run_bm_radar_2D_endianness1.sh \
|
||||
run_tst_chunks.sh ref_chunks1.cdl ref_chunks2.cdl run_pnetcdf_test.sh
|
||||
run_bm_elena.sh run_par_bm_radar_2D.sh run_bm_radar_2D_endianness1.sh \
|
||||
run_tst_chunks.sh ref_chunks1.cdl ref_chunks2.cdl run_pnetcdf_test.sh \
|
||||
run_get_hdf4_files.sh
|
||||
|
||||
if USE_HDF4_FILE_TESTS
|
||||
DISTCLEANFILES = AMSR_E_L2_Rain_V10_200905312326_A.hdf \
|
||||
AMSR_E_L3_DailyLand_V06_20020619.hdf \
|
||||
MYD29.A2009152.0000.005.2009153124331.hdf \
|
||||
MYD29.A2002185.0000.005.2007160150627.hdf \
|
||||
MOD29.A2000055.0005.005.2006267200024.hdf
|
||||
endif # HDF4_FILE_TESTS
|
||||
|
||||
endif # BUILD_NETCDF4
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <nc_tests.h>
|
||||
#include <hdf5.h>
|
||||
#include <H5DSpublic.h>
|
||||
#include <mfhdf.h>
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
# $Id: Makefile.am,v 1.54 2010/05/29 00:42:11 dmh Exp $
|
||||
|
||||
AM_LDFLAGS =
|
||||
AM_CPPFLAGS = -I${top_srcdir}
|
||||
AM_LDFLAGS = @EXTERN_LDFLAGS@
|
||||
AM_CPPFLAGS = -I${top_srcdir} @EXTERN_CFLAGS@
|
||||
LDADD =
|
||||
|
||||
LDADD += ${top_builddir}/liblib/libnetcdf.la @EXTERN_LDFLAGS@
|
||||
|
Loading…
x
Reference in New Issue
Block a user