mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
1. Fix conflicts with current master.
2. There is a bug in building tinyxml2 under OSX, so as a hack, the absence of an installed libxml2 under OSX will disable libxml2 and DAP4.
This commit is contained in:
parent
ad4a3f69b9
commit
6d44ec39f6
29
.github/workflows/mingw.yml
vendored
29
.github/workflows/mingw.yml
vendored
@ -1,29 +0,0 @@
|
||||
name: NetCDF-Build MinGW
|
||||
on: [workflow_dispatch,push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: git mingw-w64-x86_64-toolchain automake libtool autoconf make mingw-w64-x86_64-hdf5 unzip
|
||||
- name: CI-Build
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
echo 'Running in MSYS2!'
|
||||
set -e
|
||||
pwd
|
||||
git clone --single-branch --branch moreosfixes.tmp https://github.com/DennisHeimbigner/netcdf-c.git
|
||||
cd netcdf-c
|
||||
autoreconf -i --force
|
||||
./configure --prefix=/builddir -enable-shared --disable-static --disable-plugins --disable-logging --disable-dap-remote-tests --disable-byterange
|
||||
make -j LDFLAGS="-no-undefined -Wl,--export-all-symbols"
|
||||
make check
|
||||
|
2
.github/workflows/run_tests_win_mingw.yml
vendored
2
.github/workflows/run_tests_win_mingw.yml
vendored
@ -7,7 +7,7 @@
|
||||
name: Run MSYS2, MinGW64-based Tests
|
||||
|
||||
|
||||
on: [ pull_request ]
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
|
@ -1747,6 +1747,7 @@ CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
|
||||
CHECK_FUNCTION_EXISTS(strdup HAVE_STRDUP)
|
||||
CHECK_FUNCTION_EXISTS(strndup HAVE_STRNDUP)
|
||||
CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
|
||||
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
||||
CHECK_FUNCTION_EXISTS(strtoull HAVE_STRTOULL)
|
||||
CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
|
||||
CHECK_FUNCTION_EXISTS(mktemp HAVE_MKTEMP)
|
||||
|
@ -346,12 +346,6 @@ are set when opening a binary file on Windows. */
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#cmakedefine HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#cmakedefine HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strndup` function. */
|
||||
#cmakedefine HAVE_STRNDUP
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#cmakedefine HAVE_STRINGS_H 1
|
||||
|
||||
@ -367,6 +361,15 @@ are set when opening a binary file on Windows. */
|
||||
/* Define to 1 if you have the <libgen.h> header file. */
|
||||
#cmakedefine HAVE_LIBGEN_H 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#cmakedefine HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strndup` function. */
|
||||
#cmakedefine HAVE_STRNDUP
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp` function. */
|
||||
#cmakedefine HAVE_STRCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
|
||||
|
85
configure.ac
85
configure.ac
@ -523,6 +523,45 @@ fi
|
||||
|
||||
CFLAGS="$SAVECFLAGS"
|
||||
|
||||
###
|
||||
# Libxml2 control block.
|
||||
###
|
||||
|
||||
AC_MSG_CHECKING([whether to search for and use external libxml2])
|
||||
AC_ARG_ENABLE([libxml2],
|
||||
[AS_HELP_STRING([--disable-libxml2],
|
||||
[disable detection and use of libxml2 in favor of the bundled ezxml interpreter])])
|
||||
test "x$enable_libxml2" = xno || enable_libxml2=yes
|
||||
AC_MSG_RESULT([$enable_libxml2])
|
||||
|
||||
have_libxml2=no
|
||||
if test "x$enable_libxml2" = xyes; then
|
||||
# We can optionally use libxml2 for DAP4, if available
|
||||
AC_CHECK_LIB([xml2],[xmlReadMemory],[have_libxml2=yes],[have_libxml2=no])
|
||||
if test "x$have_libxml2" = "xyes" ; then
|
||||
AC_SEARCH_LIBS([xmlReadMemory],[xml2 xml2.dll cygxml2.dll], [],[])
|
||||
fi
|
||||
if test "x$have_libxml2" = xyes; then
|
||||
XML2FLAGS=`xml2-config --cflags`
|
||||
AC_SUBST([XML2FLAGS],${XML2FLAGS})
|
||||
AC_DEFINE([HAVE_LIBXML2], [1], [if true, use libxml2])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_libxml2" = xyes; then
|
||||
XMLPARSER="libxml2"
|
||||
else
|
||||
XMLPARSER="tinyxml2 (bundled)"
|
||||
fi
|
||||
|
||||
# Need a condition and subst for this
|
||||
AM_CONDITIONAL(ENABLE_LIBXML2, [test "x$enable_libxml2" = xyes])
|
||||
AC_SUBST([XMLPARSER],[${XMLPARSER}])
|
||||
|
||||
###
|
||||
# End Libxml2 block
|
||||
###
|
||||
|
||||
# --enable-dap => enable-dap4
|
||||
enable_dap4=$enable_dap
|
||||
AC_MSG_CHECKING([whether dap remote testing should be enabled])
|
||||
@ -1046,55 +1085,21 @@ AC_CHECK_FUNCS([strlcat snprintf strcasecmp fileno \
|
||||
AC_CHECK_FUNCS([clock_gettime])
|
||||
AC_CHECK_TYPES([struct timespec])
|
||||
|
||||
# disable dap4 if netcdf-4 is disabled
|
||||
#if test "x$enable_netcdf_4" = "xno" ; then
|
||||
# disable dap4 if hdf5 is disabled
|
||||
if test "x$enable_hdf5" = "xno" ; then
|
||||
AC_MSG_WARN([netcdf-4 not enabled; disabling DAP4])
|
||||
enable_dap4=no
|
||||
fi
|
||||
|
||||
if test "x$ISOSX" = xyes && "x$have_libxml2" = xno ; then
|
||||
AC_MSG_ERROR([Error: OSX requires libxml2 => --disable-dap4.])
|
||||
enable_dap4=no
|
||||
fi
|
||||
|
||||
if test "x$enable_dap4" = xyes; then
|
||||
AC_DEFINE([ENABLE_DAP4], [1], [if true, build DAP4 Client])
|
||||
fi
|
||||
|
||||
###
|
||||
# Libxml2 control block.
|
||||
###
|
||||
|
||||
AC_MSG_CHECKING([whether to search for and use external libxml2])
|
||||
AC_ARG_ENABLE([libxml2],
|
||||
[AS_HELP_STRING([--disable-libxml2],
|
||||
[disable detection and use of libxml2 in favor of the bundled ezxml interpreter])])
|
||||
test "x$enable_libxml2" = xno && enable_libxml2=yes
|
||||
AC_MSG_RESULT($enable_libxml2)
|
||||
|
||||
if test "x$enable_libxml2" = xyes; then
|
||||
# We can optionally use libxml2 for DAP4, if available
|
||||
AC_CHECK_LIB([xml2],[xmlReadMemory],[have_libxml2=yes],[have_libxml2=no])
|
||||
if test "x$have_libxml2" = "xyes" ; then
|
||||
AC_SEARCH_LIBS([xmlReadMemory],[xml2 xml2.dll cygxml2.dll], [],[])
|
||||
fi
|
||||
if test "x$have_libxml2" = xyes; then
|
||||
XML2FLAGS=`xml2-config --cflags`
|
||||
AC_SUBST([XML2FLAGS],${XML2FLAGS})
|
||||
AC_DEFINE([HAVE_LIBXML2], [1], [if true, use libxml2])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_libxml2" = xyes; then
|
||||
XMLPARSER="libxml2"
|
||||
else
|
||||
XMLPARSER="tinyxml2 (bundled)"
|
||||
fi
|
||||
|
||||
# Need a condition and subst for this
|
||||
AM_CONDITIONAL(ENABLE_LIBXML2, [test "x$enable_libxml2" = xyes])
|
||||
AC_SUBST([XMLPARSER],[${XMLPARSER}])
|
||||
|
||||
###
|
||||
# End Libxml2 block
|
||||
###
|
||||
|
||||
# check for useful, but not essential, memio support
|
||||
AC_CHECK_FUNCS([memmove getpagesize sysconf])
|
||||
|
||||
|
@ -10,6 +10,7 @@ include $(top_srcdir)/lib_flags.am
|
||||
#SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
|
||||
#LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
|
||||
#TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
|
||||
#TESTS_ENVIRONMENT = export SETX=1;
|
||||
|
||||
# Note which tests depend on other tests. Necessary for make -j check.
|
||||
TEST_EXTENSIONS = .sh
|
||||
|
@ -44,7 +44,7 @@ main(int argc, char** argv)
|
||||
snprintf(url,sizeof(url),"file://%s#dap4&debug=copy%s%s%s",
|
||||
argv[0],
|
||||
(argc >= 3 ? "&substratename=" : ""),
|
||||
(argc >= 3 ? "argv[1]" : ""),
|
||||
(argc >= 3 ? argv[1] : ""),
|
||||
#ifdef DEBUG
|
||||
"&log"
|
||||
#else
|
||||
|
@ -70,7 +70,7 @@ int snprintf(char*, size_t, const char*, ...);
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
#ifndef strcasecmp
|
||||
int strcasecmp(const char*, const char*);
|
||||
extern int strcasecmp(const char*, const char*);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -29,12 +29,13 @@ endif
|
||||
|
||||
EXTRA_DIST = CMakeLists.txt license.txt
|
||||
|
||||
# Download the tinyxml2 source
|
||||
# Download and massage the tinyxml2 source
|
||||
REPO = https://github.com/leethomason/tinyxml2.git
|
||||
tinyxml2::
|
||||
rm -fr ./tinyxml2 ./license.txt
|
||||
git clone --depth=1 ${REPO}
|
||||
cat tinyxml2/LICENSE.txt > ./license.txt
|
||||
cat tinyxml2/tinyxml2.h > ./tinyxml2.h
|
||||
cat tinyxml2/tinyxml2.cpp > ./tinyxml2.cpp
|
||||
sed -e 's/__BORLANDC__/__APPLE__/' < tinyxml2/tinyxml2.cpp \
|
||||
| sed -e 's/ptrdiff_t/long/g' > ./tinyxml2.cpp
|
||||
rm -fr tinyxml2
|
||||
|
@ -24,7 +24,7 @@ distribution.
|
||||
#include "tinyxml2.h"
|
||||
|
||||
#include <new> // yes, this one new style header, is in the Android SDK.
|
||||
#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__)
|
||||
#if defined(ANDROID_NDK) || defined(__APPLE__) || defined(__QNXNTO__)
|
||||
# include <stddef.h>
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
@ -476,7 +476,7 @@ const char* XMLUtil::GetCharacterRef( const char* p, char* value, int* length )
|
||||
if ( *(p+1) == '#' && *(p+2) ) {
|
||||
unsigned long ucs = 0;
|
||||
TIXMLASSERT( sizeof( ucs ) >= 4 );
|
||||
ptrdiff_t delta = 0;
|
||||
long delta = 0;
|
||||
unsigned mult = 1;
|
||||
static const char SEMICOLON = ';';
|
||||
|
||||
|
@ -7,7 +7,6 @@ set -e
|
||||
|
||||
# For a netCDF-4 build, test nccopy on netCDF files in this directory
|
||||
|
||||
echo "@@@@@@"
|
||||
if test -f tst_group_data${ext} ; then ${execdir}/tst_group_data ; fi
|
||||
if test -f tst_enum_data${ext} ; then ${execdir}/tst_enum_data ; fi
|
||||
if test -f tst_comp${ext} ; then ${execdir}/tst_comp ; fi
|
||||
|
@ -60,9 +60,6 @@ MISCPATH="${HDF5_PLUGIN_PATH}/${HDF5_PLUGIN_LIB}"
|
||||
if ! test -f ${BZIP2PATH} ; then echo "Unable to locate ${BZIP2PATH}"; exit 1; fi
|
||||
if ! test -f ${MISCPATH} ; then echo "Unable to locate ${MISCPATH}"; exit 1; fi
|
||||
|
||||
echo "@@@@@@@@@@@"
|
||||
find ${HDF5_PLUGIN_PATH}
|
||||
|
||||
# Execute the specified tests
|
||||
|
||||
testapi() {
|
||||
|
Loading…
Reference in New Issue
Block a user