diff --git a/.autom4te.cfg b/.autom4te.cfg deleted file mode 100644 index 3872ddb4400..00000000000 --- a/.autom4te.cfg +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -## ------------------ ## -## User Preferences. ## -## ------------------ ## - -begin-language: "Autoconf" -args: --no-cache -end-language: "Autoconf" diff --git a/.github/workflows/aocc-auto.yml b/.github/workflows/aocc-auto.yml deleted file mode 100644 index 8b33173db53..00000000000 --- a/.github/workflows/aocc-auto.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: hdf5 dev PAR autotools aocc ompi - -# Triggers the workflow on a call from another workflow -on: - workflow_call: - inputs: - build_mode: - description: "release vs. debug build" - required: true - type: string - -permissions: - contents: read - -jobs: - aocc_build_and_test: - name: "aocc ${{ inputs.build_mode }}" - runs-on: ubuntu-latest - steps: - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: Install Dependencies - shell: bash - run: | - sudo apt update - sudo apt install -y autoconf automake libtool libtool-bin libaec-dev - sudo apt install -y doxygen libncurses-dev libquadmath0 libstdc++6 libxml2 - sudo apt install -y zlib1g-dev libcurl4-openssl-dev libjpeg-dev wget curl bzip2 - sudo apt install -y m4 flex bison cmake libzip-dev openssl build-essential - - - name: Install AOCC 4.2.0 - shell: bash - run: | - wget https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0.tar - tar -xvf aocc-compiler-4.2.0.tar - cd aocc-compiler-4.2.0 - bash install.sh - source /home/runner/work/hdf5/hdf5/setenv_AOCC.sh - which clang - which flang - clang -v - - - name: Cache OpenMPI 4.1.6 installation - id: cache-openmpi-4_1_6 - uses: actions/cache@v4 - with: - path: /home/runner/work/hdf5/hdf5/openmpi-4.1.6-install - key: ${{ runner.os }}-${{ runner.arch }}-openmpi-4_1_6-cache - - - name: Install OpenMPI 4.1.6 - if: ${{ steps.cache-openmpi-4_1_6.outputs.cache-hit != 'true' }} - run: | - export LD_LIBRARY_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib:/usr/local/lib - wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.gz - tar zxvf openmpi-4.1.6.tar.gz - cd openmpi-4.1.6 - ./configure CC=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/bin/clang FC=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/bin/flang --prefix=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install - make - make install - - - name: Autotools Configure - env: - NPROCS: 2 - run: | - export LD_LIBRARY_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib - export LD_RUN_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib - export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CC=mpicc $GITHUB_WORKSPACE/configure \ - --prefix=/tmp \ - --enable-build-mode=${{ inputs.build_mode }} \ - --enable-shared \ - --enable-parallel \ - --enable-subfiling-vfd \ - LDFLAGS="-L/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib \ - -L/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib" - - - name: Autotools Build - shell: bash - run: | - export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH - make -j3 - working-directory: ${{ runner.workspace }}/build - - # ph5diff tests are in the tools/tests directory so they will get run - # here, so leave NPROCS set here as well - - name: Autotools Run Tests - env: - NPROCS: 2 - run: | - export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH - cd test && make check -j2 && cd .. - cd tools && make check -j2 && cd .. - cd hl && make check -j2 && cd .. - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Run Parallel Tests - env: - NPROCS: 2 - run: | - export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH - cd testpar && make check && cd .. - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Install - run: | - export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH - make install - working-directory: ${{ runner.workspace }}/build diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml deleted file mode 100644 index a202076005a..00000000000 --- a/.github/workflows/autotools.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: hdf5 dev autotools CI - -# Triggers the workflow on push or pull request or on demand -on: - workflow_dispatch: - push: - pull_request: - branches: [ develop ] - paths-ignore: - - '.github/CODEOWNERS' - - '.github/FUNDING.yml' - - 'doc/**' - - 'release_docs/**' - - 'ACKNOWLEDGEMENTS' - - 'COPYING**' - - '**.md' - -# Using concurrency to cancel any in-progress job or run -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - call-workflow-special-autotools: - name: "Autotools Special Workflows" - uses: ./.github/workflows/main-auto-spc.yml - - call-parallel-special-autotools: - name: "Autotools Parallel Special Workflows" - uses: ./.github/workflows/main-auto-par-spc.yml - - call-debug-parallel-autotools: - name: "Autotools Parallel Workflows" - uses: ./.github/workflows/main-auto-par.yml - with: - build_mode: "debug" - - call-release-parallel-autotools: - name: "Autotools Parallel Workflows" - uses: ./.github/workflows/main-auto-par.yml - with: - build_mode: "production" - - call-debug-thread-autotools: - name: "Autotools Debug Thread-Safety Workflows" - uses: ./.github/workflows/main-auto.yml - with: - thread_safety: enable - build_mode: "debug" - - call-release-thread-autotools: - name: "Autotools Release Thread-Safety Workflows" - uses: ./.github/workflows/main-auto.yml - with: - thread_safety: enable - build_mode: "production" - - call-debug-autotools: - name: "Autotools Debug Workflows" - uses: ./.github/workflows/main-auto.yml - with: - thread_safety: disable - build_mode: "debug" - - call-release-autotools: - name: "Autotools Release Workflows" - uses: ./.github/workflows/main-auto.yml - with: - thread_safety: disable - build_mode: "production" - - call-release-auto-intel: - name: "Autotools Intel Workflows" - uses: ./.github/workflows/intel-auto.yml - with: - build_mode: "production" - - call-release-auto-nvhpc: - name: "Autotools nvhpc Workflows" - uses: ./.github/workflows/nvhpc-auto.yml - with: - build_mode: "production" - - call-release-auto-aocc: - name: "Autotools aocc Workflows" - uses: ./.github/workflows/aocc-auto.yml - with: - build_mode: "production" - - call-release-auto-cygwin: - name: "Autotools Cygwin Workflows" - uses: ./.github/workflows/cygwin-auto.yml - with: - build_mode: "production" - - call-release-auto-xpr: - name: "Autotools TestExpress Workflows" - uses: ./.github/workflows/testxpr-auto.yml - - call-release-auto-julia: - name: "Autotools Julia Workflows" - uses: ./.github/workflows/julia-auto.yml - with: - build_mode: "production" - -# workflow-msys2-autotools: -# name: "CMake msys2 Workflows" -# uses: ./.github/workflows/msys2-auto.yml -# with: -# build_mode: "production" -# build_option: "--enable-production" - - diff --git a/.github/workflows/cve.yml b/.github/workflows/cve.yml index a3abb664897..de383a8e4a4 100644 --- a/.github/workflows/cve.yml +++ b/.github/workflows/cve.yml @@ -15,36 +15,64 @@ on: - 'COPYING**' - '**.md' +permissions: + contents: read + # Using concurrency to cancel any in-progress job or run concurrency: group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} cancel-in-progress: true -permissions: - contents: read - jobs: build: name: CVE regression runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.7 + - name: Install System dependencies + run: | + sudo apt-get update + sudo apt-get install ninja-build + sudo apt install libssl3 libssl-dev libcurl4 + sudo apt install -y libaec-dev zlib1g-dev libcurl4-openssl-dev wget curl bzip2 flex bison cmake libzip-dev openssl - - name: Install Autotools Dependencies (Linux) + - name: Checkout HDF5 + uses: actions/checkout@v4.1.7 + + - name: CMake Configure run: | - sudo apt update - sudo apt install automake autoconf libtool libtool-bin + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ + -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ + -DHDF5_BUILD_FORTRAN=OFF \ + -DHDF5_BUILD_JAVA=OFF \ + -DHDF5_BUILD_DOC=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \ + $GITHUB_WORKSPACE + shell: bash + + - name: CMake Build + run: cmake --build . --parallel 3 --config Debug + working-directory: ${{ runner.workspace }}/build + - name: Install HDF5 run: | - ./autogen.sh - ./configure --prefix=/usr/local --disable-tests - make - sudo make install + sudo cmake --install . --config Debug --prefix="/usr/local" + working-directory: ${{ runner.workspace }}/build + - name: Checkout CVE test repository uses: actions/checkout@v4.1.7 with: repository: HDFGroup/cve_hdf5 path: cve_hdf5 + - name: Run regression tests run: | cd cve_hdf5 diff --git a/.github/workflows/cygwin-auto.yml b/.github/workflows/cygwin-auto.yml deleted file mode 100644 index 8f1acb1ab7d..00000000000 --- a/.github/workflows/cygwin-auto.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: hdf5 dev autotools cygwin - -# Triggers the workflow on a call from another workflow -on: - workflow_call: - inputs: - build_mode: - description: "release vs. debug build" - required: true - type: string - -permissions: - contents: read - -jobs: - cygwin_build_and_test: - name: "cygwin ${{ inputs.build_mode }}" - runs-on: windows-latest - timeout-minutes: 30 - steps: - - name: Set git to use LF - run: | - git config --global core.autocrlf input - - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: Install Cygwin - uses: cygwin/cygwin-install-action@master - with: - packages: autoconf automake make gcc-fortran libtool zlib-devel m4 flex bison perl - - - name: Autotools Configure - shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' - run: | - export PATH=/usr/bin:$PATH - sh ./autogen.sh - mkdir build - cd build - ../configure \ - --enable-build-mode=${{ inputs.build_mode }} \ - --enable-shared \ - --enable-fortran - - - name: Autotools Build - shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' - run: | - export PATH=/usr/bin:$PATH - cd build - make -j3 - - - name: Autotools Run Tests - shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' - run: | - export PATH=/usr/bin:$PATH - cd build -# make check -j ---- cache test fails - - - name: Autotools Install - shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' - run: | - export PATH=/usr/bin:$PATH - cd build - make install diff --git a/.github/workflows/hdfeos5.yml b/.github/workflows/hdfeos5.yml index 0d5cf969382..f3e88ef09d0 100644 --- a/.github/workflows/hdfeos5.yml +++ b/.github/workflows/hdfeos5.yml @@ -15,31 +15,59 @@ on: - 'COPYING**' - '**.md' +permissions: + contents: read + # Using concurrency to cancel any in-progress job or run concurrency: group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} cancel-in-progress: true -permissions: - contents: read - jobs: build: name: Build hdfeos5 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.7 + - name: Install System dependencies + run: | + sudo apt-get update + sudo apt-get install ninja-build + sudo apt install libssl3 libssl-dev libcurl4 + sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin - - name: Install Autotools Dependencies (Linux) + - name: Checkout HDF5 + uses: actions/checkout@v4.1.7 + + - name: CMake Configure run: | - sudo apt update - sudo apt install automake autoconf libtool libtool-bin + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ + -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ + -DHDF5_BUILD_FORTRAN=OFF \ + -DHDF5_BUILD_JAVA=OFF \ + -DHDF5_BUILD_DOC=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DDEFAULT_API_VERSION:STRING=v16 \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \ + $GITHUB_WORKSPACE + shell: bash + + - name: CMake Build + run: cmake --build . --parallel 3 --config Release + working-directory: ${{ runner.workspace }}/build + - name: Install HDF5 run: | - ./autogen.sh - ./configure --prefix=/usr/local --disable-tests --with-default-api-version=v16 - make - sudo make install + sudo cmake --install . --config Release --prefix="/usr/local" + working-directory: ${{ runner.workspace }}/build + - name: Install HDF-EOS5 run: | wget -O HDF-EOS5.2.0.tar.gz "https://git.earthdata.nasa.gov/projects/DAS/repos/hdfeos5/raw/hdf-eos5-2.0-src.tar.gz?at=refs%2Fheads%2FHDFEOS5_2.0" @@ -47,5 +75,6 @@ jobs: cd hdf-eos5-2.0 ./configure CC=/usr/local/bin/h5cc --prefix=/usr/local/ --enable-install-include make - make check + LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}" + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check sudo make install diff --git a/.github/workflows/intel-auto.yml b/.github/workflows/intel-auto.yml deleted file mode 100644 index 6f80a79eebc..00000000000 --- a/.github/workflows/intel-auto.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: hdf5 dev autotools icx CI - -# Triggers the workflow on a call from another workflow -on: - workflow_call: - inputs: - build_mode: - description: "release vs. debug build" - required: true - type: string - -permissions: - contents: read - -jobs: - intel_oneapi_linux: - name: "linux-oneapi ${{ inputs.build_mode }}" - runs-on: ubuntu-latest - steps: - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: Install Dependencies - shell: bash - run: | - sudo apt-get update - sudo apt-get install autoconf automake libtool libtool-bin libaec-dev - - - name: Install oneAPI (Linux) - uses: fortran-lang/setup-fortran@v1 - id: setup-fortran - with: - compiler: intel - version: '2024.1' - - - name: Autotools Configure - shell: bash - env: - FC: ${{ steps.setup-fortran.outputs.fc }} - CC: ${{ steps.setup-fortran.outputs.cc }} - CXX: ${{ steps.setup-fortran.outputs.cxx }} - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=${{ inputs.build_mode }} \ - --enable-shared \ - --enable-cxx \ - --enable-fortran - - - name: Autotools Build - shell: bash - env: - FC: ${{ steps.setup-fortran.outputs.fc }} - CC: ${{ steps.setup-fortran.outputs.cc }} - CXX: ${{ steps.setup-fortran.outputs.cxx }} - run: | - make -j3 - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Run Tests - shell: bash - env: - FC: ${{ steps.setup-fortran.outputs.fc }} - CC: ${{ steps.setup-fortran.outputs.cc }} - CXX: ${{ steps.setup-fortran.outputs.cxx }} - run: | - make check -j2 - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Install - shell: bash - env: - FC: ${{ steps.setup-fortran.outputs.fc }} - CC: ${{ steps.setup-fortran.outputs.cc }} - CXX: ${{ steps.setup-fortran.outputs.cxx }} - run: | - make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - shell: bash - env: - FC: ${{ steps.setup-fortran.outputs.fc }} - CC: ${{ steps.setup-fortran.outputs.cc }} - CXX: ${{ steps.setup-fortran.outputs.cxx }} - run: | - make check-install - working-directory: ${{ runner.workspace }}/build diff --git a/.github/workflows/julia-auto.yml b/.github/workflows/julia-auto.yml deleted file mode 100644 index f21fd659413..00000000000 --- a/.github/workflows/julia-auto.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: hdf5 dev autotools julia - -on: - workflow_call: - inputs: - build_mode: - description: "release vs. debug build" - required: true - type: string - -permissions: - contents: read - -jobs: - julia_build_and_test: - name: "julia ${{ inputs.build_mode }}" - runs-on: ubuntu-latest - steps: - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: Install Dependencies - shell: bash - run: | - sudo apt-get update - sudo apt-get install autoconf automake libtool libtool-bin libaec-dev - sudo apt-get install doxygen graphviz - sudo apt install -y zlib1g-dev libcurl4-openssl-dev libjpeg-dev wget curl bzip2 - sudo apt install -y m4 flex bison cmake libzip-dev openssl build-essential - - - name: Autotools Configure - shell: bash - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=${{ inputs.build_mode }} \ - --disable-fortran \ - --enable-shared \ - --disable-parallel \ - --prefix=/tmp - - - name: Autotools Build - shell: bash - run: | - make -j3 - working-directory: ${{ runner.workspace }}/build - - - name: Install HDF5 - shell: bash - run: | - make install - working-directory: ${{ runner.workspace }}/build - - - name: Install julia - uses: julia-actions/setup-julia@latest - with: - version: '1.6' - arch: 'x64' - - - name: Get julia hdf5 source - uses: actions/checkout@v4.1.7 - with: - repository: JuliaIO/HDF5.jl - path: . - - - name: Generate LocalPreferences - run: | - echo '[HDF5]' >> LocalPreferences.toml - echo 'libhdf5 = "/tmp/lib/libhdf5.so"' >> LocalPreferences.toml - echo 'libhdf5_hl = "/tmp/lib/libhdf5_hl.so"' >> LocalPreferences.toml - - - uses: julia-actions/julia-buildpkg@latest - - - name: Julia Run Tests - uses: julia-actions/julia-runtest@latest - env: - JULIA_DEBUG: Main diff --git a/.github/workflows/main-auto-par-spc.yml b/.github/workflows/main-auto-par-spc.yml deleted file mode 100644 index 8640fef9314..00000000000 --- a/.github/workflows/main-auto-par-spc.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: hdf5 dev autotools parallel special CI - -# Controls when the action will run. Triggers the workflow on a call -on: - workflow_call: - -permissions: - contents: read - -# A workflow run is made up of one or more jobs that can run sequentially or -# in parallel. We just have one job, but the matrix items defined below will -# run in parallel. -jobs: - # - # SPECIAL AUTOTOOLS BUILDS - # - # These do not run tests and are not built into the matrix and instead - # become NEW configs as their name would clobber one of the matrix - # names (so make sure the names are UNIQUE). - # - - build_parallel_debug_werror: - name: "gcc DBG parallel -Werror (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - sudo apt install openmpi-bin openmpi-common mpi-default-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CFLAGS=-Werror $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --enable-parallel \ - --enable-subfiling-vfd \ - --disable-cxx \ - --disable-fortran \ - --disable-java \ - --disable-mirror-vfd \ - --enable-direct-vfd \ - --disable-ros3-vfd \ - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_parallel_release_werror: - name: "gcc REL parallel -Werror (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - sudo apt install openmpi-bin openmpi-common mpi-default-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CFLAGS=-Werror $GITHUB_WORKSPACE/configure \ - --enable-build-mode=production \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --enable-parallel \ - --enable-subfiling-vfd \ - --disable-cxx \ - --disable-fortran \ - --disable-java \ - --disable-mirror-vfd \ - --enable-direct-vfd \ - --disable-ros3-vfd \ - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - diff --git a/.github/workflows/main-auto-par.yml b/.github/workflows/main-auto-par.yml deleted file mode 100644 index ad893d04724..00000000000 --- a/.github/workflows/main-auto-par.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: hdf5 dev autotools parallel CI - -# Controls when the action will run. Triggers the workflow on a call -on: - workflow_call: - inputs: - build_mode: - description: "release vs. debug build" - required: true - type: string - -permissions: - contents: read - -# A workflow run is made up of one or more jobs that can run sequentially or -# in parallel. We just have one job, but the matrix items defined below will -# run in parallel. -jobs: - # - # The GitHub runners are inadequate for running parallel HDF5 tests, - # so we catch most issues in daily testing. What we have here is just - # a compile check to make sure nothing obvious is broken. - # A workflow that builds the library - # Parallel Linux (Ubuntu) w/ gcc + Autotools - # - Autotools_build_parallel: - name: "Parallel GCC-${{ inputs.build_mode }}" - # Don't run the action if the commit message says to skip CI - if: "!contains(github.event.head_commit.message, 'skip-ci')" - - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # SETUP - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - sudo apt install openmpi-bin openmpi-common mpi-default-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: Autotools Configure - env: - NPROCS: 2 - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CC=mpicc $GITHUB_WORKSPACE/configure \ - --enable-build-mode=${{ inputs.build_mode }} \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --enable-parallel \ - --enable-subfiling-vfd \ - --disable-cxx \ - --enable-fortran \ - --disable-java \ - --disable-mirror-vfd \ - --disable-direct-vfd \ - --disable-ros3-vfd \ - --with-szlib=yes - shell: bash - - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # ph5diff tests are in the tools/tests directory so they will get run - # here, so leave NPROCS set here as well - - name: Autotools Run Tests - env: - NPROCS: 2 - run: | - cd test && make check -j2 && cd .. - cd tools && make check -j2 && cd .. - cd hl && make check -j2 && cd .. - cd fortran/test && make check -j2 && cd ../.. - working-directory: ${{ runner.workspace }}/build - if: ${{ inputs.thread_safety == 'disable' }} - - - name: Autotools Run Parallel Tests - env: - NPROCS: 2 - run: | - cd testpar && make check && cd .. - cd fortran/testpar && make check -j2 && cd ../.. - working-directory: ${{ runner.workspace }}/build - if: ${{ inputs.thread_safety == 'disable' }} diff --git a/.github/workflows/main-auto-spc.yml b/.github/workflows/main-auto-spc.yml deleted file mode 100644 index f019bb12501..00000000000 --- a/.github/workflows/main-auto-spc.yml +++ /dev/null @@ -1,513 +0,0 @@ -name: hdf5 dev autotools special CI - -# Controls when the action will run. Triggers the workflow on a call -on: - workflow_call: - -permissions: - contents: read - -# A workflow run is made up of one or more jobs that can run sequentially or -# in parallel. We just have one job, but the matrix items defined below will -# run in parallel. -jobs: - # - # SPECIAL AUTOTOOLS BUILDS - # - # These do not run tests and are not built into the matrix and instead - # become NEW configs as their name would clobber one of the matrix - # names (so make sure the names are UNIQUE). - # - - build_v1_6: - name: "gcc DBG v1.6 default API (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --enable-deprecated-symbols \ - --with-default-api-version=v16 \ - --enable-shared \ - --disable-parallel \ - --enable-cxx \ - --enable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --enable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_v1_8: - name: "gcc DBG v1.8 default API (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --enable-deprecated-symbols \ - --with-default-api-version=v18 \ - --enable-shared \ - --disable-parallel \ - --enable-cxx \ - --enable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --enable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_v1_10: - name: "gcc DBG v1.10 default API (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --enable-deprecated-symbols \ - --with-default-api-version=v110 \ - --enable-shared \ - --disable-parallel \ - --enable-cxx \ - --enable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --enable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_v1_12: - name: "gcc DBG v1.12 default API (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --enable-deprecated-symbols \ - --with-default-api-version=v112 \ - --enable-shared \ - --disable-parallel \ - --enable-cxx \ - --enable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --enable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_v1_14: - name: "gcc DBG v1.14 default API (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --disable-parallel \ - --enable-cxx \ - --enable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --enable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_no_deprecated: - name: "gcc no deprecated symbols (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --disable-deprecated-symbols \ - --with-default-api-version=default \ - --enable-shared \ - --disable-parallel \ - --enable-cxx \ - --enable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --enable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_debug_werror: - name: "gcc DBG -Werror (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CFLAGS=-Werror JAVACFLAGS=-Werror JNIFLAGS=-Werror \ - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --enable-warnings-as-errors \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --disable-parallel \ - --enable-cxx \ - --disable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --disable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_release_werror: - name: "gcc REL -Werror (build only)" - runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CFLAGS=-Werror JAVACFLAGS=-Werror JNIFLAGS=-Werror \ - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=production \ - --enable-warnings-as-errors \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --disable-parallel \ - --enable-cxx \ - --disable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --disable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - diff --git a/.github/workflows/main-auto.yml b/.github/workflows/main-auto.yml deleted file mode 100644 index 83bbfd2a0c8..00000000000 --- a/.github/workflows/main-auto.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: hdf5 dev autotools CI - -# Triggers the workflow on a call from another workflow -on: - workflow_call: - inputs: - thread_safety: - description: "thread-safety enable/disable" - required: true - type: string - build_mode: - description: "release vs. debug build" - required: true - type: string - -permissions: - contents: read - -jobs: - - # A workflow that builds the library and runs all the tests - # Linux (Ubuntu) w/ gcc + Autotools - # - Autotools_build_and_test: - name: "GCC-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}d" - # Don't run the action if the commit message says to skip CI - if: "!contains(github.event.head_commit.message, 'skip-ci')" - - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # SETUP - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=${{ inputs.build_mode }} \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --disable-parallel \ - --${{ inputs.thread_safety }}-threadsafe \ - --enable-cxx \ - --enable-fortran \ - --enable-java \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --enable-ros3-vfd \ - --with-szlib=yes - shell: bash - if: ${{ inputs.thread_safety == 'disable' }} - - - name: Autotools Configure (Thread-Safe) - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=${{ inputs.build_mode }} \ - --enable-shared \ - --${{ inputs.thread_safety }}-threadsafe \ - --disable-hl \ - --disable-parallel \ - --enable-mirror-vfd \ - --enable-direct-vfd \ - --enable-ros3-vfd \ - --with-szlib=yes - shell: bash - if: ${{ inputs.thread_safety == 'enable' }} - - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Run Tests - run: make check -j2 - working-directory: ${{ runner.workspace }}/build - if: ${{ inputs.thread_safety == 'disable' }} - - # THREAD-SAFE - - name: Autotools Run Thread-Safe Tests - run: | - cd test - ./ttsafe - working-directory: ${{ runner.workspace }}/build - if: ${{ inputs.thread_safety == 'enable' }} - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build diff --git a/.github/workflows/msys2-auto.yml b/.github/workflows/msys2-auto.yml deleted file mode 100644 index 602b8353c6f..00000000000 --- a/.github/workflows/msys2-auto.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: hdf5 dev Autotools MSys2 - -# Triggers the workflow on a call from another workflow -on: - workflow_call: - inputs: - build_mode: - description: "release vs. debug build" - required: true - type: string - build_option: - description: "--enable-production or --disable-production" - required: true - type: string - -permissions: - contents: read - -jobs: - msys2_build_and_test: - runs-on: windows-latest - strategy: - matrix: - include: - - { icon: '⬛', sys: mingw32 } - - { icon: '🟦', sys: mingw64 } - - { icon: '🟨', sys: ucrt64 } - - { icon: '🟧', sys: clang64 } - name: ${{ matrix.icon }} msys2-${{ matrix.sys }}-${{ inputs.build_mode }} - defaults: - run: - shell: msys2 {0} - steps: - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: '${{ matrix.icon }} Setup MSYS2' - uses: msys2/setup-msys2@v2 - with: - msystem: ${{matrix.sys}} - update: true - install: >- - git - autotools - pacboy: >- - toolchain:p - libjpeg-turbo:p - - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "$GITHUB_WORKSPACE/build" - cd "$GITHUB_WORKSPACE/build" - LDFLAGS="-lws2_32" $GITHUB_WORKSPACE/configure \ - ${{ inputs.build_option }} \ - --disable-netcdf \ - --enable-static-exec - - - name: Autotools Build - run: | - make -j3 - working-directory: $GITHUB_WORKSPACE/build - - - name: Autotools Run Tests - run: | - make check -j - working-directory: $GITHUB_WORKSPACE/build diff --git a/.github/workflows/netcdf.yml b/.github/workflows/netcdf.yml index 963f9dce673..5d7e6608565 100644 --- a/.github/workflows/netcdf.yml +++ b/.github/workflows/netcdf.yml @@ -29,21 +29,50 @@ jobs: steps: - name: Install System dependencies run: | - sudo apt update + sudo apt-get update + sudo apt-get install ninja-build + sudo apt install libssl3 libssl-dev libcurl4 sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin + - name: Checkout HDF5 uses: actions/checkout@v4.1.7 + + - name: CMake Configure + run: | + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DONLY_SHARED_LIBS=ON \ + -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ + -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ + -DHDF5_BUILD_FORTRAN=OFF \ + -DHDF5_BUILD_JAVA=OFF \ + -DHDF5_BUILD_DOC=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \ + $GITHUB_WORKSPACE + shell: bash + + - name: CMake Build + run: cmake --build . --parallel 3 --config Release + working-directory: ${{ runner.workspace }}/build + - name: Install HDF5 run: | - ./autogen.sh - ./configure --prefix=/usr/local --disable-tests --disable-static --enable-shared --enable-hl --with-szlib - make -j - sudo make install -j + sudo cmake --install . --config Release --prefix="/usr/local" + working-directory: ${{ runner.workspace }}/build + - name: Checkout netCDF uses: actions/checkout@v4.1.7 with: repository: unidata/netcdf-c path: netcdf-c + - name: Test netCDF run: | cd netcdf-c diff --git a/.github/workflows/nvhpc-auto.yml b/.github/workflows/nvhpc-auto.yml deleted file mode 100644 index bca490485d7..00000000000 --- a/.github/workflows/nvhpc-auto.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: hdf5 dev autotools nvhpc - -# Triggers the workflow on a call from another workflow -on: - workflow_call: - inputs: - build_mode: - description: "release vs. debug build" - required: true - type: string - -permissions: - contents: read - -jobs: - nvhpc_build_and_test: - name: "nvhpc ${{ inputs.build_mode }}" - runs-on: ubuntu-latest - steps: - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: Install Dependencies - shell: bash - run: | - sudo apt-get update - sudo apt-get install autoconf automake libtool libtool-bin libaec-dev - sudo apt-get install doxygen graphviz - sudo apt install -y zlib1g-dev libcurl4-openssl-dev libjpeg-dev wget curl bzip2 - sudo apt install -y m4 flex bison cmake libzip-dev openssl build-essential - - - name: Install NVHPC - shell: bash - run: | - curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg - echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list - sudo apt-get update -y - sudo apt-get install -y nvhpc-24-7 - echo "NVHPCSDK=/opt/nvidia/hpc_sdk" >> $GITHUB_ENV - echo "OMPI_CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin/nvc++" >> $GITHUB_ENV - echo "OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin/nvc" >> $GITHUB_ENV - echo "OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin/nvfortran" >> $GITHUB_ENV - echo "CC=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin/mpicc" >> $GITHUB_ENV - echo "FC=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin/mpifort" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/lib" >> $GITHUB_ENV - echo "DESTDIR=/tmp" >> $GITHUB_ENV - - - name: Autotools Configure - shell: bash - run: | - export RUNPARALLEL="mpiexec -np 2" - export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - FCFLAGS="-fPIC -fortranlibs" \ - --enable-build-mode=${{ inputs.build_mode }} \ - --enable-fortran \ - --enable-shared \ - --enable-parallel - - - name: Autotools Build - shell: bash - run: | - export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH - make -j3 - working-directory: ${{ runner.workspace }}/build - - # ph5diff tests are in the tools/tests directory so they will get run - # here, so leave NPROCS set here as well - - name: Autotools Run Tests - env: - NPROCS: 2 - run: | - export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH - cd tools && make check -j2 && cd .. - cd hl && make check -j2 && cd .. - cd fortran && make check -j2 && cd .. - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Run Parallel Tests - env: - NPROCS: 2 - run: | - export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH - cd testpar && make check && cd .. - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Install - shell: bash - run: | - export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH - make install - working-directory: ${{ runner.workspace }}/build diff --git a/.github/workflows/testxpr-auto.yml b/.github/workflows/testxpr-auto.yml deleted file mode 100644 index 445a6cc8298..00000000000 --- a/.github/workflows/testxpr-auto.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: hdf5 TestExpress Autotools CI - -on: - workflow_call: - -permissions: - contents: read - -jobs: - build_and_test: - strategy: - matrix: - build_mode: ["production", "debug"] - include: - - build_mode: "production" - - build_mode: "debug" - - name: "Autotools ${{ matrix.build_mode }} Express Test Workflows" - - # Don't run the action if the commit message says to skip CI - if: "!contains(github.event.head_commit.message, 'skip-ci')" - - runs-on: ubuntu-latest - steps: - - name: Install Linux Dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV - - - name: Get Sources - uses: actions/checkout@v4.1.7 - - - name: Autotools Configure - shell: bash - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure \ - --enable-build-mode=${{ matrix.build_mode }} \ - --enable-shared \ - --disable-parallel \ - --disable-cxx \ - --disable-fortran \ - --disable-java \ - --with-szlib=yes - - - name: Autotools Build - shell: bash - run: | - make -j3 - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Test - shell: bash - env: - HDF5TestExpress: 0 - run: | - cd test - make -j3 check - working-directory: ${{ runner.workspace }}/build diff --git a/HDF5Examples/C/H5D/Makefile.am b/HDF5Examples/C/H5D/Makefile.am deleted file mode 100644 index dfccb4b72f9..00000000000 --- a/HDF5Examples/C/H5D/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -noinst_PROGRAMS = h5ex_d_rdwr h5ex_d_hyper h5ex_d_chunk h5ex_d_gzip \ -h5ex_d_szip h5ex_d_nbit h5ex_d_soint h5ex_d_sofloat h5ex_d_extern \ -h5ex_d_compact h5ex_d_unlimadd h5ex_d_unlimmod h5ex_d_unlimgzip \ -h5ex_d_checksum h5ex_d_shuffle h5ex_d_transform h5ex_d_fillval h5ex_d_alloc - -EXTRA_DIST = tfiles/h5ex_d_rdwr.tst tfiles/h5ex_d_hyper.tst tfiles/h5ex_d_chunk.tst \ -tfiles/h5ex_d_gzip.tst tfiles/h5ex_d_szip.tst tfiles/h5ex_d_nbit.tst tfiles/h5ex_d_soint.tst \ -tfiles/h5ex_d_sofloat.tst tfiles/h5ex_d_extern.tst tfiles/h5ex_d_compact.tst \ -tfiles/h5ex_d_unlimadd.tst tfiles/h5ex_d_unlimmod.tst tfiles/h5ex_d_unlimgzip.tst \ -tfiles/h5ex_d_checksum.tst tfiles/h5ex_d_shuffle.tst tfiles/h5ex_d_transform.tst \ -tfiles/h5ex_d_fillval.tst tfiles/h5ex_d_alloc.tst \ -tfiles/h5ex_d_rdwr.ddl tfiles/h5ex_d_hyper.ddl tfiles/h5ex_d_chunk.ddl \ -tfiles/h5ex_d_gzip.ddl tfiles/h5ex_d_szip.ddl tfiles/h5ex_d_nbit.ddl tfiles/h5ex_d_soint.ddl \ -tfiles/h5ex_d_sofloat.ddl tfiles/h5ex_d_extern.ddl tfiles/h5ex_d_compact.ddl \ -tfiles/h5ex_d_unlimadd.ddl tfiles/h5ex_d_unlimmod.ddl tfiles/h5ex_d_unlimgzip.ddl \ -tfiles/h5ex_d_checksum.ddl tfiles/h5ex_d_shuffle.ddl tfiles/h5ex_d_transform.ddl \ -tfiles/h5ex_d_fillval.ddl tfiles/h5ex_d_alloc.ddl test.sh - -TESTS = test.sh - -CLEANFILES = Makefile test.sh diff --git a/HDF5Examples/C/H5D/test.sh.in b/HDF5Examples/C/H5D/test.sh.in deleted file mode 100755 index ece230353e1..00000000000 --- a/HDF5Examples/C/H5D/test.sh.in +++ /dev/null @@ -1,179 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -srcdir=@srcdir@ - - -case $CC in -*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; - test -x $H5DUMP || H5DUMP=h5dump;; -*) H5DUMP=h5dump;; -esac - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ;; - *c*,* ) ECHO_N=-n ECHO_C= ;; - *) ECHO_N= ECHO_C='\c' ;; -esac -ECHO_N="echo $ECHO_N" - - -exout() { - $* -} - -dumpout() { - $H5DUMP $* -} - -# compare current version, required version. -# returns if cur_ver < req_ver is true. -version_compare() { - version_lt=0 - if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then - version_lt=1 - fi -} - -H5_LIBVER=@H5_LIBVER@ -H5_LIBVER_DIR=@H5_LIBVER_DIR@ - -topics="alloc checksum chunk compact extern fillval gzip hyper \ -rdwr shuffle szip unlimadd unlimgzip unlimmod" -topics18="" - -version_compare "$H5_LIBVER" "1.8.0" -# check if HDF5 version is < 1.8.0 -if [ "$version_lt" = 1 ]; then - dir16="\/16" -else - dir16="" - topics18="nbit sofloat soint transform" -fi - -return_val=0 - -#Remove external data file from h5ex_d_extern -rm -f h5ex_d_extern.data - -for topic in $topics -do - fname=h5ex_d_$topic - $ECHO_N "Testing C/H5D/$fname...$ECHO_C" - exout .$dir16/$fname >tmp.test - status=$? - if test $status -eq 1 - then - echo " Unsupported feature" - status=0 - else - cmp -s tmp.test $srcdir/tfiles/16/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/16/$fname.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` - fi -done - -#######Non-standard tests####### -USE_ALT="" -### Set default tfiles directory for tests -nbitdir="18" -version_compare "$H5_LIBVER" "1.8.23" -# check if HDF5 version is < 1.8.23 -if [ "$version_lt" = 1 ]; then - USE_ALT="22" -else -# check if HDF5 version is >= 1.10.0 and < 1.10.8 - version_compare "$H5_LIBVER" "1.10.0" - if [ "$version_lt" = 0 ]; then - version_compare "$H5_LIBVER" "1.10.8" - if [ "$version_lt" = 1 ]; then - USE_ALT="07" - nbitdir="110" - fi - fi -fi - -for topic in $topics18 -do - fname=h5ex_d_$topic - $ECHO_N "Testing C/H5D/$fname...$ECHO_C" - exout ./$fname >tmp.test - status=$? - if test $status -eq 1 - then - echo " Unsupported feature" - status=0 - else - if [[ $fname == "h5ex_d_nbit" ]] - then - tdir=$nbitdir - if [[ $USE_ALT == "" ]] - then - ### set USE_ALT=07 if not set above - USE_ALT="07" - fi - else - tdir=18 - ### unset USE_ALT for the other topics - USE_ALT="" - fi - cmp -s tmp.test $srcdir/tfiles/18/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - if [[ $fname == "h5ex_d_transform" ]] - then - targ="-n" - else - targ="" - fi - dumpout $targ $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/$tdir/$fname$USE_ALT.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` - fi -done - - -#Remove external data file from h5ex_d_extern -rm -f h5ex_d_extern.data -rm -f tmp.test -echo "$return_val tests failed in C/H5D/" -exit $return_val diff --git a/HDF5Examples/C/H5G/Makefile.am b/HDF5Examples/C/H5G/Makefile.am deleted file mode 100644 index 8ab2b8ac047..00000000000 --- a/HDF5Examples/C/H5G/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -noinst_PROGRAMS = h5ex_g_create h5ex_g_iterate h5ex_g_traverse \ -h5ex_g_compact h5ex_g_corder h5ex_g_intermediate h5ex_g_phase h5ex_g_visit - -EXTRA_DIST = tfiles/h5ex_g_create.ddl tfiles/h5ex_g_iterate.tst tfiles/h5ex_g_traverse.tst \ -tfiles/h5ex_g_compact1.ddl tfiles/h5ex_g_compact2.ddl tfiles/h5ex_g_corder.tst \ -tfiles/h5ex_g_intermediate.tst tfiles/h5ex_g_phase.tst tfiles/h5ex_g_visit.tst \ -h5ex_g_iterate.h5 h5ex_g_traverse.h5 h5ex_g_visit.h5 \ -test.sh - -TESTS = test.sh - -CLEANFILES = Makefile test.sh diff --git a/HDF5Examples/C/H5G/test.sh.in b/HDF5Examples/C/H5G/test.sh.in deleted file mode 100755 index ea05ca3bd2b..00000000000 --- a/HDF5Examples/C/H5G/test.sh.in +++ /dev/null @@ -1,197 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -srcdir=@srcdir@ - - -case $CC in -*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; - test -x $H5DUMP || H5DUMP=h5dump;; -*) H5DUMP=h5dump;; -esac - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ;; - *c*,* ) ECHO_N=-n ECHO_C= ;; - *) ECHO_N= ECHO_C='\c' ;; -esac -ECHO_N="echo $ECHO_N" - - -exout() { - $* -} - -dumpout() { - $H5DUMP $* -} - -H5_LIBVER=@H5_LIBVER@ -H5_LIBVER_DIR=@H5_LIBVER_DIR@ - -return_val=0 - - -$ECHO_N "Testing C/H5G/h5ex_g_create...$ECHO_C" -./h5ex_g_create -dumpout h5ex_g_create.h5 >tmp.test -rm -f h5ex_g_create.h5 -cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_create.ddl -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` - - -$ECHO_N "Testing C/H5G/h5ex_g_iterate...$ECHO_C" -if test -f h5ex_g_iterate.h5 -then - exout ./h5ex_g_iterate >tmp.test -else - cp $srcdir/h5ex_g_iterate.h5 h5ex_g_iterate.h5 - exout ./h5ex_g_iterate >tmp.test - rm -f h5ex_g_iterate.h5 -fi -cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_iterate.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` - - -$ECHO_N "Testing C/H5G/h5ex_g_traverse...$ECHO_C" -if test -f h5ex_g_traverse.h5 -then - exout ./h5ex_g_traverse >tmp.test -else - cp $srcdir/h5ex_g_traverse.h5 h5ex_g_traverse.h5 - exout ./h5ex_g_traverse >tmp.test - rm -f h5ex_g_traverse.h5 -fi -cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_traverse.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` - - -$ECHO_N "Testing C/H5G/h5ex_g_visit...$ECHO_C" -if test -f h5ex_g_visit.h5 -then - exout ./h5ex_g_visit >tmp.test -else - cp $srcdir/h5ex_g_visit.h5 h5ex_g_visit.h5 - exout ./h5ex_g_visit >tmp.test - rm -f h5ex_g_visit.h5 -fi -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_visit.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` - - -$ECHO_N "Testing C/H5G/h5ex_g_compact...$ECHO_C" -exout ./h5ex_g_compact >tmp.test -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - dumpout h5ex_g_compact1.h5 >tmp.test - cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact1.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout h5ex_g_compact2.h5 >tmp.test - cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact2.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi -fi -return_val=`expr $status + $return_val` -rm -f h5ex_g_compact1.h5 -rm -f h5ex_g_compact2.h5 - - -$ECHO_N "Testing C/H5G/h5ex_g_phase...$ECHO_C" -exout ./h5ex_g_phase >tmp.test -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_phase.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` -rm -f h5ex_g_phase.h5 - - -$ECHO_N "Testing C/H5G/h5ex_g_corder...$ECHO_C" -exout ./h5ex_g_corder >tmp.test -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_corder.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` -rm -f h5ex_g_corder.h5 - - -$ECHO_N "Testing C/H5G/h5ex_g_intermediate...$ECHO_C" -exout ./h5ex_g_intermediate >tmp.test -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_intermediate.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` -rm -f h5ex_g_intermediate.h5 - - -rm -f tmp.test -echo "$return_val tests failed in C/H5G/" -exit $return_val diff --git a/HDF5Examples/C/H5T/Makefile.am b/HDF5Examples/C/H5T/Makefile.am deleted file mode 100644 index bc0d5d5392d..00000000000 --- a/HDF5Examples/C/H5T/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -noinst_PROGRAMS = h5ex_t_int h5ex_t_intatt h5ex_t_float h5ex_t_floatatt \ -h5ex_t_enum h5ex_t_enumatt h5ex_t_bit h5ex_t_bitatt h5ex_t_opaque \ -h5ex_t_opaqueatt h5ex_t_array h5ex_t_arrayatt h5ex_t_vlen h5ex_t_vlenatt \ -h5ex_t_string h5ex_t_stringatt h5ex_t_vlstring h5ex_t_vlstringatt h5ex_t_cmpd \ -h5ex_t_cmpdatt h5ex_t_cpxcmpd h5ex_t_cpxcmpdatt h5ex_t_objref h5ex_t_objrefatt \ -h5ex_t_regref h5ex_t_regrefatt h5ex_t_commit h5ex_t_convert - -EXTRA_DIST = tfiles/h5ex_t_int.tst tfiles/h5ex_t_intatt.tst tfiles/h5ex_t_float.tst \ -tfiles/h5ex_t_floatatt.tst tfiles/h5ex_t_enum.tst tfiles/h5ex_t_enumatt.tst tfiles/h5ex_t_bit.tst \ -tfiles/h5ex_t_bitatt.tst tfiles/h5ex_t_opaque.tst tfiles/h5ex_t_opaqueatt.tst tfiles/h5ex_t_array.tst \ -tfiles/h5ex_t_arrayatt.tst tfiles/h5ex_t_vlen.tst tfiles/h5ex_t_vlenatt.tst tfiles/h5ex_t_string.tst \ -tfiles/h5ex_t_stringatt.tst tfiles/h5ex_t_vlstring.tst tfiles/h5ex_t_vlstringatt.tst \ -tfiles/h5ex_t_cmpd.tst tfiles/h5ex_t_cmpdatt.tst tfiles/h5ex_t_cpxcmpd.tst \ -tfiles/h5ex_t_cpxcmpdatt.tst tfiles/h5ex_t_objref.tst tfiles/h5ex_t_objrefatt.tst \ -tfiles/h5ex_t_regref.tst tfiles/h5ex_t_regrefatt.tst tfiles/h5ex_t_commit.tst \ -tfiles/h5ex_t_convert.tst \ -tfiles/h5ex_t_int.ddl tfiles/h5ex_t_intatt.ddl tfiles/h5ex_t_float.ddl \ -tfiles/h5ex_t_floatatt.ddl tfiles/h5ex_t_enum.ddl tfiles/h5ex_t_enumatt.ddl tfiles/h5ex_t_bit.ddl \ -tfiles/h5ex_t_bitatt.ddl tfiles/h5ex_t_opaque.ddl tfiles/h5ex_t_opaqueatt.ddl tfiles/h5ex_t_array.ddl \ -tfiles/h5ex_t_arrayatt.ddl tfiles/h5ex_t_vlen.ddl tfiles/h5ex_t_vlenatt.ddl tfiles/h5ex_t_string.ddl \ -tfiles/h5ex_t_stringatt.ddl tfiles/h5ex_t_vlstring.ddl tfiles/h5ex_t_vlstringatt.ddl \ -tfiles/h5ex_t_cmpd.ddl tfiles/h5ex_t_cmpdatt.ddl tfiles/h5ex_t_cpxcmpd.ddl \ -tfiles/h5ex_t_cpxcmpdatt.ddl tfiles/h5ex_t_objref.ddl tfiles/h5ex_t_objrefatt.ddl \ -tfiles/h5ex_t_regref.ddl tfiles/h5ex_t_regrefatt.ddl tfiles/h5ex_t_commit.ddl \ -tfiles/h5ex_t_convert.ddl test.sh - - -TESTS = test.sh - -CLEANFILES = Makefile test.sh diff --git a/HDF5Examples/C/H5T/test.sh.in b/HDF5Examples/C/H5T/test.sh.in deleted file mode 100755 index d5c453b5010..00000000000 --- a/HDF5Examples/C/H5T/test.sh.in +++ /dev/null @@ -1,201 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -srcdir=@srcdir@ - - -case $CC in -*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; - test -x $H5DUMP || H5DUMP=h5dump;; -*) H5DUMP=h5dump;; -esac - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ;; - *c*,* ) ECHO_N=-n ECHO_C= ;; - *) ECHO_N= ECHO_C='\c' ;; -esac -ECHO_N="echo $ECHO_N" - - -exout() { - $* -} - -dumpout() { - $H5DUMP $* -} - -# compare current version, required version. -# returns if cur_ver < req_ver is true. -version_compare() { - version_lt=0 - if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then - version_lt=1 - fi -} - -H5_LIBVER=@H5_LIBVER@ -H5_LIBVER_DIR=@H5_LIBVER_DIR@ - -topics="array arrayatt bit bitatt cmpd cmpdatt cpxcmpd cpxcmpdatt enum enumatt float floatatt \ -int intatt opaque opaqueatt string stringatt vlstring vlstringatt \ -commit" - -return_val=0 - -for topic in $topics -do - fname=h5ex_t_$topic - $ECHO_N "Testing C/H5T/$fname...$ECHO_C" - exout ./$fname >tmp.test - cmp -s tmp.test $srcdir/tfiles/16/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - if [[ $fname == "h5ex_t_cpxcmpd" || $fname == "h5ex_t_cpxcmpdatt" ]] - then - targ="-n" - else - targ="" - fi - dumpout $targ $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` -done - - -#######Non-standard tests####### - -USE_ALT="" -if [ "$H5_LIBVER_DIR" = "110" ]; then - # check if HDF5 version is < 1.10.7 - version_compare "$H5_LIBVER" "1.10.7" - if [ "$version_lt" = 1 ]; then - USE_ALT="06" - fi -else - if [ "$H5_LIBVER_DIR" = "18" ]; then - # check if HDF5 version is < 1.8.22 - version_compare "$H5_LIBVER" "1.8.22" - if [ "$version_lt" = 1 ]; then - USE_ALT="21" - fi - fi -fi - -topics="objref objrefatt regref regrefatt" - -for topic in $topics -do - fname=h5ex_t_$topic - $ECHO_N "Testing C/H5T/$fname...$ECHO_C" - exout ./$fname >tmp.test - cmp -s tmp.test $srcdir/tfiles/16/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - version_compare "$H5_LIBVER" "1.10.0" - if [ "$version_lt" = 1 ]; then - cmp -s tmp.test $srcdir/tfiles/18/$fname$USE_ALT.ddl - else - version_compare "$H5_LIBVER" "1.12.0" - if [ "$version_lt" = 1 ]; then - version_compare "$H5_LIBVER" "1.10.7" - if [ "$version_lt" = 1 ]; then - cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl - else - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - fi - else - cmp -s tmp.test $srcdir/tfiles/112/$fname.ddl - fi - fi - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` -done - -topics="vlen vlenatt" - -for topic in $topics -do - fname=h5ex_t_$topic - $ECHO_N "Testing C/H5T/$fname...$ECHO_C" - exout ./$fname >tmp.test - cmp -s tmp.test $srcdir/tfiles/16/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - version_compare "$H5_LIBVER" "1.14.3" - if [ "$version_lt" = 1 ]; then - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - else - cmp -s tmp.test $srcdir/tfiles/114/$fname.ddl - fi - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` -done - - -fname=h5ex_t_convert -$ECHO_N "Testing C/H5T/$fname...$ECHO_C" -exout ./$fname >tmp.test -cmp -s tmp.test $srcdir/tfiles/16/$fname.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` - - -rm -f tmp.test -echo "$return_val tests failed in C/H5T/" -exit $return_val diff --git a/HDF5Examples/C/H5VDS/Makefile.am b/HDF5Examples/C/H5VDS/Makefile.am deleted file mode 100644 index d9a5116afc7..00000000000 --- a/HDF5Examples/C/H5VDS/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -noinst_PROGRAMS = \ - h5ex_vds \ - h5ex_vds-exc \ - h5ex_vds-exclim \ - h5ex_vds-eiger \ - h5ex_vds-simpleIO \ - h5ex_vds-percival \ - h5ex_vds-percival-unlim \ - h5ex_vds-percival-unlim-maxmin - - -EXTRA_DIST = \ - tfiles/h5ex_vds.tst \ - tfiles/h5ex_vds-exc.tst \ - tfiles/h5ex_vds-exclim.tst \ - tfiles/h5ex_vds-eiger.tst \ - tfiles/h5ex_vds-simpleIO.tst \ - tfiles/h5ex_vds-percival.tst \ - tfiles/h5ex_vds-percival-unlim.tst \ - tfiles/h5ex_vds-percival-unlim-maxmin.tst \ - tfiles/h5ex_vds.ddl \ - tfiles/h5ex_vds-exc.ddl \ - tfiles/h5ex_vds-exclim.ddl \ - tfiles/h5ex_vds-eiger.ddl \ - tfiles/h5ex_vds-simpleIO.ddl \ - tfiles/h5ex_vds-percival.ddl \ - tfiles/h5ex_vds-percival-unlim.ddl \ - tfiles/h5ex_vds-percival-unlim-maxmin.ddl \ - test.sh - -TESTS = test.sh - -CLEANFILES = Makefile test.sh diff --git a/HDF5Examples/C/H5VDS/test.sh.in b/HDF5Examples/C/H5VDS/test.sh.in deleted file mode 100644 index 983ef426d1c..00000000000 --- a/HDF5Examples/C/H5VDS/test.sh.in +++ /dev/null @@ -1,96 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -srcdir=@srcdir@ - - -case $CC in -*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; - test -x $H5DUMP || H5DUMP=h5dump;; -*) H5DUMP=h5dump;; -esac - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ;; - *c*,* ) ECHO_N=-n ECHO_C= ;; - *) ECHO_N= ECHO_C='\c' ;; -esac -ECHO_N="echo $ECHO_N" - - -exout() { - $* -} - -dumpout() { - $H5DUMP $* -} - -# compare current version, required version. -# returns if cur_ver < req_ver is true. -version_compare() { - version_lt=0 - if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then - version_lt=1 - fi -} - -H5_LIBVER=@H5_LIBVER@ -H5_LIBVER_DIR=@H5_LIBVER_DIR@ - -topics="" -topics110="vds vds-exc vds-exclim vds-eiger vds-simpleIO vds-percival vds-percival-unlim vds-percival-unlim-maxmin" - -return_val=0 - -version_compare "$H5_LIBVER" "1.10.0" -if [ "$version_lt" = 0 ]; then - for topic in $topics110 - do - fname=h5ex_$topic - $ECHO_N "Testing C/H5VDS/$fname...$ECHO_C" - exout ./$fname >tmp.test - status=$? - if test $status -eq 1 - then - echo " Unsupported feature" - status=0 - else - cmp -s tmp.test $srcdir/tfiles/110/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/110/$fname.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` - fi - done -fi - - -rm -f tmp.test -echo "$return_val tests failed in C/H5VDS/" -exit $return_val diff --git a/HDF5Examples/C/Makefile.am b/HDF5Examples/C/Makefile.am deleted file mode 100644 index 778f802246c..00000000000 --- a/HDF5Examples/C/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -if H5D -DO_H5D=H5D -endif - -if H5G -DO_H5G=H5G -endif - -if H5T -DO_H5T=H5T -endif - -SUBDIRS = $(DO_H5D) $(DO_H5G) $(DO_H5T) diff --git a/HDF5Examples/C/Perf/Makefile.am b/HDF5Examples/C/Perf/Makefile.am deleted file mode 100644 index cac946e278f..00000000000 --- a/HDF5Examples/C/Perf/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -noinst_PROGRAMS = h5slabread h5slabwrite h5efc - -EXTRA_DIST = - -AM_CPPFLAGS = '-D H5_USE_112_API' -TESTS = test.sh - -CLEANFILES = Makefile test.sh diff --git a/HDF5Examples/C/TUTR/Makefile.am b/HDF5Examples/C/TUTR/Makefile.am deleted file mode 100644 index 508664b8773..00000000000 --- a/HDF5Examples/C/TUTR/Makefile.am +++ /dev/null @@ -1,119 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Library Examples Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -INSTALL_SCRIPT_FILES = run-c-ex.sh -INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh -INSTALL_TOP_FILES = README - -# Example programs. -# Don't tell automake about them, because if it knew they were programs, -# it would try to compile them instead of using the h5cc script. -# Use the boilerplate in config/examples.am instead. -EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ - h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ - h5_crtatt h5_crtgrp h5_crtdat \ - h5_group h5_select h5_attribute h5_mount h5_drivers \ - h5_reference_deprec h5_ref_extern h5_ref_compat h5_ref2reg_deprec \ - h5_extlink h5_elink_unix2win h5_shared_mesg h5_debug_trace -TEST_SCRIPT=testh5cc.sh -TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) - -# Install files -# List all file that should be installed in examples directory -INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c h5_compound.c \ - h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c h5_extend.c \ - h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ - h5_group.c h5_select.c h5_attribute.c h5_mount.c h5_drivers.c \ - h5_reference_deprec.c h5_ref_extern.c h5_ref_compat.c h5_ref2reg_deprec.c \ - h5_extlink.c h5_elink_unix2win.c h5_shared_mesg.c h5_debug_trace.c - -# How to build examples, using installed version of h5cc -if BUILD_PARALLEL_CONDITIONAL -$(EXTRA_PROG): $(H5CC_PP) - $(H5CC_PP) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c; -else -$(EXTRA_PROG): $(H5CC) - $(H5CC) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c; -endif - -# Some examples depend on files created by other examples. -h5_read.chkexe_: h5_write.chkexe_ -h5_chunk_read.chkexe_: h5_extend_write.chkexe_ -h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_ -# h5_rdwt and h5_crtatt both modify the same file created by -# h5_crtdat. Serialize them. -h5_rdwt.chkexe_: h5_crtdat.chkexe_ -h5_crtatt.chkexe_: h5_rdwt.chkexe_ - -# The external link examples demonstrate how to use paths; they need -# directories to be created to do this. -EXTLINK_DIRS=red blue u2w - -$(EXTLINK_DIRS): - echo $(mkdir_p) $@ - $(mkdir_p) $@ - -CHECK_CLEANFILES+=$(EXTLINK_DIRS) - -# Example directory -# Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=${DESTDIR}$(examplesdir)/c -EXAMPLETOPDIR=${DESTDIR}$(examplesdir) - -# List dependencies for each program. Normally, automake would take -# care of this for us, but if we tell automake about the programs it -# will try to build them with the normal C compiler, not h5cc. This is -# an inelegant way of solving the problem. -# All programs share the same build rule and a dependency on the main hdf5 -# library above. -h5_chunk_read: $(srcdir)/h5_chunk_read.c -h5_compound: $(srcdir)/h5_compound.c -h5_crtgrpd: $(srcdir)/h5_crtgrpd.c -h5_subset: $(srcdir)/h5_subset.c -h5_cmprss: $(srcdir)/h5_cmprss.c -h5_rdwt: $(srcdir)/h5_rdwt.c -h5_crtgrpar: $(srcdir)/h5_crtgrpar.c -h5_extend: $(srcdir)/h5_extend.c -h5_crtatt: $(srcdir)/h5_crtatt.c -h5_crtgrp: $(srcdir)/h5_crtgrp.c -h5_crtdat: $(srcdir)/h5_crtdat.c -h5_extend_write: $(srcdir)/h5_extend_write.c -h5_group: $(srcdir)/h5_group.c -h5_write: $(srcdir)/h5_write.c -h5_read: $(srcdir)/h5_read.c -h5_select: $(srcdir)/h5_select.c -h5_attribute: $(srcdir)/h5_attribute.c -h5_mount: $(srcdir)/h5_mount.c -h5_ref_compat: $(srcdir)/h5_ref_compat.c -h5_ref_extern: $(srcdir)/h5_ref_extern.c -h5_reference_deprec: $(srcdir)/h5_reference_deprec.c -h5_ref2reg_deprec: $(srcdir)/h5_ref2reg_deprec.c -h5_drivers: $(srcdir)/h5_drivers.c -h5_dtransform: $(srcdir)/h5_dtransform.c -h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS) -h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS) -h5_shared_mesg: $(srcdir)/h5_shared_mesg.c - -if BUILD_SHARED_SZIP_CONDITIONAL -LD_LIBRARY_PATH=$(LL_PATH) -endif - -include $(top_srcdir)/config/examples.am -include $(top_srcdir)/config/conclude.am diff --git a/HDF5Examples/C/TUTR/README b/HDF5Examples/C/TUTR/README deleted file mode 100644 index e0a3364863b..00000000000 --- a/HDF5Examples/C/TUTR/README +++ /dev/null @@ -1,17 +0,0 @@ - HDF5 Examples - -This directory contains example programs for the installed APIs and scripts to -compile and run them. Examples in the c and hl/c subdirectories are always -installed, and those in fortran, hl/fortran, c++ and hl/c++ will be installed -when fortran or c++ are enabled. - -Running the run-all-ex.sh script in this directory will run the scripts and in -turn the examples in all the subdirectories where examples are installed. The -scripts can also be run individually. The appropriate compile scripts in the -bin directory for this install will be used by default to compile and link the -example programs. Note that h5redeploy must be run if these binaries are -copied or extracted in a directory other than the one where they were initially -installed. Compile scripts from other locations can be used by setting an -environment variable prefix to the path of the directory containing the bin -directory with the compile scripts h5cc, h5fc, etc. For example, export -prefix=/usr/local/hdf5 to use h5cc, h5fc, etc. in /usr/local/hdf5/bin. diff --git a/HDF5Examples/C/TUTR/run-all-ex.sh b/HDF5Examples/C/TUTR/run-all-ex.sh deleted file mode 100755 index afd4308d17b..00000000000 --- a/HDF5Examples/C/TUTR/run-all-ex.sh +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# -# This file: run-hl-ex.sh -# Written by: Larry Knox -# Date: May 11, 2010 -# -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # -# This script will run the scripts to compile and run the installed hdf5 # -# examples. # -# # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -echo "Run c examples" -if ((cd c; sh ./run-c-ex.sh) && \ - (if test -d fortran; then - echo "Run fortran examples" - cd fortran; sh ./run-fortran-ex.sh - fi) - (if test -d c++; then - echo "Run c++ examples" - cd c++; sh ./run-c++-ex.sh - fi) - (if test -d hl; then - echo "Run hl examples." - cd hl; sh ./run-hl-ex.sh - fi)); then - echo "Done" - exit 0 -else - exit 1 -fi - diff --git a/HDF5Examples/C/TUTR/run-c-ex.sh.in b/HDF5Examples/C/TUTR/run-c-ex.sh.in deleted file mode 100644 index b51c5d607de..00000000000 --- a/HDF5Examples/C/TUTR/run-c-ex.sh.in +++ /dev/null @@ -1,172 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# -# This file: run-c-ex.sh -# Written by: Larry Knox -# Date: May 11, 2010 -# -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # -# This script will compile and run the c examples from source files installed # -# in @examplesdir@/c using h5cc or h5pc. The order for running # -# programs with RunTest in the MAIN section below is taken from the Makefile. # -# The order is important since some of the test programs use data files created # -# by earlier test programs. Any future additions should be placed accordingly. # -# # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -# Initializations -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# -# Try to derive the path to the installation $prefix established -# by ./configure relative to the examples directory established by -# ./configure. If successful, set `prefix_relto_examplesdir` to the -# relative path. Otherwise, set `prefix_relto_examplesdir` to the -# absolute installation $prefix. -# -# This script uses the value of `prefix` in the user's environment, if -# it is set, below. The content of $() is evaluated in a sub-shell, so -# if `prefix` is set in the user's environment, the shell statements in -# $() won't clobbered it. -# -prefix_relto_examplesdir=$( -prefix=@prefix@ -examplesdir=@examplesdir@ -if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then - echo $(echo ${examplesdir##${prefix}/} | \ - sed 's,[^/][^/]*,..,g') -else - echo $prefix -fi -) - -# Where the tool is installed. -# default is relative path to installed location of the tools -prefix="${prefix:-../${prefix_relto_examplesdir}}" -PARALLEL=@PARALLEL@ # Am I in parallel mode? -AR="@AR@" -RANLIB="@RANLIB@" -if [ "$PARALLEL" = no ]; then - H5TOOL="h5cc" # The tool name -else - H5TOOL="h5pcc" # The tool name -fi -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - -#### Run test #### -RunTest() -{ - TEST_EXEC=$1 - Test=$1".c" - - echo - echo "################# $1 #################" - ${H5TOOL_BIN} -o $TEST_EXEC $Test - if [ $? -ne 0 ] - then - echo "messed up compiling $Test" - exit 1 - fi - ./$TEST_EXEC -} - - - -################## MAIN ################## - -if ! test -d red; then - mkdir red -fi -if ! test -d blue; then - mkdir blue -fi -if ! test -d u2w; then - mkdir u2w -fi - -# Run tests -if [ $? -eq 0 ] -then - if (RunTest h5_crtdat &&\ - rm h5_crtdat &&\ - RunTest h5_extend &&\ - rm h5_extend &&\ - RunTest h5_rdwt &&\ - rm h5_rdwt &&\ - RunTest h5_crtatt &&\ - rm h5_crtatt &&\ - RunTest h5_crtgrp &&\ - rm h5_crtgrp &&\ - RunTest h5_crtgrpar &&\ - rm h5_crtgrpar &&\ - RunTest h5_crtgrpd &&\ - rm h5_crtgrpd &&\ - RunTest h5_subset &&\ - rm h5_subset &&\ - RunTest h5_cmprss &&\ - rm h5_cmprss &&\ - RunTest h5_write &&\ - rm h5_write &&\ - RunTest h5_read &&\ - rm h5_read &&\ - RunTest h5_extend_write &&\ - rm h5_extend_write &&\ - RunTest h5_chunk_read &&\ - rm h5_chunk_read &&\ - RunTest h5_compound &&\ - rm h5_compound &&\ - RunTest h5_group &&\ - rm h5_group &&\ - RunTest h5_select &&\ - rm h5_select &&\ - RunTest h5_attribute &&\ - rm h5_attribute &&\ - RunTest h5_mount &&\ - rm h5_mount &&\ - RunTest h5_reference_deprec &&\ - rm h5_reference_deprec &&\ - RunTest h5_ref_extern &&\ - rm h5_ref_extern &&\ - RunTest h5_ref_compat &&\ - rm h5_ref_compat &&\ - RunTest h5_drivers &&\ - rm h5_drivers &&\ - RunTest h5_ref2reg_deprec &&\ - rm h5_ref2reg_deprec &&\ - RunTest h5_extlink &&\ - rm h5_extlink &&\ - RunTest h5_elink_unix2win &&\ - rm h5_elink_unix2win &&\ - OLD_DEBUG_STRING=$HDF5_DEBUG &&\ - export HDF5_DEBUG="+all +trace +ttimes" &&\ - RunTest h5_debug_trace &&\ - HDF5_DEBUG=$OLD_DEBUG_STRING &&\ - rm h5_debug_trace &&\ - RunTest h5_shared_mesg &&\ - rm h5_shared_mesg); then - EXIT_VALUE=${EXIT_SUCCESS} - else - EXIT_VALUE=${EXIT_FAILURE} - fi -fi - -# Cleanup -rm *.o -rm *.h5 -rm -rf red blue u2w -echo - -exit $EXIT_VALUE - diff --git a/HDF5Examples/C/TUTR/testh5cc.sh.in b/HDF5Examples/C/TUTR/testh5cc.sh.in deleted file mode 100644 index 4b888c1d2a0..00000000000 --- a/HDF5Examples/C/TUTR/testh5cc.sh.in +++ /dev/null @@ -1,571 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5cc compiler tool - -srcdir=@srcdir@ - -# Initializations -TESTNAME=h5cc -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Where the tool is installed. -prefix="${prefix:-@prefix@}" -PARALLEL=@PARALLEL@ # Am I in parallel mode? -AR="@AR@" -RANLIB="@RANLIB@" -if [ "$PARALLEL" = no ]; then - H5TOOL="h5cc" # The tool name -else - H5TOOL="h5pcc" # The tool name -fi -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - -CMP='cmp -s' -DIFF='diff -c' - -nerrors=$EXIT_SUCCESS -verbose=${HDF5_VERBOSE:-1} # 0: none; 1: default; 2: chatty; 3: everything -test $verbose -gt 2 && set -x -H5_NO_DEPRECATED_SYMBOLS=`grep '#define H5_NO_DEPRECATED_SYMBOLS ' ../src/H5pubconf.h` -H5_USE_16_API_DEFAULT=`grep '#define H5_USE_16_API_DEFAULT ' ../src/H5pubconf.h` -H5_USE_18_API_DEFAULT=`grep '#define H5_USE_18_API_DEFAULT ' ../src/H5pubconf.h` -H5_USE_110_API_DEFAULT=`grep '#define H5_USE_110_API_DEFAULT ' ../src/H5pubconf.h` -H5_USE_112_API_DEFAULT=`grep '#define H5_USE_112_API_DEFAULT ' ../src/H5pubconf.h` -H5_USE_114_API_DEFAULT=`grep '#define H5_USE_114_API_DEFAULT ' ../src/H5pubconf.h` -H5_USE_116_API_DEFAULT=`grep '#define H5_USE_116_API_DEFAULT ' ../src/H5pubconf.h` -H5_USE_118_API_DEFAULT=`grep '#define H5_USE_118_API_DEFAULT ' ../src/H5pubconf.h` - -# setup my machine information. -myos=`uname -s` -myhostnama=`uname -n` - -# Generate some source files and library for tests. -suffix=c # source file suffix -hdf5main=${H5TOOL}_hdf5main.$suffix -hdf5main_o=${H5TOOL}_hdf5main.o -v16main=${H5TOOL}_v16main.$suffix -v16main_o=${H5TOOL}_v16main.o -v18main=${H5TOOL}_v18main.$suffix -v18main_o=${H5TOOL}_v18main.o -v110main=${H5TOOL}_v110main.$suffix -v110main_o=${H5TOOL}_v110main.o -v112main=${H5TOOL}_v112main.$suffix -v112main_o=${H5TOOL}_v112main.o -v114main=${H5TOOL}_v114main.$suffix -v114main_o=${H5TOOL}_v114main.o -appmain=${H5TOOL}_appmain.$suffix -appmain_o=${H5TOOL}_appmain.o -prog1=${H5TOOL}_prog1.$suffix -prog1_o=${H5TOOL}_prog1.o -prog2=${H5TOOL}_prog2.$suffix -prog2_o=${H5TOOL}_prog2.o -args=${H5TOOL}_args.$suffix -args_o=${H5TOOL}_args.o -applib=libapp${H5TOOL}.a - -# short hands -# Caution: if some *.h5 files must be cleaned here, list them by names. -# Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated -# by other test programs. This will cause a racing condition error when -# parallel make (e.g., gmake -j 4) is used. -temp_SRC="$hdf5main $v16main $v18main $v110main $v112main $v114main $appmain $prog1 $prog2" -temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` -temp_FILES="a.out $applib" - -# Generate appmain: -# An application Main that calls hdf5 and application's own functions. -cat > $appmain < $prog1 < -void -sub1(void) -{ - printf("in sub1\n"); -} -EOF - -# generate prog2 -cat > $prog2 < -void -sub2(void) -{ - printf("in sub2\n"); -} -EOF - -# Generate HDF5 Main Program: -# An HDF5 sample program that calls hdf5 functions. -cat > $hdf5main < $v16main < $v18main < $v110main < $v112main < $v114main < $args < $out 2>&1 - result=$? - if [ $result = 0 ]; then - echo " PASSED" - test $verbose -gt 1 && \ - ( echo "========== results ==========="; cat $out; - echo "===============================================") |sed 's/^/ /' - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - test $verbose -gt 0 && \ - ( echo "========== results ==========="; cat $out; - echo "===============================================") |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $out - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $H5TOOL $@ - echo " -SKIP-" -} - - -############################################################################## -### T H E T E S T S ### -############################################################################## -# -# Group 1: HDF5 program that calls HDF5 APIs. -echo "***"Simple Compile and Link in one step. -TOOLTEST $hdf5main -# Application program that calls HDF5 and its own functions. -TOOLTEST $appmain $prog1 $prog2 -# Repeat with -shlib option -echo "***"Simple Compile and Link with -shlib in one step. -TOOLTEST -shlib $hdf5main -# Application program that calls HDF5 and its own functions. -TOOLTEST -shlib $appmain $prog1 $prog2 - -# Group 2: Compile, then link. -echo "***"Compile and Link in two steps. -TOOLTEST -c $hdf5main -TOOLTEST $hdf5main_o -TOOLTEST -c $appmain $prog1 $prog2 -TOOLTEST $appmain_o $prog1_o $prog2_o -# Repeat with -shlib option -echo "***"Compile and Link with -shlib in two steps. -TOOLTEST -c $hdf5main -TOOLTEST -shlib $hdf5main_o -TOOLTEST -c $appmain $prog1 $prog2 -TOOLTEST -shlib $appmain_o $prog1_o $prog2_o - -# Group3: Build external library, then link with it. -echo "***"Build external library and link with it. -TOOLTEST -c $prog1 $prog2 -$AR cru $applib $prog1_o $prog2_o -$RANLIB $applib -TOOLTEST $appmain $applib -TOOLTEST $appmain_o $applib -# Repeat with -shlib option -echo "***"Build external library and link with it using -shlib. -TOOLTEST -c $prog1 $prog2 -$AR cru $applib $prog1_o $prog2_o -$RANLIB $applib -TOOLTEST -shlib $appmain $applib -TOOLTEST -shlib $appmain_o $applib - -# Group 4: Just preprocess, no compile, no link. -echo "***"Just preprocess, no compile, no link. -TOOLTEST -E $hdf5main -TOOLTEST -E $appmain $prog1 $prog2 - -# Group5: Version compatibility tests. -echo "***"Version compatibility tests. -# 20200610 Updated for versions 1.10 - 1.14. -# If H5_NO_DEPRECATED_SYMBOLS; -# then versions v18main, v110main, and v112main work. -# -DH5_USE__API_DEFAULT flags cannot be used with H5_NO_DEPRECATED_SYMBOLS; -# else if H5_USE_16_API_DEFAULT; -# then v16main works. -# else v18main works and -DH5_USE_16_API_DEFAULT v16main also works. -# As new versions with versioned functions are added, they will work with and -# should be added to H5_NO_DEPRECATED_SYMBOLS and to the else section, with and -# without the -DH5_USE__API_DEFAULT flag. A new H5_USE__API_DEFAULT section -# should also be added. -# -if [ -n "$H5_USE_16_API_DEFAULT" ]; then - echo "H5_USE_16_API_DEFAULT is defined." -elif [ -n "$H5_USE_18_API_DEFAULT" ]; then - echo "H5_USE_18_API_DEFAULT is defined." -elif [ -n "$H5_USE_110_API_DEFAULT" ]; then - echo "H5_USE_110_API_DEFAULT is defined." -elif [ -n "$H5_USE_112_API_DEFAULT" ]; then - echo "H5_USE_112_API_DEFAULT is defined." -elif [ -n "$H5_USE_114_API_DEFAULT" ]; then - echo "H5_USE_114_API_DEFAULT is defined." -elif [ -n "$H5_USE_116_API_DEFAULT" ]; then - echo "H5_USE_116_API_DEFAULT is defined." -elif [ -n "$H5_USE_118_API_DEFAULT" ]; then - echo "H5_USE_118_API_DEFAULT is defined." -else - echo "No H5 API_DEFAULT is defined." -fi -if [ -n "$H5_NO_DEPRECATED_SYMBOLS" ]; then - echo "H5_NO_DEPRECATED_SYMBOLS is defined." -else - echo "H5_NO_DEPRECATED_SYMBOLS is not defined." -fi -if [ -n "$H5_NO_DEPRECATED_SYMBOLS" ]; then - echo "Skipping $v16main test" - TOOLTEST $v18main - TOOLTEST $v18main - TOOLTEST $v110main - TOOLTEST $v112main - TOOLTEST $v114main -elif [ -n "$H5_USE_16_API_DEFAULT" ]; then - echo "Testing HDF5 with 16_API_DEFAULT" - TOOLTEST $v16main -elif [ -n "$H5_USE_18_API_DEFAULT" ]; then - echo "Testing HDF5 with 18_API_DEFAULT" - TOOLTEST -DH5_USE_16_API_DEFAULT $v16main - TOOLTEST $v18main -elif [ -n "$H5_USE_110_API_DEFAULT" ]; then - echo "Testing HDF5 with 110_API_DEFAULT" - TOOLTEST -DH5_USE_16_API_DEFAULT $v16main - TOOLTEST -DH5_USE_18_API_DEFAULT $v18main - TOOLTEST $v110main -elif [ -n "$H5_USE_112_API_DEFAULT" ]; then - echo "Testing HDF5 with 112_API_DEFAULT" - TOOLTEST -DH5_USE_16_API_DEFAULT $v16main - TOOLTEST -DH5_USE_18_API_DEFAULT $v18main - TOOLTEST -DH5_USE_110_API_DEFAULT $v110main - TOOLTEST $v112main -elif [ -n "$H5_USE_114_API_DEFAULT" ]; then - echo "Testing HDF5 with 114_API_DEFAULT" - TOOLTEST -DH5_USE_16_API_DEFAULT $v16main - TOOLTEST -DH5_USE_18_API_DEFAULT $v18main - TOOLTEST -DH5_USE_110_API_DEFAULT $v110main - TOOLTEST -DH5_USE_112_API_DEFAULT $v112main - TOOLTEST $v114main -elif [ -n "$H5_USE_116_API_DEFAULT" ]; then - echo "Testing HDF5 with 116_API_DEFAULT" - TOOLTEST -DH5_USE_16_API_DEFAULT $v16main - TOOLTEST -DH5_USE_18_API_DEFAULT $v18main - TOOLTEST -DH5_USE_110_API_DEFAULT $v110main - TOOLTEST -DH5_USE_112_API_DEFAULT $v112main - TOOLTEST -DH5_USE_114_API_DEFAULT $v114main - TOOLTEST $v116main -else - echo "Testing HDF5 with 118_API_DEFAULT" - TOOLTEST -DH5_USE_16_API_DEFAULT $v16main - TOOLTEST -DH5_USE_18_API_DEFAULT $v18main - TOOLTEST -DH5_USE_110_API_DEFAULT $v110main - TOOLTEST -DH5_USE_112_API_DEFAULT $v112main - TOOLTEST -DH5_USE_114_API_DEFAULT $v114main - TOOLTEST -DH5_USE_116_API_DEFAULT $v116main - TOOLTEST $v18main - TOOLTEST $v110main - TOOLTEST $v112main - TOOLTEST $v114main - TOOLTEST $v116main -fi - -# Group 6: # HDF5 program that depends on input args. -echo "***"Simple Compile and Link in one step with user-supplied arguments. -TOOLTEST -DSGL_QUOTE=\'H\' -DDBL_QUOTE=\"HDF\" -DMISC=42 $args - -############################################################################## -# END -############################################################################## - -# Clean up file -if test -z "$HDF5_NOCLEANUP"; then - rm -f $temp_SRC $temp_OBJ $temp_FILES -fi - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/HDF5Examples/CXX/H5D/Makefile.am b/HDF5Examples/CXX/H5D/Makefile.am deleted file mode 100644 index b97b5d14cd1..00000000000 --- a/HDF5Examples/CXX/H5D/Makefile.am +++ /dev/null @@ -1,81 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Library Examples Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -INSTALL_SCRIPT_FILES = run-c++-ex.sh - -# These are the programs that 'make all' or 'make prog' will build and -# which 'make check' will run. List them in the order they should be run. -EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group \ - h5tutr_cmprss h5tutr_crtatt h5tutr_crtdat h5tutr_crtgrpar \ - h5tutr_crtgrp h5tutr_crtgrpd h5tutr_extend h5tutr_rdwt \ - h5tutr_subset -TEST_SCRIPT=testh5c++.sh -TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) - -# These are the example files to be installed -INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \ - extend_ds.cpp chunks.cpp h5group.cpp \ - h5tutr_cmprss.cpp h5tutr_crtatt.cpp h5tutr_crtdat.cpp \ - h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \ - h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp - -# Some of the examples depend on files created by running other examples -readdata.chkexe_: create.chkexe_ -chunks.chkexe_: extend_ds.chkexe_ -h5tutr_rdwt.chkexe_: h5tutr_crtdat.chkexe -h5tutrcrtatt.chkexe_: h5tutr_crtdat.chkexe -h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe - -# Tell conclude.am that these are C++ tests. -CXX_API=yes - -# Where to install examples -# Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=${DESTDIR}$(examplesdir)/c++ -EXAMPLETOPDIR=${DESTDIR}$(examplesdir) - -# How to build programs using h5c++ -$(EXTRA_PROG): $(H5CPP) - $(H5CPP) $(H5CCFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/$@.cpp - -# List dependencies for each program. Normally, automake would take -# care of this for us, but if we tell automake about the programs it -# will try to build them with the normal C++ compiler, not h5c++. This is -# an inelegant way of solving the problem, unfortunately. -create: $(srcdir)/create.cpp -readdata: $(srcdir)/readdata.cpp -writedata: $(srcdir)/writedata.cpp -compound: $(srcdir)/compound.cpp -extend_ds: $(srcdir)/extend_ds.cpp -chunks: $(srcdir)/chunks.cpp -h5group: $(srcdir)/h5group.cpp - -h5tutr_cmprss: $(srcdir)/h5tutr_cmprss.cpp -h5tutr_crtatt: $(srcdir)/h5tutr_crtatt.cpp -h5tutr_crtdat: $(srcdir)/h5tutr_crtdat.cpp -h5tutr_crtgrpar: $(srcdir)/h5tutr_crtgrpar.cpp -h5tutr_crtgrp: $(srcdir)/h5tutr_crtgrp.cpp -h5tutr_crtgrpd: $(srcdir)/h5tutr_crtgrpd.cpp -h5tutr_extend: $(srcdir)/h5tutr_extend.cpp -h5tutr_rdwt: $(srcdir)/h5tutr_rdwt.cpp -h5tutr_subset: $(srcdir)/h5tutr_subset.cpp - -include $(top_srcdir)/config/examples.am -include $(top_srcdir)/config/conclude.am diff --git a/HDF5Examples/CXX/H5D/testh5c++.sh.in b/HDF5Examples/CXX/H5D/testh5c++.sh.in deleted file mode 100644 index f3a973cabc9..00000000000 --- a/HDF5Examples/CXX/H5D/testh5c++.sh.in +++ /dev/null @@ -1,277 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5c++ compiler tool - -srcdir=@srcdir@ - -# Initializations -TESTNAME=h5c++ -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Where the tool is installed. -prefix="${prefix:-@prefix@}" -AR="@AR@" -RANLIB="@RANLIB@" -H5TOOL="h5c++" # The tool name -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - -CMP='cmp -s' -DIFF='diff -c' - -nerrors=$EXIT_SUCCESS -verbose=yes - -# setup my machine information. -myos=`uname -s` -myhostnama=`uname -n` - -# Generate some source files and library for tests. -suffix=cpp # source file suffix -hdf5main=${H5TOOL}_hdf5main.$suffix -hdf5main_o=${H5TOOL}_hdf5main.o -appmain=${H5TOOL}_appmain.$suffix -appmain_o=${H5TOOL}_appmain.o -prog1=${H5TOOL}_prog1.$suffix -prog1_o=${H5TOOL}_prog1.o -prog2=${H5TOOL}_prog2.$suffix -prog2_o=${H5TOOL}_prog2.o -applib=libapp${H5TOOL}.a -args=${H5TOOL}_args.$suffix -args_o=${H5TOOL}_args.o - -# short hands -# Caution: if some *.h5 files must be cleaned here, list them by names. -# Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated -# by other test programs. This will cause a racing condition error when -# parallel make (e.g., gmake -j 4) is used. -temp_SRC="$hdf5main $appmain $prog1 $prog2" -temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` -temp_FILES="a.out $applib" - -# Generate appmain: -# An application Main that calls hdf5 and application's own functions. -cat > $appmain < - -#include - -#include "H5Cpp.h" - -#ifndef H5_NO_NAMESPACE -using namespace H5; -#endif - -const H5std_string FILE_NAME( "tmpapp.h5" ); -int sub1(void); -int sub2(void); - -int main (void) -{ - sub1(); - sub2(); - H5File file( FILE_NAME, H5F_ACC_TRUNC ); - return 0; -} - -EOF - -# generate prog1 -cat > $prog1 < -#include - -using std::cout; -using std::endl; -int sub1(void) -{ - cout << "in sub1" << endl; - return 0; -} -EOF - -# generate prog2 -cat > $prog2 < -#include - -using std::cout; -using std::endl; -int sub2(void) -{ - cout << "in sub2" << endl; - return 0; -} -EOF - -# Generate HDF5 Main Program: -# An HDF5 sample program that calls hdf5 functions. -cat > $hdf5main < - -#include - -#include "H5Cpp.h" - -#ifndef H5_NO_NAMESPACE -using namespace H5; -#endif - -const H5std_string FILE_NAME( "tmphdf5.h5" ); - -int main (void) -{ - H5File file( FILE_NAME, H5F_ACC_TRUNC ); - return 0; -} -EOF - -# Generate args: -# An application main that test misc command line arguments being passed. -cat > $args < -#include -#include "H5Cpp.h" -#ifndef H5_NO_NAMESPACE -using namespace H5; -#endif - -const H5std_string FILE_NAME( "args.h5" ); - -int main (void) -{ - char c = SGL_QUOTE; // 'H' - char *s = DBL_QUOTE; // "HDF" - int val = MISC; // 42 - - H5File file( FILE_NAME, H5F_ACC_TRUNC ); - return 0; -} -EOF - -# Parse option -# None - -# Print a line-line message left justified in a field of 74 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-74 | tr -d '\012' -} - - -# Debug printing -# Change : to echo to print the debug statement -DPRINT() { - : $* -} - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# failed output. The actual output is not removed if $HDF5_NOCLEANUP is -# defined. -# -TOOLTEST() { - out=test_$H5TOOL_$$.out - err=test_$H5TOOL_$$.err - - # Run test. - TESTING $H5TOOL $@ - $H5TOOL_BIN $@ > $out 2>&1 - result=$? - if [ $result = 0 ]; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && \ - ( echo "========== results ==========="; cat $out; - echo "===============================================") |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $out - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $H5TOOL $@ - echo " -SKIP-" -} - - -############################################################################## -### T H E T E S T S ### -############################################################################## -# -# HDF5 program that calls HDF5 APIs. -echo "***"Simple Compile and Link in one step. -TOOLTEST $hdf5main -# Application program that calls HDF5 and its own functions. -TOOLTEST $appmain $prog1 $prog2 - -# Compile, then link. -echo "***"Compile and Link in two steps. -TOOLTEST -c $hdf5main -TOOLTEST $hdf5main_o -TOOLTEST -c $appmain $prog1 $prog2 -TOOLTEST $appmain_o $prog1_o $prog2_o - -# Build external library, then link with it. -echo "***"Build external library and link with it. -TOOLTEST -c $prog1 $prog2 -rm -f $applib -$AR cru $applib $prog1_o $prog2_o -$RANLIB $applib -TOOLTEST $appmain $applib -TOOLTEST $appmain_o $applib -# This is peculiar but should work. (See bug ID 729) -TOOLTEST -c $hdf5main -rm -f $applib -$AR cru $applib $hdf5main_o -$RANLIB $applib -# SunOS does not support this. Skip it. -if [ $myos = SunOS ]; then - SKIP -o a.out $applib -else - TOOLTEST -o a.out $applib -fi - -# Just preprocess, no compile, no link. -echo "***"Just preprocess, no compile, no link. -TOOLTEST -E $hdf5main -TOOLTEST -E $appmain $prog1 $prog2 - -# HDF5 program that depends on input args. -echo "***"Simple Compile and Link in one step with user-supplied arguments. -TOOLTEST -DSGL_QUOTE=\'H\' -DDBL_QUOTE=\"HDF\" -DMISC=42 $args - -############################################################################## -# END -############################################################################## - -# Clean up file -if test -z "$HDF5_NOCLEANUP"; then - rm -f $temp_SRC $temp_OBJ $temp_FILES -fi - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/HDF5Examples/CXX/Makefile.am b/HDF5Examples/CXX/Makefile.am deleted file mode 100644 index 1cbae2e1c5e..00000000000 --- a/HDF5Examples/CXX/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -# This makefile mostly just reinvokes make in the various subdirectories -# but does so in the correct order. You can alternatively invoke make from -# each subdirectory manually. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 CXX Library Examples Makefile(.in) - -include $(top_srcdir)/config/commence.am - -## Only recurse into subdirectories if the CXX interface is enabled. - SUBDIRS=H5D TUTR - -include $(top_srcdir)/config/conclude.am diff --git a/HDF5Examples/CXX/TUTR/Makefile.am b/HDF5Examples/CXX/TUTR/Makefile.am deleted file mode 100644 index b97b5d14cd1..00000000000 --- a/HDF5Examples/CXX/TUTR/Makefile.am +++ /dev/null @@ -1,81 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Library Examples Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -INSTALL_SCRIPT_FILES = run-c++-ex.sh - -# These are the programs that 'make all' or 'make prog' will build and -# which 'make check' will run. List them in the order they should be run. -EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group \ - h5tutr_cmprss h5tutr_crtatt h5tutr_crtdat h5tutr_crtgrpar \ - h5tutr_crtgrp h5tutr_crtgrpd h5tutr_extend h5tutr_rdwt \ - h5tutr_subset -TEST_SCRIPT=testh5c++.sh -TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) - -# These are the example files to be installed -INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \ - extend_ds.cpp chunks.cpp h5group.cpp \ - h5tutr_cmprss.cpp h5tutr_crtatt.cpp h5tutr_crtdat.cpp \ - h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \ - h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp - -# Some of the examples depend on files created by running other examples -readdata.chkexe_: create.chkexe_ -chunks.chkexe_: extend_ds.chkexe_ -h5tutr_rdwt.chkexe_: h5tutr_crtdat.chkexe -h5tutrcrtatt.chkexe_: h5tutr_crtdat.chkexe -h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe - -# Tell conclude.am that these are C++ tests. -CXX_API=yes - -# Where to install examples -# Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=${DESTDIR}$(examplesdir)/c++ -EXAMPLETOPDIR=${DESTDIR}$(examplesdir) - -# How to build programs using h5c++ -$(EXTRA_PROG): $(H5CPP) - $(H5CPP) $(H5CCFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/$@.cpp - -# List dependencies for each program. Normally, automake would take -# care of this for us, but if we tell automake about the programs it -# will try to build them with the normal C++ compiler, not h5c++. This is -# an inelegant way of solving the problem, unfortunately. -create: $(srcdir)/create.cpp -readdata: $(srcdir)/readdata.cpp -writedata: $(srcdir)/writedata.cpp -compound: $(srcdir)/compound.cpp -extend_ds: $(srcdir)/extend_ds.cpp -chunks: $(srcdir)/chunks.cpp -h5group: $(srcdir)/h5group.cpp - -h5tutr_cmprss: $(srcdir)/h5tutr_cmprss.cpp -h5tutr_crtatt: $(srcdir)/h5tutr_crtatt.cpp -h5tutr_crtdat: $(srcdir)/h5tutr_crtdat.cpp -h5tutr_crtgrpar: $(srcdir)/h5tutr_crtgrpar.cpp -h5tutr_crtgrp: $(srcdir)/h5tutr_crtgrp.cpp -h5tutr_crtgrpd: $(srcdir)/h5tutr_crtgrpd.cpp -h5tutr_extend: $(srcdir)/h5tutr_extend.cpp -h5tutr_rdwt: $(srcdir)/h5tutr_rdwt.cpp -h5tutr_subset: $(srcdir)/h5tutr_subset.cpp - -include $(top_srcdir)/config/examples.am -include $(top_srcdir)/config/conclude.am diff --git a/HDF5Examples/CXX/TUTR/testh5c++.sh.in b/HDF5Examples/CXX/TUTR/testh5c++.sh.in deleted file mode 100644 index f3a973cabc9..00000000000 --- a/HDF5Examples/CXX/TUTR/testh5c++.sh.in +++ /dev/null @@ -1,277 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5c++ compiler tool - -srcdir=@srcdir@ - -# Initializations -TESTNAME=h5c++ -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Where the tool is installed. -prefix="${prefix:-@prefix@}" -AR="@AR@" -RANLIB="@RANLIB@" -H5TOOL="h5c++" # The tool name -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - -CMP='cmp -s' -DIFF='diff -c' - -nerrors=$EXIT_SUCCESS -verbose=yes - -# setup my machine information. -myos=`uname -s` -myhostnama=`uname -n` - -# Generate some source files and library for tests. -suffix=cpp # source file suffix -hdf5main=${H5TOOL}_hdf5main.$suffix -hdf5main_o=${H5TOOL}_hdf5main.o -appmain=${H5TOOL}_appmain.$suffix -appmain_o=${H5TOOL}_appmain.o -prog1=${H5TOOL}_prog1.$suffix -prog1_o=${H5TOOL}_prog1.o -prog2=${H5TOOL}_prog2.$suffix -prog2_o=${H5TOOL}_prog2.o -applib=libapp${H5TOOL}.a -args=${H5TOOL}_args.$suffix -args_o=${H5TOOL}_args.o - -# short hands -# Caution: if some *.h5 files must be cleaned here, list them by names. -# Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated -# by other test programs. This will cause a racing condition error when -# parallel make (e.g., gmake -j 4) is used. -temp_SRC="$hdf5main $appmain $prog1 $prog2" -temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` -temp_FILES="a.out $applib" - -# Generate appmain: -# An application Main that calls hdf5 and application's own functions. -cat > $appmain < - -#include - -#include "H5Cpp.h" - -#ifndef H5_NO_NAMESPACE -using namespace H5; -#endif - -const H5std_string FILE_NAME( "tmpapp.h5" ); -int sub1(void); -int sub2(void); - -int main (void) -{ - sub1(); - sub2(); - H5File file( FILE_NAME, H5F_ACC_TRUNC ); - return 0; -} - -EOF - -# generate prog1 -cat > $prog1 < -#include - -using std::cout; -using std::endl; -int sub1(void) -{ - cout << "in sub1" << endl; - return 0; -} -EOF - -# generate prog2 -cat > $prog2 < -#include - -using std::cout; -using std::endl; -int sub2(void) -{ - cout << "in sub2" << endl; - return 0; -} -EOF - -# Generate HDF5 Main Program: -# An HDF5 sample program that calls hdf5 functions. -cat > $hdf5main < - -#include - -#include "H5Cpp.h" - -#ifndef H5_NO_NAMESPACE -using namespace H5; -#endif - -const H5std_string FILE_NAME( "tmphdf5.h5" ); - -int main (void) -{ - H5File file( FILE_NAME, H5F_ACC_TRUNC ); - return 0; -} -EOF - -# Generate args: -# An application main that test misc command line arguments being passed. -cat > $args < -#include -#include "H5Cpp.h" -#ifndef H5_NO_NAMESPACE -using namespace H5; -#endif - -const H5std_string FILE_NAME( "args.h5" ); - -int main (void) -{ - char c = SGL_QUOTE; // 'H' - char *s = DBL_QUOTE; // "HDF" - int val = MISC; // 42 - - H5File file( FILE_NAME, H5F_ACC_TRUNC ); - return 0; -} -EOF - -# Parse option -# None - -# Print a line-line message left justified in a field of 74 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-74 | tr -d '\012' -} - - -# Debug printing -# Change : to echo to print the debug statement -DPRINT() { - : $* -} - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# failed output. The actual output is not removed if $HDF5_NOCLEANUP is -# defined. -# -TOOLTEST() { - out=test_$H5TOOL_$$.out - err=test_$H5TOOL_$$.err - - # Run test. - TESTING $H5TOOL $@ - $H5TOOL_BIN $@ > $out 2>&1 - result=$? - if [ $result = 0 ]; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && \ - ( echo "========== results ==========="; cat $out; - echo "===============================================") |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $out - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $H5TOOL $@ - echo " -SKIP-" -} - - -############################################################################## -### T H E T E S T S ### -############################################################################## -# -# HDF5 program that calls HDF5 APIs. -echo "***"Simple Compile and Link in one step. -TOOLTEST $hdf5main -# Application program that calls HDF5 and its own functions. -TOOLTEST $appmain $prog1 $prog2 - -# Compile, then link. -echo "***"Compile and Link in two steps. -TOOLTEST -c $hdf5main -TOOLTEST $hdf5main_o -TOOLTEST -c $appmain $prog1 $prog2 -TOOLTEST $appmain_o $prog1_o $prog2_o - -# Build external library, then link with it. -echo "***"Build external library and link with it. -TOOLTEST -c $prog1 $prog2 -rm -f $applib -$AR cru $applib $prog1_o $prog2_o -$RANLIB $applib -TOOLTEST $appmain $applib -TOOLTEST $appmain_o $applib -# This is peculiar but should work. (See bug ID 729) -TOOLTEST -c $hdf5main -rm -f $applib -$AR cru $applib $hdf5main_o -$RANLIB $applib -# SunOS does not support this. Skip it. -if [ $myos = SunOS ]; then - SKIP -o a.out $applib -else - TOOLTEST -o a.out $applib -fi - -# Just preprocess, no compile, no link. -echo "***"Just preprocess, no compile, no link. -TOOLTEST -E $hdf5main -TOOLTEST -E $appmain $prog1 $prog2 - -# HDF5 program that depends on input args. -echo "***"Simple Compile and Link in one step with user-supplied arguments. -TOOLTEST -DSGL_QUOTE=\'H\' -DDBL_QUOTE=\"HDF\" -DMISC=42 $args - -############################################################################## -# END -############################################################################## - -# Clean up file -if test -z "$HDF5_NOCLEANUP"; then - rm -f $temp_SRC $temp_OBJ $temp_FILES -fi - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/HDF5Examples/FORTRAN/H5D/Makefile.am b/HDF5Examples/FORTRAN/H5D/Makefile.am deleted file mode 100644 index c76ce8590de..00000000000 --- a/HDF5Examples/FORTRAN/H5D/Makefile.am +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -noinst_PROGRAMS = \ - h5ex_d_alloc \ - h5ex_d_checksum \ - h5ex_d_chunk \ - h5ex_d_compact \ - h5ex_d_extern \ - h5ex_d_fillval \ - h5ex_d_gzip \ - h5ex_d_hyper \ - h5ex_d_nbit \ - h5ex_d_rdwr \ - h5ex_d_soint \ - h5ex_d_szip \ - h5ex_d_transform \ - h5ex_d_unlimmod - -h5ex_d_alloc_SOURCES = h5ex_d_alloc.F90 -h5ex_d_checksum_SOURCES = h5ex_d_checksum.F90 -h5ex_d_chunk_SOURCES = h5ex_d_chunk.F90 -h5ex_d_compact_SOURCES = h5ex_d_compact.F90 -h5ex_d_extern_SOURCES = h5ex_d_extern.F90 -h5ex_d_fillval_SOURCES = h5ex_d_fillval.F90 -h5ex_d_gzip_SOURCES = h5ex_d_gzip.F90 -h5ex_d_hyper_SOURCES = h5ex_d_hyper.F90 -h5ex_d_nbit_SOURCES = h5ex_d_nbit.F90 -h5ex_d_rdwr_SOURCES = h5ex_d_rdwr.F90 -h5ex_d_soint_SOURCES = h5ex_d_soint.F90 -h5ex_d_szip_SOURCES = h5ex_d_szip.F90 -h5ex_d_transform_SOURCES = h5ex_d_transform.F90 -h5ex_d_unlimmod_SOURCES = h5ex_d_unlimmod.F90 - -if FORTRAN_2003_CONDITIONAL_F - noinst_PROGRAMS += h5ex_d_rdwr_kind - h5ex_d_rdwr_kind_SOURCES = h5ex_d_rdwr_kind.F90 -endif - - -EXTRA_DIST = tfiles/h5ex_d_rdwr.tst tfiles/h5ex_d_hyper.tst tfiles/h5ex_d_chunk.tst \ -tfiles/h5ex_d_gzip.tst tfiles/h5ex_d_extern.tst tfiles/h5ex_d_compact.tst \ -tfiles/h5ex_d_unlimadd.tst \ -tfiles/h5ex_d_checksum.tst tfiles/h5ex_d_transform.tst \ -tfiles/h5ex_d_fillval.tst tfiles/h5ex_d_alloc.tst \ -tfiles/h5ex_d_rdwr.ddl tfiles/h5ex_d_hyper.ddl tfiles/h5ex_d_chunk.ddl \ -tfiles/h5ex_d_gzip.ddl tfiles/h5ex_d_extern.ddl tfiles/h5ex_d_compact.ddl \ -tfiles/h5ex_d_unlimadd.ddl \ -tfiles/h5ex_d_checksum.ddl tfiles/h5ex_d_transform.ddl \ -tfiles/h5ex_d_soint.tst tfiles/h5ex_d_soint.dll \ -tfiles/h5ex_d_szip.tst tfiles/h5ex_d_szip.dll \ -tfiles/h5ex_d_nbit.tst tfiles/h5ex_d_nbit.dll \ -tfiles/h5ex_d_unlimmod.tst tfiles/h5ex_d_unlimmod.dll \ -tfiles/h5ex_d_fillval.ddl tfiles/h5ex_d_alloc.ddl \ -test.sh - -if FORTRAN_2003_CONDITIONAL_F - EXTRA_DIST += tfiles/h5ex_d_rdwr_kind.tst tfiles/h5ex_d_rdwr_kind.dll -endif - -TESTS = test.sh - -CLEANFILES = Makefile test.sh diff --git a/HDF5Examples/FORTRAN/H5D/test.sh.in b/HDF5Examples/FORTRAN/H5D/test.sh.in deleted file mode 100755 index e67eccd5351..00000000000 --- a/HDF5Examples/FORTRAN/H5D/test.sh.in +++ /dev/null @@ -1,209 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -srcdir=@srcdir@ - - -case $FC in -*/*) H5DUMP=`echo $FC | sed -e 's/\/[^/]*$/\/h5dump/'`; - test -x $H5DUMP || H5DUMP=h5dump;; -*) H5DUMP=h5dump;; -esac - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ;; - *c*,* ) ECHO_N=-n ECHO_C= ;; - *) ECHO_N= ECHO_C='\c' ;; -esac -ECHO_N="echo $ECHO_N" - - -exout() { - $* -} - -dumpout() { - $H5DUMP $* -} - -# compare current version, required version. -# returns if cur_ver < req_ver is true. -version_compare() { - version_lt=0 - if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then - version_lt=1 - fi -} - -H5_LIBVER=@H5_LIBVER@ -H5_LIBVER_DIR=@H5_LIBVER_DIR@ - -topics="alloc \ - checksum \ - chunk \ - compact \ - extern \ - fillval \ - gzip \ - hyper \ - rdwr \ - soint \ - szip \ - unlimmod" - -FORTRAN_2003_CONDITIONAL_F="@FORTRAN_2003_CONDITIONAL_F@" - -if [ "$FORTRAN_2003_CONDITIONAL_F" = "Xyes" ]; then - topics="$topics rdwr_kind" -fi - -return_val=0 - -#Remove external data file from h5ex_d_extern -rm -f h5ex_d_extern.data - -for topic in $topics -do - fname=h5ex_d_$topic - $ECHO_N "Testing FORTRAN/H5D/$fname...$ECHO_C" - exout ./$fname >tmp.test - status=$? - if test $status -eq 1 - then - echo " Unsupported feature" - status=0 - else - if [ "$topic" = "alloc" ]; then - # Check if the only difference is the size of the unallocated space. This - # was fixed later in HDF5 to be of zero size. - status=0 - diff tmp.test $srcdir/tfiles/18/$fname.tst > tmp.diff - if [ $? -ne 0 ]; then - NumOfFinds=`grep -c "0 bytes" tmp.diff | wc -l` - rm -f tmp.diff - if [ "$NumOfFinds" -gt "1" ]; then - status=1 - fi - fi - else - cmp -s tmp.test $srcdir/tfiles/18/$fname.tst - status=$? - fi - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - status=$? - if test $status -ne 0 - then - # test to see if the only difference is because of big-endian and little-endian - diff tmp.test $srcdir/tfiles/18/$fname.ddl > tmp.diff - echo " " - NumOfFinds=`grep -c "DATATYPE" tmp.diff` - NumOfFinds=`expr $NumOfFinds \* 2` - NumOfLines=`wc -l tmp.test - status=$? - if test $status -eq 1 - then - echo " Unsupported feature" - status=0 - else - if [[ $fname == "h5ex_d_nbit" ]] - then - tdir=$nbitdir - if [[ $USE_ALT == "" ]] - then - ### set USE_ALT=07 if not set above - USE_ALT="07" - fi - else - tdir=18 - ### unset USE_ALT for the other topics - USE_ALT="" - fi - cmp -s tmp.test $srcdir/tfiles/18/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - if [[ $fname == "h5ex_d_transform" ]] - then - targ="-n" - else - targ="" - fi - dumpout $targ $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/$tdir/$fname$USE_ALT.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` - fi -done - - -rm -f tmp.test -echo "$return_val tests failed in FORTRAN/H5D/" -exit $return_val diff --git a/HDF5Examples/FORTRAN/H5G/Makefile.am b/HDF5Examples/FORTRAN/H5G/Makefile.am deleted file mode 100644 index cdf1647fcb7..00000000000 --- a/HDF5Examples/FORTRAN/H5G/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -noinst_PROGRAMS = h5ex_g_compact h5ex_g_create \ - h5ex_g_corder h5ex_g_phase - -h5ex_g_compact_SOURCES = h5ex_g_compact.F90 -h5ex_g_create_SOURCES = h5ex_g_create.F90 -h5ex_g_corder_SOURCES = h5ex_g_corder.F90 -h5ex_g_phase_SOURCES = h5ex_g_phase.F90 - -EXTRA_DIST = tfiles/h5ex_g_create.ddl \ -tfiles/h5ex_g_compact1.ddl tfiles/h5ex_g_compact2.ddl tfiles/h5ex_g_corder.tst \ -tfiles/h5ex_g_phase.tst \ -test.sh - -TESTS = test.sh - -CLEANFILES = Makefile test.sh diff --git a/HDF5Examples/FORTRAN/H5G/test.sh.in b/HDF5Examples/FORTRAN/H5G/test.sh.in deleted file mode 100755 index d0906df8b6e..00000000000 --- a/HDF5Examples/FORTRAN/H5G/test.sh.in +++ /dev/null @@ -1,116 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -srcdir=@srcdir@ - - -case $FC in -*/*) H5DUMP=`echo $FC | sed -e 's/\/[^/]*$/\/h5dump/'`; - test -x $H5DUMP || H5DUMP=h5dump;; -*) H5DUMP=h5dump;; -esac - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ;; - *c*,* ) ECHO_N=-n ECHO_C= ;; - *) ECHO_N= ECHO_C='\c' ;; -esac -ECHO_N="echo $ECHO_N" - - -exout() { - $* -} - -dumpout() { - $H5DUMP $* -} - -H5_LIBVER=@H5_LIBVER@ -H5_LIBVER_DIR=@H5_LIBVER_DIR@ - -return_val=0 - - -$ECHO_N "Testing FORTRAN/H5G/h5ex_g_create...$ECHO_C" -./h5ex_g_create -dumpout h5ex_g_create.h5 >tmp.test -rm -f h5ex_g_create.h5 -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_create.ddl -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` - - -$ECHO_N "Testing FORTRAN/H5G/h5ex_g_compact...$ECHO_C" -./h5ex_g_compact >/dev/null -dumpout h5ex_g_compact1.h5 >tmp.test -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact1.ddl -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - dumpout h5ex_g_compact2.h5 >tmp.test - cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact2.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi -fi -return_val=`expr $status + $return_val` -rm -f h5ex_g_compact1.h5 -rm -f h5ex_g_compact2.h5 - - -$ECHO_N "Testing FORTRAN/H5G/h5ex_g_phase...$ECHO_C" -exout ./h5ex_g_phase >tmp.test -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_phase.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` -rm -f h5ex_g_phase.h5 - - -$ECHO_N "Testing FORTRAN/H5G/h5ex_g_corder...$ECHO_C" -exout ./h5ex_g_corder >tmp.test -cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_corder.tst -status=$? -if test $status -ne 0 -then - echo " FAILED!" -else - echo " Passed" -fi -return_val=`expr $status + $return_val` -rm -f h5ex_g_corder.h5 - - -rm -f tmp.test -echo "$return_val tests failed in /FORTRAN/H5G/" -exit $return_val diff --git a/HDF5Examples/FORTRAN/H5T/Makefile.am b/HDF5Examples/FORTRAN/H5T/Makefile.am deleted file mode 100644 index 7d9d96a89b6..00000000000 --- a/HDF5Examples/FORTRAN/H5T/Makefile.am +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -noinst_PROGRAMS = h5ex_t_vlstring -h5ex_t_vlstring_SOURCES = h5ex_t_vlstring.F90 - -if FORTRAN_2003_CONDITIONAL_F - -noinst_PROGRAMS += h5ex_t_arrayatt_F03 h5ex_t_array_F03 h5ex_t_bitatt_F03 h5ex_t_bit_F03 \ - h5ex_t_cmpdatt_F03 h5ex_t_cmpd_F03 h5ex_t_Cstring_F03 h5ex_t_enumatt_F03 \ - h5ex_t_enum_F03 h5ex_t_floatatt_F03 h5ex_t_float_F03 h5ex_t_intatt_F03 h5ex_t_int_F03 \ - h5ex_t_objrefatt_F03 h5ex_t_objref_F03 h5ex_t_opaqueatt_F03 h5ex_t_opaque_F03 \ - h5ex_t_regrefatt_F03 h5ex_t_regref_F03 h5ex_t_stringCatt_F03 h5ex_t_stringC_F03 \ - h5ex_t_string_F03 h5ex_t_vlenatt_F03 h5ex_t_vlen_F03 - -h5ex_t_arrayatt_F03_SOURCES = h5ex_t_arrayatt_F03.F90 -h5ex_t_array_F03_SOURCES = h5ex_t_array_F03.F90 -h5ex_t_bitatt_F03_SOURCES = h5ex_t_bitatt_F03.F90 -h5ex_t_bit_F03_SOURCES = h5ex_t_bit_F03.F90 -h5ex_t_cmpdatt_F03_SOURCES = h5ex_t_cmpdatt_F03.F90 -h5ex_t_cmpd_F03_SOURCES = h5ex_t_cmpd_F03.F90 -h5ex_t_Cstring_F03_SOURCES = h5ex_t_Cstring_F03.F90 -h5ex_t_enumatt_F03_SOURCES = h5ex_t_enumatt_F03.F90 -h5ex_t_enum_F03_SOURCES = h5ex_t_enum_F03.F90 -h5ex_t_floatatt_F03_SOURCES = h5ex_t_floatatt_F03.F90 -h5ex_t_float_F03_SOURCES = h5ex_t_float_F03.F90 -h5ex_t_intatt_F03_SOURCES = h5ex_t_intatt_F03.F90 -h5ex_t_int_F03_SOURCES = h5ex_t_int_F03.F90 -h5ex_t_objrefatt_F03_SOURCES = h5ex_t_objrefatt_F03.F90 -h5ex_t_objref_F03_SOURCES = h5ex_t_objref_F03.F90 -h5ex_t_opaqueatt_F03_SOURCES = h5ex_t_opaqueatt_F03.F90 -h5ex_t_opaque_F03_SOURCES = h5ex_t_opaque_F03.F90 -h5ex_t_regrefatt_F03_SOURCES = h5ex_t_regrefatt_F03.F90 -h5ex_t_regref_F03_SOURCES = h5ex_t_regref_F03.F90 -h5ex_t_stringCatt_F03_SOURCES = h5ex_t_stringCatt_F03.F90 -h5ex_t_stringC_F03_SOURCES = h5ex_t_stringC_F03.F90 -h5ex_t_string_F03_SOURCES = h5ex_t_string_F03.F90 -h5ex_t_vlenatt_F03_SOURCES = h5ex_t_vlenatt_F03.F90 -h5ex_t_vlen_F03_SOURCES = h5ex_t_vlen_F03.F90 - -endif - -EXTRA_DIST = tfiles/h5ex_t_arrayatt_F03.tst tfiles/h5ex_t_array_F03.tst tfiles/h5ex_t_bitatt_F03.tst \ - tfiles/h5ex_t_bit_F03.tst tfiles/h5ex_t_cmpdatt_F03.tst tfiles/h5ex_t_cmpd_F03.tst \ - tfiles/h5ex_t_Cstring_F03.tst tfiles/h5ex_t_enumatt_F03.tst tfiles/h5ex_t_enum_F03.tst \ - tfiles/h5ex_t_floatatt_F03.tst tfiles/h5ex_t_float_F03.tst tfiles/h5ex_t_intatt_F03.tst \ - tfiles/h5ex_t_int_F03.tst tfiles/h5ex_t_objrefatt_F03.tst tfiles/h5ex_t_objref_F03.tst \ - tfiles/h5ex_t_opaqueatt_F03.tst tfiles/h5ex_t_opaque_F03.tst tfiles/h5ex_t_regrefatt_F03.tst \ - tfiles/h5ex_t_regref_F03.tst tfiles/h5ex_t_stringCatt_F03.tst tfiles/h5ex_t_stringC_F03.tst \ - tfiles/h5ex_t_string_F03.tst tfiles/h5ex_t_vlenatt_F03.tst tfiles/h5ex_t_vlen_F03.tst \ - tfiles/h5ex_t_vlstring.tst \ - tfiles/h5ex_t_arrayatt_F03.ddl tfiles/h5ex_t_array_F03.ddl tfiles/h5ex_t_bitatt_F03.ddl \ - tfiles/h5ex_t_bit_F03.ddl tfiles/h5ex_t_cmpdatt_F03.ddl tfiles/h5ex_t_cmpd_F03.ddl \ - tfiles/h5ex_t_Cstring_F03.ddl tfiles/h5ex_t_enumatt_F03.ddl tfiles/h5ex_t_enum_F03.ddl \ - tfiles/h5ex_t_floatatt_F03.ddl tfiles/h5ex_t_float_F03.ddl tfiles/h5ex_t_intatt_F03.ddl \ - tfiles/h5ex_t_int_F03.ddl tfiles/h5ex_t_objrefatt_F03.ddl tfiles/h5ex_t_objref_F03.ddl \ - tfiles/h5ex_t_opaqueatt_F03.ddl tfiles/h5ex_t_opaque_F03.ddl tfiles/h5ex_t_regrefatt_F03.ddl \ - tfiles/h5ex_t_regref_F03.ddl tfiles/h5ex_t_stringCatt_F03.ddl tfiles/h5ex_t_stringC_F03.ddl \ - tfiles/h5ex_t_string_F03.ddl tfiles/h5ex_t_vlenatt_F03.ddl tfiles/h5ex_t_vlen_F03.ddl \ - tfiles/h5ex_t_vlstring.ddl \ - test.sh - -TESTS = test.sh - -CLEANFILES = Makefile test.sh diff --git a/HDF5Examples/FORTRAN/H5T/test.sh.in b/HDF5Examples/FORTRAN/H5T/test.sh.in deleted file mode 100755 index dc1f434923d..00000000000 --- a/HDF5Examples/FORTRAN/H5T/test.sh.in +++ /dev/null @@ -1,215 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -srcdir=@srcdir@ - - -case $FC in -*/*) H5DUMP=`echo $FC | sed -e 's/\/[^/]*$/\/h5dump/'`; - test -x $H5DUMP || H5DUMP=h5dump;; -*) H5DUMP=h5dump;; -esac - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ;; - *c*,* ) ECHO_N=-n ECHO_C= ;; - *) ECHO_N= ECHO_C='\c' ;; -esac -ECHO_N="echo $ECHO_N" - - -exout() { - $* -} - -dumpout() { - $H5DUMP $* -} - -# compare current version, required version. -# returns if cur_ver < req_ver is true. -version_compare() { - version_lt=0 - if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then - version_lt=1 - fi -} - -H5_LIBVER=@H5_LIBVER@ -H5_LIBVER_DIR=@H5_LIBVER_DIR@ -FORTRAN_2003_CONDITIONAL_F="@FORTRAN_2003_CONDITIONAL_F@" - -topics="vlstring" - -if [ "$FORTRAN_2003_CONDITIONAL_F" = "Xyes" ]; then - topics="arrayatt_F03 array_F03 bitatt_F03 bit_F03 cmpdatt_F03 cmpd_F03 \ - Cstring_F03 enumatt_F03 enum_F03 floatatt_F03 float_F03 \ - intatt_F03 int_F03 opaqueatt_F03 opaque_F03 \ - string_F03 $topics" -fi - -return_val=0 - -for topic in $topics -do - fname=h5ex_t_$topic - $ECHO_N "Testing FORTRAN/H5T/$fname...$ECHO_C" - exout ./$fname >tmp.test - cmp -s tmp.test $srcdir/tfiles/18/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - if [[ $fname == "h5ex_t_cpxcmpd_F03" || $fname == "h5ex_t_cpxcmpdatt_F03" ]] - then - targ="-n" - else - targ="" - fi - dumpout $targ $fname.h5 >tmp.test - rm -f $fname.h5 - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` -done - - -#######Non-standard tests####### - -USE_ALT="" -if [ "$H5_LIBVER_DIR" = "110" ]; then - # check if HDF5 version is < 1.10.7 - version_compare "$H5_LIBVER" "1.10.7" - if [ "$version_lt" = 1 ]; then - USE_ALT="06" - fi -else - if [ "$H5_LIBVER_DIR" = "18" ]; then - # check if HDF5 version is < 1.8.22 - version_compare "$H5_LIBVER" "1.8.22" - if [ "$version_lt" = 1 ]; then - USE_ALT="21" - fi - fi -fi - -if [ "$FORTRAN_2003_CONDITIONAL_F" = "Xyes" ]; then - topics="objrefatt_F03 objref_F03 regrefatt_F03 regref_F03" -else - topics="" -fi - -for topic in $topics -do - fname=h5ex_t_$topic - $ECHO_N "Testing FORTRAN/H5T/$fname...$ECHO_C" - exout ./$fname >tmp.test - cmp -s tmp.test $srcdir/tfiles/18/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - version_compare "$H5_LIBVER" "1.10.0" - if [ "$version_lt" = 1 ]; then - cmp -s tmp.test $srcdir/tfiles/18/$fname$USE_ALT.ddl - else - version_compare "$H5_LIBVER" "1.12.0" - if [ "$version_lt" = 1 ]; then - version_compare "$H5_LIBVER" "1.10.7" - if [ "$version_lt" = 1 ]; then - cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl - else - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - fi - else - cmp -s tmp.test $srcdir/tfiles/112/$fname.ddl - fi - fi - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` -done - -topics="" -version_compare "$H5_LIBVER" "1.10.0" -if [ "$version_lt" = 0 ]; then - topics=" vlenatt_F03 vlen_F03" -fi - -for topic in $topics -do - fname=h5ex_t_$topic - $ECHO_N "Testing C/H5T/$fname...$ECHO_C" - exout ./$fname >tmp.test - cmp -s tmp.test $srcdir/tfiles/18/$fname.tst - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - dumpout $fname.h5 >tmp.test - rm -f $fname.h5 - version_compare "$H5_LIBVER" "1.14.3" - if [ "$version_lt" = 1 ]; then - cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl - else - cmp -s tmp.test $srcdir/tfiles/114/$fname.ddl - fi - status=$? - if test $status -ne 0 - then - echo " FAILED!" - else - echo " Passed" - fi - fi - return_val=`expr $status + $return_val` -done - - -#fname=h5ex_t_convert -#$ECHO_N "Testing FORTRAN/H5T/$fname...$ECHO_C" -#exout ./$fname >tmp.test -#cmp -s tmp.test $srcdir/tfiles/18/$fname.test -#status=$? -#if test $status -ne 0 -#then -# echo " FAILED!" -#else -# echo " Passed" -#fi -#return_val=`expr $status + $return_val` - - -rm -f tmp.test -echo "$return_val tests failed in /FORTRAN/H5T/" -exit $return_val diff --git a/HDF5Examples/FORTRAN/Makefile.am b/HDF5Examples/FORTRAN/Makefile.am deleted file mode 100644 index 778f802246c..00000000000 --- a/HDF5Examples/FORTRAN/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -if H5D -DO_H5D=H5D -endif - -if H5G -DO_H5G=H5G -endif - -if H5T -DO_H5T=H5T -endif - -SUBDIRS = $(DO_H5D) $(DO_H5G) $(DO_H5T) diff --git a/HDF5Examples/FORTRAN/TUTR/Makefile.am b/HDF5Examples/FORTRAN/TUTR/Makefile.am deleted file mode 100644 index e9a0fac041f..00000000000 --- a/HDF5Examples/FORTRAN/TUTR/Makefile.am +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5-Fortran Examples Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -INSTALL_SCRIPT_FILES = run-fortran-ex.sh - -# These are the programs that 'make all' or 'make tests' will build and -# that 'make check' will run. List them in the order in which they should -# be run. -# We don't tell automake about these programs so that it doesn't try to -# compile them with the regular fortran compiler. - -EXAMPLE_PROG=h5_crtdat h5_rdwt h5_crtatt h5_crtgrp \ - h5_crtgrpar h5_crtgrpd h5_extend h5_subset h5_cmprss hyperslab selectele \ - refobjexample refregexample mountexample compound - -# List files to be installed here -INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \ - h5_crtatt.f90 h5_crtgrp.f90 h5_crtgrpar.f90 h5_crtgrpd.f90 \ - h5_extend.f90 h5_subset.f90 h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \ - refregexample.f90 mountexample.f90 compound.f90 ph5example.f90 - - -# Add attention tests for Fortran 2003 features -EXAMPLE_PROG += rwdset_fortran2003 nested_derived_type \ - compound_fortran2003 compound_complex_fortran2003 -INSTALL_FILES += rwdset_fortran2003.f90 nested_derived_type.f90 \ - compound_fortran2003.f90 compound_complex_fortran2003.f90 -TEST_SCRIPT=testh5fc.sh -TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) - -# Mark this directory as part of the Fortran API -FORTRAN_API=yes - -# Some examples depend on files created by other examples. -h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_ -refregexample.chkexe_: refobjexample.chkexe_ -# h5_rdwt and h5_crtatt both modify the same file created by -# h5_crtdat. Serialize them. -h5_rdwt.chkexe_: h5_crtdat.chkexe_ -h5_crtatt.chkexe_: h5_rdwt.chkexe_ - -# Tell automake how to build examples using h5fc -# Additional dependencies for the examples are listed below -$(EXTRA_PROG): $(H5FC) - $(H5FC) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90; - -# Tell automake how to install examples -# Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=${DESTDIR}$(examplesdir)/fortran -EXAMPLETOPDIR=${DESTDIR}$(examplesdir) - -# List dependencies for each example. Normally, automake would take -# care of this for us, but if we tell automake about the programs it -# will try to build them with the normal C compiler, not h5cc. This is -# an inelegant way of solving the problem. -# All programs share the same build rule and a dependency on the main hdf5 -# and fortran libraries above. -h5_crtdat: h5_crtdat.f90 -h5_extend: h5_extend.f90 -h5_subset: h5_subset.f90 -h5_rdwt: h5_rdwt.f90 -h5_crtatt: h5_crtatt.f90 -h5_crtgrp: h5_crtgrp.f90 -h5_crtgrpar: h5_crtgrpar.f90 -h5_crtgrpd: h5_crtgrpd.f90 -h5_cmprss: h5_cmprss.f90 -hyperslab: hyperslab.f90 -selectele: selectele.f90 -refobjexample: refobjexample.f90 -refregexample: refregexample.f90 -mountexample: mountexample.f90 -compound: compound.f90 -rwdset_fortran2003: rwdset_fortran2003.f90 -nested_derived_type: nested_derived_type.f90 -compound_fortran2003: compound_fortran2003.f90 -compound_complex_fortran2003: compound_complex_fortran2003.f90 - -include $(top_srcdir)/config/examples.am -include $(top_srcdir)/config/conclude_fc.am diff --git a/HDF5Examples/FORTRAN/TUTR/run-fortran-ex.sh.in b/HDF5Examples/FORTRAN/TUTR/run-fortran-ex.sh.in deleted file mode 100644 index d5411155e66..00000000000 --- a/HDF5Examples/FORTRAN/TUTR/run-fortran-ex.sh.in +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# -# This file: run-hlfortran-ex.sh -# Written by: Larry Knox -# Date: May 11, 2010 -# -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # -# This script will compile and run the fortran examples from source files # -# installed in @examplesdir@/fortran using h5fc or h5pfc. The # -# order for running programs with RunTest in the MAIN section below is taken # -# from the Makefile. The order is important since some of the test programs # -# use data files created by earlier test programs. Any future additions should # -# be placed accordingly. # -# # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -# Initializations -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# -# Try to derive the path to the installation $prefix established -# by ./configure relative to the examples directory established by -# ./configure. If successful, set `prefix_relto_examplesdir` to the -# relative path. Otherwise, set `prefix_relto_examplesdir` to the -# absolute installation $prefix. -# -# This script uses the value of `prefix` in the user's environment, if -# it is set, below. The content of $() is evaluated in a sub-shell, so -# if `prefix` is set in the user's environment, the shell statements in -# $() won't clobbered it. -# -prefix_relto_examplesdir=$( -prefix=@prefix@ -examplesdir=@examplesdir@ -if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then - echo $(echo ${examplesdir##${prefix}/} | \ - sed 's,[^/][^/]*,..,g') -else - echo $prefix -fi -) - -# Where the tool is installed. -# default is relative path to installed location of the tools -prefix="${prefix:-../${prefix_relto_examplesdir}}" -PARALLEL=@PARALLEL@ # Am I in parallel mode? -AR="@AR@" -RANLIB="@RANLIB@" -if [ "$PARALLEL" = no ]; then - H5TOOL="h5fc" # The tool name -else - H5TOOL="h5pfc" # The tool name -fi -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - - -#### Run test #### -RunTest() -{ - TEST_EXEC=$1 - Test=$1".f90" - - echo - echo "################# $1 #################" - ${H5TOOL_BIN} -o $TEST_EXEC $Test - if [ $? -ne 0 ] - then - echo "messed up compiling $Test" - exit 1 - fi - ./$TEST_EXEC -} - -################## MAIN ################## - -# Run tests -if [ $? -eq 0 ] -then - if (RunTest h5_crtdat &&\ - rm h5_crtdat &&\ - RunTest h5_rdwt &&\ - rm h5_rdwt &&\ - RunTest h5_crtatt &&\ - rm h5_crtatt &&\ - RunTest h5_crtgrp &&\ - rm h5_crtgrp &&\ - RunTest h5_crtgrpar &&\ - rm h5_crtgrpar &&\ - RunTest h5_crtgrpd &&\ - rm h5_crtgrpd &&\ - RunTest h5_extend &&\ - rm h5_extend &&\ - RunTest h5_subset &&\ - rm h5_subset &&\ - RunTest h5_cmprss &&\ - rm h5_cmprss &&\ - RunTest hyperslab &&\ - rm hyperslab &&\ - RunTest selectele &&\ - rm selectele &&\ - RunTest refobjexample &&\ - rm refobjexample &&\ - RunTest refregexample &&\ - rm refregexample &&\ - RunTest mountexample &&\ - rm mountexample &&\ - RunTest compound &&\ - rm compound &&\ - RunTest rwdset_fortran2003 &&\ - rm rwdset_fortran2003 &&\ - RunTest nested_derived_type &&\ - rm nested_derived_type &&\ - RunTest compound_fortran2003 &&\ - rm compound_fortran2003 &&\ - RunTest compound_complex_fortran2003 &&\ - rm compound_complex_fortran2003); then - EXIT_VALUE=${EXIT_SUCCESS} - else - EXIT_VALUE=${EXIT_FAILURE} - fi -fi - -# Cleanup -rm *.o -rm *.h5 -echo - -exit $EXIT_VALUE - diff --git a/HDF5Examples/FORTRAN/TUTR/testh5fc.sh.in b/HDF5Examples/FORTRAN/TUTR/testh5fc.sh.in deleted file mode 100644 index f8f3706a4e7..00000000000 --- a/HDF5Examples/FORTRAN/TUTR/testh5fc.sh.in +++ /dev/null @@ -1,251 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5fc compiler tool - -srcdir=@srcdir@ - -# Initializations -TESTNAME=h5fc -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Where the tool is installed. -prefix="${prefix:-@prefix@}" -PARALLEL=@PARALLEL@ # Am I in parallel mode? -AR="@AR@" -RANLIB="@RANLIB@" -if [ "$PARALLEL" = no ]; then - H5TOOL="h5fc" # The tool name -else - H5TOOL="h5pfc" # The tool name -fi -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - -CMP='cmp -s' -DIFF='diff -c' - -nerrors=$EXIT_SUCCESS -verbose=yes - -# setup my machine information. -myos=`uname -s` -myhostnama=`uname -n` - -# Generate some source files and library for tests. -suffix=F90 # source file suffix -hdf5main=${H5TOOL}_hdf5main.$suffix -hdf5main_o=${H5TOOL}_hdf5main.o -appmain=${H5TOOL}_appmain.$suffix -appmain_o=${H5TOOL}_appmain.o -args=${H5TOOL}_args.$suffix -args_o=${H5TOOL}_args.o -prog1=${H5TOOL}_prog1.$suffix -prog1_o=${H5TOOL}_prog1.o -prog2=${H5TOOL}_prog2.$suffix -prog2_o=${H5TOOL}_prog2.o -applib=libapp${H5TOOL}.a - -# short hands -# Caution: if some *.h5 files must be cleaned here, list them by names. -# Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated -# by other test programs. This will cause a racing condition error when -# parallel make (e.g., gmake -j 4) is used. -temp_SRC="$hdf5main $appmain $prog1 $prog2" -temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` -temp_FILES="a.out $applib" - -# Generate appmain: -# An application Main that calls hdf5 and application's own functions. -cat > $appmain < $prog1 < $prog2 < $hdf5main < $args < $out 2>&1 - result=$? - if [ $result = 0 ]; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && \ - ( echo "========== results ==========="; cat $out; - echo "===============================================") |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $out - fi -} - -# Print a "SKIP" message -SKIPTEST() { - TESTING $H5TOOL $@ - echo " -SKIP-" -} - - -############################################################################## -### T H E T E S T S ### -############################################################################## -# -# HDF5 program that calls HDF5 APIs. -echo "***"Simple Compile and Link in one step. -TOOLTEST $hdf5main -# Application program that calls HDF5 and its own functions. -TOOLTEST $appmain $prog1 $prog2 - -# Compile, then link. -echo "***"Compile and Link in two steps. -TOOLTEST -c $hdf5main -TOOLTEST $hdf5main_o -TOOLTEST -c $appmain $prog1 $prog2 -TOOLTEST $appmain_o $prog1_o $prog2_o - -# Build external library, then link with it. -echo "***"Build external library and link with it. -TOOLTEST -c $prog1 $prog2 -$AR cru $applib $prog1_o $prog2_o -$RANLIB $applib -TOOLTEST $appmain $applib -TOOLTEST $appmain_o $applib - -# HDF5 program that depends on input args. -echo "***"Simple Compile and Link in one step with user-supplied arguments. -FCBASE=`grep "FCBASE=" $H5TOOL_BIN | xargs basename` -WF="" -if grep -qi "xlf" <<< "$FCBASE"; then - WF="-WF," -fi -TOOLTEST $WF-DSGL_QUOTE=\'H\' $WF-DDBL_QUOTE=\"HDF\" $WF-DMISC=42 $args - -# No preprocess test since -E is not a common option for Fortran compilers. - -############################################################################## -# END -############################################################################## - -# Clean up file -if test -z "$HDF5_NOCLEANUP"; then - rm -f $temp_SRC $temp_OBJ $temp_FILES -fi - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in b/HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in deleted file mode 100644 index c2699a357f3..00000000000 --- a/HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in +++ /dev/null @@ -1,493 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ -IS_DARWIN="@H5_IS_DARWIN@" - -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=EX_Datasets -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -BASENAME='basename' -LS='ls' -AWK='awk' - -nerrors=0 - -# where the libs exist -HDFLIB_HOME="$top_srcdir/java/lib" -BLDDIR="." -BLDLIBDIR="$BLDDIR/testlibs" -HDFTEST_HOME="$top_srcdir/java/examples/datasets" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@datasets.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$top_builddir/src/.libs/libhdf5.* -$top_builddir/java/src/jni/.libs/libhdf5_java.* -$top_builddir/java/src/$JARFILE -" -LIST_DATA_FILES=" -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Alloc.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Checksum.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Chunk.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Compact.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_External.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_FillValue.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Gzip.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Hyperslab.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_ReadWrite.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Shuffle.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Szip.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_UnlimitedAdd.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_UnlimitedGzip.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_UnlimitedMod.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Nbit.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Transform.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Sofloat.txt -$HDFTEST_HOME/../tfiles/examples.datasets.H5Ex_D_Soint.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" -COPY_JARTESTFILES="$LIST_JAR_TESTFILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - BNAME=`$BASENAME $tstfile` - if [ "$BNAME" = "libhdf5_java.dylib" ]; then - COPIED_LIBHDF5_JAVA=1 - fi - fi - fi - done - if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then - (cd $BLDLIBDIR; \ - install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ - exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ - echo $exist_path; \ - install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) - fi - # copy jar files. Used -f to make sure get a new copy - for tstfile in $COPY_JARTESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$HDFLIB_HOME - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM -rf $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - $RM $BLDDIR/examples.datasets.H5Ex_D_*.txt - $RM $BLDDIR/H5Ex_D_*.out - $RM $BLDDIR/H5Ex_D_*.h5 - $RM $BLDDIR/H5Ex_D_External.data -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -JAVAEXEFLAGS=@H5_JAVAFLAGS@ - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc" -TESTING examples.datasets.H5Ex_D_Alloc -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc > H5Ex_D_Alloc.out -) -if diff H5Ex_D_Alloc.out examples.datasets.H5Ex_D_Alloc.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Alloc" -else - echo "**FAILED** datasets.H5Ex_D_Alloc" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum" -TESTING examples.datasets.H5Ex_D_Checksum -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum > H5Ex_D_Checksum.out -) -if diff H5Ex_D_Checksum.out examples.datasets.H5Ex_D_Checksum.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Checksum" -else - echo "**FAILED** datasets.H5Ex_D_Checksum" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk" -TESTING examples.datasets.H5Ex_D_Chunk -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk > H5Ex_D_Chunk.out -) -if diff H5Ex_D_Chunk.out examples.datasets.H5Ex_D_Chunk.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Chunk" -else - echo "**FAILED** datasets.H5Ex_D_Chunk" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact" -TESTING examples.datasets.H5Ex_D_Compact -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact > H5Ex_D_Compact.out -) -if diff H5Ex_D_Compact.out examples.datasets.H5Ex_D_Compact.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Compact" -else - echo "**FAILED** datasets.H5Ex_D_Compact" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External" -TESTING examples.datasets.H5Ex_D_External -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External > H5Ex_D_External.out -) -if diff H5Ex_D_External.out examples.datasets.H5Ex_D_External.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_External" -else - echo "**FAILED** datasets.H5Ex_D_External" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue" -TESTING examples.datasets.H5Ex_D_FillValue -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue > H5Ex_D_FillValue.out -) -if diff H5Ex_D_FillValue.out examples.datasets.H5Ex_D_FillValue.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_FillValue" -else - echo "**FAILED** datasets.H5Ex_D_FillValue" - nerrors="`expr $nerrors + 1`" -fi - -if test $USE_FILTER_DEFLATE = "yes"; then - echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip" - TESTING examples.datasets.H5Ex_D_Gzip - ( - $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip > H5Ex_D_Gzip.out - ) - if diff H5Ex_D_Gzip.out examples.datasets.H5Ex_D_Gzip.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Gzip" - else - echo "**FAILED** datasets.H5Ex_D_Gzip" - nerrors="`expr $nerrors + 1`" - fi -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab" -TESTING examples.datasets.H5Ex_D_Hyperslab -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab > H5Ex_D_Hyperslab.out -) -if diff H5Ex_D_Hyperslab.out examples.datasets.H5Ex_D_Hyperslab.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Hyperslab" -else - echo "**FAILED** datasets.H5Ex_D_Hyperslab" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite" -TESTING examples.datasets.H5Ex_D_ReadWrite -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite > H5Ex_D_ReadWrite.out -) -if diff H5Ex_D_ReadWrite.out examples.datasets.H5Ex_D_ReadWrite.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_ReadWrite" -else - echo "**FAILED** datasets.H5Ex_D_ReadWrite" - nerrors="`expr $nerrors + 1`" -fi - -if test $USE_FILTER_DEFLATE = "yes"; then - echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle" - TESTING examples.datasets.H5Ex_D_Shuffle - ( - $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle > H5Ex_D_Shuffle.out - ) - if diff H5Ex_D_Shuffle.out examples.datasets.H5Ex_D_Shuffle.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Shuffle" - else - echo "**FAILED** datasets.H5Ex_D_Shuffle" - nerrors="`expr $nerrors + 1`" - fi -fi - -if test $USE_FILTER_SZIP = "yes"; then - echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip" - TESTING examples.datasets.H5Ex_D_Szip - ( - $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip > H5Ex_D_Szip.out - ) - if diff H5Ex_D_Szip.out examples.datasets.H5Ex_D_Szip.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Szip" - else - echo "**FAILED** datasets.H5Ex_D_Szip" - nerrors="`expr $nerrors + 1`" - fi -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd" -TESTING examples.datasets.H5Ex_D_UnlimitedAdd -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd > H5Ex_D_UnlimitedAdd.out -) -if diff H5Ex_D_UnlimitedAdd.out examples.datasets.H5Ex_D_UnlimitedAdd.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_UnlimitedAdd" -else - echo "**FAILED** datasets.H5Ex_D_UnlimitedAdd" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip" -TESTING examples.datasets.H5Ex_D_UnlimitedGzip -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip > H5Ex_D_UnlimitedGzip.out -) -if diff H5Ex_D_External.out examples.datasets.H5Ex_D_External.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_UnlimitedGzip" -else - echo "**FAILED** datasets.H5Ex_D_UnlimitedGzip" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod" -TESTING examples.datasets.H5Ex_D_UnlimitedMod -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod > H5Ex_D_UnlimitedMod.out -) -if diff H5Ex_D_UnlimitedMod.out examples.datasets.H5Ex_D_UnlimitedMod.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_UnlimitedMod" -else - echo "**FAILED** datasets.H5Ex_D_UnlimitedMod" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit" -TESTING examples.datasets.H5Ex_D_Nbit -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit > H5Ex_D_Nbit.out -) -if diff H5Ex_D_Nbit.out examples.datasets.H5Ex_D_Nbit.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Nbit" -else - echo "**FAILED** datasets.H5Ex_D_Nbit" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform" -TESTING examples.datasets.H5Ex_D_Transform -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform > H5Ex_D_Transform.out -) -if diff H5Ex_D_Transform.out examples.datasets.H5Ex_D_Transform.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Transform" -else - echo "**FAILED** datasets.H5Ex_D_Transform" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat" -TESTING examples.datasets.H5Ex_D_Sofloat -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat > H5Ex_D_Sofloat.out -) -if diff H5Ex_D_Sofloat.out examples.datasets.H5Ex_D_Sofloat.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Sofloat" -else - echo "**FAILED** datasets.H5Ex_D_Sofloat" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint" -TESTING examples.datasets.H5Ex_D_Soint -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint > H5Ex_D_Soint.out -) -if diff H5Ex_D_Soint.out examples.datasets.H5Ex_D_Soint.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Soint" -else - echo "**FAILED** datasets.H5Ex_D_Soint" - nerrors="`expr $nerrors + 1`" -fi - -# Clean up temporary files/directories -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/HDF5Examples/JAVA/H5D/Makefile.am b/HDF5Examples/JAVA/H5D/Makefile.am deleted file mode 100644 index abcf64b5b83..00000000000 --- a/HDF5Examples/JAVA/H5D/Makefile.am +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Java Library Examples Makefile(.in) - -include $(top_srcdir)/config/commence.am - -# Mark this directory as part of the JNI API -JAVA_API=yes - -JAVAROOT = .classes - -classes: - test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) - -pkgpath = examples/datasets -hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$$CLASSPATH - -jarfile = jar$(PACKAGE_TARNAME)datasets.jar - -AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation - -TESTPACKAGE = - -noinst_JAVA = \ - H5Ex_D_Alloc.java \ - H5Ex_D_Checksum.java \ - H5Ex_D_Chunk.java \ - H5Ex_D_Compact.java \ - H5Ex_D_External.java \ - H5Ex_D_FillValue.java \ - H5Ex_D_Gzip.java \ - H5Ex_D_Hyperslab.java \ - H5Ex_D_ReadWrite.java \ - H5Ex_D_Shuffle.java \ - H5Ex_D_Szip.java \ - H5Ex_D_UnlimitedAdd.java \ - H5Ex_D_UnlimitedGzip.java \ - H5Ex_D_UnlimitedMod.java \ - H5Ex_D_Nbit.java \ - H5Ex_D_Transform.java \ - H5Ex_D_Sofloat.java \ - H5Ex_D_Soint.java - -$(jarfile): classnoinst.stamp classes - $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) - -noinst_DATA = $(jarfile) - -.PHONY: classes - -check_SCRIPTS = JavaDatasetExample.sh -TEST_SCRIPT = $(check_SCRIPTS) - -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class JavaDatasetExample.sh - -clean: - rm -rf $(JAVAROOT)/* - rm -f $(jarfile) - rm -f classnoinst.stamp - -include $(top_srcdir)/config/conclude.am diff --git a/HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in b/HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in deleted file mode 100644 index 933f35ece16..00000000000 --- a/HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in +++ /dev/null @@ -1,377 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ -IS_DARWIN="@H5_IS_DARWIN@" - -TESTNAME=EX_Groups -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -BASENAME='basename' -LS='ls' -AWK='awk' - -nerrors=0 - -# where the libs exist -HDFLIB_HOME="$top_srcdir/java/lib" -BLDDIR="." -BLDLIBDIR="$BLDDIR/testlibs" -BLDITERDIR="./groups" -HDFTEST_HOME="$top_srcdir/java/examples/groups" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@groups.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR -test -d $BLDITERDIR || mkdir -p $BLDITERDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$top_builddir/src/.libs/libhdf5.* -$top_builddir/java/src/jni/.libs/libhdf5_java.* -$top_builddir/java/src/$JARFILE -" -LIST_ITER_FILES=" -$HDFTEST_HOME/h5ex_g_iterate.h5 -$HDFTEST_HOME/h5ex_g_visit.h5 -" -LIST_DATA_FILES=" -$HDFTEST_HOME/../tfiles/examples.groups.H5Ex_G_Create.txt -$HDFTEST_HOME/../tfiles/examples.groups.H5Ex_G_Iterate.txt -$HDFTEST_HOME/../tfiles/examples.groups.H5Ex_G_Compact.txt -$HDFTEST_HOME/../tfiles/examples.groups.H5Ex_G_Corder.txt -$HDFTEST_HOME/../tfiles/examples.groups.H5Ex_G_Intermediate.txt -$HDFTEST_HOME/../tfiles/examples.groups.H5Ex_G_Phase.txt -$HDFTEST_HOME/../tfiles/examples.groups.H5Ex_G_Visit.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" -COPY_JARTESTFILES="$LIST_JAR_TESTFILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - BNAME=`$BASENAME $tstfile` - if [ "$BNAME" = "libhdf5_java.dylib" ]; then - COPIED_LIBHDF5_JAVA=1 - fi - fi - fi - done - if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then - (cd $BLDLIBDIR; \ - install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ - exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ - echo $exist_path; \ - install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) - fi - # copy jar files. Used -f to make sure get a new copy - for tstfile in $COPY_JARTESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$HDFLIB_HOME - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM -rf $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - $RM $BLDDIR/examples.groups.H5Ex_G_*.txt - $RM $BLDDIR/H5Ex_G_*.out - $RM $BLDDIR/H5Ex_G_*.h5 -} - -COPY_ITERFILES="$LIST_ITER_FILES" - -COPY_ITERFILES_TO_BLDITERDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_ITERFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDITERDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDITERDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_ITERFILES_AND_BLDITERDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $HDFTEST_HOME/h5ex_g_iterate.h5` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDITERDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDITERDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -JAVAEXEFLAGS=@H5_JAVAFLAGS@ - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR -COPY_ITERFILES_TO_BLDITERDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create" -TESTING examples.groups.H5Ex_G_Create -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create > H5Ex_G_Create.out) -if diff H5Ex_G_Create.out examples.groups.H5Ex_G_Create.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Create" -else - echo "**FAILED** groups.H5Ex_G_Create" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate" -TESTING examples.groups.H5Ex_G_Iterate -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate > H5Ex_G_Iterate.out) -if diff H5Ex_G_Iterate.out examples.groups.H5Ex_G_Iterate.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Iterate" -else - echo "**FAILED** groups.H5Ex_G_Iterate" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact" -TESTING examples.groups.H5Ex_G_Compact -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact > H5Ex_G_Compact.out) -if diff H5Ex_G_Compact.out examples.groups.H5Ex_G_Compact.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Compact" -else - echo "**FAILED** groups.H5Ex_G_Compact" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder" -TESTING examples.groups.H5Ex_G_Corder -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder > H5Ex_G_Corder.out) -if diff H5Ex_G_Corder.out examples.groups.H5Ex_G_Corder.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Corder" -else - echo "**FAILED** groups.H5Ex_G_Corder" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate" -TESTING examples.groups.H5Ex_G_Intermediate -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate > H5Ex_G_Intermediate.out) -if diff H5Ex_G_Intermediate.out examples.groups.H5Ex_G_Intermediate.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Intermediate" -else - echo "**FAILED** groups.H5Ex_G_Intermediate" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase" -TESTING examples.groups.H5Ex_G_Phase -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase > H5Ex_G_Phase.out) -if diff H5Ex_G_Phase.out examples.groups.H5Ex_G_Phase.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Phase" -else - echo "**FAILED** groups.H5Ex_G_Phase" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit" -TESTING examples.groups.H5Ex_G_Visit -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit > H5Ex_G_Visit.out) -if diff H5Ex_G_Visit.out examples.groups.H5Ex_G_Visit.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Visit" -else - echo "**FAILED** groups.H5Ex_G_Visit" - nerrors="`expr $nerrors + 1`" -fi - -# Clean up temporary files/directories -CLEAN_ITERFILES_AND_BLDITERDIR -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/HDF5Examples/JAVA/H5G/Makefile.am b/HDF5Examples/JAVA/H5G/Makefile.am deleted file mode 100644 index d3b59cf3a8e..00000000000 --- a/HDF5Examples/JAVA/H5G/Makefile.am +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Java Library Examples Makefile(.in) - -include $(top_srcdir)/config/commence.am - -# Mark this directory as part of the JNI API -JAVA_API=yes - -JAVAROOT = .classes - -classes: - test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) - -pkgpath = examples/groups -hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$$CLASSPATH - -jarfile = jar$(PACKAGE_TARNAME)groups.jar - -AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation - -TESTPACKAGE = - -noinst_JAVA = \ - H5Ex_G_Create.java \ - H5Ex_G_Iterate.java \ - H5Ex_G_Compact.java \ - H5Ex_G_Corder.java \ - H5Ex_G_Intermediate.java \ - H5Ex_G_Phase.java \ - H5Ex_G_Visit.java - - -$(jarfile): classnoinst.stamp classes - $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) - -noinst_DATA = $(jarfile) - -.PHONY: classes - -check_SCRIPTS = JavaGroupExample.sh -TEST_SCRIPT = $(check_SCRIPTS) - -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class JavaGroupExample.sh - -clean: - rm -rf $(JAVAROOT)/* - rm -f $(jarfile) - rm -f classnoinst.stamp - -include $(top_srcdir)/config/conclude.am diff --git a/HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in b/HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in deleted file mode 100644 index 7683798b880..00000000000 --- a/HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in +++ /dev/null @@ -1,447 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ -IS_DARWIN="@H5_IS_DARWIN@" - -TESTNAME=EX_Datatypes -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -BASENAME='basename' -LS='ls' -AWK='awk' - -nerrors=0 - -# where the libs exist -HDFLIB_HOME="$top_srcdir/java/lib" -BLDDIR="." -BLDLIBDIR="$BLDDIR/testlibs" -HDFTEST_HOME="$top_srcdir/java/examples/datatypes" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@datatypes.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$top_builddir/src/.libs/libhdf5.* -$top_builddir/java/src/jni/.libs/libhdf5_java.* -$top_builddir/java/src/$JARFILE -" -LIST_DATA_FILES=" -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_Array.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_ArrayAttribute.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_Bit.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_BitAttribute.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_Commit.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_Compound.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_CompoundAttribute.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_Float.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_FloatAttribute.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_Integer.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_IntegerAttribute.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_ObjectReference.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_Opaque.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_OpaqueAttribute.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_String.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_StringAttribute.txt -$HDFTEST_HOME/../tfiles/examples.datatypes.H5Ex_T_VLString.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" -COPY_JARTESTFILES="$LIST_JAR_TESTFILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - BNAME=`$BASENAME $tstfile` - if [ "$BNAME" = "libhdf5_java.dylib" ]; then - COPIED_LIBHDF5_JAVA=1 - fi - fi - fi - done - if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then - (cd $BLDLIBDIR; \ - install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ - exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ - echo $exist_path; \ - install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) - fi - # copy jar files. Used -f to make sure get a new copy - for tstfile in $COPY_JARTESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$HDFLIB_HOME - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM -rf $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - $RM $BLDDIR/examples.datatypes.H5Ex_T_*.txt - $RM $BLDDIR/H5Ex_T_*.out - $RM $BLDDIR/H5Ex_T_*.h5 -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -JAVAEXEFLAGS=@H5_JAVAFLAGS@ - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array" -TESTING examples.datatypes.H5Ex_T_Array -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array > H5Ex_T_Array.out) -if diff H5Ex_T_Array.out examples.datatypes.H5Ex_T_Array.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Array" -else - echo "**FAILED** datatypes.H5Ex_T_Array" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute" -TESTING examples.datatypes.H5Ex_T_ArrayAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute > H5Ex_T_ArrayAttribute.out) -if diff H5Ex_T_ArrayAttribute.out examples.datatypes.H5Ex_T_ArrayAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_ArrayAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_ArrayAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit" -TESTING examples.datatypes.H5Ex_T_Bit -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit > H5Ex_T_Bit.out) -if diff H5Ex_T_Bit.out examples.datatypes.H5Ex_T_Bit.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Bit" -else - echo "**FAILED** datatypes.H5Ex_T_Bit" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute" -TESTING examples.datatypes.H5Ex_T_BitAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute > H5Ex_T_BitAttribute.out) -if diff H5Ex_T_BitAttribute.out examples.datatypes.H5Ex_T_BitAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_BitAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_BitAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit" -TESTING examples.datasets.H5Ex_T_Commit -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit > H5Ex_T_Commit.out) -if diff H5Ex_T_Commit.out examples.datatypes.H5Ex_T_Commit.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Commit" -else - echo "**FAILED** datatypes.H5Ex_T_Commit" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound" -TESTING examples.datatypes.H5Ex_T_Compound -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound > H5Ex_T_Compound.out) -if diff H5Ex_T_Compound.out examples.datatypes.H5Ex_T_Compound.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Compound" -else - echo "**FAILED** datatypes.H5Ex_T_Compound" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute" -TESTING examples.datatypes.H5Ex_T_CompoundAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute > H5Ex_T_CompoundAttribute.out) -if diff H5Ex_T_CompoundAttribute.out examples.datatypes.H5Ex_T_CompoundAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_CompoundAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_CompoundAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float" -TESTING examples.datatypes.H5Ex_T_Float -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float > H5Ex_T_Float.out) -if diff H5Ex_T_Float.out examples.datatypes.H5Ex_T_Float.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Float" -else - echo "**FAILED** datatypes.H5Ex_T_Float" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute" -TESTING examples.datatypes.H5Ex_T_FloatAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute > H5Ex_T_FloatAttribute.out) -if diff H5Ex_T_FloatAttribute.out examples.datatypes.H5Ex_T_FloatAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_FloatAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_FloatAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer" -TESTING examples.datatypes.H5Ex_T_Integer -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer > H5Ex_T_Integer.out) -if diff H5Ex_T_Integer.out examples.datatypes.H5Ex_T_Integer.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Integer" -else - echo "**FAILED** datatypes.H5Ex_T_Integer" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute" -TESTING examples.datatypes.H5Ex_T_IntegerAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute > H5Ex_T_IntegerAttribute.out) -if diff H5Ex_T_IntegerAttribute.out examples.datatypes.H5Ex_T_IntegerAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_IntegerAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_IntegerAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference" -TESTING examples.datatypes.H5Ex_T_ObjectReference -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference > H5Ex_T_ObjectReference.out) -if diff H5Ex_T_ObjectReference.out examples.datatypes.H5Ex_T_ObjectReference.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_ObjectReference" -else - echo "**FAILED** datatypes.H5Ex_T_ObjectReference" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute" -TESTING examples.datatypes.H5Ex_T_ObjectReferenceAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute > H5Ex_T_ObjectReferenceAttribute.out) -if diff H5Ex_T_ObjectReferenceAttribute.out examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_ObjectReferenceAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_ObjectReferenceAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque" -TESTING examples.datatypes.H5Ex_T_Opaque -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque > H5Ex_T_Opaque.out) -if diff H5Ex_T_Opaque.out examples.datatypes.H5Ex_T_Opaque.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Opaque" -else - echo "**FAILED** datatypes.H5Ex_T_Opaque" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute" -TESTING examples.datatypes.H5Ex_T_OpaqueAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute > H5Ex_T_OpaqueAttribute.out) -if diff H5Ex_T_OpaqueAttribute.out examples.datatypes.H5Ex_T_OpaqueAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_OpaqueAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_OpaqueAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String" -TESTING examples.datatypes.H5Ex_T_String -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String > H5Ex_T_String.out) -if diff H5Ex_T_String.out examples.datatypes.H5Ex_T_String.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_String" -else - echo "**FAILED** datatypes.H5Ex_T_String" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute" -TESTING examples.datatypes.H5Ex_T_StringAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute > H5Ex_T_StringAttribute.out) -if diff H5Ex_T_StringAttribute.out examples.datatypes.H5Ex_T_StringAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_StringAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_StringAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString" -TESTING examples.datatypes.H5Ex_T_VLString -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString > H5Ex_T_VLString.out) -if diff H5Ex_T_VLString.out examples.datatypes.H5Ex_T_VLString.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_VLString" -else - echo "**FAILED** datatypes.H5Ex_T_VLString" - nerrors="`expr $nerrors + 1`" -fi - -# Clean up temporary files/directories -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/HDF5Examples/JAVA/H5T/Makefile.am b/HDF5Examples/JAVA/H5T/Makefile.am deleted file mode 100644 index 2e744ab220f..00000000000 --- a/HDF5Examples/JAVA/H5T/Makefile.am +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Java Library Examples Makefile(.in) - -include $(top_srcdir)/config/commence.am - -# Mark this directory as part of the JNI API -JAVA_API=yes - -JAVAROOT = .classes - -classes: - test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) - -pkgpath = examples/datatypes -hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$$CLASSPATH - -jarfile = jar$(PACKAGE_TARNAME)datatypes.jar - -AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation - -TESTPACKAGE = - -noinst_JAVA = \ - H5Ex_T_Array.java \ - H5Ex_T_ArrayAttribute.java \ - H5Ex_T_Bit.java \ - H5Ex_T_BitAttribute.java \ - H5Ex_T_Commit.java \ - H5Ex_T_Compound.java \ - H5Ex_T_CompoundAttribute.java \ - H5Ex_T_Float.java \ - H5Ex_T_FloatAttribute.java \ - H5Ex_T_Integer.java \ - H5Ex_T_IntegerAttribute.java \ - H5Ex_T_ObjectReference.java \ - H5Ex_T_ObjectReferenceAttribute.java \ - H5Ex_T_Opaque.java \ - H5Ex_T_OpaqueAttribute.java \ - H5Ex_T_String.java \ - H5Ex_T_StringAttribute.java \ - H5Ex_T_VLString.java - -$(jarfile): classnoinst.stamp classes - $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) - -noinst_DATA = $(jarfile) - -.PHONY: classes - -check_SCRIPTS = JavaDatatypeExample.sh -TEST_SCRIPT = $(check_SCRIPTS) - -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class JavaDatatypeExample.sh - -clean: - rm -rf $(JAVAROOT)/* - rm -f $(jarfile) - rm -f classnoinst.stamp - -include $(top_srcdir)/config/conclude.am diff --git a/HDF5Examples/JAVA/Makefile.am b/HDF5Examples/JAVA/Makefile.am deleted file mode 100644 index 691c81ca621..00000000000 --- a/HDF5Examples/JAVA/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -# This makefile mostly just reinvokes make in the various subdirectories -# but does so in the correct order. You can alternatively invoke make from -# each subdirectory manually. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Java Library Examples Makefile(.in) - -include $(top_srcdir)/config/commence.am - -## Only recurse into subdirectories if the Java (JNI) interface is enabled. - SUBDIRS=TUTR H5G H5D H5T - -include $(top_srcdir)/config/conclude.am diff --git a/HDF5Examples/JAVA/TUTR/Makefile.am b/HDF5Examples/JAVA/TUTR/Makefile.am deleted file mode 100644 index fedb82f9d19..00000000000 --- a/HDF5Examples/JAVA/TUTR/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# - -JAVAROOT = .classes - -classes: - $(MKDIR_P) $(@D)/$(JAVAROOT) - -pkgpath = examples/intro -hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$$CLASSPATH - -jarfile = jar$(PACKAGE_TARNAME)intro.jar - -AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation - -TESTPACKAGE = - -noinst_JAVA = \ - HDF5AttributeCreate.java \ - HDF5DatasetCreate.java \ - HDF5DatasetRead.java \ - HDF5FileCreate.java \ - HDF5FileStructure.java \ - HDF5GroupCreate.java \ - HDF5SubsetSelect.java - -$(jarfile): classnoinst.stamp classes - $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) - -noinst_DATA = $(jarfile) - -TESTS = runExample.sh - -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class runExample.sh - -clean: - rm -rf $(JAVAROOT) - rm -f $(jarfile) - rm -f classnoinst.stamp diff --git a/HDF5Examples/JAVA/TUTR/runExample.sh.in b/HDF5Examples/JAVA/TUTR/runExample.sh.in deleted file mode 100644 index 709613d1590..00000000000 --- a/HDF5Examples/JAVA/TUTR/runExample.sh.in +++ /dev/null @@ -1,297 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ - -TESTNAME=EX_Intro -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 - -# where the libs exist -BLDLIBDIR="./lib" -BLDDIR="." -HDFTEST_HOME="$top_srcdir/JAVA/intro" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@intro.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$top_builddir/lib/libhdf5.* -$top_builddir/lib/libhdf5_java.* -$top_builddir/JAVA/intro/$JARFILE -" -LIST_DATA_FILES=" -$HDFTEST_HOME/tfiles/114/HDF5AttributeCreate.txt -$HDFTEST_HOME/tfiles/114/HDF5DatasetCreate.txt -$HDFTEST_HOME/tfiles/114/HDF5DatasetRead.txt -$HDFTEST_HOME/tfiles/114/HDF5FileCreate.txt -$HDFTEST_HOME/tfiles/114/HDF5FileStructure.txt -$HDFTEST_HOME/tfiles/114/HDF5GroupCreate.txt -$HDFTEST_HOME/tfiles/114/HDF5SubsetSelect.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - BNAME=`$BASENAME $tstfile` - if [ "$BNAME" = "libhdf5_java.dylib" ]; then - COPIED_LIBHDF5_JAVA=1 - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDDIR/*.txt - $RM $BLDDIR/*.out - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -export JAVAEXE - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - Darwin) - DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH - LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH - ;; - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5AttributeCreate" -($JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5AttributeCreate > HDF5AttributeCreate.out) -if diff HDF5AttributeCreate.out HDF5AttributeCreate.txt > /dev/null; then - echo " PASSED HDF5AttributeCreate" -else - echo "**FAILED** HDF5AttributeCreate" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5DatasetCreate" -($JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5DatasetCreate > HDF5DatasetCreate.out) -if diff HDF5DatasetCreate.out HDF5DatasetCreate.txt > /dev/null; then - echo " PASSED HDF5DatasetCreate" -else - echo "**FAILED** HDF5DatasetCreate" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5DatasetRead" -($JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5DatasetRead > HDF5DatasetRead.out) -if diff HDF5DatasetRead.out HDF5DatasetRead.txt > /dev/null; then - echo " PASSED HDF5DatasetRead" -else - echo "**FAILED** HDF5DatasetRead" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5FileCreate" -($JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5FileCreate > HDF5FileCreate.out) -if diff HDF5FileCreate.out HDF5FileCreate.txt > /dev/null; then - echo " PASSED HDF5FileCreate" -else - echo "**FAILED** HDF5FileCreate" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5FileStructure" -($JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5FileStructure > HDF5FileStructure.out) -if diff HDF5FileStructure.out HDF5FileStructure.txt > /dev/null; then - echo " PASSED HDF5FileStructure" -else - echo "**FAILED** HDF5FileStructure" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5GroupCreate" -($JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5GroupCreate > HDF5GroupCreate.out) -if diff HDF5GroupCreate.out HDF5GroupCreate.txt > /dev/null; then - echo " PASSED HDF5GroupCreate" -else - echo "**FAILED** HDF5GroupCreate" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5SubsetSelect" -($JAVAEXE -Xmx1024M -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH HDF5SubsetSelect > HDF5SubsetSelect.out) -if diff HDF5SubsetSelect.out HDF5SubsetSelect.txt > /dev/null; then - echo " PASSED HDF5SubsetSelect" -else - echo "**FAILED** HDF5SubsetSelect" - nerrors="`expr $nerrors + 1`" -fi - -# Clean up temporary files/directories -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/HDF5Examples/Makefile.am b/HDF5Examples/Makefile.am deleted file mode 100644 index d8019c9558c..00000000000 --- a/HDF5Examples/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## - -SUBDIRS = C FORTRAN diff --git a/HDF5Examples/Using_Autotools.txt b/HDF5Examples/Using_Autotools.txt deleted file mode 100644 index 83c47d52cd7..00000000000 --- a/HDF5Examples/Using_Autotools.txt +++ /dev/null @@ -1,46 +0,0 @@ -Example programs for HDF5 - -See the Using_CMake.txt file for instructions on building Examples with CMake. - -autotools method -============================ -To build all examples type: -./configure -make - -To test all the example programs type: -make check - -Some notes: - -- This package uses h5cc (and h5fc) to compile the examples. - -- This package is not meant to be installed, `make install' will do -nothing. - -- This package supports VPATH builds (run configure from a different -directory), but will not automatically copy the data files a few -examples need to run (*.h5) to the build directory. This must be done -manually if you wish to run these examples from the build directory. -`make check' is supported with VPATH - examples do not need to be -manually copied for `make check' to work. - -- To build only 1.6 examples, set environmental variable `H5EX_16' to -anything but null before running configure. Similarly to build only 1.8 -examples, set `H5EX_18', and to build only 1.10 examples, set `H5EX_110'. -These variables can be set temporarily in the call to configure, e.g. -`./configure H5EX_16=1'. Alternatively you can 'make' in a subdirectory -to only build examples under that directory. - -- Similarly examples can be built only for specified classes by setting: - H5EX_G for groups - H5EX_D for datasets - H5EX_T for datatypes - -- This package requires HDF5 Library version 1.8 or later. If the -default h5cc is not the correct version, you must set CC to the path to -the correct h5cc. Compiling only 1.6 examples with a 1.6 library -should work, but make check may fail. - -- This package links dynamically with the hdf5 library by default. To link -statically use the --disable-shared option with configure. diff --git a/HDF5Examples/aclocal.m4 b/HDF5Examples/aclocal.m4 deleted file mode 100644 index 11b31554912..00000000000 --- a/HDF5Examples/aclocal.m4 +++ /dev/null @@ -1,1217 +0,0 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -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.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'.])]) - -# Copyright (C) 2002-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' -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.15.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_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.15.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.65])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) - -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# -*- Autoconf -*- -# Obsolete and "removed" macros, that must however still report explicit -# error messages when used, to smooth transition. -# -# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([AM_CONFIG_HEADER], -[AC_DIAGNOSE([obsolete], -['$0': this macro is obsolete. -You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl -AC_CONFIG_HEADERS($@)]) - -AC_DEFUN([AM_PROG_CC_STDC], -[AC_PROG_CC -am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc -AC_DIAGNOSE([obsolete], -['$0': this macro is obsolete. -You should simply use the 'AC][_PROG_CC' macro instead. -Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', -but upon 'ac_cv_prog_cc_stdc'.])]) - -AC_DEFUN([AM_C_PROTOTYPES], - [AC_FATAL([automatic de-ANSI-fication support has been removed])]) -AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1999-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) - -# Copyright (C) 2009-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -# -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/HDF5Examples/compile b/HDF5Examples/compile deleted file mode 100755 index a85b723c7e6..00000000000 --- a/HDF5Examples/compile +++ /dev/null @@ -1,347 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2012-10-14.11; # UTC - -# Copyright (C) 1999-2014 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/HDF5Examples/config.h.in b/HDF5Examples/config.h.in deleted file mode 100644 index 6a0abfa2781..00000000000 --- a/HDF5Examples/config.h.in +++ /dev/null @@ -1,28 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Version number of package */ -#undef VERSION - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const diff --git a/HDF5Examples/configure b/HDF5Examples/configure deleted file mode 100755 index 01db307d5bb..00000000000 --- a/HDF5Examples/configure +++ /dev/null @@ -1,5360 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5-examples 0.1. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and help@hdfgroup.org -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='HDF5-examples' -PACKAGE_TARNAME='hdf5-examples' -PACKAGE_VERSION='0.1' -PACKAGE_STRING='HDF5-examples 0.1' -PACKAGE_BUGREPORT='help@hdfgroup.org' -PACKAGE_URL='' - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -FORTRAN_2003_NOTINTEL_CONDITIONAL_F_FALSE -FORTRAN_2003_NOTINTEL_CONDITIONAL_F_TRUE -FORTRAN_2003_CONDITIONAL_F_FALSE -FORTRAN_2003_CONDITIONAL_F_TRUE -FORTRAN_2003_CONDITIONAL_F -H5T_FALSE -H5T_TRUE -H5D_FALSE -H5D_TRUE -H5G_FALSE -H5G_TRUE -H5_LIBVER_DIR -H5_VERS_RELEASE -H5_VERS_MINOR -H5_VERS_MAJOR -H5_APIVER -H5_LIBVER -ac_ct_FC -FCFLAGS -FC -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_shared -enable_dependency_tracking -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -FC -FCFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures HDF5-examples 0.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/hdf5-examples] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of HDF5-examples 0.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --disable-shared force static linking - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - FC Fortran compiler command - FCFLAGS Fortran compiler flags - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -HDF5-examples configure 0.1 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_compile -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by HDF5-examples $as_me 0.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -am__api_version='1.15' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='hdf5-examples' - VERSION='0.1' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - -ac_config_headers="$ac_config_headers config.h" - - -# Turn off automake rebuild rules so make doesn't try to run automake -# (which probably won't work). - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -# Argument for static linking -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; if test "$enableval" = "no"; then - shared_suffix="" - echo lo! - else - shared_suffix=" -shlib" - fi -else - shared_suffix=" -shlib" -fi - - -# Checks and sets HDF5 compiler wrappers. -if test "x$CC" = "x"; then - H5C_exists=`h5cc -help > /dev/null 2>&1; echo $?` - if test "x1" = "x$H5C_exists"; then - H5C_valid=`h5cc -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5C_valid"; then - H5C="h5cc" - fi - else - H5C_exists=`h5pcc > /dev/null 2>&1; echo $?` - if test "x1" = "x$H5C_exists"; then - H5C_valid=`h5pcc -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5C_valid"; then - H5C="h5pcc" - else - as_fn_error $? "failed to find h5cc or h5pcc" "$LINENO" 5 - fi - else - as_fn_error $? "failed to find h5cc or h5pcc" "$LINENO" 5 - fi - fi -else - H5C_exists=`$CC -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5C_exists"; then - H5C="$CC" - else - as_fn_error $? "CC is not set to h5cc or h5pcc" "$LINENO" 5 - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $H5C - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in $H5C -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -if test "x$FC" = "x"; then - H5FC_exists=`h5fc -help > /dev/null 2>&1; echo $?` - if test "x1" = "x$H5FC_exists"; then - H5FC_valid=`h5fc -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5FC_valid"; then - H5FC="h5fc" - fi - else - H5FC_exists=`h5pfc > /dev/null 2>&1; echo $?` - if test "x1" = "x$H5FC_exists"; then - H5FC_valid=`h5pfc -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5FC_valid"; then - H5FC="h5pfc" - else - as_fn_error $? "failed to find h5fc or h5pfc" "$LINENO" 5 - fi - else - as_fn_error $? "failed to find h5fc or h5pfc" "$LINENO" 5 - fi - fi -else - H5FC_exists=`$FC -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "1" = "$H5FC_exists"; then - H5FC="$FC" - else - as_fn_error $? "FC is not set to h5fc or h5pfc" "$LINENO" 5 - fi -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $H5FC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$FC" && break - done -fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in $H5FC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_FC" && break -done - - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes -else - ac_cv_prog_fc_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi -fi - -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Add the suffix to CC for shared linking. Can't just set as an option -# because it must be first. -if test "$shared_suffix" && test ! `echo ${CC} | grep "$shared_suffix"`; then - CC=${CC}${shared_suffix} -fi -# Checks for typedefs, structures, and compiler characteristics. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - - -# Determine the version of the HDF5 Library -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the version of the HDF5 Library" >&5 -$as_echo_n "checking the version of the HDF5 Library... " >&6; } - - -H5_LIBVER=$(${CC} -showconfig | grep -i "HDF5 Version:" | sed 's/^.* //g' | sed 's/-.*//g') -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $H5_LIBVER" >&5 -$as_echo "$H5_LIBVER" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the API mapping of the HDF5 Library" >&5 -$as_echo_n "checking the API mapping of the HDF5 Library... " >&6; } - -H5_APIVER=$(${CC} -showconfig | grep -i "Default API mapping:" | sed 's/^.* //g' | sed 's/v//g' | sed 's/1/1_/') -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $H5_APIVER" >&5 -$as_echo "$H5_APIVER" >&6; } - -#if version is unreleased then bump to next official release. - -H5_MAJORVER=$(echo $H5_LIBVER | cut -f1 -d'.' | sed -E 's/\./_/g') -H5_MINORVER=$(echo $H5_LIBVER | cut -f2 -d'.' | sed -E 's/\./_/g') -H5_RELEASEVER=$(echo $H5_LIBVER | cut -f3 -d'.' | sed -E 's/\./_/g') - -#used in fortran version checks -H5_VERS_MAJOR=$H5_MAJORVER -H5_VERS_MINOR=$H5_MINORVER -H5_VERS_RELEASE=$H5_RELEASEVER - - - - - - -rem=$(( $H5_MINORVER % 2 )) -if test "$rem" != "0";then - H5_MINORVER=$(($H5_MINORVER+1)) -fi -H5_LIBVER_DIR=${H5_MAJORVER}${H5_MINORVER} - -# Test whether one version ($1) is greater than or equal to other ($2). -function version_gt { - test "`printf '%s\n' "$@" | sort -V | head -n 1`" != "$1"; -} - -if test ! "$H5EX_G" && test ! "$H5EX_D" && test ! "$H5EX_T";then - H5EX_G=1 - H5EX_D=1 - H5EX_T=1 -fi - if test "$H5EX_G"; then - H5G_TRUE= - H5G_FALSE='#' -else - H5G_TRUE='#' - H5G_FALSE= -fi - - if test "$H5EX_D"; then - H5D_TRUE= - H5D_FALSE='#' -else - H5D_TRUE='#' - H5D_FALSE= -fi - - if test "$H5EX_T"; then - H5T_TRUE= - H5T_FALSE='#' -else - H5T_TRUE='#' - H5T_FALSE= -fi - - -# Check if a Fortran 2003 compiler was used for h5fc -HAVE_FORTRAN_2003="no" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if h5fc was compiled with Fortran 2003 enabled" >&5 -$as_echo_n "checking if h5fc was compiled with Fortran 2003 enabled... " >&6; } - -# if HDF5 version is 1.8 and HDF5 used a 2003 Fortran compiler. -if (${FC} -showconfig 2>&1 | grep 'Fortran 2003 Compiler: yes') > /dev/null; then - HAVE_FORTRAN_2003="yes" -else -# check if HDF5 version is > 1.8 - if version_gt "$H5_LIBVER" "1.9.0"; then - HAVE_FORTRAN_2003="yes" - fi -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_FORTRAN_2003" >&5 -$as_echo "$HAVE_FORTRAN_2003" >&6; } - -FORTRAN_2003_CONDITIONAL_F="X$HAVE_FORTRAN_2003" - - if test "X$HAVE_FORTRAN_2003" = "Xyes"; then - FORTRAN_2003_CONDITIONAL_F_TRUE= - FORTRAN_2003_CONDITIONAL_F_FALSE='#' -else - FORTRAN_2003_CONDITIONAL_F_TRUE='#' - FORTRAN_2003_CONDITIONAL_F_FALSE= -fi - - -# Check if we have Fortran 2003 and Intel compiler; Intel doesn't work with RECURSIVE used by h5ex_g_traverse.F90 -# The example will not be built when Intel compiler is used (EIP 2011/10/14) - -if test "X$HAVE_FORTRAN_2003" = "Xyes"; then - HAVE_FORTRAN_2003_NOTINTEL="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if h5fc is an Intel Fortran compiler" >&5 -$as_echo_n "checking if h5fc is an Intel Fortran compiler... " >&6; } - if (${FC} -showconfig 2>&1 | grep 'Intel(R) Fortran ') > /dev/null; then - HAVE_FORTRAN_2003_NOTINTEL="no" - fi - if test "X$HAVE_FORTRAN_2003_NOTINTEL" = "Xyes"; then - echo "no" - else - echo "yes" - fi -fi -# End check if we have Fortran 2003 and Intel compiler. - if test "X$HAVE_FORTRAN_2003_NOTINTEL" = "Xyes"; then - FORTRAN_2003_NOTINTEL_CONDITIONAL_F_TRUE= - FORTRAN_2003_NOTINTEL_CONDITIONAL_F_FALSE='#' -else - FORTRAN_2003_NOTINTEL_CONDITIONAL_F_TRUE='#' - FORTRAN_2003_NOTINTEL_CONDITIONAL_F_FALSE= -fi - - - -# Set subdirectories -ac_config_files="$ac_config_files Makefile C/Makefile C/H5D/Makefile C/H5G/Makefile C/H5T/Makefile FORTRAN/Makefile FORTRAN/H5D/h5_version.h FORTRAN/H5D/Makefile FORTRAN/H5G/Makefile FORTRAN/H5T/Makefile" - - - -ac_config_files="$ac_config_files C/H5D/test.sh" - -ac_config_files="$ac_config_files C/H5G/test.sh" - -ac_config_files="$ac_config_files C/H5T/test.sh" - -ac_config_files="$ac_config_files FORTRAN/H5D/test.sh" - -ac_config_files="$ac_config_files FORTRAN/H5G/test.sh" - -ac_config_files="$ac_config_files FORTRAN/H5T/test.sh" - - -# Configure -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${H5G_TRUE}" && test -z "${H5G_FALSE}"; then - as_fn_error $? "conditional \"H5G\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${H5D_TRUE}" && test -z "${H5D_FALSE}"; then - as_fn_error $? "conditional \"H5D\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${H5T_TRUE}" && test -z "${H5T_FALSE}"; then - as_fn_error $? "conditional \"H5T\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_2003_NOTINTEL_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_NOTINTEL_CONDITIONAL_F_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_2003_NOTINTEL_CONDITIONAL_F\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by HDF5-examples $as_me 0.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -HDF5-examples config.status 0.1 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "C/Makefile") CONFIG_FILES="$CONFIG_FILES C/Makefile" ;; - "C/H5D/Makefile") CONFIG_FILES="$CONFIG_FILES C/H5D/Makefile" ;; - "C/H5G/Makefile") CONFIG_FILES="$CONFIG_FILES C/H5G/Makefile" ;; - "C/H5T/Makefile") CONFIG_FILES="$CONFIG_FILES C/H5T/Makefile" ;; - "FORTRAN/Makefile") CONFIG_FILES="$CONFIG_FILES FORTRAN/Makefile" ;; - "FORTRAN/H5D/h5_version.h") CONFIG_FILES="$CONFIG_FILES FORTRAN/H5D/h5_version.h" ;; - "FORTRAN/H5D/Makefile") CONFIG_FILES="$CONFIG_FILES FORTRAN/H5D/Makefile" ;; - "FORTRAN/H5G/Makefile") CONFIG_FILES="$CONFIG_FILES FORTRAN/H5G/Makefile" ;; - "FORTRAN/H5T/Makefile") CONFIG_FILES="$CONFIG_FILES FORTRAN/H5T/Makefile" ;; - "C/H5D/test.sh") CONFIG_FILES="$CONFIG_FILES C/H5D/test.sh" ;; - "C/H5G/test.sh") CONFIG_FILES="$CONFIG_FILES C/H5G/test.sh" ;; - "C/H5T/test.sh") CONFIG_FILES="$CONFIG_FILES C/H5T/test.sh" ;; - "FORTRAN/H5D/test.sh") CONFIG_FILES="$CONFIG_FILES FORTRAN/H5D/test.sh" ;; - "FORTRAN/H5G/test.sh") CONFIG_FILES="$CONFIG_FILES FORTRAN/H5G/test.sh" ;; - "FORTRAN/H5T/test.sh") CONFIG_FILES="$CONFIG_FILES FORTRAN/H5T/test.sh" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "C/H5D/test.sh":F) chmod +x C/H5D/test.sh ;; - "C/H5G/test.sh":F) chmod +x C/H5G/test.sh ;; - "C/H5T/test.sh":F) chmod +x C/H5T/test.sh ;; - "FORTRAN/H5D/test.sh":F) chmod +x FORTRAN/H5D/test.sh ;; - "FORTRAN/H5G/test.sh":F) chmod +x FORTRAN/H5G/test.sh ;; - "FORTRAN/H5T/test.sh":F) chmod +x FORTRAN/H5T/test.sh ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/HDF5Examples/configure.ac b/HDF5Examples/configure.ac deleted file mode 100644 index babfdecc624..00000000000 --- a/HDF5Examples/configure.ac +++ /dev/null @@ -1,216 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -AC_PREREQ(2.69) -AC_INIT(HDF5-examples, 0.1, help@hdfgroup.org) -dnl AM_INIT_AUTOMAKE takes a list of options that should be applied to -dnl every Makefile.am when automake is run. -AM_INIT_AUTOMAKE([foreign]) -AM_CONFIG_HEADER(config.h) - -# Turn off automake rebuild rules so make doesn't try to run automake -# (which probably won't work). -AM_MAINTAINER_MODE - -# Argument for static linking -AC_ARG_ENABLE(shared, - [AS_HELP_STRING([--disable-shared], - [force static linking])], - [if test "$enableval" = "no"; then - shared_suffix="" - echo lo! - else - shared_suffix=" -shlib" - fi], - [shared_suffix=" -shlib"]) - -# Checks and sets HDF5 compiler wrappers. -if test "x$CC" = "x"; then - H5C_exists=`h5cc -help > /dev/null 2>&1; echo $?` - if test "x1" = "x$H5C_exists"; then - H5C_valid=`h5cc -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5C_valid"; then - H5C="h5cc" - fi - else - H5C_exists=`h5pcc > /dev/null 2>&1; echo $?` - if test "x1" = "x$H5C_exists"; then - H5C_valid=`h5pcc -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5C_valid"; then - H5C="h5pcc" - else - AC_MSG_ERROR(failed to find h5cc or h5pcc) - fi - else - AC_MSG_ERROR(failed to find h5cc or h5pcc) - fi - fi -else - H5C_exists=`$CC -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5C_exists"; then - H5C="$CC" - else - AC_MSG_ERROR(CC is not set to h5cc or h5pcc) - fi -fi -AC_PROG_CC([$H5C]) - -if test "x$FC" = "x"; then - H5FC_exists=`h5fc -help > /dev/null 2>&1; echo $?` - if test "x1" = "x$H5FC_exists"; then - H5FC_valid=`h5fc -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5FC_valid"; then - H5FC="h5fc" - fi - else - H5FC_exists=`h5pfc > /dev/null 2>&1; echo $?` - if test "x1" = "x$H5FC_exists"; then - H5FC_valid=`h5pfc -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "x1" = "x$H5FC_valid"; then - H5FC="h5pfc" - else - AC_MSG_ERROR(failed to find h5fc or h5pfc) - fi - else - AC_MSG_ERROR(failed to find h5fc or h5pfc) - fi - fi -else - H5FC_exists=`$FC -help | sed -E -n '1p' | sed -n "/h5/p" | wc -l | sed 's/ //g'` - if test "1" = "$H5FC_exists"; then - H5FC="$FC" - else - AC_MSG_ERROR(FC is not set to h5fc or h5pfc) - fi -fi -AC_PROG_FC([$H5FC]) - -# Add the suffix to CC for shared linking. Can't just set as an option -# because it must be first. -if test "$shared_suffix" && test ! `echo ${CC} | grep "$shared_suffix"`; then - CC=${CC}${shared_suffix} -fi -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -# Determine the version of the HDF5 Library -AC_MSG_CHECKING([the version of the HDF5 Library]) - -AC_SUBST([H5_LIBVER]) -H5_LIBVER=$(${CC} -showconfig | grep -i "HDF5 Version:" | sed 's/^.* //g' | sed 's/[-].*//g') -AC_MSG_RESULT([$H5_LIBVER]) - -AC_MSG_CHECKING([the API mapping of the HDF5 Library]) -AC_SUBST([H5_APIVER]) -H5_APIVER=$(${CC} -showconfig | grep -i "Default API mapping:" | sed 's/^.* //g' | sed 's/v//g' | sed 's/1/1_/') -AC_MSG_RESULT([$H5_APIVER]) - -#if version is unreleased then bump to next official release. - -H5_MAJORVER=$(echo $H5_LIBVER | cut -f1 -d'.' | sed -E 's/\./_/g') -H5_MINORVER=$(echo $H5_LIBVER | cut -f2 -d'.' | sed -E 's/\./_/g') -H5_RELEASEVER=$(echo $H5_LIBVER | cut -f3 -d'.' | sed -E 's/\./_/g') - -#used in fortran version checks -H5_VERS_MAJOR=$H5_MAJORVER -H5_VERS_MINOR=$H5_MINORVER -H5_VERS_RELEASE=$H5_RELEASEVER - -AC_SUBST([H5_VERS_MAJOR]) -AC_SUBST([H5_VERS_MINOR]) -AC_SUBST([H5_VERS_RELEASE]) - -AC_SUBST([H5_LIBVER_DIR]) -rem=$(( $H5_MINORVER % 2 )) -if test "$rem" != "0";then - H5_MINORVER=$(($H5_MINORVER+1)) -fi -H5_LIBVER_DIR=${H5_MAJORVER}${H5_MINORVER} - -# Test whether one version ($1) is greater than or equal to other ($2). -function version_gt { - test "`printf '%s\n' "$@" | sort -V | head -n 1`" != "$1"; -} - -if test ! "$H5EX_G" && test ! "$H5EX_D" && test ! "$H5EX_T";then - H5EX_G=1 - H5EX_D=1 - H5EX_T=1 -fi -AM_CONDITIONAL(H5G, test "$H5EX_G") -AM_CONDITIONAL(H5D, test "$H5EX_D") -AM_CONDITIONAL(H5T, test "$H5EX_T") - -# Check if a Fortran 2003 compiler was used for h5fc -HAVE_FORTRAN_2003="no" - -AC_MSG_CHECKING([if h5fc was compiled with Fortran 2003 enabled]) - -# if HDF5 version is 1.8 and HDF5 used a 2003 Fortran compiler. -if (${FC} -showconfig 2>&1 | grep 'Fortran 2003 Compiler: yes') > /dev/null; then - HAVE_FORTRAN_2003="yes" -else -# check if HDF5 version is > 1.8 - if version_gt "$H5_LIBVER" "1.9.0"; then - HAVE_FORTRAN_2003="yes" - fi -fi - -AC_MSG_RESULT([$HAVE_FORTRAN_2003]) - -FORTRAN_2003_CONDITIONAL_F="X$HAVE_FORTRAN_2003" -AC_SUBST([FORTRAN_2003_CONDITIONAL_F]) -AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"]) - -# Check if we have Fortran 2003 and Intel compiler; Intel doesn't work with RECURSIVE used by h5ex_g_traverse.F90 -# The example will not be built when Intel compiler is used (EIP 2011/10/14) - -if test "X$HAVE_FORTRAN_2003" = "Xyes"; then - HAVE_FORTRAN_2003_NOTINTEL="yes" - AC_MSG_CHECKING([if h5fc is an Intel Fortran compiler]) - if (${FC} -showconfig 2>&1 | grep 'Intel(R) Fortran ') > /dev/null; then - HAVE_FORTRAN_2003_NOTINTEL="no" - fi - if test "X$HAVE_FORTRAN_2003_NOTINTEL" = "Xyes"; then - echo "no" - else - echo "yes" - fi -fi -# End check if we have Fortran 2003 and Intel compiler. -AM_CONDITIONAL([FORTRAN_2003_NOTINTEL_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003_NOTINTEL" = "Xyes"]) - - -# Set subdirectories -AC_CONFIG_FILES([Makefile - C/Makefile - C/H5D/Makefile - C/H5G/Makefile - C/H5T/Makefile - FORTRAN/Makefile - FORTRAN/H5D/h5_version.h - FORTRAN/H5D/Makefile - FORTRAN/H5G/Makefile - FORTRAN/H5T/Makefile - ]) - -AC_CONFIG_FILES([C/H5D/test.sh], [chmod +x C/H5D/test.sh]) -AC_CONFIG_FILES([C/H5G/test.sh], [chmod +x C/H5G/test.sh]) -AC_CONFIG_FILES([C/H5T/test.sh], [chmod +x C/H5T/test.sh]) -AC_CONFIG_FILES([FORTRAN/H5D/test.sh], [chmod +x FORTRAN/H5D/test.sh]) -AC_CONFIG_FILES([FORTRAN/H5G/test.sh], [chmod +x FORTRAN/H5G/test.sh]) -AC_CONFIG_FILES([FORTRAN/H5T/test.sh], [chmod +x FORTRAN/H5T/test.sh]) - -# Configure -AC_OUTPUT diff --git a/HDF5Examples/depcomp b/HDF5Examples/depcomp deleted file mode 100755 index fc98710e2a1..00000000000 --- a/HDF5Examples/depcomp +++ /dev/null @@ -1,791 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2013-05-30.07; # UTC - -# Copyright (C) 1999-2014 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by 'PROGRAMS ARGS'. - object Object file output by 'PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputting dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -# Get the directory component of the given path, and save it in the -# global variables '$dir'. Note that this directory component will -# be either empty or ending with a '/' character. This is deliberate. -set_dir_from () -{ - case $1 in - */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; - *) dir=;; - esac -} - -# Get the suffix-stripped basename of the given path, and save it the -# global variable '$base'. -set_base_from () -{ - base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` -} - -# If no dependency file was actually created by the compiler invocation, -# we still have to create a dummy depfile, to avoid errors with the -# Makefile "include basename.Plo" scheme. -make_dummy_depfile () -{ - echo "#dummy" > "$depfile" -} - -# Factor out some common post-processing of the generated depfile. -# Requires the auxiliary global variable '$tmpdepfile' to be set. -aix_post_process_depfile () -{ - # If the compiler actually managed to produce a dependency file, - # post-process it. - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependency.h'. - # Do two passes, one to just change these to - # $object: dependency.h - # and one to simply output - # dependency.h: - # which is needed to avoid the deleted-header problem. - { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" - sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" - } > "$depfile" - rm -f "$tmpdepfile" - else - make_dummy_depfile - fi -} - -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' -# Character ranges might be problematic outside the C locale. -# These definitions help. -upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ -lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 -alpha=${upper}${lower} - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Avoid interferences from the environment. -gccflag= dashmflag= - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp -fi - -if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 -fi - -if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. - gccflag=-qmakedep=gcc,-MF - depmode=gcc -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. -## (see the conditional assignment to $gccflag above). -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). Also, it might not be -## supported by the other compilers which use the 'gcc' depmode. -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The second -e expression handles DOS-style file names with drive - # letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the "deleted header file" problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. -## Some versions of gcc put a space before the ':'. On the theory -## that the space means something, we add a space to the output as -## well. hp depmode also adds that space, but also prefixes the VPATH -## to the object. Take care to not repeat it in the output. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the - # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ - | tr "$nl" ' ' >> "$depfile" - echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" - ;; - -xlc) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts '$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - aix_post_process_depfile - ;; - -tcc) - # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 - # FIXME: That version still under development at the moment of writing. - # Make that this statement remains true also for stable, released - # versions. - # It will wrap lines (doesn't matter whether long or short) with a - # trailing '\', as in: - # - # foo.o : \ - # foo.c \ - # foo.h \ - # - # It will put a trailing '\' even on the last line, and will use leading - # spaces rather than leading tabs (at least since its commit 0394caf7 - # "Emit spaces for -MD"). - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. - # We have to change lines of the first kind to '$object: \'. - sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" - # And for each line of the second kind, we have to emit a 'dep.h:' - # dummy dependency, to avoid the deleted-header problem. - sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" - rm -f "$tmpdepfile" - ;; - -## The order of this option in the case statement is important, since the -## shell code in configure will try each of these formats in the order -## listed in this file. A plain '-MD' option would be understood by many -## compilers, so we must ensure this comes after the gcc and icc options. -pgcc) - # Portland's C compiler understands '-MD'. - # Will always output deps to 'file.d' where file is the root name of the - # source file under compilation, even if file resides in a subdirectory. - # The object file name does not affect the name of the '.d' file. - # pgcc 10.2 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\' : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - set_dir_from "$object" - # Use the source, not the object, to determine the base name, since - # that's sadly what pgcc will do too. - set_base_from "$source" - tmpdepfile=$base.d - - # For projects that build the same source file twice into different object - # files, the pgcc approach of using the *source* file root name can cause - # problems in parallel builds. Use a locking strategy to avoid stomping on - # the same $tmpdepfile. - lockdir=$base.d-lock - trap " - echo '$0: caught signal, cleaning up...' >&2 - rmdir '$lockdir' - exit 1 - " 1 2 13 15 - numtries=100 - i=$numtries - while test $i -gt 0; do - # mkdir is a portable test-and-set. - if mkdir "$lockdir" 2>/dev/null; then - # This process acquired the lock. - "$@" -MD - stat=$? - # Release the lock. - rmdir "$lockdir" - break - else - # If the lock is being held by a different process, wait - # until the winning process is done or we timeout. - while test -d "$lockdir" && test $i -gt 0; do - sleep 1 - i=`expr $i - 1` - done - fi - i=`expr $i - 1` - done - trap - 1 2 13 15 - if test $i -le 0; then - echo "$0: failed to acquire lock after $numtries attempts" >&2 - echo "$0: check lockdir '$lockdir'" >&2 - exit 1 - fi - - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - set_dir_from "$object" - set_base_from "$object" - - if test "$libtool" = yes; then - # Libtool generates 2 separate objects for the 2 libraries. These - # two compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir$base.o.d # libtool 1.5 - tmpdepfile2=$dir.libs/$base.o.d # Likewise. - tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - # Same post-processing that is required for AIX mode. - aix_post_process_depfile - ;; - -msvc7) - if test "$libtool" = yes; then - showIncludes=-Wc,-showIncludes - else - showIncludes=-showIncludes - fi - "$@" $showIncludes > "$tmpdepfile" - stat=$? - grep -v '^Note: including file: ' "$tmpdepfile" - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The first sed program below extracts the file names and escapes - # backslashes for cygpath. The second sed program outputs the file - # name when reading, but also accumulates all include files in the - # hold buffer in order to output them again at the end. This only - # works with sed implementations that can handle large buffers. - sed < "$tmpdepfile" -n ' -/^Note: including file: *\(.*\)/ { - s//\1/ - s/\\/\\\\/g - p -}' | $cygpath_u | sort -u | sed -n ' -s/ /\\ /g -s/\(.*\)/'"$tab"'\1 \\/p -s/.\(.*\) \\/\1:/ -H -$ { - s/.*/'"$tab"'/ - G - p -}' >> "$depfile" - echo >> "$depfile" # make sure the fragment doesn't end with a backslash - rm -f "$tmpdepfile" - ;; - -msvc7msys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for ':' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. - "$@" $dashmflag | - sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this sed invocation - # correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - # makedepend may prepend the VPATH from the source file name to the object. - # No need to regex-escape $object, excess matching of '.' is harmless. - sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process the last invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed '1,2d' "$tmpdepfile" \ - | tr ' ' "$nl" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E \ - | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - | sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/HDF5Examples/install-sh b/HDF5Examples/install-sh deleted file mode 100755 index 0b0fdcbba69..00000000000 --- a/HDF5Examples/install-sh +++ /dev/null @@ -1,501 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2013-12-25.23; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -tab=' ' -nl=' -' -IFS=" $tab$nl" - -# Set DOITPROG to "echo" to test this script. - -doit=${DOITPROG-} -doit_exec=${doit:-exec} - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -is_target_a_directory=possibly - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; - - -T) is_target_a_directory=never;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call 'install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - dstdir=`dirname "$dst"` - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - oIFS=$IFS - IFS=/ - set -f - set fnord $dstdir - shift - set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - set +f && - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/HDF5Examples/missing b/HDF5Examples/missing deleted file mode 100755 index f62bbae306c..00000000000 --- a/HDF5Examples/missing +++ /dev/null @@ -1,215 +0,0 @@ -#! /bin/sh -# Common wrapper for a few potentially missing GNU programs. - -scriptversion=2013-10-28.13; # UTC - -# Copyright (C) 1996-2014 Free Software Foundation, Inc. -# Originally written by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try '$0 --help' for more information" - exit 1 -fi - -case $1 in - - --is-lightweight) - # Used by our autoconf macros to check whether the available missing - # script is modern enough. - exit 0 - ;; - - --run) - # Back-compat with the calling convention used by older automake. - shift - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due -to PROGRAM being missing or too old. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man - -Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and -'g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: unknown '$1' option" - echo 1>&2 "Try '$0 --help' for more information" - exit 1 - ;; - -esac - -# Run the given program, remember its exit status. -"$@"; st=$? - -# If it succeeded, we are done. -test $st -eq 0 && exit 0 - -# Also exit now if we it failed (or wasn't found), and '--version' was -# passed; such an option is passed most likely to detect whether the -# program is present and works. -case $2 in --version|--help) exit $st;; esac - -# Exit code 63 means version mismatch. This often happens when the user -# tries to use an ancient version of a tool on a file that requires a -# minimum version. -if test $st -eq 63; then - msg="probably too old" -elif test $st -eq 127; then - # Program was missing. - msg="missing on your system" -else - # Program was found and executed, but failed. Give up. - exit $st -fi - -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software - -program_details () -{ - case $1 in - aclocal|automake) - echo "The '$1' program is part of the GNU Automake package:" - echo "<$gnu_software_URL/automake>" - echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/autoconf>" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - autoconf|autom4te|autoheader) - echo "The '$1' program is part of the GNU Autoconf package:" - echo "<$gnu_software_URL/autoconf/>" - echo "It also requires GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - esac -} - -give_advice () -{ - # Normalize program name to check for. - normalized_program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - - printf '%s\n' "'$1' is $msg." - - configure_deps="'configure.ac' or m4 files included by 'configure.ac'" - case $normalized_program in - autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' - ;; - autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" - echo "$configure_deps." - program_details 'autoheader' - ;; - automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" - echo "$configure_deps." - program_details 'aclocal' - ;; - autom4te*) - echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' - ;; - bison*|yacc*) - echo "You should only need it if you modified a '.y' file." - echo "You may want to install the GNU Bison package:" - echo "<$gnu_software_URL/bison/>" - ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; - help2man*) - echo "You should only need it if you modified a dependency" \ - "of a man page." - echo "You may want to install the GNU Help2man package:" - echo "<$gnu_software_URL/help2man/>" - ;; - makeinfo*) - echo "You should only need it if you modified a '.texi' file, or" - echo "any other file indirectly affecting the aspect of the manual." - echo "You might want to install the Texinfo package:" - echo "<$gnu_software_URL/texinfo/>" - echo "The spurious makeinfo call might also be the consequence of" - echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" - echo "want to install GNU make:" - echo "<$gnu_software_URL/make/>" - ;; - *) - echo "You might have modified some files without having the proper" - echo "tools for further handling them. Check the 'README' file, it" - echo "often tells you about the needed prerequisites for installing" - echo "this package. You may also peek at any GNU archive site, in" - echo "case some other package contains this missing '$1' program." - ;; - esac -} - -give_advice "$1" | sed -e '1s/^/WARNING: /' \ - -e '2,$s/^/ /' >&2 - -# Propagate the correct exit status (expected to be 127 for a program -# not found, 63 for a program that failed due to version mismatch). -exit $st - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 4805b91f7ab..00000000000 --- a/Makefile.am +++ /dev/null @@ -1,192 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# This makefile mostly just reinvokes make in the various subdirectories -# but does so in the correct order. You can alternatively invoke make from -# each subdirectory manually. -# -# Top-level HDF5 Makefile(.in) - -# pmake has issues if variables are undefined. Solve this problem in -# top-level Makefile by defining .MAKEFLAGS target to -V before pmake can -# encounter any undefined variables. -# Automake resists putting anything but variable definitions first in -# a Makefile.in, so we'll put a placebo comment here and use sed in -# bin/reconfigure to turn it into the .MAKEFLAGS target. Sigh. -JL 2005 -# Configure should set AM_MAKEFLAGS to -V to solve this problem in -# subdirectories. -# NOTE: This means that invoking pmake in a subdirectory will not work. -#xxx.MAKEFLAGS:@AM_MAKEFLAGS@ -#xxx $(MAKE) all -#xxx - -include $(top_srcdir)/config/commence.am - -# include Doxygen rules (requires autoconf-archive >2016-03-20) -@DX_RULES@ - -# Define subdirectories to build. -## Automake understands that `make distclean' should recurse into -## conditional subdirectories even if `make all' does not. -# Since we're explicitly listing DIST_SUBDIRS, we also need to list -# directories that are only conditionally built (so that their Makefiles -# are cleaned as well). -# Note that `make clean' will not affect the examples or doc directories. - -# Conditionals. These conditionals are defined during configure -# Define each variable to empty if it is not used to placate pmake -if BUILD_CXX_CONDITIONAL - CXX_DIR =c++ -else - CXX_DIR= -endif -if BUILD_FORTRAN_CONDITIONAL - FORTRAN_DIR =fortran -else - FORTRAN_DIR= -endif -if BUILD_JAVA_CONDITIONAL - JAVA_DIR=java -else - JAVA_DIR= -endif -if BUILD_HDF5_HL_CONDITIONAL - HDF5_HL_DIR =hl -else - HDF5_HL_DIR= -endif -if BUILD_TESTS_CONDITIONAL - TESTSERIAL_DIR =test -else - TESTSERIAL_DIR= -endif -if BUILD_TESTS_PARALLEL_CONDITIONAL - TESTPARALLEL_DIR =testpar -else - TESTPARALLEL_DIR= -endif -if BUILD_TOOLS_CONDITIONAL - TOOLS_DIR =tools -else - TOOLS_DIR= -endif - -SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) bin $(TOOLS_DIR) utils . \ - $(CXX_DIR) $(FORTRAN_DIR) $(JAVA_DIR) $(HDF5_HL_DIR) -DIST_SUBDIRS = src test testpar bin tools utils . c++ fortran hl java - -# Some files generated during configure that should be cleaned -DISTCLEANFILES=config/stamp1 config/stamp2 - -# Some files/directories generated during check that should be cleaned -CHECK_CLEANFILES+=*-tmp - -# Define rules for lib, progs, check, and tests. -# These simply involve recursing into subdirectories. -test _test: check - -lib progs check-p check-s: - for d in $(SUBDIRS); do \ - if test $$d != .; then \ - (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Make all, tests, and (un)install -tests: - for d in $(SUBDIRS); do \ - if test $$d != .; then \ - (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - - -# Some C++ compilers/linkers will create a directory named ii_files in -# the root directory, which should be cleaned. -mostlyclean-local: - if test -d ii_files; then \ - $(RM) -rf ii_files; \ - fi - -# 'make-install-all' will be redundant but will still work. -install: install-recursive -uninstall: uninstall-recursive - -install-all: - @$(MAKE) $(AM_MAKEFLAGS) install -uninstall-all: - @$(MAKE) $(AM_MAKEFLAGS) uninstall - - -# check-install is just a synonym for installcheck -check-install: installcheck - -# check-all-install tests all installation methods. -# Install via different mechanism and then compare against the default. -# Fine if only libXXX.a files are different since they may have been ranlib'ed. -check-all-install: - @echo Installing to default location - $(MAKE) install - @echo Installing to different prefix location - $(MAKE) prefix=${ROOT}/prefix-tmp install - @echo Compare against the default installation. - @echo Fine if only libXXX.a files are different. - -diff -r prefix-tmp ${prefix} - @echo Installing to different $$\DESTDIR location - env DESTDIR=${ROOT}/destdir-tmp $(MAKE) install - @echo Compare against the default installation. - @echo Fine if only libXXX.a files are different. - -diff -r destdir-tmp${prefix} ${prefix} - -# Only source files in the src directory include tracing information, -# so 'make trace' only needs to recurse into that directory. -trace: - @(cd src && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; - -# doxygen support -if BUILD_DOXYGEN_CONDITIONAL -doxygen: doxygen-doc -endif - -# Run tests with different Virtual File Drivers. -# Currently, only invoke check-vfd in the test directory. -check-vfd: - for d in src utils test; do \ - if test $$d != .; then \ - (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Run tests with different passthrough Virtual Object Layer Connectors. -# NOTE: Will only succeed with passthrough VOL connectors that use -# the native VOL connector as the terminal connector. -check-passthrough-vol: - for d in $(SUBDIRS); do \ - if test $$d != .; then \ - (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Automake wants to make config.status depend on configure. This -# makes sense, but config.status can't always be regenerated -# properly, which can cause builds to fail. -# This is a problem for our Daily Tests, which need to be able to -# 'make distclean' reliably before running configure. -# The simple solution is to override the dependency Automake supplies -# for config.status so that it will never be regenerated. -$(top_builddir)/config.status: - -# Don't include conclude.am in root Makefile; tests target needs to -# recurse into reguar subdirs. diff --git a/Makefile.dist b/Makefile.dist deleted file mode 100644 index 5ae99040d34..00000000000 --- a/Makefile.dist +++ /dev/null @@ -1,34 +0,0 @@ -# Top-level distributed Makefile -*- makefile -*- - -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# This Makefile is a stub (copied from Makefile.dist) which will run -# configure and then invoke the same target in the new Makefile created -# by configure. - -# Uncomment this variable if your make(1) doesn't set it automatically. -# -#MAKE=make - - -SHELL=/bin/sh - -all lib progs check test _test install uninstall dep depend: _config - $(MAKE) $@ - -clean mostlyclean distclean maintainer-clean TAGS: _config - $(MAKE) $@ - -_config: - sh configure - -.PHONY: all lib progs test install uninstall dep depend clean mostlyclean \ - distclean maintainer-clean _config diff --git a/acsite.m4 b/acsite.m4 deleted file mode 100644 index 1782033dc84..00000000000 --- a/acsite.m4 +++ /dev/null @@ -1,53 +0,0 @@ -dnl ------------------------------------------------------------------------- -dnl ------------------------------------------------------------------------- -dnl -dnl Copyright by The HDF Group. -dnl All rights reserved. -dnl -dnl This file is part of HDF5. The full HDF5 copyright notice, including -dnl terms governing use, modification, and redistribution, is contained in -dnl the COPYING file, which can be found at the root of the source code -dnl dnl distribution tree, or in https://www.hdfgroup.org/licenses. -dnl dnl If you do not have access to either file, you may request a copy from -dnl dnl help@hdfgroup.org. -dnl -dnl Macros for HDF5 Fortran -dnl -dnl ------------------------------------------------------------------------- -dnl ------------------------------------------------------------------------- - -dnl ------------------------------------------------------------------------- -dnl _AC_SYS_LARGEFILE_MACRO_VALUE -dnl -dnl The following macro overrides the autoconf macro of the same name -dnl with this custom definition. This macro performs the same checks as -dnl autoconf's native _AC_SYS_LARGEFILE_MACRO_VALUE, but will also set -dnl AM_CPPFLAGS with the appropriate -D defines so additional configure -dnl sizeof checks do not fail. -dnl -# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, -# CACHE-VAR, -# DESCRIPTION, -# PROLOGUE, [FUNCTION-BODY]) -# ---------------------------------------------------------- -m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], -[AC_CACHE_CHECK([for $1 value needed for large files], [$3], -[while :; do - m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( - [AC_LANG_PROGRAM([$5], [$6])], - [$3=no; break]) - m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( - [AC_LANG_PROGRAM([@%:@define $1 $2 -$5], [$6])], - [$3=$2; break]) - $3=unknown - break -done]) -case $$3 in #( - no | unknown) ;; - *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]) - AM_CPPFLAGS="-D$1=$$3 $AM_CPPFLAGS";; -esac -rm -rf conftest*[]dnl -])# _AC_SYS_LARGEFILE_MACRO_VALUE - diff --git a/autogen.sh b/autogen.sh index 31d117cf8ed..e3342f5961e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -11,26 +11,9 @@ # help@hdfgroup.org. # -# A script to reconfigure the Autotools for HDF5, and to recreate other +# A script to recreate other # generated files specific to HDF5. # -# IMPORTANT OS X NOTE -# -# If you are using OS X, you will probably not have the Autotools -# installed, even if you have the Xcode command-line tools. -# -# The easiest way to fix this is to install everything via Homebrew: -# -# http://brew.sh/ -# -# After you install the base packages, install autoconf, automake, -# and libtool. -# -# brew install autoconf -# brew install automake -# brew install libtool -# -# END IMPORTANT OS X NOTE echo echo "**************************" @@ -39,9 +22,6 @@ echo "**************************" echo # Run scripts that process source. -# -# These should be run before the Autotools so that failures here block -# compilation. # Run trace script # The trace script updates H5ARG_TRACE macros in library source files. @@ -70,19 +50,6 @@ echo "Running overflow macro generation script:" bin/make_overflow src/H5overflow.txt || exit 1 echo -# Run Autotools - -# The "obsolete" warnings category flags our Java macros as obsolete. -# Since there is no clear way to upgrade them (Java support in the Autotools -# is not great) and they work well enough for now, we suppress those warnings. -echo "Running Autotools" -echo -echo "NOTE: You can ignore the warning about adding -I m4." -echo " We already do this in an included file." -echo -autoreconf -vif --warnings=no-obsolete || exit 1 -echo - echo "*** SUCCESS ***" echo diff --git a/bin/Makefile.am b/bin/Makefile.am deleted file mode 100644 index 96a4969ab01..00000000000 --- a/bin/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# These are our main targets -bin_SCRIPTS=h5redeploy - -# Tell automake to clean h5redeploy script -CLEANFILES=h5redeploy - -# These were generated by configure. Remove them only when distclean. -DISTCLEANFILES=h5cc - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -# How to build h5redeploy script -h5redeploy: h5redeploy.in - @cp $(srcdir)/$@.in $@ - -# h5cc needs custom install and uninstall rules, since it may be -# named h5pcc if hdf5 is being built in parallel mode. -if BUILD_PARALLEL_CONDITIONAL - H5CC_NAME=h5pcc -else - H5CC_NAME=h5cc -endif - -$(DESTDIR)$(bindir): - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; - -install-exec-local: $(DESTDIR)$(bindir) - @$(INSTALL) h5cc $(DESTDIR)$(bindir)/$(H5CC_NAME) -uninstall-local: - @$(RM) $(DESTDIR)$(bindir)/$(H5CC_NAME) - -include $(top_srcdir)/config/conclude.am diff --git a/c++/Makefile.am b/c++/Makefile.am deleted file mode 100644 index ef7c285a5ee..00000000000 --- a/c++/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# Top-level HDF5-C++ Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -if BUILD_TESTS_CONDITIONAL - TEST_DIR = test -else - TEST_DIR= -endif - -## Only recurse into subdirectories if C++ interface is enabled. -if BUILD_CXX_CONDITIONAL - SUBDIRS=src $(TEST_DIR) - -endif -DIST_SUBDIRS = src test - -include $(top_srcdir)/config/conclude.am diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am deleted file mode 100644 index 41815cd2b26..00000000000 --- a/c++/src/Makefile.am +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5-C++ Makefile(.in) -# - -include $(top_srcdir)/config/commence.am -include $(top_srcdir)/config/lt_vers.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src - -# This is our main target -lib_LTLIBRARIES=libhdf5_cpp.la - -# Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am) -libhdf5_cpp_la_LDFLAGS= -version-info $(LT_CXX_VERS_INTERFACE):$(LT_CXX_VERS_REVISION):$(LT_CXX_VERS_AGE) $(AM_LDFLAGS) - -bin_SCRIPTS=h5c++ - -# Source files for the library -libhdf5_cpp_la_SOURCES=H5Exception.cpp H5IdComponent.cpp \ - H5DataSpace.cpp H5PropList.cpp H5Library.cpp \ - H5FaccProp.cpp H5FcreatProp.cpp H5LcreatProp.cpp \ - H5LaccProp.cpp H5DaccProp.cpp H5DxferProp.cpp \ - H5DcreatProp.cpp H5Location.cpp H5AbstractDs.cpp \ - H5Attribute.cpp H5Object.cpp H5OcreatProp.cpp \ - H5DataType.cpp H5AtomType.cpp H5PredType.cpp \ - H5EnumType.cpp H5IntType.cpp H5FloatType.cpp \ - H5StrType.cpp H5ArrayType.cpp H5VarLenType.cpp \ - H5CompType.cpp H5DataSet.cpp H5CommonFG.cpp H5Group.cpp \ - H5File.cpp - -# HDF5 C++ library depends on HDF5 Library. -libhdf5_cpp_la_LIBADD=$(LIBHDF5) - -# Public headers -include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h \ - H5Attribute.h H5Classes.h H5CommonFG.h H5CompType.h \ - H5DataSet.h H5DataSpace.h H5DataType.h H5OcreatProp.h \ - H5DaccProp.h H5DcreatProp.h \ - H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \ - H5FcreatProp.h H5File.h H5FloatType.h H5Group.h \ - H5IdComponent.h H5Include.h H5IntType.h H5LcreatProp.h \ - H5LaccProp.h H5Library.h H5Location.h H5Object.h \ - H5PredType.h H5PropList.h H5StrType.h H5CppDoc.h \ - H5ArrayType.h H5VarLenType.h - -# h5c++ and libhdf5.settings are generated during configure. Remove only when -# distclean. -DISTCLEANFILES=h5c++ libhdf5.settings - -# Some C++ compilers/linkers (PGI?) create a directory named "ii_files" that -# holds *.ii files, which are template entity instantiations. -# This entire directory should be cleaned. -mostlyclean-local: - @if test -d ii_files; then \ - $(RM) -rf ii_files; \ - fi - -# Mark this directory as part of the C++ API -CXX_API=yes - -include $(top_srcdir)/config/conclude.am diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in deleted file mode 100644 index 8830f3cd9a2..00000000000 --- a/c++/src/h5c++.in +++ /dev/null @@ -1,380 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -############################################################################ -## ## -## Things You May Have to Modify: ## -## ## -## If the following paths don't point to the place were HDF5 is installed ## -## on your system (i.e., you received a binary distribution or moved the ## -## files from the originally installed directory to another directory) ## -## then modify them accordingly to represent the new paths. ## -## ## -############################################################################ -prefix="@prefix@" -exec_prefix="@exec_prefix@" -libdir="@libdir@" -includedir="@includedir@" -HL="@HL@" - -############################################################################ -## ## -## Things You Can Modify to Override HDF5 Library Build Components: ## -## ## -## (Advanced usage - know what you're doing - you're on your own here.) ## -## The four variables below can be used to insert paths and flags in ## -## CPPFLAGS, CXXFLAGS, LDFLAGS, or LIBS in the h5cc compile line: ## -## $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS ## -## $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link ## -## ## -## These settings can be overridden by setting HDF5_CXXFLAGS, ## -## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ## -## ## -############################################################################ -CXXFLAGSBASE="" -CPPFLAGSBASE="" -LDFLAGSBASE="" -LIBSBASE="" - -############################################################################ -## ## -## You shouldn't have to modify anything below this line. ## -## ## -############################################################################ - -# Constants definitions -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -host_os="@host_os@" - -prog_name="`basename $0`" - -qargs="" -compile_args="" -libraries="" -link_args="" -link_objs="" -clibpath="" - -do_link="yes" -do_compile="no" -dash_c="" -get_output_file="no" - -SHOW="eval" -CXXBASE="@CXX@" -CXXLINKERBASE="@CXX@" - -# CXXFLAGS, CPPFLAGS and LDFLAGS are reserved for use by the script user. -# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS. - -# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts. User's -# LDFLAGS come just before clibpath, user's LIBS come after $link_objs and -# before the hdf5 libraries in $link_args, followed by any external library -# paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in -# from the hdf5 build. The order of the flags is intended to give precedence -# to the user's flags. -H5BLD_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@" -H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@" -H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" -H5BLD_LIBS="@LIBS@" - -CXX="${HDF5_CXX:-$CXXBASE}" -CXXLINKER="${HDF5_CXXLINKER:-$CXXLINKERBASE}" -CXXFLAGS="${HDF5_CXXFLAGS:-$CXXFLAGSBASE}" -CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}" -LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}" -LIBS="${HDF5_LIBS:-$LIBSBASE}" - -# If a static library is available, the default will be to use it. If the only -# available library is shared, it will be used by default. The user can -# override either default, although choosing an unavailable library will result -# in link errors. -STATIC_AVAILABLE="@enable_static@" -if test "${STATIC_AVAILABLE}" = "yes"; then - USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" -else - USE_SHARED_LIB="${HDF5_USE_SHLIB:-yes}" -fi - -usage() { - # A wonderfully informative "usage" message. - echo "usage: $prog_name [OPTIONS] " - echo " OPTIONS:" - echo " -help This help message." - echo " -echo Show all the shell commands executed" - echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/" - echo " subdirectories [default: $prefix]" - echo " -show Show the commands without executing them" - echo " -showconfig Show the HDF5 library configuration summary" - echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built" - echo " without static libraries]" - echo " -noshlib Compile with static HDF5 libraries [default for hdf5 built" - echo " with static libraries]" - echo " " - echo " - the normal compile line options for your compiler." - echo " $prog_name uses the same compiler you used to compile" - echo " HDF5. Check with your compiler's man pages for more" - echo " information on which options are needed." - echo " " - echo " You can override the compiler, linker, and whether or not to use static" - echo " or shared libraries to compile your program by setting the following" - echo " environment variables accordingly:" - echo " " - echo " HDF5_CXX - use a different C++ compiler" - echo " HDF5_CXXLINKER - use a different linker" - echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library" - echo " [default: no except when built with only" - echo " shared libraries]" - echo " You can also add or change paths and flags to the compile line using" - echo " the following environment variables or by assigning them to their counterparts" - echo " in the 'Things You Can Modify to Override...'" section of $prog_name - echo " " - echo " Variable Current value to be replaced" - echo " HDF5_CPPFLAGS \"$CPPFLAGSBASE\"" - echo " HDF5_CXXFLAGS \"$CXXFLAGSBASE\"" - echo " HDF5_LDFLAGS \"$LDFLAGSBASE\"" - echo " HDF5_LIBS \"$LIBSBASE\"" - echo " " - echo " Note that adding library paths to HDF5_LDFLAGS where another hdf5 version" - echo " is located may link your program with that other hdf5 library version." - echo " " - exit $EXIT_FAILURE -} - -# Show the configuration summary of the library recorded in the -# libhdf5.settings file reside in the lib directory. -showconfigure() -{ - cat ${libdir}/libhdf5.settings - status=$? -} - -# Main -status=$EXIT_SUCCESS - -if test "$#" = "0"; then - # No parameters specified, issue usage statement and exit. - usage -fi - -case "$CXX" in - gcc) - kind="gcc" - ;; - mpicc|mpcc|mpicc_r) - # Is this gcc masquarading as an MPI compiler? - if test "`${CXX} -v 2>&1 | sed -n 2p | cut -c1-3`" = "gcc"; then - kind="gcc" - else - # Nope - kind="$host_os" - fi - ;; - *) - kind="$host_os" - ;; -esac - -for arg in $@ ; do - if test "x$get_output_file" = "xyes"; then - link_args="$link_args $arg" - output_file="$arg" - get_output_file="no" - continue - fi - - case "$arg" in - -c) - compile_args="$compile_args $arg" - - if test "x$do_link" = "xyes" -a -n "$output_file"; then - compile_args="$compile_args -o $output_file" - fi - - do_link="no" - dash_c="-c" - ;; - -o) - if test "x$dash_c" = "x-c"; then - compile_args="$compile_args $arg" - else - link_args="$link_args $arg" - do_link="yes" - get_output_file="yes" - fi - ;; - -E|-M|-MT) - compile_args="$compile_args $arg" - dash_c="-c" - do_link="no" - ;; - -l*) - libraries=" $libraries $arg " - ;; - -prefix=*) - prefix="`expr "$arg" : '-prefix=\(.*\)'`" - ;; - -echo) - set -x - ;; - -show) - SHOW="echo" - ;; - -showconfig) - showconfigure - exit $status - ;; - -shlib) - USE_SHARED_LIB="yes" - ;; - -noshlib) - USE_SHARED_LIB="no" - ;; - -help) - usage - ;; - *\"*) - qarg="'"$arg"'" - qargs="$qargs $qarg" - ;; - *\'*) - qarg='"'"$arg"'"' - qargs="$qargs $qarg" - ;; - *) - if [ -s "$arg" ] ; then - ext=`expr "$arg" : '.*\(\..*\)'` - if [ "$ext" = ".C" -o "$ext" = ".cxx" -o "$ext" = ".cpp" -o \ - "$ext" = ".cc" -o "$ext" = ".c" -o "$ext" = ".CC" ] ; then - do_compile="yes" - compile_args="$compile_args $arg" - fname=`basename $arg $ext` - link_objs="$link_objs $fname.o" - elif [ "$ext" = ".o" ] ; then - if test "x$dash_c" = "x-c" ; then - compile_args="$compile_args $arg" - else - do_link="yes" - link_objs="$link_objs $arg" - fi - elif test "x$ext" = "x.a"; then - # This is an archive that we're linking in - libraries=" $libraries $arg " - else - compile_args="$compile_args $arg" - link_args="$link_args $arg" - fi - else - compile_args="$compile_args $arg" - link_args="$link_args $arg" - fi - ;; - esac -done -link_args="$link_args $qargs" -if test "x$do_compile" = "xyes"; then - if test "x$dash_c" = "x"; then - dash_c="-c" - fi - $SHOW $CXX -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $dash_c $qargs $compile_args - status=$? - - if test "$status" != "0"; then - exit $status - fi -fi - -if test "x$do_link" = "xyes"; then - shared_link="" - # conditionally link with the hl library - if test "X$HL" = "Xhl"; then - libraries=" $libraries -lhdf5_hl_cpp -lhdf5_cpp -lhdf5_hl -lhdf5 " - else - libraries=" $libraries -lhdf5_cpp -lhdf5 " - fi - link_args="$link_args -L${libdir}" - - if test "x$USE_SHARED_LIB" = "xyes"; then - case "$kind" in - gcc|linux*) - # MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags. - # It appears to want none of them specified. - case "$host_os" in - darwin*) flag="" ;; - *) flag="-Wl,-rpath -Wl," ;; - esac - ;; - hpux*) flag="-Wl,+b -Wl," ;; - freebsd*|solaris*) flag="-R" ;; - rs6000*|aix*) flag="-L" ;; - sgi) flag="-rpath " ;; - *) flag="" ;; - esac - - if test -n "$flag"; then - shared_link="${flag}${libdir}" - fi - else - # The "-lhdf5" & "-lhdf5_hl" flags are in here already...This is a static - # compile though, so change it to the static version (.a) of the library. - new_libraries="" - for lib in $libraries; do - case "$lib" in - -lhdf5) - new_libraries="$new_libraries ${libdir}/libhdf5.a" - ;; - -lhdf5_hl) - new_libraries="$new_libraries ${libdir}/libhdf5_hl.a" - ;; - -lhdf5_cpp) - new_libraries="$new_libraries ${libdir}/libhdf5_cpp.a" - ;; - -lhdf5_hl_cpp) - new_libraries="$new_libraries ${libdir}/libhdf5_hl_cpp.a" - ;; - *) - new_libraries="$new_libraries $lib" - ;; - esac - done - libraries="$new_libraries" - fi - - for lib in $libraries; do - if echo $link_args | grep " $lib " > /dev/null || - echo $link_args | grep " $lib$" > /dev/null; then - : - else - link_args="$link_args $lib " - fi - done - - # The LIBS are just a bunch of -l* libraries necessary for the HDF5 - # module. It's okay if they're included twice in the compile line. - link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS" - - # User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts. User's - # LDFLAGS come just before clibpath, user's LIBS come after $link_objs and - # before the hdf5 libraries in $link_args, followed by any external library - # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in - # from the hdf5 build. The order of the flags is intended to give precedence - # to the user's flags. - - $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link - - status=$? -fi - -exit $status diff --git a/c++/test/Makefile.am b/c++/test/Makefile.am deleted file mode 100644 index d513d954748..00000000000 --- a/c++/test/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5-C++ Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src, test, and c++/src directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/c++/src - -# These are our main targets. They should be listed in the order to be -# executed, generally most specific tests to least specific tests. -TEST_PROG=testhdf5 -check_PROGRAMS=$(TEST_PROG) - -# The tests depend on the hdf5 library, test library, and the c++ library -LDADD=$(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5) - -testhdf5_SOURCES=testhdf5.cpp dsets.cpp tattr.cpp tarray.cpp \ - tcompound.cpp tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp \ - tlinks.cpp tobject.cpp trefer.cpp ttypes.cpp tvlstr.cpp \ - titerate.cpp h5cpputil.cpp - -# Tell conclude.am that these are C++ tests. -CXX_API=yes - -# Some C++ compilers/linkers (PGI?) create a directory named "ii_files" that -# holds *.ii files, which are template entity instantiations. -# This entire directory should be cleaned. -mostlyclean-local: - @if test -d ii_files; then \ - $(RM) -rf ii_files; \ - fi -# Temporary files -CHECK_CLEANFILES+=tattr_multi.h5 tfattrs.h5 tattr_scalar.h5 tattr_compound.h5 \ - tattr_dtype.h5 tattr_basic.h5 - -include $(top_srcdir)/config/conclude.am diff --git a/config/BlankForm b/config/BlankForm deleted file mode 100644 index e297cc385bc..00000000000 --- a/config/BlankForm +++ /dev/null @@ -1,117 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. - - -#---------------------------------------------------------------------------- -# Compiler flags. The CPPFLAGS values should not include package debug -# flags like `-DH5G_DEBUG' since these are added with the -# `--enable-debug' switch of configure. -#---------------------------------------------------------------------------- - - -# Choosing a C Compiler -# --------------------- -# -# The user should be able to specify the compiler by setting the CC -# environment variable to the name of the compiler and any switches it -# requires for proper operation. If CC is unset then this script may -# set it. If CC is unset by time this script completes then configure -# will try `gcc' and `cc' in that order (perhaps some others too). -# -# Note: Code later in this file may depend on the value of $CC_BASENAME -# in order to distinguish between different compilers when -# deciding which compiler command-line switches to use. This -# variable is set based on the incoming value of $CC and is only -# used within this file. - -if test "X-" = "X-$CC"; then - CC="/some/default/compiler/named/foo -ansi" - CC_BASENAME=foo -fi - - -# C Compiler and Preprocessor Flags -# --------------------------------- -# -# Flags that end with `_CFLAGS' are always passed to the compiler. -# Flags that end with `_CPPFLAGS' are passed to the compiler when -# compiling but not when linking. -# -# DEBUG_CFLAGS Flags to pass to the compiler to create a -# DEBUG_CPPFLAGS library suitable for use with debugging -# tools. Usually this list will exclude -# optimization switches (like `-O') and include -# switches that turn on symbolic debugging -# support (like `-g'). -# -# PROD_CFLAGS Flags to pass to the compiler to create a -# PROD_CPPFLAGS production version of the library. These -# usually exclude symbolic debugging switches -# (like `-g') and include optimization switches -# (like `-O'). -# -# PROFILE_CFLAGS Flags to pass to the compiler to create a -# PROFILE_CPPFLAGS library suitable for performance testing (like -# `-pg'). This may or may not include debugging -# or production flags. -# -# H5_CFLAGS Flags can be added to this variable which -# might already be partially initialized. These -# flags will always be passed to the compiler -# and should include switches to turn on full -# warnings. HDF5 attempts to be ANSI and Posix -# compliant and employ good programming -# practices resulting in few if any -# warnings. -# -# Warning flags do not have to be added to H5_CFLAGS -# variable if the compiler is the GNU gcc -# compiler or a descendent of gcc such as EGCS or PGCC. -# -# AM_CFLAGS Flags added directly into this variable will -# be propagated to the compiler wrapper scripts (h5cc, -# h5c++, et cetera) in addition to being used to compile -# the library. -# -# These flags should be set according to the compiler being used. -# There are two ways to check the compiler. You can try using `-v' or -# `--version' to see if the compiler will print a version string. You -# can use the value of $CC_BASENAME which is the base name of the -# first word in $CC (note that the value of CC may have changed -# above). - -case $CC_BASENAME in - gcc) - H5_CFLAGS="$H5_CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; - - *) - H5_CFLAGS="$H5_CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; -esac diff --git a/config/Makefile.am.blank b/config/Makefile.am.blank deleted file mode 100644 index 18afb605b1c..00000000000 --- a/config/Makefile.am.blank +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -## Makefile.am template -## When automake is run, it scans configure.ac to find all Makefiles used by -## the build that come from Makefile.in files. If there are Makefile.am's -## in any of those locations, it parses the Makefile.am's to produce -## Makefile.in's, which configure uses to create Makefiles. -## -## Comments in the Makefile.am with two pound signs will be stripped by -## automake, comments with one pound sign will be passed through to the -## Makefile.in (and thence into the Makefile). Be warned, though, that -## automake tends to move things around in the Makefile.in, lines in the -## Makefile.in aren't always in the order they were in the Makefile.am. -## -## Almost all Makefile.am's in hdf5 include commence.am and conclude.am; these -## files are treated as if they were included textually in the Makefile.am when -## automake processes it. Commence.am also includes a (mostly) comprehensive -## list of make targets. -## - -include $(top_srcdir)/config/commence.am - -# Add include directories to the C preprocessor flags -AM_CPPFLAGS+=-I$(top_srcdir)/src - -# Our main targets, the library foo.la and the programs bar and baz -lib_LTLIBRARIES=foo.la -bin_PROGRAMS=bar baz - -# Helper programs and test programs -noinst_PROGRAMS=helper -check_PROGRAMS=test1 test2 -check_SCRIPTS=runtest - -# Remove files generated by tests during 'make check-clean' -CHECK_CLEANFILES=test1.h5 test2.h5 - -# library sources -foo_la_SOURCES= source1.c source2.c anothersource.c \ - sourceonanotherline.c - -# program sources -bar_SOURCES= bar.c barsource.c -test2_SOURCES= asdf.c jkl.c - -# Link with the main HDF5 library and foo.la when building other targets. -# It's important that libhdf5 comes last, since foo.la depends on it. -LDADD=foo.la $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/config/README.md b/config/README.md index 75e725ea4fe..a3a9a5e50c4 100644 --- a/config/README.md +++ b/config/README.md @@ -2,64 +2,24 @@ ## Intro -HDF5 can be configured using both the GNU Autotools and CMake. We try to keep -them in sync, but you can expect minor differences to crop up. Please create -a GitHub issue for any differences noted. Note that with the Autotools, we -do NOT check generated files into GitHub until release time, so you will -need to generate `configure`, `Makefile.in`(s), etc. via `autogen.sh` in the -project root if you want to build with that system. +HDF5 can be configured using CMake. Configuration information for the HDF5 library and tools is (unfortunately) spread across the repository. Basic library configuration will generally -be found in `configure.ac` (Autotools) and the root's `CMakeLists.txt` (CMake). -Each subdirectory of the project also has its own `Makefile.am` or CMake build +be found in the root's `CMakeLists.txt` for CMake. +Each subdirectory of the project also has its own CMake build and test files. This directory contains a few important things: -* Autotools OS- and compiler-specific configuration * CMake support files (in `cmake`) -* Warning files shared between the two systems (in `*-warnings` directories) +* Warning files in `*-warnings` directories * CMake toolchain files (in `toolchain`) * CMake sanitizer files (in `sanitizer`) -CMake will be documented elsewhere. This document focuses on the Autotools files -and the shared warning files. - -## Autotools - -An Autotools build will first use `$host_cpu`, `$host_os`, etc. to try to find a -suitable platform file in `config` to source and start checking compilers. The -code that does this is in `configure.ac` (search for `host_os`). For example, -MacOS will source the `apple` file and FreeBSD will source the `freebsd` file. - -If you dig into one of these files, the way that they check for compilers is -rather crude. Each OS script will simply source the various C, C++, and -Fortran compiler files that are listed inside. Each compiler file checks -the designated compiler's version output to see if there's a match, and if so, -the flag processing proceeds, and a variable like `cc_flags_set` will be set -at the end. - -In case it's not obvious, the C files end in `-flags`, C++ in `-cxxflags`, and -Fortran in `-fflags`. - -When a compiler matches, the script will attempt to set the `CFLAGS`, etc. -variables based on the platform and compiler's properties. There are typically -a large number of flag categories (e.g., `DEBUG_OPT_CFLAGS`) that are -conditionally appended to the canonical variables, like `AM_FLAGS`, by the -remainder of the `configure` script. - -For the major compilers, like Clang and gcc, there will be a section at the -end where we append version-specific flags, mainly for warnings. These are -imported via a function in the script (`load_gnu_arguments()` for gcc). See -below for more detail. - ## Warnings files -Keeping the Autotools and CMake build files in sync has always been a bit of a -struggle. One way that we help to ensure that the same flags are used in each -build system is to import the warnings settings from text files that are -maintained separately from the Autotools and CMake build files. We like to +We like to configure the compiler to be as crabby as possible so as to catch subtle bugs, so there are a LOT of warning flags for popular compilers like Clang and gcc. diff --git a/config/apple b/config/apple deleted file mode 100644 index 39ed454a11f..00000000000 --- a/config/apple +++ /dev/null @@ -1,201 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. -# -# See BlankForm in this directory for details. - -# The default compiler is `clang'. -# No support for OS older than darwin 10.X. -if test "X-" = "X-$CC"; then - case "$host_os" in - darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available. - CC=gcc - CC_BASENAME=gcc - ;; - *) - if test "X-$enable_parallel" = "X-yes"; then - # default to use mpicc which is the defacto MPI compiler name - CC=mpicc - CC_BASENAME=mpicc - else - CC=clang - CC_BASENAME=clang - fi - - # Production - PROD_CFLAGS="-O3" - PROD_CPPFLAGS= - - # Debug - DEBUG_CFLAGS="-g -O0" - DEBUG_CPPFLAGS= - - # Profile - # Use this for profiling with gprof - # Just "-g" for now. More later. - PROFILE_CFLAGS="-g" - PROFILE_CPPFLAGS= - ;; - esac -fi - -# Figure out C compiler flags -. $srcdir/config/gnu-flags -. $srcdir/config/clang-flags -. $srcdir/config/oneapi-flags -. $srcdir/config/intel-flags - -if test "X-" = "X-$FC"; then - case $CC_BASENAME in - gcc*) - FC=gfortran - FC_BASENAME=gfortran - ;; - icx*) - FC=ifx - FC_BASENAME=ifx - ;; - icc*) - FC=ifort - FC_BASENAME=ifort - ;; - mpicc*) - FC=mpif90 - FC_BASENAME=mpif90 - ;; - clang) - # clang has no fortran compiler. Use gfortran. - FC=gfortran - FC_BASENAME=gfortran - ;; - esac -fi - -# Figure out FORTRAN compiler flags -. $srcdir/config/gnu-fflags -. $srcdir/config/oneapi-fflags -. $srcdir/config/intel-fflags - - -# The default C++ compiler is `clang++'. -if test "X-" = "X-$CXX"; then - case $CC_BASENAME in - gcc) - CXX=g++ - CXX_BASENAME=g++ - ;; - icx) - CXX=icpx - CXX_BASENAME=icpx - ;; - icc) - CXX=icpc - CXX_BASENAME=icpc - ;; - mpicc*) - FC=mpif90 - FC_BASENAME=mpif90 - ;; - clang) - CXX=clang++ - CXX_BASENAME=clang++ - ;; - esac -fi - -# Figure out C++ compiler flags -. $srcdir/config/oneapi-cxxflags -. $srcdir/config/intel-cxxflags # Do this ahead of GNU to avoid icpc being detected as g++ -. $srcdir/config/gnu-cxxflags -. $srcdir/config/clang-cxxflags - -# compiler version strings -case $CC in - clang) - cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\ - grep 'Apple' | sed 's/(.*//'` - ;; - - *gcc*) - cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\ - grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` - ;; - - *icx*) - cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *icc*) - cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *) - echo "No match to get cc_version_info for $CC" - ;; -esac - -# Figure out Fortran compiler flags and version strings -case $FC in - *gfortran*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\ - grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` - ;; - - *ifx*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *ifc*|*ifort*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *) - echo "No match to get fc_version_info and flags for $FC" - ;; - -esac - -# get c++ version info -case $CXX in - clang++) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ - grep 'Apple' | sed 's/(.*//'` - ;; - - *g++*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ - grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` - ;; - - *icpx*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *icpc*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *) - echo "No match to get cxx_version_info for $CXX" - ;; -esac - diff --git a/config/cce-fflags b/config/cce-fflags deleted file mode 100644 index 813d4c75cea..00000000000 --- a/config/cce-fflags +++ /dev/null @@ -1,80 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Cray Compiling Environment (CCE) compiler or a derivative. It is careful not to do anything -# if the compiler is not Cray; otherwise `cc_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for cce -# unless a compiler version is already known -# -# cc_vendor: The compiler name: Cray -# cc_version: Version number: 8.3.0 -# -if test X = "X$f9x_flags_set"; then - f9x_version="`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 |grep 'Cray'`" - if test X != "X$f9x_version"; then - f9x_vendor=cce - f9x_version=`echo $f9x_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$FC' is Cray $f9x_vendor-$f9x_version" - fc_version_info=$f9x_version - fi -fi - -# Common Cray flags for various situations -if test "X-cce" = "X-$f9x_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. - - arch= - # Architecture-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # General - H5_FCFLAGS="${H5_FCFLAGS} -hnocaf" - - # Production - PROD_FCFLAGS= - - # Debug - DEBUG_FCFLAGS= - - # Symbols - # -Wl,-s to remove all symbols for smaller file - SYMBOLS_FCFLAGS="-g" - NO_SYMBOLS_FCFLAGS="-Wl,-s" - - # Profiling - # Use this for profiling with gprof - PROFILE_FCFLAGS="-p" - - # Optimization - HIGH_OPT_FCFLAGS="-O3" - DEBUG_OPT_FCFLAGS="-O0" - NO_OPT_FCFLAGS="-O0" - - # Flags are set - f9x_flags_set=yes -fi - -# Clear f9x info if no flags set -if test "X-$f9x_flags_set" = "X-"; then - f9x_vendor= - f9x_version= -fi diff --git a/config/cce-flags b/config/cce-flags deleted file mode 100644 index 0903dec920c..00000000000 --- a/config/cce-flags +++ /dev/null @@ -1,85 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Cray Compiling Environment (CCE) compiler or a derivative. It is careful not to do anything -# if the compiler is not Cray; otherwise `cc_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for cce -# unless a compiler version is already known -# -# cc_vendor: The compiler name: Cray -# cc_version: Version number: 8.3.0 -# -if test X = "X$cc_flags_set"; then - cc_version="`$CC $CFLAGS $H5_CFLAGS -V 2>&1 |grep 'Cray'`" - if test X != "X$cc_version"; then - cc_vendor=cce - cc_version=`echo $cc_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CC' is Cray $cc_vendor-$cc_version" - cc_version_info=$cc_version - cxx_version_info=$cc_version - fi -fi - -# Common Cray flags for various situations -if test "X-cce" = "X-$cc_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. - - arch= - # Architecture-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # General - # Default to C99 standard. - H5_CFLAGS="${H5_CFLAGS:--hc99 $arch}" - - # Production - PROD_CFLAGS= - - # Debug - # NDEBUG is handled explicitly in configure - DEBUG_CFLAGS= - - # Symbols - # -Wl,-s to remove all symbols for smaller file - SYMBOLS_CFLAGS="-g" - NO_SYMBOLS_CFLAGS="-Wl,-s" - - # Profiling - # Use this for profiling with gprof - PROFILE_CFLAGS="-p" - - # Optimization - HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS="-O0" - NO_OPT_CFLAGS="-O0" - - # Flags are set - cc_flags_set=yes - -fi - -# Clear cc info if no flags set -if test "X-$cc_flags_set" = "X-"; then - cc_vendor= - cc_version= -fi - diff --git a/config/clang-cxxflags b/config/clang-cxxflags deleted file mode 100644 index 2dcd0cbcf81..00000000000 --- a/config/clang-cxxflags +++ /dev/null @@ -1,188 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Clang clang++ compiler or a derivative. It is careful not to do anything -# if the compiler is not Clang; otherwise 'cxx_flags_set' is set to 'yes' -# - -# -# For now, do not promote any warnings to errors. -# -WARNINGS_AS_ERRORS_DFLT=no - -# -# This filter rewrites -Werror= as -W, in that way demoting warnings -# promoted to errors back to warnings, if WARNINGS_AS_ERRORS is no. -# -demote_errors() -{ - if [ ${WARNINGS_AS_ERRORS:-${WARNINGS_AS_ERRORS_DFLT}} = no ]; then - sed 's,-Werror=,-W,g' - else - cat - fi -} - -# -# Prepend `$srcdir/config/clang-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_clang_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg} | demote_errors - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for clang++ -# unless a compiler version is already known -# -# cxx_vendor: The compiler name: clang++ -# cxx_version: Version number: 6.0.0, 7.3.0, ... 10.0.1 -# -if test "X-" = "X-$cxx_flags_set"; then - # clang++ -v will return version number following "clang" on Linux machines, - # but on Macs the version number will follow "Apple LLVM version" - cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 |\ - grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" - if test -n "$cxx_version"; then - cxx_vendor="clang" - else - cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 |\ - grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`" - if test -n "$cxx_version"; then - cxx_vendor="Apple LLVM" - fi - fi - if test "X-" != "X-$cxx_version"; then - - # Get the compiler version numbers - cxx_vers_major=`echo $cxx_version | cut -f1 -d.` - cxx_vers_minor=`echo $cxx_version | cut -f2 -d.` - cxx_vers_patch=`echo $cxx_version | cut -f3 -d.` - test -n "$cxx_vers_major" || cxx_vers_major=0 - test -n "$cxx_vers_minor" || cxx_vers_minor=0 - test -n "$cxx_vers_patch" || cxx_vers_patch=0 - fi -fi - -if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then - echo "compiler '$CXX' is $cxx_vendor-$cxx_version" - ############################### - # Architecture-specific flags # - ############################### - - arch= - case "$host_os-$host_cpu" in - # FreeBSD sets the information from "uname -m" to the general machine - # architecture, not the specific CPU for the machine, so even our - # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD - # machine, use the "sysctl" command to get the CPU hardware model. - freebsd*-i386) - host_cpu_model=`sysctl -n hw.model` - case "$host_cpu_model" in - # Hmm.. this might not catch Celerons, but it won't hurt them either... - *Pro*|*II*|*III*|*IV*|*Athlon*) - # architecture-specific optimizations cause problems - # for some users who build binaries to be used on - # multiple architectures. - # arch="-march=i686" - ;; - esac - ;; - - *-i686) - # architecture-specific optimizations cause problems - # for some users who build binaries to be used on - # multiple architectures. - # arch="-march=i686" - ;; - esac - - H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++11" - - ############## - # Production # - ############## - - # NDEBUG is handled explicitly by the configure script - PROD_CXXFLAGS= - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - DEBUG_CXXFLAGS="-ftrapv -fno-common" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CXXFLAGS= - SYMBOLS_CXXFLAGS="-g -fno-omit-frame-pointer" - - ############# - # Profiling # - ############# - - PROFILE_CXXFLAGS="-pg" - - ################ - # Optimization # - ################ - - HIGH_OPT_CXXFLAGS="-O3" - DEBUG_OPT_CXXFLAGS="-g" - NO_OPT_CXXFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - H5_CXXFLAGS="$H5_CXXFLAGS $(load_clang_arguments general)" - H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_clang_arguments error-general)" - - ###################### - # Developer warnings # - ###################### - - NO_DEVELOPER_WARNING_CXXFLAGS=$(load_clang_arguments no-developer-general) - DEVELOPER_WARNING_CXXFLAGS=$(load_clang_arguments developer-general) - - ############################# - # Version-specific warnings # - ############################# - - - ################# - # Flags are set # - ################# - cxx_flags_set=yes -fi - -# Clear cxx info if no flags set -if test "X$cxx_flags_set" = "X"; then - cxx_vendor= - cxx_version= -fi - diff --git a/config/clang-fflags b/config/clang-fflags deleted file mode 100644 index 786c729ca91..00000000000 --- a/config/clang-fflags +++ /dev/null @@ -1,139 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Clang Fortran compiler (flang) or a derivative. It is careful not to do -# anything if the compiler is not Clang; otherwise 'cc_flags_set' is set -# to 'yes' -# - -# Get the compiler version in a way that works for clang -# unless a compiler version is already known -# -# cc_vendor: The compiler name: flang -# cc_version: Version number: 6.0.0, 7.3.0, ... 10.0.1 -# -if test "X-" = "X-$f9x_flags_set"; then - # flang -v will return version number following "clang" - f9x_version="`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 |\ - grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" - if test -n "$f9x_version"; then - f9x_vendor="flang" - fi - if test "X-" != "X-$f9x_version"; then - - # Get the compiler version numbers - f9x_vers_major=`echo $f9x_version | cut -f1 -d.` - f9x_vers_minor=`echo $f9x_version | cut -f2 -d.` - f9x_vers_patch=`echo $f9x_version | cut -f3 -d.` - test -n "$f9x_vers_major" || f9x_vers_major=0 - test -n "$f9x_vers_minor" || f9x_vers_minor=0 - test -n "$f9x_vers_patch" || f9x_vers_patch=0 - fi -fi - -if test "X-flang" = "X-$f9x_vendor"; then - - echo "compiler '$FC' is $f9x_vendor-$f9x_version" - - FC_BASENAME=flang - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - - ############################### - # Architecture-specific flags # - ############################### - - arch= - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - H5_FCFLAGS="$H5_FCFLAGS $arch" - - ############## - # Production # - ############## - - PROD_FCFLAGS= - - ######### - # Debug # - ######### - - DEBUG_FCFLAGS= - - ######################## - # Enhanced Diagnostics # - ######################## - - NO_DIAGS_FCFLAGS= - DIAGS_FCFLAGS= - - ########### - # Symbols # - ########### - - NO_SYMBOLS_FCFLAGS= - SYMBOLS_FCFLAGS= - - ############# - # Profiling # - ############# - - PROFILE_FCFLAGS= - - ################ - # Optimization # - ################ - - HIGH_OPT_FCFLAGS="-O3" - NO_OPT_FCFLAGS="-O0" - DEBUG_OPT_FCFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - # We don't use OpenMP, so don't link to it - H5_FCFLAGS="$H5_FCFLAGS -nomp" - - ###################### - # Developer warnings # - ###################### - - NO_DEVELOPER_WARNING_FCFLAGS= - DEVELOPER_WARNING_FCFLAGS= - - ############################# - # Version-specific warnings # - ############################# - - ################# - # Flags are set # - ################# - f9x_flags_set=yes -fi - -# Clear f9x info if no flags set -if test "X$f9x_flags_set" = "X"; then - f9x_vendor= - f9x_version= -fi diff --git a/config/clang-flags b/config/clang-flags deleted file mode 100644 index 844d6afa14e..00000000000 --- a/config/clang-flags +++ /dev/null @@ -1,209 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Clang compiler or a derivative. It is careful not to do anything -# if the compiler is not Clang; otherwise 'cc_flags_set' is set to 'yes' -# - -# -# For now, do not promote any warnings to errors. -# -WARNINGS_AS_ERRORS_DFLT=no - -# -# This filter rewrites -Werror= as -W, in that way demoting warnings -# promoted to errors back to warnings, if WARNINGS_AS_ERRORS is no. -# -demote_errors() -{ - if [ ${WARNINGS_AS_ERRORS:-${WARNINGS_AS_ERRORS_DFLT}} = no ]; then - sed 's,-Werror=,-W,g' - else - cat - fi -} - -# -# Prepend `$srcdir/config/clang-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_clang_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg} | demote_errors - done) - IFS=' ' echo "$*" -} -# Get the compiler version in a way that works for clang -# unless a compiler version is already known -# -# cc_vendor: The compiler name: clang -# cc_version: Version number: 6.0.0, 7.3.0, ... 10.0.1 -# -if test "X-" = "X-$cc_flags_set"; then - # clang -v will return version number following "clang" on Linux machines, - # but on Xcode the version number will follow "Apple LLVM version" - # Note that the Xcode reported LLVM version doesn't match the canonical - # LLVM version, so you'll need to do different version checks for - # Xcode. - cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ - grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" - if test -n "$cc_version"; then - cc_vendor="clang" - else - cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ - grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`" - if test -n "$cc_version"; then - cc_vendor="Apple LLVM" - fi - fi - if test "X-" != "X-$cc_version"; then - - # Get the compiler version numbers - cc_vers_major=`echo $cc_version | cut -f1 -d.` - cc_vers_minor=`echo $cc_version | cut -f2 -d.` - cc_vers_patch=`echo $cc_version | cut -f3 -d.` - test -n "$cc_vers_major" || cc_vers_major=0 - test -n "$cc_vers_minor" || cc_vers_minor=0 - test -n "$cc_vers_patch" || cc_vers_patch=0 - fi -fi - -if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then - echo "compiler '$CC' is $cc_vendor-$cc_version" - ############################### - # Architecture-specific flags # - ############################### - - arch= - case "$host_os-$host_cpu" in - # FreeBSD sets the information from "uname -m" to the general machine - # architecture, not the specific CPU for the machine, so even our - # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD - # machine, use the "sysctl" command to get the CPU hardware model. - freebsd*-i386) - host_cpu_model=`sysctl -n hw.model` - case "$host_cpu_model" in - # Hmm.. this might not catch Celerons, but it won't hurt them either... - *Pro*|*II*|*III*|*IV*|*Athlon*) - # architecture-specific optimizations cause problems - # for some users who build binaries to be used on - # multiple architectures. - # arch="-march=i686" - ;; - esac - ;; - - *-i686) - # architecture-specific optimizations cause problems - # for some users who build binaries to be used on - # multiple architectures. - # arch="-march=i686" - ;; - esac - - case "$host_os-$host_cpu" in - # cygwin needs the "-std=c99" flag removed, so make - # a specific case for Cygwin without the flag and a default - # case to add the flag everywhere else - cygwin-*) - ;; - - *) - H5_CFLAGS="$H5_CFLAGS -std=c99" - ;; - esac - - H5_CFLAGS="$H5_CFLAGS $arch" - - ############## - # Production # - ############## - - # NDEBUG is handled explicitly by the configure script - PROD_CFLAGS= - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - DEBUG_CFLAGS="-ftrapv -fno-common" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CFLAGS= - SYMBOLS_CFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CFLAGS="-pg" - - ################ - # Optimization # - ################ - - HIGH_OPT_CFLAGS="-O3" - NO_OPT_CFLAGS="-O0" - - # -Og is only understood by clang 4+ and Xcode 9+ - # Otherwise use -O1 (which is what -Og usually equates to) - if test "X-clang" = "X-$cc_vendor" -a $cc_vers_major -ge 4 -o "X-Apple LLVM" = "X-$cc_vendor" -a $cc_vers_major -ge 9; then - DEBUG_OPT_CFLAGS="-Og" - else - DEBUG_OPT_CFLAGS="-O1" - fi - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)" - H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)" - - ###################### - # Developer warnings # - ###################### - - NO_DEVELOPER_WARNING_CFLAGS=$(load_clang_arguments no-developer-general) - DEVELOPER_WARNING_CFLAGS=$(load_clang_arguments developer-general) - - ############################# - # Version-specific warnings # - ############################# - - - ################# - # Flags are set # - ################# - cc_flags_set=yes -fi - -# Clear cc info if no flags set -if test "X$cc_flags_set" = "X"; then - cc_vendor= - cc_version= -fi - diff --git a/config/commence.am b/config/commence.am deleted file mode 100644 index 11db41f133e..00000000000 --- a/config/commence.am +++ /dev/null @@ -1,104 +0,0 @@ -## config/commence.am -## (Use double hashes for copyright notice so that automake treats it as -## comments and does not pass it to Makefile.in) -## Copyright by The HDF Group. -## All rights reserved. -## -## This file is part of HDF5. The full HDF5 copyright notice, including -## terms governing use, modification, and redistribution, is contained in -## the COPYING file, which can be found at the root of the source code -## distribution tree, or in https://www.hdfgroup.org/licenses. -## If you do not have access to either file, you may request a copy from -## help@hdfgroup.org. - - -## Textually included in the beginning of every HDF5 Makefile.am -## Contains definitions, etc. used across multiple Makefiles. - -# Shell commands used in Makefiles -RM=rm -f -CP=cp - -# Some machines need a command to run executables; this is that command -# so that our tests will run. -# We use RUNEXEC instead of RUNSERIAL directly because it may be that -# some tests need to be run with a different command. Older versions -# of the makefiles used the command -# $(LIBTOOL) --mode=execute -# in some directories, for instance. -RUNEXEC=$(RUNSERIAL) - -# Libraries to link to while building -LIBHDF5=$(top_builddir)/src/libhdf5.la -LIBH5TEST=$(top_builddir)/test/libh5test.la -LIBH5TESTPAR=$(top_builddir)/testpar/libh5testpar.la -LIBH5F=$(top_builddir)/fortran/src/libhdf5_fortran.la -LIBH5FTEST=$(top_builddir)/fortran/test/libh5test_fortran.la -LIBH5CPP=$(top_builddir)/c++/src/libhdf5_cpp.la -LIBH5JNI=$(top_builddir)/java/src/jni/libhdf5_java.la -LIBH5TOOLS=$(top_builddir)/tools/lib/libh5tools.la -LIBH5_HL=$(top_builddir)/hl/src/libhdf5_hl.la -LIBH5F_HL=$(top_builddir)/hl/fortran/src/libhdf5_hl_fortran.la -LIBH5CPP_HL=$(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la - -# Install directories that automake doesn't know about -docdir = $(exec_prefix)/doc - -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by GNU at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. - -# Scripts used to build examples -# If only shared libraries have been installed, have h5cc build examples with -# shared libraries instead of static libraries -H5CC=${DESTDIR}$(bindir)/h5cc -H5CC_PP=${DESTDIR}$(bindir)/h5pcc -H5FC=${DESTDIR}$(bindir)/h5fc -H5FC_PP=${DESTDIR}$(bindir)/h5pfc -H5CPP=${DESTDIR}$(bindir)/h5c++ - - -# H5_CFLAGS holds flags that should be used when building hdf5, -# but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles -# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. -# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. - -AM_CFLAGS=@AM_CFLAGS@ @H5_CFLAGS@ -AM_FCFLAGS=@AM_FCFLAGS@ @H5_FCFLAGS@ -AM_CXXFLAGS=@AM_CXXFLAGS@ @H5_CXXFLAGS@ -AM_CPPFLAGS=@AM_CPPFLAGS@ @H5_CPPFLAGS@ -AM_LDFLAGS=@AM_LDFLAGS@ @H5_LDFLAGS@ - -ACLOCAL_AMFLAGS="-I m4" - -# The trace script; this is used on source files from the C library to -# insert tracing macros. -TRACE=perl $(top_srcdir)/bin/trace - -# Make sure that these variables are exported to the Makefiles -F9XMODEXT=@F9XMODEXT@ -F9XMODFLAG=@F9XMODFLAG@ - -# .chkexe files are used to mark tests that have run successfully. -# .chklog files are output from those tests. -CHECK_CLEANFILES=*.chkexe *.chklog - -# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. -# This tells the Makefiles that these targets are not files to be built but -# commands that should be executed even if a file with the same name already -# exists. -.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - check-passthrough-vol install-doc lib progs tests uninstall-doc \ - _exec_check-s _test help trace doxygen - -help: - @$(top_srcdir)/bin/makehelp - diff --git a/config/conclude.am b/config/conclude.am deleted file mode 100644 index 9b73ae77792..00000000000 --- a/config/conclude.am +++ /dev/null @@ -1,352 +0,0 @@ -## config/conclude.am -## (Use double hashes for copyright notice so that automake treats it as -## comments and does not pass it to Makefile.in) -## Copyright by The HDF Group. -## All rights reserved. -## -## This file is part of HDF5. The full HDF5 copyright notice, including -## terms governing use, modification, and redistribution, is contained in -## the COPYING file, which can be found at the root of the source code -## distribution tree, or in https://www.hdfgroup.org/licenses. -## If you do not have access to either file, you may request a copy from -## help@hdfgroup.org. - - -## Textually included at the end of most HDF5 Makefiles.am. -## Contains build rules. - -# Automake needs to be taught how to build lib, progs and tests targets. -# These will be filled in automatically for the most part (e.g., -# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and -# EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ - $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ - $(EXTRA_PROG) -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -TESTS = $(TEST_PROG) $(TEST_SCRIPT) $(EXTRA_TEST) - -TEST_EXTENSIONS = .sh -SH_LOG_COMPILER = $(SHELL) -AM_SH_LOG_FLAGS = -REALTIMEOUTPUT = $(realtimeOutput) - -# lib/progs/tests targets recurse into subdirectories. build-* targets -# build files in this directory. -build-lib: $(LIB) -build-progs: $(LIB) $(PROGS) -build-tests: $(LIB) $(PROGS) $(chk_TESTS) - -# General rule for recursive building targets. -# BUILT_SOURCES contain targets that need to be built before anything else -# in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# General rule for recursive cleaning targets. Like the rule above, -# but doesn't require building BUILT_SOURCES. -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Tell Automake to build tests when the user types `make all' (this is -# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since -# Automake won't build them automatically, either. -all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) - -# make install-doc doesn't do anything outside of doc directory, but -# Makefiles should recognize it. -# UPDATE: docs no longer reside in this build tree, so this target -# is deprecated. -install-doc uninstall-doc: - @echo "Nothing to be done." - -# clean up files generated by tests so they can be re-run. -build-check-clean: - $(RM) -rf $(CHECK_CLEANFILES) - -# run check-clean whenever mostlyclean is run -mostlyclean-local: build-check-clean - -# check-install is just a synonym for installcheck -check-install: installcheck - -# Run each test in order, passing $(TEST_FLAGS) to the program. -# Since tests are done in a shell loop, "make -i" does apply inside it. -# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. -# The timestamps give a rough idea how much time the tests use. -# -# Note that targets in chk_TESTS (defined above) will be built when the user -# types 'make tests' or 'make check', but only programs in TEST_PROG, -# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. -check-TESTS: test - -test _test: - @$(MAKE) build-check-s - @$(MAKE) build-check-p - -# Actual execution of check-s. -build-check-s: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -TEST_PROG_CHKEXE=$(TEST_PROG:=.chkexe_) -TEST_PROG_PARA_CHKEXE=$(TEST_PROG_PARA:=.chkexe_) -TEST_SCRIPT_CHKSH=$(TEST_SCRIPT:=.chkexe_) -TEST_SCRIPT_PARA_CHKSH=$(TEST_SCRIPT_PARA:=.chkexe_) - -_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) - -# The dummy.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ - tname=$(@:.chkexe_=)$(EXEEXT);\ - log=$(@:.chkexe_=.chklog); \ - echo "============================"; \ - if [ $(@:.chkexe_=.chkexe) -nt $${tname} ]; then \ - echo "No need to test $${tname} again."; \ - else \ - if test -n "$(REALTIMEOUTPUT)"; then \ - echo "============================" | tee $${log}; \ - else \ - echo "============================" > $${log}; \ - fi; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - if test -n "$(REALTIMEOUTPUT)"; then \ - echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \ - else \ - echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \ - fi; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - if test -n "$(REALTIMEOUTPUT)"; then \ - echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\ - else \ - echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\ - fi; \ - else \ - echo "Testing: $${tname} $(TEST_FLAGS)"; \ - if test -n "$(REALTIMEOUTPUT)"; then \ - echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \ - else \ - echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \ - fi; \ - fi; \ - if test -n "$(REALTIMEOUTPUT)"; then \ - if test -n "$(HDF5_VOL_CONNECTOR)"; then \ - echo "VOL connector: $(HDF5_VOL_CONNECTOR)" | tee -a $${log}; \ - fi; \ - if test -n "$(HDF5_TEST_DRIVER)"; then \ - echo "Virtual file driver (VFD): $(HDF5_TEST_DRIVER)" | tee -a $${log}; \ - fi; \ - else \ - if test -n "$(HDF5_VOL_CONNECTOR)"; then \ - echo "VOL connector: $(HDF5_VOL_CONNECTOR)" >> $${log}; \ - fi; \ - if test -n "$(HDF5_TEST_DRIVER)"; then \ - echo "Virtual file driver (VFD): $(HDF5_TEST_DRIVER)" >> $${log}; \ - fi; \ - fi; \ - if test -n "$(REALTIMEOUTPUT)"; then \ - echo "============================" | tee -a $${log}; \ - else \ - echo "============================" >> $${log}; \ - fi; \ - if test -n "$(REALTIMEOUTPUT)"; then \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - else \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - fi; \ - echo "" >> $${log}; \ - if test -n "$(REALTIMEOUTPUT)"; then \ - echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \ - echo "============================" | tee -a $${log}; \ - else \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - fi; \ - if test -z "$(REALTIMEOUTPUT)"; then \ - cat $${log}; \ - fi; \ - fi; \ - fi - -# The dummysh.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ - cmd=$(@:.chkexe_=);\ - tname=`basename $$cmd`;\ - chkname=`basename $(@:.chkexe_=.chkexe)`;\ - log=`basename $(@:.chkexe_=.chklog)`; \ - echo "============================"; \ - newer=true; \ - for i in $${cmd} $(SCRIPT_DEPEND); do \ - if [ $${chkname} -ot $$i ]; then \ - newer=false; \ - break; \ - fi; \ - done; \ - if $${newer}; then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - else \ - echo "Testing $${tname} $(TEST_FLAGS)"; \ - echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ - srcdir="$(srcdir)" \ - $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $${chkname} || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - echo "============================"; \ - fi - -# Actual execution of check-p. -build-check-p: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @if test -n "$(TEST_PROG_PARA)"; then \ - echo "**** Hint ****"; \ - echo "Parallel test files reside in the current directory" \ - "by default."; \ - echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \ - echo " HDF5_PARAPREFIX=/PFS/user/me"; \ - echo " export HDF5_PARAPREFIX"; \ - echo " make check"; \ - echo "**** end of Hint ****"; \ - fi - @for test in $(TEST_PROG_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNEXEC="$(RUNPARALLEL)" || exit 1; \ - fi; \ - done - @for test in $(TEST_SCRIPT_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ - fi; \ - done - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -VFD_LIST = sec2 stdio core core_paged split multi family - -# Splitter VFD currently can't be tested with the h5_fileaccess() -# approach due to it trying to lock the same W/O file when two -# files are created/opened with the same FAPL that has the VFD -# set on it. When tested with the environment variable and a -# default FAPL, the VFD appends "_wo" to the filename when the -# W/O path isn't specified, which works for all the tests. -# VFD_LIST += splitter - -# log VFD currently has file space allocation bugs -# VFD_LIST += log - -# Not currently tested with VFD tests -# VFD_LIST += onion - -if DIRECT_VFD_CONDITIONAL - VFD_LIST += direct -endif -if BUILD_PARALLEL_CONDITIONAL - # MPI I/O VFD is currently incompatible with too many tests in the VFD test set - # VFD_LIST += mpio -endif -if MIRROR_VFD_CONDITIONAL - # Mirror VFD needs network configuration, etc. and isn't easy to set - # reasonable defaults for that info. - # VFD_LIST += mirror -endif -if ROS3_VFD_CONDITIONAL - # This would require a custom test suite - # VFD_LIST += ros3 -endif -if HDFS_VFD_CONDITIONAL - # This would require a custom test suite - # VFD_LIST += hdfs -endif -if SUBFILING_VFD_CONDITIONAL - # Subfiling has a few VFD test failures to be resolved - # VFD_LIST += subfiling -endif - -# Run test with different Virtual File Driver -check-vfd: $(LIB) $(PROGS) $(chk_TESTS) - @for vfd in $(VFD_LIST) dummy; do \ - if test $$vfd != dummy; then \ - echo "============================"; \ - echo "Testing Virtual File Driver $$vfd"; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_TEST_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done - -# Test with just the native connector, with a single pass-through connector -# and with a doubly-stacked pass-through. -# -# native = 0 -# pass-through = 1 -VOL_LIST = native "pass_through under_vol=0;under_info={}" \ - "pass_through under_vol=1;under_info={under_vol=0;under_info={}}" - -# Run test with different passthrough Virtual Object Layer Connector -# NOTE: Will only succeed with passthrough VOL connectors that use -# the native VOL connector as the terminal connector. -check-passthrough-vol: $(LIB) $(PROGS) $(chk_TESTS) - @for vol in $(VOL_LIST) dummy; do \ - if test "$$vol" != dummy; then \ - echo "============================"; \ - echo "Testing VOL Connector: \"$$vol\""; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_VOL_CONNECTOR="$$vol" $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done diff --git a/config/conclude_fc.am b/config/conclude_fc.am deleted file mode 100644 index d26016a03c7..00000000000 --- a/config/conclude_fc.am +++ /dev/null @@ -1,32 +0,0 @@ -## config/conclude_fc.am -## (Use double hashes for copyright notice so that automake treats it as -## comments and does not pass it to Makefile.in) -## Copyright by The HDF Group. -## All rights reserved. -## -## This file is part of HDF5. The full HDF5 copyright notice, including -## terms governing use, modification, and redistribution, is contained in -## the COPYING file, which can be found at the root of the source code -## distribution tree, or in https://www.hdfgroup.org/licenses. -## If you do not have access to either file, you may request a copy from -## help@hdfgroup.org. - - -## Textually included at the end of the Fortran HDF5 Makefiles.am. - -# Makefile.am include fragment with Fortran helper rules and macros. - -# AM_FCCPPFLAGS, FCCPPFLAGS are currently not used. - -PPFCCOMPILE = $(FC) $(FCDEFS) $(DEFAULT_INCLUDES) $(FCINCLUDES) $(AM_FCCPPFLAGS) $(FCCPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -LTPPFCCOMPILE = $(LIBTOOL) --silent --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(PPFCCOMPILE) - -# Treat all .f90 and .F90 files as preprocessed Fortran. -.f90.o: - @if $(AM_V_P); then set -x; else echo " PPFC $@"; fi; \ - $(PPFCCOMPILE) -c -o $@ $< -.F90.o: - @if $(AM_V_P); then set -x; else echo " PPFC $@"; fi; \ - $(PPFCCOMPILE) -c -o $@ $< - -include $(top_srcdir)/config/conclude.am diff --git a/config/cygwin b/config/cygwin deleted file mode 100644 index b028e702670..00000000000 --- a/config/cygwin +++ /dev/null @@ -1,21 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. -# -# See BlankForm in this directory for details. - -# Use the linux-gnu file -. $srcdir/config/linux-gnu diff --git a/config/examples.am b/config/examples.am deleted file mode 100644 index 09a9a244c9b..00000000000 --- a/config/examples.am +++ /dev/null @@ -1,119 +0,0 @@ -## config/examples.am -## (Use double hashes for copyright notice so that automake treats it as -## comments and does not pass it to Makefile.in) -## Copyright by The HDF Group. -## All rights reserved. -## -## This file is part of HDF5. The full HDF5 copyright notice, including -## terms governing use, modification, and redistribution, is contained in -## the COPYING file, which can be found at the root of the source code -## distribution tree, or in https://www.hdfgroup.org/licenses. -## If you do not have access to either file, you may request a copy from -## help@hdfgroup.org. - -## Textually included near the end of HDF5 Makefiles in example directories. -## Contains boilerplate for building, installing, and cleaning example -## programs. - -# We can't tell automake about example programs, because they need to be -# built using h5cc (or h5fc, etc.) instead of the standard compilers. -# This creates some extra work for us. - -## The Makefile.am that includes this boilerplate needs to define the -## following: -## -## TEST_PROG and TEST_PROG_PARA -## We assume that all test programs in this directory are examples. -## -## INSTALL_FILES -## The source files that the examples use which should be installed. -## INSTALL_SCRIPT_FILES -## INSTALL_TOP_SCRIPT_FILES -## INSTALL_TOP_FILES -## -## EXAMPLEDIR -## The directory into which examples should be installed. -## -## Build rules for $(EXTRA_PROG). -## Dependencies for example programs. -## Automake will supply neither of these. -## - -# Assume that all tests in this directory are examples, and tell -# conclude.am when to build them. -EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) - -# We need to tell automake what to clean -MOSTLYCLEANFILES=*.raw *.meta *.o -CHECK_CLEANFILES+=*.h5 -CLEANFILES=$(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) - -# How to create EXAMPLEDIR if it doesn't already exist -$(EXAMPLEDIR): - mkdir -p -m 755 $@ -$(EXAMPLETOPDIR): - mkdir -p -m 755 $@ - -# Install and uninstall rules. We install the source files, not the -# example programs themselves. -install-data-local: - @$(MAKE) $(AM_MAKEFLAGS) install-examples -uninstall-local: - @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples - -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) - @for f in X $(INSTALL_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \ - chmod a-x $(EXAMPLEDIR)/$$f; \ - fi; \ - done - @for f in X $(INSTALL_SCRIPT_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $$f $(EXAMPLEDIR)/. || exit 1);\ - fi; \ - done - @for f in X $(INSTALL_TOP_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \ - chmod a-x $(EXAMPLETOPDIR)/$$f;\ - fi; \ - done - @for f in X $(INSTALL_TOP_SCRIPT_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \ - fi; \ - done - -uninstall-examples: - @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ - set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi - @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ - set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi - @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ - set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi - @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ - set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi - -installcheck-local: - @if test "$(STATIC_SHARED)" = "static, shared"; then \ - H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - $(MAKE) $(AM_MAKEFLAGS) clean; \ - H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ - H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) check; \ - fi - @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ - echo "============================"; \ - echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ - echo "============================"; \ - (cd $(EXAMPLEDIR); \ - /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ - fi - diff --git a/config/freebsd b/config/freebsd deleted file mode 100644 index 70cf44a07ac..00000000000 --- a/config/freebsd +++ /dev/null @@ -1,85 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. -# -# See BlankForm in this directory for details. - -# The default compiler is 'cc' -if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc -fi - -# Figure out clang C compiler flags -. $srcdir/config/clang-flags - -# Figure out GNU C compiler flags -. $srcdir/config/gnu-flags - -# Figure out Intel oneAPI C compiler flags -. $srcdir/config/oneapi-flags - -# Figure out Intel classic C compiler flags -. $srcdir/config/intel-flags - -# The default Fortran 90 compiler -# No default Fortran compiler for clang. flang exists on -# FreeBSD as a port, but this is tied to an ancient LLVM -# and lacks Fortran 2003 features which causes configure -# to fail. -if test "X-" = "X-$FC"; then - case $CC_BASENAME in - gcc*|pgcc*) - FC=gfortran - FC_BASENAME=gfortran - ;; - icx*) - FC=ifx - FC_BASENAME=ifx - ;; - icc*) - FC=ifort - FC_BASENAME=ifort - ;; - mpicc*) - FC=mpif90 - FC_BASENAME=mpif90 - ;; - esac -fi - -# Figure out FORTRAN compiler flags -. $srcdir/config/gnu-fflags - -# Figure out Intel oneAPI FC compiler flags -. $srcdir/config/oneapi-fflags - -# Figure out Intel classic FC compiler flags -. $srcdir/config/intel-fflags - -# The default C++ compiler - -# The default compiler is 'c++'. -if test -z "$CXX"; then - CXX=c++ - CXX_BASENAME=c++ -fi - -# Figure out Clang CXX compiler flags -. $srcdir/config/clang-cxxflags - -# Figure out GNU CXX compiler flags -. $srcdir/config/gnu-cxxflags diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags deleted file mode 100644 index f409ab416c5..00000000000 --- a/config/gnu-cxxflags +++ /dev/null @@ -1,285 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# GNU g++ compiler or a derivative. It is careful not to do anything -# if the compiler is not GNU; otherwise `cxx_flags_set' is set to `yes' -# - -# -# For now, do not promote any warnings to errors. -# -WARNINGS_AS_ERRORS_DFLT=no - -# -# This filter rewrites -Werror= as -W, in that way demoting warnings -# promoted to errors back to warnings, if WARNINGS_AS_ERRORS is no. -# -demote_errors() -{ - if [ ${WARNINGS_AS_ERRORS:-${WARNINGS_AS_ERRORS_DFLT}} = no ]; then - sed 's,-Werror=,-W,g' - else - cat - fi -} - -# -# Prepend `$srcdir/config/gnu-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_gnu_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg} | demote_errors - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for g++ -# unless a compiler version is already known -# -# cxx_vendor: The compiler name: g++ -# cxx_version: Version number: 2.91.60, 2.7.2.1 -# -if test "X-" = "X-$cxx_flags_set"; then - # PathScale compiler spits out gcc version string too. Need to - # filter it out. - # icc beginning with version 12 includes a "gcc version compatibility" - # string, causing the gcc H5_CXXFLAGS to be erroneously added. The line - # "grep -v 'icc version'" causes the discarding of any output - # containing 'icc version'. The cxx_version for icc is correctly determined - # and flags added in the intel-flags script. - cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep -v 'PathScale' |\ - grep -v '^icc.*version' |\ - grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`" - cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*\).*/\1/'` - cxx_version=`echo $cxx_version |sed 's/[-a-z]//g'` - if test X = "X$cxx_vendor" -a X != "X$cxx_version"; then - cxx_vendor=g++ - fi - if test "-" != "$cxx_vendor-$cxx_version"; then - echo "compiler '$CXX' is GNU $cxx_vendor-$cxx_version" - fi - - # Get the compiler version numbers - cxx_vers_major=`echo $cxx_version | cut -f1 -d.` - cxx_vers_minor=`echo $cxx_version | cut -f2 -d.` - cxx_vers_patch=`echo $cxx_version | cut -f3 -d.` - test -n "$cxx_vers_major" || cxx_vers_major=0 - test -n "$cxx_vers_minor" || cxx_vers_minor=0 - test -n "$cxx_vers_patch" || cxx_vers_patch=0 - cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch` -fi - -if test "X-g++" = "X-$cxx_vendor"; then - - ############################### - # Architecture-specific flags # - ############################### - - arch= - case "$host_os-$host_cpu" in - # FreeBSD sets the information from "uname -m" to the general machine - # architecture, not the specific CPU for the machine, so even our - # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD - # machine, use the "sysctl" command to get the CPU hardware model. - freebsd*-i386) - host_cpu_model=`sysctl -n hw.model` - case "$host_cpu_model" in - # Hmm.. this might not catch Celerons, but it won't hurt them either... - *Pro*|*II*|*III*|*IV*|*Athlon*) - # architecture-specific optimizations cause problems - # for some users who build binaries to be used on - # multiple architectures. - # arch="-march=i686" - ;; - esac - ;; - - *-i686) - # architecture-specific optimizations cause problems - # for some users who build binaries to be used on - # multiple architectures. - # arch="-march=i686" - ;; - esac - - # C++-specific - H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++11" - - ############## - # Production # - ############## - - # NDEBUG is handled explicitly by the configure script - if test $cxx_vers_major -le 4; then - PROD_CXXFLAGS= - else - PROD_CXXFLAGS="-fstdarg-opt" - fi - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - if test $cxx_vers_major -le 4; then - DEBUG_CXXFLAGS= - else - DEBUG_CXXFLAGS="-ftrapv -fno-common" - fi - - ######################## - # Enhanced Diagnostics # - ######################## - - if test $cxx_vers_major -ge 10; then - NO_DIAGS_CXXFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" - fi - DIAGS_CXXFLAGS= - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CXXFLAGS="-s" - SYMBOLS_CXXFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CXXFLAGS="-pg" - - ################ - # Optimization # - ################ - - if test $cxx_vers_major -le 4; then - HIGH_OPT_CXXFLAGS="-O3" - DEBUG_OPT_CXXFLAGS= - else - HIGH_OPT_CXXFLAGS="-O3" - DEBUG_OPT_CXXFLAGS="-Og" - fi - NO_OPT_CXXFLAGS="-O0" - - ############ - # Warnings # - ############ - - - ########### - # General # - ########### - - # Add various general warning flags in gnu-warnings for gcc versions 4.8 and later. - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8 -o $cxx_vers_major -ge 5; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-general)" - H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-general)" - - ###################### - # Developer warnings # - ###################### - - # Use the C warnings as CXX warnings are the same - NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general) - DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general) - - fi - - ####################### - # gcc 4 special cases # - ####################### - - # GCC 4.8 through the end of GCC 4 series - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then - # Use the C warnings as CXX warnings are the same - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8-4.last)" - fi - - ############################# - # Version-specific warnings # - ############################# - - # gcc >= 4.8 - if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.8)" - # Use the C warnings as CXX warnings are the same - DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments cxx-developer-4.8)" - NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-cxx-developer-4.8)" - fi - - # gcc >= 4.9 - if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 9; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.9)" - fi - - # gcc >= 5 - if test $cxx_vers_major -ge 5; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-5)" - H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-5)" - fi - - # gcc >= 6 - if test $cxx_vers_major -ge 6; then - # Use the C warnings as CXX warnings are the same - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 6)" - fi - - # gcc >= 7 - if test $cxx_vers_major -ge 7; then - # Use the C warnings as CXX warnings are the same - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 7)" - DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-7)" - fi - - # gcc 8 - if test $cxx_vers_major -ge 8; then - # Use the C warnings as CXX warnings are the same - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 8)" - #H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments error-8)" - # Use the C warnings as CXX warnings are the same - DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-8)" - NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-8)" - fi - - # gcc 9 - if test $cxx_vers_major -ge 9; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-9)" - fi - - # gcc >= 9.3 - # no cxx warnings, do NOT use C warnings - - # gcc >= 10 - if test $cxx_vers_major -ge 10; then - # Use the C warnings as CXX warnings are the same - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-10)" - fi - - ################# - # Flags are set # - ################# - cxx_flags_set=yes -fi - -# Clear cxx info if no flags set -if test "X$cxx_flags_set" = "X"; then - cxx_vendor= - cxx_version= -fi diff --git a/config/gnu-fflags b/config/gnu-fflags deleted file mode 100644 index b3385ec8836..00000000000 --- a/config/gnu-fflags +++ /dev/null @@ -1,198 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# GNU g95/gfortran compiler or a derivative. It is careful not to do anything -# if the compiler is not GNU; otherwise `f9x_flags_set' is set to `yes' -# - -# -# Prepend `$srcdir/config/gnu-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_gnu_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg} - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for GNU fortran -# gfortran unless a compiler version is already known -# -# f9x_vendor: The compiler name: gfortran -# f9x_version: Version number: 5.0-2, 5.2-2 -# -if test X = "X$f9x_flags_set"; then - f9x_version="`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 |grep 'gcc version' |\ - sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`" - if test X != "X$f9x_version"; then - f9x_vendor=`echo $f9x_version |sed 's/\([a-z]*\).*/\1/'` - f9x_version=`echo $f9x_version |sed 's/[-a-z]//g'` - if test X = "X$f9x_vendor" -a X != "X$f9x_version"; then - f9x_vendor=gfortran - fi - if test "-" != "$f9x_vendor-$f9x_version"; then - echo "compiler '$FC' is GNU $f9x_vendor-$f9x_version" - fi - - # Get the compiler version numbers - f9x_vers_major=`echo $f9x_version | cut -f1 -d.` - f9x_vers_minor=`echo $f9x_version | cut -f2 -d.` - f9x_vers_patch=`echo $f9x_version | cut -f3 -d.` - test -n "$f9x_vers_major" || f9x_vers_major=0 - test -n "$f9x_vers_minor" || f9x_vers_minor=0 - test -n "$f9x_vers_patch" || f9x_vers_patch=0 - fi -fi - -if test "X-gfortran" = "X-$f9x_vendor"; then - - FC_BASENAME=gfortran - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - - # Need Fortran 2008 support for storage_size() in gcc 4.6 on - # (2008ts in some versions) - if test $f9x_vers_major -ge 8; then - H5_FCFLAGS="$H5_FCFLAGS -std=f2008" - elif test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 6; then - H5_FCFLAGS="$H5_FCFLAGS -std=f2008ts" - fi - - - ############################### - # Architecture-specific flags # - ############################### - - arch= - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - H5_FCFLAGS="$H5_FCFLAGS $arch" - - ############## - # Production # - ############## - - PROD_FCFLAGS= - - ######### - # Debug # - ######### - - if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 5; then - DEBUG_FCFLAGS="-fcheck=all" - else - DEBUG_FCFLAGS="-fbounds-check" - fi - - ######################## - # Enhanced Diagnostics # - ######################## - - if test $f9x_vers_major -ge 10; then - NO_DIAGS_FCFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" - fi - DIAGS_FCFLAGS= - - ########### - # Symbols # - ########### - - NO_SYMBOLS_FCFLAGS="-s" - SYMBOLS_FCFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_FCFLAGS="-pg" - - ################ - # Optimization # - ################ - - if test $f9x_vers_major -le 4; then - HIGH_OPT_FCFLAGS="-O3" - DEBUG_OPT_FCFLAGS= - else - HIGH_OPT_FCFLAGS="-O3" - DEBUG_OPT_FCFLAGS="-Og" - fi - NO_OPT_FCFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-general)" - - NO_DEVELOPER_WARNING_FCFLAGS="$NO_DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-no-developer-general)" - DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-developer-general)" - - ############################# - # Version-specific warnings # - ############################# - - # gfortran >= 4.8 - if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 8; then - H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.8)" - DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-developer-4.8)" - NO_DEVELOPER_WARNING_FCFLAGS="$NO_DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-no-developer-4.8)" - fi - - # gfortran 4.9 (nothing new) - - # gfortran >= 5 - if test $f9x_vers_major -ge 5; then - DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-developer-5)" - fi - - # gfortran >= 6 - if test $f9x_vers_major -ge 6; then - H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-6)" - fi - - # gfortran 7 (nothing new) - - # gfortran >= 8 - if test $f9x_vers_major -ge 8; then - H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-8)" - fi - - # gfortran 9 (nothing new) - - ################# - # Flags are set # - ################# - f9x_flags_set=yes -fi - -# Clear f9x info if no flags set -if test "X-$f9x_flags_set" = "X-"; then - f9x_vendor= - f9x_version= -fi - diff --git a/config/gnu-flags b/config/gnu-flags deleted file mode 100644 index 546f601e3c0..00000000000 --- a/config/gnu-flags +++ /dev/null @@ -1,294 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# GNU gcc compiler or a derivative. It is careful not to do anything -# if the compiler is not GNU; otherwise 'cc_flags_set' is set to 'yes' -# - -# -# For now, do not promote any warnings to errors. -# -WARNINGS_AS_ERRORS_DFLT=no - -# -# This filter rewrites -Werror= as -W, in that way demoting warnings -# promoted to errors back to warnings, if WARNINGS_AS_ERRORS is no. -# -demote_errors() -{ - if [ ${WARNINGS_AS_ERRORS:-${WARNINGS_AS_ERRORS_DFLT}} = no ]; then - sed 's,-Werror=,-W,g' - else - cat - fi -} - -# -# Prepend `$srcdir/config/gnu-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_gnu_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg} | demote_errors - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for gcc -# unless a compiler version is already known -# -# cc_vendor: The compiler name: gcc -# cc_version: Version number: 2.91.60, 2.7.2.1 -# -if test "X-" = "X-$cc_flags_set"; then - # PathScale compiler spits out gcc version string too. Need to - # filter it out. - # icc beginning with version 12 includes a "gcc version compatibility" - # string, causing the gcc H5_CFLAGS to be erroneously added. The line - # "grep -v 'icc version'" causes the discarding of any output - # containing 'icc version'. The cc_version for icc is correctly determined - # and flags added in the intel-flags script. - cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 | grep -v 'PathScale' |\ - grep -v '^icc.*version' |\ - grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`" - cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'` - cc_version=`echo $cc_version |sed 's/[-a-z]//g'` - if test X = "X$cc_vendor" -a X != "X$cc_version"; then - cc_vendor=gcc - fi - if test "-" != "$cc_vendor-$cc_version"; then - echo "compiler '$CC' is GNU $cc_vendor-$cc_version" - fi - - # Get the compiler version numbers - cc_vers_major=`echo $cc_version | cut -f1 -d.` - cc_vers_minor=`echo $cc_version | cut -f2 -d.` - cc_vers_patch=`echo $cc_version | cut -f3 -d.` - test -n "$cc_vers_major" || cc_vers_major=0 - test -n "$cc_vers_minor" || cc_vers_minor=0 - test -n "$cc_vers_patch" || cc_vers_patch=0 -fi - -if test "X-gcc" = "X-$cc_vendor"; then - - ############################### - # Architecture-specific flags # - ############################### - - arch= - case "$host_os-$host_cpu" in - # FreeBSD sets the information from "uname -m" to the general machine - # architecture, not the specific CPU for the machine, so even our - # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD - # machine, use the "sysctl" command to get the CPU hardware model. - freebsd*-i386) - host_cpu_model=`sysctl -n hw.model` - case "$host_cpu_model" in - # Hmm.. this might not catch Celerons, but it won't hurt them either... - *Pro*|*II*|*III*|*IV*|*Athlon*) - # architecture-specific optimizations cause problems - # for some users who build binaries to be used on - # multiple architectures. - # arch="-march=i686" - ;; - esac - ;; - - *-i686) - # architecture-specific optimizations cause problems - # for some users who build binaries to be used on - # multiple architectures. - # arch="-march=i686" - ;; - esac - - case "$host_os-$host_cpu" in - # Cygwin needs the "-std=c99" flag removed. - cygwin-*) - ;; - # On Solaris, gcc needs the gnu99 standard to pick up certain POSIX - # things. Do NOT use this as the gcc norm as this encourages the use - # of non-standard gcc extensions. - *solaris*) - H5_CFLAGS="$H5_CFLAGS -std=gnu99" - ;; - # Everybody else gets c99 as the standard. - *) - H5_CFLAGS="$H5_CFLAGS -std=c99" - ;; - esac - - H5_CFLAGS="$H5_CFLAGS $arch" - - ############## - # Production # - ############## - - # NDEBUG is handled explicitly by the configure script - if test $cc_vers_major -le 4; then - PROD_CFLAGS= - else - PROD_CFLAGS="-fstdarg-opt" - fi - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - if test $cc_vers_major -le 4; then - DEBUG_CFLAGS= - else - DEBUG_CFLAGS="-ftrapv -fno-common" - fi - - ######################## - # Enhanced Diagnostics # - ######################## - - if test $cc_vers_major -ge 10; then - NO_DIAGS_CFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" - fi - DIAGS_CFLAGS= - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CFLAGS="-s" - SYMBOLS_CFLAGS="-g -fno-omit-frame-pointer" - - ############# - # Profiling # - ############# - - PROFILE_CFLAGS="-pg" - - ################ - # Optimization # - ################ - - if test $cc_vers_major -le 4; then - HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS= - else - HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS="-Og" - fi - NO_OPT_CFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - # Add various general warning flags in gnu-warnings for gcc versions 4.8 and later. - if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8 -o $cc_vers_major -gt 4; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments general)" - H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-general)" - - ###################### - # Developer warnings # - ###################### - - NO_DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments no-developer-general) - DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments developer-general) - - fi - - ####################### - # gcc 4 special cases # - ####################### - - # GCC 4.8 through the end of GCC 4 series - if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.8-4.last)" - fi - - ############################# - # Version-specific warnings # - ############################# - - # gcc >= 4.8 - if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.8)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-4.8)" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-4.8)" - fi - - # gcc >= 4.9 - if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 9; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.9)" - fi - - # gcc >= 5 - if test $cc_vers_major -ge 5; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 5)" - H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-5)" - fi - - # gcc >= 6 - if test $cc_vers_major -ge 6; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 6)" - fi - - # gcc >= 7 - if test $cc_vers_major -ge 7; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 7)" - H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-7)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-7)" - fi - - # gcc 8 - if test $cc_vers_major -ge 8; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 8)" - H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-8)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-8)" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-8)" - fi - - # gcc 9 - if test $cc_vers_major -ge 9; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 9)" - fi - - # gcc >= 9.3 - if test $cc_vers_major -ge 10 -o $cc_vers_major -eq 9 -a $cc_vers_minor -ge 3; then - H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 9.3)" - fi - - # gcc >= 10 - if test $cc_vers_major -ge 10; then - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-10)" - fi - - ################# - # Flags are set # - ################# - cc_flags_set=yes -fi - -# Clear cc info if no flags set -if test "X$cc_flags_set" = "X"; then - cc_vendor= - cc_version= -fi - diff --git a/config/ibm-aix b/config/ibm-aix deleted file mode 100644 index bd486af8e27..00000000000 --- a/config/ibm-aix +++ /dev/null @@ -1,132 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# Configuration file for building on the IBM AIX platforms. -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. - -# Use AIX supplied C compiler by default, xlc for serial, mpcc_r for parallel. -# Make sure this is applied to other API compile options such as C++. -if test "X-" = "X-$CC"; then - if test "X-$enable_parallel" = "X-yes"; then - CC=mpcc_r - CC_BASENAME=mpcc_r - else - CC=xlc - CC_BASENAME=xlc - fi -fi - -# Define RUNPARALLEL if parallel mode is enabled or a parallel compiler used. -# Define RUNSERIAL: Temporary patch for Bug 1678. -q32 binary default to run -# with smaller memory. -# Ask for more memory so that "make check" will pass. Not necessary for -q64 -# mode but it does no harm. -if test "X-$enable_parallel" = "X-yes" -o X-$CC_BASENAME = X-mpcc_r; then - RUNPARALLEL=${RUNPARALLEL="env MP_PROCS=\$\${NPROCS:=6} MP_TASKS_PER_NODE=\$\${NPROCS:=6} poe"} -fi - -# The default Fortran 90 compiler - -if test "X-" = "X-$FC"; then - if test "X-$enable_parallel" = "X-yes"; then - FC=mpxlf90_r - else - FC=xlf90 - fi -fi - -# While we try to avoid setting FCFLAGS directly for use in compilation, in -# this case we need the -k flag present for some configure checks. As such, -# the configure script saves the user's set FCFLAGS before running, and -# restores them when complete. We must then set up both FCFLAGS and H5_FCFLAGS -# to ensure the flag is present for both configure as well as for the build. -if test "X-" = "X-$f9x_flags_set"; then - F9XSUFFIXFLAG="-qsuffix=f=f90" - FCFLAGS="$FCFLAGS ${F9XSUFFIXFLAG}" - H5_FCFLAGS="$H5_FCFLAGS ${F9XSUFFIXFLAG}" - FSEARCH_DIRS="-I./ -I../src" - - # Production - PROD_FCFLAGS= - - # Debug - DEBUG_FCFLAGS= - - # Symbols - SYMBOLS_FCFLAGS="-g" - NO_SYMBOLS_FCFLAGS= - - # Profiling - PROFILE_FCFLAGS="-pg" - - # Optimization - HIGH_OPT_FCFLAGS="-O" - DEBUG_OPT_FCFLAGS= - NO_OPT_FCFLAGS= - - f9x_flags_set=yes -fi - -# The default C++ compiler - -# Use AIX supplied C++ compiler by default. -CXX=${CXX=xlC} - -# Added -qweaksymbol to suppress linker messages warning of duplicate -# symbols; these warnings are harmless. - BMR -H5_CXXFLAGS="$H5_CXXFLAGS -qweaksymbol" -AM_CXXFLAGS="$AM_CXXFLAGS" - - -#---------------------------------------------------------------------------- -# Compiler flags. The CPPFLAGS values should not include package debug -# flags like `-DH5G_DEBUG' since these are added with the -# `--enable-debug' switch of configure. - -case $CC_BASENAME in - xlc|xlc-*|xlc_r|xlc_r-*|mpcc_r|mpcc_r-*) - . $srcdir/config/ibm-flags - ;; - - gcc) - . $srcdir/config/gnu-flags - ;; - - *) - # Undetermined compiler - # Use very generic flags - H5_CFLAGS="$H5_CFLAGS -ansi" - - # Production - PROD_CFLAGS= - - # Debug - DEBUG_CFLAGS= - - # Symbols - SYMBOLS_CFLAGS="-g" - NO_SYMBOLS_CFLAGS= - - # Profiling - PROFILE_CFLAGS="-pg" - - # Optimization - HIGH_OPT_CFLAGS="-O" - DEBUG_OPT_CFLAGS= - NO_OPT_CFLAGS= - - # Flags are set - cc_flags_set=yes - ;; -esac diff --git a/config/ibm-flags b/config/ibm-flags deleted file mode 100644 index 37ecd20d1f5..00000000000 --- a/config/ibm-flags +++ /dev/null @@ -1,122 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# IBM XL compiler or a derivative. It is careful not to do anything -# if the compiler is not IBM; otherwise `cc_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for XL compiler -# unless a compiler version is already defined. -# -# cc_vendor: The compiler product name: XL -# cc_version: Version number: 10.1 -# cc_version_info: More descriptive version information -# -if test X = "X$cc_flags_set"; then - # Verify this is an IBM XL compiler - cc_version="`$CC $CFLAGS -qversion 2>&1 | grep 'IBM XL C/C++'`" - if test X != "X$cc_version"; then - cc_vendor="XL" - cc_version="`$CC $CFLAGS -qversion 2>&1 | sed -n 's/Version: \([0-9\.]*\).*/\1/p'`" - cc_version_info="IBM XL C/C++ $cc_version" - echo "compiler '$CC' is IBM $cc_vendor-$cc_version" - - # Some more version numbers. - # XL version numbers are of the form: "major.minor.X.Y" - # (Need to find out the official meaning of the 4 components.) - cc_vers_major=`echo $cc_version | cut -f1 -d.` - cc_vers_minor=`echo $cc_version | cut -f2 -d.` - cc_vers_patch=`echo $cc_version | cut -f3 -d.` - test -n "$cc_vers_major" || cc_vers_major=0 - test -n "$cc_vers_minor" || cc_vers_minor=0 - test -n "$cc_vers_patch" || cc_vers_patch=0 - cc_vers_all=`expr \( \( $cc_vers_major \* 100 + $cc_vers_minor \) \* 100 \) + $cc_vers_patch` - fi -fi - -# Common XL flags for various situations -if test "XL" = "$cc_vendor"; then - # Insert section about version specific problems from gnu-flags here, if - # necessary. - - # Turn off shared lib option. It causes some test suite to fail. - enable_shared="${enable_shared:-no}" - - # Make sure this is applied to other API compile options such as C++. - AM_CFLAGS="$AM_CFLAGS" - - # -qflag=w:w makes the lowest level of reported compile issues to be "warning" - # instead of "information". This suppresses a very large number of messages - # concerning the portability of __inline__. - H5_CFLAGS="-qlanglvl=stdc99 -qflag=w:w $H5_CFLAGS" - - # Production - PROD_CFLAGS= - - # Debug - # NDEBUG is handled explicitly in configure - DEBUG_CFLAGS="-qfullpath" - - # Symbols - SYMBOLS_CFLAGS="-g" - NO_SYMBOLS_CFLAGS= - - # Profiling - PROFILE_CFLAGS="-pg" - - # Optimization - # -O causes test/dtypes to fail badly. Turn it off for now. - HIGH_OPT_CFLAGS= - DEBUG_OPT_CFLAGS= - NO_OPT_CFLAGS= - - # Flags are set - cc_flags_set=yes -fi - -# Clear cc info if no flags set -if test "X-$cc_flags_set" = "X-"; then - cc_vendor= - cc_version= - cc_version_info= -fi - - -# get fortran version info -if test X != X$FC; then - # Verify this is an IBM XL compiler - fc_version="`$FC $FCFLAGS -qversion 2>&1 | grep 'IBM XL Fortran'`" - if test X != "X$fc_version"; then - fc_vendor="XL" - fc_version="`$FC $FCFLAGS -qversion 2>&1 | sed -n 's/Version: \([0-9\.]*\).*/\1/p'`" - fc_version_info="IBM XL Fortran $fc_version" - echo "compiler '$FC' is IBM $fc_vendor-$fc_version" - - fi -fi - - -# get c++ version info -if test X != X$CXX; then - # Verify this is an IBM XL compiler - cxx_version="`$CXX $CXXFLAGS -qversion 2>&1 | grep 'IBM XL C/C++'`" - if test X != "X$cxx_version"; then - cxx_vendor="XL" - cxx_version="`$CXX $CXXFLAGS -qversion 2>&1 | sed -n 's/Version: \([0-9\.]*\).*/\1/p'`" - cxx_version_info="IBM XL C/C++ $cxx_version" - echo "compiler '$CXX' is IBM $cxx_vendor-$cxx_version" - - fi -fi - diff --git a/config/intel-cxxflags b/config/intel-cxxflags deleted file mode 100644 index 8db550dc4a6..00000000000 --- a/config/intel-cxxflags +++ /dev/null @@ -1,179 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Intel icpc compiler or a derivative. It is careful not to do anything -# if the compiler is not Intel; otherwise `cxx_flags_set' is set to `yes' -# - -# -# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_intel_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg} - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for icpc -# icpc unless a compiler version is already known -# -# cxx_vendor: The compiler name: icpc -# cxx_version: Version number: 8.0 -# -if test X = "X$cxx_flags_set"; then - cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 |grep 'Version'`" - if test X != "X$cxx_version"; then - cxx_vendor=icpc - cxx_version=`echo $cxx_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CXX' is Intel $cxx_vendor-$cxx_version" - - # Some version numbers - # Intel version numbers are of the form: "major.minor" - cxx_vers_major=`echo $cxx_version | cut -f1 -d.` - cxx_vers_minor=`echo $cxx_version | cut -f2 -d.` - #cxx_vers_patch=`echo $cxx_version | cut -f2 -d.` - test -n "$cxx_vers_major" || cxx_vers_major=0 - test -n "$cxx_vers_minor" || cxx_vers_minor=0 - test -n "$cxx_vers_patch" || cxx_vers_patch=0 - cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch` - fi -fi - -# Common Intel flags for various situations -if test "X-icpc" = "X-$cxx_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. - - arch= - # Architecture-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ########### - # General # - ########### - - # Default to C++11 standard - H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++11" - - ############## - # Production # - ############## - - PROD_CXXFLAGS= - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly in configure - # -g is handled by the symbols flags - DEBUG_CXXFLAGS= - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CXXFLAGS="-Wl,-s" - SYMBOLS_CXXFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CXXFLAGS="-p" - - ################ - # Optimization # - ################ - - HIGH_OPT_CXXFLAGS="-O3" - DEBUG_OPT_CXXFLAGS="-O0" - NO_OPT_CXXFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - # Add various general warning flags in intel-warnings. - # Use the C warnings as CXX warnings are the same - H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments classic/general)" - - ###################### - # Developer warnings # - ###################### - - # Use the C warnings as CXX warnings are the same - #NO_DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments classic/no-developer-general) - #DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments classic/developer-general) - - ############################# - # Version-specific warnings # - ############################# - - # intel == 8.0 - if test $cxx_vers_major -eq 8 -a $cxx_vers_minor -eq 0; then - # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2. - HIGH_OPT_CFLAGS="-O2" - fi - - # intel == 10 - if test $cxx_vers_major -eq 10; then - HIGH_OPT_CFLAGS="-O1" - fi - - # intel >= 15 - if test $cxx_vers_major -ge 15; then - # Use the C warnings as CXX warnings are the same - H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments classic/15)" - fi - - # intel >= 18 - if test $cxx_vers_major -ge 18; then - # Use the C warnings as CXX warnings are the same - H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments classic/18)" - fi - - ################# - # Flags are set # - ################# - cxx_flags_set=yes -fi - -# Clear cxx info if no flags set -if test "X-$cxx_flags_set" = "X-"; then - cxx_vendor= - cxx_version= -fi diff --git a/config/intel-fflags b/config/intel-fflags deleted file mode 100644 index b6307c1bedb..00000000000 --- a/config/intel-fflags +++ /dev/null @@ -1,144 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Intel ifort compiler or a derivative. It is careful not to do anything -# if the compiler is not Intel; otherwise `f9x_flags_set' is set to `yes' -# - -# -# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_intel_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg} - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for ifort -# ifort unless a compiler version is already known -# -# f9x_vendor: The compiler name: ifort -# f9x_version: Version number: 8.0 -# -if test X = "X$f9x_flags_set"; then - f9x_version="`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 |grep '^Intel'`" - if test X != "X$f9x_version"; then - f9x_vendor=ifort - f9x_version="`echo $f9x_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'`" - echo "compiler '$FC' is Intel $f9x_vendor-$f9x_version" - - # Some version numbers - # Intel version numbers are of the form: "major.minor" - f9x_vers_major=`echo $f9x_version | cut -f1 -d.` - f9x_vers_minor=`echo $f9x_version | cut -f2 -d.` - #f9x_vers_patch=`echo $f9x_version | cut -f2 -d.` - test -n "$f9x_vers_major" || f9x_vers_major=0 - test -n "$f9x_vers_minor" || f9x_vers_minor=0 - test -n "$f9x_vers_patch" || f9x_vers_patch=0 - f9x_vers_all=`expr $f9x_vers_major '*' 1000000 + $f9x_vers_minor '*' 1000 + $f9x_vers_patch` - fi -fi - -if test "X-ifort" = "X-$f9x_vendor"; then - - FC_BASENAME=ifort - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - - ############################### - # Architecture-specific flags # - ############################### - - arch= - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ############## - # Production # - ############## - - PROD_FCFLAGS= - - ######### - # Debug # - ######### - - DEBUG_FCFLAGS="-check all" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_FCFLAGS= - SYMBOLS_FCFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_FCFLAGS="-p" - - ################ - # Optimization # - ################ - - HIGH_OPT_FCFLAGS="-O3" - DEBUG_OPT_FCFLAGS= - NO_OPT_FCFLAGS= - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - H5_FCFLAGS="$H5_FCFLAGS -free" - H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments classic/ifort-general)" - - ############################# - # Version-specific warnings # - ############################# - - - ################# - # Flags are set # - ################# - f9x_flags_set=yes -fi - -# Clear f9x info if no flags set -if test "X-$f9x_flags_set" = "X-"; then - f9x_vendor= - f9x_version= -fi - diff --git a/config/intel-flags b/config/intel-flags deleted file mode 100644 index 725ba625128..00000000000 --- a/config/intel-flags +++ /dev/null @@ -1,174 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Intel icc compiler or a derivative. It is careful not to do anything -# if the compiler is not Intel; otherwise `cc_flags_set' is set to `yes' -# - -# -# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_intel_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg} - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for icc -# icc unless a compiler version is already known -# -# cc_vendor: The compiler name: icc -# cc_version: Version number: 8.0 -# -if test X = "X$cc_flags_set"; then - cc_version="`$CC $CFLAGS $H5_CFLAGS -V 2>&1 |grep 'Version'`" - if test X != "X$cc_version"; then - cc_vendor=icc - cc_version=`echo $cc_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CC' is Intel $cc_vendor-$cc_version" - - # Some version numbers - # Intel version numbers are of the form: "major.minor" - cc_vers_major=`echo $cc_version | cut -f1 -d.` - cc_vers_minor=`echo $cc_version | cut -f2 -d.` - #cc_vers_patch=`echo $cc_version | cut -f2 -d.` - test -n "$cc_vers_major" || cc_vers_major=0 - test -n "$cc_vers_minor" || cc_vers_minor=0 - test -n "$cc_vers_patch" || cc_vers_patch=0 - cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch` - fi -fi - -# Common Intel flags for various situations -if test "X-icc" = "X-$cc_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. - - arch= - # Architecture-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ########### - # General # - ########### - - # Default to C99 standard. - H5_CFLAGS="$H5_CFLAGS $arch -std=c99" - - ############## - # Production # - ############## - - PROD_CFLAGS= - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly in configure - DEBUG_CFLAGS= - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CFLAGS="-Wl,-s" - SYMBOLS_CFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CFLAGS="-p" - - ################ - # Optimization # - ################ - - HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS="-O0" - NO_OPT_CFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - # Add various general warning flags in intel-warnings. - H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments classic/general)" - - ###################### - # Developer warnings # - ###################### - - #NO_DEVELOPER_WARNING_CFLAGS=$(load_intel_arguments classic/no-developer-general) - #DEVELOPER_WARNING_CFLAGS=$(load_intel_arguments classic/developer-general) - - ############################# - # Version-specific warnings # - ############################# - - # intel == 8.0 - if test $cc_vers_major -eq 8 -a $cc_vers_minor -eq 0; then - # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2. - HIGH_OPT_CFLAGS="-O2" - fi - - # intel == 10 - if test $cc_vers_major -eq 10; then - HIGH_OPT_CFLAGS="-O1" - fi - - # intel >= 15 - if test $cc_vers_major -ge 15; then - H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments classic/15)" - fi - - # intel >= 18 - if test $cc_vers_major -ge 18; then - H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments classic/18)" - fi - - ################# - # Flags are set # - ################# - cc_flags_set=yes -fi - -# Clear cc info if no flags set -if test "X-$cc_flags_set" = "X-"; then - cc_vendor= - cc_version= -fi diff --git a/config/linux-gnu b/config/linux-gnu deleted file mode 100644 index b4139ee1a58..00000000000 --- a/config/linux-gnu +++ /dev/null @@ -1,401 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. -# -# See BlankForm in this directory for details. - -# The default compiler is `gcc'. -if test -z "$CC"; then - if test "X-$enable_parallel" = "X-yes"; then - # default to use mpicc which is the defacto MPI compiler name - CC=mpicc - CC_BASENAME=mpicc - else - CC=gcc - CC_BASENAME=gcc - fi -fi - -# Figure out GNU C compiler flags -. $srcdir/config/gnu-flags - -# Figure out PGI C compiler flags -. $srcdir/config/pgi-flags - -# Figure out CCE C compiler flags -. $srcdir/config/cce-flags - -# Figure out Intel oneAPI C compiler flags -. $srcdir/config/oneapi-flags - -# Figure out Intel classic C compiler flags -. $srcdir/config/intel-flags - -# Figure out Clang C compiler flags -. $srcdir/config/clang-flags - -# Figure out NVHPC C compiler flags -. $srcdir/config/nvidia-flags - -# Use default Fortran 90 compiler according to what C compiler is used. -if test "X-" = "X-$FC"; then - case $CC_BASENAME in - gcc*) - FC=gfortran - FC_BASENAME=gfortran - ;; - pgcc*) - FC=pgf90 - FC_BASENAME=pgf90 - ;; - nvc*) - FC=nvfortran - FC_BASENAME=nvfortran - ;; - icx*) - FC=ifx - FC_BASENAME=ifx - ;; - icc*) - FC=ifort - FC_BASENAME=ifort - ;; - mpicc*) - FC=mpif90 - FC_BASENAME=mpif90 - ;; - clang*) - # clang has no fortran compiler. Use gfortran. - FC=gfortran - FC_BASENAME=gfortran - ;; - esac -else - case $FC in - # The PGI and Intel compilers are automatically detected below - ifc*|ifort*|pgf90*|nvfortran*) - ;; - - *f95*) - # Figure out which compiler we are using: pgf90 or Absoft f95 - RM='rm -f' - tmpfile=/tmp/cmpver.$$ - $FC -V >$tmpfile - if test -s "$tmpfile"; then - if( grep -s 'Absoft' $tmpfile > /dev/null) then - FC_BASENAME=f95 - fi - if( grep -s 'pgf90' $tmpfile > /dev/null) then - FC_BASENAME=pgf90 - fi - fi - $RM $tmpfile - fc_version_info=`$FC -V | grep Absoft` - ;; - # The NAG compiler - *nagfor*|*nagftn*) - RM='rm -f' - tmpfile=/tmp/cmpver.$$ - $FC -V >& $tmpfile - if test -s "$tmpfile"; then - if( grep -s 'NAG Fortran' $tmpfile > /dev/null) then - FC_BASENAME=nagfor - fi - fi - fc_version_info=`grep "NAG Fortran" $tmpfile` - echo "compiler '$FC' is $fc_version_info" - $RM $tmpfile - ;; - *) - ;; - esac -fi - -# Figure out GNU FC compiler flags -. $srcdir/config/gnu-fflags - -# Figure out PGI FC compiler flags -. $srcdir/config/pgi-fflags - -# Figure out CCE FC compiler flags -. $srcdir/config/cce-fflags - -# Figure out Intel oneAPI FC compiler flags -. $srcdir/config/oneapi-fflags - -# Figure out Intel classic FC compiler flags -. $srcdir/config/intel-fflags - -# Figure out Clang FC compiler flags -. $srcdir/config/clang-fflags - -# Figure out NVHPC FC compiler flags -. $srcdir/config/nvidia-fflags - -case $FC_BASENAME in - # - # Absoft compiler - # - f95) - # Set required flag for compiling C stubs - H5_CFLAGS="$H5_CFLAGS" - - F9XSUFFIXFLAG="" - H5_FCFLAGS="$H5_FCFLAGS" - FSEARCH_DIRS="" - - # Production - PROD_FCFLAGS= - - # Debug - DEBUG_FCFLAGS= - - # Symbols - SYMBOLS_FCFLAGS="-g" - NO_SYMBOLS_FCFLAGS="-s" - - # Profiling - PROFILE_FCFLAGS="-pg" - - # Optimization - HIGH_OPT_FCFLAGS="-O" - DEBUG_OPT_FCFLAGS= - NO_OPT_FCFLAGS= - - f9x_flags_set=yes - ;; -# -# NAG compiler -# - nagfor) - - F9XSUFFIXFLAG="" - AM_FCFLAGS="$AM_FCFLAGS" - FSEARCH_DIRS="" - - # Production - PROD_FCFLAGS= - - # Debug - DEBUG_FCFLAGS="-C" - - # Symbols - SYMBOLS_FCFLAGS="-g" - NO_SYMBOLS_FCFLAGS="-s" - - # Profiling - PROFILE_FCFLAGS="-pg" - - # Optimization - HIGH_OPT_FCFLAGS="-O" - DEBUG_OPT_FCFLAGS="-O0" - NO_OPT_FCFLAGS="-O0" - - f9x_flags_set=yes - ;; - -esac - -# The default C++ compiler - -# The default compiler is `g++'. -if test -z "$CXX"; then - CXX=g++ - CXX_BASENAME=g++ -fi - -# Figure out Intel oneAPI CXX compiler flags -. $srcdir/config/oneapi-cxxflags - -# Figure out Intel classic CXX compiler flags -# Do this ahead of GNU to avoid icpc being detected as g++ -. $srcdir/config/intel-cxxflags - -# Figure out GNU CXX compiler flags -. $srcdir/config/gnu-cxxflags - -# Figure out PGI CXX compiler flags -. $srcdir/config/pgi-cxxflags - -# Figure out Clang CXX compiler flags -. $srcdir/config/clang-cxxflags - -# Figure out NVHPC CXX compiler flags -. $srcdir/config/nvidia-cxxflags - -# compiler version strings - -# check if the compiler_version_info is already set -if test -z "$cc_version_info"; then - -case $CC in - # whatever matches *pgcc* will also match *gcc*, so this one must come first - *pgcc*) - cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'pgcc'` - ;; - - *gcc*) - cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\ - grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` - ;; - # this must come before *icc* for the same reason - *mpicc*) - cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -v 2>&1 | grep 'version' |\ - sed 's/^[a-z0-9]* for //' |\ - sed 's/\"/\\\"/g' |\ - sed 's/^\([a-z]* \)/ built with \1/1'` - cc_version_info=`echo $cc_version_info` - ;; - - *nvc*) - cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'nvc'` - ;; - - *icx*) - cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *icc*) - cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *clang*) - cc_version_info="`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\ - grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" - ;; - - *) - echo "No match to get cc_version_info for $CC" - ;; -esac - -fi - -# get fortran version info -# check if the compiler_version_info is already set -if test -z "$fc_version_info"; then -case $FC in - *gfortran*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\ - grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` - ;; - - *mpif90*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 | grep 'version' |\ - sed 's/^[a-z0-9]* for //' |\ - sed 's/\"/\\\"/g' |\ - sed 's/^\([a-z]* \)/ built with \1/1'` - fc_version_info=`echo $fc_version_info` - ;; - - *ifx*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *ifc*|*ifort*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - - *f95*) - # Figure out which compiler we are using: pgf90 or Absoft f95 - RM='rm -f' - tmpfile=/tmp/cmpver.$$ - $FC -V >$tmpfile - if test -s "$tmpfile"; then - if( grep -s 'Absoft' $tmpfile > /dev/null) then - FC_BASENAME=f95 - fi - fi - $RM $tmpfile - fc_version_info=`$FC -V | grep Absoft` - ;; - - *g95*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\ - grep 'GCC'` - ;; - - *pgf90*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'pgf90'` - ;; - - *nvfortran*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'nvfortran'` - ;; - - *nagfor*|*nagftn*) - RM='rm -f' - tmpfile=/tmp/cmpver.$$ - $FC -V >& $tmpfile - if test -s "$tmpfile"; then - if( grep -s 'NAG Fortran' $tmpfile > /dev/null) then - FC_BASENAME=nagfor - fi - fi - fc_version_info=`grep "NAG Fortran" $tmpfile` - $RM $tmpfile - echo "compiler '$FC' is $fc_version_info" - ;; - - *) - echo "No match to get fc_version_info for $FC" - ;; -esac -fi - -# get c++ version info -# check if the compiler_version_info is already set -if test -z "$cxx_version_info"; then -case $CXX in - *nvc++*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'nvc++'` - ;; - *pgc++*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgc++'` - ;; - *g++*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ - grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` - ;; - *icpx*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - *icpc*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\ - sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` - ;; - *mpicxx*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep 'version' |\ - sed 's/^[a-z0-9]* for //' |\ - sed 's/^\([a-z]* \)/ built with \1/1'` - cxx_version_info=`echo $cxx_version_info` - ;; - - *clang++*) - cxx_version_info="`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ - grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" - ;; - - *) - echo "No match to get cxx_version_info for $CXX" - ;; -esac -fi diff --git a/config/netbsd b/config/netbsd deleted file mode 100644 index 0ed84f7b3d2..00000000000 --- a/config/netbsd +++ /dev/null @@ -1,64 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. -# -# See BlankForm in this directory for details. - -# The default compiler is `gcc' -if test "X-" = "X-$CC"; then - CC=gcc - CC_BASENAME=gcc -fi - -# Figure out C compiler flags -. $srcdir/config/gnu-flags - -# Figure out Intel oneAPI C compiler flags -. $srcdir/config/oneapi-flags - -# Figure out Intel classic C compiler flags -. $srcdir/config/intel-flags - -# The default Fortran 90 compiler -if test "X-" = "X-$FC"; then - case $CC_BASENAME in - gcc*|pgcc*) - FC=gfortran - FC_BASENAME=gfortran - ;; - icx*) - FC=ifx - FC_BASENAME=ifx - ;; - icc*) - FC=ifort - FC_BASENAME=ifort - ;; - mpicc*) - FC=mpif90 - FC_BASENAME=mpif90 - ;; - esac -fi - -# Figure out FORTRAN compiler flags -. $srcdir/config/gnu-fflags - -# Figure out Intel oneAPI FC compiler flags -. $srcdir/config/intel-fflags - -# Figure out Intel classic FC compiler flags -. $srcdir/config/oneapi-fflags diff --git a/config/nvidia-cxxflags b/config/nvidia-cxxflags deleted file mode 100644 index 6becd26887a..00000000000 --- a/config/nvidia-cxxflags +++ /dev/null @@ -1,101 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# NVIDIA nvc++ compiler or a derivative. It is careful not to do anything -# if the compiler is not NVIDIA; otherwise `cxx_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for NVIDIA nvc++ -# unless a compiler version is already known -# -# cxx_vendor: The compiler name: nvc++ -# cxx_version: Version number: 5.0-2, 5.2-2 -# -if test X = "X$cxx_flags_set"; then - cxx_version="`$CXX $CXXFLAGS -V 2>&1 |grep '^nvc++ '`" - if test X != "X$cxx_version"; then - cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*++\).*/\1/'` - cxx_version=`echo $cxx_version |sed 's/nvc++ \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CXX' is NVIDIA $cxx_vendor-$cxx_version" - - # Some version numbers - # NVIDIA version numbers are of the form: "major.minor-patch" - cxx_vers_major=`echo $cxx_version | cut -f1 -d.` - cxx_vers_minor=`echo $cxx_version | cut -f2 -d. | cut -f1 -d-` - cxx_vers_patch=`echo $cxx_version | cut -f2 -d. | cut -f2 -d-` - test -n "$cxx_vers_major" || cxx_vers_major=0 - test -n "$cxx_vers_minor" || cxx_vers_minor=0 - test -n "$cxx_vers_patch" || cxx_vers_patch=0 - cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch` - fi -fi - -# Common PGI flags for various situations -if test "X-nvc++" = "X-$cxx_vendor"; then - - ########### - # General # - ########### - - # Default to C++11 standard - H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11 -Minform=warn" - - ############## - # Production # - ############## - - PROD_CXXFLAGS= - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly in configure - # -g is handled by the symbols flags - DEBUG_CXXFLAGS="-Mbounds" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CXXFLAGS="-s" - SYMBOLS_CXXFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CXXFLAGS="-Mprof=func,line" - # Use this for profiling with gprof - #PROFILE_CXXFLAGS="-pg" - - ################ - # Optimization # - ################ - - HIGH_OPT_CXXFLAGS="-O4" - DEBUG_OPT_CXXFLAGS="-gopt -O2" - NO_OPT_CXXFLAGS="-O0" - - ################# - # Flags are set # - ################# - cxx_flags_set=yes -fi - -# Clear cxx info if no flags set -if test "X-$cxx_flags_set" = "X-"; then - cxx_vendor= - cxx_version= -fi diff --git a/config/nvidia-fflags b/config/nvidia-fflags deleted file mode 100644 index 77677e1036a..00000000000 --- a/config/nvidia-fflags +++ /dev/null @@ -1,139 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# NVIDIA nvfortran compiler or a derivative. It is careful not to do anything -# if the compiler is not NVIDIA; otherwise `f9x_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for NVIDIA nvfortran -# unless a compiler version is already known -# -# f9x_vendor: The compiler name: nvfortran -# f9x_version: Version number: -# -if test X = "X$f9x_flags_set"; then - f9x_version="`$FC $FCFLAGS -V 2>&1 |grep '^nvfortran '`" - if test X != "X$f9x_version"; then - is_mpi="`$FC $FCFLAGS -help 2>&1 |grep 'link MPI'`" - f9x_vendor=`echo $f9x_version |sed 's/\([a-z0-9]*\).*/\1/'` - f9x_version=`echo $f9x_version |sed 's/nvfortran \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$FC' is NVIDIA $f9x_vendor-$f9x_version" - - # Some version numbers - # NVIDIA version numbers are of the form: "major.minor-patch" - f9x_vers_major=`echo $f9x_version | cut -f1 -d.` - f9x_vers_minor=`echo $f9x_version | cut -f2 -d. | cut -f1 -d-` - f9x_vers_patch=`echo $f9x_version | cut -f2 -d. | cut -f2 -d-` - test -n "$f9x_vers_major" || f9x_vers_major=0 - test -n "$f9x_vers_minor" || f9x_vers_minor=0 - test -n "$f9x_vers_patch" || f9x_vers_patch=0 - f9x_vers_all=`expr $f9x_vers_major '*' 1000000 + $f9x_vers_minor '*' 1000 + $f9x_vers_patch` - fi -fi - -# Common NVIDIA flags for various situations -if test "X-nvfortran" = "X-$f9x_vendor"; then - - ############################### - # Architecture-specific flags # - ############################### - - arch= - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ############## - # Production # - ############## - - # Check for MPI wrapper being used and tweak down compiler options - # Comment out the Tweaking since it caused problems to mpich1.2.6. - # Need to investigate the reasons to tweak. - #if test "X-" == "X-$is_mpi"; then - # PROD_FCFLAGS="-fast -s -Mnoframe" - #else - # PROD_FCFLAGS="-O2 -s" - #fi - PROD_FCFLAGS="-fast -Mnoframe -fPIC" - - ######### - # Debug # - ######### - - DEBUG_FCFLAGS="-Mbounds -Mchkptr -Mdclchk -fPIC" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_FCFLAGS="-s" - SYMBOLS_FCFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_FCFLAGS="-Mprof=func,line" - # Use this for profiling with gprof - #PROFILE_FCFLAGS="-pg" - - ################ - # Optimization # - ################ - - HIGH_OPT_FCFLAGS= - DEBUG_OPT_FCFLAGS= - NO_OPT_FCFLAGS= - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - FC_BASENAME=nvfortran - Fortran_COMPILER_ID=NVIDIA - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - # Uncomment the following to add something specific for FCFLAGS. - #FCFLAGS="$FCFLAGS" - - - - ################# - # Flags are set # - ################# - f9x_flags_set=yes -fi - -# Clear f9x info if no flags set -if test "X-$f9x_flags_set" = "X-"; then - f9x_vendor= - f9x_version= -fi - diff --git a/config/nvidia-flags b/config/nvidia-flags deleted file mode 100644 index 39bca831314..00000000000 --- a/config/nvidia-flags +++ /dev/null @@ -1,123 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# NVIDIA nvc compiler or a derivative. It is careful not to do anything -# if the compiler is not nvcc; otherwise `cc_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for nvc -# unless a compiler version is already known -# -# cc_vendor: The compiler name: nvc -# cc_version: Version number: 5.0-2, 5.2-2 -# -if test X = "X$cc_flags_set"; then - cc_version="`$CC $CFLAGS -V 2>&1 |grep '^nvc '`" - if test X != "X$cc_version"; then - is_mpi="`$CC $CFLAGS -help 2>&1 |grep 'MPI'`" - cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'` - cc_version=`echo $cc_version |sed 's/nvc \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CC' is NVIDIA $cc_vendor-$cc_version" - - # Some version numbers - # NVIDIA version numbers are of the form: "major.minor-patch" - cc_vers_major=`echo $cc_version | cut -f1 -d.` - cc_vers_minor=`echo $cc_version | cut -f2 -d. | cut -f1 -d-` - cc_vers_patch=`echo $cc_version | cut -f2 -d. | cut -f2 -d-` - test -n "$cc_vers_major" || cc_vers_major=0 - test -n "$cc_vers_minor" || cc_vers_minor=0 - test -n "$cc_vers_patch" || cc_vers_patch=0 - cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch` - fi -fi - -# Common PGI flags for various situations -if test "X-nvc" = "X-$cc_vendor" -o "X-nvcc" = "X-$cc_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. - - arch= - # Architecture-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ########### - # General # - ########### - - # Default to C99 standard. - H5_CFLAGS="$H5_CFLAGS $arch -c99 -Minform=warn" - - ############## - # Production # - ############## - - # NDEBUG is handled explicitly by the configure script - #PROD_CFLAGS="-fast" - PROD_CFLAGS="" # -fast implies -O2 and -O2+ currently has test failures. - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - DEBUG_CFLAGS="-Mbounds" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CFLAGS="-s" - SYMBOLS_CFLAGS="-gopt" - - ############# - # Profiling # - ############# - - PROFILE_CFLAGS="-Mprof=func,line" - # Use this for profiling with gprof - #PROFILE_CFLAGS="-pg" - - ################ - # Optimization # - ################ - - HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS="-O1" # -O0 can be very slow - NO_OPT_CFLAGS="-O0" - - ################# - # Flags are set # - ################# - cc_flags_set=yes -fi - -# Clear cc info if no flags set -if test "X-$cc_flags_set" = "X-"; then - cc_vendor= - cc_version= -fi diff --git a/config/oneapi-cxxflags b/config/oneapi-cxxflags deleted file mode 100644 index d9819b94c44..00000000000 --- a/config/oneapi-cxxflags +++ /dev/null @@ -1,155 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Intel icpx compiler or a derivative. It is careful not to do anything -# if the compiler is not Intel; otherwise `cxx_flags_set' is set to `yes' -# - -# -# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_intel_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg} - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for icpx -# icpx unless a compiler version is already known -# -# cxx_vendor: The compiler name: icpx -# cxx_version: Version number: 2023.2.0 -# -if test X = "X$cxx_flags_set"; then - cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 |grep 'oneAPI'`" - if test X != "X$cxx_version"; then - cxx_vendor=icpx - cxx_version=`echo $cxx_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CXX' is Intel oneAPI $cxx_vendor-$cxx_version" - - # Some version numbers - # Intel oneAPI version numbers are of the form: "major.minor.patch" - cxx_vers_major=`echo $cxx_version | cut -f1 -d.` - cxx_vers_minor=`echo $cxx_version | cut -f2 -d.` - cxx_vers_patch=`echo $cxx_version | cut -f2 -d.` - test -n "$cxx_vers_major" || cxx_vers_major=0 - test -n "$cxx_vers_minor" || cxx_vers_minor=0 - test -n "$cxx_vers_patch" || cxx_vers_patch=0 - cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch` - fi -fi - -# Common Intel flags for various situations -if test "X-icpx" = "X-$cxx_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. - - arch= - # Architecture-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ########### - # General # - ########### - - # Default to C++11 standard - H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++11" - - ############## - # Production # - ############## - - PROD_CXXFLAGS= - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly in configure - # -g is handled by the symbols flags - DEBUG_CXXFLAGS= - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CXXFLAGS="-Wl,-s" - SYMBOLS_CXXFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CXXFLAGS="-p" - - ################ - # Optimization # - ################ - - HIGH_OPT_CXXFLAGS="-O3" - DEBUG_OPT_CXXFLAGS="-O0" - NO_OPT_CXXFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - # Add various general warning flags in intel-warnings. - # Use the C warnings as CXX warnings are the same - H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments oneapi/general)" - - ###################### - # Developer warnings # - ###################### - - # Use the C warnings as CXX warnings are the same - DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments oneapi/developer-general) - - ############################# - # Version-specific warnings # - ############################# - - ################# - # Flags are set # - ################# - cxx_flags_set=yes -fi - -# Clear cxx info if no flags set -if test "X-$cxx_flags_set" = "X-"; then - cxx_vendor= - cxx_version= -fi diff --git a/config/oneapi-fflags b/config/oneapi-fflags deleted file mode 100644 index a63108d0b99..00000000000 --- a/config/oneapi-fflags +++ /dev/null @@ -1,145 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Intel oneAPI ifx compiler or a derivative. It is careful not to do anything -# if the compiler is not Intel; otherwise `f9x_flags_set' is set to `yes' -# - -# -# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_intel_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg} - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for ifx -# ifx unless a compiler version is already known -# -# f9x_vendor: The compiler name: ifx -# f9x_version: Version number: 2023.2.0 -# -if test X = "X$f9x_flags_set"; then - f9x_version="`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 |grep '^Intel'`" - if test X != "X$f9x_version"; then - f9x_vendor=ifx - f9x_version="`echo $f9x_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'`" - echo "compiler '$FC' is Intel oneAPI $f9x_vendor-$f9x_version" - - # Some version numbers - # Intel oneAPI version numbers are of the form: "major.minor.patch" - f9x_vers_major=`echo $f9x_version | cut -f1 -d.` - f9x_vers_minor=`echo $f9x_version | cut -f2 -d.` - f9x_vers_patch=`echo $f9x_version | cut -f2 -d.` - test -n "$f9x_vers_major" || f9x_vers_major=0 - test -n "$f9x_vers_minor" || f9x_vers_minor=0 - test -n "$f9x_vers_patch" || f9x_vers_patch=0 - f9x_vers_all=`expr $f9x_vers_major '*' 1000000 + $f9x_vers_minor '*' 1000 + $f9x_vers_patch` - fi -fi - -if test "X-ifx" = "X-$f9x_vendor"; then - - FC_BASENAME=ifx - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - - ############################### - # Architecture-specific flags # - ############################### - - arch= - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ############## - # Production # - ############## - - PROD_FCFLAGS= - - ######### - # Debug # - ######### - - # Don't use -check uninit or you'll get false positives from H5_buildiface - DEBUG_FCFLAGS="-check all,nouninit" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_FCFLAGS= - SYMBOLS_FCFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_FCFLAGS="-p" - - ################ - # Optimization # - ################ - - HIGH_OPT_FCFLAGS="-O3" - DEBUG_OPT_FCFLAGS="-O0" - NO_OPT_FCFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - H5_FCFLAGS="$H5_FCFLAGS -free" - H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments oneapi/ifort-general)" - - ############################# - # Version-specific warnings # - ############################# - - - ################# - # Flags are set # - ################# - f9x_flags_set=yes -fi - -# Clear f9x info if no flags set -if test "X-$f9x_flags_set" = "X-"; then - f9x_vendor= - f9x_version= -fi - diff --git a/config/oneapi-flags b/config/oneapi-flags deleted file mode 100644 index 629e93f02f1..00000000000 --- a/config/oneapi-flags +++ /dev/null @@ -1,151 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# Intel icx compiler or a derivative. It is careful not to do anything -# if the compiler is not Intel; otherwise `cc_flags_set' is set to `yes' -# - -# -# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as -# subroutine argument(s), remove comments starting with # and ending -# at EOL, replace spans of whitespace (including newlines) with spaces, -# and re-emit the file(s) thus filtered on the standard output stream. -# -load_intel_arguments() -{ - set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg} - done) - IFS=' ' echo "$*" -} - -# Get the compiler version in a way that works for icx -# icx unless a compiler version is already known -# cc_vendor: The compiler name: icx -# cc_version: Version number: 2023.2.0 -# -if test X = "X$cc_flags_set"; then - cc_version="`$CC $CFLAGS $H5_CFLAGS -V 2>&1 |grep 'oneAPI'`" - if test X != "X$cc_version"; then - cc_vendor=icx - cc_version=`echo $cc_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CC' is Intel oneAPI $cc_vendor-$cc_version" - - # Some version numbers - # Intel oneAPI version numbers are of the form: "major.minor.patch" - cc_vers_major=`echo $cc_version | cut -f1 -d.` - cc_vers_minor=`echo $cc_version | cut -f2 -d.` - cc_vers_patch=`echo $cc_version | cut -f2 -d.` - test -n "$cc_vers_major" || cc_vers_major=0 - test -n "$cc_vers_minor" || cc_vers_minor=0 - test -n "$cc_vers_patch" || cc_vers_patch=0 - cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch` - fi -fi - -# Common Intel flags for various situations -if test "X-icx" = "X-$cc_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. - - arch= - # Architecture-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ########### - # General # - ########### - - # Default to C99 standard. - H5_CFLAGS="$H5_CFLAGS $arch -std=c99" - - ############## - # Production # - ############## - - PROD_CFLAGS= - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly in configure - DEBUG_CFLAGS= - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CFLAGS="-Wl,-s" - SYMBOLS_CFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CFLAGS="-p" - - ################ - # Optimization # - ################ - - HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS="-O0" - NO_OPT_CFLAGS="-O0" - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - # Add various general warning flags in intel-warnings. - H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments oneapi/general)" - - ###################### - # Developer warnings # - ###################### - - DEVELOPER_WARNING_CFLAGS=$(load_intel_arguments oneapi/developer-general) - - ############################# - # Version-specific warnings # - ############################# - - ################# - # Flags are set # - ################# - cc_flags_set=yes -fi - -# Clear cc info if no flags set -if test "X-$cc_flags_set" = "X-"; then - cc_vendor= - cc_version= -fi diff --git a/config/pgi-cxxflags b/config/pgi-cxxflags deleted file mode 100644 index 7d8bdeb3077..00000000000 --- a/config/pgi-cxxflags +++ /dev/null @@ -1,101 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# PGI pgc++ compiler or a derivative. It is careful not to do anything -# if the compiler is not PGI; otherwise `cxx_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for pgc++ -# pgc++ unless a compiler version is already known -# -# cxx_vendor: The compiler name: pgc++ -# cxx_version: Version number: 5.0-2, 5.2-2 -# -if test X = "X$cxx_flags_set"; then - cxx_version="`$CXX $CXXFLAGS -V 2>&1 |grep '^pgc++ '`" - if test X != "X$cxx_version"; then - cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*++\).*/\1/'` - cxx_version=`echo $cxx_version |sed 's/pgc++ \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CXX' is PGI $cxx_vendor-$cxx_version" - - # Some version numbers - # PGI version numbers are of the form: "major.minor-patch" - cxx_vers_major=`echo $cxx_version | cut -f1 -d.` - cxx_vers_minor=`echo $cxx_version | cut -f2 -d. | cut -f1 -d-` - cxx_vers_patch=`echo $cxx_version | cut -f2 -d. | cut -f2 -d-` - test -n "$cxx_vers_major" || cxx_vers_major=0 - test -n "$cxx_vers_minor" || cxx_vers_minor=0 - test -n "$cxx_vers_patch" || cxx_vers_patch=0 - cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch` - fi -fi - -# Common PGI flags for various situations -if test "X-pgc++" = "X-$cxx_vendor"; then - - ########### - # General # - ########### - - # Default to C++11 standard - H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11 -Minform=warn" - - ############## - # Production # - ############## - - PROD_CXXFLAGS= - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly in configure - # -g is handled by the symbols flags - DEBUG_CXXFLAGS="-Mbounds" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CXXFLAGS="-s" - SYMBOLS_CXXFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CXXFLAGS="-Mprof=func,line" - # Use this for profiling with gprof - #PROFILE_CXXFLAGS="-pg" - - ################ - # Optimization # - ################ - - HIGH_OPT_CXXFLAGS="-O4" - DEBUG_OPT_CXXFLAGS="-gopt -O2" - NO_OPT_CXXFLAGS="-O0" - - ################# - # Flags are set # - ################# - cxx_flags_set=yes -fi - -# Clear cxx info if no flags set -if test "X-$cxx_flags_set" = "X-"; then - cxx_vendor= - cxx_version= -fi diff --git a/config/pgi-fflags b/config/pgi-fflags deleted file mode 100644 index 5ec8368beea..00000000000 --- a/config/pgi-fflags +++ /dev/null @@ -1,139 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# PGI pgf90 compiler or a derivative. It is careful not to do anything -# if the compiler is not PGI; otherwise `f9x_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for pgf90 -# pgf90 unless a compiler version is already known -# -# f9x_vendor: The compiler name: pgf90 -# f9x_version: Version number: 5.0-2, 5.2-2 -# -if test X = "X$f9x_flags_set"; then - f9x_version="`$FC $FCFLAGS -V 2>&1 |grep '^pgf90 '`" - if test X != "X$f9x_version"; then - is_mpi="`$FC $FCFLAGS -help 2>&1 |grep 'link MPI'`" - f9x_vendor=`echo $f9x_version |sed 's/\([a-z0-9]*\).*/\1/'` - f9x_version=`echo $f9x_version |sed 's/pgf90 \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$FC' is PGI $f9x_vendor-$f9x_version" - - # Some version numbers - # PGI version numbers are of the form: "major.minor-patch" - f9x_vers_major=`echo $f9x_version | cut -f1 -d.` - f9x_vers_minor=`echo $f9x_version | cut -f2 -d. | cut -f1 -d-` - f9x_vers_patch=`echo $f9x_version | cut -f2 -d. | cut -f2 -d-` - test -n "$f9x_vers_major" || f9x_vers_major=0 - test -n "$f9x_vers_minor" || f9x_vers_minor=0 - test -n "$f9x_vers_patch" || f9x_vers_patch=0 - f9x_vers_all=`expr $f9x_vers_major '*' 1000000 + $f9x_vers_minor '*' 1000 + $f9x_vers_patch` - fi -fi - -# Common PGI flags for various situations -if test "X-pgf90" = "X-$f9x_vendor"; then - - ############################### - # Architecture-specific flags # - ############################### - - arch= - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ############## - # Production # - ############## - - # Check for MPI wrapper being used and tweak down compiler options - # Comment out the Tweaking since it caused problems to mpich1.2.6. - # Need to investigate the reasons to tweak. - #if test "X-" == "X-$is_mpi"; then - # PROD_FCFLAGS="-fast -s -Mnoframe" - #else - # PROD_FCFLAGS="-O2 -s" - #fi - PROD_FCFLAGS="-fast -Mnoframe" - - ######### - # Debug # - ######### - - DEBUG_FCFLAGS="-Mbounds -Mchkptr -Mdclchk" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_FCFLAGS="-s" - SYMBOLS_FCFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_FCFLAGS="-Mprof=func,line" - # Use this for profiling with gprof - #PROFILE_FCFLAGS="-pg" - - ################ - # Optimization # - ################ - - HIGH_OPT_FCFLAGS= - DEBUG_OPT_FCFLAGS= - NO_OPT_FCFLAGS= - - ############ - # Warnings # - ############ - - ########### - # General # - ########### - - FC_BASENAME=pgf90 - Fortran_COMPILER_ID=PGI - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - # Uncomment the following to add something specific for FCFLAGS. - #FCFLAGS="$FCFLAGS" - - - - ################# - # Flags are set # - ################# - f9x_flags_set=yes -fi - -# Clear f9x info if no flags set -if test "X-$f9x_flags_set" = "X-"; then - f9x_vendor= - f9x_version= -fi - diff --git a/config/pgi-flags b/config/pgi-flags deleted file mode 100644 index 19dd912f183..00000000000 --- a/config/pgi-flags +++ /dev/null @@ -1,122 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file should be sourced into configure if the compiler is the -# PGI pgcc compiler or a derivative. It is careful not to do anything -# if the compiler is not PGI; otherwise `cc_flags_set' is set to `yes' -# - -# Get the compiler version in a way that works for pgcc -# pgcc unless a compiler version is already known -# -# cc_vendor: The compiler name: pgcc -# cc_version: Version number: 5.0-2, 5.2-2 -# -if test X = "X$cc_flags_set"; then - cc_version="`$CC $CFLAGS -V 2>&1 |grep '^pgcc '`" - if test X != "X$cc_version"; then - is_mpi="`$CC $CFLAGS -help 2>&1 |grep 'MPI'`" - cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'` - cc_version=`echo $cc_version |sed 's/pgcc \([-a-z0-9\.\-]*\).*/\1/'` - echo "compiler '$CC' is PGI $cc_vendor-$cc_version" - - # Some version numbers - # PGI version numbers are of the form: "major.minor-patch" - cc_vers_major=`echo $cc_version | cut -f1 -d.` - cc_vers_minor=`echo $cc_version | cut -f2 -d. | cut -f1 -d-` - cc_vers_patch=`echo $cc_version | cut -f2 -d. | cut -f2 -d-` - test -n "$cc_vers_major" || cc_vers_major=0 - test -n "$cc_vers_minor" || cc_vers_minor=0 - test -n "$cc_vers_patch" || cc_vers_patch=0 - cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch` - fi -fi - -# Common PGI flags for various situations -if test "X-pgcc" = "X-$cc_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. - - arch= - # Architecture-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "$host_os-$host_cpu" in - # *-i686) - # arch="-march=i686" - # ;; - #esac - - # Host-specific flags - # Nothing currently. (Uncomment code below and modify to add any) - #case "`hostname`" in - # sleipnir.ncsa.uiuc.edu) - # arch="$arch -pipe" - # ;; - #esac - - ########### - # General # - ########### - - # Default to C99 standard. - H5_CFLAGS="$H5_CFLAGS $arch -c99 -Minform=warn" - - ############## - # Production # - ############## - - # NDEBUG is handled explicitly by the configure script - PROD_CFLAGS="-fast" - - ######### - # Debug # - ######### - - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - DEBUG_CFLAGS="-Mbounds" - - ########### - # Symbols # - ########### - - NO_SYMBOLS_CFLAGS="-s" - SYMBOLS_CFLAGS="-g" - - ############# - # Profiling # - ############# - - PROFILE_CFLAGS="-Mprof=func,line" - # Use this for profiling with gprof - #PROFILE_CFLAGS="-pg" - - ################ - # Optimization # - ################ - - HIGH_OPT_CFLAGS="-O4" - DEBUG_OPT_CFLAGS="-gopt -O2" - NO_OPT_CFLAGS="-O0" - - ################# - # Flags are set # - ################# - cc_flags_set=yes -fi - -# Clear cc info if no flags set -if test "X-$cc_flags_set" = "X-"; then - cc_vendor= - cc_version= -fi diff --git a/config/solaris b/config/solaris deleted file mode 100644 index e99a2bc060b..00000000000 --- a/config/solaris +++ /dev/null @@ -1,216 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. -# -# See BlankForm in this directory for details - -# The default compiler is `sunpro cc' -if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc -fi - -# Try gcc compiler flags -. $srcdir/config/gnu-flags - -# Try solaris native compiler flags -if test "X-" = "X-$cc_flags_set"; then - # HDF5 must be built with a C99 compiler on Solaris - # -erroff=%none turns on all warnings - H5_CFLAGS="$H5_CFLAGS -xc99=all -erroff=%none" - - # Production - # NDEBUG is handled explicitly by the configure script - PROD_CFLAGS= - - # Debug - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - DEBUG_CFLAGS= - - # Symbols - # -g produces output for dbx, NOT gdb. You can use "gdb on" from - # inside gdb to use gdb commands if you need to debug. - # If you want a LOT of debugging information (at the expense of - # really slow code), try using -g3. That will even let you debug - # into macros. - # -s strips symbols, as in gcc - NO_SYMBOLS_CFLAGS="-s" - SYMBOLS_CFLAGS="-g" - - # Profile - # This produces profiling output for gprof. If you want to use - # the Solaris profiler, use -xprofile instead. - PROFILE_CFLAGS="-xpg" - - # Optimization - # -O has switched to -xO{1|2|3|4|5}. -xO3 is probably a good compromise - # for the daily tests, but you might want to switch to -xO2 or lower - # if you are actively debugging. - HIGH_OPT_CFLAGS="-xO5" - DEBUG_OPT_CFLAGS="-xO3" - NO_OPT_CFLAGS= - - cc_flags_set=yes - # Special linking flag is needed to build with Fortran on Solaris 5.9 - system_version="`uname -r`" - case "$system_version" in - 5.9*) - # Need the xopenmp flag to build the Fortran library - if test X-$enable_fortran = X-yes; then - AM_LDFLAGS="$AM_LDFLAGS -xopenmp=stubs" - fi - ;; - esac - -fi - -LIBS="$LIBS" - -# The default Fortran 90 compiler - -if test "X-" = "X-$FC"; then - FC=f90 -fi - -if test "X-" = "X-$f9x_flags_set"; then - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - - H5_FCFLAGS="$H5_FCFLAGS" - - # TODO: Revisit these flags. - - # Production - # NDEBUG is handled explicitly by the configure script - PROD_FCFLAGS= - - # Debug - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - DEBUG_FCFLAGS= - - # Symbols - NO_SYMBOLS_FCFLAGS= - SYMBOLS_FCFLAGS="-g" - - # Profile - PROFILE_FCFLAGS= - - # Optimization - # -g produces rather slow code. "-g -O" produces much faster code with some - # loss of debugger functions such as not able to print local variables. - HIGH_OPT_FCFLAGS="-O2" - DEBUG_OPT_FCFLAGS="-O" - NO_OPT_FCFLAGS= - - f9x_flags_set=yes -fi - -# The default C++ compiler - -# The default compiler is `sunpro cc' -if test -z "$CXX"; then - CXX=CC - CXX_BASENAME=CC -fi - -# Try gcc compiler flags -#. $srcdir/config/gnu-flags - -cxx_version="`$CXX -V 2>&1 |grep 'WorkShop' |\ - sed 's/.*WorkShop.*C++ \([0-9\.]*\).*/\1/'`" - -cxx_vers_major=`echo $cxx_version | cut -f1 -d.` -cxx_vers_minor=`echo $cxx_version | cut -f2 -d.` -cxx_vers_patch=`echo $cxx_version | cut -f3 -d.` - -# Specify the "-features=tmplife" if the compiler can handle this... -if test -n "$cxx_version"; then - if test $cxx_vers_major -ge 5 -a $cxx_vers_minor -ge 3 -o $cxx_vers_major -gt 5; then - H5_CXXFLAGS="$H5_CXXFLAGS -features=tmplife" - fi -fi - -# Try solaris native compiler flags -if test -z "$cxx_flags_set"; then - H5_CXXFLAGS="$H5_CXXFLAGS -instances=static" - H5_CPPFLAGS="$H5_CPPFLAGS -LANG:std" - - # Production - # NDEBUG is handled explicitly by the configure script - PROD_CXXFLAGS= - - # Debug - # NDEBUG is handled explicitly by the configure script - # -g is handled by the symbols flags - DEBUG_CXXFLAGS= - - # Symbols - NO_SYMBOLS_CXXFLAGS="-s" - SYMBOLS_CXXFLAGS="-g" - - # Profile - PROFILE_CXXFLAGS="-xpg" - - # Optimization - # -g produces rather slow code. "-g -O" produces much faster code with some - # loss of debugger functions such as not able to print local variables. - HIGH_OPT_CXXFLAGS="-O" - DEBUG_OPT_CXXFLAGS="-O" - NO_OPT_CXXFLAGS= - - cxx_flags_set=yes -fi - -# compiler version strings -case $CC in - *cc*) - cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'Sun' |\ - sed 's/.*\(Sun .*\)/\1 /'` - ;; - - *) - echo "No match to get cc_version_info for $CC" - ;; -esac -echo "C compiler '$CC' is $cc_version_info" - -case $FC in - # The PGI and Intel compilers are automatically detected below - *f90*) - fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Sun' |\ - sed 's/.*\(Sun .*\)/\1 /'` - ;; - - *) - echo "No match to get fc_version_info for $FC" - ;; -esac -echo "Fortran compiler '$FC' is $fc_version_info" - -# get c++ version info -case $CXX in - *CC*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Sun' |\ - sed 's/.*\(Sun .*\)/\1 /'` - ;; - - *) - echo "No match to get cxx_version_info for $CXX" - ;; -esac - diff --git a/configure.ac b/configure.ac deleted file mode 100644 index c5bfe4276af..00000000000 --- a/configure.ac +++ /dev/null @@ -1,4689 +0,0 @@ -## Process this file with autoconf to produce configure. -## -## Copyright by The HDF Group. -## All rights reserved. -## -## This file is part of HDF5. The full HDF5 copyright notice, including -## terms governing use, modification, and redistribution, is contained in -## the COPYING file, which can be found at the root of the source code -## distribution tree, or in https://www.hdfgroup.org/licenses. -## If you do not have access to either file, you may request a copy from -## help@hdfgroup.org. - -## ---------------------------------------------------------------------- -## Initialize configure. -## -AC_PREREQ([2.71]) - -## AC_INIT takes the name of the package, the version number, and an -## email address to report bugs. AC_CONFIG_SRCDIR takes a unique file -## as its argument. -## -## NOTE: Do not forget to change the version number here when we do a -## release!!! -## -AC_INIT([HDF5], [1.17.0], [help@hdfgroup.org]) - -AC_CONFIG_SRCDIR([src/H5.c]) -AC_CONFIG_HEADERS([src/H5config.h]) - -AC_CONFIG_AUX_DIR([bin]) -AC_CONFIG_MACRO_DIR([m4]) - -## AM_INIT_AUTOMAKE takes a list of options that should be applied to -## every Makefile.am when automake is run. -AM_INIT_AUTOMAKE([foreign subdir-objects]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # use silent rules where available - automake 1.11 - -## AM_MAINTAINER_MODE determines the behavior of "rebuild rules" that contain -## dependencies for Makefile.in files, configure, src/H5config.h, etc. If -## AM_MAINTAINER_MODE is enabled, these files will be rebuilt if out of date. -## When disabled, the autotools build files can get out of sync and the build -## system will not complain or try to regenerate downstream files. -## -## The AM_MAINTAINER_MODE macro also determines whether the -## --(enable|disable)-maintainer-mode configure option is available. When the -## macro is present, with or without a parameter, the option will be added -## to the generated configure script. -## -## In summary: -## -## AM_MAINTAINER_MODE([enable]) -## - Build dependencies ON by default -## - Configure option exists -## -## AM_MAINTAINER_MODE([disable]) -## - Build dependencies OFF by default -## - Configure option exists -## -## AM_MAINTAINER_MODE -## - Build dependencies OFF by default -## - Configure option exists -## -## No AM_MAINTAINER_MODE macro -## - Build dependencies ON by default -## - No configure option to control build dependencies -## -## The biggest concern for us is that version control systems like git -## usually don't preserve dependencies between timestamps, so the build -## system will often think that upstream build files like Makefile.am are -## dirty and that rebuilding needs to occur when it doesn't. This is a problem -## in release branches where we provide the autotools-generated files. Users -## who don't have autoconf, automake, etc. will then have difficulty building -## release branches checked out from git. -## -## By default, maintainer mode is enabled in development branches and disabled -## in release branches. -AM_MAINTAINER_MODE([enable]) - -## ---------------------------------------------------------------------- -## Set prefix default (install directory) to a directory in the build area. -## This allows multiple src-dir builds within one host. -AC_PREFIX_DEFAULT([`pwd`/hdf5]) - -## Run post processing on files created by configure -## -## src/H5pubconf.h: -## Generate src/H5pubconf.h from src/H5config.h by prepending H5_ to all -## macro names. This avoid name conflict between HDF5 macro names and those -## generated by another software package that uses the HDF5 library. -## -## src/libhdf5.settings: -## Remove all lines beginning with "#" which are generated by CONDITIONAL's -## of configure. -## -## src/H5build_settings.c -## Remove all lines beginning with "#" which are generated by CONDITIONAL's -## of configure. This uses a check for whitespace after the pound sign -## to avoid clobbering include statements. -AC_CONFIG_COMMANDS([pubconf], [ - echo "creating src/H5pubconf.h" - sed 's/#define /#define H5_/' pubconf - if test ! -f src/H5pubconf.h; then - mv -f pubconf src/H5pubconf.h - elif (diff pubconf src/H5pubconf.h >/dev/null); then - rm -f pubconf - echo "src/H5pubconf.h is unchanged" - else - mv -f pubconf src/H5pubconf.h - fi - echo "Post process src/libhdf5.settings" - sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP - cp libhdf5.settings.TMP src/libhdf5.settings - rm -f libhdf5.settings.TMP - echo "Post process src/H5build_settings.c" - sed '/^# /d' < src/H5build_settings.c > H5build_settings.TMP - cp H5build_settings.TMP src/H5build_settings.c - rm -f H5build_settings.TMP -]) - -## It's possible to configure for a host other than the one on which -## configure is currently running by using the --host=foo flag. -## For machines on which HDF5 is often configured, it can be convenient -## to specify the name of the machine rather than its canonical type. -## -## There are currently no hosts, but if there were they would be -## listed by hostname and the alias would point to a file in -## the config directory: -## -##case $host_alias in -## ) -## host_alias= -## ;; -##esac - -AC_CANONICAL_HOST -AC_SUBST([CPPFLAGS]) -AC_SUBST([JNIFLAGS]) -AC_SUBST([AR_FLAGS]) - -## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but -## not exported to h5cc (or h5fc, etc.) -## -AC_SUBST([H5_CFLAGS]) -AC_SUBST([H5_CPPFLAGS]) -AC_SUBST([H5_FCFLAGS]) -AC_SUBST([H5_CXXFLAGS]) -AC_SUBST([H5_JNIFLAGS]) -AC_SUBST([H5_JAVACFLAGS]) -AC_SUBST([H5_JAVAFLAGS]) -AC_SUBST([H5_LDFLAGS]) - -## AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5, -## and WILL be exported to h5cc (or h5fc, etc) if set by configure. -AC_SUBST([AM_CFLAGS]) -AC_SUBST([AM_FCFLAGS]) -AC_SUBST([AM_CXXFLAGS]) -AC_SUBST([AM_CPPFLAGS]) -AC_SUBST([AM_JNIFLAGS]) -AC_SUBST([AM_JAVACFLAGS]) -AC_SUBST([AM_JAVAFLAGS]) -AC_SUBST([AM_LDFLAGS]) - -## Make sure flags are initialized. -AM_CFLAGS="${AM_CFLAGS}" -AM_CXXFLAGS="${AM_CXXFLAGS}" -AM_FCFLAGS="${AM_FCFLAGS}" -AM_CPPFLAGS="${AM_CPPFLAGS}" -AM_JNIFLAGS="${AM_JNIFLAGS}" -AM_JAVACFLAGS="${AM_JAVACFLAGS}" -AM_JAVAFLAGS="${AM_JAVAFLAGS}" -AM_LDFLAGS="${AM_LDFLAGS}" - -## Flags passed in by the user -CFLAGS="${CFLAGS}" -CXXFLAGS="${CXXFLAGS}" -FCFLAGS="${FCFLAGS}" -CPPFLAGS="${CPPFLAGS}" -JNIFLAGS="${JNIFLAGS}" -JAVACFLAGS="${JAVACFLAGS}" -JAVAFLAGS="${JAVAFLAGS}" -LDFLAGS="${LDFLAGS}" -AR_FLAGS="${AR_FLAGS}" - -## Configure may need to alter any of the *FLAGS variables in order for -## various checks to work correctly. Save the user's value here so it -## can be restored once all configure checks are complete. -saved_user_CFLAGS="$CFLAGS" -saved_user_CXXFLAGS="$CXXFLAGS" -saved_user_FCFLAGS="$FCFLAGS" -saved_user_JAVACFLAGS="$JAVACFLAGS" -saved_user_JAVAFLAGS="$JAVAFLAGS" -saved_user_LDFLAGS="$LDFLAGS" -saved_user_CPPFLAGS="$CPPFLAGS" - -## Strip out -Werror from CFLAGS since that can cause checks to fail when -## compiling test programs fails due to warnings -## -## Regex: -## -## -Werror Literal -Werror -## \( Start optional capturing group -## = Literal equals sign -## [^[:space:]] Non-space characters -## \+ 1 or more of the above -## \) End optional capturing group -## \? 0 or 1 capturing group matches -## -## Note that the outer pair of '[]' ends up getting removed -WERROR_SED='s/-Werror\(=[[^[:space:]]]\+\)\?//g' -CFLAGS_SED="`echo $CFLAGS | sed -e $WERROR_SED`" -if test $? -eq 0; then - CFLAGS="$CFLAGS_SED" -fi -CXXFLAGS_SED="`echo $CXXFLAGS | sed -e $WERROR_SED`" -if test $? -eq 0; then - CXXFLAGS="$CXXFLAGS_SED" -fi -FCFLAGS_SED="`echo $FCFLAGS | sed -e $WERROR_SED`" -if test $? -eq 0; then - FCFLAGS="$FCFLAGS_SED" -fi -JAVACFLAGS_SED="`echo $JAVACFLAGS | sed -e $WERROR_SED`" -if test $? -eq 0; then - JAVACFLAGS="$JAVACFLAGS_SED" -fi -CPPFLAGS_SED="`echo $CPPFLAGS | sed -e $WERROR_SED`" -if test $? -eq 0; then - CPPFLAGS="$CPPFLAGS_SED" -fi - -## Support F9X variable to define Fortran compiler if FC variable is -## not used. This should be deprecated in the future. -if test "x" = "x$FC"; then - FC=${F9X} -fi - -## ---------------------------------------------------------------------- -## Dump all shell variables values. -## -AC_MSG_CHECKING([shell variables initial values]) -set >&AS_MESSAGE_LOG_FD -AC_MSG_RESULT([done]) - -## ---------------------------------------------------------------------- -## Save system information for the library settings file. -## -AC_SUBST([UNAME_INFO]) -UNAME_INFO=`uname -a` - -## ---------------------------------------------------------------------- -## Some platforms have broken basename, and/or xargs programs. Check -## that it actually does what it's supposed to do. Catch this early -## since configure and scripts relies upon them heavily and there's -## no use continuing if it's broken. -## -AC_MSG_CHECKING([if basename works]) -BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`" -if test $BASENAME_TEST != "basename_works"; then - AC_MSG_ERROR([basename program doesn't work]) -else - AC_MSG_RESULT([yes]) -fi - -## xargs basename used in configure to get the CC_BASENAME value -AC_MSG_CHECKING([if xargs works]) -XARGS_TEST="`echo /foo/bar/baz/qux/xargs_works | xargs basename`" -if test $XARGS_TEST != "xargs_works"; then - AC_MSG_ERROR([xargs program doesn't work]) -else - AC_MSG_RESULT([yes]) -fi - -## ---------------------------------------------------------------------- -## Check that the cache file was build on the same host as what we're -## running on now. -## -AC_CACHE_CHECK([for cached host], [hdf5_cv_host], [hdf5_cv_host="none"]); -if test $hdf5_cv_host = "none"; then - hdf5_cv_host=$host -elif test $hdf5_cv_host != $host; then - AC_MSG_ERROR([ - The config.cache file was generated on $hdf5_cv_host but - this is $host. Please remove that file and try again. - config.cache file is invalid]) -fi - -## ---------------------------------------------------------------------- -## Check if we should consider certain compiler warnings as errors -## -## We have to set WARNINGS_AS_ERRORS before sourcing a $host_config -## file, below. -## -## These should NOT be on by default as the risk of breakage is high -## when compiling HDF5 on new (or new versions) of platforms and -## compilers. It can also cause failures when header files we have no -## control over (e.g. MPI, HDFS) raise warnings. -## -AC_MSG_CHECKING([enable warnings as errors]) -AC_ARG_ENABLE([warnings-as-errors], - [AS_HELP_STRING([--enable-warnings-as-errors], - [Determines whether certain warnings will be - considered errors. This is mainly for use - by HDF5 library developers. - [default=no] - ])], - [WARNINGS_AS_ERRORS=$enableval]) - -## Set default -if test "X-$WARNINGS_AS_ERRORS" = X- ; then - WARNINGS_AS_ERRORS=no -fi - -case "X-$WARNINGS_AS_ERRORS" in - X-yes|X-no) - AC_MSG_RESULT([$WARNINGS_AS_ERRORS]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $WARNINGS_AS_ERRORS]) - ;; -esac - -## ---------------------------------------------------------------------- -## Source any special files that we need. These files normally aren't -## present but can be used by the maintainers to fine tune things like -## turning on debug or profiling flags for the compiler. The search order -## is: -## -## CPU-VENDOR-OS -## VENDOR-OS -## CPU-OS -## CPU-VENDOR -## OS -## VENDOR -## CPU -## -## If the `OS' ends with a version number then remove it. For instance, -## `freebsd3.1' would become `freebsd' - -case $host_os in - aix*) - host_os_novers=aix - ;; - freebsd*) - host_os_novers=freebsd - ;; - netbsd*) - host_os_novers=netbsd - ;; - solaris*) - host_os_novers=solaris - ;; - *) - host_os_novers=$host_os - ;; -esac - -host_config="none" -for f in $host_cpu-$host_vendor-$host_os \ - $host_cpu-$host_vendor-$host_os_novers \ - $host_vendor-$host_os \ - $host_vendor-$host_os_novers \ - $host_cpu-$host_os \ - $host_cpu-$host_os_novers \ - $host_cpu-$host_vendor \ - $host_os \ - $host_os_novers \ - $host_vendor \ - $host_cpu ; do - AC_MSG_CHECKING([for config $f]) - if test -f "$srcdir/config/$f"; then - host_config=$srcdir/config/$f - AC_MSG_RESULT([found]) - break - fi - AC_MSG_RESULT([no]) -done -if test "X$host_config" != "Xnone"; then - CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" - . $host_config -fi - -## Source any special site-specific file -hname="`hostname`" -while test -n "$hname"; do - file=$srcdir/config/site-specific/host-$hname - AC_MSG_CHECKING([for config $file]) - if test -f "$file"; then - . $file - AC_MSG_RESULT([found]) - break - fi - AC_MSG_RESULT([no]) - hname_tmp=$hname - hname="`echo $hname | cut -d. -f2-99`" - test "$hname_tmp" = "$hname" && break -done - -## -## Enable/disable sanitizer checks for clang compilers, initially address sanitizer -## -AC_MSG_CHECKING([for clang sanitizer checks]) -AC_ARG_ENABLE([sanitize-checks], - [AS_HELP_STRING([--enable-sanitize-checks=address], - [(clang/clang++ compilers only) Enable sanitize checks. - Address is useful for detecting issues dealing with - memory. See AddressSanitizer in config/sanitizer/README.md - for more information. - [default=none] - ])], - [CLANG_SANITIZE_CHECKS=$enableval]) - -# Set default -if test "X-$CLANG_SANITIZE_CHECKS" = X- ; then - CLANG_SANITIZE_CHECKS=none -fi - -if test "X$CC_BASENAME" = "Xclang"; then - AC_SUBST([CLANG_SANITIZE_CHECKS]) - - # There are several sanitizer tools. At present we are testing - # and describing only -fsanitizer=address with autotools. - case "X-$CLANG_SANITIZE_CHECKS" in - X-no|X-none) - CLANG_SANITIZE_CHECKS=none - CLANG_SANITIZE_LIST= - ;; - *) - CLANG_SANITIZE_LIST=$CLANG_SANITIZE_CHECKS - ;; - esac - AC_MSG_RESULT([$CLANG_SANITIZE_CHECKS]) - - # Other tools can be added to the list of checks - # The clang compiler doesn't support some of them; they should be - # checked before adding them to the list in the help message. - # The sanitizers/sanitizers.cmake file lists these options: - # address, memory, memoryWithOrigins, undefined, thread, leak, - # 'address;undefined'. Which and which combinations of these are - # supported varies by compiler version, but unsupported options - # or combinations will result in configure errors reported in config.log. - # Comma separated lists of sanitize options will be entered intact in - # one -fsanitize= flag. Space separated lists will be entered in - # separate -fsanitize= flags. - # NOTE: No sanity checking done here! - if test -n "$CLANG_SANITIZE_LIST"; then - H5_CFLAGS="$H5_CFLAGS -fno-omit-frame-pointer" - H5_CXXFLAGS="$H5_CXXFLAGS -fno-omit-frame-pointer" - for sanitizer in `echo $CLANG_SANITIZE_LIST`; do - H5_CFLAGS="$H5_CFLAGS -fsanitize=${sanitizer}" - H5_CXXFLAGS="$H5_CXXFLAGS -fsanitize=${sanitizer}" - done - fi -fi - -## ---------------------------------------------------------------------- -## Determine build mode (debug, production, clean). -## This has to be done early since the build mode is referred to -## frequently. -## -AC_MSG_CHECKING([build mode]) -AC_ARG_ENABLE([build-mode], - [AS_HELP_STRING([--enable-build-mode=(debug|production|clean)], - [Sets the build mode. Debug turns on symbols, API - tracing, asserts, and debug optimization, - as well as several other minor configure options - that aid in debugging. - Production turns high optimizations on. - Clean turns nothing on and disables optimization - (i.e.: a 'clean slate' configuration). - All these settings can be overridden by using - specific configure flags. - [default=debug] - ])], - [BUILD_MODE=$enableval]) - -## Set the default -## Depends on branch, set via script at branch creation time -if test "X-$BUILD_MODE" = X- ; then - BUILD_MODE=debug -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([BUILD_MODE]) - -case "X-$BUILD_MODE" in - X-clean) - AC_MSG_RESULT([clean]) - ;; - X-debug) - AC_DEFINE([DEBUG_BUILD], [1], [Define if this is a debug build.]) - H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS" - AC_MSG_RESULT([debug]) - ;; - X-production) - H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS" - AC_MSG_RESULT([production]) - ;; - *) - AC_MSG_ERROR([Unrecognized build mode: $BUILD_MODE. Use debug, production, or clean.]) -esac - -## ---------------------------------------------------------------------- -## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so -## we need to add this in so configure works as intended. We will need to -## reset this value at the end of configure, to preserve the user's settings. -CFLAGS="${AM_CFLAGS} ${CFLAGS}" -FCFLAGS="${AM_FCFLAGS} ${FCFLAGS}" -JAVACFLAGS="${AM_JAVACFLAGS} ${JAVACFLAGS}" -JAVAFLAGS="${AM_JAVAFLAGS} ${JAVAFLAGS}" -CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" -CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}" -LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}" - -## ---------------------------------------------------------------------- -## Enable dependency tracking unless the configure options or a -## site-specific file told us not to. This prevents configure from -## silently disabling dependencies for some compilers. -## -if test -z "${enable_dependency_tracking}"; then - enable_dependency_tracking="yes" -fi - -## ---------------------------------------------------------------------- -## Check for programs. -## -AC_PROG_CC -CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" - -## ---------------------------------------------------------------------------- -## Configure disallows unsupported combinations of options. However, users -## may want to override and build with unsupported combinations for their -## own use. They can use the --enable-unsupported configure flag, which -## ignores any errors from configure due to incompatible flags. -AC_MSG_CHECKING([if unsupported combinations of configure options are allowed]) -AC_ARG_ENABLE([unsupported], - [AS_HELP_STRING([--enable-unsupported], - [Allow unsupported combinations of configure options])], - [ALLOW_UNSUPPORTED=$enableval]) - -case "X-$ALLOW_UNSUPPORTED" in - X-|X-no) - AC_MSG_RESULT([no]) - ;; - X-yes) - AC_MSG_RESULT([yes]) - ;; - *) - ;; -esac - -## ---------------------------------------------------------------------- -## Data types and their sizes. -## -AC_TYPE_OFF_T -AC_CHECK_TYPE([ssize_t], [], - [AC_DEFINE_UNQUOTED([ssize_t], [long], - [Define to `long' if does not define.])]) -AC_C_BIGENDIAN -AC_CHECK_SIZEOF([char]) -AC_CHECK_SIZEOF([short]) -AC_CHECK_SIZEOF([int]) -AC_CHECK_SIZEOF([unsigned]) -AC_CHECK_SIZEOF([long]) -AC_CHECK_SIZEOF([long long]) -AC_CHECK_SIZEOF([float]) -AC_CHECK_SIZEOF([double]) -AC_CHECK_SIZEOF([long double]) - -#----------------------------------------------------------------------------- -# Option for enabling/disabling support for non-standard features, datatypes, -# etc. These features should still be checked for at configure time, but these -# options allow disabling of support for these features when compiler support -# is incomplete or broken. In this case, configure time checks may not be -# enough to properly enable/disable a feature and can cause library build -# problems. -#----------------------------------------------------------------------------- -AC_MSG_CHECKING([if non-standard feature support is enabled]) -AC_ARG_ENABLE([nonstandard-features], - [AS_HELP_STRING([--enable-nonstandard-features], - [Enable support for non-standard programming language features [default=yes]])], - [NONSTANDARD_FEATURES=$enableval]) - -## Set default -if test "X-$NONSTANDARD_FEATURES" = X- ; then - NONSTANDARD_FEATURES=yes -fi - -case "X-$NONSTANDARD_FEATURES" in - X-yes|X-no) - AC_MSG_RESULT([$NONSTANDARD_FEATURES]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $NONSTANDARD_FEATURES]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check if _Float16 support is available -## -AC_MSG_CHECKING([if _Float16 support is enabled]) -AC_ARG_ENABLE([nonstandard-feature-float16], - [AS_HELP_STRING([--enable-nonstandard-feature-float16], - [Enable support for _Float16 C datatype [default=yes]])], - [ENABLE_FLOAT16=$enableval]) - -## Set default -if test "X-$ENABLE_FLOAT16" = X- ; then - ENABLE_FLOAT16=$NONSTANDARD_FEATURES -fi - -case "X-$ENABLE_FLOAT16" in - X-yes|X-no) - AC_MSG_RESULT([$ENABLE_FLOAT16]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $ENABLE_FLOAT16]) - ;; -esac - -HAVE__FLOAT16="no" -if test "X$ENABLE_FLOAT16" = "Xyes"; then - AC_MSG_NOTICE([checking if _Float16 support is available]) - AC_CHECK_SIZEOF([_Float16]) - if test "$ac_cv_sizeof__Float16" != 0; then - # Some compilers expose the _Float16 datatype, but not the macros and - # functions used with the datatype. We need the macros for proper - # datatype conversion support. Check for these here. - AC_CHECK_DECL([FLT16_EPSILON], [], [], [[ - #define __STDC_WANT_IEC_60559_TYPES_EXT__ - #include ]]) - AC_CHECK_DECL([FLT16_MIN], [], [], [[ - #define __STDC_WANT_IEC_60559_TYPES_EXT__ - #include ]]) - AC_CHECK_DECL([FLT16_MAX], [], [], [[ - #define __STDC_WANT_IEC_60559_TYPES_EXT__ - #include ]]) - AC_CHECK_DECL([FLT16_MIN_10_EXP], [], [], [[ - #define __STDC_WANT_IEC_60559_TYPES_EXT__ - #include ]]) - AC_CHECK_DECL([FLT16_MAX_10_EXP], [], [], [[ - #define __STDC_WANT_IEC_60559_TYPES_EXT__ - #include ]]) - AC_CHECK_DECL([FLT16_MANT_DIG], [], [], [[ - #define __STDC_WANT_IEC_60559_TYPES_EXT__ - #include ]]) - - if test "X$ac_cv_have_decl_FLT16_EPSILON" = "Xyes" && - test "X$ac_cv_have_decl_FLT16_MIN" = "Xyes" && - test "X$ac_cv_have_decl_FLT16_MAX" = "Xyes" && - test "X$ac_cv_have_decl_FLT16_MIN_10_EXP" = "Xyes" && - test "X$ac_cv_have_decl_FLT16_MAX_10_EXP" = "Xyes" && - test "X$ac_cv_have_decl_FLT16_MANT_DIG" = "Xyes" ; then - # Some compilers like OneAPI on Windows appear to detect _Float16 support - # properly up to this point, and, in the absence of any architecture-specific - # tuning compiler flags, will generate code for H5Tconv.c that performs - # software conversions on _Float16 variables with compiler-internal functions - # such as __extendhfsf2, __truncsfhf2, or __truncdfhf2. However, these - # compilers will fail to link these functions into the build for currently - # unknown reasons and cause the build to fail. Since these are compiler-internal - # functions that we don't appear to have much control over, let's try to - # compile a program that will generate these functions to check for _Float16 - # support. If we fail to compile this program, we will simply disable - # _Float16 support for the time being. - AC_MSG_CHECKING([if compiler can correctly compile and run a test program which converts _Float16 to other types with casts]) - TEST_SRC="`(echo \"#define H5_FLOAT16_CONVERSION_FUNCS_LINK_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - AC_CACHE_VAL([hdf5_cv_float16_conversion_funcs_link], - [AC_RUN_IFELSE( - [AC_LANG_SOURCE([$TEST_SRC])], - [hdf5_cv_float16_conversion_funcs_link=yes], - [hdf5_cv_float16_conversion_funcs_link=no], - [hdf5_cv_float16_conversion_funcs_link=no])]) - AC_MSG_RESULT(${hdf5_cv_float16_conversion_funcs_link}) - - # Some compilers, notably AppleClang on MacOS 12, will succeed in the - # configure check above when optimization flags like -O3 are manually - # passed in CFLAGS. However, the build will then fail when it reaches - # compilation of H5Tconv.c because of the issue mentioned above. MacOS - # 13 appears to have fixed this, but, just to be sure, make sure the - # check also passes without the passed in CFLAGS. - conftest_cflags_backup="$CFLAGS" - CFLAGS="" - - AC_MSG_CHECKING([if compiler can correctly compile and run a test program which converts _Float16 to other types with casts (without CFLAGS)]) - TEST_SRC="`(echo \"#define H5_FLOAT16_CONVERSION_FUNCS_LINK_NO_FLAGS_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - AC_CACHE_VAL([hdf5_cv_float16_conversion_funcs_link_no_flags], - [AC_RUN_IFELSE( - [AC_LANG_SOURCE([$TEST_SRC])], - [hdf5_cv_float16_conversion_funcs_link_no_flags=yes], - [hdf5_cv_float16_conversion_funcs_link_no_flags=no], - [hdf5_cv_float16_conversion_funcs_link_no_flags=no])]) - AC_MSG_RESULT(${hdf5_cv_float16_conversion_funcs_link_no_flags}) - - CFLAGS="$conftest_cflags_backup" - - if test ${hdf5_cv_float16_conversion_funcs_link} = "yes" && - test ${hdf5_cv_float16_conversion_funcs_link_no_flags} = "yes"; then - # Finally, MacOS 13 appears to have a bug specifically when converting - # long double values to _Float16. Release builds of the dt_arith test - # would cause any assignments to a _Float16 variable to be elided, - # whereas Debug builds would perform incorrect hardware conversions by - # simply chopping off all the bytes of the value except for the first 2. - # These tests pass on MacOS 14, so let's perform a quick test to check - # if the hardware conversion is done correctly. - AC_MSG_CHECKING([if compiler can correctly convert long double values to _Float16]) - TEST_SRC="`(echo \"#define H5_LDOUBLE_TO_FLOAT16_CORRECT_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_ldouble_to_float16_correct=${hdf5_cv_ldouble_to_float16_correct=no} - else - AC_CACHE_VAL([hdf5_cv_ldouble_to_float16_correct], - [AC_RUN_IFELSE( - [AC_LANG_SOURCE([$TEST_SRC])], - [hdf5_cv_ldouble_to_float16_correct=yes], - [hdf5_cv_ldouble_to_float16_correct=no], - [hdf5_cv_ldouble_to_float16_correct=yes])]) - fi - AC_MSG_RESULT(${hdf5_cv_ldouble_to_float16_correct}) - - # Backup and clear CFLAGS before performing configure check again - conftest_cflags_backup="$CFLAGS" - CFLAGS="" - - AC_MSG_CHECKING([if compiler can correctly convert long double values to _Float16 (without CFLAGS)]) - TEST_SRC="`(echo \"#define H5_LDOUBLE_TO_FLOAT16_CORRECT_NO_FLAGS_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_ldouble_to_float16_correct_no_flags=${hdf5_cv_ldouble_to_float16_correct_no_flags=no} - else - AC_CACHE_VAL([hdf5_cv_ldouble_to_float16_correct_no_flags], - [AC_RUN_IFELSE( - [AC_LANG_SOURCE([$TEST_SRC])], - [hdf5_cv_ldouble_to_float16_correct_no_flags=yes], - [hdf5_cv_ldouble_to_float16_correct_no_flags=no], - [hdf5_cv_ldouble_to_float16_correct_no_flags=yes])]) - fi - AC_MSG_RESULT(${hdf5_cv_ldouble_to_float16_correct_no_flags}) - - CFLAGS="$conftest_cflags_backup" - - if test ${hdf5_cv_ldouble_to_float16_correct} = "yes" && - test ${hdf5_cv_ldouble_to_float16_correct_no_flags} = "yes"; then - AC_DEFINE([LDOUBLE_TO_FLOAT16_CORRECT], [1], - [Define if your system can convert long double to _Float16 values correctly.]) - else - AC_MSG_NOTICE([Conversions from long double to _Float16 appear to be incorrect. These will be emulated through a soft conversion function.]) - fi - - HAVE__FLOAT16="yes" - - # Check if we can use fabsf16 - AC_CHECK_FUNC([fabsf16], [AC_DEFINE([HAVE_FABSF16], [1], - [Define if has fabsf16 function])], []) - - # Define HAVE__FLOAT16 macro for H5pubconf.h if _Float16 is available. - AC_DEFINE([HAVE__FLOAT16], [1], [Determine if _Float16 is available]) - fi - fi - - AC_MSG_CHECKING([if _Float16 support is enabled]) - AC_MSG_RESULT([$HAVE__FLOAT16]) - fi -else - AC_DEFINE([SIZEOF__FLOAT16], [0]) -fi - -# Define HAVE__FLOAT16 value to substitute into other files for conditional testing -AC_SUBST([HAVE__FLOAT16]) - -## ---------------------------------------------------------------------- -## Check if the Fortran interface should be enabled -## - -## This needs to be exposed for the library info file even if Fortran is disabled. -AC_SUBST([HDF_FORTRAN]) - -## Default is no Fortran -HDF_FORTRAN=no - -AC_SUBST([HDF5_INTERFACES]) HDF5_INTERFACES="" -AC_MSG_CHECKING([if Fortran interface enabled]) -AC_ARG_ENABLE([fortran], - [AS_HELP_STRING([--enable-fortran], - [Compile the Fortran interface [default=no]])], - [HDF_FORTRAN=$enableval]) - -AC_MSG_RESULT([$HDF_FORTRAN]) - -if test "X$HDF_FORTRAN" = "Xyes"; then - - ## ---------------------------------------------------------------------- - ## __float128 checks - ## - ## If __float128 exists and we can determine its precision, we will use - ## it in the Fortran interface. The checks for this require that the - ## precision be specified via a symbol named FLT128_DIG, which might be - ## found in quadmath.h. - ## - ## The checks here are based on the GNU __float128 extension type from - ## libquadmath, which is now part of gcc. Other compilers (clang, Intel) - ## also expose __float128 and/or __float128 may be an alias for some - ## other 128-bit floating point type. - ## - ## 128-bit floating-point math is usually handled in software and is thus - ## orders of magnitude slower than hardware-supported floating-point math. - ## - AC_MSG_CHECKING([if __float128 exists]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[__float128 x; return 0;]])], - [HAVE___FLOAT128=1; AC_MSG_RESULT([yes])], - [HAVE___FLOAT128=0; AC_MSG_RESULT([no])] - ) - - ## gcc puts symbols like FLT128_DIG in quadmath.h instead of float.h, - ## so check for that before running the precision macro. Note that - ## using AC_CHECK_HEADER instead of AC_CHECK_HEADERS keeps the - ## H5_HAVE_QUADMATH_H symbol out of the public config header. - ## - AC_CHECK_HEADER([quadmath.h], [INCLUDE_QUADMATH_H=1], [INCLUDE_QUADMATH_H=0]) - - ## ---------------------------------------------------------------------- - ## Get the max decimal precision in C, checking both long double and - ## __float128 (if available) - ## - AC_MSG_CHECKING([maximum decimal precision for C]) - - MY_FLT128_DIG=0 - MY_LDBL_DIG=0 - - ## Macro to compare long double and __float128 to see which has higher precision - PAC_FC_LDBL_DIG - - ## Set results - if test "$MY_FLT128_DIG" -gt "$MY_LDBL_DIG" ; then - PAC_C_MAX_REAL_PRECISION=$MY_FLT128_DIG - PRECISION_TYPE="(__float128)" - else - PAC_C_MAX_REAL_PRECISION=$MY_LDBL_DIG - PRECISION_TYPE="(long double)" - fi - AC_MSG_RESULT([$PAC_C_MAX_REAL_PRECISION $PRECISION_TYPE]) - - ## Store results in config file - AC_SUBST([PAC_C_MAX_REAL_PRECISION]) - AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $PAC_C_MAX_REAL_PRECISION, [Determine the maximum decimal precision in C]) - - ## Are we going to use __float128? - AC_MSG_CHECKING([if __float128 will be used in the Fortran wrappers]) - - if test "$MY_FLT128_DIG" -gt "$MY_LDBL_DIG" ; then - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 will be used in the Fortran wrappers]) - AC_CHECK_SIZEOF([__float128]) - else - ## Can't use __float128, but write an undef line anyway - AC_MSG_RESULT([no]) - AH_TEMPLATE([HAVE_FLOAT128], [Determine if __float128 will be used in the Fortran wrappers]) - fi - - ## ---------------------------------------------------------------------- - ## Define interface version - ## - VERS_MAJOR=`cat $srcdir/src/H5public.h | sed -n 's/^#define H5_VERS_MAJOR //p'` - VERS_MINOR=`cat $srcdir/src/H5public.h | sed -n 's/^#define H5_VERS_MINOR //p'` - VERS_RELEASE=`cat $srcdir/src/H5public.h | sed -n 's/^#define H5_VERS_RELEASE //p'` - AC_DEFINE_UNQUOTED([VERS_MAJOR_TMP], $VERS_MAJOR, [Define major library version]) - AC_DEFINE_UNQUOTED([VERS_MINOR_TMP], $VERS_MINOR, [Define minor library version]) - AC_DEFINE_UNQUOTED([VERS_RELEASE_TMP], $VERS_RELEASE, [Define release library version]) - - ## We will output an include file for Fortran, H5config_f.inc which - ## contains various configure definitions used by the Fortran Library. - ## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro - ## names and those generated by another software package that uses the HDF5 library. - AC_CONFIG_HEADERS([fortran/src/H5config_f.inc], - [cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; sed -i 's\_TMP\\g' fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc]) - - AC_SUBST([FC]) - - HDF5_INTERFACES="$HDF5_INTERFACES fortran" - - ## -------------------------------------------------------------------- - ## HDF5 integer variables for the H5fortran_types.f90 file. - ## - AC_SUBST([R_LARGE]) - AC_SUBST([R_INTEGER]) - AC_SUBST([HADDR_T]) - AC_SUBST([HSIZE_T]) - AC_SUBST([HSSIZE_T]) - AC_SUBST([HID_T]) - AC_SUBST([SIZE_T]) - AC_SUBST([OBJECT_NAMELEN_DEFAULT_F]) - - ## -------------------------------------------------------------------- - ## Fortran source extension - ## - AC_FC_SRCEXT([f90]) - - AC_SUBST([F9XSUFFIXFLAG]) - AC_SUBST([FSEARCH_DIRS]) - - ## -------------------------------------------------------------------- - ## Check for a Fortran compiler and how to include modules. - ## - AC_PROG_FC([PAC_FC_SEARCH_LIST],) - AC_F9X_MODS - - ## Allow setting the fortran module install dir - AC_ARG_WITH([fmoddir], - [AS_HELP_STRING([--with-fmoddir=DIR], [Fortran module install directory])], - [fmoddir=$withval], - [fmoddir="\${includedir}"]) - AC_SUBST([fmoddir], [$fmoddir]) - - ## Change to the Fortran 90 language - AC_LANG_PUSH(Fortran) - - ## Checking if the compiler supports the required Fortran 2003 features and - ## stopping if it does not. - PAC_PROG_FC_HAVE_F2003_REQUIREMENTS - - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran]) - fi - ## Checking if the compiler supports fortran character being allocatable - PAC_HAVE_CHAR_ALLOC - - ## -------------------------------------------------------------------- - ## Define wrappers for the C compiler to use Fortran function names - ## - AC_FC_WRAPPERS - - ## -------------------------------------------------------------------- - ## See if the fortran compiler supports the intrinsic function "SIZEOF" - PAC_PROG_FC_SIZEOF - - ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" - PAC_PROG_FC_C_SIZEOF - - ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - PAC_PROG_FC_STORAGE_SIZE - - ## -------------------------------------------------------------------- - ## Checking if the fortran compiler supports ISO_FORTRAN_ENV (Fortran 2008) - HAVE_ISO_FORTRAN_ENV="0" - PAC_PROG_FC_ISO_FORTRAN_ENV - if test "X$CHECK_ISO_FORTRAN_ENV" = "Xyes"; then - HAVE_ISO_FORTRAN_ENV="1" - AC_DEFINE([HAVE_ISO_FORTRAN_ENV], [1], [Define if Fortran supports ISO_FORTRAN_ENV (F08)]) - fi - - ## Set the sizeof function for use later in the fortran tests - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then - FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - FC_SIZEOF_B="STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - FC_SIZEOF_C="STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - else - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then - FC_SIZEOF_A="SIZEOF(a)" - FC_SIZEOF_B="SIZEOF(b)" - FC_SIZEOF_C="SIZEOF(c)" - else - ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) - fi - fi - - ## Check KIND and size of native integer - PAC_FC_NATIVE_INTEGER - - ## Find all available KINDs - if test "X$HAVE_ISO_FORTRAN_ENV" = "X1";then - PAC_FC_AVAIL_KINDS_F08 - else - PAC_FC_AVAIL_KINDS - fi - - ## Find all SIZEOFs for available KINDs - PAC_FC_SIZEOF_INT_KINDS - PAC_FC_SIZEOF_REAL_KINDS - - AC_SUBST([PAC_FC_ALL_REAL_KINDS]) - AC_SUBST([PAC_FC_MAX_REAL_PRECISION]) - AC_SUBST([PAC_FORTRAN_NUM_INTEGER_KINDS]) - AC_SUBST([PAC_FC_ALL_INTEGER_KINDS]) - AC_SUBST([PAC_FC_ALL_REAL_KINDS_SIZEOF]) - AC_SUBST([PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) - AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_KIND]) - AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_SIZEOF]) - AC_SUBST([PAC_FORTRAN_NATIVE_REAL_KIND]) - AC_SUBST([PAC_FORTRAN_NATIVE_REAL_SIZEOF]) - AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) - AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) - AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) - AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) - AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE]) - AC_SUBST([FORTRAN_C_BOOL_IS_UNIQUE]) - AC_SUBST([HAVE_ISO_FORTRAN_ENV]) - AC_SUBST([H5CONFIG_F_NUM_RKIND]) - AC_SUBST([H5CONFIG_F_RKIND]) - AC_SUBST([H5CONFIG_F_RKIND_SIZEOF]) - AC_SUBST([H5CONFIG_F_NUM_IKIND]) - AC_SUBST([H5CONFIG_F_IKIND]) - AC_SUBST([Fortran_COMPILER_ID]) - Fortran_COMPILER_ID=none - AC_DEFINE_UNQUOTED([Fortran_COMPILER_ID], $Fortran_COMPILER_ID, [Define Fortran compiler ID]) - - ## Setting definition if there is a 16 byte fortran integer - if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then - HAVE_Fortran_INTEGER_SIZEOF_16="1" - AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [1], [Determine if INTEGER*16 is available]) - else - HAVE_Fortran_INTEGER_SIZEOF_16="0" - AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [0], [Determine if INTEGER*16 is available]) - fi - - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then - AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) - fi - - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then - AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) - fi - - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then - AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) - fi - - if test "X$HAVE_CHAR_ALLOC_FORTRAN" = "Xyes"; then - AC_DEFINE([FORTRAN_HAVE_CHAR_ALLOC], [1], [Define if Fortran supports allocatable character]) - fi - - ## See if C_LONG_DOUBLE is available - PAC_PROG_FC_HAVE_C_LONG_DOUBLE - - FORTRAN_HAVE_C_LONG_DOUBLE="0" - if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_C_LONG_DOUBLE="1" - AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) - fi - - ## Is C_LONG_DOUBLE different from C_DOUBLE - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - if test "$FORTRAN_HAVE_C_LONG_DOUBLE" = "1"; then - PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE - if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" - AC_DEFINE([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE], [1], [Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) - else - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - fi - fi - - ## Is C_BOOL different from default LOGICAL - FORTRAN_C_BOOL_IS_UNIQUE="0" - PAC_PROG_FC_C_BOOL_EQ_LOGICAL - if test "X$C_BOOL_IS_UNIQUE_FORTRAN" = "Xyes"; then - FORTRAN_C_BOOL_IS_UNIQUE="1" - AC_DEFINE([FORTRAN_C_BOOL_IS_UNIQUE], [1], [Define if Fortran C_BOOL is different from default LOGICAL]) - else - FORTRAN_C_BOOL_IS_UNIQUE="0" - fi - - FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} - AC_DEFINE_UNQUOTED([FORTRAN_SIZEOF_LONG_DOUBLE], ["${ac_cv_sizeof_long_double}"], [Determine the size of C long double]) - - dnl get the largest sizeof for REAL kinds - max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -ne 's/.*,\([[0-9]]*\)}/\1/p'`" - max_real_fortran_kind="`echo $PAC_FC_ALL_REAL_KINDS | sed -ne 's/.*,\([[0-9]]*\)}/\1/p'`" - - dnl remove the invalid kind from the list - if test "$ac_cv_sizeof___float128" != 0;then - if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && - test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof" && - dnl account for the fact that the C compiler can have 16-byte __float128 and the Fortran compiler only has 8-byte doubles, - dnl so we don't want to remove the 8-byte Fortran doubles. This is sometimes the case if different C and Fortran vendors - dnl are used (for example gnu and pgi). - test "${ac_cv_sizeof_double}" != "$max_real_fortran_sizeof" ; then - AC_MSG_WARN([ - Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size - !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - ]) - PAC_FC_ALL_REAL_KINDS="`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/,[[0-9]]\+}/}/g'`" - PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/,[[0-9]]\+}/}/g'`" - - fi - fi - AC_MSG_CHECKING([for Fortran interoperable KINDS with C]) - AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) - - dnl count the number of real kinds - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | tr -d -c ',\n' | awk '{ print length + 1; }'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g' | sed -e 's/ /,/g'`/)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'| sed -e 's/ /,/g'`/)" - - AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND_SIZEOF], $H5CONFIG_F_RKIND_SIZEOF, [Define valid Fortran REAL KINDs Sizeof]) - -## Change back to the C language - AC_LANG_POP(Fortran) -else - FC="no" -fi - -## ---------------------------------------------------------------------- -## Check if they would like the C++ interface compiled -## -## This needs to be exposed for the library info file even if C++ is disabled. -AC_SUBST([HDF_CXX]) - -## Default is no C++ -HDF_CXX=no - -## We need to check for a C++ compiler unconditionally, since -## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will -## miss even if c++ is not enabled. -AC_PROG_CXX -AC_PROG_CXXCPP - -AC_MSG_CHECKING([if c++ interface enabled]) - -AC_ARG_ENABLE([cxx], - [AS_HELP_STRING([--enable-cxx], - [Compile the C++ interface [default=no]])], - [HDF_CXX=$enableval]) -AC_MSG_RESULT([$HDF_CXX]) - -if test "X$HDF_CXX" = "Xyes"; then - HDF5_INTERFACES="$HDF5_INTERFACES c++" - - ## Expose the compiler for *.in files - AC_SUBST([CXX]) - - ## Change to the C++ language - AC_LANG_PUSH(C++) - -else - CXX="no" -fi - -## Change back to the C language -AC_LANG_POP(C++) - - -## ---------------------------------------------------------------------- -## Check if they would like the High Level library compiled -## - -## This needs to be exposed for the library info file even if the HL -## library is disabled. -AC_SUBST([HDF5_HL]) -AC_SUBST([HDF5_HL_TOOLS]) -AC_SUBST([HDF5_HL_GIF_TOOLS]) - -## The high-level library and high-level tools are enabled unless the build mode -## is clean. -if test "X-$BUILD_MODE" = "X-clean" ; then - HDF5_HL=no - HDF5_HL_TOOLS=no -else - HDF5_HL=yes - HDF5_HL_TOOLS=yes -fi - -## high-level library directories (set when needed, blank until then) -## -## main high-level library -AC_SUBST(HL) -HL="" -## Fortran high-level library -AC_SUBST(HL_FOR) -HL_FOR="" -## Tools high-level library -AC_SUBST(HL_TOOLS) -HL_TOOLS="" - -AC_MSG_CHECKING([if the high-level library is enabled]) -AC_ARG_ENABLE([hl], - [AS_HELP_STRING([--enable-hl], - [Enable the high-level library. - [default=yes (unless build mode = clean)] - ])], - [HDF5_HL=$enableval]) - -if test "X-$HDF5_HL" = "X-yes"; then - AC_MSG_RESULT([yes]) - HL="hl" - AC_DEFINE([INCLUDE_HL], [1], - [Define if the high-level library headers should be included in hdf5.h]) -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Enable new references for dimension scales -## -AC_SUBST([DIMENSION_SCALES_WITH_NEW_REF]) -AC_MSG_CHECKING([whether to use new references with dimension scales]); -AC_ARG_ENABLE([dimension-scales-with-new-ref], - [AS_HELP_STRING([--enable-dimension-scales-with-new-ref], - [Use new references when creating dimension scales. - [default=no] - ])], - [DIMENSION_SCALES_WITH_NEW_REF=$enableval]) - -## Set the default value to use old references. -if test "X-$DIMENSION_SCALES_WITH_NEW_REF" = X- ; then - DIMENSION_SCALES_WITH_NEW_REF=no -fi - -case "X-$DIMENSION_SCALES_WITH_NEW_REF" in - X-yes) - AC_MSG_RESULT([yes]) - AC_DEFINE([DIMENSION_SCALES_WITH_NEW_REF], [1], - [Define if new references for dimension scales were requested]) - - ;; - X-no) - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $DIMENSION_SCALES_WITH_NEW_REF]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check which archiving tool to use. This needs to be done before -## the LT_INIT macro. -## -if test -z "$AR"; then - AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH]) -fi -AC_SUBST([AR]) - -# Set the default ar flags to cr -# The Automake default is to use cru and the 'u' causes ar -# to emit warnings on some platforms. -AR_FLAGS=cr - - -## Export the AR macro so that it will be placed in the libtool file -## correctly. -export AR - -AC_PROG_MAKE_SET -AC_PROG_INSTALL - - -## ---------------------------------------------------------------------- -## Set up ${TR} which is used to process the package list for extra -## debugging output in the C library. - -AC_PATH_PROG([TR], [tr]) - - -## ---------------------------------------------------------------------- -## Check that time can be used with srcdir. This is okay on most systems, -## but seems to cause problems on Cygwin. -## The solution on Cygwin is not to record execution time for tests. -## -## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- -## and 64-bit platforms. Given how long this has been true, it seems -## unlikely to change, but we should probably re-test this periodically. - -AC_MSG_CHECKING([if srcdir= and time commands work together]) - -AC_SUBST([TIME]) -TIME=time -TIME_TEST=`foo="bar" ${TIME} echo 'baz' 2> /dev/null | grep baz` - -if test "X${TIME_TEST}" = "Xbaz"; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) - TIME= -fi - - -## The following variables are used to distinguish between building a -## serial and parallel library. -## -## HAVE_PARALLEL -- defined in H5config.h if we are building -## a parallel library even if configure wasn't -## able to find some header file or library that -## might be required. This is defined if the -## user explicitly states -## that a parallel library is being built by supplying -## the `--enable-parallel' configure switch. -## -## PARALLEL -- This variable is set to a non-null value if -## we're building a parallel version of the library. -## -## RUNSERIAL -- This is a command which will be prepended to -## the executable name to run the executable using -## a single process. For serial versions of the -## library this will normally be empty. For parallel -## versions it might be something like `mpiexec -n 1'. -## The value of this variable is substituted in *.in -## files. -## -## RUNPARALLEL -- This is a command which will be prepended to -## the executable name to run the executable on -## multiple processors. For the serial library the -## value will normally be the empty string. For -## parallel library it should be something like -## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will -## eventually contain the number of processors on which -## to run the executable (the double dollarsigns are to -## protect the expansion until make executes the -## command). The value of this variable is -## substituted in *.in files. -## -AC_SUBST([PARALLEL]) -AC_SUBST([RUNSERIAL]) -AC_SUBST([RUNPARALLEL]) -AC_SUBST([TESTPARALLEL]) - -## ---------------------------------------------------------------------- -## Check if they would like the Java native interface (JNI) compiled -## - -## This needs to be exposed for the library info file even if Java is disabled. -AC_SUBST([HDF_JAVA]) - -## Default is no Java -HDF_JAVA=no - -AC_SUBST([H5_CLASSPATH]) H5_CLASSPATH="" -AC_MSG_CHECKING([if Java JNI interface enabled]) - -AC_ARG_ENABLE([java], - [AS_HELP_STRING([--enable-java], - [Compile the Java JNI interface [default=no]])], - [HDF_JAVA=$enableval]) - -if test "X$HDF_JAVA" = "Xyes"; then - if test "X${enable_shared}" != "Xno"; then - AC_MSG_RESULT([yes]) - if test "X$CLASSPATH" = "X"; then - H5_CLASSPATH=".:$srcdir/java/lib" - else - H5_CLASSPATH=".:$CLASSPATH:$srcdir/java/lib" - fi - ## Checks for programs. - AX_JAVA_OPTIONS - H5_JAVACFLAGS=$JAVACFLAGS - H5_JAVAFLAGS=$JAVAFLAGS - AX_PROG_JAVAC - AX_PROG_JAVA - AX_PROG_JAR - AX_PROG_JAVADOC - ## Find the include directories needed for building JNI code - AX_JNI_INCLUDE_DIR() - for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS - do - JNIFLAGS="$JNIFLAGS -I$JNI_INCLUDE_DIR" - done - ## Find junit for testing the JNI code - AX_CHECK_CLASSPATH() - CLASSPATH_ENV=$H5_CLASSPATH - AX_CHECK_JUNIT() - AX_CHECK_JAVA_HOME - - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR([Java requires shared libraries to be built]) - HDF_JAVA="no" - AC_MSG_RESULT([no]) - fi -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Fortran libraries are not currently supported on Mac. Disable them. -## (this is overridable with --enable-unsupported). -## -AC_SUBST([H5_FORTRAN_SHARED]) -H5_FORTRAN_SHARED="no" -if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then - AC_MSG_CHECKING([if shared Fortran libraries are supported]) - H5_FORTRAN_SHARED="yes" - - ## Report results of check(s) - - if test "X${H5_FORTRAN_SHARED}" = "Xno"; then - AC_MSG_RESULT([no]) - AC_MSG_WARN([$CHECK_WARN]) - if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - AC_MSG_WARN([Disabling shared Fortran libraries.]) - AC_MSG_WARN([To override this behavior, please use --enable-unsupported configure option.]) - if test "X${enable_static}" = "Xno"; then - AC_MSG_ERROR([both static and shared Fortran libraries are disabled]) - fi - else - AC_MSG_WARN([Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag]) - H5_FORTRAN_SHARED="yes" - fi - else - AC_MSG_RESULT([yes]) - fi -fi - -AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"]) - -## ---------------------------------------------------------------------- -## Check if they would like to disable building tests -## - -## This needs to be exposed for the library info file. -AC_SUBST([HDF5_TESTS]) - -## Default is to build tests -HDF5_TESTS=yes - -AC_MSG_CHECKING([if building tests is disabled]) - -AC_ARG_ENABLE([tests], - [AS_HELP_STRING([--enable-tests], - [Compile the HDF5 tests [default=yes]])], - [HDF5_TESTS=$enableval]) - -AC_MSG_RESULT([$HDF5_TESTS]) - -## These need to be exposed for some tests. -AC_SUBST([H5_UTILS_TEST_BUILDDIR]) -H5_UTILS_TEST_BUILDDIR='utils/test' -AC_SUBST([H5_TEST_BUILDDIR]) -H5_TEST_BUILDDIR='test' - -## ---------------------------------------------------------------------- -## Check what level of testing should be enabled -## - -## Default is quickest testing -TEST_EXPRESS_LEVEL_DEFAULT=3 - -AC_MSG_CHECKING([if HDF5 testing intensity level is set]) - -AC_ARG_ENABLE([test-express], - [AS_HELP_STRING([--enable-test-express=(0-3)], - [Set HDF5 testing intensity level (0-3) [0 = exhaustive testing; 3 = quicker testing; default=3] Set environment variable HDF5TestExpress to override configured setting])], - [TEST_EXPRESS_LEVEL_DEFAULT=$enableval]) - -case "X-$TEST_EXPRESS_LEVEL_DEFAULT" in - X-0|X-1|X-2|X-3) - AC_MSG_RESULT([$TEST_EXPRESS_LEVEL_DEFAULT]) - ;; - *) - AC_MSG_RESULT([error]) - AC_MSG_ERROR([$TEST_EXPRESS_LEVEL_DEFAULT is not a valid test express level]) - ;; -esac - -AC_DEFINE_UNQUOTED([TEST_EXPRESS_LEVEL_DEFAULT], [$TEST_EXPRESS_LEVEL_DEFAULT], [HDF5 testing intensity level]) - -## ---------------------------------------------------------------------- -## Check if they would like to disable building tools -## - -## This needs to be exposed for the library info file. -AC_SUBST([HDF5_TOOLS]) - -## Default is to build tests and tools -HDF5_TOOLS=yes - -AC_MSG_CHECKING([if building tools is enabled]) - -AC_ARG_ENABLE([tools], - [AS_HELP_STRING([--enable-tools], - [Compile the HDF5 tools [default=yes]])], - [HDF5_TOOLS=$enableval]) - -AC_MSG_RESULT([$HDF5_TOOLS]) - -## ---------------------------------------------------------------------- -## Check if they would like to disable building the high-level GIF -## tools (they have unfixed CVE issues) -## - -AC_MSG_CHECKING([if the high-level GIF tools are enabled]) -AC_ARG_ENABLE([hlgiftools], - [AS_HELP_STRING([--enable-hlgiftools], - [Enable the high-level GIF tools. NOTE: These have unfixed CVE issues! - [default=no] - ])], - [HDF5_HL_GIF_TOOLS=$enableval]) - -if test "X-$HDF5_TOOLS" = "X-yes" -a "X-$HDF5_HL" = "X-yes" -a "X-$HDF5_HL_GIF_TOOLS" = "X-yes"; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) - HDF5_HL_GIF_TOOLS="no" -fi - - -## ---------------------------------------------------------------------- -## Check if they would like to enable building doxygen files -## - -## This needs to be exposed for the library info file. -AC_SUBST([HDF5_DOXYGEN]) - -## Default is to not build DOXYGEN -HDF5_DOXYGEN=no - -AC_MSG_CHECKING([if building doxygen is enabled]) - -AC_ARG_ENABLE([doxygen], - [AS_HELP_STRING([--enable-doxygen], - [Compile the HDF5 doxygen files [default=no]])], - [HDF5_DOXYGEN=$enableval]) - -AC_MSG_RESULT([$HDF5_DOXYGEN]) - -## Check if they would like to enable doxygen warnings as errors -## - -## This needs to be exposed for the library info file. -AC_SUBST([HDF5_DOXY_WARNINGS]) - -## Default is not to consider doxygen warnings as errors -DOXY_ERR=yes - -AC_MSG_CHECKING([if doxygen warnings as errors is enabled]) - -AC_ARG_ENABLE([doxygen-errors], - [AS_HELP_STRING([--enable-doxygen-errors], - [Error on HDF5 doxygen warnings [default=no]])], - [DOXY_ERR=$enableval]) - -if test "X$DOXY_ERR" = "Xyes"; then - HDF5_DOXY_WARNINGS="FAIL_ON_WARNINGS" -else - HDF5_DOXY_WARNINGS="NO" - -fi -AC_MSG_RESULT([$HDF5_DOXY_WARNINGS]) - -if test "X$HDF5_DOXYGEN" = "Xyes"; then - DX_DOXYGEN_FEATURE(ON) - DX_DOT_FEATURE(OFF) - DX_HTML_FEATURE(ON) - DX_CHM_FEATURE(OFF) - DX_CHI_FEATURE(OFF) - DX_MAN_FEATURE(ON) - DX_RTF_FEATURE(OFF) - DX_XML_FEATURE(OFF) - DX_PDF_FEATURE(OFF) - DX_PS_FEATURE(OFF) - - AC_SUBST([DOXYGEN_PACKAGE]) - AC_SUBST([DOXYGEN_VERSION_STRING]) - AC_SUBST([DOXYGEN_DIR]) - AC_SUBST([DOXYGEN_INCLUDE_ALIASES]) - AC_SUBST([DOXYGEN_PROJECT_LOGO]) - AC_SUBST([DOXYGEN_PROJECT_BRIEF]) - AC_SUBST([DOXYGEN_INPUT_DIRECTORY]) - AC_SUBST([DOXYGEN_OPTIMIZE_OUTPUT_FOR_C]) - AC_SUBST([DOXYGEN_MACRO_EXPANSION]) - AC_SUBST([DOXYGEN_OUTPUT_DIRECTORY]) - AC_SUBST([DOXYGEN_EXAMPLES_DIRECTORY]) - AC_SUBST([DOXYGEN_LAYOUT_FILE]) - AC_SUBST([DOXYGEN_HTML_HEADER]) - AC_SUBST([DOXYGEN_HTML_FOOTER]) - AC_SUBST([DOXYGEN_HTML_EXTRA_STYLESHEET]) - AC_SUBST([DOXYGEN_HTML_EXTRA_FILES]) - AC_SUBST([DOXYGEN_TAG_FILE]) - AC_SUBST([DOXYGEN_SERVER_BASED_SEARCH]) - AC_SUBST([DOXYGEN_EXTERNAL_SEARCH]) - AC_SUBST([DOXYGEN_SEARCHENGINE_URL]) - AC_SUBST([DOXYGEN_STRIP_FROM_PATH]) - AC_SUBST([DOXYGEN_STRIP_FROM_INC_PATH]) - AC_SUBST([DOXYGEN_PREDEFINED]) - -# SRCDIR Environment variables used inside doxygen macro for the source location: - DOXYGEN_PACKAGE=${PACKAGE_NAME} - DOXYGEN_VERSION_STRING=${PACKAGE_VERSION} - DOXYGEN_DIR='$(SRCDIR)/doxygen' - DOXYGEN_INCLUDE_ALIASES_PATH='$(SRCDIR)/doxygen' - DOXYGEN_INCLUDE_ALIASES='$(SRCDIR)/doxygen/aliases' - DOXYGEN_VERBATIM_VARS='DOXYGEN_INCLUDE_ALIASES' - DOXYGEN_PROJECT_LOGO='$(SRCDIR)/doxygen/img/HDFG-logo.png' - DOXYGEN_PROJECT_BRIEF='API Reference' - DOXYGEN_INPUT_DIRECTORY='$(SRCDIR) $(SRCDIR)/doxygen/dox' - DOXYGEN_OPTIMIZE_OUTPUT_FOR_C=YES - DOXYGEN_MACRO_EXPANSION=YES - DOXYGEN_OUTPUT_DIRECTORY=hdf5lib_docs - DOXYGEN_EXAMPLES_DIRECTORY='$(SRCDIR)/doxygen/dox/cookbook $(SRCDIR)/doxygen/examples $(SRCDIR)/src $(SRCDIR)/release_docs $(SRCDIR)/test' - DOXYGEN_LAYOUT_FILE='$(SRCDIR)/doxygen/hdf5doxy_layout.xml' - DOXYGEN_HTML_HEADER='$(SRCDIR)/doxygen/hdf5_header.html' - DOXYGEN_HTML_FOOTER='$(SRCDIR)/doxygen/hdf5_footer.html' - DOXYGEN_HTML_EXTRA_STYLESHEET='$(SRCDIR)/doxygen/hdf5doxy.css $(SRCDIR)/doxygen/doxygen-awesome.css' - DOXYGEN_HTML_EXTRA_FILES='$(SRCDIR)/doxygen/hdf5_navtree_hacks.js' - DOXYGEN_TAG_FILE=hdf5.tag - DOXYGEN_SERVER_BASED_SEARCH=NO - DOXYGEN_EXTERNAL_SEARCH=NO - DOXYGEN_SEARCHENGINE_URL= - DOXYGEN_STRIP_FROM_PATH='$(SRCDIR)' - DOXYGEN_STRIP_FROM_INC_PATH='$(SRCDIR)' - DOXYGEN_PREDEFINED='H5_HAVE_DIRECT H5_HAVE_LIBHDFS H5_HAVE_MAP_API H5_HAVE_PARALLEL H5_HAVE_ROS3_VFD H5_DOXYGEN H5_HAVE_SUBFILING_VFD H5_HAVE_IOC_VFD H5_HAVE_MIRROR_VFD' - DOXYGEN_WARN_AS_ERROR=${HDF5_DOXY_WARNINGS} - - DX_INIT_DOXYGEN([HDF5], [./doxygen/Doxyfile], [hdf5lib_docs]) -fi - - -## ---------------------------------------------------------------------- -## Create libtool. If shared/static libraries are going to be enabled -## or disabled, it should happen before these macros. -LT_PREREQ([2.2]) - -## ---------------------------------------------------------------------- -## dlopen - This will use an improved version of libtool -## win32-dll - This will build clean dlls on win32 platforms. -LT_INIT([dlopen,win32-dll]) - -## ---------------------------------------------------------------------- -## Check if we should install only statically linked executables. -## This check needs to occur after libtool is initialized because -## we check a libtool cache value and may issue a warning based -## on its result. -AC_SUBST([STATIC_EXEC]) - -## Default is no -STATIC_EXEC=no - -AC_MSG_CHECKING([if we should install only statically linked executables]) -AC_ARG_ENABLE([static_exec], - [AS_HELP_STRING([--enable-static-exec], - [Install only statically linked executables - [default=no]])], - [STATIC_EXEC=$enableval]) -AC_MSG_RESULT([$STATIC_EXEC]) - -if test "X$STATIC_EXEC" = "Xyes"; then - ## Issue a warning if -static flag is not supported. - if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then - AC_MSG_WARN([-static flag not supported on this system; executable won't statically link shared system libraries.]) - LT_STATIC_EXEC="" - else - LT_STATIC_EXEC="-all-static" - fi -else - LT_STATIC_EXEC="" -fi -AM_CONDITIONAL([USE_PLUGINS_CONDITIONAL], [test "X$LT_STATIC_EXEC" = X]) - -AC_SUBST([LT_STATIC_EXEC]) - -## Fix up the INSTALL macro if it's a relative path. We want the -## full-path to the binary instead. -case "$INSTALL" in - *install-sh*) - INSTALL='\${top_srcdir}/bin/install-sh -c' - ;; -esac - -## ---------------------------------------------------------------------- -## Some users have reported problems with libtool's use of '-Wl,-rpath' to -## link shared libraries in nondefault directories. Allow users to -## disable embedding the rpath information in the executables and to -## instead solely rely on the information in LD_LIBRARY_PATH. -AC_MSG_CHECKING([if -Wl,-rpath should be used to link shared libs in nondefault directories]) -AC_ARG_ENABLE([sharedlib-rpath], - [AS_HELP_STRING([--disable-sharedlib-rpath], - [Disable use of the '=Wl,-rpath' linker option])], - [RPATH=$enableval]) - -case "X-$RPATH" in - X-no) - AC_MSG_RESULT([no]) - runpath_var= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_into_libs=no - ;; - X-|X-yes) - AC_MSG_RESULT([yes]) - ;; - *) - AC_MSG_RESULT([error]) - AC_MSG_ERROR([\'$enableval\' is not a valid rpath type]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check for system libraries. "dl" stands for dynamically loaded library -## -AC_CHECK_LIB([m], [ceil]) -AC_CHECK_LIB([dl], [dlopen]) - -## ---------------------------------------------------------------------- -## Check for system header files. -## - -## Unix -AC_CHECK_HEADERS([dirent.h features.h pwd.h unistd.h]) -AC_CHECK_HEADERS([sys/file.h sys/ioctl.h sys/resource.h]) -AC_CHECK_HEADERS([sys/stat.h sys/time.h sys/types.h]) - -## Darwin -AC_SUBST([H5_IS_DARWIN]) -H5_IS_DARWIN="no" -case $host_os in - darwin*) - AC_DEFINE([HAVE_DARWIN], [1], [Define if Darwin or Mac OS X]) - H5_IS_DARWIN="yes" - ;; -esac - -## Windows -case "$host_os" in - *mingw*) - # The Winsock library - AC_CHECK_LIB([ws2_32], [htons]) - ;; -esac - -# Mirror VFD networking -AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h sys/socket.h]) - -## ---------------------------------------------------------------------- -## Some platforms require that all symbols are resolved when a library -## is linked. We can use the -no-undefined flag to tell libtool that -## it will be able to build shared libraries on these architectures, -## as it will not do so by default. -## -if test "X${enable_shared}" = "Xyes"; then - AC_MSG_CHECKING([if libtool needs -no-undefined flag to build shared libraries]) - case "$host_os" in - *cygwin*|*mingw*|*aix*) - ## Add in the -no-undefined flag to LDFLAGS for libtool - AC_MSG_RESULT([yes]) - H5_LDFLAGS="$H5_LDFLAGS -no-undefined" - ;; - *) - ## Don't add in anything. - AC_MSG_RESULT([no]) - ;; - esac -fi - -## ---------------------------------------------------------------------- -## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines -## that might need to be set for largefile support to behave -## correctly. This macro is defined in acsite.m4 and overrides -## the version provided by Autoconf (as of v2.65). The custom -## macro additionally adds the appropriate defines to AM_CPPFLAGS -## so that later configure checks have them visible. -## -## NOTE: AC_SYS_LARGEFILE is buggy on some platforms and will -## NOT set the defines, even though it correctly detects -## the necessary values. These macro hacks are annoying -## but unfortunately will be necessary until we decide -## to drop support for platforms that don't have 64-bit -## off_t defaults. - -## Check for _FILE_OFFSET_BITS -_AC_SYS_LARGEFILE_MACRO_VALUE([_FILE_OFFSET_BITS], [64], - [ac_cv_sys_file_offset_bits], - [Number of bits in a file offset, on hosts where this is settable.], - [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - -## Check for _LARGE_FILES -if test "$ac_cv_sys_file_offset_bits" = unknown; then - _AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1], - [ac_cv_sys_large_files], - [Define for large files, on AIX-style hosts.], - [_AC_SYS_LARGEFILE_TEST_INCLUDES]) -fi - -## ---------------------------------------------------------------------- -## Add necessary defines for Linux Systems. -## -case "$host_os" in - *linux*) - ## Add POSIX support on Linux systems, so defines - ## __USE_POSIX, which is required to get the prototype for fdopen - ## defined correctly in . - ## - ## This flag was removed from h5cc as of 2009-10-17 when it was found - ## that the flag broke compiling netCDF-4 code with h5cc, but kept in - ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen - ## is used only by H5_debug_mask which is used only when debugging in - ## H5_init_library (all in H5.c). When the flag was removed this was - ## the only compile failure noted. - ## - ## This was originally defined as _POSIX_SOURCE which was updated to - ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX - ## functionality so clock_gettime and CLOCK_MONOTONIC are defined - ## correctly. This was later updated to 200112L so that - ## posix_memalign() is visible for the direct VFD code on Linux - ## systems. Even later, this was changed to 200809L to support - ## pread/pwrite in VFDs. - ## - ## POSIX feature information can be found in the gcc manual at: - ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - H5_CPPFLAGS="-D_POSIX_C_SOURCE=200809L $H5_CPPFLAGS" - - ## Need to add this so that O_DIRECT is visible for the direct - ## VFD on Linux systems. - H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" - ;; - *mingw*) - HDF_MINGW="yes" - AC_DEFINE([HAVE_WINDOWS], [1], [Define if this is a Windows machine]) - AC_DEFINE([HAVE_WIN32_API], [1], [Define if on the Windows platform using the Win32 API]) - AC_DEFINE([HAVE_MINGW], [1], [Define if using MinGW]) - H5_CPPFLAGS="-D_GNU_SOURCE -D__USE_MINGW_ANSI_STDIO $H5_CPPFLAGS" - ;; - *cygwin*) - AC_DEFINE([HAVE_CYGWIN], [1], [Define if using Cygwin]) - H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" - ;; -esac - -## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible -## for configure checks. -## Note: Both will be restored by the end of configure. -CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" -CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" - -## Checkpoint the cache -AC_CACHE_SAVE - -AC_CHECK_SIZEOF( [int8_t]) -AC_CHECK_SIZEOF( [uint8_t]) -AC_CHECK_SIZEOF( [int_least8_t]) -AC_CHECK_SIZEOF( [uint_least8_t]) -AC_CHECK_SIZEOF( [int_fast8_t]) -AC_CHECK_SIZEOF( [uint_fast8_t]) - -AC_CHECK_SIZEOF( [int16_t]) -AC_CHECK_SIZEOF( [uint16_t]) -AC_CHECK_SIZEOF( [int_least16_t]) -AC_CHECK_SIZEOF([uint_least16_t]) -AC_CHECK_SIZEOF( [int_fast16_t]) -AC_CHECK_SIZEOF( [uint_fast16_t]) - -AC_CHECK_SIZEOF( [int32_t]) -AC_CHECK_SIZEOF( [uint32_t]) -AC_CHECK_SIZEOF( [int_least32_t]) -AC_CHECK_SIZEOF([uint_least32_t]) -AC_CHECK_SIZEOF( [int_fast32_t]) -AC_CHECK_SIZEOF( [uint_fast32_t]) - -AC_CHECK_SIZEOF( [int64_t]) -AC_CHECK_SIZEOF( [uint64_t]) -AC_CHECK_SIZEOF( [int_least64_t]) -AC_CHECK_SIZEOF([uint_least64_t]) -AC_CHECK_SIZEOF( [int_fast64_t]) -AC_CHECK_SIZEOF( [uint_fast64_t]) - -AC_CHECK_SIZEOF([bool], [], [#include ]) -AC_CHECK_SIZEOF([off_t]) -AC_CHECK_SIZEOF([ptrdiff_t]) -AC_CHECK_SIZEOF([size_t]) -AC_CHECK_SIZEOF([ssize_t]) -AC_CHECK_SIZEOF([time_t], [], [#include ]) - -## Checkpoint the cache -AC_CACHE_SAVE - -## ---------------------------------------------------------------------- -## Check if the dev_t type is a scalar type (must come after the check for -## sys/types.h) -AC_MSG_CHECKING([if dev_t is scalar]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#ifdef HAVE_SYS_TYPES_H -#include -#endif - ]], - [[dev_t d1, d2; if(d1==d2) return 0;]])], - [AC_DEFINE([DEV_T_IS_SCALAR], [1], - [Define if dev_t is a scalar]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - -## ---------------------------------------------------------------------- -## Fake --with-xxx option to allow us to create a help message for the -## following --with-xxx options which can take either a =DIR or =INC,LIB -## specifier. -## -AC_ARG_WITH([fnord], - [ - For the following --with-xxx options, you can specify where the header - files and libraries are in two different ways: - - --with-xxx=INC,LIB - Specify individually the include directory and - library directory separated by a comma - --with-xxx=DIR - Specify only the directory which contains the - include/ and lib/ subdirectories - ]) - -## ---------------------------------------------------------------------- -## Make the external filters list available to *.in files -## At this point it's unset (no external filters by default) but it -## will be filled in during the deflate/zlib and szip/libaec processing -## below. -## -AC_SUBST([EXTERNAL_FILTERS]) - -## ---------------------------------------------------------------------- -## Is the GNU zlib present? It has a header file `zlib.h' and a library -## `-lz' and their locations might be specified with the `--with-zlib' -## command-line switch. The value is an include path and/or a library path. -## If the library path is specified then it must be preceded by a comma. -## -AC_SUBST([USE_FILTER_DEFLATE]) USE_FILTER_DEFLATE="no" -AC_ARG_WITH([zlib], - [AS_HELP_STRING([--with-zlib=DIR], - [Use zlib library for external deflate I/O - filter [default=yes]])],, - [withval=yes]) - -case "X-$withval" in - X-yes) - HAVE_ZLIB="yes" - AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"], [unset HAVE_ZLIB]) - if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then - AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB]) - fi - if test -z "$HAVE_ZLIB"; then - if test -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR([couldn't find zlib library]) - fi - else - AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"]) - fi - ;; - X-|X-no|X-none) - HAVE_ZLIB="no" - AC_MSG_CHECKING([for zlib]) - AC_MSG_RESULT([suppressed]) - ;; - *) - HAVE_ZLIB="yes" - case "$withval" in - *,*) - zlib_inc="`echo $withval | cut -f1 -d,`" - zlib_lib="`echo $withval | cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - zlib_inc="$withval/include" - zlib_lib="$withval/lib" - fi - ;; - esac - - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - - if test -n "$zlib_inc"; then - CPPFLAGS="$CPPFLAGS -I$zlib_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$zlib_inc" - fi - - AC_CHECK_HEADERS([zlib.h], - [HAVE_ZLIB_H="yes"], - [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_ZLIB]) - - if test -n "$zlib_lib"; then - LDFLAGS="$LDFLAGS -L$zlib_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$zlib_lib" - fi - - if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then - AC_CHECK_LIB([z], [compress2],, - [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_ZLIB]) - fi - - if test -z "$HAVE_ZLIB"; then - if test -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR([couldn't find zlib library]) - fi - else - AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"]) - fi - ;; -esac - -if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" = "xyes"; then - AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled]) - USE_FILTER_DEFLATE="yes" - - ## Add "deflate" to external filter list - if test "X$EXTERNAL_FILTERS" != "X"; then - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," - fi - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)" -fi - - -## ---------------------------------------------------------------------- -## Is the szlib present? It has a header file `szlib.h' and a library -## `-lsz' and their locations might be specified with the `--with-szlib' -## command-line switch. The value is an include path and/or a library path. -## If the library path is specified then it must be preceded by a comma. -## -## libaec also implements Space Data System Standard 121.0-B-2 and has -## an szip compatibility header. Since the AEC library is BSD licensed -## for both encoding and decoding, we now build with the filter enabled -## by default when the library is found. -## -AC_SUBST([LL_PATH]) -AC_SUBST([USE_FILTER_SZIP]) USE_FILTER_SZIP="no" -AC_ARG_WITH([szlib], - [AS_HELP_STRING([--with-szlib=DIR], - [Use szlib library for external szlib I/O - filter [default=yes]])],, - [withval=yes]) - -case "X-$withval" in - X-yes) - HAVE_SZLIB="yes" - AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [unset HAVE_SZLIB]) - if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB]) - fi - if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR([couldn't find szlib library]) - fi - ;; - X-|X-no|X-none) - HAVE_SZLIB="no" - AC_MSG_CHECKING([for szlib]) - AC_MSG_RESULT([suppressed]) - ;; - *) - HAVE_SZLIB="yes" - case "$withval" in - *,*) - szlib_inc="`echo $withval |cut -f1 -d,`" - szlib_lib="`echo $withval |cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - szlib_inc="$withval/include" - szlib_lib="$withval/lib" - fi - ;; - esac - - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - - if test -n "$szlib_inc"; then - CPPFLAGS="$CPPFLAGS -I$szlib_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc" - fi - - if test -n "$szlib_lib"; then - LDFLAGS="$LDFLAGS -L$szlib_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib" - fi - - if test "x$HAVE_SZLIB" = "xyes"; then - AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, - [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB]) - if test -n "$HAVE_SZLIB"; then - AC_CHECK_HEADERS([szlib.h], - [HAVE_SZLIB_H="yes"], - [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB]) - else - AC_MSG_RESULT([Using SZ_BufftoBuffCompress from libsz in $szlib_lib failed. Szip not enabled.]) - fi - fi - - if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR([couldn't find szlib library]) - fi - ;; -esac - -if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - ## SZLIB library is available. Check if it can encode - AC_MSG_CHECKING([for szlib encoder]) - - ## Set LD_LIBRARY_PATH so encoder test can find the library and run. - ## Also add LL_PATH substitution to Makefiles so they can use the - ## path as well, for testing examples. - if test -z "$LD_LIBRARY_PATH"; then - export LD_LIBRARY_PATH="$szlib_lib" - else - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$szlib_lib" - fi - - LL_PATH="$LD_LIBRARY_PATH" - - # CROSS-COMPILING: Assume 'yes' now that libaec is so prevalent - AC_CACHE_VAL([hdf5_cv_szlib_can_encode], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM([ - #include "szlib.h" - ],[[ - /* SZ_encoder_enabled returns 1 if encoder is present */ - return SZ_encoder_enabled() != 1; - ]])] - , [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no], [hdf5_cv_szlib_can_encode=yes])] - ) - - AC_DEFINE([HAVE_FILTER_SZIP], [1], - [Define if support for szip filter is enabled]) - USE_FILTER_SZIP="yes" - - if test ${hdf5_cv_szlib_can_encode} = "yes"; then - AC_MSG_RESULT([yes]) - fi - if test ${hdf5_cv_szlib_can_encode} = "no"; then - AC_MSG_RESULT([no]) - fi - - ## Add "szip" to external filter list - if test ${hdf5_cv_szlib_can_encode} = "yes"; then - if test "X$EXTERNAL_FILTERS" != "X"; then - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," - fi - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)" - fi - if test ${hdf5_cv_szlib_can_encode} = "no"; then - if test "X$EXTERNAL_FILTERS" != "X"; then - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," - fi - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)" - fi -fi - -AM_CONDITIONAL([BUILD_SHARED_SZIP_CONDITIONAL], [test "X$USE_FILTER_SZIP" = "Xyes" && test "X$LL_PATH" != "X"]) - -## Checkpoint the cache -AC_CACHE_SAVE - -## ---------------------------------------------------------------------- -## Enable library-internal concurrency capabilities (threads, atomic operations, -## mutual exclusion, condition variables, and thread-specific storage). -## -## Note, this is required for enabling the threadsafe API feature, but does -## _not_ enable it, or provide threadsafety to applications calling HDF5 API -## routines. *Both* --enable-threads _and_ --enable-threadsafe must be provided -## to enable threadsafety to applications. -## -## C11 threads (and atomics) are preferred and if available, will be chosen -## over pthreads or Windows threading. -## -## We usually pick up the system Pthreads library, so --with-pthread -## is only necessary if you are using a custom Pthreads library or if -## your OS hides its implementation in an unusual location. -## -## On Windows, we use Win32 threads and no special configuration should be -## required to use them. -## -AC_SUBST([THREADS]) - -## Default is to attempt to enable thread support -if test "X-$THREADS" = X- ; then - THREADS=yes -fi - - -AC_ARG_ENABLE([threads], - [AS_HELP_STRING([--enable-threads], - [Enable threads capability. A prerequisite for enabling threadsafe API calls. - [default=yes] - ])], - [THREADS=$enableval]) - -if test "X$THREADS" = "Xyes"; then - ## Allow other thread packages instead of Pthreads - allow_pthreads="yes" - - ## ---------------------------------------------------------------------- - ## Is the Pthreads library present? It has a header file `pthread.h' and - ## a library `-lpthread' and their locations might be specified with the - ## `--with-pthread' command-line switch. The value is an include path - ## and/or a library path. If the library path is specified then it must - ## be preceded by a comma. - ## - ## The default is to use Pthreads when building with the Autotools, unless - ## the compiler has C11 threads or we're building w/ MinGW. - ## - ## Currently C11 threads will take priority over Pthreads and Win32 threads - ## - AC_SUBST([HAVE_PTHREAD]) HAVE_PTHREAD=yes - AC_ARG_WITH([pthread], - [AS_HELP_STRING([--with-pthread=DIR], - [Specify alternative path to Pthreads library when - thread-safe capability is built. Set this to - 'yes' or the location of Pthreads when building - with a compiler that has C11 threads or - with MinGW and you would rather use Pthreads - than C11 or Win32 threads.])],, - [withval=default]) - - ## Check for C11 threads, we want to use C11 threads unless the builder - ## explicitly specifies --with-pthreads=(yes | path(s)) - AC_SUBST([HAVE_C11_THREADS]) HAVE_C11_THREADS=no - # Comment out check for C11 threads for now, since it conflicts with the - # current --std=c99 compile flags at configuration time. When we switch to - # --std=c11, this can be uncommented. - #AC_CHECK_HEADERS([threads.h],[HAVE_THREADS_H="yes"],[HAVE_THREADS_H="no"]) - if test "x$HAVE_THREADS_H" = "xyes"; then - # Default or no --> C11 threads - if test "$withval" = "default" -o "$withval" = "no" ; then - allow_pthreads="no" - unset HAVE_PTHREAD - AC_DEFINE([HAVE_C11_THREADS], [yes], [Define to yes if you have C11 threads]) - fi - fi - - ## If we're on MinGW, we want to use Win32 threads unless the builder - ## explicitly specifies --with-pthreads=(yes | path(s)) - AC_SUBST([HAVE_WIN_THREADS]) HAVE_WIN_THREADS=no - if test -n "$HDF_MINGW" -a "$HDF_MINGW" = "yes" ; then - # Default or no --> Win32 threads - if test "$withval" = "default" -o "$withval" = "no" ; then - allow_pthreads="no" - unset HAVE_PTHREAD - AC_DEFINE([HAVE_WIN_THREADS], [yes], [Define to yes if you have win32 threads]) - fi - fi - - if test "$allow_pthreads" = "yes" ; then - case "$withval" in - default | yes) - AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD]) - if test "x$HAVE_PTHREAD" = "xyes"; then - AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD]) - fi - ;; - no) - AC_MSG_ERROR([Must use Pthreads with thread safety on non-Windows systems]) - ;; - *) - case "$withval" in - *,*) - pthread_inc="`echo $withval | cut -f1 -d,`" - pthread_lib="`echo $withval | cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - pthread_inc="$withval/include" - pthread_lib="$withval/lib" - fi - ;; - esac - - if test -n "$pthread_inc"; then - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$pthread_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$pthread_inc" - AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset HAVE_PTHREAD]) - else - AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD]) - fi - - if test "x$HAVE_PTHREAD" = "xyes"; then - if test -n "$pthread_lib"; then - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - LDFLAGS="$LDFLAGS -L$pthread_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib" - AC_CHECK_LIB([pthread], [pthread_self],, - [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_PTHREAD]) - else - AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD]) - fi - fi - ;; - esac - - ## If using Pthreads, check for barrier routines - if test "x$HAVE_PTHREAD" = "xyes"; then - AC_CHECK_DECL([pthread_barrier_init], - [AC_DEFINE([HAVE_PTHREAD_BARRIER], [1], - [Define if has pthread_barrier_*() routines])], - [], - [[#include ]]) - fi - - fi # end of Pthreads checks - - ## Check for C11 atomics - AC_CHECK_HEADERS([stdatomic.h],[HAVE_STDATOMIC_H="yes"],[HAVE_STDATOMIC_H="no"]) - -fi # end of threads processing - -# Check to verify that a threading package was found -AC_MSG_CHECKING([for threads support]) -if test "x$HAVE_PTHREAD" = "xno" -a "x$HAVE_WIN_THREADS" = "xno" -a "x$HAVE_C11_THREADS" = "xno"; then - THREADS=no -fi - -case "X-$THREADS" in - X-no) - AC_MSG_RESULT([no]) - ;; - X-yes) - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_THREADS], [1], [Define if we have internal threads support]) - ;; - *) - AC_MSG_RESULT([error]) - AC_MSG_ERROR([\'$enableval\' is not a valid threads setting]) - ;; -esac - -## ---------------------------------------------------------------------- -## Enable thread-safe version of library (requires threads support) -## -AC_SUBST([THREADSAFE]) - -## Default is no thread-safety -THREADSAFE=no - -AC_MSG_CHECKING([for thread safe support]) -AC_ARG_ENABLE([threadsafe], - [AS_HELP_STRING([--enable-threadsafe], - [Enable thread-safe capability. Not compatible with the high-level library, Fortran, or C++ wrappers. - [default=no]])], - [THREADSAFE=$enableval]) - -## The high-level, C++, Fortran and Java interfaces are not compatible -## with the thread-safety option because the lock is not hoisted -## into the higher-level API calls. - -## --enable-threadsafe is incompatible with --enable-hl unless -## --enable-unsupported has been specified on the configure line. -## -## Note that the high-level library is enabled by default so most -## users will have to add --disable-hl to the configure options. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF5_HL}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - AC_MSG_ERROR([The thread-safe library is incompatible with the high-level library. --disable-hl can be used to prevent building the high-level library (recommended). Alternatively, --enable-unsupported will allow building the high-level library, though this configuration is not supported by The HDF Group.]) - fi -fi - -## The --enable-threadsafe flag is not compatible with --enable-cxx. -## If the user tried to specify both flags, throw an error, unless -## they also provided the --enable-unsupported flag. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF_CXX}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - AC_MSG_ERROR([--enable-cxx and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) - fi -fi - -## --enable-threadsafe is also incompatible with --enable-fortran unless -## --enable-unsupported has been specified on the configure line. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - AC_MSG_ERROR([--enable-fortran and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) - fi -fi - -## --enable-threadsafe is also incompatible with --enable-java unless -## --enable-unsupported has been specified on the configure line. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF_JAVA}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - AC_MSG_ERROR([--enable-java and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) - fi -fi - -if test "X${enable_threadsafe}" = "Xyes" -a "X$THREADS" = "Xno"; then - AC_MSG_ERROR([--enable-threadsafe given, but no threading package found.]) -fi - -case "X-$THREADSAFE" in - X-|X-no) - AC_MSG_RESULT([no]) - ;; - X-yes) - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_THREADSAFE], [1], [Define if we have thread safe support]) - ;; - *) - AC_MSG_RESULT([error]) - AC_MSG_ERROR([\'$enableval\' is not a valid threadsafe type]) - ;; -esac - - -## ---------------------------------------------------------------------- -## Check for MONOTONIC_TIMER support (used in clock_gettime). This has -## to be done after any POSIX defines to ensure that the test gets -## the correct POSIX level on linux. -AC_CHECK_DECL([CLOCK_MONOTONIC],[have_clock_monotonic="yes"],[have_clock_monotonic="no"],[[#include ]]) - -## ---------------------------------------------------------------------- -## How does one figure out the local time zone? Anyone know of a -## Posix way to do this? -## - -## First check if `struct tm' has a `tm_gmtoff' member. -AC_MSG_CHECKING([for tm_gmtoff in struct tm]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include -]], [[struct tm tm; tm.tm_gmtoff=0;]])], - [AC_DEFINE([HAVE_TM_GMTOFF], [1], - [Define if tm_gmtoff is a member of struct tm]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - -## Check whether the global variable `timezone' is defined. -AC_MSG_CHECKING([for global timezone variable]) - -case "$host_os" in - *cygwin*) - AC_MSG_RESULT([disabled in CYGWIN]) - ;; - *) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - #include ]], [[timezone=0;]])], - [AC_DEFINE([HAVE_TIMEZONE], [1], - [Define if timezone is a global variable]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - ;; -esac - - -## ---------------------------------------------------------------------- -## Does the struct stat have the st_blocks field? This field is not POSIX. -## -AC_MSG_CHECKING([for st_blocks in struct stat]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include ]],[[struct stat sb; sb.st_blocks=0;]])], - [AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], - [Define if struct stat has the st_blocks field]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - -## ---------------------------------------------------------------------- -## How do we figure out the width of a tty in characters? -## -AC_CHECK_FUNCS([_getvideoconfig gettextinfo]) -case "$host_os" in - *cygwin*) - ;; - *) - AC_CHECK_FUNCS([GetConsoleScreenBufferInfo]) - ;; -esac -AC_CHECK_FUNCS([_scrsize ioctl]) - -AC_MSG_CHECKING([for struct videoconfig]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[struct videoconfig w; w.numtextcols=0;]])], - [AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1], - [Define if struct videoconfig is defined]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - -AC_MSG_CHECKING([for struct text_info]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct text_info w; w.screenwidth=0;]])], - [AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1], - [Define if struct text_info is defined]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - -AC_MSG_CHECKING([for TIOCGWINSZ]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -]],[[int w=TIOCGWINSZ;]])], - [AC_DEFINE([HAVE_TIOCGWINSZ], [1], - [Define if the ioctl TIOGWINSZ is defined]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - -AC_MSG_CHECKING([for TIOCGETD]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -]],[[int w=TIOCGETD;]])], - [AC_DEFINE([HAVE_TIOCGETD], [1], - [Define if the ioctl TIOCGETD is defined]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - - -## ---------------------------------------------------------------------- -## Check for functions. -## -## NOTE: clock_gettime may require linking to the rt or posix4 library -## so we'll search for it before calling AC_CHECK_FUNCS. -AC_SEARCH_LIBS([clock_gettime], [rt posix4]) -AC_CHECK_FUNCS([asprintf clock_gettime fcntl flock fork]) -AC_CHECK_FUNCS([gethostname getrusage gettimeofday]) -AC_CHECK_FUNCS([strcasestr strdup symlink]) -AC_CHECK_FUNCS([tmpfile vasprintf waitpid]) - -case "$host_os" in - *mingw*) - # alarm(2) support is spotty in MinGW, so assume it doesn't exist - # - # https://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00040.html - ;; - *) - AC_CHECK_FUNCS([alarm]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check compiler characteristics -## -AC_MSG_CHECKING([for __attribute__ extension]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int __attribute__((unused)) x]])], - [AC_DEFINE([HAVE_ATTRIBUTE], [1], - [Define if the __attribute__(()) extension is present]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - -AC_MSG_CHECKING([if compiler supports the __builtin_expect() extension]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[void *ptr = (void*) 0; - if (__builtin_expect (ptr != (void*) 0, 1)) return 0;]])], - [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], - [Define if supports __builtin_expect() extension]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - -## ---------------------------------------------------------------------- -## Remove old ways of determining debug/production build. -## These were used in 1.8.x and earlier. We should probably keep these checks -## around to help people migrate to 1.10.x and newer versions. -## -AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug], [OPTION CHANGE: use --enable-build-mode=debug])], - [AC_MSG_ERROR([--enable-debug is no longer supported, use --enable-build-mode=debug instead.])]) - -AC_ARG_ENABLE([production], - [AS_HELP_STRING([--enable-production], [OPTION CHANGE: use --enable-build-mode=production])], - [AC_MSG_ERROR([--enable-production is no longer supported, use --enable-build-mode=production instead.])]) - - -## ---------------------------------------------------------------------- -## Check if the compiler should include build diagnostics -## -AC_MSG_CHECKING([enable build diagnostics]) -AC_ARG_ENABLE([diags], - [AS_HELP_STRING([--enable-diags=(yes|no|)], - [Allow default enhanced diagnostics to the build. - This is independent of the build mode and optimization - level. - [default=no] - ])], - [DIAGS=$enableval]) - -## Set default -if test "X-$DIAGS" = X- ; then - DIAGS=no -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([DIAGS]) - -case "X-$DIAGS" in - X-yes) - H5_CFLAGS="$H5_CFLAGS $DIAGS_CFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $DIAGS_FCFLAGS" - AC_MSG_RESULT([yes]) - ;; - X-no) - H5_CFLAGS="$H5_CFLAGS $NO_DIAGS_CFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $NO_DIAGS_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $NO_DIAGS_FCFLAGS" - AC_MSG_RESULT([no]) - ;; - *) - H5_CFLAGS="$H5_CFLAGS $DIAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS" - H5_FCFLAGS="$H5_FCFLAGS $DIAGS" - DIAGS="custom ($DIAGS)" - AC_MSG_RESULT([$DIAGS]) - ;; -esac - - -## ---------------------------------------------------------------------- -## Check if the compiler should include symbols -## -AC_MSG_CHECKING([enable debugging symbols]) -AC_ARG_ENABLE([symbols], - [AS_HELP_STRING([--enable-symbols=(yes|no|)], - [Add debug symbols to the library (e.g.: build with -g). - This is independent of the build mode and optimization - level. The custom string allows special settings like - -ggdb, etc. to be used. - [default=yes if debug build, otherwise no] - ])], - [SYMBOLS=$enableval]) - -## Set default -if test "X-$SYMBOLS" = X- ; then - if test "X-$BUILD_MODE" = "X-debug" ; then - SYMBOLS=yes - else - SYMBOLS=no - fi -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([SYMBOLS]) - -case "X-$SYMBOLS" in - X-yes) - H5_CFLAGS="$H5_CFLAGS $SYMBOLS_CFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS_FCFLAGS" - AC_MSG_RESULT([yes]) - ;; - X-no) - H5_CFLAGS="$H5_CFLAGS $NO_SYMBOLS_CFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $NO_SYMBOLS_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $NO_SYMBOLS_FCFLAGS" - AC_MSG_RESULT([no]) - ;; - *) - H5_CFLAGS="$H5_CFLAGS $SYMBOLS" - H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS" - H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS" - SYMBOLS="custom ($SYMBOLS)" - AC_MSG_RESULT([$SYMBOLS]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check if the assert macro should be enabled -## -AC_MSG_CHECKING([enable asserts]) -AC_ARG_ENABLE([asserts], - [AS_HELP_STRING([--enable-asserts], - [Determines whether NDEBUG is defined or not, which - controls assertions. - This is independent of the build mode and presence - of debugging symbols. - [default=yes if debug build, otherwise no] - ])], - [ASSERTS=$enableval]) - -## Set default -if test "X-$ASSERTS" = X- ; then - if test "X-$BUILD_MODE" = "X-debug" ; then - ASSERTS=yes - else - ASSERTS=no - fi -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([ASSERTS]) - -case "X-$ASSERTS" in - X-yes) - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" - AC_MSG_RESULT([yes]) - ;; - X-no) - H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $ASSERTS]) - ;; -esac - -## Incorporate the potentially warning-to-error promoting flags after -## feature tests. Some of the tests generate compilation errors with the -## flags we chose for the HDF5 library and tools. -## -H5_CFLAGS="$H5_CFLAGS $H5_ECFLAGS" -H5_CXXFLAGS="$H5_CXXFLAGS $H5_ECXXFLAGS" - -## ---------------------------------------------------------------------- -## Check if developer warnings should be turned on -## These are warnings that provide suggestions like gcc's -Wsuggest-attribute. -## They do not indicate code problems. -## -## Note that developers don't need to build with these regularly. They -## are just handy to check once in a while (before releases, etc.). -## -AC_MSG_CHECKING([enable developer warnings]) -AC_ARG_ENABLE([developer-warnings], - [AS_HELP_STRING([--enable-developer-warnings], - [Determines whether developer warnings will be - emitted. These are usually performance suggestions - (e.g. -Wsuggest-attribute) and do not flag poor code - quality. - [default=no] - ])], - [DEV_WARNINGS=$enableval]) - -## Set default -if test "X-$DEV_WARNINGS" = X- ; then - DEV_WARNINGS=no -fi - -case "X-$DEV_WARNINGS" in - X-yes) - H5_CFLAGS="$H5_CFLAGS $DEVELOPER_WARNING_CFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $DEVELOPER_WARNING_FCFLAGS" - AC_MSG_RESULT([yes]) - ;; - X-no) - H5_CFLAGS="$H5_CFLAGS $NO_DEVELOPER_WARNING_CFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $NO_DEVELOPER_WARNING_FCFLAGS" - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $DEV_WARNINGS]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check if they would like suppessed compiler diagnostics displayed -## (i.e. not suppressed) -## -## NOTE: Compiler diagnostics (i.e. warnings) are suppressed for some -## "noisy" warnings that are harmless (in the opinion of the primary -## HDF5 development team), but this option is provided to allow -## developers to see those warnings. -## -AC_MSG_CHECKING([whether showing all compiler warnings is enabled]) -AC_ARG_ENABLE([show-all-warnings], - [AS_HELP_STRING([--enable-show-all-warnings], - [Enable showing all compiler warnings (for developer debugging). - [default=no] - ])], - [SHOW_ALL_WARNINGS=$enableval]) - -## Set the default level. -if test "X-$SHOW_ALL_WARNINGS" = X- ; then - SHOW_ALL_WARNINGS=no -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([SHOW_ALL_WARNINGS]) - -case "X-$SHOW_ALL_WARNINGS" in - X-yes) - AC_MSG_RESULT([yes]) - AC_DEFINE([SHOW_ALL_WARNINGS], [1], [Define if showing all warnings is desired (i.e. not suppressed internally with H5_DIAG_OFF)]) - ;; - X-no) - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $SHOW_ALL_WARNINGS]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check if the compiler should use profiling flags/settings -## -AC_MSG_CHECKING([profiling]) -AC_ARG_ENABLE([profiling], - [AS_HELP_STRING([--enable-profiling=(yes|no|)], - [Enable profiling flags (e.g.: -pg). - This can be set independently from the build mode. - The custom setting can be used to pass alternative - profiling flags (e.g.: -P for using Prof with gcc). - [default=no] - ])], - [PROFILING=$enableval]) - -## Default is no profiling -if test "X-$PROFILING" = X- ; then - PROFILING=no -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([PROFILING]) - -case "X-$PROFILING" in - X-yes) - H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS" - AC_MSG_RESULT([yes]) - ;; - X-no) - AC_MSG_RESULT([no]) - ;; - *) - H5_CFLAGS="$H5_CFLAGS $PROFILING" - H5_CXXFLAGS="$H5_CXXFLAGS $PROFILING" - H5_FCFLAGS="$H5_FCFLAGS $PROFILING" - PROFILING="custom ($PROFILING)" - AC_MSG_RESULT([$PROFILING]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check if the compiler should use a particular optimization setting -## -AC_MSG_CHECKING([optimization level]) -AC_ARG_ENABLE([optimization], - [AS_HELP_STRING([--enable-optimization=(high|debug|none|)], - [Enable optimization flags/settings (e.g.: -O3). - This can be set independently from the build mode. - Optimizations for a given compiler can be specified - at several levels: High, with aggressive optimizations - turned on; debug, with optimizations that are - unlikely to interfere with debugging or profiling; - and none, with no optimizations at all. - See the compiler-specific config/*-flags file for more - details. - Alternatively, optimization options can - be specified directly by specifying them as a - string value. These custom optimization flags will - completely replace all other optimization flags. - [default depends on build mode: debug=debug, - production=high, clean=none] - ])], - [OPTIMIZATION=$enableval]) - -## Set the default optimization level. This depends on the compiler mode. -if test "X-$OPTIMIZATION" = X- ; then - case "X-$BUILD_MODE" in - X-debug) - OPTIMIZATION=debug - ;; - X-production) - OPTIMIZATION=high - ;; - X-clean) - OPTIMIZATION=none - ;; - esac -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([OPTIMIZATION]) - -case "X-$OPTIMIZATION" in - X-high) - H5_CFLAGS="$H5_CFLAGS $HIGH_OPT_CFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $HIGH_OPT_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $HIGH_OPT_FCFLAGS" - AC_MSG_RESULT([high]) - ;; - X-debug) - H5_CFLAGS="$H5_CFLAGS $DEBUG_OPT_CFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_OPT_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $DEBUG_OPT_FCFLAGS" - AC_MSG_RESULT([debug]) - ;; - X-none) - H5_CFLAGS="$H5_CFLAGS $NO_OPT_CFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $NO_OPT_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $NO_OPT_FCFLAGS" - AC_MSG_RESULT([none]) - ;; - *) - H5_CFLAGS="$H5_CFLAGS $OPTIMIZATION" - H5_CXXFLAGS="$H5_CXXFLAGS $OPTIMIZATION" - H5_FCFLAGS="$H5_FCFLAGS $OPTIMIZATION" - OPTIMIZATION="custom ($OPTIMIZATION)" - AC_MSG_RESULT([$OPTIMIZATION]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check if file locking should be used -## -AC_MSG_CHECKING([enable file locking]) -AC_ARG_ENABLE([file-locking], - [AS_HELP_STRING([--enable-file-locking=(yes|no|best-effort)], - [Sets the default for whether or not to use file - locking when opening files. Can be overridden - with the HDF5_USE_FILE_LOCKING environment variable - and the H5Pset_file_locking() API call. - best-effort attempts to use file locking but does - not fail when file locks have been disabled on - the file system (useful with Lustre). - [default=best-effort] - ])], - [DESIRED_FILE_LOCKING=$enableval]) - -## Set defaults -if test "X-$DESIRED_FILE_LOCKING" = X- ; then - DESIRED_FILE_LOCKING=best-effort -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([DESIRED_FILE_LOCKING]) -AC_SUBST([USE_FILE_LOCKING]) -AC_SUBST([IGNORE_DISABLED_FILE_LOCKS]) - -case "X-$DESIRED_FILE_LOCKING" in - X-best-effort) - AC_MSG_RESULT([best-effort]) - AC_DEFINE([USE_FILE_LOCKING], [1], - [Define if the library will use file locking]) - AC_DEFINE([IGNORE_DISABLED_FILE_LOCKS], [1], - [Define if the library will ignore file locks when disabled]) - ;; - X-yes) - AC_MSG_RESULT([yes]) - AC_DEFINE([USE_FILE_LOCKING], [1], - [Define if the library will use file locking]) - ;; - X-no) - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $USE_FILE_LOCKING]) - ;; -esac - - -## ---------------------------------------------------------------------- -## Enable/disable internal package-level debugging output -## -AC_MSG_CHECKING([for internal debug output]) -AC_ARG_ENABLE([internal-debug], - [AS_HELP_STRING([--enable-internal-debug=(yes|all|no|none|)], - [Enable extra debugging output on HDF5 library - errors. One may also specify a comma-separated - list of package names without the leading H5. - This is independent of the build mode - and is mainly of interest to HDF Group developers. - Yes/all and no/none are synonymous. - [default=all if debug build, otherwise none] - ])], - [INTERNAL_DEBUG_OUTPUT=$enableval]) - -## Set default -if test "X-$INTERNAL_DEBUG_OUTPUT" = X- ; then - if test "X-$BUILD_MODE" = "X-debug" ; then - INTERNAL_DEBUG_OUTPUT=all - else - INTERNAL_DEBUG_OUTPUT=none - fi -fi - -AC_SUBST([INTERNAL_DEBUG_OUTPUT]) - -## These are all the packages that use H5*_DEBUG. -## There is no harm in specifying a package not in this list; -## you'll just get an unused H5_DEBUG symbol. -## -## Some packages that define debug checks or output are -## too specialized or have huge performance hits. These -## are not listed in the "all" packages list. -## -## all_packages="AC,B2,CX,D,F,FA,FL,FS,MM,O,T,TS,Z" -all_packages="AC,B2,CX,D,F,MM,O,T,TS,Z" - -case "X-$INTERNAL_DEBUG_OUTPUT" in - X-yes|X-all) - INTERNAL_DEBUG_OUTPUT=$all_packages - DEBUG_PKG_LIST=$all_packages - ;; - X-no|X-none) - INTERNAL_DEBUG_OUTPUT=none - DEBUG_PKG_LIST= - ;; - *) - DEBUG_PKG_LIST=$INTERNAL_DEBUG_OUTPUT - ;; -esac -AC_MSG_RESULT([$INTERNAL_DEBUG_OUTPUT]) - -## Define H5*_DEBUG symbols that control package output -## NOTE: No sanity checking done here! -if test -n "$DEBUG_PKG_LIST"; then - for pkg in `echo $DEBUG_PKG_LIST | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "`; do - H5_CPPFLAGS="$H5_CPPFLAGS -DH5${pkg}_DEBUG" - done -fi - -## ---------------------------------------------------------------------- -## Enable tracing of the API -## -AC_MSG_CHECKING([for API tracing]); -AC_ARG_ENABLE([trace], - [AS_HELP_STRING([--enable-trace], - [Enable HDF5 API tracing capability. - [default=yes if debug build, otherwise no] - ])], - [TRACE_API=$enableval]) - -## Set the default level. -if test "X-$TRACE_API" = X- ; then - if test "X-$BUILD_MODE" = "X-debug" ; then - TRACE_API=yes - else - TRACE_API=no - fi -fi - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([TRACE_API]) - -case "X-$TRACE_API" in - X-yes) - AC_MSG_RESULT([yes]) - H5_CPPFLAGS="$H5_CPPFLAGS -DH5_DEBUG_API" - ;; - X-no) - AC_MSG_RESULT([no]) - H5_CPPFLAGS="$H5_CPPFLAGS -UH5_DEBUG_API" - ;; - *) - AC_MSG_ERROR([Unrecognized value: $TRACE_API]) - ;; -esac - -## ---------------------------------------------------------------------- -## Check if they would like to use a memory checking tool (like valgrind's -## 'memcheck' tool, or Rational Purify, etc) and the library should be -## more scrupulous with it's memory operations. Enabling this also -## disables the library's free space manager code. -## -AC_MSG_CHECKING([whether a memory checking tool will be used]) -AC_ARG_ENABLE([using-memchecker], - [AS_HELP_STRING([--enable-using-memchecker], - [Enable this option if a memory allocation and/or - bounds checking tool will be used on the HDF5 - library. Enabling this causes the library to be - more picky about its memory operations and also - disables the library's free space manager code. - [default=no] - ])], - [USINGMEMCHECKER=$enableval]) - -## Allow this variable to be substituted in -## other files (src/libhdf5.settings.in, etc.) -AC_SUBST([USINGMEMCHECKER]) - -## Set the default level. -if test "X-$USINGMEMCHECKER" = X- ; then - USINGMEMCHECKER=no -fi - -case "X-$USINGMEMCHECKER" in - X-yes) - AC_DEFINE([USING_MEMCHECKER], [1], - [Define if a memory checking tool will be used on the library, - to cause library to be very picky about memory operations and - also disable the internal free list manager code.]) - AC_MSG_RESULT([yes]) - ;; - X-no) - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $USINGMEMCHECKER]) - ;; -esac - -## Checkpoint the cache -AC_CACHE_SAVE - -## What header files and libraries do we have to look for for parallel -## support? For the most part, search paths are already specified with -## CPPFLAGS and LDFLAGS or are known to the compiler. -## -AC_ARG_ENABLE([parallel], - [AS_HELP_STRING([--enable-parallel], - [Search for MPI-IO and MPI support files])]) - -## The --enable-parallel flag is not compatible with --enable-cxx. -## If the user tried to specify both flags, throw an error, unless -## they also provided the --enable-unsupported flag. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - AC_MSG_ERROR([--enable-cxx and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error.]) - fi -fi - -## The --enable-parallel flag is not compatible with --enable-java. -## If the user tried to specify both flags, throw an error, unless -## they also provided the --enable-unsupported flag. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF_JAVA}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - AC_MSG_ERROR([--enable-java and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error.]) - fi -fi - -# Requires MPI standard 3.0 and greater -if test "X${enable_parallel}" = "Xyes"; then - AC_MSG_CHECKING([whether MPI meets the minimum 3.0 standard]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #if MPI_VERSION < 3 - #error, found MPI_VERSION < 3 - #endif]])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([HDF5 requires MPI standard 3.0 or greater])] - ) -fi - -AC_MSG_CHECKING([for parallel support files]) -case "X-$enable_parallel" in - X-|X-no|X-none) - ## We are not compiling for parallel. - AC_MSG_RESULT([skipped]) - ;; - - X-yes) - ## We want to compile a parallel library with a compiler that - ## may already know how to link with MPI and MPI-IO. - AC_MSG_RESULT([provided by compiler]) - PARALLEL=yes - - ## Try link a simple MPI program. - AC_MSG_CHECKING([whether a simple MPI-IO C program can be linked]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ MPI_Init(0, (void *)0); - MPI_File_open(0, (void *)0, 0, 0, (void *)0);]])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([unable to link a simple MPI-IO C program])]) - - if test "X$HDF_FORTRAN" = "Xyes"; then - PAC_PROG_FC_MPI_CHECK - fi - - ## Set RUNPARALLEL to mpiexec if not set yet. - if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then - RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" - fi - ;; - - *) - AC_MSG_RESULT([error]) - AC_MSG_ERROR([\'$enable_parallel\' is not a valid parallel search type]) - ;; -esac - -## ---------------------------------------------------------------------- -## Print some other parallel information and do some sanity checks. -## Needs to be done outside of the PARALLEL block since the serial -## build also needs to have values defined. -## -AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no" -AC_SUBST([INSTRUMENT_LIBRARY]) INSTRUMENT_LIBRARY=no -AC_SUBST([PARALLEL_FILTERED_WRITES]) -AC_SUBST([LARGE_PARALLEL_IO]) - -if test -n "$PARALLEL"; then - if test "X$HDF5_TESTS" = "Xyes"; then - ## The 'testpar' directory should participate in the build - TESTPARALLEL=testpar - fi - - ## We are building a parallel library - AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support]) - - ## Display what we found about running programs - AC_MSG_CHECKING([prefix for running on one processor]) - AC_MSG_RESULT([$RUNSERIAL]) - AC_MSG_CHECKING([prefix for running in parallel]) - AC_MSG_RESULT([$RUNPARALLEL]) - - ## There *must* be some way to run in parallel even if it's just the - ## word `none'. - if test -z "$RUNPARALLEL"; then - AC_MSG_ERROR([no way to run a parallel program]) - fi - - ## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with - ## the empty string. This means that no launch commands were requested, - ## so we will not use any launch commands. - if test "X$RUNSERIAL" = "Xnone"; then - RUNSERIAL="" - fi - if test "X$RUNPARALLEL" = "Xnone"; then - RUNPARALLEL="" - fi - - if test "X$HDF_FORTRAN" = "Xyes"; then - ADD_PARALLEL_FILES="yes" - AC_MSG_CHECKING([for MPI_Comm_c2f and MPI_Comm_f2c functions]) - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - ]], - [[MPI_Comm c_comm; MPI_Comm_c2f(c_comm)]])], - [AC_DEFINE([HAVE_MPI_MULTI_LANG_Comm], [1], - [Define if MPI_Comm_c2f and MPI_Comm_f2c exist]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])] - ) - - AC_MSG_CHECKING([for MPI_Info_c2f and MPI_Info_f2c functions]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[MPI_Info c_info; MPI_Info_c2f(c_info)]])], - [AC_DEFINE([HAVE_MPI_MULTI_LANG_Info], [1], - [Define if MPI_Info_c2f and MPI_Info_f2c exist]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])] - ) - - AC_LANG_PUSH([Fortran]) - AC_MSG_CHECKING([for MPI-3 module mpi_f08]) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([], - [ - USE mpi_f08 - IMPLICIT NONE - TYPE(MPI_Comm) :: comm - TYPE(MPI_INFO) :: info - ] - ) - ], - [AC_DEFINE([HAVE_MPI_F08], [1], - [Define if mpi_f08 module exist]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])] - ) - AC_LANG_POP(Fortran) - - if test "X$HDF5_TESTS" = "Xyes"; then - AC_SUBST([MPI_LOGICAL_KIND]) - PAC_FIND_MPI_LOGICAL_KIND - if test "X$" = "Xyes"; then - HAVE_ISO_FORTRAN_ENV="1" - AC_DEFINE([HAVE_ISO_FORTRAN_ENV], [1], [Define if Fortran supports ISO_FORTRAN_ENV (F08)]) - fi - fi - - fi - - ## ---------------------------------------------------------------------- - ## Enable instrumenting of the library's internal operations - ## in parallel builds. - ## - - ## Set default - if test "X-$BUILD_MODE" = "X-debug" ; then - INSTRUMENT_LIBRARY=yes - else - INSTRUMENT_LIBRARY=no - fi - - AC_MSG_CHECKING([for instrumented library]); - AC_ARG_ENABLE([instrument], - [AS_HELP_STRING([--enable-instrument], - [Enable library instrumentation of optimization - tracing (only used with parallel builds). - [default=yes if a parallel debug build, otherwise no] - ])], - [INSTRUMENT_LIBRARY=$enableval]) - - ## Allow this variable to be substituted in - ## other files (src/libhdf5.settings.in, etc.) - AC_SUBST([INSTRUMENT_LIBRARY]) - - case "X-$INSTRUMENT_LIBRARY" in - X-yes) - AC_DEFINE([HAVE_INSTRUMENTED_LIBRARY], [1], - [Define if parallel library will contain instrumentation to detect correct optimization operation]) - AC_MSG_RESULT([yes]) - ;; - X-no) - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $INSTRUMENT_LIBRARY]) - ;; - esac - - ## ---------------------------------------------------------------------- - ## Check for the MPI functions necessary for the Parallel Compression - ## feature. If these are not present, issue a warning that Parallel - ## Compression will be disabled. - ## - AC_MSG_CHECKING([for MPI_Ibarrier/MPI_Issend/MPI_Iprobe/MPI_Irecv functions]) - - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ - #include - ]], - [[ - int flag; - MPI_Init(0, (void *) 0); - MPI_Ibarrier(0, (void *) 0); - MPI_Issend((void *) 0, 0, 0, 0, 0, 0, (void *) 0); - MPI_Iprobe(0, 0, 0, &flag, (void *) 0); - MPI_Irecv((void *) 0, 0, 0, 0, 0, 0, (void *) 0); - ]] - )], - [AC_MSG_RESULT([yes]) - PARALLEL_FILTERED_WRITES=yes - AC_DEFINE([HAVE_PARALLEL_FILTERED_WRITES], [1], [Define if we have support for writing to filtered datasets in parallel])], - [AC_MSG_RESULT([no]) - AC_MSG_WARN([A simple MPI program using the MPI_Ibarrier, MPI_Issend, MPI_Iprobe and MPI_Irecv functions could not be compiled and linked. - Parallel writes of filtered data will be disabled.]) - PARALLEL_FILTERED_WRITES=no] - ) - - ## ---------------------------------------------------------------------- - ## Check for the MPI-3 functions necessary for the big I/O feature. - ## If these are not present, issue a warning that the big I/O feature - ## will be disabled. - ## - AC_MSG_CHECKING([for MPI_Get_elements_x and MPI_Type_size_x functions]) - - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ - #include - ]], - [[ - MPI_Count count; - MPI_Init(0, (void *) 0); - MPI_Get_elements_x(0, 0, &count); - MPI_Type_size_x(0, &count); - ]] - )], - [AC_MSG_RESULT([yes]) - LARGE_PARALLEL_IO=yes], - [AC_MSG_RESULT([no]) - AC_MSG_WARN([A simple MPI program using the MPI_Get_elements_x and MPI_Type_size_x functions could not be compiled and linked. - Reading/Writing >2GB of data in a single parallel I/O operation will be disabled.]) - LARGE_PARALLEL_IO=no] - ) - -fi - -## ---------------------------------------------------------------------- - -## Build parallel tools if parallel tools, parallel, and build tools options -## are all enabled. -## -AC_SUBST([PARALLEL_TOOLS]) - -## Default is no parallel tools -PARALLEL_TOOLS=no - -AC_MSG_CHECKING([parallel tools]) -AC_ARG_ENABLE([parallel-tools], - [AS_HELP_STRING([--enable-parallel-tools], - [Enable building parallel tools. - [default=no]])], - [PARALLEL_TOOLS=$enableval]) - -if test "X${PARALLEL_TOOLS}" = "Xyes"; then - if test "X${HDF5_TOOLS}" != "Xyes"; then - AC_MSG_ERROR([--enable-tools is required for --enable-parallel-tools]) - fi - if test "X${PARALLEL}" != "Xyes"; then - AC_MSG_ERROR([--enable-parallel is required for --enable-parallel-tools]) - fi -fi - -case "X-$PARALLEL_TOOLS" in - X-|X-no) - AC_MSG_RESULT([no]) - ;; - X-yes) - AC_MSG_RESULT([yes]) - ;; - *) - ;; -esac - -if test "X${PARALLEL_TOOLS}" = "Xyes"; then - ## Is the mpiFileUtils library (libmfu) required and available? - ## - AC_SUBST([H5DWALK_LDFLAGS]) - AC_SUBST([H5DWALK_LIBS]) - AC_SUBST([H5DWALK_CPPFLAGS]) - - H5DWALK_LDFLAGS="${H5DWALK_LDFLAGS}" - - ## Default is not present - HAVE_LIBMFU=no - - AC_ARG_WITH([libmfu], - [AS_HELP_STRING([--with-libmfu=DIR], - [Use the libmfu library [default=no]])],, - [withval=no]) - - case "X-$withval" in - X-yes) - HAVE_LIBMFU="yes" - AC_CHECK_HEADERS([mfu.h],, [unset HAVE_LIBMFU]) - if test "x$HAVE_LIBMFU" = "xyes"; then - AC_CHECK_LIB([mfu], [mfu_init], [H5DWALK_LIBS="-lmfu"], [unset HAVE_LIBMFU]) - fi - if test -z "$HAVE_LIBMFU" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR([couldn't find libmfu library]) - fi - ;; - X-|X-no|X-none) - HAVE_LIBMFU="no" - AC_MSG_CHECKING([for libmfu library]) - AC_MSG_RESULT([suppressed]) - ;; - *) - HAVE_LIBMFU="yes" - case "$withval" in - *,*) - libmfu_inc="`echo $withval |cut -f1 -d,`" - libmfu_lib="`echo $withval |cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - libmfu_inc="$withval/include" - libmfu_lib="$withval/lib64" - libcircle_lib="$withval/lib" - fi - ;; - esac - - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - - ## For these checks we need the libmfu locations added to CPPFLAGS, - ## AM_CPPFLAGS, LDFLAGS, and AM_LDFLAGS. The third param should set them - ## back to these saved values. If the checks pass, then normally these four - ## flag variables would be updated, but in this case we put the changes in - ## variables specific to H5DWALK since they aren't used elsewhere. - if test -n "$libmfu_inc"; then - CPPFLAGS="$CPPFLAGS -I$libmfu_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$libmfu_inc" - fi - - if test -n "$libmfu_lib"; then - LDFLAGS="$LDFLAGS -L$libmfu_lib -L$libcircle_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$libmfu_lib -L$libcircle_lib" - fi - - if test "x$HAVE_LIBMFU" = "xyes"; then - AC_CHECK_LIB([mfu], [mfu_init],[H5DWALK_LIBS="-lmfu"], [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_LIBMFU]) - if test -n "$HAVE_LIBMFU"; then - AC_CHECK_HEADERS([mfu.h],[H5DWALK_CPPFLAGS="-I$libmfu_inc"],[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_LIBMFU]) - fi - fi - - if test -z "$HAVE_LIBMFU" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR([couldn't find libmfu library]) - else - H5DWALK_LDFLAGS="-L$libmfu_lib -L$libcircle_lib" - fi - - if test -z "$LD_LIBRARY_PATH"; then - export LD_LIBRARY_PATH="$libmfu_lib:$libcircle_lib" - else - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$libmfu_lib:$libcircle_lib" - fi - - LL_PATH="$LD_LIBRARY_PATH" - ;; - esac -fi - -## -AM_CONDITIONAL([PARALLEL_TOOLS_CONDITIONAL], [test "X$HAVE_LIBMFU" = "Xyes"]) - -## ---------------------------------------------------------------------- -## Check if the map API is enabled by --enable-map-api -## -AC_SUBST([MAP_API]) - -## Default is no map API -MAP_API=no - -AC_MSG_CHECKING([if the map API (H5M) is enabled]) - -AC_ARG_ENABLE([map-api], - [AS_HELP_STRING([--enable-map-api], - [Build the map API (H5M). - This is not yet supported in the native file format - and requires a VOL connector that supports it. - [default=no]])], - [MAP_API=$enableval], [MAP_API=no]) - -if test "X$MAP_API" = "Xyes"; then - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_MAP_API], [1], - [Define if the map API (H5M) should be compiled]) -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Check if Subfiling I/O driver is enabled by --enable-subfiling-vfd -## -AC_SUBST([SUBFILING_VFD]) - -## Default is no subfiling VFD -SUBFILING_VFD=no - -## Always include subfiling directory so public header files are available -H5_CPPFLAGS="$H5_CPPFLAGS -I$ac_abs_confdir/src/H5FDsubfiling" - -AC_MSG_CHECKING([if the subfiling I/O virtual file driver (VFD) is enabled]) - -AC_ARG_ENABLE([subfiling-vfd], - [AS_HELP_STRING([--enable-subfiling-vfd], - [Build the subfiling I/O virtual file driver (VFD). Requires --enable-parallel. - [default=no]])], - [SUBFILING_VFD=$enableval], [SUBFILING_VFD=no]) - -if test "X$SUBFILING_VFD" = "Xyes"; then - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SUBFILING_VFD], [1], - [Define if the subfiling I/O virtual file driver (VFD) should be compiled]) - AC_DEFINE([HAVE_IOC_VFD], [1], - [Define if the I/O Concentrator virtual file driver (VFD) should be compiled]) - - if test "X${PARALLEL}" != "Xyes"; then - AC_MSG_ERROR([--enable-parallel is required for --enable-subfiling-vfd]) - fi - - ## ---------------------------------------------------------------------- - ## Check for MPI_Comm_split_type availability - ## - AC_MSG_CHECKING([for MPI_Comm_split_type function]) - - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ - #include - ]], - [[ - MPI_Comm intra_comm; - MPI_Init(0, (void *) 0); - MPI_Comm_split_type(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, &intra_comm); - ]] - )], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([unable to link MPI program that uses MPI_Comm_split_type]) - ] - ) - - # Check for threads availability - if test "x$THREADS" = "xno"; then - AC_MSG_ERROR([Subfiling VFD requires thread operations support.]) - fi - -else - AC_MSG_RESULT([no]) -fi - -## Subfiling and IOC VFD files are not built if not required. -AM_CONDITIONAL([SUBFILING_VFD_CONDITIONAL], [test "X$SUBFILING_VFD" = "Xyes"]) -# IOC VFD is currently only built when subfiling is enabled -AM_CONDITIONAL([IOC_VFD_CONDITIONAL], [test "X$SUBFILING_VFD" = "Xyes"]) - - -## ---------------------------------------------------------------------- -## Check if Direct I/O driver is enabled by --enable-direct-vfd -## -AC_SUBST([DIRECT_VFD]) - -## Default is no direct VFD -DIRECT_VFD=no - -AC_CACHE_VAL([hdf5_cv_direct_io], - AC_CHECK_DECL([O_DIRECT], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no], [[#include ]])) -AC_CACHE_VAL([hdf5_cv_posix_memalign], - AC_CHECK_FUNC([posix_memalign], [hdf5_cv_posix_memalign=yes], [hdf5_cv_posix_memalign=no])) - -AC_MSG_CHECKING([if the direct I/O virtual file driver (VFD) is enabled]) - -AC_ARG_ENABLE([direct-vfd], - [AS_HELP_STRING([--enable-direct-vfd], - [Build the direct I/O virtual file driver (VFD). - This is based on the POSIX (sec2) VFD and - requires the open() call to take the O_DIRECT - flag. [default=no]])], - [DIRECT_VFD=$enableval], [DIRECT_VFD=no]) - -if test "X$DIRECT_VFD" = "Xyes"; then - if test ${hdf5_cv_direct_io} = "yes" && test ${hdf5_cv_posix_memalign} = "yes" ; then - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_DIRECT], [1], - [Define if the direct I/O virtual file driver (VFD) should be compiled]) - else - AC_MSG_RESULT([no]) - DIRECT_VFD=no - AC_MSG_ERROR([The direct VFD was requested but cannot be built. This is either - due to O_DIRECT not being found in fcntl.h or a lack of - posix_memalign() on your system. Please re-configure without - specifying --enable-direct-vfd.]) - fi -else - AC_MSG_RESULT([no]) -fi - -## Direct VFD files are not built if not required. -AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"]) - -## ---------------------------------------------------------------------- -## Check whether the Mirror VFD can be built. -## Auto-enabled if the required libraries are present. -## -AC_SUBST([MIRROR_VFD]) - -## Default is no Mirror VFD -MIRROR_VFD=no - -AC_ARG_ENABLE([mirror-vfd], - [AS_HELP_STRING([--enable-mirror-vfd], - [Build the socket-based Mirror virtual file driver (VFD). - [default=no]])], - [MIRROR_VFD=$enableval], [MIRROR_VFD=no]) - -if test "X$MIRROR_VFD" = "Xyes"; then - - AC_CHECK_HEADERS([arpa/inet.h],, [unset MIRROR_VFD]) - AC_CHECK_HEADERS([netinet/in.h],, [unset MIRROR_VFD]) - AC_CHECK_HEADERS([netdb.h],, [unset MIRROR_VFD]) - AC_CHECK_HEADERS([sys/socket.h],, [unset MIRROR_VFD]) - AC_CHECK_FUNC([fork], [], [unset MIRROR_VFD]) - - AC_MSG_CHECKING([if the Mirror virtual file driver (VFD) can be built]) - if test "X$MIRROR_VFD" = "Xyes"; then - AC_DEFINE([HAVE_MIRROR_VFD], [1], - [Define whether the Mirror virtual file driver (VFD) will be compiled]) - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - MIRROR_VFD=no - AC_MSG_ERROR([The Mirror VFD cannot be built. - Missing one or more of: arpa/inet.h, netinet/in.h, - netdb.h, sys/socket.h, fork().]) - fi -else - AC_MSG_CHECKING([if the Mirror virtual file driver (VFD) is enabled]) - AC_MSG_RESULT([no]) - MIRROR_VFD=no -fi - -## Mirror VFD files built only if able. -AM_CONDITIONAL([MIRROR_VFD_CONDITIONAL], [test "X$MIRROR_VFD" = "Xyes"]) - -## ---------------------------------------------------------------------- -## Check if Read-Only S3 virtual file driver is enabled by --enable-ros3-vfd -## -AC_SUBST([ROS3_VFD]) - -## Default is no Read-Only S3 VFD -ROS3_VFD=no - -AC_ARG_ENABLE([ros3-vfd], - [AS_HELP_STRING([--enable-ros3-vfd], - [Build the Read-Only S3 virtual file driver (VFD). - [default=no]])], - [ROS3_VFD=$enableval], [ROS3_VFD=no]) - -if test "X$ROS3_VFD" = "Xyes"; then - AC_CHECK_HEADERS([curl/curl.h],, [unset ROS3_VFD]) - AC_CHECK_HEADERS([openssl/evp.h],, [unset ROS3_VFD]) - AC_CHECK_HEADERS([openssl/hmac.h],, [unset ROS3_VFD]) - AC_CHECK_HEADERS([openssl/sha.h],, [unset ROS3_VFD]) - if test "X$ROS3_VFD" = "Xyes"; then - AC_CHECK_LIB([curl], [curl_global_init],, [unset ROS3_VFD]) - AC_CHECK_LIB([crypto], [EVP_sha256],, [unset ROS3_VFD]) - fi - - AC_MSG_CHECKING([if the Read-Only S3 virtual file driver (VFD) is enabled]) - if test "X$ROS3_VFD" = "Xyes"; then - AC_DEFINE([HAVE_ROS3_VFD], [1], - [Define whether the Read-Only S3 virtual file driver (VFD) should be compiled]) - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - ROS3_VFD=no - AC_MSG_ERROR([The Read-Only S3 VFD was requested but cannot be built. - Please check that openssl and cURL are available on your - system, and/or re-configure without option - --enable-ros3-vfd.]) - fi -else - AC_MSG_CHECKING([if the Read-Only S3 virtual file driver (VFD) is enabled]) - AC_MSG_RESULT([no]) - ROS3_VFD=no - -fi - -## Read-only S3 files are not built if not required. -AM_CONDITIONAL([ROS3_VFD_CONDITIONAL], [test "X$ROS3_VFD" = "Xyes"]) - - -## ---------------------------------------------------------------------- -## Is libhdfs (Hadoop Distributed File System) present? -## It might be specified with the `--with-libhdfs' command-line switch. -## If found, enables the HDFS VFD. -## -AC_SUBST([HAVE_LIBHDFS]) -AC_ARG_WITH([libhdfs], - [AS_HELP_STRING([--with-libhdfs=DIR], - [Provide libhdfs library to enable HDFS virtual file driver (VFD) [default=no]])],, - [withval=no]) - -case $withval in - no) - HAVE_LIBHDFS="no" - AC_MSG_CHECKING([for libhdfs]) - AC_MSG_RESULT([suppressed]) - ;; - *) - HAVE_LIBHDFS="yes" - case "$withval" in - *,*) - libhdfs_inc="`echo $withval |cut -f1 -d,`" - libhdfs_lib="`echo $withval |cut -f2 -d, -s`" - ;; - yes) - libhdfs_inc="$HADOOP_HOME/include" - libhdfs_lib="$HADOOP_HOME/lib" - ;; - *) - if test -n "$withval"; then - libhdfs_inc="$withval/include" - libhdfs_lib="$withval/lib" - fi - ;; - esac - - if test -n "$libhdfs_inc"; then - CPPFLAGS="$CPPFLAGS -I$libhdfs_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$libhdfs_inc" - fi - AC_CHECK_HEADERS([hdfs.h],, - [unset HAVE_LIBHDFS]) - - if test "x$HAVE_LIBHDFS" = "xyes"; then - dnl Check for '-ljvm' needed by libhdfs - JNI_LDFLAGS="" - if test $JAVA_HOME != "" - then - JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH -L$JAVA_HOME/jre/lib/$OS_ARCH/server" - fi - ldflags_bak=$LDFLAGS - LDFLAGS="$LDFLAGS $JNI_LDFLAGS" - AC_CHECK_LIB([jvm], [JNI_GetCreatedJavaVMs]) - LDFLAGS=$ldflags_bak - AC_SUBST([JNI_LDFLAGS]) - if test -n "$libhdfs_lib"; then - ## Hadoop distribution hides libraries down one level in 'lib/native' - libhdfs_lib="$libhdfs_lib/native" - LDFLAGS="$LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS" - AM_LDFLAGS="$AM_LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS" - fi - AC_CHECK_LIB([hdfs], [hdfsConnect],, - [unset HAVE_LIBHDFS]) - fi - - if test -z "$HAVE_LIBHDFS"; then - AC_MSG_ERROR([Set to use libhdfs library, but could not find or use - libhdfs. Please verify that the path to HADOOP_HOME is - valid, and/or reconfigure without --with-libhdfs.]) - fi - ;; -esac - -if test "x$HAVE_LIBHDFS" = "xyes"; then - AC_DEFINE([HAVE_LIBHDFS], [1], - [Proceed to build with libhdfs]) -fi - -## Read-only HDFS files are not built if not required. -AM_CONDITIONAL([HDFS_VFD_CONDITIONAL], [test "X$HAVE_LIBHDFS" = "Xyes"]) - -## Checkpoint the cache -AC_CACHE_SAVE - -## ---------------------------------------------------------------------- -## Use custom examples path. -## -AC_MSG_CHECKING([for custom examples path definition]) -AC_ARG_WITH([examplesdir], - [AS_HELP_STRING([--with-examplesdir=location], - [Specify path for examples - [default="DATAROOTDIR/hdf5_examples"]])],, - withval="${datarootdir}/hdf5_examples") - -if test "X$withval" = "X"; then - AC_MSG_RESULT([default]) - examplesdir="${datarootdir}/hdf5_examples" -else - AC_MSG_RESULT([$withval]) - examplesdir=$withval -fi - -AC_SUBST([examplesdir]) -AC_DEFINE_UNQUOTED([EXAMPLESDIR], ["$examplesdir"], - [Define the examples directory]) - -## ---------------------------------------------------------------------- -## Enable custom plugin default path for library. It requires SHARED support. -## -AC_MSG_CHECKING([for custom plugin default path definition]) -AC_ARG_WITH([default-plugindir], - [AS_HELP_STRING([--with-default-plugindir=location], - [Specify default location for plugins - [default="/usr/local/hdf5/lib/plugin"]])],, - withval="/usr/local/hdf5/lib/plugin") - -if test "X$withval" = "X"; then - AC_MSG_RESULT([default]) - default_plugindir="/usr/local/hdf5/lib/plugin" -else - AC_MSG_RESULT([$withval]) - default_plugindir=$withval -fi - -AC_DEFINE_UNQUOTED([DEFAULT_PLUGINDIR], ["$default_plugindir"], - [Define the default plugins path to compile]) - -## ---------------------------------------------------------------------- -## Decide whether the presence of user's exception handling functions is -## checked and data conversion exceptions are returned. This is mainly -## for the speed optimization of hard conversions. Soft conversions can -## actually benefit little. -## -AC_MSG_CHECKING([whether exception handling functions are checked during data conversions]) -AC_ARG_ENABLE([dconv-exception], - [AS_HELP_STRING([--enable-dconv-exception], - [Check exception handling functions during - data conversions [default=yes]])], - [DCONV_EXCEPTION=$enableval], [DCONV_EXCEPTION=yes]) - -if test "$DCONV_EXCEPTION" = "yes"; then - AC_MSG_RESULT([yes]) - AC_DEFINE([WANT_DCONV_EXCEPTION], [1], - [Check exception handling functions during data conversions]) -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Decide whether the data accuracy has higher priority during data -## conversions. If not, some hard conversions will still be preferred even -## though the data may be wrong (for example, some compilers don't -## support denormalized floating values) to maximize speed. -## -AC_MSG_CHECKING([whether data accuracy is guaranteed during data conversions]) -AC_ARG_ENABLE([dconv-accuracy], - [AS_HELP_STRING([--enable-dconv-accuracy], - [Guarantee data accuracy during - data conversions [default=yes]])], - [DATA_ACCURACY=$enableval], [DATA_ACCURACY=yes]) - -if test "$DATA_ACCURACY" = "yes"; then - AC_MSG_RESULT([yes]) - AC_DEFINE([WANT_DATA_ACCURACY], [1], - [Data accuracy is preferred to speed during data conversions]) -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine has window style pathname, -## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). -## (This flag should be _unset_ for all machines, except for Windows, where -## it's set in the custom Windows H5pubconf.h file) -## -AC_MSG_CHECKING([if the machine has window style path name]) - -case "$host_os" in - *mingw*) - AC_DEFINE([HAVE_WINDOW_PATH], [1], - [Define if your system has Windows-style path name.]) - AC_MSG_RESULT([yes]) - ;; - *) - AC_MSG_RESULT([no]) - ;; -esac - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine is using a special algorithm to convert -## 'long double' to '(unsigned) long' values. (This flag should only be set for -## the IBM Power Linux. When the bit sequence of long double is -## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long -## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. -## The machine's conversion gets the correct value. We define the macro and disable -## this kind of test until we figure out what algorithm they use. -## -## CROSS-COMPILING: Assume 'no' -AC_MSG_CHECKING([if using special algorithm to convert long double to (unsigned) long values]) - -## NOTE: Place all configure test programs into cmake's source file, then use a preprocessor directive -## to select the proper test program. This is done by echoing the #define and cat'ing the cmake -## source file. (HDFFV-9467) - -TEST_SRC="`(echo \"#define H5_LDOUBLE_TO_LONG_SPECIAL_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_ldouble_to_long_special=${hdf5_cv_ldouble_to_long_special=no} -else - AC_CACHE_VAL([hdf5_cv_ldouble_to_long_special], - [AC_RUN_IFELSE( - [AC_LANG_SOURCE([$TEST_SRC])] - , [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no], [hdf5_cv_ldouble_to_long_special=no])]) -fi - -if test ${hdf5_cv_ldouble_to_long_special} = "yes"; then - AC_DEFINE([LDOUBLE_TO_LONG_SPECIAL], [1], - [Define if your system converts long double to (unsigned) long values with special algorithm.]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine is using a special algorithm -## to convert some values of '(unsigned) long' to 'long double' values. -## (This flag should be off for all machines, except for IBM Power Linux, -## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., -## ..., 7fffff..., the compiler uses a unknown algorithm. We define a -## macro and skip the test for now until we know about the algorithm. -## -## CROSS-COMPILING: Assume 'no' -AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values]) - -TEST_SRC="`(echo \"#define H5_LONG_TO_LDOUBLE_SPECIAL_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_long_to_ldouble_special=${hdf5_cv_long_to_ldouble_special=no} -else - AC_CACHE_VAL([hdf5_cv_long_to_ldouble_special], - [AC_RUN_IFELSE( - [AC_LANG_SOURCE([$TEST_SRC])] - , [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no], [hdf5_cv_long_to_ldouble_special=no])]) -fi - -if test ${hdf5_cv_long_to_ldouble_special} = "yes"; then - AC_DEFINE([LONG_TO_LDOUBLE_SPECIAL], [1], - [Define if your system can convert (unsigned) long to long double values with special algorithm.]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine can accurately convert -## 'long double' to '(unsigned) long long' values. (This flag should -## be set for all machines, except for Mac OS 10.4, SGI IRIX64 6.5 and -## Powerpc Linux using XL compilers. -## When the bit sequence of long double is 0x4351ccf385ebc8a0bfcc2a3c..., -## the values of (unsigned)long long start to go wrong on these -## two machines. Adjusting it higher to 0x4351ccf385ebc8a0dfcc... or -## 0x4351ccf385ebc8a0ffcc... will make the converted values wildly wrong. -## This test detects this wrong behavior and disable the test. -## -## CROSS-COMPILING: Assume 'yes' -AC_MSG_CHECKING([if correctly converting long double to (unsigned) long long values]) - -TEST_SRC="`(echo \"#define H5_LDOUBLE_TO_LLONG_ACCURATE_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no} -else - AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate], - [AC_RUN_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], - [hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no], [hdf5_cv_ldouble_to_llong_accurate=yes])]) -fi - -if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then - AC_DEFINE([LDOUBLE_TO_LLONG_ACCURATE], [1], - [Define if your system can convert long double to (unsigned) long long values correctly.]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine can accurately convert -## '(unsigned) long long' to 'long double' values. (This flag should be -## set for all machines, except for Mac OS 10.4 and Powerpc Linux using -## XL compilers. -## When the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., -## ..., 7fffff..., the converted values are twice as big as they should be. -## -## CROSS-COMPILING: Assume 'yes' -AC_MSG_CHECKING([if correctly converting (unsigned) long long to long double values]) - -TEST_SRC="`(echo \"#define H5_LLONG_TO_LDOUBLE_CORRECT_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no} -else - AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct], - [AC_RUN_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], - [hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no], [hdf5_cv_llong_to_ldouble_correct=yes])]) -fi - -if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then - AC_DEFINE([LLONG_TO_LDOUBLE_CORRECT], [1], - [Define if your system can convert (unsigned) long long to long double values correctly.]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine is IBM ppc64le and cannot -## accurately convert some long double values. -## -## CROSS-COMPILING: Assume 'yes' -AC_MSG_CHECKING([if the system is IBM ppc64le and cannot correctly convert some long double values]) - -TEST_SRC="`(echo \"#define H5_DISABLE_SOME_LDOUBLE_CONV_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`" - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_disable_some_ldouble_conv=${hdf5_cv_disable_some_ldouble_conv=no} -else - AC_CACHE_VAL([hdf5_cv_disable_some_ldouble_conv], - [AC_RUN_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], - [hdf5_cv_disable_some_ldouble_conv=yes], [hdf5_cv_disable_some_ldouble_conv=no], [hdf5_cv_disable_some_ldouble_conv=yes])]) -fi - -if test ${hdf5_cv_disable_some_ldouble_conv} = "yes"; then - AC_DEFINE([DISABLE_SOME_LDOUBLE_CONV], [1], - [Define if your system is IBM ppc64le and cannot convert some long double values correctly.]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -## ---------------------------------------------------------------------- -## Set some variables for general configuration information to be saved -## and installed with the libraries (used to generate libhdf5.settings). -## - -## HDF5 version from the first line of the README.md file. -H5_VERSION="`cut -d' ' -f3 $srcdir/README.md | head -1`" -AC_SUBST([H5_VERSION]) - -## Configuration date -AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date`" - -## User doing the configuration -AC_SUBST([CONFIG_USER]) CONFIG_USER="`whoami`@`hostname`" -if test -n "$ORGANIZATION"; then - CONFIG_USER="$CONFIG_USER at $ORGANIZATION" -fi - -## Configuration mode (production, debug, etc.) saved above. -AC_SUBST([CONFIG_MODE]) - -## Byte sex from the AC_C_BIGENDIAN macro. -AC_SUBST([BYTESEX]) -if test "X$ac_cv_c_bigendian" = "Xyes"; then - BYTESEX="big-endian" -else - BYTESEX="little-endian" -fi - - -if test "X$ac_cv_c_bigendian" = "Xyes"; then - WORDS_BIGENDIAN="yes" -else - WORDS_BIGENDIAN="no" -fi -AC_SUBST([WORDS_BIGENDIAN]) - -## Parallel support? (set above except empty if none) -PARALLEL=${PARALLEL:-no} - -## Parallel writes to filtered datasets support? -PARALLEL_FILTERED_WRITES=${PARALLEL_FILTERED_WRITES:-no} - -## >2GB writes in parallel support? -LARGE_PARALLEL_IO=${LARGE_PARALLEL_IO:-no} - -## Compiler with version information. This consists of the full path -## name of the compiler and the reported version number. -AC_SUBST([CC_VERSION]) -## Strip anything that looks like a flag off of $CC -CC_NOFLAGS=`echo $CC | sed 's/ -.*//'` - -if `echo $CC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then - CC_VERSION="$CC" -else - CC_VERSION="$CC"; - for x in `echo $PATH | sed -e 's/:/ /g'`; do - if test -x $x/$CC_NOFLAGS; then - CC_VERSION="$x/$CC" - break - fi - done -fi -if test -n "$cc_version_info"; then - CC_VERSION="$CC_VERSION ( $cc_version_info)" -fi - -AC_SUBST([FC_VERSION]) -## Strip anything that looks like a flag off of $FC -FC_NOFLAGS=`echo $FC | sed 's/ -.*//'` - -if `echo $FC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then - FC_VERSION="$FC" -else - FC_VERSION="$FC"; - for x in `echo $PATH | sed -e 's/:/ /g'`; do - if test -x $x/$FC_NOFLAGS; then - FC_VERSION="$x/$FC" - break - fi - done -fi -if test -n "$fc_version_info"; then - FC_VERSION="$FC_VERSION ( $fc_version_info)" -fi - -AC_SUBST([CXX_VERSION]) -## Strip anything that looks like a flag off of $CXX -CXX_NOFLAGS=`echo $CXX | sed 's/ -.*//'` - -if `echo $CXX_NOFLAGS | grep ^/ >/dev/null 2>&1`; then - CXX_VERSION="$CXX" -else - CXX_VERSION="$CXX"; - for x in `echo $PATH | sed -e 's/:/ /g'`; do - if test -x $x/$CXX_NOFLAGS; then - CXX_VERSION="$x/$CXX" - break - fi - done -fi -if test -n "$cxx_version_info"; then - CXX_VERSION="$CXX_VERSION ( $cxx_version_info)" -fi - -AC_SUBST([JAVA_VERSION]) -## Strip anything that looks like a flag off of $JAVA -JAVA_NOFLAGS=`echo $JAVA | sed 's/ -.*//'` - -if `echo $JAVA_NOFLAGS | grep ^/ >/dev/null 2>&1`; then - JAVA_VERSION="$JAVA" -else - JAVA_VERSION="$JAVA"; - for x in `echo $PATH | sed -e 's/:/ /g'`; do - if test -x $x/$JAVA_NOFLAGS; then - JAVA_VERSION="$x/$JAVA" - break - fi - done -fi -java_version_info=`$JAVA -version 2>&1 |\ - grep 'version' | sed -e 's/version "//' | sed -e 's/"//'` -if test -n "$java_version_info"; then - JAVA_VERSION="$JAVA_VERSION ($java_version_info)" -fi - -## ---------------------------------------------------------------------- -## Where is the root of the source tree. Give an absolute address so -## we can find it no matter which directory of the distribution is our -## current directory. The built-in pwd fails on some systems, but the -## /bin/pwd version works OK. -## -if test -x /bin/pwd; then - pwd=/bin/pwd -else - pwd=pwd -fi -AC_SUBST([ROOT]) ROOT="`$pwd`" - -## ---------------------------------------------------------------------- -## Some programs shouldn't be built by default (e.g., programs to generate -## data files used by tests, some optional tests). -## Check if they want such programs built anyway. -## -AC_MSG_CHECKING([additional programs should be built]) -AC_ARG_ENABLE([build-all], - [AS_HELP_STRING([--enable-build-all], - [Build helper programs that only developers should need [default=no]])], - [BUILD_ALL=$enableval], - [BUILD_ALL=no]) -AC_MSG_RESULT([$BUILD_ALL]) -AM_CONDITIONAL([BUILD_ALL_CONDITIONAL], [test "X$BUILD_ALL" = "Xyes"]) - -## ---------------------------------------------------------------------- -## Enable deprecated public API symbols -## - -## Enabled unless the build mode is clean. -if test "X-$BUILD_MODE" = "X-clean" ; then - DEPREC_SYMBOLS=no -else - DEPREC_SYMBOLS=yes -fi - -AC_SUBST([DEPRECATED_SYMBOLS]) -AC_MSG_CHECKING([if deprecated public symbols are available]); -AC_ARG_ENABLE([deprecated-symbols], - [AS_HELP_STRING([--enable-deprecated-symbols], - [Enable deprecated public API symbols. - [default=yes (unless build mode = clean)] - ])], - [DEPREC_SYMBOLS=$enableval]) - -case "X-$DEPREC_SYMBOLS" in - X-yes) - AC_MSG_RESULT([yes]) - DEPRECATED_SYMBOLS=yes - ;; - X-no|*) - AC_MSG_RESULT([no]) - DEPRECATED_SYMBOLS=no - AC_DEFINE([NO_DEPRECATED_SYMBOLS], [1], - [Define if deprecated public API symbols are disabled]) - ;; -esac - -## -------------------------------------------------------------------------- -## Which version of the public APIs should the 'base' versioned symbols use? -## - -AC_SUBST([DEFAULT_API_VERSION]) -AC_MSG_CHECKING([which version of public symbols to use by default]) -AC_ARG_WITH([default-api-version], - [AS_HELP_STRING([--with-default-api-version=(default|v16|v18|v110|v112|v114|v116|v118)], - [Specify default release version of public symbols - [default=v118]])],, - [withval=v118]) - -## Allowing "default" allows the GitHub CI to check that we didn't forget -## to change the defaults when creating a new major version -if test "X$withval" = "Xv16"; then - AC_MSG_RESULT([v16]) - DEFAULT_API_VERSION=v16 - AC_DEFINE([USE_16_API_DEFAULT], [1], - [Define using v1.6 public API symbols by default]) -elif test "X$withval" = "Xv18"; then - AC_MSG_RESULT([v18]) - DEFAULT_API_VERSION=v18 - AC_DEFINE([USE_18_API_DEFAULT], [1], - [Define using v1.8 public API symbols by default]) -elif test "X$withval" = "Xv110"; then - AC_MSG_RESULT([v110]) - DEFAULT_API_VERSION=v110 - AC_DEFINE([USE_110_API_DEFAULT], [1], - [Define using v1.10 public API symbols by default]) -elif test "X$withval" = "Xv112"; then - AC_MSG_RESULT([v112]) - DEFAULT_API_VERSION=v112 - AC_DEFINE([USE_112_API_DEFAULT], [1], - [Define using v1.12 public API symbols by default]) -elif test "X$withval" = "Xv114"; then - AC_MSG_RESULT([v114]) - DEFAULT_API_VERSION=v114 - AC_DEFINE([USE_114_API_DEFAULT], [1], - [Define using v1.14 public API symbols by default]) -elif test "X$withval" = "Xv116"; then - AC_MSG_RESULT([v116]) - DEFAULT_API_VERSION=v116 - AC_DEFINE([USE_116_API_DEFAULT], [1], - [Define using v1.16 public API symbols by default]) -elif test "X$withval" = "Xv118" -o "X$withval" = "Xdefault"; then - AC_MSG_RESULT([v118]) - DEFAULT_API_VERSION=v118 - AC_DEFINE([USE_118_API_DEFAULT], [1], - [Define using v1.18 public API symbols by default]) -else - AC_MSG_ERROR([invalid version of public symbols given]) -fi - -## It's an error to try to disable deprecated public API symbols while -## choosing an older version of the public API as the default. However, -## if the user insists on doing this via the --enable-unsupported configure -## flag, we'll let them. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${DEFAULT_API_VERSION}" != "Xv118" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then - AC_MSG_ERROR([Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error.]) - fi -fi - -## ---------------------------------------------------------------------- -## Enable strict file format checks -## -AC_SUBST([STRICT_FORMAT_CHECKS]) -AC_MSG_CHECKING([whether to perform strict file format checks]); -AC_ARG_ENABLE([strict-format-checks], - [AS_HELP_STRING([--enable-strict-format-checks], - [Enable strict file format checks. - [default=yes if debug build, otherwise no] - ])], - [STRICT_FORMAT_CHECKS=$enableval]) - -## Set the default level. This depends on the compiler mode. -if test "X-$STRICT_FORMAT_CHECKS" = X- ; then - if test "X-$BUILD_MODE" = "X-debug" ; then - STRICT_FORMAT_CHECKS=yes - else - STRICT_FORMAT_CHECKS=no - fi -fi - -case "X-$STRICT_FORMAT_CHECKS" in - X-yes) - AC_MSG_RESULT([yes]) - AC_DEFINE([STRICT_FORMAT_CHECKS], [1], - [Define if strict file format checks are enabled]) - ;; - X-no) - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $STRICT_FORMAT_CHECKS]) - ;; -esac - - -## ---------------------------------------------------------------------- -## Enable use of pread/pwrite instead of read/write in certain VFDs. -## -AC_SUBST([PREADWRITE]) - -## Check these first to avoid interspersed output in the AC_ARG_ENABLE line -## below. (Probably overkill to check for both, but we'll be extra careful) -PREADWRITE_HAVE_BOTH=yes -AC_CHECK_FUNC([pread], [], [PREADWRITE_HAVE_BOTH=no]) -AC_CHECK_FUNC([pwrite], [], [PREADWRITE_HAVE_BOTH=no]) - -AC_MSG_CHECKING([whether to use pread/pwrite instead of read/write in certain VFDs]) -AC_ARG_ENABLE([preadwrite], - [AS_HELP_STRING([--enable-preadwrite], - [Enable using pread/pwrite instead of read/write in sec2/log/core VFDs. - [default=yes if pread/pwrite are present]])], - [PREADWRITE=$enableval]) - -## Set the default level. -if test "X-$PREADWRITE" = X- ; then - PREADWRITE=yes -fi - -case "X-$PREADWRITE" in - X-yes) - if test "X-$PREADWRITE_HAVE_BOTH" = "X-yes"; then - AC_DEFINE([HAVE_PREADWRITE], [1], [Define if both pread and pwrite exist.]) - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - X-no) - AC_MSG_RESULT([no]) - ;; - *) - AC_MSG_ERROR([Unrecognized value: $PREADWRITE]) - ;; -esac - - -## ---------------------------------------------------------------------- -## Enable embedded library information -## -AC_MSG_CHECKING([whether to have library information embedded in the executables]) -AC_ARG_ENABLE([embedded-libinfo], - [AS_HELP_STRING([--enable-embedded-libinfo], - [Enable embedded library information [default=yes]])], - [enable_embedded_libinfo=$enableval], - [enable_embedded_libinfo=yes]) - - if test "${enable_embedded_libinfo}" = "yes"; then - AC_MSG_RESULT([yes]) - BUILD_SETTINGS_FILE="src/H5build_settings.autotools.c.in" - AC_DEFINE([HAVE_EMBEDDED_LIBINFO], [1], - [Define if library information should be embedded in the executables]) - else - BUILD_SETTINGS_FILE="src/H5build_settings.off.c.in" - AC_MSG_RESULT([no]) - fi - - -## ---------------------------------------------------------------------- -## Restore user's CFLAGS. -CFLAGS="$saved_user_CFLAGS" -FCFLAGS="$saved_user_FCFLAGS" -CXXFLAGS="$saved_user_CXXFLAGS" -CPPFLAGS="$saved_user_CPPFLAGS" -JAVACFLAGS="$saved_user_JAVACFLAGS" -JAVAFLAGS="$saved_user_JAVAFLAGS" -LDFLAGS="$saved_user_LDFLAGS" - - -## ---------------------------------------------------------------------- -## Create automake conditionals to tell automake makefiles which directories -## need to be compiled - -AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"]) -AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test "X$PARALLEL" = "Xyes"]) -AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"]) -AM_CONDITIONAL([BUILD_JAVA_CONDITIONAL], [test "X$HDF_JAVA" = "Xyes"]) -AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"]) -AM_CONDITIONAL([BUILD_TESTS_CONDITIONAL], [test "X$HDF5_TESTS" = "Xyes"]) -AM_CONDITIONAL([BUILD_TESTS_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"]) -AM_CONDITIONAL([BUILD_TOOLS_CONDITIONAL], [test "X$HDF5_TOOLS" = "Xyes"]) -AM_CONDITIONAL([BUILD_TOOLS_HL_GIF_CONDITIONAL], [test "X$HDF5_HL_GIF_TOOLS" = "Xyes"]) -AM_CONDITIONAL([BUILD_DOXYGEN_CONDITIONAL], [test "X$HDF5_DOXYGEN" = "Xyes"]) - -## ---------------------------------------------------------------------- -## Build the Makefiles. -## - -## The directory search list -AC_SUBST([SEARCH]) SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' -export SEARCH - -## Some cleanup stuff -rm -f conftest conftest.o conftest.c dummy.o *.mod - -## Build config.status, touch the stamp files, and build all the Makefiles. -## The order is such that the first `make' does not need to update any -## configuration information. See config/commence.in for the order in which -## things need to be done. - -## First the stamp1 file for H5config.h.in -mkdir ./config >/dev/null 2>&1 -touch ./config/stamp1 - -## Then the config.status file (but not makefiles) -saved_no_create=$no_create -no_create=yes - -PARALLEL_MAKE="" -FORTRAN_PARALLEL_MAKE="" - -if test -n "$TESTPARALLEL"; then - PARALLEL_MAKE="$TESTPARALLEL/Makefile" - - if test "X$HDF_FORTRAN" = "Xyes"; then - FORTRAN_PARALLEL_MAKE=fortran/$TESTPARALLEL/Makefile - fi -fi -LT_OUTPUT -no_create=$saved_no_create - -## Then the stamp2 file for H5config.h -touch ./config/stamp2 - -## Finally the makefiles -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -## Are we compiling static libraries, shared libraries, or both? This -## is only used for the libhdf5.settings file. We can't just look at -## $enable_static and $enable_shared because if they're yes the ltconfig -## might have decided that one or the other is simply not possible. -## Therefore we have to ask the generated `libtool' shell script -## which 'features' it has enabled. -if (./libtool --features | grep '^enable shared libraries' > /dev/null); then - enable_shared=yes -else - enable_shared=no -fi - -if (./libtool --features | grep '^enable static libraries' > /dev/null); then - enable_static=yes -else - enable_static=no -fi - -## Expose things for *.in markup -AC_SUBST([STATIC_SHARED]) -AC_SUBST([enable_shared]) -AC_SUBST([enable_static]) - -if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then - STATIC_SHARED="static, shared" -elif test "X$enable_static" = "Xyes"; then - STATIC_SHARED="static" -elif test "X$enable_shared" = "Xyes"; then - STATIC_SHARED="shared" -else - STATIC_SHARED="none" -fi - -if test "X$HDF_FORTRAN" = "Xyes"; then - - ### libtool does not pass the correct argument linking (-Wl,-Wl,,) for the NAG Fortran compiler - ### on Linux (other OSs have not been tested). - ### Therefore, detect if we are using the NAG Fortran compiler, and replace the wl="-Wl," for Fortran to - ### wl="-Wl,-Wl,," in the libtool file. (HDFFV-10037) - case "`uname`" in - Linux*) - - fortran_linux_linker_option="-Wl," - if test "X$FC_BASENAME" = "Xnagfor"; then - fortran_linux_linker_option="-Wl,-Wl,," - fi - - ## Set the correct linker option for use in h5fc.in markup - AC_SUBST([fortran_linux_linker_option]) - ;; - esac - -fi - -## ---------------------------------------------------------------------- -## Set a macro if shared library is enabled. -## -AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"]) - -AC_CONFIG_FILES([Makefile - doxygen/Doxyfile - src/Makefile - src/libhdf5.settings:src/libhdf5.settings.autotools.in - src/H5build_settings.c:${BUILD_SETTINGS_FILE} - test/Makefile - test/H5srcdir_str.h - test/test_abort_fail.sh - test/test_check_version.sh - test/test_error.sh - test/test_external_env.sh - test/test_flush_refresh.sh - test/test_libinfo.sh - test/test_links_env.sh - test/test_mirror.sh - test/test_plugin.sh - test/test_swmr.sh - test/test_use_cases.sh - test/test_vds_env.sh - test/test_vds_swmr.sh - testpar/Makefile - testpar/testpflush.sh - utils/Makefile - utils/mirror_vfd/Makefile - utils/test/Makefile - utils/tools/Makefile - utils/tools/h5dwalk/Makefile - utils/tools/test/Makefile - utils/tools/test/h5dwalk/Makefile - utils/tools/test/h5dwalk/copy_demo_files.sh - utils/tools/test/h5dwalk/testh5dwalk.sh - tools/Makefile - tools/lib/Makefile - tools/libtest/Makefile - tools/src/Makefile - tools/src/h5dump/Makefile - tools/src/h5import/Makefile - tools/src/h5diff/Makefile - tools/src/h5jam/Makefile - tools/src/h5repack/Makefile - tools/src/h5ls/Makefile - tools/src/h5copy/Makefile - tools/src/misc/Makefile - tools/src/h5stat/Makefile - tools/test/Makefile - tools/test/h5dump/Makefile - tools/test/h5dump/h5dump_plugin.sh - tools/test/h5dump/testh5dump.sh - tools/test/h5dump/testh5dumppbits.sh - tools/test/h5dump/testh5dumpvds.sh - tools/test/h5dump/testh5dumpxml.sh - tools/test/h5ls/Makefile - tools/test/h5ls/h5ls_plugin.sh - tools/test/h5ls/testh5ls.sh - tools/test/h5ls/testh5lsvds.sh - tools/test/h5import/Makefile - tools/test/h5import/h5importtestutil.sh - tools/test/h5diff/Makefile - tools/test/h5diff/h5diff_plugin.sh - tools/test/h5diff/testh5diff.sh - tools/test/h5diff/testph5diff.sh - tools/src/h5format_convert/Makefile - tools/test/h5format_convert/Makefile - tools/test/h5format_convert/testh5fc.sh - tools/test/h5jam/Makefile - tools/test/h5jam/testh5jam.sh - tools/test/h5repack/Makefile - tools/test/h5repack/h5repack.sh - tools/test/h5repack/h5repack_plugin.sh - tools/test/h5copy/Makefile - tools/test/h5copy/testh5copy.sh - tools/test/misc/Makefile - tools/test/misc/testh5clear.sh - tools/test/misc/testh5mkgrp.sh - tools/test/misc/testh5repart.sh - tools/test/misc/vds/Makefile - tools/test/h5stat/Makefile - tools/test/h5stat/testh5stat.sh - tools/src/h5perf/Makefile - tools/test/perform/Makefile - bin/h5cc - bin/Makefile - c++/Makefile - c++/src/Makefile - c++/src/h5c++ - c++/test/Makefile - c++/test/H5srcdir_str.h - fortran/Makefile - fortran/src/h5fc - fortran/src/Makefile - fortran/src/H5fort_type_defines.h - fortran/test/Makefile - fortran/testpar/Makefile - java/Makefile - java/src/Makefile - java/src/jni/Makefile - java/test/Makefile - java/test/junit.sh - hl/Makefile - hl/src/Makefile - hl/test/Makefile - hl/test/H5srcdir_str.h - hl/tools/Makefile - hl/tools/gif2h5/Makefile - hl/tools/gif2h5/h52giftest.sh - hl/tools/h5watch/Makefile - hl/tools/h5watch/testh5watch.sh - hl/examples/Makefile - hl/examples/run-hlc-ex.sh - hl/c++/Makefile - hl/c++/src/Makefile - hl/c++/test/Makefile - hl/c++/examples/Makefile - hl/c++/examples/run-hlc++-ex.sh - hl/fortran/Makefile - hl/fortran/src/Makefile - hl/fortran/test/Makefile - hl/fortran/examples/Makefile - hl/fortran/examples/run-hlfortran-ex.sh]) - -AC_CONFIG_FILES([utils/subfiling_vfd/h5fuse], [chmod +x utils/subfiling_vfd/h5fuse]) -if test -n "$TESTPARALLEL"; then - if test "X$SUBFILING_VFD" = "Xyes"; then - AC_CONFIG_LINKS([testpar/h5fuse:utils/subfiling_vfd/h5fuse]) - fi -fi - -AC_OUTPUT - -chmod 755 bin/h5cc -if test "X$HDF_CXX" = "Xyes"; then - chmod 755 c++/src/h5c++ -fi - - -if test "X$HDF_FORTRAN" = "Xyes"; then - chmod 755 fortran/src/h5fc - ## libtool does not pass the correct argument linker (wl=) for the Intel Fortran compiler - ## on OS X, which is needed when building shared libraries on OS X. This script - ## replaces the 3rd occurrence, which is for Fortran, of wl="" with wl="-Wl," (HDFFV-2772) - case "`uname`" in - Darwin*) - cat libtool | awk '/wl=\"/{c++;if(c==3){sub("wl=\"\"","wl=\"-Wl,\"");c=0}}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool - ;; - esac - - ### libtool does not pass the correct linker options for some Fortran compilers - ### on Linux (other OSs have not been tested). - case "`uname`" in - Linux*) - ### NAG Fortran needs to replace "-Wl," with "-Wl,-Wl,," (HDFFV-10037) - if test "X$FC_BASENAME" = "Xnagfor"; then - cat libtool | awk '/BEGIN LIBTOOL TAG CONFIG: FC/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,-Wl,,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool - fi - ### Flang needs to replace "", with "-Wl," (avoids unknown option: -soname issues) - if test "X$FC_BASENAME" = "Xflang"; then - cat libtool | awk '/BEGIN LIBTOOL TAG CONFIG: FC/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool - fi - ;; - esac -fi - -## HDF5 configure code created by autotools with gcc 4.9.2 is adding problematic -## linker flags: -l with no library name; -l , specifically gfortran or m. -## This sed script corrects "-l " first and then "-l " with no library name. -## If the order is not preserved, all instances of "-l " will be removed. -sed -e '/^postdeps/ s/-l \([a-zA-Z]\)/-l\1/g' -e '/^postdeps/ s/-l //g' libtool > libtool.bak -mv -- libtool.bak libtool - -## show the configure settings -cat src/libhdf5.settings diff --git a/fortran/Makefile.am b/fortran/Makefile.am deleted file mode 100644 index 631d9edc888..00000000000 --- a/fortran/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# This makefile mostly just reinvokes make in the various subdirectories -# but does so in the correct order. You can alternatively invoke make from -# each subdirectory manually. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# Top-level HDF5-Fortran Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -if BUILD_TESTS_PARALLEL_CONDITIONAL - TESTPARALLEL_DIR=testpar -else - TESTPARALLEL_DIR= -endif -if BUILD_TESTS_CONDITIONAL - TESTSERIAL_DIR=test -else - TESTSERIAL_DIR= -endif - -# Subdirectories in build order -## Only recurse into subdirectories if HDF5 is configured to use Fortran. -if BUILD_FORTRAN_CONDITIONAL - SUBDIRS=src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) - -endif - -# All directories that have Makefiles -DIST_SUBDIRS=src test testpar - -include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in deleted file mode 100644 index 7f2d3cad8a9..00000000000 --- a/fortran/src/H5config_f.inc.in +++ /dev/null @@ -1,112 +0,0 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the COPYING file, which can be found at the root of the source code * -! distribution tree, or in https://www.hdfgroup.org/licenses. * -! If you do not have access to either file, you may request a copy from * -! help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure - -! The script to replace the defines in H5config_f.inc.in is -! located in configure.ac in the Fortran section. - -! Define if we have parallel support -#undef HAVE_PARALLEL - -! Define if MPI supports mpi_f08 module -#undef HAVE_MPI_F08 - -! Define if we have subfiling support -#undef HAVE_SUBFILING_VFD - -! Define if on APPLE -#undef HAVE_DARWIN - -! Define if the intrinsic function STORAGE_SIZE exists -#undef FORTRAN_HAVE_STORAGE_SIZE - -! Define if the intrinsic function SIZEOF exists -#undef FORTRAN_HAVE_SIZEOF - -! Define if the intrinsic function C_SIZEOF exists -#undef FORTRAN_HAVE_C_SIZEOF - -! Define if Fortran supports allocatable character -#undef FORTRAN_HAVE_CHAR_ALLOC - -! Define if the intrinsic function C_LONG_DOUBLE exists -#undef FORTRAN_HAVE_C_LONG_DOUBLE - -! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE -#undef FORTRAN_C_LONG_DOUBLE_IS_UNIQUE - -! Define if Fortran C_BOOL is different from default LOGICAL -#undef FORTRAN_C_BOOL_IS_UNIQUE - -! Define if Fortran supports ISO_FORTRAN_ENV (F08) -#undef HAVE_ISO_FORTRAN_ENV - -! Define MPI Fortran KIND of LOGICAL -#undef MPI_LOGICAL_KIND - -! Define the size of C's double -#undef SIZEOF_DOUBLE - -! Define the size of C's long double -#undef SIZEOF_LONG_DOUBLE - -! Define the maximum decimal precision for reals -#undef PAC_FC_MAX_REAL_PRECISION - -! If C has quad precision -#undef HAVE_FLOAT128 - -! Define if INTEGER*16 is available -#undef HAVE_Fortran_INTEGER_SIZEOF_16 - -! Maximum decimal precision for C -#undef PAC_C_MAX_REAL_PRECISION - -! number of valid REAL KINDs -#undef H5CONFIG_F_NUM_RKIND - -! valid REAL KINDs (need to have a matching C counter-part) -#undef H5CONFIG_F_RKIND - -! valid REAL KINDs (need to have a matching C counter-part) -#undef H5CONFIG_F_RKIND_SIZEOF - -! number of valid INTEGER KINDs -#undef H5CONFIG_F_NUM_IKIND - -! valid INTEGER KINDs (need to have a matching C counter-part) -#undef H5CONFIG_F_IKIND - -! Fortran compiler name -#undef Fortran_COMPILER_ID - -! Define if deprecated public API symbols are disabled -#undef NO_DEPRECATED_SYMBOLS - -! For major interface/format changes -#undef VERS_MAJOR_TMP - -! For minor interface/format changes -#undef VERS_MINOR_TMP - -! For tweaks, bug-fixes, or development -#undef VERS_RELEASE_TMP - -! macros for comparing versions -#define VERSION_GE(Maj, Min, Rel) \ - (((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR == Min) && (H5_VERS_RELEASE >= Rel)) || \ - ((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR > Min)) || (H5_VERS_MAJOR > Maj)) - -#define VERSION_LE(Maj, Min, Rel) \ - (((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR == Min) && (H5_VERS_RELEASE <= Rel)) || \ - ((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR < Min)) || (H5_VERS_MAJOR < Maj)) - diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in deleted file mode 100644 index 989be54d1ff..00000000000 --- a/fortran/src/H5fort_type_defines.h.in +++ /dev/null @@ -1,28 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* If you are reading this file and it has a '.h' suffix, it was automatically - * generated from the '.in' version. Make changes there. - */ -#define H5_FORTRAN_NATIVE_INTEGER_KIND @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -#define H5_FORTRAN_NATIVE_INTEGER_SIZEOF @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -#define H5_FORTRAN_NATIVE_REAL_KIND @PAC_FORTRAN_NATIVE_REAL_KIND@ -#define H5_FORTRAN_NATIVE_REAL_SIZEOF @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -#define H5_FORTRAN_NATIVE_DOUBLE_KIND @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -#define H5_FORTRAN_NATIVE_DOUBLE_SIZEOF @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -#define H5_FORTRAN_NUM_INTEGER_KINDS @PAC_FORTRAN_NUM_INTEGER_KINDS@ -#define H5_FORTRAN_INTEGER_KINDS @PAC_FC_ALL_INTEGER_KINDS@ -#define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -#define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ -#define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ -#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ -#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am deleted file mode 100644 index 2fdf085f4b9..00000000000 --- a/fortran/src/Makefile.am +++ /dev/null @@ -1,171 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Fortran Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am -include $(top_srcdir)/config/lt_vers.am - -# Include src directory in both Fortran and C flags (C compiler is used -# for linking). -AM_CPPFLAGS+=-I$(top_srcdir)/src -AM_FCFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/fortran/src - -AM_FCLIBS=$(LIBHDF5) - -# This is our main target, the fortran library -lib_LTLIBRARIES=libhdf5_fortran.la - -# Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) -libhdf5_fortran_la_LDFLAGS= -version-info $(LT_F_VERS_INTERFACE):$(LT_F_VERS_REVISION):$(LT_F_VERS_AGE) $(AM_LDFLAGS) - -# Some Fortran compilers can't build shared libraries, so sometimes we -# want to build a shared C library and a static Fortran library. If so, -# pass the -static flag to the library linker. -if FORTRAN_SHARED_CONDITIONAL -else - AM_LDFLAGS+=-static -endif - -# Source files for the library. -libhdf5_fortran_la_SOURCES=H5fortran_types.F90 H5f90global.F90 \ - H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 H5ESff.F90 \ - H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5VLff.F90 H5Zff.F90 H5_gen.F90 H5fortkit.F90 \ - H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ - H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.F90 - -# HDF5 Fortran library depends on HDF5 Library. -libhdf5_fortran_la_LIBADD=$(LIBHDF5) - -# h5fc is generated during configure. -# Remove it only when distclean. -DISTCLEANFILES=h5fc - -# H5fortran_types.F90 and H5f90i.h are automatically generated by -# H5match_types, and must be cleaned explicitly. -MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5_gen.F90 - -# Fortran module files can have different extensions and different names -# (e.g., different capitalizations) on different platforms. Write rules -# for them explicitly rather than trying to teach automake about them. -# They should be installed as headers and removed during clean. -maintainer-clean-local: clean-local -distclean-local: clean-local -clean-local: - @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ - fi - -install-data-local: - @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(CP) $(top_builddir)/$(subdir)/*.$(F9XMODEXT) $(DESTDIR)$(fmoddir)/. ; \ - fi - $(CP) $(top_builddir)/$(subdir)/H5f90i_gen.h $(DESTDIR)$(includedir)/. - $(CP) $(top_srcdir)/fortran/src/H5f90i.h $(DESTDIR)$(includedir)/. - $(CP) $(top_builddir)/$(subdir)/H5config_f.inc $(DESTDIR)$(includedir)/. - -uninstall-local: - @if test -n "$(F9XMODEXT)" -a "X$(F9XMODEXT)" != "Xo"; then \ - if test -f "$(fmoddir)/hdf5.$(F9XMODEXT)" -o -f "$(fmoddir)/HDF5.$(F9XMODEXT)"; then \ - set -x; $(RM) $(DESTDIR)$(fmoddir)/*.$(F9XMODEXT); \ - fi; \ - fi; \ - $(RM) $(DESTDIR)$(bindir)/$(H5FC_NAME) - $(RM) $(DESTDIR)$(includedir)/H5f90i*.h - $(RM) $(DESTDIR)$(includedir)/H5config_f.inc - -# Also install and uninstall (uninstall-local above) h5fc script -install-exec-local: - @$(INSTALL) h5fc $(DESTDIR)$(bindir)/$(H5FC_NAME) - -# Custom rule for installing h5fc, since it will be named h5pfc if hdf5 -# is configured for parallel mode -if BUILD_PARALLEL_CONDITIONAL - H5FC_NAME = h5pfc -else - H5FC_NAME = h5fc -endif - -# Rules for automatically detecting which fortran types are present -# and matching them to C types. This is accomplished using helper -# programs. -# It's a bit tricky to make sure that Automake builds things in the right -# order (especially when using 'gmake -j ...') -# H5_buildiface is compiled and run to produce H5_gen.F90. -# H5match_types.c then includes H5fort_type_defines.h and can be compiled into -# H5match_types. When H5match_types is run, it creates H5f90i_gen.h -# and H5fortran_types.F90, which are included in the Fortran library. - -# These are the helper programs we need to build. -noinst_PROGRAMS = H5match_types H5_buildiface - -# Tell Automake to create H5f90i_gen.h before it builds the library -# sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.F90 as a side effect. -BUILT_SOURCES = H5f90i_gen.h - -#Specify what Automake needs to create: first the H5fort_type_defines.h -# header, then H5match_types which includes that header, then -# it needs to run H5match_types. -H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) - $(RUNSERIAL) ./H5match_types$(EXEEXT) - -# H5_buildiface.F90 generates all the APIs that have a KIND type associated -# with them. - -H5_gen.F90: H5_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5_buildiface$(EXEEXT) - -# H5_buildiface.F90 is included in the distribution, and Automake knows -# how to compile a fortran program given its sources. - -H5_buildiface_SOURCES = H5_buildiface.F90 - -# Mark this directory as part of the Fortran API -FORTRAN_API=yes - -# Hardcode the dependencies of these files. There isn't a known way of -# determining this automagically (like we do with the C files). So, when -# doing a parallel make, some modules could be made way before the -# modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 -H5fortkit.lo: $(srcdir)/H5fortkit.F90 H5fortran_types.lo -H5_ff.lo: $(srcdir)/H5_ff.F90 H5Fff.lo H5f90global.lo -H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo -H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo H5_ff.lo H5Sff.lo -H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo H5fortkit.lo -H5ESff.lo: $(srcdir)/H5ESff.F90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo H5Pff.lo -H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo H5fortkit.lo -H5Rff.lo: $(srcdir)/H5Rff.F90 H5f90global.lo H5fortkit.lo -H5Sff.lo: $(srcdir)/H5Sff.F90 H5f90global.lo -H5Tff.lo: $(srcdir)/H5Tff.F90 H5f90global.lo -H5VLff.lo: $(srcdir)/H5VLff.F90 H5f90global.lo H5fortkit.lo -H5Zff.lo: $(srcdir)/H5Zff.F90 H5f90global.lo -H5_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo -HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ - H5Dff.lo \ - H5Eff.lo H5ESff.lo \ - H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ - H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo - -include $(top_srcdir)/config/conclude_fc.am diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am deleted file mode 100644 index 6d11dcc07d1..00000000000 --- a/fortran/test/Makefile.am +++ /dev/null @@ -1,102 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5-Fortran test/Makefile(.in) -# -# Autoconf cannot figure out dependencies between modules; disable parallel make -.NOTPARALLEL: -include $(top_srcdir)/config/commence.am - -# Include files -AM_FCFLAGS+=-I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/fortran/src - -# The Fortran test library -noinst_LTLIBRARIES=libh5test_fortran.la - -# Some Fortran compilers can't build shared libraries, so sometimes we -# want to build a shared C library and a static Fortran library. If so, -# pass the -static flag to the library linker. -if FORTRAN_SHARED_CONDITIONAL -else - AM_LDFLAGS+=-static -endif - -# Our main targets, the tests themselves -TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 vol_connector - -check_PROGRAMS=$(TEST_PROG) - -libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c - -fortranlib_test_SOURCES = tH5F.F90 tH5D.F90 tH5R.F90 tH5S.F90 tH5T.F90 tH5VL.F90 tH5Z.F90 \ - tH5Sselect.F90 tH5P.F90 tH5A.F90 tH5I.F90 tH5G.F90 tH5E.F90 tHDF5.F90 fortranlib_test.F90 - -fortranlib_test_1_8_SOURCES = tH5O.F90 tH5A_1_8.F90 tH5G_1_8.F90 tH5MISC_1_8.F90 tHDF5_1_8.F90 \ - fortranlib_test_1_8.F90 - -fortranlib_test_F03_SOURCES = tH5E_F03.F90 tH5L_F03.F90 \ - tH5O_F03.F90 tH5P_F03.F90 tH5T_F03.F90 tHDF5_F03.F90 fortranlib_test_F03.F90 - -vol_connector_SOURCES=vol_connector.F90 - -fflush1_SOURCES=fflush1.F90 -fflush2_SOURCES=fflush2.F90 - -# The tests depend on both fortran libraries and both main libraries. -LDADD=libh5test_fortran.la $(LIBH5TEST) $(LIBH5F) $(LIBHDF5) - -# Temporary files -CHECK_CLEANFILES+=*.h5 *.raw -MOSTLYCLEANFILES=*.tmp - -# Fortran module files can have different extensions and different names -# (e.g., different capitalizations) on different platforms. Write rules -# for them explicitly rather than trying to teach automake about them. -# They should be installed as headers and removed during clean. -maintainer-clean-local: clean-local -distclean-local: clean-local -clean-local: - @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT) tf_gen.F90; \ - fi - -# Mark this directory as part of the Fortran API (this affects output -# from tests in conclude.am) -FORTRAN_API=yes - -# helper program we need to build. -noinst_PROGRAMS = H5_test_buildiface - -# H5_test_buildiface.F90 generates all the test APIs that have a KIND type associated -# with them. - -tf_gen.F90: H5_test_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5_test_buildiface$(EXEEXT) - -# H5_test_buildiface.F90 is included in the distribution, and Automake knows -# how to compile a fortran program given its sources. - -H5_test_buildiface_SOURCES = H5_test_buildiface.F90 - -# The build of the H5_test_buildiface does not depend on any libraries, so set it -# to nothing. - -H5_test_buildiface_LDADD = - -# fflush2 depends on files created by fflush1 -fflush2.chkexe_: fflush1.chkexe_ - - -include $(top_srcdir)/config/conclude_fc.am diff --git a/fortran/testpar/Makefile.am b/fortran/testpar/Makefile.am deleted file mode 100644 index 3df1fee8f09..00000000000 --- a/fortran/testpar/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Fortran Parallel Library Test Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include files -AM_FCFLAGS+=-I$(top_srcdir)/fortran/src -I$(top_srcdir)/fortran/test $(F9XMODFLAG)$(top_builddir)/fortran/src \ - $(F9XMODFLAG)$(top_builddir)/fortran/test - -# Some Fortran compilers can't build shared libraries, so sometimes we -# want to build a shared C library and a static Fortran library. If so, -# pass the -static flag to the library linker. -# (Actually, we historically have bad luck combining shared libraries with -# parallel code. But you're welcome to try...) -if FORTRAN_SHARED_CONDITIONAL -else - AM_LDFLAGS+=-static -endif - -# These are our main targets -TEST_PROG_PARA=parallel_test subfiling_test async_test -check_PROGRAMS=$(TEST_PROG_PARA) - -# Temporary files -CHECK_CLEANFILES+=parf[12].h5 h5*_tests.h5 subf.h5* *.mod - -# Test source files -parallel_test_SOURCES=ptest.F90 hyper.F90 mdset.F90 multidsetrw.F90 mpi_param.F90 -subfiling_test_SOURCES=subfiling.F90 -async_test_SOURCES=async.F90 - -# The tests depend on several libraries. -LDADD=$(LIBH5FTEST) $(LIBH5TEST) $(LIBH5F) $(LIBHDF5) - -# Mark this directory as part of the Fortran API -FORTRAN_API=yes - -include $(top_srcdir)/config/conclude_fc.am diff --git a/hl/Makefile.am b/hl/Makefile.am deleted file mode 100644 index 5660b9bc5fe..00000000000 --- a/hl/Makefile.am +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -# This makefile mostly just reinvokes make in the various subdirectories -# but does so in the correct order. You can alternatively invoke make from -# each subdirectory manually. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 High-Level Makefile(.in) - -include $(top_srcdir)/config/commence.am - -## Automake will automatically recurse into fortran directory for distclean -## if we define it conditionally. -if BUILD_FORTRAN_CONDITIONAL - FORTRAN_DIR = fortran -endif -if BUILD_CXX_CONDITIONAL - CXX_DIR = c++ -endif -if BUILD_TESTS_CONDITIONAL - TEST_DIR = test -else - TEST_DIR = -endif -if BUILD_TOOLS_CONDITIONAL - TOOLS_DIR = tools -else - TOOLS_DIR = -endif - -## Don't recurse into any subdirectories if HDF5 is not configured to -## use the HL library -if BUILD_HDF5_HL_CONDITIONAL - SUBDIRS=src $(TEST_DIR) $(TOOLS_DIR) $(CXX_DIR) $(FORTRAN_DIR) -endif -DIST_SUBDIRS=src test tools c++ fortran examples - -# Install examples -install-examples uninstall-examples: - for d in examples $(HDF5_INTERFACES); do \ - (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - done - -installcheck-local: - @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; - -# Clean examples when check-clean is invoked -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS) examples; do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -build-check-clean: - -include $(top_srcdir)/config/conclude.am diff --git a/hl/c++/Makefile.am b/hl/c++/Makefile.am deleted file mode 100644 index 4bdab417fcc..00000000000 --- a/hl/c++/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# High-Level API C++ Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -if BUILD_TESTS_CONDITIONAL - TESTSERIAL_DIR =test -else - TESTSERIAL_DIR= -endif - -SUBDIRS=src $(TESTSERIAL_DIR) -DIST_SUBDIRS=src test examples - -# Install examples -install-examples uninstall-examples: - @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; - -installcheck-local: - @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; - -# Clean examples when check-clean is invoked -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS) examples; do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -include $(top_srcdir)/config/conclude.am diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am deleted file mode 100644 index a0690651bb4..00000000000 --- a/hl/c++/examples/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Library Examples Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# These are the programs that 'make all' or 'make prog' will build and -# which 'make check' will run. List them in the order they should be run. -EXAMPLE_PROG=ptExampleFL -TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) - -# These are the example files to be installed -INSTALL_FILES=ptExampleFL.cpp -INSTALL_SCRIPT_FILES = run-hlc++-ex.sh - -# Tell conclude.am that these are C++ tests. -CXX_API=yes - -# Where to install examples -# Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=${DESTDIR}$(examplesdir)/hl/c++ -EXAMPLETOPDIR=${DESTDIR}$(examplesdir)/hl - -# How to build programs using h5c++ -$(EXTRA_PROG): $(H5CPP) - $(H5CPP) $(H5CCFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/$@.cpp - -# List dependencies for each program. Normally, automake would take -# care of this for us, but if we tell automake about the programs it -# will try to build them with the normal C++ compiler, not h5c++. This is -# an inelegant way of solving the problem, unfortunately. -ptExampleFL: ptExampleFL.cpp - -include $(top_srcdir)/config/examples.am -include $(top_srcdir)/config/conclude.am diff --git a/hl/c++/examples/run-hlc++-ex.sh.in b/hl/c++/examples/run-hlc++-ex.sh.in deleted file mode 100644 index 47f460bfd27..00000000000 --- a/hl/c++/examples/run-hlc++-ex.sh.in +++ /dev/null @@ -1,102 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# -# This file: run-hlc++-ex.sh -# Written by: Larry Knox -# Date: May 11, 2010 -# -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # -# This script will compile and run the c++ examples from source files # -# installed in @examplesdir@/hl/c++ using h5c++. The # -# order for running programs with RunTest in the MAIN section below is taken # -# from the Makefile. The order is important since some of the test programs # -# use data files created by earlier test programs. Any future additions should # -# be placed accordingly. # -# # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -# Initializations -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# -# Try to derive the path to the installation $prefix established -# by ./configure relative to the examples directory established by -# ./configure. If successful, set `prefix_relto_examplesdir` to the -# relative path. Otherwise, set `prefix_relto_examplesdir` to the -# absolute installation $prefix. -# -# This script uses the value of `prefix` in the user's environment, if -# it is set, below. The content of $() is evaluated in a sub-shell, so -# if `prefix` is set in the user's environment, the shell statements in -# $() won't clobbered it. -# -prefix_relto_examplesdir=$( -prefix=@prefix@ -examplesdir=@examplesdir@ -if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then - echo $(echo ${examplesdir##${prefix}/} | \ - sed 's,[^/][^/]*,..,g') -else - echo $prefix -fi -) - -# Where the tool is installed. -# default is relative path to installed location of the tools -prefix="${prefix:-../../${prefix_relto_examplesdir}}" -AR="@AR@" -RANLIB="@RANLIB@" -H5TOOL="h5c++" # The tool name -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - -#### Run test #### -RunTest() -{ - TEST_EXEC=$1 - Test=$1".cpp" - - echo - echo "################# $1 #################" - ${H5TOOL_BIN} -o $TEST_EXEC $Test - if [ $? -ne 0 ] - then - echo "messed up compiling $Test" - exit 1 - fi - ./$TEST_EXEC -} - - - -################## MAIN ################## - -# Run tests -if [ $? -eq 0 ] -then - if (RunTest ptExampleFL &&\ - rm ptExampleFL); then - EXIT_VALUE=${EXIT_SUCCESS} - else - EXIT_VALUE=${EXIT_FAILURE} - fi -fi - -# Cleanup -rm *.o -rm *.h5 -echo - -exit $EXIT_VALUE - diff --git a/hl/c++/src/Makefile.am b/hl/c++/src/Makefile.am deleted file mode 100644 index 54fd52e8ee8..00000000000 --- a/hl/c++/src/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5-C++ Makefile(.in) -# - -include $(top_srcdir)/config/commence.am -include $(top_srcdir)/config/lt_vers.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src - -# This is our main target -lib_LTLIBRARIES=libhdf5_hl_cpp.la - -# Add libtool numbers to the HDF5 HL C++ library (from config/lt_vers.am) -libhdf5_hl_cpp_la_LDFLAGS= -version-info $(LT_HL_CXX_VERS_INTERFACE):$(LT_HL_CXX_VERS_REVISION):$(LT_HL_CXX_VERS_AGE) $(AM_LDFLAGS) - -# Source files for the library -# At the moment, only the H5PT Packet Table has a C++ API. -libhdf5_hl_cpp_la_SOURCES=H5PacketTable.cpp - -# HDF5 HL C++ library depends on HDF5 Library. -libhdf5_hl_cpp_la_LIBADD=$(LIBH5_HL) $(LIBH5CPP) - -# Public headers -include_HEADERS=H5PacketTable.h - -include $(top_srcdir)/config/conclude.am diff --git a/hl/c++/test/Makefile.am b/hl/c++/test/Makefile.am deleted file mode 100644 index 73f14632ba9..00000000000 --- a/hl/c++/test/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5-C++ Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/c++/src -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/c++/src -I$(top_srcdir)/test -I$(top_builddir)/hl/test -I$(top_srcdir)/hl/test - -# These are our main targets. They should be listed in the order to be -# executed, generally most specific tests to least specific tests. -TEST_PROG=ptableTest -check_PROGRAMS=$(TEST_PROG) - -# The tests depend on the hdf5, hdf5 C++, and hdf5_hl libraries -LDADD=$(LIBH5CPP_HL) $(LIBH5_HL) $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5) - -ptableTest_SOURCES=ptableTest.cpp - -# Tell conclude.am that these are C++ tests. -CXX_API=yes - -include $(top_srcdir)/config/conclude.am diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am deleted file mode 100644 index 95eb5eb34da..00000000000 --- a/hl/examples/Makefile.am +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Library Examples Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -if BUILD_PARALLEL_CONDITIONAL - EXAMPLE_PROG_PARA = -endif - -# Example directory -# Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=${DESTDIR}$(examplesdir)/hl/c -EXAMPLETOPDIR=${DESTDIR}$(examplesdir)/hl -INSTALL_SCRIPT_FILES = run-hlc-ex.sh -INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh - -# Example programs. -# Don't tell automake about them, because if it knew they were programs, -# it would try to compile them instead of using the h5cc script. -# Use the boilerplate in config/examples.am instead. -EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL \ - ex_image1 ex_image2 \ - ex_table_01 ex_table_02 ex_table_03 ex_table_04 \ - ex_table_05 ex_table_06 ex_table_07 ex_table_08 \ - ex_table_09 ex_table_10 ex_table_11 ex_table_12 \ - ex_ds1 -TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) - -# Install files -# List all file that should be installed in examples directory -INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c \ - ex_image1.c ex_image2.c \ - ex_table_01.c ex_table_02.c ex_table_03.c ex_table_04.c \ - ex_table_05.c ex_table_06.c ex_table_07.c ex_table_08.c \ - ex_table_09.c ex_table_10.c ex_table_11.c ex_table_12.c \ - ex_ds1.c image24pixel.txt image8.txt pal_rgb.h - - -# Additional dependencies for each program are listed below. -if BUILD_PARALLEL_CONDITIONAL -$(EXTRA_PROG): $(H5CC_PP) - $(H5CC_PP) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c; -else -$(EXTRA_PROG): $(H5CC) - $(H5CC) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c; -endif - -# ex_lite2 uses a file created by ex_lite1 -ex_lite2.chkexe_: ex_lite1.chkexe_ - -# List dependencies for each program. Normally, automake would take -# care of this for us, but if we tell automake about the programs it -# will try to build them with the normal C compiler, not h5cc. This is -# an inelegant way of solving the problem. -# All programs share the same build rule and a dependency on the main hdf5 -# library above. -ex_lite1: $(srcdir)/ex_lite1.c -ex_lite2: $(srcdir)/ex_lite2.c -ex_lite3: $(srcdir)/ex_lite3.c -ptExampleFL: $(srcdir)/ptExampleFL.c -ex_image1: $(srcdir)/ex_image1.c -ex_image2: $(srcdir)/ex_image2.c -ex_table01: $(srcdir)/ex_table01.c -ex_table02: $(srcdir)/ex_table02.c -ex_table03: $(srcdir)/ex_table03.c -ex_table04: $(srcdir)/ex_table04.c -ex_table05: $(srcdir)/ex_table05.c -ex_table06: $(srcdir)/ex_table06.c -ex_table07: $(srcdir)/ex_table07.c -ex_table08: $(srcdir)/ex_table08.c -ex_table09: $(srcdir)/ex_table09.c -ex_table10: $(srcdir)/ex_table10.c -ex_table11: $(srcdir)/ex_table11.c -ex_table12: $(srcdir)/ex_table12.c - -if BUILD_SHARED_SZIP_CONDITIONAL -LD_LIBRARY_PATH=$(LL_PATH) -endif - -include $(top_srcdir)/config/examples.am -include $(top_srcdir)/config/conclude.am diff --git a/hl/examples/run-hl-ex.sh b/hl/examples/run-hl-ex.sh deleted file mode 100755 index c31e0d4234e..00000000000 --- a/hl/examples/run-hl-ex.sh +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# -# This file: run-hl-ex.sh -# Written by: Larry Knox -# Date: May 11, 2010 -# -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # -# This script will run the scripts to compile and run the hdf5 hl examples. # -# # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -if (echo "Run hl c examples" && \ - (cd c; sh ./run-hlc-ex.sh) && \ - (if test -d fortran; then - echo "Run hl fortran examples" - cd fortran; sh ./run-hlfortran-ex.sh - fi) - (if test -d c++; then - echo "Run hl c++ examples" - cd c++; sh ./run-hlc++-ex.sh - fi)); then - echo "Finished running hl examples" - exit 0 -else - exit 1 -fi diff --git a/hl/examples/run-hlc-ex.sh.in b/hl/examples/run-hlc-ex.sh.in deleted file mode 100644 index 81d3c00c928..00000000000 --- a/hl/examples/run-hlc-ex.sh.in +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# -# This file: run-hlc-ex.sh -# Written by: Larry Knox -# Date: May 11, 2010 -# -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # -# This script will compile and run the c examples from source files installed # -# in @examplesdir@/hl/c using h5cc or h5pc. The order for running # -# programs with RunTest in the MAIN section below is taken from the Makefile. # -# The order is important since some of the test programs use data files created # -# by earlier test programs. Any future additions should be placed accordingly. # -# # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -# Initializations -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# -# Try to derive the path to the installation $prefix established -# by ./configure relative to the examples directory established by -# ./configure. If successful, set `prefix_relto_examplesdir` to the -# relative path. Otherwise, set `prefix_relto_examplesdir` to the -# absolute installation $prefix. -# -# This script uses the value of `prefix` in the user's environment, if -# it is set, below. The content of $() is evaluated in a sub-shell, so -# if `prefix` is set in the user's environment, the shell statements in -# $() won't clobbered it. -# -prefix_relto_examplesdir=$( -prefix=@prefix@ -examplesdir=@examplesdir@ -if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then - echo $(echo ${examplesdir##${prefix}/} | \ - sed 's,[^/][^/]*,..,g') -else - echo $prefix -fi -) - -# Where the tool is installed. -# default is relative path to installed location of the tools -prefix="${prefix:-../../${prefix_relto_examplesdir}}" -PARALLEL=@PARALLEL@ # Am I in parallel mode? -AR="@AR@" -RANLIB="@RANLIB@" -if [ "$PARALLEL" = no ]; then - H5TOOL="h5cc" # The tool name -else - H5TOOL="h5pcc" # The tool name -fi -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - -#### Run test #### -RunTest() -{ - TEST_EXEC=$1 - Test=$1".c" - - echo - echo "################# $1 #################" - ${H5TOOL_BIN} -o $TEST_EXEC $Test - if [ $? -ne 0 ] - then - echo "messed up compiling $Test" - exit 1 - fi - ./$TEST_EXEC -} - - - -################## MAIN ################## - -# Run tests -if [ $? -eq 0 ] -then - if (RunTest ex_lite1 &&\ - rm ex_lite1 &&\ - RunTest ex_lite2 &&\ - rm ex_lite2 &&\ - RunTest ex_lite3 &&\ - rm ex_lite3 &&\ - RunTest ptExampleFL &&\ - rm ptExampleFL &&\ - RunTest ex_image1 &&\ - rm ex_image1 &&\ - RunTest ex_image2 &&\ - rm ex_image2 &&\ - RunTest ex_table_01 &&\ - rm ex_table_01 &&\ - RunTest ex_table_02 &&\ - rm ex_table_02 &&\ - RunTest ex_table_03 &&\ - rm ex_table_03 &&\ - RunTest ex_table_04 &&\ - rm ex_table_04 &&\ - RunTest ex_table_05 && - rm ex_table_05 && - RunTest ex_table_06 &&\ - rm ex_table_06 &&\ - RunTest ex_table_07 &&\ - rm ex_table_07 &&\ - RunTest ex_table_08 &&\ - rm ex_table_08 &&\ - RunTest ex_table_09 &&\ - rm ex_table_09 &&\ - RunTest ex_table_10 &&\ - rm ex_table_10 &&\ - RunTest ex_table_11 &&\ - rm ex_table_11 &&\ - RunTest ex_table_12 &&\ - rm ex_table_12 &&\ - RunTest ex_ds1 &&\ - rm ex_ds1); then - EXIT_VALUE=${EXIT_SUCCESS} - else - EXIT_VALUE=${EXIT_FAILURE} - fi -fi - -# Cleanup -rm *.o -rm *.h5 -echo - -exit $EXIT_VALUE - diff --git a/hl/fortran/Makefile.am b/hl/fortran/Makefile.am deleted file mode 100644 index b8a3ac4b14a..00000000000 --- a/hl/fortran/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -# This makefile mostly just reinvokes make in the various subdirectories -# but does so in the correct order. You can alternatively invoke make from -# each subdirectory manually. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 High-Level Makefile(.in) - -include $(top_srcdir)/config/commence.am - -if BUILD_TESTS_CONDITIONAL - TESTSERIAL_DIR =test -else - TESTSERIAL_DIR= -endif - -SUBDIRS=src $(TESTSERIAL_DIR) -DIST_SUBDIRS=src test examples - -# Install examples -install-examples uninstall-examples: - @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; - -installcheck-local: - @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; - -# Clean examples when check-clean is invoked -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS) examples; do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -include $(top_srcdir)/config/conclude.am diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am deleted file mode 100644 index eda9e7da56e..00000000000 --- a/hl/fortran/examples/Makefile.am +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5-Fortran Examples Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Compile parallel fortran examples only if parallel is enabled -if BUILD_PARALLEL_CONDITIONAL - EXAMPLE_PROG_PARA= -endif - -# These are the programs that 'make all' or 'make tests' will build and -# that 'make check' will run. List them in the order in which they should -# be run. -# We don't tell automake about these programs so that it doesn't try to -# compile them with the regular fortran compiler. -EXAMPLE_PROG=exlite ex_ds1 -TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) - -# List files to be installed here -INSTALL_FILES= exlite.f90 ex_ds1.f90 -INSTALL_SCRIPT_FILES = run-hlfortran-ex.sh - -# Mark this directory as part of the Fortran API (this affects output -# from tests in conclude.am) -FORTRAN_API=yes - -# Tell automake how to build examples using h5fc -if BUILD_PARALLEL_CONDITIONAL -$(EXTRA_PROG): $(H5FC_PP) - $(H5FC_PP) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90; -else -$(EXTRA_PROG): $(H5FC) - $(H5FC) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90; -endif - -# Tell automake how to install examples -# Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=${DESTDIR}$(examplesdir)/hl/fortran -EXAMPLETOPDIR=${DESTDIR}$(examplesdir)/hl - -# List dependencies for each example. Normally, automake would take -# care of this for us, but if we tell automake about the programs it -# will try to build them with the normal C compiler, not h5cc. This is -# an inelegant way of solving the problem. -# All programs share the same build rule and a dependency on the main hdf5 -# and fortran libraries above. - -include $(top_srcdir)/config/examples.am -include $(top_srcdir)/config/conclude_fc.am diff --git a/hl/fortran/examples/run-hlfortran-ex.sh.in b/hl/fortran/examples/run-hlfortran-ex.sh.in deleted file mode 100644 index 83a61958271..00000000000 --- a/hl/fortran/examples/run-hlfortran-ex.sh.in +++ /dev/null @@ -1,84 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# -# This file: run-hlfortran-ex.sh -# Written by: Larry Knox -# Date: May 11, 2010 -# -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # -# This script will compile and run the fortran examples from source files # -# installed in @examplesdir@/hl/fortran using h5fc or h5pfc. The # -# order for running programs with RunTest in the MAIN section below is taken # -# from the Makefile. The order is important since some of the test programs # -# use data files created by earlier test programs. Any future additions should # -# be placed accordingly. # -# # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -# Initializations -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Where the tool is installed. -# default is relative path to installed location of the tools -prefix="${prefix:-@prefix@}" -PARALLEL=@PARALLEL@ # Am I in parallel mode? -AR="@AR@" -RANLIB="@RANLIB@" -if [ "$PARALLEL" = no ]; then - H5TOOL="h5fc" # The tool name -else - H5TOOL="h5pfc" # The tool name -fi -H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary - -#### Run test #### -RunTest() -{ - TEST_EXEC=$1 - Test=$1".f90" - - echo - echo "################# $1 #################" - ${H5TOOL_BIN} -o $TEST_EXEC $Test - if [ $? -ne 0 ] - then - echo "messed up compiling $Test" - exit 1 - fi - ./$TEST_EXEC -} - - - -################## MAIN ################## - -# Run tests -if [ $? -eq 0 ] -then - if (RunTest exlite &&\ - rm exlite); then - EXIT_VALUE=${EXIT_SUCCESS} - else - EXIT_VALUE=${EXIT_FAILURE} - fi -fi - -# Cleanup -rm *.o -rm *.h5 -echo - -exit $EXIT_VALUE - diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am deleted file mode 100644 index eef7e8b4dc1..00000000000 --- a/hl/fortran/src/Makefile.am +++ /dev/null @@ -1,102 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 High-Level Fortran Makefile(.in) - -include $(top_srcdir)/config/commence.am -include $(top_srcdir)/config/lt_vers.am - -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ - -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src -AM_FCFLAGS+=-I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src - -# Our main target, the high-level fortran library -lib_LTLIBRARIES=libhdf5_hl_fortran.la - -# Add libtool numbers to the HDF5 HL Fortran library (from config/lt_vers.am) -libhdf5_hl_fortran_la_LDFLAGS= -version-info $(LT_HL_F_VERS_INTERFACE):$(LT_HL_F_VERS_REVISION):$(LT_HL_F_VERS_AGE) $(AM_LDFLAGS) - -# Some Fortran compilers can't build shared libraries, so sometimes we -# want to build a shared C library and a static Fortran library. If so, -# pass the -static flag to the library linker. -if FORTRAN_SHARED_CONDITIONAL -else - AM_LDFLAGS+=-static -endif - -# Source files for the library -#if BUILD_PARALLEL_CONDITIONAL -# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.F90 -#endif - -# List sources to include in the HDF5 HL Fortran library. -libhdf5_hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5DOff.F90 H5LTff_gen.F90 H5TBff_gen.F90 - -# HDF5 HL Fortran library depends on HDF5 Library. -libhdf5_hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F) - -# Fortran module files can have different extensions and different names -# (e.g., different capitalizations) on different platforms. Write rules -# for them explicitly rather than trying to teach automake about them. -# They should be installed as headers and removed during clean. -maintainer-clean-local: clean-local -distclean-local: clean-local -clean-local: - @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT) H5LTff_gen.F90 H5TBff_gen.F90; \ - fi - -install-data-local: - @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(CP) $(top_builddir)/$(subdir)/*.$(F9XMODEXT) $(DESTDIR)$(fmoddir)/. ; \ - fi - -uninstall-local: - @if test -n "$(F9XMODEXT)" -a "X$(F9XMODEXT)" != "Xo"; then \ - if test -f "$(fmoddir)/hdf5.$(F9XMODEXT)" -o -f "$(DESTDIR)$(fmoddir)/HDF5.$(F9XMODEXT)"; then \ - set -x; $(RM) $(fmoddir)/*.$(F9XMODEXT); \ - fi; \ - fi - $(RM) $(DESTDIR)$(libdir)/libhdf5_hl_fortran* - -# These are the helper programs we need to build. -noinst_PROGRAMS = H5HL_buildiface - -# H5HL_buildiface.F90 generates all the APIs that have a KIND type associated -# with them. - -H5LTff_gen.F90: H5HL_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5HL_buildiface$(EXEEXT) - -H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) - -# H5HL_buildiface.F90 is included in the distribution, and Automake knows -# how to compile a fortran program given its sources. - -H5HL_buildiface_SOURCES = H5HL_buildiface.F90 -# Hardcode the dependencies of these files. There isn't a known way of -# determining this automagically (like we do with the C files). So, when -# doing a parallel make, some modules could be made way before the -# modules they depend upon are actually made. *sigh* -H5DSff.lo: $(srcdir)/H5DSff.F90 -H5LTff.lo: $(srcdir)/H5LTff.F90 -H5IMff.lo: $(srcdir)/H5IMff.F90 -H5TBff.lo: $(srcdir)/H5TBff.F90 -H5DOff.lo: $(srcdir)/H5DOff.F90 -H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90 -H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90 -include $(top_srcdir)/config/conclude_fc.am diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am deleted file mode 100644 index adaa59db4cc..00000000000 --- a/hl/fortran/test/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 High-Level Fortran Makefile(.in) -# -# Autoconf cannot figure out dependencies between modules; disable parallel make -.NOTPARALLEL: -include $(top_srcdir)/config/commence.am - -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/hl/src -AM_FCFLAGS+=-I$(top_builddir)/fortran/src -I$(top_builddir)/hl/fortran/src -I$(top_builddir)/fortran/test $(F9XMODFLAG)$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/test $(F9XMODFLAG)$(top_builddir)/hl/fortran/src - -# Some Fortran compilers can't build shared libraries, so sometimes we -# need to make sure the Fortran programs link against the static version -# of the HDF5 library. We do this by passing the -static flag to the linker. -if FORTRAN_SHARED_CONDITIONAL -else - AM_LDFLAGS+=-static -endif - -# Our main target, the test programs -TEST_PROG=tstds tstlite tstimage tsttable -check_PROGRAMS=$(TEST_PROG) - -LIBOBJS=$(top_builddir)/fortran/test/tf_gen.o - -LDADD=$(LIBOBJS) $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) - -# Source files for the programs -tstds_SOURCES=tstds.F90 -tstlite_SOURCES=tstlite.F90 -tstimage_SOURCES=tstimage.F90 -tsttable_SOURCES=tsttable.F90 - -# Temporary files. -CHECK_CLEANFILES+=dsetf[1-5].h5 f1img.h5 f[1-2]tab.h5 tstds.h5 - -# Fortran module files can have different extensions and different names -# (e.g., different capitalizations) on different platforms. Write rules -# for them explicitly rather than trying to teach automake about them. -# They should be installed as headers and removed during clean. -maintainer-clean-local: clean-local -distclean-local: clean-local -clean-local: - @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ - fi - -# Mark this directory as part of the Fortran API (this affects output -# from tests in conclude.am) -FORTRAN_API=yes - -include $(top_srcdir)/config/conclude_fc.am diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am deleted file mode 100644 index 650a89f5c62..00000000000 --- a/hl/src/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 High-Level Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am -include $(top_srcdir)/config/lt_vers.am - -# Add include directories to the C preprocessor flags -AM_CPPFLAGS+=-I$(top_srcdir)/src - -# This library is our main target. -lib_LTLIBRARIES=libhdf5_hl.la - -# Add libtool numbers to the HDF5 hl library (from config/lt_vers.am) -libhdf5_hl_la_LDFLAGS= -version-info $(LT_HL_VERS_INTERFACE):$(LT_HL_VERS_REVISION):$(LT_HL_VERS_AGE) $(AM_LDFLAGS) - -# List sources to include in the HDF5 HL Library. -libhdf5_hl_la_SOURCES=H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c H5LD.c - -# HDF5 HL library depends on HDF5 Library. -libhdf5_hl_la_LIBADD=$(LIBHDF5) - -# Public header files (to be installed) -include_HEADERS=hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h H5LDpublic.h - -include $(top_srcdir)/config/conclude.am diff --git a/hl/test/Makefile.am b/hl/test/Makefile.am deleted file mode 100644 index 6f66291b25d..00000000000 --- a/hl/test/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 High-Level Test Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Add include directories to C preprocessor flags -AM_CPPFLAGS+=-I. -I$(srcdir) -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_builddir)/test -I$(top_srcdir)/test -I$(top_srcdir)/hl/src - -# The tests depend on the hdf5, hdf5 test, and hdf5_hl libraries -LDADD=$(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5) - -# Test programs. These are our main targets. They should be listed in the -# order to be executed, generally most specific tests to least specific tests. -TEST_PROG=test_lite test_image test_file_image test_table test_ds test_packet \ - test_ld test_dset_append test_h5do_compat -check_PROGRAMS=$(TEST_PROG) - -# These programs generate test files for the tests. They don't need to be -# compiled every time we want to test the library. However, putting -# them in a conditional causes automake to generate rules so that they -# can be built by hand. They can also be built by specifying -# --enable-build-all at configure time. -BUILD_ALL_PROGS=gen_test_ds gen_test_ld - -if BUILD_ALL_CONDITIONAL - noinst_PROGRAMS=$(BUILD_ALL_PROGS) -endif - -# Temporary files. These files are the ones created by running `make test'. -CHECK_CLEANFILES+=combine_tables[1-2].h5 test_ds[1-9].h5 test_ds10.h5 \ - test_image[1-3].h5 file_img[1-2].h5 test_lite[1-4].h5 test_table.h5 \ - test_packet_table.h5 test_packet_compress.h5 test_detach.h5 \ - test_packet_table_vlen.h5 testfl_packet_table_vlen.h5 test_append.h5 \ - h5do_compat.h5 - -# Sources for test_packet executable -test_packet_SOURCES=test_packet.c test_packet_vlen.c - -include $(top_srcdir)/config/conclude.am diff --git a/hl/tools/Makefile.am b/hl/tools/Makefile.am deleted file mode 100644 index 9f93f676dce..00000000000 --- a/hl/tools/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# Tools HDF5 Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -if BUILD_TOOLS_HL_GIF_CONDITIONAL - TOOLS_GIF_DIR = gif2h5 -else - TOOLS_GIF_DIR = -endif - -# All subdirectories -SUBDIRS=h5watch $(TOOLS_GIF_DIR) - -include $(top_srcdir)/config/conclude.am diff --git a/hl/tools/gif2h5/Makefile.am b/hl/tools/gif2h5/Makefile.am deleted file mode 100644 index d8786f70060..00000000000 --- a/hl/tools/gif2h5/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src - -# These are our main targets, the tools - -bin_PROGRAMS=gif2h5 h52gif - -# Add h52gif and gif2h5 specific linker flags here -h52gif_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -gif2h5_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -gif2h5_SOURCES=gif2hdf.c gif2mem.c decompress.c gifread.c writehdf.c - -h52gif_SOURCES=hdf2gif.c hdfgifwr.c - - -# Programs all depend on the hdf5 library, the tools library, and the HL -# library. -LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5) - -if BUILD_TESTS_CONDITIONAL - TEST_SCRIPT=h52giftest.sh - check_SCRIPTS=$(TEST_SCRIPT) - noinst_PROGRAMS=h52gifgentst - h52gifgentst_SOURCES=h52gifgentst.c -endif - -CHECK_CLEANFILES+=*.h5 -CHECK_CLEANFILES+=*.gif - -include $(top_srcdir)/config/conclude.am diff --git a/hl/tools/gif2h5/h52giftest.sh.in b/hl/tools/gif2h5/h52giftest.sh.in deleted file mode 100644 index bdc85c3f540..00000000000 --- a/hl/tools/gif2h5/h52giftest.sh.in +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# HDF Utilities Test script - - -TESTFILE1="$srcdir/testfiles/h52giftst.h5" -TESTFILE2="$srcdir/testfiles/image1.gif" -TESTFILE3="$srcdir/testfiles/ex_image2.h5" - -# initialize errors variable -errors=0 - -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - - - -# Verify the test runs with success (return code is 0) -TOOLTEST() -{ - # for now, discard any error messages generated. - $RUNSERIAL $* > /dev/null 2>&1 - - RET=$? - if [ $RET = 0 ] ; then - echo " PASSED" - else - echo "*FAILED*" - errors="` expr $errors + 1 `"; - fi - -} - -# Verify the test runs with failure (return code is not 0) -# Use for testing if tool can handle error conditions like -# illegal input, bad arguments, exceeding limits, ... -TOOLTESTFAIL() -{ - # for now, discard any error messages generated. - $RUNSERIAL $* > /dev/null 2>&1 - - RET=$? - if [ $RET != 0 ] ; then - echo " PASSED" - else - echo "*FAILED*" - errors="` expr $errors + 1 `"; - fi -} - - -# Positive tests for gif2h5 -echo "**validate the gif2h5 tool processes input correctly..." -TESTING "./gif2h5 image1.gif image1.h5" -TOOLTEST ./gif2h5 $TESTFILE2 image1.h5 -echo "" - -# Positive tests for h52gif -echo "**validate the h52gif tool processes input correctly..." -TESTING "./h52gif h52giftst.h5 image1.gif -i image" -TOOLTEST ./h52gif $TESTFILE1 image1.gif -i image -echo "" - -# Negative tests. -echo "**verify that the h52gif tool handles error conditions correctly..." -# nonexisting dataset name -TESTING "./h52gif h52giftst.h5 image.gif -i nosuch_image" -TOOLTESTFAIL "./h52gif $TESTFILE1 image.gif -i nosuch_image" -# this test should have failed but it did not. Comment it out for now. -#TESTING "./h52gif h52giftst.h5 image.gif -i palette" -#TOOLTESTFAIL "./h52gif $TESTFILE1 image.gif -i palette" -TESTING "./h52gif h52giftst.h5 image24.gif -i image24bitpixel" -TOOLTESTFAIL "./h52gif $TESTFILE3 image24.gif -i image24bitpixel" -echo "" - -# all done. summarize results. -if test $errors -eq 0 ; then - echo "All gif2h5 and h52gif tests passed." - exit 0 -else - echo "Some gif2h5 or h52gif tests failed with $errors errors." - exit 1 -fi diff --git a/hl/tools/h5watch/Makefile.am b/hl/tools/h5watch/Makefile.am deleted file mode 100644 index 8f577754561..00000000000 --- a/hl/tools/h5watch/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src - -# These are our main targets, the tools - -bin_PROGRAMS=h5watch - -# Add h5watch specific linker flags here -h5watch_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# Programs all depend on the hdf5 library, the tools library, and the HL -# library. -LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5) - -if BUILD_TESTS_CONDITIONAL - AM_CPPFLAGS+=-I$(top_srcdir)/hl/test - TEST_SCRIPT=testh5watch.sh - check_SCRIPTS=$(TEST_SCRIPT) - SCRIPT_DEPEND=swmr_check_compat_vfd$(EXEEXT) extend_dset$(EXEEXT) h5watch$(EXEEXT) - noinst_PROGRAMS=h5watchgentest extend_dset - # Add extend_dset specific preprocessor flags here - # (add the main test subdirectory to the include file path) - extend_dset_CPPFLAGS=$(AM_CPPFLAGS) -I$(top_srcdir)/test - # Add extend_dset specific library flags here - # (add the main test library to the list of libraries) - extend_dset_LDADD=$(LDADD) $(LIBH5TEST) $(LIBHDF5) -endif -# -CHECK_CLEANFILES+=*.h5 -DISTCLEANFILES=testh5watch.sh - -include $(top_srcdir)/config/conclude.am diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in deleted file mode 100644 index a1daeec9bf1..00000000000 --- a/hl/tools/h5watch/testh5watch.sh.in +++ /dev/null @@ -1,451 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5watch tool -# -utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@ - -# Check to see if the VFD specified by the HDF5_DRIVER environment variable -# supports SWMR. -$utils_testdir/swmr_check_compat_vfd -rc=$? -if [ $rc != 0 ] ; then - echo - echo "The VFD specified by the HDF5_DRIVER environment variable" - echo "does not support SWMR." - echo - echo "h5watch tests skipped" - echo - exit 0 -fi - -#echo "h5watch tests are skipped temporarily." -#echo -#exit 0 - -H5WATCH=h5watch # The tool name -H5WATCH_BIN=`pwd`/$H5WATCH # The path of H5WATCH -EXTEND_DSET=extend_dset # Routine to extend the dataset when watching -EXTEND_BIN=`pwd`/$EXTEND_DSET # The path of EXTEND_DSET -# -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -# -GEN_TEST=h5watchgentest # Generate HDF5 file with various datasets -GEN_TEST_BIN=`pwd`/$GEN_TEST # Path of the binary GEN_TEST -WATCHFILE=`pwd`/WATCH.h5 # The HDF5 file generated to test h5watch -TESTFILE=TEST.h5 # The temporary file (a copy of WATCH.h5) used by tests -TRY_MAX=30 # Try running the test again -# -# These 3 defines should be the same as the defines in ./extend_dset.c -WRITER_MESSAGE=writer_message # The message file created by the "extend" process -READER_MESSAGE=reader_message # The message file created by the "watch" process -MESSAGE_TIMEOUT=300 # Message timeout length in secs -# -CMP='cmp -s' -DIFF='diff -c' -NLINES=20 # Max. lines of output to display if test fails -# -# Mac OS: just to make sure echo "backslash backslash" behaves properly -if test `uname -s` = 'Darwin'; then - ECHO='/bin/echo' -else - ECHO='echo' -fi -# -# Global variables -nerrors=0 -verbose=yes - -test -d ./testfiles || mkdir ./testfiles - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -TESTING() { - SPACES=" " - $ECHO "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' -} - -# -# Overall algorithm: -# -# Run a test and print PASSED or FAILED -# If a test did not return with the expected return code, -# increment the `nerrors' global variable and (if $verbose is set) display up to $NLINES -# lines of the actual output from the test. -# If the test did return the expected code, -# compare the actual output with the expected output; -# If the outputs are the same, print PASSED, -# Otherwise print FAILED and the difference between the two outputs. -# The output files are not removed if $HDF5_NOCLEANUP has a non-zero value. -# -# -# TOOLTEST(): -# -# Arguments: -# -# $1 -- expected output -# $2 -- expected return code -# $3 and on -- arguments for h5watch -TOOLTEST() { - expect="$srcdir/testfiles/$1" - actual="testfiles/`basename $1 .ddl`.out" - actual_err="testfiles/`basename $1 .ddl`.err" - shift - retvalexpect=$1 - shift - # Run test. - # Stderr is included in stdout so that the diff can detect - # any unexpected output from that stream too. - TESTING $H5WATCH $@ - ( - $RUNSERIAL $H5WATCH_BIN "$@" - ) > $actual 2>$actual_err - exitcode=$? - cat $actual_err >> $actual - if [ $exitcode -ne $retvalexpect ]; then - $ECHO "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - $ECHO "test returned with exit code $exitcode" - $ECHO "test output: (up to $NLINES lines)" - head -$NLINES $actual - $ECHO "***end of test output***" - $ECHO "" - fi - elif $CMP $expect $actual; then - $ECHO " PASSED" - else - $ECHO "*FAILED*" - $ECHO " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} -# -# TOOLTEST_ERR(): -# same as toolset only compare error file -# -# Arguments: -# -# $1 -- expected output -# $2 -- expected return code -# $3 and on -- arguments for h5watch -TOOLTEST_ERR() { - expect="$srcdir/testfiles/$1" - expect_err="$srcdir/testfiles/`basename $1 .ddl`.err" - actual="testfiles/`basename $1 .ddl`.out" - actual_err="testfiles/`basename $1 .ddl`.out.err" - shift - retvalexpect=$1 - shift - # Run test. - TESTING $H5WATCH $@ - ( - $RUNSERIAL $H5WATCH_BIN "$@" - ) > $actual 2>$actual_err - exitcode=$? - if [ $exitcode -ne $retvalexpect ]; then - $ECHO "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - $ECHO "test returned with exit code $exitcode" - $ECHO "test output: (up to $NLINES lines)" - head -$NLINES $actual - $ECHO "***end of test output***" - $ECHO "" - fi - elif $CMP $expect_err $actual_err; then - $ECHO " PASSED" - else - $ECHO "*FAILED*" - $ECHO " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect_err $actual_err |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -# -# -# -# TEST_WATCH(): -# -# Arguments: -# $1 -- the specified dataset to watch and to extend -# $2 -- the options to h5watch (can be NULL) -# $3 -- expected output from watching the object -# $4 -- action 1 -# $5 -- action 2 -# -TEST_WATCH() { -try=0 -while [ $try -lt $TRY_MAX ] ; -do - cp $WATCHFILE $TESTFILE # Copy the file being watched/extended to a temporary file - actual="testfiles/`basename $3 .ddl`.out" # The actual output - expect="$srcdir/testfiles/$3" # The expected output - # - # Set up options and object to h5watch - if test -z "$2"; then - OBJ="$TESTFILE/$1" # Empty options, just object to h5watch - else - OBJ="$2 $TESTFILE/$1" # Options + object to h5watch - fi - rm -f $WRITER_MESSAGE # Remove the file just to be sure - rm -f $READER_MESSAGE # Remove the file just to be sure - # - $EXTEND_BIN $TESTFILE $1 $4 $5& # Extend the dataset; put in background - extend_pid=$! # Get "extend" process ID - # - # Wait for message from "extend_dset" process to start h5watch-- - # To wait for the writer message file or till the maximum # of seconds is reached - # This performs similar function as the routine h5_wait_message() in test/h5test.c - mexist=0 # Indicate whether the message file is found - t0=`date +%s` # Get current time in seconds - difft=0 # Initialize the time difference - while [ $difft -lt $MESSAGE_TIMEOUT ] ; # Loop till message times out - do - t1=`date +%s` # Get current time in seconds - difft=`expr $t1 - $t0` # Calculate the time difference - if [ -e $WRITER_MESSAGE ]; then # If message file is found: - mexist=1 # indicate the message file is found - rm $WRITER_MESSAGE # remove the message file - break # get out of the while loop - fi - done; - # - # If message file from "extend" process is found-- - # start h5watch - # send message to "extend" process to start work - # wait for "extend" process to complete, then kill h5watch - # determine test result - # If message file from "extend" process is not found-- - # there is some problem; the test fails - # - if test $mexist -eq 0; then - $ECHO "*FAILED*" - $ECHO "Problem with extend_dset...this test failed." - else - # - # Run h5watch; put in background; collect output to a file - TESTING $H5WATCH $OBJ - $RUNSERIAL $H5WATCH_BIN $2 "$TESTFILE/$1" >> $actual & - watch_pid=$! # Get h5watch process ID - cp /dev/null $READER_MESSAGE # Send message to "extend" process to start work - wait $extend_pid # Wait for "extend" process to complete - extend_exit=$? # Collect "extend" process' exit code - sleep 1 # Sleep to make sure output is flushed - kill $watch_pid # Kill h5watch - wait $watch_pid # Wait for "h5watch" process to complete - # - if [ $extend_exit -ne 0 ]; then # Error returned from "extend" process - $ECHO "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - $ECHO "extend test returned with exit code $extend_exit" - $ECHO "test output: (up to $NLINES lines)" - head -$NLINES $actual - $ECHO "***end of test output***" - $ECHO "" - fi - elif $CMP $expect $actual; then # Compare actual output with expected output - try=$TRY_MAX - $ECHO " PASSED" - else - try="`expr $try + 1`" - if [ $try -lt $TRY_MAX ]; then - $ECHO "*RETRY" - rm -f $actual - rm -f $TESTFILE - else - $ECHO "*FAILED*" # Actual and expected outputs are different - $ECHO " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - $DIFF $expect $actual |sed 's/^/ /' - fi - fi - fi - # - # Cleaning - rm -f $TESTFILE - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual - fi - fi -done; -} -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# -# -################################################################################################# -# # -# WATCH.h5: file with various types of datasets for testing-- # -# The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting: # -# DSET_ONE: one-dimensional dataset # -# DSET_TWO: two-dimensional dataset # -# DSET_CMPD: one-dimensional dataset with compound type # -# DSET_CMPD_ESC: one-dimensional dataset with compound type & escape/separator characters # -# DSET_CMPD_TWO: two-dimensional dataset with compound type # -# # -# The following datasets are one-dimensional, chunked, max. dimension setting: # -# DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY # -# DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE # -# # -# The following datasets are one-dimensional: # -# DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE # -# DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR # -# # -################################################################################################# -# -# -################################################################################################# -# # -# Tests on expected failures: # -# Invalid file name # -# Unable to find dataset, invalid dataset # -# DSET_NONE and DSET_NOMAX # -# Invalid input to options --width and --polling # -# Invalid field names for -f option # -# # -################################################################################################# -# -# Generate file with various types of datasets -$GEN_TEST_BIN -# Test on --help options -TOOLTEST w-help1.ddl 0 --help -# -# Tests on expected failures -TOOLTEST_ERR w-err-dset1.ddl 1 WATCH.h5 -TOOLTEST_ERR w-err-dset2.ddl 1 WATCH.h5/group/DSET_CMPD -TOOLTEST_ERR w-err-dset-none.ddl 1 WATCH.h5/DSET_NONE -TOOLTEST_ERR w-err-dset-nomax.ddl 1 WATCH.h5/DSET_NOMAX -TOOLTEST_ERR w-err-file.ddl 1 ../WATCH.h5/DSET_CMPD -TOOLTEST w-err-width.ddl 1 --width=-8 WATCH.h5/DSET_ONE -TOOLTEST w-err-poll.ddl 1 --polling=-8 WATCH.h5/DSET_ONE -TOOLTEST w-err-poll0.ddl 1 --polling=0 WATCH.h5/DSET_ONE -# -# Tests on invalid field names via --fields option for a compound typed dataset: DSET_CMPD -TOOLTEST_ERR w-err-cmpd1.ddl 1 --fields=fieldx WATCH.h5/DSET_CMPD -TOOLTEST_ERR w-err-cmpd2.ddl 1 --fields=field1,field2. WATCH.h5/DSET_CMPD -TOOLTEST_ERR w-err-cmpd3.ddl 1 --fields=field1,field2, WATCH.h5/DSET_CMPD -TOOLTEST_ERR w-err-cmpd4.ddl 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD -TOOLTEST_ERR w-err-cmpd5.ddl 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD -# -echo "DONE WITH 1st SET OF TESTS" -# -# -# -################################# -# Tests without options # -################################# -# -# Generate file WATCH.h5 with various types of datasets, -$GEN_TEST_BIN -# -# Watching and extending: (TEST.h5 is a copy of WATCH.h5) -# TEST.h5/DSET_ONE -# TEST.h5/DSET_ALLOC_EARLY -# TEST.h5/DSET_ALLOC_LATE -# TEST.h5/DSET_CMPD -# TEST.h5/DSET_TWO -# TEST.h5/DSET_CMPD_TWO -# TEST.h5/DSET_CMPD_ESC -# -TEST_WATCH DSET_ONE '' w-ext-one.ddl 3 0 #Increase -TEST_WATCH DSET_ALLOC_EARLY '' w-ext-early.ddl -1 0 #Decrease -TEST_WATCH DSET_ALLOC_LATE '' w-ext-late.ddl 0 0 #Same -TEST_WATCH DSET_CMPD '' w-ext-cmpd.ddl 3 0 #Increase -TEST_WATCH DSET_CMPD_ESC '' w-ext-cmpd-esc.ddl -1 0 #Decrease -TEST_WATCH DSET_TWO '' w-ext-two.ddl 2 2 #Increase, Increase -TEST_WATCH DSET_CMPD_TWO '' w-ext-cmpd-two.ddl 2 -9 #Increase, Decrease -# -echo "DONE WITH 2nd SET OF TESTS" -# -# -# -################################# -# Tests on --fields option # -################################# -# -# Watching and extending: (TEST.h5 is a copy of WATCH.h5) -# TEST.h5/DSET_CMPD with --fields=field1,field2 -# TEST.h5/DSET_CMPD with --fields=field2.b,field4 -# TEST.h5/DSET_CMPD with --fields=field2.b.a --fields=field2.c -TEST_WATCH DSET_CMPD --fields=field1,field2 w-ext-cmpd-f1.ddl -9 0 #Decrease -TEST_WATCH DSET_CMPD --fields=field2.b,field4 w-ext-cmpd-f2.ddl 3 0 #Increase -TEST_WATCH DSET_CMPD '--fields=field2.b.a --fields=field2.c' w-ext-cmpd-ff3.ddl 0 0 #Same -# -# -# TEST.h5/DSET_CMP_TWO with --fields=field1,field2 -# TEST.h5/DSET_CMPD_TWO with --fields=field2.b --fields=field4 -# TEST.h5/DSET_CMPD_TWO with --fields=field2.b.a,field2.c -TEST_WATCH DSET_CMPD_TWO --fields=field1,field2 w-ext-cmpd-two-f1.ddl 2 0 #Increase, Same -TEST_WATCH DSET_CMPD_TWO '--fields=field2.b --fields=field4' w-ext-cmpd-two-ff2.ddl -1 2 #Decrease, Increase -TEST_WATCH DSET_CMPD_TWO --fields=field2.b.a,field2.c w-ext-cmpd-two-f3.ddl -1 -3 #Decrease, Decrease -# -# -# TEST.h5/DSET_CMPD_ESC with --fields=field\,1,field2\. -# TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b --fields=field4\, -# TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b.a,field2\..\\K -TEST_WATCH DSET_CMPD_ESC '--fields=field\,1,field2\.' w-ext-cmpd-esc-f1.ddl 3 0 #Increase -TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b --fields=field4\,' w-ext-cmpd-esc-ff2.ddl -1 0 #Decrease -TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b.a,field2\..\\K' w-ext-cmpd-esc-f3.ddl 3 0 #Increase -# -# -echo "DONE WITH 3rd SET OF TESTS" -# -# -# -################################################# -# Tests on options: # -# --dim # -# --width, --label, --simple, --help # -################################################# -# -# Watching and extending: (TEST.h5 is a copy of WATCH.h5) -# TEST.h5/DSET_ONE with -d option -# TEST.h5/DSET_TWO with --dim option -# TEST.h5/DSET_TWO with --width=60 option -# TEST.h5/DSET_CMPD with --label option -# TEST.h5/DSET_ONE with --simple option -TEST_WATCH DSET_ONE --dim w-ext-one-d.ddl 3 0 #Increase -TEST_WATCH DSET_TWO --dim w-ext-two-d.ddl -2 0 #Decrease, Same -TEST_WATCH DSET_TWO --width=30 w-ext-two-width.ddl 0 2 #Same, Increase -TEST_WATCH DSET_CMPD --label w-ext-cmpd-label.ddl 3 0 #Increase -TEST_WATCH DSET_ONE --simple w-ext-one-simple.ddl 2 0 #I -# -echo "DONE WITH 4th SET OF TESTS" -# -# -# -if test $nerrors -eq 0 ; then - $ECHO "All h5watch tests passed." - exit $EXIT_SUCCESS -else - $ECHO "h5watch tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/java/Makefile.am b/java/Makefile.am deleted file mode 100644 index b21f17835be..00000000000 --- a/java/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -# This makefile mostly just reinvokes make in the various subdirectories -# but does so in the correct order. You can alternatively invoke make from -# each subdirectory manually. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Java native interface (JNI) Library Makefile(.in) - -include $(top_srcdir)/config/commence.am - -if BUILD_TESTS_CONDITIONAL - TESTSERIAL_DIR =test -else - TESTSERIAL_DIR= -endif - -## Only recurse into subdirectories if the Java (JNI) interface is enabled. -if BUILD_JAVA_CONDITIONAL - -# Mark this directory as part of the JNI API -JAVA_API=yes - -SUBDIRS=src $(TESTSERIAL_DIR) - -endif - -include $(top_srcdir)/config/conclude.am diff --git a/java/src/Makefile.am b/java/src/Makefile.am deleted file mode 100644 index d73cdf2370c..00000000000 --- a/java/src/Makefile.am +++ /dev/null @@ -1,133 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -# This makefile mostly just reinvokes make in the various subdirectories -# but does so in the correct order. You can alternatively invoke make from -# each subdirectory manually. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Java native interface (JNI) Library Makefile(.in) - -include $(top_srcdir)/config/commence.am - -# Mark this directory as part of the JNI API -JAVA_API=yes - -SUBDIRS=jni - -JAVAROOT = .classes - -classes: - test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) - -jarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -hdf5_javadir = $(libdir) - -pkgpath = hdf/hdf5lib -CLASSPATH_ENV=CLASSPATH=.:$(top_srcdir)/java/lib/slf4j-api-2.0.6.jar:$$CLASSPATH - -AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation - -hdf5_java_JAVA = \ - ${pkgpath}/callbacks/Callbacks.java \ - ${pkgpath}/callbacks/H5A_iterate_cb.java \ - ${pkgpath}/callbacks/H5A_iterate_t.java \ - ${pkgpath}/callbacks/H5D_append_cb.java \ - ${pkgpath}/callbacks/H5D_append_t.java \ - ${pkgpath}/callbacks/H5D_iterate_cb.java \ - ${pkgpath}/callbacks/H5D_iterate_t.java \ - ${pkgpath}/callbacks/H5E_walk_cb.java \ - ${pkgpath}/callbacks/H5E_walk_t.java \ - ${pkgpath}/callbacks/H5L_iterate_t.java \ - ${pkgpath}/callbacks/H5L_iterate_opdata_t.java \ - ${pkgpath}/callbacks/H5O_iterate_t.java \ - ${pkgpath}/callbacks/H5O_iterate_opdata_t.java \ - ${pkgpath}/callbacks/H5P_cls_close_func_cb.java \ - ${pkgpath}/callbacks/H5P_cls_close_func_t.java \ - ${pkgpath}/callbacks/H5P_cls_copy_func_cb.java \ - ${pkgpath}/callbacks/H5P_cls_copy_func_t.java \ - ${pkgpath}/callbacks/H5P_cls_create_func_cb.java \ - ${pkgpath}/callbacks/H5P_cls_create_func_t.java \ - ${pkgpath}/callbacks/H5P_prp_close_func_cb.java \ - ${pkgpath}/callbacks/H5P_prp_compare_func_cb.java \ - ${pkgpath}/callbacks/H5P_prp_copy_func_cb.java \ - ${pkgpath}/callbacks/H5P_prp_create_func_cb.java \ - ${pkgpath}/callbacks/H5P_prp_delete_func_cb.java \ - ${pkgpath}/callbacks/H5P_prp_get_func_cb.java \ - ${pkgpath}/callbacks/H5P_prp_set_func_cb.java \ - ${pkgpath}/callbacks/H5P_iterate_cb.java \ - ${pkgpath}/callbacks/H5P_iterate_t.java \ - ${pkgpath}/exceptions/HDF5IdException.java \ - ${pkgpath}/exceptions/HDF5AttributeException.java \ - ${pkgpath}/exceptions/HDF5BtreeException.java \ - ${pkgpath}/exceptions/HDF5DataFiltersException.java \ - ${pkgpath}/exceptions/HDF5DataStorageException.java \ - ${pkgpath}/exceptions/HDF5DatasetInterfaceException.java \ - ${pkgpath}/exceptions/HDF5DataspaceInterfaceException.java \ - ${pkgpath}/exceptions/HDF5DatatypeInterfaceException.java \ - ${pkgpath}/exceptions/HDF5Exception.java \ - ${pkgpath}/exceptions/HDF5ExternalFileListException.java \ - ${pkgpath}/exceptions/HDF5FileInterfaceException.java \ - ${pkgpath}/exceptions/HDF5FunctionArgumentException.java \ - ${pkgpath}/exceptions/HDF5FunctionEntryExitException.java \ - ${pkgpath}/exceptions/HDF5HeapException.java \ - ${pkgpath}/exceptions/HDF5InternalErrorException.java \ - ${pkgpath}/exceptions/HDF5JavaException.java \ - ${pkgpath}/exceptions/HDF5LibraryException.java \ - ${pkgpath}/exceptions/HDF5LowLevelIOException.java \ - ${pkgpath}/exceptions/HDF5MetaDataCacheException.java \ - ${pkgpath}/exceptions/HDF5ObjectHeaderException.java \ - ${pkgpath}/exceptions/HDF5PropertyListInterfaceException.java \ - ${pkgpath}/exceptions/HDF5ReferenceException.java \ - ${pkgpath}/exceptions/HDF5ResourceUnavailableException.java \ - ${pkgpath}/exceptions/HDF5SymbolTableException.java \ - ${pkgpath}/structs/H5_ih_info_t.java \ - ${pkgpath}/structs/H5A_info_t.java \ - ${pkgpath}/structs/H5E_error2_t.java \ - ${pkgpath}/structs/H5F_info2_t.java \ - ${pkgpath}/structs/H5FD_hdfs_fapl_t.java \ - ${pkgpath}/structs/H5FD_ros3_fapl_t.java \ - ${pkgpath}/structs/H5G_info_t.java \ - ${pkgpath}/structs/H5L_info_t.java \ - ${pkgpath}/structs/H5O_info_t.java \ - ${pkgpath}/structs/H5O_native_info_t.java \ - ${pkgpath}/structs/H5O_token_t.java \ - ${pkgpath}/structs/H5O_hdr_info_t.java \ - ${pkgpath}/structs/H5AC_cache_config_t.java \ - ${pkgpath}/H5.java \ - ${pkgpath}/HDF5Constants.java \ - ${pkgpath}/HDFArray.java \ - ${pkgpath}/HDFNativeData.java - -$(jarfile): classhdf5_java.stamp classes - $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) - -hdf5_java_DATA = $(jarfile) - -.PHONY: classes - -WINDOWTITLE = 'HDF5 Java' -DOCTITLE = '

HDF5 Java Wrapper

' -SRCDIR = '$(pkgpath)' - -CLEANFILES = classhdf5_java.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/callbacks/*.class $(JAVAROOT)/$(pkgpath)/exceptions/*.class $(JAVAROOT)/$(pkgpath)/structs/*.class $(JAVAROOT)/$(pkgpath)/*.class - -clean: - rm -rf $(JAVAROOT)/* - rm -f $(jarfile) - rm -f classhdf5_java.stamp - - -#include $(top_srcdir)/config/conclude.am diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am deleted file mode 100644 index bf086d23aa2..00000000000 --- a/java/src/jni/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Java native interface (JNI) Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am -include $(top_srcdir)/config/lt_vers.am - -# Mark this directory as part of the JNI API -JAVA_API=yes - -# Include src directory and JNI flags -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS) - -# This is our main target -lib_LTLIBRARIES=libhdf5_java.la - -# Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) -libhdf5_java_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) - -# Source files for the library -libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \ - h5aImp.c h5dImp.c h5eImp.c h5fImp.c h5gImp.c h5iImp.c h5lImp.c h5oImp.c \ - h5pImp.c h5pACPLImp.c h5pDAPLImp.c h5pDCPLImp.c h5pDXPLImp.c \ - h5pFAPLImp.c h5pFCPLImp.c h5pGAPLImp.c h5pGCPLImp.c h5pLAPLImp.c h5pLCPLImp.c \ - h5pOCPLImp.c h5pOCpyPLImp.c h5pStrCPLImp.c h5plImp.c h5rImp.c h5sImp.c h5tImp.c \ - h5vlImp.c h5zImp.c - -# HDF5 Java (JNI) library depends on HDF5 Library. -libhdf5_java_la_LIBADD=$(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/java/test/Makefile.am b/java/test/Makefile.am deleted file mode 100644 index 7f6ab0169a8..00000000000 --- a/java/test/Makefile.am +++ /dev/null @@ -1,101 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Java native interface (JNI) Library Test Makefile(.in) - -include $(top_srcdir)/config/commence.am - -# Mark this directory as part of the JNI API -JAVA_API=yes - -JAVAROOT = .classes - -classes: - test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) - -pkgpath = test -hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/junit.jar:$(top_srcdir)/java/lib/hamcrest-core.jar:$(top_srcdir)/java/lib/slf4j-api-2.0.6.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-2.0.6.jar:$$CLASSPATH - -jarfile = jar$(PACKAGE_TARNAME)test.jar - -AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation - -TESTPACKAGE = - -noinst_JAVA = \ - TestH5.java \ - TestH5Eparams.java \ - TestH5Eregister.java \ - TestH5Fparams.java \ - TestH5Fbasic.java \ - TestH5F.java \ - TestH5Fswmr.java \ - TestH5Gbasic.java \ - TestH5G.java \ - TestH5Sbasic.java \ - TestH5S.java \ - TestH5Tparams.java \ - TestH5Tbasic.java \ - TestH5T.java \ - TestH5Dparams.java \ - TestH5D.java \ - TestH5Drw.java \ - TestH5Dplist.java \ - TestH5Lparams.java \ - TestH5Lbasic.java \ - TestH5Lcreate.java \ - TestH5R.java \ - TestH5Rref.java \ - TestH5P.java \ - TestH5PData.java \ - TestH5Pfapl.java \ - TestH5Pfaplhdfs.java \ - TestH5Pfapls3.java \ - TestH5Pvirtual.java \ - TestH5Plist.java \ - TestH5A.java \ - TestH5Arw.java \ - TestH5Oparams.java \ - TestH5Obasic.java \ - TestH5Ocreate.java \ - TestH5OcopyOld.java \ - TestH5Ocopy.java \ - TestH5PL.java \ - TestH5VL.java \ - TestH5Z.java \ - TestH5E.java \ - TestH5Edefault.java \ - TestH5Giterate.java - -$(jarfile): classnoinst.stamp classes - $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) - -noinst_DATA = $(jarfile) - -.PHONY: classes - -check_SCRIPTS = junit.sh -TEST_SCRIPT = $(check_SCRIPTS) - -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class junit.sh \ - *.h5 testExport*.txt - -clean: - rm -rf $(JAVAROOT)/* - rm -f $(jarfile) - rm -f classnoinst.stamp - -include $(top_srcdir)/config/conclude.am diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in deleted file mode 100644 index edae8d0848c..00000000000 --- a/java/test/junit.sh.in +++ /dev/null @@ -1,1179 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ - -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" -USE_ROS3_VFD="@HAVE_ROS3_VFD@" -USE_HDFS_VFD="@HAVE_LIBHDFS@" -IS_DARWIN="@H5_IS_DARWIN@" - -TESTNAME=JUnitInterface -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -BASENAME='basename' -LS='ls' -AWK='awk' - -nerrors=0 -verbose=yes - -# setup my machine information. -myos=`uname -s` - -# where the libs exist -HDFLIB_HOME="$top_srcdir/java/lib" -BLDDIR="." -BLDLIBDIR="$BLDDIR/testlibs" -HDFTEST_HOME="$top_srcdir/java/test" -DUMP_TESTFILES="$top_srcdir/tools/test/h5dump/testfiles" - -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@test.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$top_builddir/src/.libs/libhdf5.* -$top_builddir/java/src/jni/.libs/libhdf5_java.* -" -LIST_JAR_TESTFILES=" -$HDFLIB_HOME/hamcrest-core.jar -$HDFLIB_HOME/junit.jar -$HDFLIB_HOME/slf4j-api-2.0.6.jar -$HDFLIB_HOME/ext/slf4j-simple-2.0.6.jar -" -LIST_JAR_FILES=" -$top_builddir/java/src/$JARFILE -" -LIST_DATA_FILES=" -$HDFTEST_HOME/testfiles/JUnit-TestH5.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Eparams.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Eregister.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Fparams.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Fbasic.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5F.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Fswmr.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Gbasic.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5G.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Sbasic.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5S.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Tparams.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Tbasic.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5T.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Dparams.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5D.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Dplist.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Drw.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Lparams.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Lbasic.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Lcreate.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5R.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Rref.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5P.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5PData.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Pfapl.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Pfapls3.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Pfaplhdfs.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Pvirtual.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Plist.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5A.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Arw.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Oparams.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Obasic.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Ocreate.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5OcopyOld.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Ocopy.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5PL.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5VL.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Z.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5E.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Edefault.txt -$HDFTEST_HOME/testfiles/JUnit-TestH5Giterate.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" -COPY_JARTESTFILES="$LIST_JAR_TESTFILES" -COPY_JARFILES="$LIST_JAR_FILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - BNAME=`$BASENAME $tstfile` - if [ "$BNAME" = "libhdf5_java.dylib" ]; then - COPIED_LIBHDF5_JAVA=1 - fi - fi - fi - done - if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then - (cd testlibs; \ - install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ - exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ - echo $exist_path; \ - install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) - fi - # copy jar files. Used -f to make sure get a new copy - for tstfile in $COPY_JARTESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done - for tstfile in $COPY_JARFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -fR $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$HDFLIB_HOME - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM -rf $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done - $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterate.hdf - $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateL1.hdf - $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateL2.hdf - $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO1.hdf - $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO2.hdf - $CP -f $DUMP_TESTFILES/trefer_reg.h5 $BLDDIR/trefer_reg.h5 - $CP -f $DUMP_TESTFILES/trefer_attr.h5 $BLDDIR/trefer_attr.h5 - $CP -f $DUMP_TESTFILES/tdatareg.h5 $BLDDIR/tdatareg.h5 - $CP -f $DUMP_TESTFILES/tattrreg.h5 $BLDDIR/tattrreg.h5 - $CP -f $DUMP_TESTFILES/tintsattrs.h5 $BLDDIR/tintsattrs.h5 - $CP -f $DUMP_TESTFILES/tfloatsattrs.h5 $BLDDIR/tfloatsattrs.h5 -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - $RM $BLDDIR/h5ex_g_iterate*.hdf - $RM $BLDDIR/JUnit-*.out - $RM $BLDDIR/JUnit-*.ext - $RM $BLDDIR/JUnit-*.err - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDDIR/JUnit-*.ert - $RM $BLDDIR/JUnit-*.txt - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -JAVAEXEFLAGS=@H5_JAVAFLAGS@ - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/junit.jar:"$BLDLIBDIR"/hamcrest-core.jar:"$BLDLIBDIR"/slf4j-api-2.0.6.jar:"$BLDLIBDIR"/slf4j-simple-2.0.6.jar:"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5" -TESTING JUnit-TestH5 -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5 > JUnit-TestH5.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5.ext > JUnit-TestH5.out - -if diff JUnit-TestH5.out JUnit-TestH5.txt > /dev/null; then - echo " PASSED JUnit-TestH5" -else - echo "**FAILED** JUnit-TestH5" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5.txt JUnit-TestH5.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Eparams" -TESTING JUnit-TestH5Eparams -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Eparams > JUnit-TestH5Eparams.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Eparams.ext > JUnit-TestH5Eparams.out - -if diff JUnit-TestH5Eparams.out JUnit-TestH5Eparams.txt > /dev/null; then - echo " PASSED JUnit-TestH5Eparams" -else - echo "**FAILED** JUnit-TestH5Eparams" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Eparams.txt JUnit-TestH5Eparams.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Eregister" -TESTING JUnit-TestH5Eregister -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Eregister > JUnit-TestH5Eregister.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Eregister.ext > JUnit-TestH5Eregister.out - -if diff JUnit-TestH5Eregister.out JUnit-TestH5Eregister.txt > /dev/null; then - echo " PASSED JUnit-TestH5Eregister" -else - echo "**FAILED** JUnit-TestH5Eregister" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Eregister.txt JUnit-TestH5Eregister.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fparams" -TESTING JUnit-TestH5Fparams -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fparams > JUnit-TestH5Fparams.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Fparams.ext > JUnit-TestH5Fparams.out - -if diff JUnit-TestH5Fparams.out JUnit-TestH5Fparams.txt > /dev/null; then - echo " PASSED JUnit-TestH5Fparams" -else - echo "**FAILED** JUnit-TestH5Fparams" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Fparams.txt JUnit-TestH5Fparams.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fbasic" -TESTING JUnit-TestH5Fbasic -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fbasic > JUnit-TestH5Fbasic.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Fbasic.ext > JUnit-TestH5Fbasic.out - -if diff JUnit-TestH5Fbasic.out JUnit-TestH5Fbasic.txt > /dev/null; then - echo " PASSED JUnit-TestH5Fbasic" -else - echo "**FAILED** JUnit-TestH5Fbasic" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Fbasic.txt JUnit-TestH5Fbasic.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5F" -TESTING JUnit-TestH5F -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5F > JUnit-TestH5F.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5F.ext > JUnit-TestH5F.out - -if diff JUnit-TestH5F.out JUnit-TestH5F.txt > /dev/null; then - echo " PASSED JUnit-TestH5F" -else - echo "**FAILED** JUnit-TestH5F" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5F.txt JUnit-TestH5F.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fswmr" -TESTING JUnit-TestH5Fswmr -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fswmr > JUnit-TestH5Fswmr.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Fswmr.ext > JUnit-TestH5Fswmr.out - -if diff JUnit-TestH5Fswmr.out JUnit-TestH5Fswmr.txt > /dev/null; then - echo " PASSED JUnit-TestH5Fswmr" -else - echo "**FAILED** JUnit-TestH5Fswmr" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Fswmr.txt JUnit-TestH5Fswmr.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Gbasic" -TESTING JUnit-TestH5Gbasic -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Gbasic > JUnit-TestH5Gbasic.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Gbasic.ext > JUnit-TestH5Gbasic.out - -if diff JUnit-TestH5Gbasic.out JUnit-TestH5Gbasic.txt > /dev/null; then - echo " PASSED JUnit-TestH5Gbasic" -else - echo "**FAILED** JUnit-TestH5Gbasic" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Gbasic.txt JUnit-TestH5Gbasic.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5G" -TESTING JUnit-TestH5G -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5G > JUnit-TestH5G.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5G.ext > JUnit-TestH5G.out - -if diff JUnit-TestH5G.out JUnit-TestH5G.txt > /dev/null; then - echo " PASSED JUnit-TestH5G" -else - echo "**FAILED** JUnit-TestH5G" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5G.txt JUnit-TestH5G.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Sbasic" -TESTING JUnit-TestH5Sbasic -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Sbasic > JUnit-TestH5Sbasic.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Sbasic.ext > JUnit-TestH5Sbasic.out - -if diff JUnit-TestH5Sbasic.out JUnit-TestH5Sbasic.txt > /dev/null; then - echo " PASSED JUnit-TestH5Sbasic" -else - echo "**FAILED** JUnit-TestH5Sbasic" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Sbasic.txt JUnit-TestH5Sbasic.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5S" -TESTING JUnit-TestH5S -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5S > JUnit-TestH5S.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5S.ext > JUnit-TestH5S.out - -if diff JUnit-TestH5S.out JUnit-TestH5S.txt > /dev/null; then - echo " PASSED JUnit-TestH5S" -else - echo "**FAILED** JUnit-TestH5S" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5S.txt JUnit-TestH5S.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Tparams" -TESTING JUnit-TestH5Tparams -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Tparams > JUnit-TestH5Tparams.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Tparams.ext > JUnit-TestH5Tparams.out - -if diff JUnit-TestH5Tparams.out JUnit-TestH5Tparams.txt > /dev/null; then - echo " PASSED JUnit-TestH5Tparams" -else - echo "**FAILED** JUnit-TestH5Tparams" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Tparams.txt JUnit-TestH5Tparams.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Tbasic" -TESTING JUnit-TestH5Tbasic -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Tbasic > JUnit-TestH5Tbasic.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Tbasic.ext > JUnit-TestH5Tbasic.out - -if diff JUnit-TestH5Tbasic.out JUnit-TestH5Tbasic.txt > /dev/null; then - echo " PASSED JUnit-TestH5Tbasic" -else - echo "**FAILED** JUnit-TestH5Tbasic" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Tbasic.txt JUnit-TestH5Tbasic.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5T" -TESTING JUnit-TestH5T -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5T > JUnit-TestH5T.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5T.ext > JUnit-TestH5T.out - -if diff JUnit-TestH5T.out JUnit-TestH5T.txt > /dev/null; then - echo " PASSED JUnit-TestH5T" -else - echo "**FAILED** JUnit-TestH5T" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5T.txt JUnit-TestH5T.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Dparams" -TESTING JUnit-TestH5Dparams -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Dparams > JUnit-TestH5Dparams.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Dparams.ext > JUnit-TestH5Dparams.out - -if diff JUnit-TestH5Dparams.out JUnit-TestH5Dparams.txt > /dev/null; then - echo " PASSED JUnit-TestH5Dparams" -else - echo "**FAILED** JUnit-TestH5Dparams" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Dparams.txt JUnit-TestH5Dparams.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5D" -TESTING JUnit-TestH5D -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5D > JUnit-TestH5D.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5D.ext > JUnit-TestH5D.out - -if diff JUnit-TestH5D.out JUnit-TestH5D.txt > /dev/null; then - echo " PASSED JUnit-TestH5D" -else - echo "**FAILED** JUnit-TestH5D" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5D.txt JUnit-TestH5D.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Drw" -TESTING JUnit-TestH5Drw -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Drw > JUnit-TestH5Drw.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Drw.ext > JUnit-TestH5Drw.out - -if diff JUnit-TestH5Drw.out JUnit-TestH5Drw.txt > /dev/null; then - echo " PASSED JUnit-TestH5Drw" -else - echo "**FAILED** JUnit-TestH5Drw" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Drw.txt JUnit-TestH5Drw.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Dplist" -TESTING JUnit-TestH5Dplist -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Dplist > JUnit-TestH5Dplist.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Dplist.ext > JUnit-TestH5Dplist.out - -if diff JUnit-TestH5Dplist.out JUnit-TestH5Dplist.txt > /dev/null; then - echo " PASSED JUnit-TestH5Dplist" -else - echo "**FAILED** JUnit-TestH5Dplist" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Dplist.txt JUnit-TestH5Dplist.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lparams" -TESTING JUnit-TestH5Lparams -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lparams > JUnit-TestH5Lparams.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Lparams.ext > JUnit-TestH5Lparams.out - -if diff JUnit-TestH5Lparams.out JUnit-TestH5Lparams.txt > /dev/null; then - echo " PASSED JUnit-TestH5Lparams" -else - echo "**FAILED** JUnit-TestH5Lparams" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Lparams.txt JUnit-TestH5Lparams.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lbasic" -TESTING JUnit-TestH5Lbasic -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lbasic > JUnit-TestH5Lbasic.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Lbasic.ext > JUnit-TestH5Lbasic.out - -if diff JUnit-TestH5Lbasic.out JUnit-TestH5Lbasic.txt > /dev/null; then - echo " PASSED JUnit-TestH5Lbasic" -else - echo "**FAILED** JUnit-TestH5Lbasic" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Lbasic.txt JUnit-TestH5Lbasic.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lcreate" -TESTING JUnit-TestH5Lcreate -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lcreate > JUnit-TestH5Lcreate.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Lcreate.ext > JUnit-TestH5Lcreate.out - -if diff JUnit-TestH5Lcreate.out JUnit-TestH5Lcreate.txt > /dev/null; then - echo " PASSED JUnit-TestH5Lcreate" -else - echo "**FAILED** JUnit-TestH5Lcreate" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Lcreate.txt JUnit-TestH5Lcreate.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5R" -TESTING JUnit-TestH5R -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5R > JUnit-TestH5R.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5R.ext > JUnit-TestH5R.out - -if diff JUnit-TestH5R.out JUnit-TestH5R.txt > /dev/null; then - echo " PASSED JUnit-TestH5R" -else - echo "**FAILED** JUnit-TestH5R" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5R.txt JUnit-TestH5R.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Rref" -TESTING JUnit-TestH5Rref -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Rref > JUnit-TestH5Rref.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Rref.ext > JUnit-TestH5Rref.out - -if diff JUnit-TestH5Rref.out JUnit-TestH5Rref.txt > /dev/null; then - echo " PASSED JUnit-TestH5Rref" -else - echo "**FAILED** JUnit-TestH5Rref" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Rref.txt JUnit-TestH5Rref.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5P" -TESTING JUnit-TestH5P -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5P > JUnit-TestH5P.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5P.ext > JUnit-TestH5P.out - -if diff JUnit-TestH5P.out JUnit-TestH5P.txt > /dev/null; then - echo " PASSED JUnit-TestH5P" -else - echo "**FAILED** JUnit-TestH5P" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5P.txt JUnit-TestH5P.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5PData" -TESTING JUnit-TestH5PData -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5PData > JUnit-TestH5PData.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5PData.ext > JUnit-TestH5PData.out - -if diff JUnit-TestH5PData.out JUnit-TestH5PData.txt > /dev/null; then - echo " PASSED JUnit-TestH5PData" -else - echo "**FAILED** JUnit-TestH5PData" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5PData.txt JUnit-TestH5PData.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pfapl" -TESTING JUnit-TestH5Pfapl -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pfapl > JUnit-TestH5Pfapl.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Pfapl.ext > JUnit-TestH5Pfapl.out - -if diff JUnit-TestH5Pfapl.out JUnit-TestH5Pfapl.txt > /dev/null; then - echo " PASSED JUnit-TestH5Pfapl" -else - echo "**FAILED** JUnit-TestH5Pfapl" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Pfapl.txt JUnit-TestH5Pfapl.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pvirtual" -TESTING JUnit-TestH5Pvirtual -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pvirtual > JUnit-TestH5Pvirtual.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Pvirtual.ext > JUnit-TestH5Pvirtual.out - -if diff JUnit-TestH5Pvirtual.out JUnit-TestH5Pvirtual.txt > /dev/null; then - echo " PASSED JUnit-TestH5Pvirtual" -else - echo "**FAILED** JUnit-TestH5Pvirtual" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Pvirtual.txt JUnit-TestH5Pvirtual.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Plist" -TESTING JUnit-TestH5Plist -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Plist > JUnit-TestH5Plist.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Plist.ext > JUnit-TestH5Plist.out - -if diff JUnit-TestH5Plist.out JUnit-TestH5Plist.txt > /dev/null; then - echo " PASSED JUnit-TestH5Plist" -else - echo "**FAILED** JUnit-TestH5Plist" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Plist.txt JUnit-TestH5Plist.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5A" -TESTING JUnit-TestH5A -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5A > JUnit-TestH5A.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5A.ext > JUnit-TestH5A.out - -if diff JUnit-TestH5A.out JUnit-TestH5A.txt > /dev/null; then - echo " PASSED JUnit-TestH5A" -else - echo "**FAILED** JUnit-TestH5A" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5A.txt JUnit-TestH5A.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Arw" -TESTING JUnit-TestH5Arw -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Arw > JUnit-TestH5Arw.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Arw.ext > JUnit-TestH5Arw.out - -if diff JUnit-TestH5Arw.out JUnit-TestH5Arw.txt > /dev/null; then - echo " PASSED JUnit-TestH5Arw" -else - echo "**FAILED** JUnit-TestH5Arw" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Arw.txt JUnit-TestH5Arw.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Oparams" -TESTING JUnit-TestH5Oparams -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Oparams > JUnit-TestH5Oparams.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Oparams.ext > JUnit-TestH5Oparams.out - -if diff JUnit-TestH5Oparams.out JUnit-TestH5Oparams.txt > /dev/null; then - echo " PASSED JUnit-TestH5Oparams" -else - echo "**FAILED** JUnit-TestH5Oparams" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Oparams.txt JUnit-TestH5Oparams.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Obasic" -TESTING JUnit-TestH5Obasic -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Obasic > JUnit-TestH5Obasic.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Obasic.ext > JUnit-TestH5Obasic.out - -if diff JUnit-TestH5Obasic.out JUnit-TestH5Obasic.txt > /dev/null; then - echo " PASSED JUnit-TestH5Obasic" -else - echo "**FAILED** JUnit-TestH5Obasic" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Obasic.txt JUnit-TestH5Obasic.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Ocreate" -TESTING JUnit-TestH5Ocreate -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Ocreate > JUnit-TestH5Ocreate.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Ocreate.ext > JUnit-TestH5Ocreate.out - -if diff JUnit-TestH5Ocreate.out JUnit-TestH5Ocreate.txt > /dev/null; then - echo " PASSED JUnit-TestH5Ocreate" -else - echo "**FAILED** JUnit-TestH5Ocreate" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Ocreate.txt JUnit-TestH5Ocreate.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5OcopyOld" -TESTING JUnit-TestH5OcopyOld -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5OcopyOld > JUnit-TestH5OcopyOld.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5OcopyOld.ext > JUnit-TestH5OcopyOld.out - -if diff JUnit-TestH5OcopyOld.out JUnit-TestH5OcopyOld.txt > /dev/null; then - echo " PASSED JUnit-TestH5OcopyOld" -else - echo "**FAILED** JUnit-TestH5OcopyOld" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5OcopyOld.txt JUnit-TestH5OcopyOld.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Ocopy" -TESTING JUnit-TestH5Ocopy -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Ocopy > JUnit-TestH5Ocopy.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Ocopy.ext > JUnit-TestH5Ocopy.out - -if diff JUnit-TestH5Ocopy.out JUnit-TestH5Ocopy.txt > /dev/null; then - echo " PASSED JUnit-TestH5Ocopy" -else - echo "**FAILED** JUnit-TestH5Ocopy" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Ocopy.txt JUnit-TestH5Ocopy.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5PL" -TESTING JUnit-TestH5PL -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5PL > JUnit-TestH5PL.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5PL.ext > JUnit-TestH5PL.out - -if diff JUnit-TestH5PL.out JUnit-TestH5PL.txt > /dev/null; then - echo " PASSED JUnit-TestH5PL" -else - echo "**FAILED** JUnit-TestH5PL" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5PL.txt JUnit-TestH5PL.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5VL" -TESTING JUnit-TestH5VL -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5VL > JUnit-TestH5VL.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5VL.ext > JUnit-TestH5VL.out - -if diff JUnit-TestH5VL.out JUnit-TestH5VL.txt > /dev/null; then - echo " PASSED JUnit-TestH5VL" -else - echo "**FAILED** JUnit-TestH5VL" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5VL.txt JUnit-TestH5VL.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Z" -TESTING JUnit-TestH5Z -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Z > JUnit-TestH5Z.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Z.ext > JUnit-TestH5Z.out - -if diff JUnit-TestH5Z.out JUnit-TestH5Z.txt > /dev/null; then - echo " PASSED JUnit-TestH5Z" -else - echo "**FAILED** JUnit-TestH5Z" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Z.txt JUnit-TestH5Z.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5E" -TESTING JUnit-TestH5E -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5E > JUnit-TestH5E.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5E.ext > JUnit-TestH5E.out - -if diff JUnit-TestH5E.out JUnit-TestH5E.txt > /dev/null; then - echo " PASSED JUnit-TestH5E" -else - echo "**FAILED** JUnit-TestH5E" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5E.txt JUnit-TestH5E.out |sed 's/^/ /' -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Edefault" -TESTING JUnit-TestH5Edefault -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Edefault > JUnit-TestH5Edefault.ext) - -# Extract file name, line number, version and thread IDs because they may be different -sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Edefault.ext > JUnit-TestH5Edefault.out - -if diff JUnit-TestH5Edefault.out JUnit-TestH5Edefault.txt > /dev/null; then - echo " PASSED JUnit-TestH5Edefault" -else - echo "**FAILED** JUnit-TestH5Edefault" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Edefault.txt JUnit-TestH5Edefault.out |sed 's/^/ /' -fi - -if test $USE_FILTER_SZIP = "yes"; then - echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Giterate" - TESTING JUnit-TestH5Giterate - ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Giterate > JUnit-TestH5Giterate.ext) - - # Extract file name, line number, version and thread IDs because they may be different - sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ - JUnit-TestH5Giterate.ext > JUnit-TestH5Giterate.out - - if diff JUnit-TestH5Giterate.out JUnit-TestH5Giterate.txt > /dev/null; then - echo " PASSED JUnit-TestH5Giterate" - else - echo "**FAILED** JUnit-TestH5Giterate" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Giterate.txt JUnit-TestH5Giterate.out |sed 's/^/ /' - fi -fi -if test "X$ROS3_VFD" = "Xyes"; then - echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pfapls3" - TESTING JUnit-TestH5Pfapls3 - ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pfapls3 > JUnit-TestH5Pfapls3.ext) - - # Extract file name, line number, version and thread IDs because they may be different - sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.,[0-9]*/Time: XXXX/' \ - JUnit-TestH5Pfapls3.ext > JUnit-TestH5Pfapls3.out - - if diff JUnit-TestH5Pfapls3.out JUnit-TestH5Pfapls3.txt > /dev/null; then - echo " PASSED JUnit-TestH5Pfapls3" - else - echo "**FAILED** JUnit-TestH5Pfapls3" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Pfapls3.txt JUnit-TestH5Pfapls3.out |sed 's/^/ /' - fi -fi -if test "X$HAVE_LIBHDFS" = "Xyes"; then - echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pfaplhdfs" - TESTING JUnit-TestH5Pfaplhdfs - ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pfaplhdfs > JUnit-TestH5Pfaplhdfs.ext) - - # Extract file name, line number, version and thread IDs because they may be different - sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.,[0-9]*/Time: XXXX/' \ - JUnit-TestH5Pfaplhdfs.ext > JUnit-TestH5Pfaplhdfs.out - - if diff JUnit-TestH5Pfaplhdfs.out JUnit-TestH5Pfaplhdfs.txt > /dev/null; then - echo " PASSED JUnit-TestH5Pfaplhdfs" - else - echo "**FAILED** JUnit-TestH5Pfaplhdfs" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF JUnit-TestH5Pfaplhdfs.txt JUnit-TestH5Pfaplhdfs.out |sed 's/^/ /' - fi -fi - - -# Clean up temporary files/directories -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 deleted file mode 100644 index 610ee300611..00000000000 --- a/m4/aclocal_fc.m4 +++ /dev/null @@ -1,568 +0,0 @@ -dnl ------------------------------------------------------------------------- -dnl ------------------------------------------------------------------------- -dnl -dnl Copyright by The HDF Group. -dnl All rights reserved. -dnl -dnl This file is part of HDF5. The full HDF5 copyright notice, including -dnl terms governing use, modification, and redistribution, is contained in -dnl the COPYING file, which can be found at the root of the source code -dnl distribution tree, or in https://www.hdfgroup.org/licenses. -dnl If you do not have access to either file, you may request a copy from -dnl help@hdfgroup.org -dnl -dnl ------------------------------------------------------------------------- -dnl ------------------------------------------------------------------------- - -dnl ********************************* -dnl PURPOSE -dnl Contains Macros for HDF5 Fortran -dnl ********************************* -dnl -dnl Special characteristics that have no autoconf counterpart but that -dnl we need as part of the C++ support. To distinguish these, they -dnl have a [PAC] prefix. -dnl -dnl ------------------------------------------------------------------------- -dnl -dnl PAC_FC_SEARCH_LIST - expands to a whitespace separated list of modern -dnl fortran compilers for use with AC_PROG_FC that is more suitable for HPC -dnl software packages -AC_DEFUN([PAC_FC_SEARCH_LIST], - [gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc]) -dnl -dnl PAC_PROG_FC([COMPILERS]) -dnl -dnl COMPILERS is a space separated list of Fortran compilers to search for. -dnl -dnl Compilers are ordered by -dnl 1. F90, F95, F2003 -dnl 2. Good/tested native compilers, bad/untested native compilers -dnl 3. Wrappers around f2c go last. -dnl -dnl frt is the Fujitsu Fortran compiler. -dnl pgf90 are the Portland Group F90 compilers. -dnl xlf/xlf90/xlf95/xlf2003 are IBM (AIX) F90/F95/F2003 compilers. -dnl lf95 is the Lahey-Fujitsu compiler. -dnl fl32 is the Microsoft Fortran "PowerStation" compiler. -dnl epcf90 is the "Edinburgh Portable Compiler" F90. -dnl fort is the Compaq Fortran 90 (now 95) compiler for Tru64 and Linux/Alpha. -dnl pathf90 is the Pathscale Fortran 90 compiler -dnl ifort is another name for the Intel f90 compiler -dnl efc - An older Intel compiler (?) -dnl ifc - An older Intel compiler -dnl fc - A compiler on some unknown system. This has been removed because -dnl it may also be the name of a command for something other than -dnl the Fortran compiler (e.g., fc=file system check!) -dnl gfortran - The GNU Fortran compiler (not the same as g95) -dnl gfc - An alias for gfortran recommended in cygwin installations -dnl NOTE: this macro suffers from a basically intractable "expanded before it -dnl was required" problem when libtool is also used -dnl [1] MPICH.org -dnl - -dnl See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" - -AC_DEFUN([PAC_PROG_FC_ISO_FORTRAN_ENV],[ - CHECK_ISO_FORTRAN_ENV="no" - AC_MSG_CHECKING([if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV (F08)]) - TEST_SRC="`sed -n '/PROGRAM PROG_FC_ISO_FORTRAN_ENV/,/END PROGRAM PROG_FC_ISO_FORTRAN_ENV/p' $srcdir/m4/aclocal_fc.f90`" - AC_LINK_IFELSE([$TEST_SRC],[AC_MSG_RESULT([yes]) - CHECK_ISO_FORTRAN_ENV="yes"], - [AC_MSG_RESULT([no])]) -]) - -dnl See if the fortran compiler supports the intrinsic function "SIZEOF" - -AC_DEFUN([PAC_PROG_FC_SIZEOF],[ - HAVE_SIZEOF_FORTRAN="no" - AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) - TEST_SRC="`sed -n '/PROGRAM PROG_FC_SIZEOF/,/END PROGRAM PROG_FC_SIZEOF/p' $srcdir/m4/aclocal_fc.f90`" - AC_LINK_IFELSE([$TEST_SRC],[AC_MSG_RESULT([yes]) - HAVE_SIZEOF_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) -]) - -dnl See if the fortran compiler supports the intrinsic function "C_SIZEOF" - -AC_DEFUN([PAC_PROG_FC_C_SIZEOF],[ - HAVE_C_SIZEOF_FORTRAN="no" - AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF]) - TEST_SRC="`sed -n '/PROGRAM PROG_FC_C_SIZEOF/,/END PROGRAM PROG_FC_C_SIZEOF/p' $srcdir/m4/aclocal_fc.f90`" - AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes]) - HAVE_C_SIZEOF_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) -]) - -dnl See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - -AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ - HAVE_STORAGE_SIZE_FORTRAN="no" - AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE]) - TEST_SRC="`sed -ne '/PROGRAM PROG_FC_STORAGE_SIZE/,/END PROGRAM PROG_FC_STORAGE_SIZE/p' $srcdir/m4/aclocal_fc.f90`" - AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes]) - HAVE_STORAGE_SIZE_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) - -]) - -dnl See if the fortran compiler supports allocatable character - -AC_DEFUN([PAC_HAVE_CHAR_ALLOC],[ - HAVE_CHAR_ALLOC_FORTRAN="no" - AC_MSG_CHECKING([if Fortran compiler supports allocatable character]) - TEST_SRC="`sed -ne '/PROGRAM PROG_CHAR_ALLOC/,/END PROGRAM PROG_CHAR_ALLOC/p' $srcdir/m4/aclocal_fc.f90`" - AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes]) - HAVE_CHAR_ALLOC_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) - -]) - -dnl Check to see C_LONG_DOUBLE is available - -AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ - HAVE_C_LONG_DOUBLE_FORTRAN="no" - AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_LONG_DOUBLE]) - TEST_SRC="" - TEST_SRC="`sed -n '/PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE/,/END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE/p' $srcdir/m4/aclocal_fc.f90`" - AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes]) - HAVE_C_LONG_DOUBLE_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) -]) - -dnl Check if C_LONG_DOUBLE is different from C_DOUBLE - -if test "X$FORTRAN_HAVE_C_LONG_DOUBLE" = "Xyes"; then -AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[ - C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no" - AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) - TEST_SRC="`sed -n '/MODULE type_mod/,/END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE/p' $srcdir/m4/aclocal_fc.f90`" - AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes]) - C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) -]) -fi - -dnl Check if C_BOOL is different from default LOGICAL - -AC_DEFUN([PAC_PROG_FC_C_BOOL_EQ_LOGICAL],[ - C_BOOL_IS_UNIQUE_FORTRAN="no" - AC_MSG_CHECKING([if Fortran C_BOOL is different from default LOGICAL]) - TEST_SRC="`sed -n '/MODULE l_type_mod/,/END PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL/p' $srcdir/m4/aclocal_fc.f90`" - AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes]) - C_BOOL_IS_UNIQUE_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) -]) - -dnl Checking if the compiler supports the required Fortran 2003 features and -dnl disable Fortran 2003 if it does not. - -AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[ - HAVE_F2003_REQUIREMENTS="no" - AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003]) - TEST_SRC="`sed -n '/PROG_FC_HAVE_F2003_REQUIREMENTS/,/END PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS/p' $srcdir/m4/aclocal_fc.f90`" - AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes]) - HAVE_F2003_REQUIREMENTS="yes"], - [AC_MSG_RESULT([no])]) -]) - -dnl ------------------------------------------------------------------------- -dnl AC_F9X_MODS() -dnl -dnl Check how F9X handles modules. This macro also checks which -dnl command-line option to use to include the module once it's built. -dnl -AC_DEFUN([AC_F9X_MODS], -[AC_MSG_CHECKING(what $FC does with modules) -AC_LANG_PUSH(Fortran) - -test -d conftestdir || mkdir conftestdir -cd conftestdir -rm -rf * - -cat >conftest.$ac_ext <&1 -if test "$modfiles" = file.o; then - echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 - OLD_FCFLAGS=$FCFLAGS - FCFLAGS="$FCFLAGS -em" - eval $ac_compile - modfiles="" - for f in file.o module.mod MODULE.mod module.M MODULE.M; do - test -f $f && modfiles="$f" - done - if test "$modfiles" = "file.o"; then - FCFLAGS=$OLD_FCFLAGS - echo no 6>&1 - else - echo yes 6>&1 - fi -fi -cd .. - -AC_MSG_CHECKING(how $FC finds modules) - -for flag in "-I" "-M" "-p"; do - cat >conftest.$ac_ext <&6 - FCFLAGS="$F9XMODFLAG. $FCFLAGS" -else - echo unknown 1>&6 -fi -AC_SUBST(F9XMODFLAG) -AC_SUBST(F9XMODEXT) -AC_LANG_POP(Fortran) -]) - -dnl ---------------------- -dnl Parallel Test Programs -dnl ---------------------- - -dnl Try link a simple MPI program. - -AC_DEFUN([PAC_PROG_FC_MPI_CHECK],[ - -dnl Change to the Fortran 90 language - AC_LANG_PUSH(Fortran) - TEST_SRC="`sed -n '/PROGRAM FC_MPI_CHECK/,/END PROGRAM FC_MPI_CHECK/p' $srcdir/m4/aclocal_fc.f90`" -dnl Try link a simple MPI program. - AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked]) - AC_LINK_IFELSE([$TEST_SRC], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([unable to link a simple MPI-IO Fortran program])]) - -dnl Change to the C language - AC_LANG_POP(Fortran) -]) - -dnl ------------------------------------------------------ -dnl Determine the available KINDs for REALs and INTEGERs -dnl ------------------------------------------------------ -dnl -dnl This is a runtime test. -dnl -AC_DEFUN([PAC_FC_AVAIL_KINDS],[ -AC_LANG_PUSH([Fortran]) -TEST_SRC="`sed -n '/PROGRAM FC_AVAIL_KINDS/,/END PROGRAM FC_AVAIL_KINDS/p' $srcdir/m4/aclocal_fc.f90`" -AC_RUN_IFELSE([$TEST_SRC], - [ - dnl The output from the above program will be: - dnl -- LINE 1 -- valid integer kinds (comma separated list) - dnl -- LINE 2 -- valid real kinds (comma separated list) - dnl -- LINE 3 -- max decimal precision for reals - dnl -- LINE 4 -- number of valid integer kinds - dnl -- LINE 5 -- number of valid real kinds - - pac_validIntKinds=$(./conftest$EXEEXT 2>&1 | sed -n '1p') - pac_validRealKinds=$(./conftest$EXEEXT 2>&1 | sed -n '2p') - PAC_FC_MAX_REAL_PRECISION=$(./conftest$EXEEXT 2>&1 | sed -n '3p') - AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision]) - - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - - PAC_FORTRAN_NUM_INTEGER_KINDS=$(./conftest$EXEEXT 2>&1 | sed -n '4p') - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $PAC_FORTRAN_NUM_INTEGER_KINDS`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = $(./conftest$EXEEXT 2>&1 | sed -n '5p')" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" - - AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs]) - - AC_MSG_CHECKING([for Number of Fortran INTEGER KINDs]) - AC_MSG_RESULT([$PAC_FORTRAN_NUM_INTEGER_KINDS]) - AC_MSG_CHECKING([for Fortran INTEGER KINDs]) - AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS]) - AC_MSG_CHECKING([for Fortran REAL KINDs]) - AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) - AC_MSG_CHECKING([for Fortran REALs maximum decimal precision]) - AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION]) -],[ - AC_MSG_RESULT([Error]) - AC_MSG_ERROR([Failed to run Fortran program to determine available KINDs]) -],[]) - -AC_LANG_POP([Fortran]) -]) - -dnl -------------------------------------------------------------- -dnl Determine the available KINDs for REALs, INTEGERs and LOGICALS -dnl -------------------------------------------------------------- -dnl -dnl This is a runtime test. -dnl -AC_DEFUN([PAC_FC_AVAIL_KINDS_F08],[ -AC_LANG_PUSH([Fortran]) -TEST_SRC="`sed -n '/PROGRAM FC08_AVAIL_KINDS/,/END PROGRAM FC08_AVAIL_KINDS/p' $srcdir/m4/aclocal_fc.f90`" -AC_RUN_IFELSE([$TEST_SRC], - [ - dnl The output from the above program will be: - dnl -- LINE 1 -- valid integer kinds (comma separated list) - dnl -- LINE 2 -- valid real kinds (comma separated list) - dnl -- LINE 3 -- max decimal precision for reals - dnl -- LINE 4 -- number of valid integer kinds - dnl -- LINE 5 -- number of valid real kinds - dnl -- LINE 6 -- number of valid logical kinds - dnl -- LINE 7 -- valid logical kinds (comma separated list) - - pac_validIntKinds=$(./conftest$EXEEXT 2>&1 | sed -n '1p') - pac_validRealKinds=$(./conftest$EXEEXT 2>&1 | sed -n '2p') - PAC_FC_MAX_REAL_PRECISION=$(./conftest$EXEEXT 2>&1 | sed -n '3p') - AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision]) - - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - - PAC_FORTRAN_NUM_INTEGER_KINDS=$(./conftest$EXEEXT 2>&1 | sed -n '4p') - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $PAC_FORTRAN_NUM_INTEGER_KINDS`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = $(./conftest$EXEEXT 2>&1 | sed -n '5p')" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" - - AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs]) - - PAC_FORTRAN_NUM_LOGICAL_KINDS=$(./conftest$EXEEXT 2>&1 | sed -n '6p') - pac_validLogicalKinds=$(./conftest$EXEEXT 2>&1 | sed -n '7p') - PAC_FC_ALL_LOGICAL_KINDS="{`echo $pac_validLogicalKinds`}" - - AC_MSG_CHECKING([for Number of Fortran INTEGER KINDs]) - AC_MSG_RESULT([$PAC_FORTRAN_NUM_INTEGER_KINDS]) - AC_MSG_CHECKING([for Fortran INTEGER KINDs]) - AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS]) - AC_MSG_CHECKING([for Fortran REAL KINDs]) - AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) - AC_MSG_CHECKING([for Fortran REALs maximum decimal precision]) - AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION]) - AC_MSG_CHECKING([for Number of Fortran LOGICAL KINDs]) - AC_MSG_RESULT([$PAC_FORTRAN_NUM_LOGICAL_KINDS]) - AC_MSG_CHECKING([for Fortran LOGICAL KINDs]) - AC_MSG_RESULT([$PAC_FC_ALL_LOGICAL_KINDS]) -],[ - AC_MSG_RESULT([Error]) - AC_MSG_ERROR([Failed to run Fortran program to determine available KINDs]) -],[]) -AC_LANG_POP([Fortran]) -]) - -AC_DEFUN([PAC_FIND_MPI_LOGICAL_KIND],[ -AC_REQUIRE([PAC_FC_AVAIL_KINDS]) -AC_MSG_CHECKING([default Fortran KIND of LOGICAL in MPI]) -AC_LANG_PUSH([Fortran]) -saved_FCFLAGS=$FCFLAGS -check_Intel="`$FC -V 2>&1 |grep '^Intel'`" -if test X != "X$check_Intel"; then - FCFLAGS="-warn error" -else - FCFLAGS="" -fi -for kind in `echo $pac_validLogicalKinds | sed -e 's/,/ /g'`; do - AC_COMPILE_IFELSE([ - PROGRAM main - USE MPI - IMPLICIT NONE - LOGICAL(KIND=$kind) :: flag - INTEGER(KIND=MPI_INTEGER_KIND) :: info_ret, mpierror - CHARACTER(LEN=3) :: info_val - CALL mpi_info_get(info_ret,"foo", 3_MPI_INTEGER_KIND, info_val, flag, mpierror) - END], - [AC_SUBST([PAC_MPI_LOGICAL_KIND]) PAC_MPI_LOGICAL_KIND=$kind], - [] - ) -done -if test "X$PAC_MPI_LOGICAL_KIND" = "X"; then - AC_MSG_ERROR([Failed to find Fortran KIND of LOGICAL in MPI]) -else - AC_DEFINE_UNQUOTED([MPI_LOGICAL_KIND], [$PAC_MPI_LOGICAL_KIND], [Define MPI Fortran KIND of LOGICAL]) - AC_MSG_RESULT([$PAC_MPI_LOGICAL_KIND]) -fi -FCFLAGS=$saved_FCFLAGS -AC_LANG_POP([Fortran]) -]) - -AC_DEFUN([PAC_FC_SIZEOF_INT_KINDS],[ -AC_REQUIRE([PAC_FC_AVAIL_KINDS]) -AC_MSG_CHECKING([sizeof of available INTEGER KINDs]) -AC_LANG_PUSH([Fortran]) -pack_int_sizeof="" - -for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([ - PROGRAM main - USE ISO_C_BINDING - USE ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT - IMPLICIT NONE - INTEGER (KIND=$kind) a - WRITE(stderr,'(I0)') $FC_SIZEOF_A - END - ]) - ]) - AC_RUN_IFELSE([],[ - sizes=$(./conftest$EXEEXT 2>&1) - pack_int_sizeof="$pack_int_sizeof $sizes," - ],[ - AC_MSG_ERROR([Fortran program fails to build or run!]) - ],[ - pack_int_sizeof="$2" - ]) -done -PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" -AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) -AC_LANG_POP([Fortran]) -]) - -AC_DEFUN([PAC_FC_SIZEOF_REAL_KINDS],[ -AC_REQUIRE([PAC_FC_AVAIL_KINDS]) -AC_MSG_CHECKING([sizeof of available REAL KINDs]) -AC_LANG_PUSH([Fortran]) -pack_real_sizeof="" -rm -f pac_fconftest.out -for kind in `echo $pac_validRealKinds | sed -e 's/,/ /g'`; do - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([ - PROGRAM main - USE ISO_C_BINDING - USE ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT - IMPLICIT NONE - REAL (KIND=$kind) :: a - WRITE(stderr,'(I0)') $FC_SIZEOF_A - END - ]) - ]) - AC_RUN_IFELSE([],[ - sizes=$(./conftest$EXEEXT 2>&1) - pack_real_sizeof="$pack_real_sizeof $sizes," - ],[ - AC_MSG_ERROR([Fortran program fails to build or run!]) - ],[ - pack_real_sizeof="$2" - ]) -done -PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" -AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF]) -AC_LANG_POP([Fortran]) -]) - -AC_DEFUN([PAC_FC_NATIVE_INTEGER],[ -AC_REQUIRE([PAC_FC_AVAIL_KINDS]) -AC_MSG_CHECKING([sizeof of native KINDS]) -AC_LANG_PUSH([Fortran]) -saved_FCFLAGS=$FCFLAGS -FCFLAGS=$saved_user_FCFLAGS -pack_int_sizeof="" -rm -f pac_fconftest.out - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([ - PROGRAM main - USE ISO_C_BINDING - USE ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT - IMPLICIT NONE - INTEGER a - REAL b - DOUBLE PRECISION c - WRITE(stderr,*) $FC_SIZEOF_A - WRITE(stderr,*) KIND(a) - WRITE(stderr,*) $FC_SIZEOF_B - WRITE(stderr,*) KIND(b) - WRITE(stderr,*) $FC_SIZEOF_C - WRITE(stderr,*) KIND(c) - END - ]) - ]) - AC_RUN_IFELSE([],[ - PAC_FORTRAN_NATIVE_INTEGER_SIZEOF=$(./conftest$EXEEXT 2>&1 | sed -n '1p') - PAC_FORTRAN_NATIVE_INTEGER_KIND=$(./conftest$EXEEXT 2>&1 | sed -n '2p') - PAC_FORTRAN_NATIVE_REAL_SIZEOF=$(./conftest$EXEEXT 2>&1 | sed -n '3p') - PAC_FORTRAN_NATIVE_REAL_KIND=$(./conftest$EXEEXT 2>&1 | sed -n '4p') - PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF=$(./conftest$EXEEXT 2>&1 | sed -n '5p') - PAC_FORTRAN_NATIVE_DOUBLE_KIND=$(./conftest$EXEEXT 2>&1 | sed -n '6p') - ],[ - AC_MSG_ERROR([Fortran program fails to build or run!]) - ],[ - pack_int_sizeof="$2" - ]) -AC_MSG_RESULT([$pack_int_sizeof]) -FCFLAGS=$saved_FCFLAGS -AC_LANG_POP([Fortran]) -]) - -dnl Check for the maximum decimal precision for C -dnl -dnl Depends on if __float128 and/or quadmath.h exist. We only support 128-bit -dnl floats that work like GNU's quadmath.h __float128 type, which have the -dnl precision stored in a symbol named FLT128_DIG. -dnl -dnl The MY_(LDBL|FLT128)_DIG variables are from configure.ac -dnl -AC_DEFUN([PAC_FC_LDBL_DIG],[ - AC_LANG_CONFTEST([ - AC_LANG_PROGRAM([ - #include - #include - #if $HAVE___FLOAT128 != 0 - # if $INCLUDE_QUADMATH_H != 0 - # include - # endif - # ifdef FLT128_DIG - # define C_FLT128_DIG FLT128_DIG - # else - # define C_FLT128_DIG 0 - # endif - #else - # define C_FLT128_DIG 0 - #endif - #define C_LDBL_DIG DECIMAL_DIG - ],[[ - fprintf(stderr, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG); - ]]) - ]) - AC_RUN_IFELSE([],[ - MY_LDBL_DIG=$(./conftest$EXEEXT 2>&1 | sed -n '1p') - MY_FLT128_DIG=$(./conftest$EXEEXT 2>&1 | sed -n '2p') - ],[ - AC_MSG_ERROR([C program fails to build or run!]) - ],[]) -]) - diff --git a/m4/ax_check_class.m4 b/m4/ax_check_class.m4 deleted file mode 100644 index e673c2d35d6..00000000000 --- a/m4/ax_check_class.m4 +++ /dev/null @@ -1,79 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_class.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_CLASS -# -# DESCRIPTION -# -# AX_CHECK_CLASS tests the existence of a given Java class, either in a -# jar or in a '.class' file. -# -# *Warning*: its success or failure can depend on a proper setting of the -# CLASSPATH env. variable. -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Stephane Bortzmeyer -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 12 - -AU_ALIAS([AC_CHECK_CLASS], [AX_CHECK_CLASS]) -AC_DEFUN([AX_CHECK_CLASS],[ -AC_REQUIRE([AX_PROG_JAVA]) -ac_var_name=`echo $1 | sed 's/\./_/g'` -dnl Normally I'd use a AC_CACHE_CHECK here but since the variable name is -dnl dynamic I need an extra level of extraction -AC_MSG_CHECKING([for $1 class]) -AC_CACHE_VAL(ax_cv_class_$ac_var_name, [ - AX_TRY_COMPILE_JAVA([$1], , [eval "ac_cv_class_$ac_var_name=yes"], - [eval "ac_cv_class_$ac_var_name=no"]) -eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`" -eval "HAVE_$ac_var_name=$`echo ac_cv_class_$ac_var_val`" -HAVE_LAST_CLASS=$ac_var_val -if test x$ac_var_val = xyes; then - ifelse([$2], , :, [$2]) -else - ifelse([$3], , :, [$3]) -fi -]) -dnl for some reason the above statement didn't fall though here? -dnl do scripts have variable scoping? -eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`" -AC_MSG_RESULT($ac_var_val) -]) diff --git a/m4/ax_check_classpath.m4 b/m4/ax_check_classpath.m4 deleted file mode 100644 index e08a253d8be..00000000000 --- a/m4/ax_check_classpath.m4 +++ /dev/null @@ -1,60 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_classpath.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_CLASSPATH -# -# DESCRIPTION -# -# AX_CHECK_CLASSPATH just displays the CLASSPATH, for the edification of -# the user. -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Stephane Bortzmeyer -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 6 - -AU_ALIAS([AC_CHECK_CLASSPATH], [AX_CHECK_CLASSPATH]) -AC_DEFUN([AX_CHECK_CLASSPATH],[ -if test "x$CLASSPATH" = x; then - echo "You have no CLASSPATH, I hope it is good" -else - echo "You have CLASSPATH $CLASSPATH, hope it is correct" -fi -]) diff --git a/m4/ax_check_java_home.m4 b/m4/ax_check_java_home.m4 deleted file mode 100644 index 1d60387b1b4..00000000000 --- a/m4/ax_check_java_home.m4 +++ /dev/null @@ -1,80 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_java_home.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_JAVA_HOME -# -# DESCRIPTION -# -# Check for Sun Java (JDK / JRE) installation, where the 'java' VM is in. -# If found, set environment variable JAVA_HOME = Java installation home, -# else left JAVA_HOME untouch, which in most case means JAVA_HOME is -# empty. -# -# LICENSE -# -# Copyright (c) 2008 Gleen Salmon -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 7 - -AU_ALIAS([AC_CHECK_JAVA_HOME], [AX_CHECK_JAVA_HOME]) - -AC_DEFUN([AX_CHECK_JAVA_HOME], -[AC_MSG_CHECKING([for JAVA_HOME]) -# We used a fake loop so that we can use "break" to exit when the result -# is found. -while true -do - # If the user defined JAVA_HOME, don't touch it. - test "${JAVA_HOME+set}" = set && break - - # On Mac OS X 10.5 and following, run /usr/libexec/java_home to get - # the value of JAVA_HOME to use. - # (http://developer.apple.com/library/mac/#qa/qa2001/qa1170.html). - JAVA_HOME=`/usr/libexec/java_home 2>/dev/null` - test x"$JAVA_HOME" != x && break - - # See if we can find the java executable, and compute from there. - TRY_JAVA_HOME=`ls -dr /usr/java/* 2> /dev/null | head -n 1` - if test x$TRY_JAVA_HOME != x; then - PATH=$PATH:$TRY_JAVA_HOME/bin - fi - AC_PATH_PROG([JAVA_PATH_NAME], [java]) - if test "x$JAVA_PATH_NAME" != x; then - JAVA_HOME=`echo $JAVA_PATH_NAME | sed "s/\(.*\)[[/]]bin[[/]]java.*/\1/"` - break - fi - - AC_MSG_NOTICE([Could not compute JAVA_HOME]) - break -done -AC_MSG_RESULT([$JAVA_HOME]) -]) diff --git a/m4/ax_check_junit.m4 b/m4/ax_check_junit.m4 deleted file mode 100644 index 44dd70df3b0..00000000000 --- a/m4/ax_check_junit.m4 +++ /dev/null @@ -1,70 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_junit.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_JUNIT -# -# DESCRIPTION -# -# AX_CHECK_JUNIT tests the availability of the Junit testing framework, -# and set some variables for conditional compilation of the test suite by -# automake. -# -# If available, JUNIT is set to a command launching the text based user -# interface of Junit, @JAVA_JUNIT@ is set to $JAVA_JUNIT and @TESTS_JUNIT@ -# is set to $TESTS_JUNIT, otherwise they are set to empty values. -# -# You can use these variables in your Makefile.am file like this : -# -# # Some of the following classes are built only if junit is available -# JAVA_JUNIT = Class1Test.java Class2Test.java AllJunitTests.java -# -# noinst_JAVA = Example1.java Example2.java @JAVA_JUNIT@ -# -# EXTRA_JAVA = $(JAVA_JUNIT) -# -# TESTS_JUNIT = AllJunitTests -# -# TESTS = StandaloneTest1 StandaloneTest2 @TESTS_JUNIT@ -# -# EXTRA_TESTS = $(TESTS_JUNIT) -# -# AllJunitTests : -# echo "#! /bin/sh" > $@ -# echo "exec @JUNIT@ my.package.name.AllJunitTests" >> $@ -# chmod +x $@ -# -# LICENSE -# -# Copyright (c) 2008 Luc Maisonobe -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AU_ALIAS([AC_CHECK_JUNIT], [AX_CHECK_JUNIT]) -AC_DEFUN([AX_CHECK_JUNIT],[ -AC_CACHE_VAL(ac_cv_prog_JUNIT,[ -AC_CHECK_CLASS(junit.textui.TestRunner) -if test x"`eval 'echo $ac_cv_class_junit_textui_TestRunner'`" != xno ; then - ac_cv_prog_JUNIT='$(CLASSPATH_ENV) $(JAVA) $(JAVAFLAGS) junit.textui.TestRunner' -fi]) -AC_MSG_CHECKING([for junit]) -if test x"`eval 'echo $ac_cv_prog_JUNIT'`" != x ; then - JUNIT="$ac_cv_prog_JUNIT" - JAVA_JUNIT='$(JAVA_JUNIT)' - TESTS_JUNIT='$(TESTS_JUNIT)' -else - JUNIT= - JAVA_JUNIT= - TESTS_JUNIT= -fi -AC_MSG_RESULT($JAVA_JUNIT) -AC_SUBST(JUNIT) -AC_SUBST(JAVA_JUNIT) -AC_SUBST(TESTS_JUNIT)]) diff --git a/m4/ax_check_rqrd_class.m4 b/m4/ax_check_rqrd_class.m4 deleted file mode 100644 index baa041aca5d..00000000000 --- a/m4/ax_check_rqrd_class.m4 +++ /dev/null @@ -1,62 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_rqrd_class.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_RQRD_CLASS -# -# DESCRIPTION -# -# AX_CHECK_RQRD_CLASS tests the existence of a given Java class, either in -# a jar or in a '.class' file and fails if it doesn't exist. Its success -# or failure can depend on a proper setting of the CLASSPATH env. -# variable. -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Stephane Bortzmeyer -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 6 - -AU_ALIAS([AC_CHECK_RQRD_CLASS], [AX_CHECK_RQRD_CLASS]) -AC_DEFUN([AX_CHECK_RQRD_CLASS],[ -CLASS=`echo $1|sed 's/\./_/g'` -AC_CHECK_CLASS($1) -if test "$HAVE_LAST_CLASS" = "no"; then - AC_MSG_ERROR([Required class $1 missing, exiting.]) -fi -]) diff --git a/m4/ax_java_check_class.m4 b/m4/ax_java_check_class.m4 deleted file mode 100644 index c9d60f78611..00000000000 --- a/m4/ax_java_check_class.m4 +++ /dev/null @@ -1,85 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_java_check_class.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_JAVA_CHECK_CLASS(,,) -# -# DESCRIPTION -# -# Test if a Java class is available. Based on AX_PROG_JAVAC_WORKS. This -# version uses a cache variable which is both compiler, options and -# classpath dependent (so if you switch from javac to gcj it correctly -# notices and redoes the test). -# -# The macro tries to compile a minimal program importing . Some -# newer compilers moan about the failure to use this but fail or produce a -# class file anyway. All moaning is sunk to /dev/null since I only wanted -# to know if the class could be imported. This is a recommended followup -# to AX_CHECK_JAVA_PLUGIN with classpath appropriately adjusted. -# -# LICENSE -# -# Copyright (c) 2008 Duncan Simpson -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 12 - -AU_ALIAS([DPS_JAVA_CHECK_CLASS], [AX_JAVA_CHECK_CLASS]) -AC_DEFUN([AX_JAVA_CHECK_CLASS],[ -m4_define([cache_val],[m4_translit(ax_cv_have_java_class_$1, " ." ,"__")]) -if test "x$CLASSPATH" != "x"; then -xtra=" with classpath ${CLASSPATH}" -xopts=`echo ${CLASSPATH} | ${SED} 's/^ *://'` -xopts="-classpath $xopts" -else xtra=""; xopts=""; fi -cache_var="cache_val"AS_TR_SH([_Jc_${JAVAC}_Cp_${CLASSPATH}]) -AC_CACHE_CHECK([if the $1 class is available$xtra], [$cache_var], [ -JAVA_TEST=Test.java -CLASS_TEST=Test.class -cat << \EOF > $JAVA_TEST -/* [#]xline __oline__ "configure" */ -import $1; -public class Test { -} -EOF -if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $xopts $JAVA_TEST) >/dev/null 2>&1; then - eval "${cache_var}=yes" -else - eval "${cache_var}=no" - echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD - cat $JAVA_TEST >&AS_MESSAGE_LOG_FD -fi -rm -f $JAVA_TEST $CLASS_TEST -]) -if eval 'test "x$'${cache_var}'" = "xyes"'; then -$2 -true; else -$3 -false; fi]) diff --git a/m4/ax_java_options.m4 b/m4/ax_java_options.m4 deleted file mode 100644 index 722d7880275..00000000000 --- a/m4/ax_java_options.m4 +++ /dev/null @@ -1,48 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_java_options.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_JAVA_OPTIONS -# -# DESCRIPTION -# -# AX_JAVA_OPTIONS adds configure command line options used for Java m4 -# macros. This Macro is optional. -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Devin Weaver -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 7 - -AU_ALIAS([AC_JAVA_OPTIONS], [AX_JAVA_OPTIONS]) -AC_DEFUN([AX_JAVA_OPTIONS],[ -AC_ARG_WITH(java-prefix, - [ --with-java-prefix=PFX prefix where Java runtime is installed (optional)]) -AC_ARG_WITH(javac-flags, - [ --with-javac-flags=FLAGS flags to pass to the Java compiler (optional)]) -AC_ARG_WITH(java-flags, - [ --with-java-flags=FLAGS flags to pass to the Java VM (optional)]) -JAVAPREFIX=$with_java_prefix -JAVACFLAGS=$with_javac_flags -JAVAFLAGS=$with_java_flags -AC_SUBST(JAVAPREFIX)dnl -AC_SUBST(JAVACFLAGS)dnl -AC_SUBST(JAVAFLAGS)dnl -AC_SUBST(JAVA)dnl -AC_SUBST(JAVAC)dnl -]) diff --git a/m4/ax_jni_include_dir.m4 b/m4/ax_jni_include_dir.m4 deleted file mode 100644 index cd720987b74..00000000000 --- a/m4/ax_jni_include_dir.m4 +++ /dev/null @@ -1,157 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_JNI_INCLUDE_DIR -# -# DESCRIPTION -# -# AX_JNI_INCLUDE_DIR finds include directories needed for compiling -# programs using the JNI interface. -# -# JNI include directories are usually in the Java distribution. This is -# deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in -# that order. When this macro completes, a list of directories is left in -# the variable JNI_INCLUDE_DIRS. -# -# Example usage follows: -# -# AX_JNI_INCLUDE_DIR -# -# for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS -# do -# CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR" -# done -# -# If you want to force a specific compiler: -# -# - at the configure.in level, set JAVAC=yourcompiler before calling -# AX_JNI_INCLUDE_DIR -# -# - at the configure level, setenv JAVAC -# -# This macro depends on AC_CANONICAL_HOST which requires that config.guess -# and config.sub be distributed along with the source code. See autoconf -# manual for details. -# -# Note: This macro can work with the autoconf M4 macros for Java programs. -# This particular macro is not part of the original set of macros. -# -# LICENSE -# -# Copyright (c) 2008 Don Anderson -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 15 - -AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR]) -AC_DEFUN([AX_JNI_INCLUDE_DIR],[ - -AC_REQUIRE([AC_CANONICAL_HOST]) - -JNI_INCLUDE_DIRS="" - -if test "x$JAVA_HOME" != x; then - _JTOPDIR="$JAVA_HOME" -else - if test "x$JAVAC" = x; then - JAVAC=javac - fi - AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no]) - if test "x$_ACJNI_JAVAC" = xno; then - AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME]) - fi - _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC") - _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'` -fi - -case "$host_os" in - darwin*) # Apple Java headers are inside the Xcode bundle. - major_macos_version=$(sw_vers -productVersion | sed -n -e 's/^\(@<:@0-9@:>@*\).@<:@0-9@:>@*.@<:@0-9@:>@*/\1/p') - if @<:@ "$major_macos_version" -gt "10" @:>@; then - _JTOPDIR="$(/usr/libexec/java_home)" - _JINC="$_JTOPDIR/include" - else - macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p') - if @<:@ "$macos_version" -gt "7" @:>@; then - _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework" - _JINC="$_JTOPDIR/Headers" - else - _JTOPDIR="/System/Library/Frameworks/JavaVM.framework" - _JINC="$_JTOPDIR/Headers" - fi - fi - ;; - *) _JINC="$_JTOPDIR/include";; -esac -_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR]) -_AS_ECHO_LOG([_JINC=$_JINC]) - -# On Mac OS X 10.6.4, jni.h is a symlink: -# /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h -# -> ../../CurrentJDK/Headers/jni.h. -AC_CACHE_CHECK(jni headers, ac_cv_jni_header_path, -[ - if test -f "$_JINC/jni.h"; then - ac_cv_jni_header_path="$_JINC" - JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $ac_cv_jni_header_path" - else - _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` - if test -f "$_JTOPDIR/include/jni.h"; then - ac_cv_jni_header_path="$_JTOPDIR/include" - JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $ac_cv_jni_header_path" - else - ac_cv_jni_header_path=none - fi - fi -]) - -# get the likely subdirectories for system specific java includes -case "$host_os" in -bsdi*) _JNI_INC_SUBDIRS="bsdos";; -freebsd*) _JNI_INC_SUBDIRS="freebsd";; -darwin*) _JNI_INC_SUBDIRS="darwin";; -linux*) _JNI_INC_SUBDIRS="linux genunix";; -osf*) _JNI_INC_SUBDIRS="alpha";; -solaris*) _JNI_INC_SUBDIRS="solaris";; -mingw*) _JNI_INC_SUBDIRS="win32";; -cygwin*) _JNI_INC_SUBDIRS="win32";; -*) _JNI_INC_SUBDIRS="genunix";; -esac - -if test "x$ac_cv_jni_header_path" != "xnone"; then - # add any subdirectories that are present - for JINCSUBDIR in $_JNI_INC_SUBDIRS - do - if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then - JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR" - fi - done -fi -]) - -# _ACJNI_FOLLOW_SYMLINKS -# Follows symbolic links on , -# finally setting variable _ACJNI_FOLLOWED -# ---------------------------------------- -AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[ -# find the include directory relative to the javac executable -_cur="$1" -while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do - AC_MSG_CHECKING([symlink for $_cur]) - _slink=`ls -ld "$_cur" | sed 's/.* -> //'` - case "$_slink" in - /*) _cur="$_slink";; - # 'X' avoids triggering unwanted echo options. - *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";; - esac - AC_MSG_RESULT([$_cur]) -done -_ACJNI_FOLLOWED="$_cur" -])# _ACJNI diff --git a/m4/ax_prog_doxygen.m4 b/m4/ax_prog_doxygen.m4 deleted file mode 100644 index a371f7fdfe8..00000000000 --- a/m4/ax_prog_doxygen.m4 +++ /dev/null @@ -1,586 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html -# =========================================================================== -# -# SYNOPSIS -# -# DX_INIT_DOXYGEN(PROJECT-NAME, [DOXYFILE-PATH], [OUTPUT-DIR], ...) -# DX_DOXYGEN_FEATURE(ON|OFF) -# DX_DOT_FEATURE(ON|OFF) -# DX_HTML_FEATURE(ON|OFF) -# DX_CHM_FEATURE(ON|OFF) -# DX_CHI_FEATURE(ON|OFF) -# DX_MAN_FEATURE(ON|OFF) -# DX_RTF_FEATURE(ON|OFF) -# DX_XML_FEATURE(ON|OFF) -# DX_PDF_FEATURE(ON|OFF) -# DX_PS_FEATURE(ON|OFF) -# -# DESCRIPTION -# -# The DX_*_FEATURE macros control the default setting for the given -# Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for -# generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML -# help (for MS users), 'CHI' for generating a separate .chi file by the -# .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate -# output formats. The environment variable DOXYGEN_PAPER_SIZE may be -# specified to override the default 'a4wide' paper size. -# -# By default, HTML, PDF and PS documentation is generated as this seems to -# be the most popular and portable combination. MAN pages created by -# Doxygen are usually problematic, though by picking an appropriate subset -# and doing some massaging they might be better than nothing. CHM and RTF -# are specific for MS (note that you can't generate both HTML and CHM at -# the same time). The XML is rather useless unless you apply specialized -# post-processing to it. -# -# The macros mainly control the default state of the feature. The use can -# override the default by specifying --enable or --disable. The macros -# ensure that contradictory flags are not given (e.g., -# --enable-doxygen-html and --enable-doxygen-chm, -# --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each -# feature will be automatically disabled (with a warning) if the required -# programs are missing. -# -# Once all the feature defaults have been specified, call DX_INIT_DOXYGEN -# with the following parameters: a one-word name for the project for use -# as a filename base etc., an optional configuration file name (the -# default is '$(srcdir)/Doxyfile', the same as Doxygen's default), and an -# optional output directory name (the default is 'doxygen-doc'). To run -# doxygen multiple times for different configuration files and output -# directories provide more parameters: the second, forth, sixth, etc -# parameter are configuration file names and the third, fifth, seventh, -# etc parameter are output directories. No checking is done to catch -# duplicates. -# -# Automake Support -# -# The DX_RULES substitution can be used to add all needed rules to the -# Makefile. Note that this is a substitution without being a variable: -# only the @DX_RULES@ syntax will work. -# -# The provided targets are: -# -# doxygen-doc: Generate all doxygen documentation. -# -# doxygen-run: Run doxygen, which will generate some of the -# documentation (HTML, CHM, CHI, MAN, RTF, XML) -# but will not do the post processing required -# for the rest of it (PS, PDF). -# -# doxygen-ps: Generate doxygen PostScript documentation. -# -# doxygen-pdf: Generate doxygen PDF documentation. -# -# Note that by default these are not integrated into the automake targets. -# If doxygen is used to generate man pages, you can achieve this -# integration by setting man3_MANS to the list of man pages generated and -# then adding the dependency: -# -# $(man3_MANS): doxygen-doc -# -# This will cause make to run doxygen and generate all the documentation. -# -# The following variable is intended for use in Makefile.am: -# -# DX_CLEANFILES = everything to clean. -# -# Then add this variable to MOSTLYCLEANFILES. -# -# LICENSE -# -# Copyright (c) 2009 Oren Ben-Kiki -# Copyright (c) 2015 Olaf Mandel -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 23 - -## ----------## -## Defaults. ## -## ----------## - -DX_ENV="" -AC_DEFUN([DX_FEATURE_doc], ON) -AC_DEFUN([DX_FEATURE_dot], OFF) -AC_DEFUN([DX_FEATURE_man], OFF) -AC_DEFUN([DX_FEATURE_html], ON) -AC_DEFUN([DX_FEATURE_chm], OFF) -AC_DEFUN([DX_FEATURE_chi], OFF) -AC_DEFUN([DX_FEATURE_rtf], OFF) -AC_DEFUN([DX_FEATURE_xml], OFF) -AC_DEFUN([DX_FEATURE_pdf], ON) -AC_DEFUN([DX_FEATURE_ps], ON) - -## --------------- ## -## Private macros. ## -## --------------- ## - -# DX_ENV_APPEND(VARIABLE, VALUE) -# ------------------------------ -# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen and add it -# as a substitution (but not a Makefile variable). The substitution -# is skipped if the variable name is VERSION. -AC_DEFUN([DX_ENV_APPEND], -[AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])dnl -m4_if([$1], [VERSION], [], [AC_SUBST([$1], [$2])dnl -AM_SUBST_NOTMAKE([$1])])dnl -]) - -# DX_DIRNAME_EXPR -# --------------- -# Expand into a shell expression prints the directory part of a path. -AC_DEFUN([DX_DIRNAME_EXPR], - [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']]) - -# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF) -# ------------------------------------- -# Expands according to the M4 (static) status of the feature. -AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])]) - -# DX_REQUIRE_PROG(VARIABLE, PROGRAM) -# ---------------------------------- -# Require the specified program to be found for the DX_CURRENT_FEATURE to work. -AC_DEFUN([DX_REQUIRE_PROG], [ -AC_PATH_TOOL([$1], [$2]) -if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then - AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) - AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0) -fi -]) - -# DX_TEST_FEATURE(FEATURE) -# ------------------------ -# Expand to a shell expression testing whether the feature is active. -AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1]) - -# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE) -# ------------------------------------------------- -# Verify that a required features has the right state before trying to turn on -# the DX_CURRENT_FEATURE. -AC_DEFUN([DX_CHECK_DEPEND], [ -test "$DX_FLAG_$1" = "$2" \ -|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1, - requires, contradicts) doxygen-DX_CURRENT_FEATURE]) -]) - -# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE) -# ---------------------------------------------------------- -# Turn off the DX_CURRENT_FEATURE if the required feature is off. -AC_DEFUN([DX_CLEAR_DEPEND], [ -test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0) -]) - -# DX_FEATURE_ARG(FEATURE, DESCRIPTION, -# CHECK_DEPEND, CLEAR_DEPEND, -# REQUIRE, DO-IF-ON, DO-IF-OFF) -# -------------------------------------------- -# Parse the command-line option controlling a feature. CHECK_DEPEND is called -# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND), -# otherwise CLEAR_DEPEND is called to turn off the default state if a required -# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional -# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and -# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature. -AC_DEFUN([DX_ARG_ABLE], [ - AC_DEFUN([DX_CURRENT_FEATURE], [$1]) - AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2]) - AC_ARG_ENABLE(doxygen-$1, - [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1], - [--enable-doxygen-$1]), - DX_IF_FEATURE([$1], [don't $2], [$2]))], - [ -case "$enableval" in -#( -y|Y|yes|Yes|YES) - AC_SUBST([DX_FLAG_$1], 1) - $3 -;; #( -n|N|no|No|NO) - AC_SUBST([DX_FLAG_$1], 0) -;; #( -*) - AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1]) -;; -esac -], [ -AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)]) -$4 -]) -if DX_TEST_FEATURE([$1]); then - $5 - : -fi -if DX_TEST_FEATURE([$1]); then - $6 - : -else - $7 - : -fi -]) - -## -------------- ## -## Public macros. ## -## -------------- ## - -# DX_XXX_FEATURE(DEFAULT_STATE) -# ----------------------------- -AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])]) -AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])]) -AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])]) -AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])]) -AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])]) -AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])]) -AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])]) -AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) -AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) -AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])]) -AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])]) - -# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR], ...) -# -------------------------------------------------------------- -# PROJECT also serves as the base name for the documentation files. -# The default CONFIG-FILE is "$(srcdir)/Doxyfile" and OUTPUT-DOC-DIR is -# "doxygen-doc". -# More arguments are interpreted as interleaved CONFIG-FILE and -# OUTPUT-DOC-DIR values. -AC_DEFUN([DX_INIT_DOXYGEN], [ - -# Files: -AC_SUBST([DX_PROJECT], [$1]) -AC_SUBST([DX_CONFIG], ['ifelse([$2], [], [$(srcdir)/Doxyfile], [$2])']) -AC_SUBST([DX_DOCDIR], ['ifelse([$3], [], [doxygen-doc], [$3])']) -m4_if(m4_eval(3 < m4_count($@)), 1, [m4_for([DX_i], 4, m4_count($@), 2, - [AC_SUBST([DX_CONFIG]m4_eval(DX_i[/2]), - 'm4_default_nblank_quoted(m4_argn(DX_i, $@), - [$(srcdir)/Doxyfile])')])])dnl -m4_if(m4_eval(3 < m4_count($@)), 1, [m4_for([DX_i], 5, m4_count($@,), 2, - [AC_SUBST([DX_DOCDIR]m4_eval([(]DX_i[-1)/2]), - 'm4_default_nblank_quoted(m4_argn(DX_i, $@), - [doxygen-doc])')])])dnl -m4_define([DX_loop], m4_dquote(m4_if(m4_eval(3 < m4_count($@)), 1, - [m4_for([DX_i], 4, m4_count($@), 2, [, m4_eval(DX_i[/2])])], - [])))dnl - -# Environment variables used inside doxygen.cfg: -DX_ENV_APPEND(SRCDIR, $srcdir) -DX_ENV_APPEND(PROJECT, $DX_PROJECT) -DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) - -# Doxygen itself: -DX_ARG_ABLE(doc, [generate any doxygen documentation], - [], - [], - [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen) - DX_REQUIRE_PROG([DX_PERL], perl)], - [DX_ENV_APPEND(PERL_PATH, $DX_PERL)]) - -# Dot for graphics: -DX_ARG_ABLE(dot, [generate graphics for doxygen documentation], - [DX_CHECK_DEPEND(doc, 1)], - [DX_CLEAR_DEPEND(doc, 1)], - [DX_REQUIRE_PROG([DX_DOT], dot)], - [DX_ENV_APPEND(HAVE_DOT, YES) - DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])], - [DX_ENV_APPEND(HAVE_DOT, NO)]) - -# Man pages generation: -DX_ARG_ABLE(man, [generate doxygen manual pages], - [DX_CHECK_DEPEND(doc, 1)], - [DX_CLEAR_DEPEND(doc, 1)], - [], - [DX_ENV_APPEND(GENERATE_MAN, YES)], - [DX_ENV_APPEND(GENERATE_MAN, NO)]) - -# RTF file generation: -DX_ARG_ABLE(rtf, [generate doxygen RTF documentation], - [DX_CHECK_DEPEND(doc, 1)], - [DX_CLEAR_DEPEND(doc, 1)], - [], - [DX_ENV_APPEND(GENERATE_RTF, YES)], - [DX_ENV_APPEND(GENERATE_RTF, NO)]) - -# XML file generation: -DX_ARG_ABLE(xml, [generate doxygen XML documentation], - [DX_CHECK_DEPEND(doc, 1)], - [DX_CLEAR_DEPEND(doc, 1)], - [], - [DX_ENV_APPEND(GENERATE_XML, YES)], - [DX_ENV_APPEND(GENERATE_XML, NO)]) - -# (Compressed) HTML help generation: -DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation], - [DX_CHECK_DEPEND(doc, 1)], - [DX_CLEAR_DEPEND(doc, 1)], - [DX_REQUIRE_PROG([DX_HHC], hhc)], - [DX_ENV_APPEND(HHC_PATH, $DX_HHC) - DX_ENV_APPEND(GENERATE_HTML, YES) - DX_ENV_APPEND(GENERATE_HTMLHELP, YES)], - [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)]) - -# Separate CHI file generation. -DX_ARG_ABLE(chi, [generate doxygen separate compressed HTML help index file], - [DX_CHECK_DEPEND(chm, 1)], - [DX_CLEAR_DEPEND(chm, 1)], - [], - [DX_ENV_APPEND(GENERATE_CHI, YES)], - [DX_ENV_APPEND(GENERATE_CHI, NO)]) - -# Plain HTML pages generation: -DX_ARG_ABLE(html, [generate doxygen plain HTML documentation], - [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)], - [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)], - [], - [DX_ENV_APPEND(GENERATE_HTML, YES)], - [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)]) - -# PostScript file generation: -DX_ARG_ABLE(ps, [generate doxygen PostScript documentation], - [DX_CHECK_DEPEND(doc, 1)], - [DX_CLEAR_DEPEND(doc, 1)], - [DX_REQUIRE_PROG([DX_LATEX], latex) - DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) - DX_REQUIRE_PROG([DX_DVIPS], dvips) - DX_REQUIRE_PROG([DX_EGREP], egrep)]) - -# PDF file generation: -DX_ARG_ABLE(pdf, [generate doxygen PDF documentation], - [DX_CHECK_DEPEND(doc, 1)], - [DX_CLEAR_DEPEND(doc, 1)], - [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex) - DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) - DX_REQUIRE_PROG([DX_EGREP], egrep)]) - -# LaTeX generation for PS and/or PDF: -if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then - DX_ENV_APPEND(GENERATE_LATEX, YES) -else - DX_ENV_APPEND(GENERATE_LATEX, NO) -fi - -# Paper size for PS and/or PDF: -AC_ARG_VAR(DOXYGEN_PAPER_SIZE, - [a4wide (default), a4, letter, legal or executive]) -case "$DOXYGEN_PAPER_SIZE" in -#( -"") - AC_SUBST(DOXYGEN_PAPER_SIZE, "") -;; #( -a4wide|a4|letter|legal|executive) - DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE) -;; #( -*) - AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE']) -;; -esac - -# Rules: -AS_IF([[test $DX_FLAG_html -eq 1]], -[[DX_SNIPPET_html="## ------------------------------- ## -## Rules specific for HTML output. ## -## ------------------------------- ## - -DX_CLEAN_HTML = \$(DX_DOCDIR)/html]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/html]])[ - -"]], -[[DX_SNIPPET_html=""]]) -AS_IF([[test $DX_FLAG_chi -eq 1]], -[[DX_SNIPPET_chi=" -DX_CLEAN_CHI = \$(DX_DOCDIR)/\$(PACKAGE).chi]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).chi]])["]], -[[DX_SNIPPET_chi=""]]) -AS_IF([[test $DX_FLAG_chm -eq 1]], -[[DX_SNIPPET_chm="## ------------------------------ ## -## Rules specific for CHM output. ## -## ------------------------------ ## - -DX_CLEAN_CHM = \$(DX_DOCDIR)/chm]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/chm]])[\ -${DX_SNIPPET_chi} - -"]], -[[DX_SNIPPET_chm=""]]) -AS_IF([[test $DX_FLAG_man -eq 1]], -[[DX_SNIPPET_man="## ------------------------------ ## -## Rules specific for MAN output. ## -## ------------------------------ ## - -DX_CLEAN_MAN = \$(DX_DOCDIR)/man]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/man]])[ - -"]], -[[DX_SNIPPET_man=""]]) -AS_IF([[test $DX_FLAG_rtf -eq 1]], -[[DX_SNIPPET_rtf="## ------------------------------ ## -## Rules specific for RTF output. ## -## ------------------------------ ## - -DX_CLEAN_RTF = \$(DX_DOCDIR)/rtf]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/rtf]])[ - -"]], -[[DX_SNIPPET_rtf=""]]) -AS_IF([[test $DX_FLAG_xml -eq 1]], -[[DX_SNIPPET_xml="## ------------------------------ ## -## Rules specific for XML output. ## -## ------------------------------ ## - -DX_CLEAN_XML = \$(DX_DOCDIR)/xml]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/xml]])[ - -"]], -[[DX_SNIPPET_xml=""]]) -AS_IF([[test $DX_FLAG_ps -eq 1]], -[[DX_SNIPPET_ps="## ----------------------------- ## -## Rules specific for PS output. ## -## ----------------------------- ## - -DX_CLEAN_PS = \$(DX_DOCDIR)/\$(PACKAGE).ps]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).ps]])[ - -DX_PS_GOAL = doxygen-ps - -doxygen-ps: \$(DX_CLEAN_PS) - -]m4_foreach([DX_i], [DX_loop], -[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).ps: \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag - \$(DX_V_LATEX)cd \$(DX_DOCDIR]DX_i[)/latex; \\ - rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \\ - \$(DX_LATEX) refman.tex; \\ - \$(DX_MAKEINDEX) refman.idx; \\ - \$(DX_LATEX) refman.tex; \\ - countdown=5; \\ - while \$(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \\ - refman.log > /dev/null 2>&1 \\ - && test \$\$countdown -gt 0; do \\ - \$(DX_LATEX) refman.tex; \\ - countdown=\`expr \$\$countdown - 1\`; \\ - done; \\ - \$(DX_DVIPS) -o ../\$(PACKAGE).ps refman.dvi - -]])["]], -[[DX_SNIPPET_ps=""]]) -AS_IF([[test $DX_FLAG_pdf -eq 1]], -[[DX_SNIPPET_pdf="## ------------------------------ ## -## Rules specific for PDF output. ## -## ------------------------------ ## - -DX_CLEAN_PDF = \$(DX_DOCDIR)/\$(PACKAGE).pdf]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).pdf]])[ - -DX_PDF_GOAL = doxygen-pdf - -doxygen-pdf: \$(DX_CLEAN_PDF) - -]m4_foreach([DX_i], [DX_loop], -[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).pdf: \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag - \$(DX_V_LATEX)cd \$(DX_DOCDIR]DX_i[)/latex; \\ - rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \\ - \$(DX_PDFLATEX) refman.tex; \\ - \$(DX_MAKEINDEX) refman.idx; \\ - \$(DX_PDFLATEX) refman.tex; \\ - countdown=5; \\ - while \$(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \\ - refman.log > /dev/null 2>&1 \\ - && test \$\$countdown -gt 0; do \\ - \$(DX_PDFLATEX) refman.tex; \\ - countdown=\`expr \$\$countdown - 1\`; \\ - done; \\ - mv refman.pdf ../\$(PACKAGE).pdf - -]])["]], -[[DX_SNIPPET_pdf=""]]) -AS_IF([[test $DX_FLAG_ps -eq 1 -o $DX_FLAG_pdf -eq 1]], -[[DX_SNIPPET_latex="## ------------------------------------------------- ## -## Rules specific for LaTeX (shared for PS and PDF). ## -## ------------------------------------------------- ## - -DX_V_LATEX = \$(_DX_v_LATEX_\$(V)) -_DX_v_LATEX_ = \$(_DX_v_LATEX_\$(AM_DEFAULT_VERBOSITY)) -_DX_v_LATEX_0 = @echo \" LATEX \" \$][@; - -DX_CLEAN_LATEX = \$(DX_DOCDIR)/latex]dnl -m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\ - \$(DX_DOCDIR]DX_i[)/latex]])[ - -"]], -[[DX_SNIPPET_latex=""]]) - -AS_IF([[test $DX_FLAG_doc -eq 1]], -[[DX_SNIPPET_doc="## --------------------------------- ## -## Format-independent Doxygen rules. ## -## --------------------------------- ## - -${DX_SNIPPET_html}\ -${DX_SNIPPET_chm}\ -${DX_SNIPPET_man}\ -${DX_SNIPPET_rtf}\ -${DX_SNIPPET_xml}\ -${DX_SNIPPET_ps}\ -${DX_SNIPPET_pdf}\ -${DX_SNIPPET_latex}\ -DX_V_DXGEN = \$(_DX_v_DXGEN_\$(V)) -_DX_v_DXGEN_ = \$(_DX_v_DXGEN_\$(AM_DEFAULT_VERBOSITY)) -_DX_v_DXGEN_0 = @echo \" DXGEN \" \$<; - -.PHONY: doxygen-run doxygen-doc \$(DX_PS_GOAL) \$(DX_PDF_GOAL) - -.INTERMEDIATE: doxygen-run \$(DX_PS_GOAL) \$(DX_PDF_GOAL) - -doxygen-run:]m4_foreach([DX_i], [DX_loop], - [[ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag]])[ - -doxygen-doc: doxygen-run \$(DX_PS_GOAL) \$(DX_PDF_GOAL) - -]m4_foreach([DX_i], [DX_loop], -[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag: \$(DX_CONFIG]DX_i[) \$(pkginclude_HEADERS) - \$(A""M_V_at)rm -rf \$(DX_DOCDIR]DX_i[) - \$(DX_V_DXGEN)\$(DX_ENV) DOCDIR=\$(DX_DOCDIR]DX_i[) \$(DX_DOXYGEN) \$(DX_CONFIG]DX_i[) - \$(A""M_V_at)echo Timestamp >\$][@ - -]])dnl -[DX_CLEANFILES = \\] -m4_foreach([DX_i], [DX_loop], -[[ \$(DX_DOCDIR]DX_i[)/doxygen_sqlite3.db \\ - \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag \\ -]])dnl -[ -r \\ - \$(DX_CLEAN_HTML) \\ - \$(DX_CLEAN_CHM) \\ - \$(DX_CLEAN_CHI) \\ - \$(DX_CLEAN_MAN) \\ - \$(DX_CLEAN_RTF) \\ - \$(DX_CLEAN_XML) \\ - \$(DX_CLEAN_PS) \\ - \$(DX_CLEAN_PDF) \\ - \$(DX_CLEAN_LATEX)"]], -[[DX_SNIPPET_doc=""]]) -AC_SUBST([DX_RULES], -["${DX_SNIPPET_doc}"])dnl -AM_SUBST_NOTMAKE([DX_RULES]) - -#For debugging: -#echo DX_FLAG_doc=$DX_FLAG_doc -#echo DX_FLAG_dot=$DX_FLAG_dot -#echo DX_FLAG_man=$DX_FLAG_man -#echo DX_FLAG_html=$DX_FLAG_html -#echo DX_FLAG_chm=$DX_FLAG_chm -#echo DX_FLAG_chi=$DX_FLAG_chi -#echo DX_FLAG_rtf=$DX_FLAG_rtf -#echo DX_FLAG_xml=$DX_FLAG_xml -#echo DX_FLAG_pdf=$DX_FLAG_pdf -#echo DX_FLAG_ps=$DX_FLAG_ps -#echo DX_ENV=$DX_ENV -]) diff --git a/m4/ax_prog_jar.m4 b/m4/ax_prog_jar.m4 deleted file mode 100644 index d474912a05a..00000000000 --- a/m4/ax_prog_jar.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_jar.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_JAR -# -# DESCRIPTION -# -# AX_PROG_JAR tests for an existing jar program. It uses the environment -# variable JAR then tests in sequence various common jar programs. -# -# If you want to force a specific compiler: -# -# - at the configure.in level, set JAR=yourcompiler before calling -# AX_PROG_JAR -# -# - at the configure level, setenv JAR -# -# You can use the JAR variable in your Makefile.in, with @JAR@. -# -# Note: This macro depends on the autoconf M4 macros for Java programs. It -# is VERY IMPORTANT that you download that whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. -# -# The general documentation of those macros, as well as the sample -# configure.in, is included in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Egon Willighagen -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 8 - -AU_ALIAS([AC_PROG_JAR], [AX_PROG_JAR]) -AC_DEFUN([AX_PROG_JAR],[ -AS_IF([test "x$JAVAPREFIX" = x], - [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar])], - [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar], [], [$JAVAPREFIX/bin])]) -test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH]) -AC_PROVIDE([$0])dnl -]) diff --git a/m4/ax_prog_java.m4 b/m4/ax_prog_java.m4 deleted file mode 100644 index c2e6964e2cc..00000000000 --- a/m4/ax_prog_java.m4 +++ /dev/null @@ -1,115 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_java.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_JAVA -# -# DESCRIPTION -# -# Here is a summary of the main macros: -# -# AX_PROG_JAVAC: finds a Java compiler. -# -# AX_PROG_JAVA: finds a Java virtual machine. -# -# AX_CHECK_CLASS: finds if we have the given class (beware of CLASSPATH!). -# -# AX_CHECK_RQRD_CLASS: finds if we have the given class and stops -# otherwise. -# -# AX_TRY_COMPILE_JAVA: attempt to compile user given source. -# -# AX_TRY_RUN_JAVA: attempt to compile and run user given source. -# -# AX_JAVA_OPTIONS: adds Java configure options. -# -# AX_PROG_JAVA tests an existing Java virtual machine. It uses the -# environment variable JAVA then tests in sequence various common Java -# virtual machines. For political reasons, it starts with the free ones. -# You *must* call [AX_PROG_JAVAC] before. -# -# If you want to force a specific VM: -# -# - at the configure.in level, set JAVA=yourvm before calling AX_PROG_JAVA -# -# (but after AC_INIT) -# -# - at the configure level, setenv JAVA -# -# You can use the JAVA variable in your Makefile.in, with @JAVA@. -# -# *Warning*: its success or failure can depend on a proper setting of the -# CLASSPATH env. variable. -# -# TODO: allow to exclude virtual machines (rationale: most Java programs -# cannot run with some VM like kaffe). -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. -# -# A Web page, with a link to the latest CVS snapshot is at -# . -# -# This is a sample configure.in Process this file with autoconf to produce -# a configure script. -# -# AC_INIT(UnTag.java) -# -# dnl Checks for programs. -# AC_CHECK_CLASSPATH -# AX_PROG_JAVAC -# AX_PROG_JAVA -# -# dnl Checks for classes -# AX_CHECK_RQRD_CLASS(org.xml.sax.Parser) -# AX_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver) -# -# AC_OUTPUT(Makefile) -# -# LICENSE -# -# Copyright (c) 2008 Stephane Bortzmeyer -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 10 - -AU_ALIAS([AC_PROG_JAVA], [AX_PROG_JAVA]) -AC_DEFUN([AX_PROG_JAVA],[ -m4_define([m4_ax_prog_java_list], [kaffe java])dnl -AS_IF([test "x$JAVAPREFIX" = x], - [test x$JAVA = x && AC_CHECK_PROGS([JAVA], [m4_ax_prog_java_list])], - [test x$JAVA = x && AC_CHECK_PROGS([JAVA], [m4_ax_prog_java_list], [], [$JAVAPREFIX/bin])]) -test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH]) -m4_undefine([m4_ax_prog_java_list])dnl -AX_PROG_JAVA_WORKS -AC_PROVIDE([$0])dnl -]) diff --git a/m4/ax_prog_java_cc.m4 b/m4/ax_prog_java_cc.m4 deleted file mode 100644 index ce9612d3f8f..00000000000 --- a/m4/ax_prog_java_cc.m4 +++ /dev/null @@ -1,104 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_java_cc.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_JAVA_CC -# -# DESCRIPTION -# -# Finds the appropriate java compiler on your path. By preference the java -# compiler is gcj, then jikes then javac. -# -# The macro can take one argument specifying a space separated list of -# java compiler names. -# -# For example: -# -# AX_PROG_JAVA_CC(javac, gcj) -# -# The macro also sets the compiler options variable: JAVA_CC_OPTS to -# something sensible: -# -# - for GCJ it sets it to: @GCJ_OPTS@ -# (if GCJ_OPTS is not yet defined then it is set to "-C") -# -# - no other compiler has applicable options yet -# -# Here's an example configure.in: -# -# AC_INIT(Makefile.in) -# AX_PROG_JAVA_CC() -# AC_OUTPUT(Makefile) -# dnl End. -# -# And here's the start of the Makefile.in: -# -# PROJECT_ROOT := @srcdir@ -# # Tool definitions. -# JAVAC := @JAVA_CC@ -# JAVAC_OPTS := @JAVA_CC_OPTS@ -# JAR_TOOL := @jar_tool@ -# -# LICENSE -# -# Copyright (c) 2008 Nic Ferrier -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 5 - -# AX_PROG_JAVA_CC([COMPILER ...]) -# -------------------------- -# COMPILER ... is a space separated list of java compilers to search for. -# This just gives the user an opportunity to specify an alternative -# search list for the java compiler. -AU_ALIAS([AC_PROG_JAVA_CC], [AX_PROG_JAVA_CC]) -AC_DEFUN([AX_PROG_JAVA_CC], -[AC_ARG_VAR([JAVA_CC], [java compiler command])dnl -AC_ARG_VAR([JAVA_CC_FLAGS], [java compiler flags])dnl -m4_ifval([$1], - [AC_CHECK_TOOLS(JAVA_CC, [$1])], -[AC_CHECK_TOOL(JAVA_CC, gcj) -if test -z "$JAVA_CC"; then - AC_CHECK_TOOL(JAVA_CC, javac) -fi -if test -z "$JAVA_CC"; then - AC_CHECK_TOOL(JAVA_CC, jikes) -fi -]) - -if test "$JAVA_CC" = "gcj"; then - if test "$GCJ_OPTS" = ""; then - AC_SUBST(GCJ_OPTS,-C) - fi - AC_SUBST(JAVA_CC_OPTS, @GCJ_OPTS@, - [Define the compilation options for GCJ]) -fi -test -z "$JAVA_CC" && AC_MSG_ERROR([no acceptable java compiler found in \$PATH]) -])# AX_PROG_JAVA_CC diff --git a/m4/ax_prog_java_works.m4 b/m4/ax_prog_java_works.m4 deleted file mode 100644 index bc7052619e7..00000000000 --- a/m4/ax_prog_java_works.m4 +++ /dev/null @@ -1,91 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_java_works.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_JAVA_WORKS -# -# DESCRIPTION -# -# Internal use ONLY. -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Stephane Bortzmeyer -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 11 - -AU_ALIAS([AC_PROG_JAVA_WORKS], [AX_PROG_JAVA_WORKS]) -AC_DEFUN([AX_PROG_JAVA_WORKS], [ - if test x$ac_cv_prog_javac_works = xno; then - AC_MSG_ERROR([Cannot compile java source. $JAVAC does not work properly]) - fi - if test x$ac_cv_prog_javac_works = x; then - AX_PROG_JAVAC - fi -AC_CACHE_CHECK(if $JAVA works, ac_cv_prog_java_works, [ -JAVA_TEST=Test.java -CLASS_TEST=Test.class -TEST=Test -changequote(, )dnl -cat << \EOF > $JAVA_TEST -/* [#]line __oline__ "configure" */ -public class Test { -public static void main (String args[]) { - System.exit (0); -} } -EOF -changequote([, ])dnl - if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s $CLASS_TEST; then - : - else - echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD - cat $JAVA_TEST >&AS_MESSAGE_LOG_FD - AC_MSG_ERROR(The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)) - fi -if AC_TRY_COMMAND($JAVA -classpath . $JAVAFLAGS $TEST) >/dev/null 2>&1; then - ac_cv_prog_java_works=yes -else - echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD - cat $JAVA_TEST >&AS_MESSAGE_LOG_FD - AC_MSG_ERROR(The Java VM $JAVA failed (see config.log, check the CLASSPATH?)) -fi -rm -f $JAVA_TEST $CLASS_TEST -]) -AC_PROVIDE([$0])dnl -] -) diff --git a/m4/ax_prog_javac.m4 b/m4/ax_prog_javac.m4 deleted file mode 100644 index 8abb733fcef..00000000000 --- a/m4/ax_prog_javac.m4 +++ /dev/null @@ -1,79 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_javac.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_JAVAC -# -# DESCRIPTION -# -# AX_PROG_JAVAC tests an existing Java compiler. It uses the environment -# variable JAVAC then tests in sequence various common Java compilers. For -# political reasons, it starts with the free ones. -# -# If you want to force a specific compiler: -# -# - at the configure.in level, set JAVAC=yourcompiler before calling -# AX_PROG_JAVAC -# -# - at the configure level, setenv JAVAC -# -# You can use the JAVAC variable in your Makefile.in, with @JAVAC@. -# -# *Warning*: its success or failure can depend on a proper setting of the -# CLASSPATH env. variable. -# -# TODO: allow to exclude compilers (rationale: most Java programs cannot -# compile with some compilers like guavac). -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Stephane Bortzmeyer -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 8 - -AU_ALIAS([AC_PROG_JAVAC], [AX_PROG_JAVAC]) -AC_DEFUN([AX_PROG_JAVAC],[ -m4_define([m4_ax_prog_javac_list],["gcj -C" guavac jikes javac])dnl -AS_IF([test "x$JAVAPREFIX" = x], - [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list])], - [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list], [], [$JAVAPREFIX/bin])]) -m4_undefine([m4_ax_prog_javac_list])dnl -test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH]) -AX_PROG_JAVAC_WORKS -AC_PROVIDE([$0])dnl -]) diff --git a/m4/ax_prog_javac_works.m4 b/m4/ax_prog_javac_works.m4 deleted file mode 100644 index 9b48149d80e..00000000000 --- a/m4/ax_prog_javac_works.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_javac_works.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_JAVAC_WORKS -# -# DESCRIPTION -# -# Internal use ONLY. -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Stephane Bortzmeyer -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 7 - -AU_ALIAS([AC_PROG_JAVAC_WORKS], [AX_PROG_JAVAC_WORKS]) -AC_DEFUN([AX_PROG_JAVAC_WORKS],[ -AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [ -JAVA_TEST=Test.java -CLASS_TEST=Test.class -cat << \EOF > $JAVA_TEST -/* [#]line __oline__ "configure" */ -public class Test { -} -EOF -if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then - ac_cv_prog_javac_works=yes -else - AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)]) - echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD - cat $JAVA_TEST >&AS_MESSAGE_LOG_FD -fi -rm -f $JAVA_TEST $CLASS_TEST -]) -AC_PROVIDE([$0])dnl -]) diff --git a/m4/ax_prog_javadoc.m4 b/m4/ax_prog_javadoc.m4 deleted file mode 100644 index b9fcea414d6..00000000000 --- a/m4/ax_prog_javadoc.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_javadoc.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_JAVADOC -# -# DESCRIPTION -# -# AX_PROG_JAVADOC tests for an existing javadoc generator. It uses the -# environment variable JAVADOC then tests in sequence various common -# javadoc generator. -# -# If you want to force a specific compiler: -# -# - at the configure.in level, set JAVADOC=yourgenerator before calling -# AX_PROG_JAVADOC -# -# - at the configure level, setenv JAVADOC -# -# You can use the JAVADOC variable in your Makefile.in, with @JAVADOC@. -# -# Note: This macro depends on the autoconf M4 macros for Java programs. It -# is VERY IMPORTANT that you download that whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. -# -# The general documentation of those macros, as well as the sample -# configure.in, is included in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Egon Willighagen -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 9 - -AU_ALIAS([AC_PROG_JAVADOC], [AX_PROG_JAVADOC]) -AC_DEFUN([AX_PROG_JAVADOC],[ -AS_IF([test "x$JAVAPREFIX" = x], - [test "x$JAVADOC" = x && AC_CHECK_PROGS([JAVADOC], [javadoc])], - [test "x$JAVADOC" = x && AC_CHECK_PROGS([JAVADOC], [javadoc], [], [$JAVAPREFIX/bin])]) -test "x$JAVADOC" = x && AC_MSG_ERROR([no acceptable javadoc generator found in \$PATH]) -AC_PROVIDE([$0])dnl -]) diff --git a/m4/ax_prog_javah.m4 b/m4/ax_prog_javah.m4 deleted file mode 100644 index 935ec8964bc..00000000000 --- a/m4/ax_prog_javah.m4 +++ /dev/null @@ -1,64 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prog_javah.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_JAVAH -# -# DESCRIPTION -# -# AX_PROG_JAVAH tests the availability of the javah header generator and -# looks for the jni.h header file. If available, JAVAH is set to the full -# path of javah and CPPFLAGS is updated accordingly. -# -# LICENSE -# -# Copyright (c) 2008 Luc Maisonobe -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 11 - -AU_ALIAS([AC_PROG_JAVAH], [AX_PROG_JAVAH]) -AC_DEFUN([AX_PROG_JAVAH],[ -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CPP])dnl -AC_PATH_PROG(JAVAH,javah) -AS_IF([test -n "$ac_cv_path_JAVAH"], - [ - AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])],[],[ - ac_save_CPPFLAGS="$CPPFLAGS" - _ACJAVAH_FOLLOW_SYMLINKS("$ac_cv_path_JAVAH") - ax_prog_javah_bin_dir=`AS_DIRNAME([$_ACJAVAH_FOLLOWED])` - ac_dir="`AS_DIRNAME([$ax_prog_javah_bin_dir])`/include" - AS_CASE([$build_os], - [cygwin*|mingw*], - [ac_machdep=win32], - [ac_machdep=`AS_ECHO($build_os) | sed 's,[[-0-9]].*,,'`]) - CPPFLAGS="$ac_save_CPPFLAGS -I$ac_dir -I$ac_dir/$ac_machdep" - AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], - [ac_save_CPPFLAGS="$CPPFLAGS"], - [AC_MSG_WARN([unable to include ])]) - CPPFLAGS="$ac_save_CPPFLAGS"]) - ]) -]) - -AC_DEFUN([_ACJAVAH_FOLLOW_SYMLINKS],[ -# find the include directory relative to the javac executable -_cur="$1" -while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do - AC_MSG_CHECKING([symlink for $_cur]) - _slink=`ls -ld "$_cur" | sed 's/.* -> //'` - case "$_slink" in - /*) _cur="$_slink";; - # 'X' avoids triggering unwanted echo options. - *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";; - esac - AC_MSG_RESULT([$_cur]) -done -_ACJAVAH_FOLLOWED="$_cur" -]) diff --git a/m4/ax_try_compile_java.m4 b/m4/ax_try_compile_java.m4 deleted file mode 100644 index 245c36c40dc..00000000000 --- a/m4/ax_try_compile_java.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_try_compile_java.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_TRY_COMPILE_JAVA -# -# DESCRIPTION -# -# AX_TRY_COMPILE_JAVA attempt to compile user given source. -# -# *Warning*: its success or failure can depend on a proper setting of the -# CLASSPATH env. variable. -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Devin Weaver -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 10 - -AU_ALIAS([AC_TRY_COMPILE_JAVA], [AX_TRY_COMPILE_JAVA]) -AC_DEFUN([AX_TRY_COMPILE_JAVA],[ -AC_REQUIRE([AX_PROG_JAVAC])dnl -cat << \EOF > Test.java -/* [#]line __oline__ "configure" */ -ifelse([$1], , , [import $1;]) -public class Test { -[$2] -} -EOF -if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class -then -dnl Don't remove the temporary files here, so they can be examined. - ifelse([$3], , :, [$3]) -else - echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD - cat Test.java >&AS_MESSAGE_LOG_FD -ifelse([$4], , , [ rm -f Test.java Test.class - $4 -])dnl -fi -rm -f Test.java Test.class]) diff --git a/m4/ax_try_run_java.m4 b/m4/ax_try_run_java.m4 deleted file mode 100644 index 2ebb86d6dc3..00000000000 --- a/m4/ax_try_run_java.m4 +++ /dev/null @@ -1,56 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_try_run_java.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_TRY_RUN_JAVA -# -# DESCRIPTION -# -# AX_TRY_RUN_JAVA attempt to compile and run user given source. -# -# *Warning*: its success or failure can depend on a proper setting of the -# CLASSPATH env. variable. -# -# Note: This is part of the set of autoconf M4 macros for Java programs. -# It is VERY IMPORTANT that you download the whole set, some macros depend -# on other. Unfortunately, the autoconf archive does not support the -# concept of set of macros, so I had to break it for submission. The -# general documentation, as well as the sample configure.in, is included -# in the AX_PROG_JAVA macro. -# -# LICENSE -# -# Copyright (c) 2008 Devin Weaver -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 3 - -AU_ALIAS([AC_TRY_RUN_JAVA], [AX_TRY_RUN_JAVA]) -AC_DEFUN([AX_TRY_RUN_JAVA],[ -AC_REQUIRE([AX_PROG_JAVAC])dnl -AC_REQUIRE([AX_PROG_JAVA])dnl -cat << \EOF > Test.java -/* [#]line __oline__ "configure" */ -ifelse([$1], , , [include $1;]) -public class Test { -[$2] -} -EOF -if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class && ($JAVA $JAVAFLAGS Test; exit) 2>/dev/null -then -dnl Don't remove the temporary files here, so they can be examined. - ifelse([$3], , :, [$3]) -else - echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD - cat Test.java >&AS_MESSAGE_LOG_FD -ifelse([$4], , , [ rm -fr Test.java Test.class - $4 -])dnl -fi -rm -fr Test.java Test.class]) diff --git a/release_docs/INSTALL_Autotools.txt b/release_docs/INSTALL_Autotools.txt deleted file mode 100644 index 325090aadd4..00000000000 --- a/release_docs/INSTALL_Autotools.txt +++ /dev/null @@ -1,521 +0,0 @@ -************************************************************************* -* Installation Instructions for HDF5 using Autotools * -************************************************************************* - - Table of Contents - -Section I. Preconditions -Section II: Unix and macOS Configuration and Build -Section III: Full installation instructions for source distributions -Section IV: Using the Library -Section V: Windows Configuration and Build - -************************************************************************ - -For help with installing, questions can be posted to the HDF Forum or sent to the HDF Helpdesk: - - HDF Forum: https://forum.hdfgroup.org/ - HDF Helpdesk: https://help.hdfgroup.org/ - - -======================================================================== -I. Preconditions -======================================================================== -Obtaining HDF5 source code - 1. Create a directory for your development; for example, "myhdfstuff". - - 2. Obtain HDF5 source from Github - development branch: https://github.com/HDFGroup/hdf5 - last release: https://github.com/HDFGroup/hdf5/releases/latest - hdf5-1_17_"X".tar.gz or hdf5-1_17_"X".zip - - and put it in "myhdfstuff". - Uncompress the file. There should be a hdf5-1.17."X" folder. - - -======================================================================== -II. Unix and macOS Configuration and Build -======================================================================== - -See RELEASE.txt in the release_notes/ directory for the list of platforms -tested for this release. - -Before You Start: - - 1. Make sure that the zlib library is installed on your system. - - 2. Optional: Install the Szip version 2.1 library (you may use - Szip 2.0 binaries). - - 3. Extract the source from the hdf5-X.Y.Z.tar file and change - directory to hdf5-X.Y.Z. - - 4. Quick installation - For those who don't like to read ;-) the following steps can be used - to configure, build, test, and install the HDF5 library, header files, - and support programs. For example, to install HDF5 version X.Y.Z at - location /usr/local/hdf5, use the following steps. - - $ cd hdf5-X.Y.Z - $ ./configure --prefix=/usr/local/hdf5 - $ make - $ make check # run test suite. - $ make install - $ make check-install # verify installation. - - above refers to the configure flags appropriate - to your installation. For example, to install HDF5 with the - Fortran and C++ interfaces and with Szip compression, the - configure line might read as follows: - - $ ./configure --prefix=/usr/local/hdf5 --enable-fortran \ - --enable-cxx --with-szlib=PATH_TO_SZIP - - In this case, PATH_TO_SZIP would be replaced with the path to the - installed location of the Szip library. - -======================================================================== -III. Full installation instructions for source distributions -======================================================================== - - 1. Unpacking the distribution - The HDF5 source code is distributed in a variety of formats which - can be unpacked with the following commands, each of which creates an - 'hdf5-X.Y.Z' directory, where X.Y.Z is the HDF5 version numbers. - - 1.1. Non-compressed tar archive (*.tar) - - $ tar xf hdf5-X.Y.Z.tar - - 1.2. Gzip'd tar archive (*.tar.gz) - - $ gunzip < hdf5-X.Y.Z.tar.gz | tar xf - - Or - $ tar zxf hdf5-X.Y.Z.tar.gz - - 1.3. Bzip'd tar archive (*.tar.bz2) - - $ bunzip2 < hdf5-X.Y.Z.tar.bz2 | tar xf - - Or - $ tar jxf hdf5-X.Y.Z.tar.bz2 - - 2. Source versus build directories - On most systems the build can occur in a directory other than the - source directory, allowing multiple concurrent builds and/or - read-only source code. In order to accomplish this, one should - create a build directory, cd into that directory, and run the - `configure' script found in the source directory (configure - details are below). For example, - $ mkdir built-fortran - $ cd build-fortran - $ ../hdf5-X.Y.Z/configure --enable-fortran ... - - - 3. Configuring - HDF5 uses the GNU autoconf system for configuration, which - detects various features of the host system and creates the - Makefiles. On most systems it should be sufficient to say: - - $ ./configure - Or - $ sh configure - - The configuration process can be controlled through environment - variables, command-line switches, and host configuration files. - For a complete list of switches type: - - $ ./configure --help - - The host configuration files are located in the `config' - directory and are based on architecture name, vendor name, and/or - operating system which are displayed near the beginning of the - `configure' output. The host config file influences the behavior - of configure by setting or augmenting shell variables. - - 3.1. Specifying the installation directories - The default installation location is the HDF5 directory created in - the build directory. Typing `make install' will install the HDF5 - library, header files, examples, and support programs in hdf5/lib, - hdf5/include, hdf5/doc/hdf5/examples, and hdf5/bin. To use a path - other than hdf5, specify the path with the `--prefix=PATH' switch: - - $ ./configure --prefix=/usr/local - - If shared libraries are being built (the default), the final - home of the shared library must be specified with this switch - before the library and executables are built. - - HDF5 can be installed into a different location than the prefix - specified at configure time; see section 4.6, "Installing HDF5," - for more details. - - 3.2. Using an alternate C compiler - By default, configure will look for the C compiler by trying - `gcc' and `cc'. However, if the environment variable "CC" is set - then its value is used as the C compiler. For instance, one would - use the following line to specify the native C compiler on a system - that also has the GNU gcc compiler (users of csh and derivatives - will need to prefix the commands below with `env'): - - $ CC=cc ./configure - - A parallel version of HDF5 can be built by specifying `mpicc' - as the C compiler. (The `--enable-parallel' flag documented - below is optional in this case.) Using the `mpicc' compiler - will insure that the correct MPI and MPI-IO header files and - libraries are used. - - $ CC=/usr/local/mpi/bin/mpicc ./configure - - - 3.3. Additional compilation flags - If additional flags must be passed to the compilation commands, - specify those flags with the CFLAGS variable. For instance, - to enable symbolic debugging of a production version of HDF5, one - might say: - - $ CFLAGS=-g ./configure --enable-build-mode=production - - 3.4. Compiling HDF5 wrapper libraries - One can optionally build the Fortran, C++, and Java interfaces to - the HDF5 C library. By default, these options are disabled. To build - them, specify '--enable-fortran', '--enable-cxx', or '--enable-java', - respectively. - - $ ./configure --enable-fortran - $ ./configure --enable-cxx - $ ./configure --enable-java - - Configuration will halt if a working Fortran 90 or 95 compiler or - C++ compiler is not found. Currently, the Fortran configure tests - for these compilers in order: f90, pgf90, f95. To use an - alternate compiler specify it with the FC variable: - - $ FC=/usr/local/bin/g95 ./configure --enable-fortran - - - 3.5. Specifying other programs - The build system has been tuned for use with GNU make but also - works with other versions of make. If the `make' command runs a - non-GNU version but a GNU version is available under a different - name (perhaps `gmake'), then HDF5 can be configured to use it by - setting the MAKE variable. Note that whatever value is used for - MAKE must also be used as the make command when building the - library: - - $ MAKE=gmake ./configure - $ gmake - - The `AR' and `RANLIB' variables can also be set to the names of - the `ar' and `ranlib' (or `:') commands to override values - detected by configure. - - The HDF5 library, include files, and utilities are installed - during `make install' (described below) with a BSD-compatible - install program detected automatically by configure. If none is - found, the shell script bin/install-sh is used. Configure does not - check that the install script actually works; if a bad install is - detected on your system (e.g., on the ASCI blue machine as of - March 2, 1999) you have two choices: - - 1. Copy the bin/install-sh program to your $HOME/bin - directory, name it `install', and make sure that $HOME/bin - is searched before the system bin directories. - - 2. Specify the full path name of the `install-sh' program - as the value of the INSTALL environment variable. Note: do - not use `cp' or some other program in place of install - because the HDF5 makefiles also use the install program to - change file ownership and/or access permissions. - - 3.6. Specifying other libraries and headers - Configure searches the standard places (those places known by the - systems compiler) for include files and header files. However, - additional directories can be specified by using the CPPFLAGS - and/or LDFLAGS variables: - - $ CPPFLAGS=-I/home/robb/include \ - LDFLAGS=-L/home/robb/lib \ - ./configure - - HDF5 uses the zlib library to support the HDF5 deflate - data compression filter. Configure searches the standard places - (plus those specified above with the CPPFLAGS and LDFLAGS variables) - for the zlib headers and library. The search can be disabled by - specifying `--without-zlib' or alternate directories can be specified - with `--with-zlib=INCDIR,LIBDIR' or through the CPPFLAGS and LDFLAGS - variables: - - $ ./configure --with-zlib=/usr/unsup/include,/usr/unsup/lib - - $ CPPFLAGS=-I/usr/unsup/include \ - LDFLAGS=-L/usr/unsup/lib \ - ./configure - - HDF5 includes Szip as a predefined compression method (see INSTALL 2.2). - To enable Szip compression, the HDF5 library must be configured - and built using the Szip library: - - $ ./configure --with-szlib=PATH_TO_SZIP - - 3.7. Static versus shared linking - The build process will create static libraries on all systems and - shared libraries on systems that support dynamic linking to a - sufficient degree. Either form of the library may be suppressed by - saying `--disable-static' or `--disable-shared'. - - $ ./configure --disable-shared - - Shared C++ and Fortran libraries will be built if shared libraries - are enabled. - - To build only statically linked executables on platforms which - support shared libraries, use the `--enable-static-exec' flag. - - $ ./configure --enable-static-exec - - 3.8. Optimization versus symbolic debugging - The library can be compiled to provide symbolic debugging support - so it can be debugged with gdb, dbx, ddd, etc., or it can be - compiled with various optimizations. To compile for symbolic - debugging (the default for snapshots), say - `--enable-build-mode=debug'; to compile with optimizations - (the default for supported public releases), - say `--enable-build-mode=production'. For a 'clean slate' configuration - with optimization disabled and nothing turned on, - say `--enable-build-mode=clean'. On some systems the - library can also be compiled for profiling with gprof by saying - `--enable-profiling'. - - $ ./configure --enable-build-mode=debug #symbolic debugging - $ ./configure --enable-build-mode=production #optimized code - $ ./configure --enable-build-mode=clean #'clean slate' - $ ./configure --enable-profiling #for use with gprof - - Regardless of whether support for symbolic debugging is enabled, - the library can also perform runtime debugging of certain packages - (such as type conversion execution times and extensive invariant - condition checking). To enable this debugging, supply a - comma-separated list of package names to the `--enable-internal-debug' - switch. - - Debugging can be disabled by saying `--disable-internal-debug'. - The default debugging level for snapshots is a subset of the - available packages; the default for supported releases is no - debugging (debugging can incur a significant runtime penalty). - - $ ./configure --enable-internal-debug=s,t #debug only H5S and H5T - $ ./configure --enable-internal-debug #debug normal packages - $ ./configure --enable-internal-debug=all #debug all packages - $ ./configure --disable-internal-debug #no debugging - - HDF5 can also print a trace of all API function calls, their - arguments, and the return values. To enable or disable the - ability to trace the API say `--enable-trace' (the default for - snapthots) or `--disable-trace' (the default for public releases). - The tracing must also be enabled at runtime to see any output. - - 3.9. Parallel versus serial library - The HDF5 library can be configured to use MPI and MPI-IO for - parallelism on a distributed multi-processor system. Read the - file INSTALL_parallel for detailed information. - - The threadsafe, C++ and Java interfaces are not compatible - with the parallel option. - Unless --enable-unsupported has been specified on the configure line, - the following options must be disabled: - --enable-threadsafe, --enable-cxx, --enable-java - - - 3.10. Threadsafe capability - The HDF5 library can be configured to be thread-safe (on a very - large scale) with the `--enable-threadsafe' flag to the configure - script. Some platforms may also require the '-with-pthread=INC,LIB' - (or '--with-pthread=DIR') flag to the configure script. - For further information, see: - - https://support.hdfgroup.org/releases/hdf5/documentation/gen_topics/Questions+about+thread-safety+and+concurrent+access - - The high-level, C++, Fortran and Java interfaces are not compatible - with the thread-safety option because the lock is not hoisted - into the higher-level API calls. - Unless --enable-unsupported has been specified on the configure line, - the following options must be disabled: - --enable-hl, --enable-cxx, --enable-fortran, --enable-java - - - 3.11. Backward compatibility - The 1.17 version of the HDF5 library can be configured to operate - identically to the v1.16 library with the - --with-default-api-version=v116 - configure flag, or identically to the v1.14 library with the - --with-default-api-version=v114 - configure flag, or identically to the v1.12 library with the - --with-default-api-version=v112 - configure flag, or identically to the v1.10 library with the - --with-default-api-version=v110 - configure flag, or identically to the v1.8 library with the - --with-default-api-version=v18 - configure flag, or identically to the v1.6 library with the - --with-default-api-version=v16 - configure flag. This allows existing code to be compiled with the - v1.17 library without requiring immediate changes to the application - source code. For additional configuration options and other details, - see "API Compatibility Macros": - - https://hdfgroup.github.io/hdf5/develop/api-compat-macros.html - - 4. Building - The library, confidence tests, and programs can be built by - specifying: - - $ make - - Note that if you have supplied some other make command via the MAKE - variable during the configuration step, that same command must be - used here. - - When using GNU make, you can add `-j -l6' to the make command to - compile in parallel on SMP machines. Do not give a number after - the `-j' since GNU make will turn it off for recursive invocations - of make. - - $ make -j -l6 - - 4. Building doxygen - One can optionally build the doxygen files for the HDF5 C library. - By default, this option is disabled. To build the html files, specify - '--enable-doxygen'. - - $ ./configure --enable-doxygen - - Configuration will halt if the required applications are not available. - To build: - - $ make doxygen - - - 5. Testing - HDF5 comes with various test suites, all of which can be run by - specifying: - - $ make check - - To run only the tests for the library, change to the `test' - directory before issuing the command. Similarly, tests for the - parallel aspects of the library are in `testpar' and tests for - the support programs are in `tools'. - - The `check' consists of two sub-tests, check-s and check-p, which - are for serial and parallel tests, respectively. Since serial tests - and parallel tests must be run with single and multiple processes - respectively, the two sub-tests work nicely for batch systems in - which the number of processes is fixed per batch job. One may submit - one batch job, requesting 1 process, to run all the serial tests by - "make check-s"; and submit another batch job, requesting multiple - processes, to run all the parallel tests by "make check-p". - - Temporary files will be deleted by each test when it completes, - but may continue to exist in an incomplete state if the test - fails. To prevent deletion of the files, define the HDF5_NOCLEANUP - environment variable. - - The HDF5 tests can take a long time to run on some systems. To perform - a faster (but less thorough) test, set the HDF5TestExpress environment - variable to 2 or 3 (with 3 being the shortest run). To perform a - longer test, set HDF5TestExpress to 0. 3 is the default. - - 6. Installing HDF5 - The HDF5 library, include files, and support programs can be - installed by specifying `make install'. The files are installed under the - directory specified with `--prefix=DIR' (or if not specified, in 'hdf5' - in the top directory of the HDF5 source code). They will be - placed in directories named `lib', `include', and `bin'. The directories, - if not existing, will be created automatically, provided the mkdir command - supports the -p option. - - If `make install' fails because the install command at your site - somehow fails, you may use the install-sh that comes with the - source. You will need to run ./configure again. - - $ INSTALL="$PWD/bin/install-sh -c" ./configure ... - $ make install - - If you want to install HDF5 in a location other than the location - specified by the `--prefix=DIR' flag during configuration (or - instead of the default location, `hdf5'), you can do that - by running the deploy script: - - $ bin/deploy NEW_DIR - - This will install HDF5 in NEW_DIR. Alternately, you can do this - manually by issuing the command: - - $ make install prefix=NEW_DIR - - where NEW_DIR is the new directory where you wish to install HDF5. - If you do not use the deploy script, you should run h5redeploy in - NEW_DIR/bin directory. This utility will fix the h5cc, h5fc and - h5c++ scripts to reflect the new NEW_DIR location. - - The library can be used without installing it by pointing the - compiler at the `src' and 'src/.libs' directory for include files and - libraries. However, the minimum which must be installed to make - the library publicly available is: - - The library: - ./src/.libs/libhdf5.a - - The public header files: - ./src/H5*public.h, ./src/H5public.h - ./src/H5FD*.h except ./src/H5FDprivate.h, - ./src/H5api_adpt.h - - The main header file: - ./src/hdf5.h - - The configuration information: - ./src/H5pubconf.h - - The support programs that are useful are: - ./tools/h5ls/h5ls (list file contents) - ./tools/h5dump/h5dump (dump file contents) - ./tools/misc/h5repart (repartition file families) - ./tools/misc/h5debug (low-level file debugging) - ./tools/h5import/h5import (imports data to HDF5 file) - ./tools/h5diff/h5diff (compares two HDF5 files) - ./tools/gifconv/h52gif (HDF5 to GIF converter) - ./tools/gifconv/gif2h5 (GIF to HDF5 converter) - - -======================================================================== -IV. Using the Library -======================================================================== - For information on using HDF5 see the documentation, tutorials and examples - found here: - - https://support.hdfgroup.org/documentation/index.html - - A summary of the features included in the built HDF5 installation can be found - in the libhdf5.settings file in the same directory as the static and/or - shared HDF5 libraries. - - -======================================================================== -V. Windows Configuration and Build -======================================================================== -See RELEASE.txt in the release_notes/ directory for the list of platforms -tested for this release. - -We now recommend that users build, test, and install HDF5 using CMake. - -Instructions for building and testing HDF5 using CMake can be found in the -INSTALL_CMake.txt file found in this folder. - -For instructions on building and testing an application with HDF5, see the -USING_HDF5_CMake.txt file found in this folder. - -Users who want to build and run an application with HDF5 in Visual Studio -without using CMake should consult the USING_HDF5_VS.txt file. - - diff --git a/src/H5build_settings.autotools.c.in b/src/H5build_settings.autotools.c.in deleted file mode 100644 index 67bd023b961..00000000000 --- a/src/H5build_settings.autotools.c.in +++ /dev/null @@ -1,118 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "H5private.h" - -H5_GCC_DIAG_OFF("larger-than=") -H5_CLANG_DIAG_OFF("overlength-strings") - -const char H5build_settings[]= - " SUMMARY OF THE HDF5 CONFIGURATION\n" - " =================================\n" - "\n" - "General Information:\n" - "-------------------\n" - " HDF5 Version: @H5_VERSION@\n" - " Configured on: @CONFIG_DATE@\n" - " Configured by: @CONFIG_USER@\n" - " Host system: @host_cpu@-@host_vendor@-@host_os@\n" - " Uname information: @UNAME_INFO@\n" - " Byte sex: @BYTESEX@\n" - " Installation point: @prefix@\n" - "\n" - "Compiling Options:\n" - "------------------\n" - " Build Mode: @BUILD_MODE@\n" - " Debugging Symbols: @SYMBOLS@\n" - " Asserts: @ASSERTS@\n" - " Profiling: @PROFILING@\n" - " Optimization Level: @OPTIMIZATION@\n" - "\n" - "Linking Options:\n" - "----------------\n" - " Libraries: @STATIC_SHARED@\n" - " Statically Linked Executables: @LT_STATIC_EXEC@\n" - " LDFLAGS: @LDFLAGS@\n" - " H5_LDFLAGS: @H5_LDFLAGS@\n" - " AM_LDFLAGS: @AM_LDFLAGS@\n" - " Extra libraries: @LIBS@\n" - " Archiver: @AR@\n" - " AR_FLAGS: @AR_FLAGS@\n" - " Ranlib: @RANLIB@\n" - "\n" - "Languages:\n" - "----------\n" - " C: yes\n" - " C Compiler: @CC_VERSION@\n" - " CPPFLAGS: @CPPFLAGS@\n" - " H5_CPPFLAGS: @H5_CPPFLAGS@\n" - " AM_CPPFLAGS: @AM_CPPFLAGS@\n" - " C Flags: @CFLAGS@\n" - " H5 C Flags: @H5_CFLAGS@\n" - " AM C Flags: @AM_CFLAGS@\n" - " Shared C Library: @enable_shared@\n" - " Static C Library: @enable_static@\n" - "\n" - "\n" - " Fortran: @HDF_FORTRAN@\n" -@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Fortran Compiler: @FC_VERSION@\n" -@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Fortran Flags: @FCFLAGS@\n" -@BUILD_FORTRAN_CONDITIONAL_TRUE@ " H5 Fortran Flags: @H5_FCFLAGS@\n" -@BUILD_FORTRAN_CONDITIONAL_TRUE@ " AM Fortran Flags: @AM_FCFLAGS@\n" -@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Shared Fortran Library: @H5_FORTRAN_SHARED@\n" -@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Static Fortran Library: @enable_static@\n" -@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Module Directory: @fmoddir@\n" - "\n" - " C++: @HDF_CXX@\n" -@BUILD_CXX_CONDITIONAL_TRUE@ " C++ Compiler: @CXX_VERSION@\n" -@BUILD_CXX_CONDITIONAL_TRUE@ " C++ Flags: @CXXFLAGS@\n" -@BUILD_CXX_CONDITIONAL_TRUE@ " H5 C++ Flags: @H5_CXXFLAGS@\n" -@BUILD_CXX_CONDITIONAL_TRUE@ " AM C++ Flags: @AM_CXXFLAGS@\n" -@BUILD_CXX_CONDITIONAL_TRUE@ " Shared C++ Library: @enable_shared@\n" -@BUILD_CXX_CONDITIONAL_TRUE@ " Static C++ Library: @enable_static@\n" - "\n" - " Java: @HDF_JAVA@\n" -@BUILD_JAVA_CONDITIONAL_TRUE@ " Java Compiler: @JAVA_VERSION@\n" - "\n" - "\n" - "Features:\n" - "---------\n" - " Parallel HDF5: @PARALLEL@\n" - " Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@\n" - " Large Parallel I/O: @LARGE_PARALLEL_IO@\n" - " High-level library: @HDF5_HL@\n" - "Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@\n" - " Build HDF5 Tests: @HDF5_TESTS@\n" - " Build HDF5 Tools: @HDF5_TOOLS@\n" - " Build GIF Tools: @HDF5_HL_GIF_TOOLS@\n" - " Threads: @THREADS@\n" - " Threadsafety: @THREADSAFE@\n" - " Default API mapping: @DEFAULT_API_VERSION@\n" - " With deprecated public symbols: @DEPRECATED_SYMBOLS@\n" - " I/O filters (external): @EXTERNAL_FILTERS@\n" - " _Float16 support: @HAVE__FLOAT16@\n" - " Map (H5M) API: @MAP_API@\n" - " Direct VFD: @DIRECT_VFD@\n" - " Mirror VFD: @MIRROR_VFD@\n" - " Subfiling VFD: @SUBFILING_VFD@\n" - " (Read-Only) S3 VFD: @ROS3_VFD@\n" - " (Read-Only) HDFS VFD: @HAVE_LIBHDFS@\n" - " Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@\n" - " API tracing: @TRACE_API@\n" - " Using memory checker: @USINGMEMCHECKER@\n" - " Use file locking: @DESIRED_FILE_LOCKING@\n" - " Strict file format checks: @STRICT_FORMAT_CHECKS@\n" - " Optimization instrumentation: @INSTRUMENT_LIBRARY@\n" -; - -H5_GCC_DIAG_ON("larger-than=") -H5_CLANG_DIAG_OFF("overlength-strings") diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 1ae1119c758..00000000000 --- a/src/Makefile.am +++ /dev/null @@ -1,208 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am -include $(top_srcdir)/config/lt_vers.am - -# Our main target, the HDF5 library -lib_LTLIBRARIES=libhdf5.la - -# Add libtool numbers to the HDF5 library (from config/lt_vers.am) -libhdf5_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) - -# These files are generated by configure, and should be cleaned -DISTCLEANFILES=H5pubconf.h H5build_settings.c - -# library sources -libhdf5_la_SOURCES= H5.c H5build_settings.c H5checksum.c H5dbg.c H5system.c \ - H5timer.c H5trace.c \ - H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c H5Atest.c \ - H5AC.c H5ACdbg.c H5ACproxy_entry.c \ - H5B.c H5Bcache.c H5Bdbg.c \ - H5B2.c H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2internal.c \ - H5B2leaf.c H5B2stat.c H5B2test.c \ - H5C.c H5Cdbg.c H5Centry.c H5Cepoch.c H5Cimage.c H5Cint.c \ - H5Clog.c H5Clog_json.c H5Clog_trace.c \ - H5Cprefetched.c H5Cquery.c H5Ctag.c H5Ctest.c \ - H5CX.c \ - H5D.c H5Dbtree.c H5Dbtree2.c H5Dchunk.c H5Dcompact.c H5Dcontig.c \ - H5Ddbg.c H5Ddeprec.c H5Dearray.c H5Defl.c H5Dfarray.c H5Dfill.c \ - H5Dint.c H5Dio.c H5Dlayout.c H5Dnone.c H5Doh.c H5Dscatgath.c \ - H5Dselect.c H5Dsingle.c H5Dtest.c H5Dvirtual.c \ - H5E.c H5Edeprec.c H5Eint.c \ - H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c \ - H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c \ - H5ES.c H5ESevent.c H5ESint.c H5ESlist.c \ - H5F.c H5Faccum.c H5Fcwfs.c H5Fdbg.c H5Fdeprec.c H5Fefc.c H5Ffake.c \ - H5Fint.c H5Fio.c H5Fmount.c H5Fquery.c H5Fsfile.c H5Fspace.c \ - H5Fsuper.c H5Fsuper_cache.c H5Ftest.c \ - H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \ - H5FAint.c H5FAstat.c H5FAtest.c \ - H5FD.c H5FDcore.c H5FDfamily.c H5FDint.c H5FDlog.c H5FDmulti.c \ - H5FDonion.c H5FDonion_header.c H5FDonion_history.c H5FDonion_index.c \ - H5FDperform.c H5FDsec2.c H5FDspace.c \ - H5FDsplitter.c H5FDstdio.c H5FDtest.c H5FDwindows.c \ - H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSint.c H5FSsection.c \ - H5FSstat.c H5FStest.c \ - H5G.c H5Gbtree2.c H5Gcache.c H5Gcompact.c H5Gdense.c H5Gdeprec.c \ - H5Gent.c H5Gint.c H5Glink.c H5Gloc.c H5Gname.c H5Gnode.c H5Gobj.c \ - H5Goh.c H5Groot.c H5Gstab.c H5Gtest.c H5Gtraverse.c \ - H5HF.c H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \ - H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFiter.c H5HFman.c H5HFsection.c \ - H5HFspace.c H5HFstat.c H5HFtest.c H5HFtiny.c \ - H5HG.c H5HGcache.c H5HGdbg.c H5HGquery.c \ - H5HL.c H5HLcache.c H5HLdbg.c H5HLint.c H5HLprfx.c H5HLdblk.c \ - H5I.c H5Idbg.c H5Iint.c H5Itest.c \ - H5L.c H5Ldeprec.c H5Lexternal.c H5Lint.c \ - H5M.c \ - H5MF.c H5MFaggr.c H5MFdbg.c H5MFsection.c \ - H5MM.c \ - H5O.c H5Odeprec.c H5Oainfo.c H5Oalloc.c H5Oattr.c H5Oattribute.c \ - H5Obogus.c H5Obtreek.c H5Ocache.c H5Ocache_image.c H5Ochunk.c \ - H5Ocont.c H5Ocopy.c H5Ocopy_ref.c H5Odbg.c H5Odrvinfo.c H5Odtype.c \ - H5Oefl.c H5Ofill.c H5Oflush.c H5Ofsinfo.c H5Oginfo.c H5Oint.c \ - H5Olayout.c H5Olinfo.c H5Olink.c H5Omessage.c H5Omtime.c H5Oname.c \ - H5Onull.c H5Opline.c H5Orefcount.c H5Osdspace.c H5Oshared.c \ - H5Oshmesg.c H5Ostab.c H5Otest.c H5Ounknown.c \ - H5P.c H5Pacpl.c H5Pdapl.c H5Pdcpl.c H5Pdeprec.c H5Pdxpl.c H5Pencdec.c \ - H5Pfapl.c H5Pfcpl.c H5Pfmpl.c H5Pgcpl.c H5Pint.c H5Plapl.c H5Plcpl.c \ - H5Pmapl.c H5Pmcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \ - H5PB.c \ - H5PL.c H5PLint.c H5PLpath.c H5PLplugin_cache.c \ - H5R.c H5Rdeprec.c H5Rint.c \ - H5UC.c \ - H5RS.c \ - H5S.c H5Sall.c H5Sdbg.c H5Sdeprec.c H5Shyper.c H5Snone.c H5Spoint.c \ - H5Sselect.c H5Stest.c \ - H5SL.c \ - H5SM.c H5SMbtree2.c H5SMcache.c H5SMmessage.c H5SMtest.c \ - H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c H5Tcompound.c H5Tconv.c \ - H5Tconv_integer.c H5Tconv_float.c H5Tconv_string.c H5Tconv_bitfield.c \ - H5Tconv_compound.c H5Tconv_reference.c H5Tconv_enum.c H5Tconv_vlen.c H5Tconv_array.c \ - H5Tcset.c H5Tdbg.c H5Tdeprec.c H5Tenum.c H5Tfields.c H5Tfixed.c \ - H5Tfloat.c H5Tinit_float.c H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c \ - H5Torder.c H5Tref.c H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvisit.c \ - H5Tvlen.c \ - H5TS.c H5TSatomic.c H5TSbarrier.c H5TSc11.c H5TScond.c \ - H5TSint.c H5TSkey.c H5TSmutex.c H5TSonce.c H5TSpool.c H5TSpthread.c \ - H5TSrec_rwlock.c H5TSrwlock.c H5TSsemaphore.c H5TSthread.c H5TSwin.c \ - H5VL.c H5VLcallback.c H5VLdyn_ops.c H5VLint.c H5VLnative.c \ - H5VLnative_attr.c H5VLnative_blob.c H5VLnative_dataset.c \ - H5VLnative_datatype.c H5VLnative_file.c H5VLnative_group.c \ - H5VLnative_link.c H5VLnative_introspect.c H5VLnative_object.c \ - H5VLnative_token.c H5VLpassthru.c H5VLpassthru_int.c H5VLquery.c \ - H5VLtest.c \ - H5VM.c H5WB.c H5Z.c \ - H5Zdeflate.c H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zscaleoffset.c \ - H5Zszip.c H5Ztrans.c - -# Only compile parallel sources if necessary -if BUILD_PARALLEL_CONDITIONAL - libhdf5_la_SOURCES += H5mpi.c H5ACmpio.c H5Cmpio.c H5Dmpio.c H5Fmpi.c H5FDmpi.c H5FDmpio.c H5Smpio.c -endif - -# Only compile the subfiling VFD if necessary -if SUBFILING_VFD_CONDITIONAL - libhdf5_la_SOURCES += H5FDsubfiling/H5FDsubfiling.c \ - H5FDsubfiling/H5FDsubfile_int.c \ - H5FDsubfiling/H5FDioc.c \ - H5FDsubfiling/H5FDioc_int.c \ - H5FDsubfiling/H5FDioc_threads.c \ - H5FDsubfiling/H5subfiling_common.c -endif - -# Only compile the direct VFD if necessary -if DIRECT_VFD_CONDITIONAL - libhdf5_la_SOURCES += H5FDdirect.c -endif - -# Only compile the read-only HDFS VFD if necessary -if HDFS_VFD_CONDITIONAL - libhdf5_la_SOURCES += H5FDhdfs.c -endif - -# Only compile the mirror VFD if necessary -if MIRROR_VFD_CONDITIONAL - libhdf5_la_SOURCES += H5FDmirror.c -endif - -# Only compile the read-only S3 VFD if necessary -if ROS3_VFD_CONDITIONAL - libhdf5_la_SOURCES += H5FDros3.c H5FDs3comms.c -endif - -# Public headers -include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5version.h \ - H5Apublic.h H5ACpublic.h \ - H5Cpublic.h H5Dpublic.h \ - H5Epubgen.h H5Epublic.h H5ESpublic.h H5Fpublic.h \ - H5FDpublic.h H5FDcore.h H5FDdirect.h H5FDfamily.h H5FDhdfs.h \ - H5FDlog.h H5FDmirror.h H5FDmpi.h H5FDmpio.h H5FDmulti.h \ - H5FDonion.h H5FDros3.h H5FDsec2.h H5FDsplitter.h \ - H5FDstdio.h H5FDsubfiling/H5FDsubfiling.h H5FDsubfiling/H5FDioc.h \ - H5FDwindows.h \ - H5Gpublic.h H5Ipublic.h H5Lpublic.h \ - H5Mpublic.h H5MMpublic.h H5Opublic.h H5Ppublic.h \ - H5PLextern.h H5PLpublic.h \ - H5Rpublic.h H5Spublic.h H5Tpublic.h \ - H5VLconnector.h H5VLconnector_passthru.h \ - H5VLnative.h H5VLpassthru.h H5VLpublic.h \ - H5Zpublic.h - -# Public component author headers -include_HEADERS += H5ESdevelop.h H5FDdevelop.h H5Idevelop.h H5Ldevelop.h \ - H5Tdevelop.h H5TSdevelop.h H5Zdevelop.h - -# install libhdf5.settings in lib directory -settingsdir=$(libdir) -settings_DATA=libhdf5.settings - -# Error header generation -# -# Actually, H5Einit.h, H5Eterm.h, H5Edefin.h, H5Emajdef.h, H5Emindef.h, -# and H5Epubgen.h all depend on H5err.txt, but the perl script generates them -# all, so just list one here. -$(top_srcdir)/src/H5Edefin.h: $(top_srcdir)/src/H5err.txt - perl $(top_srcdir)/bin/make_err $? - -# API version macro generation -$(top_srcdir)/src/H5version.h: $(top_srcdir)/src/H5vers.txt - perl $(top_srcdir)/bin/make_vers $? - -# Assignment overflow macro generation -$(top_srcdir)/src/H5overflow.h: $(top_srcdir)/src/H5overflow.txt - perl $(top_srcdir)/bin/make_overflow $? - -# Add TRACE macros to library source files. This is done via the trace script -# in the hdf5/bin directory. If the file contains HDF5 API macros, a "clean" -# version of the source file is saved with a tilde (~) after its name and -# tracing information is inserted. trace should have no effect on files -# without HDF5 macros. - -trace: $(libhdf5_la_SOURCES) - @for dep in $? dummy; do \ - if test $$dep != "dummy" -a -n "$(PERL)"; then \ - case "$$dep" in \ - *.c) \ - $(TRACE) $$dep; \ - ;; \ - esac; \ - fi; \ - done - -include $(top_srcdir)/config/conclude.am - diff --git a/src/libhdf5.settings.autotools.in b/src/libhdf5.settings.autotools.in deleted file mode 100644 index f04cca78e23..00000000000 --- a/src/libhdf5.settings.autotools.in +++ /dev/null @@ -1,96 +0,0 @@ - SUMMARY OF THE HDF5 CONFIGURATION - ================================= - -General Information: -------------------- - HDF5 Version: @H5_VERSION@ - Configured on: @CONFIG_DATE@ - Configured by: @CONFIG_USER@ - Host system: @host_cpu@-@host_vendor@-@host_os@ - Uname information: @UNAME_INFO@ - Byte sex: @BYTESEX@ - Installation point: @prefix@ - -Compiling Options: ------------------- - Build Mode: @BUILD_MODE@ - Debugging Symbols: @SYMBOLS@ - Asserts: @ASSERTS@ - Profiling: @PROFILING@ - Optimization Level: @OPTIMIZATION@ - -Linking Options: ----------------- - Libraries: @STATIC_SHARED@ - Statically Linked Executables: @LT_STATIC_EXEC@ - LDFLAGS: @LDFLAGS@ - H5_LDFLAGS: @H5_LDFLAGS@ - AM_LDFLAGS: @AM_LDFLAGS@ - Extra libraries: @LIBS@ - Archiver: @AR@ - AR_FLAGS: @AR_FLAGS@ - Ranlib: @RANLIB@ - -Languages: ----------- - C: yes - C Compiler: @CC_VERSION@ - CPPFLAGS: @CPPFLAGS@ - H5_CPPFLAGS: @H5_CPPFLAGS@ - AM_CPPFLAGS: @AM_CPPFLAGS@ - C Flags: @CFLAGS@ - H5 C Flags: @H5_CFLAGS@ - AM C Flags: @AM_CFLAGS@ - Shared C Library: @enable_shared@ - Static C Library: @enable_static@ - - - Fortran: @HDF_FORTRAN@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @FC_VERSION@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @FCFLAGS@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Shared Fortran Library: @H5_FORTRAN_SHARED@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: @enable_static@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Module Directory: @fmoddir@ - - C++: @HDF_CXX@ -@BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CXX_VERSION@ -@BUILD_CXX_CONDITIONAL_TRUE@ C++ Flags: @CXXFLAGS@ -@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @H5_CXXFLAGS@ -@BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@ -@BUILD_CXX_CONDITIONAL_TRUE@ Shared C++ Library: @enable_shared@ -@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: @enable_static@ - - Java: @HDF_JAVA@ -@BUILD_JAVA_CONDITIONAL_TRUE@ Java Compiler: @JAVA_VERSION@ - - -Features: ---------- - Parallel HDF5: @PARALLEL@ - Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@ - Large Parallel I/O: @LARGE_PARALLEL_IO@ - High-level library: @HDF5_HL@ -Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@ - Build HDF5 Tests: @HDF5_TESTS@ - Build HDF5 Tools: @HDF5_TOOLS@ - Build GIF Tools: @HDF5_HL_GIF_TOOLS@ - Threads: @THREADS@ - Threadsafety: @THREADSAFE@ - Default API mapping: @DEFAULT_API_VERSION@ - With deprecated public symbols: @DEPRECATED_SYMBOLS@ - I/O filters (external): @EXTERNAL_FILTERS@ - _Float16 support: @HAVE__FLOAT16@ - Map (H5M) API: @MAP_API@ - Direct VFD: @DIRECT_VFD@ - Mirror VFD: @MIRROR_VFD@ - Subfiling VFD: @SUBFILING_VFD@ - (Read-Only) S3 VFD: @ROS3_VFD@ - (Read-Only) HDFS VFD: @HAVE_LIBHDFS@ - Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@ - API tracing: @TRACE_API@ - Using memory checker: @USINGMEMCHECKER@ - Use file locking: @DESIRED_FILE_LOCKING@ - Strict file format checks: @STRICT_FORMAT_CHECKS@ - Optimization instrumentation: @INSTRUMENT_LIBRARY@ diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index b15e36d3f91..00000000000 --- a/test/Makefile.am +++ /dev/null @@ -1,255 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Library Test Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src - -# Test scripts-- -# test_abort_fail.sh: filenotclosed.c and del_many_dense_attrs.c -# test_check_version.sh: tcheck_version -# test_error.sh: err_compat, error_test -# test_external_env.sh: external_env -# test_flush_refresh.sh: flushrefresh -# test_libinfo.sh: -# test_links_env.sh: links_env -# test_mirror.sh: mirror_vfd ../utils/mirror_vfd/* -# test_plugin.sh: filter_plugin.c vfd_plugin.c vol_plugin.c -# test_swmr.sh: swmr* -# test_vds_env.sh: vds_env -# test_vds_swmr.sh: vds_swmr* -# test_use_cases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes -TEST_SCRIPT = test_abort_fail.sh test_check_version.sh test_error.sh \ - test_flush_refresh.sh test_external_env.sh test_libinfo.sh \ - test_links_env.sh test_swmr.sh test_vds_env.sh test_vds_swmr.sh \ - test_use_cases.sh -SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) \ - external_env$(EXEEXT) filenotclosed$(EXEEXT) del_many_dense_attrs$(EXEEXT) \ - flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \ - swmr_generator$(EXEEXT) swmr_reader$(EXEEXT) swmr_writer$(EXEEXT) \ - swmr_remove_reader$(EXEEXT) swmr_remove_writer$(EXEEXT) swmr_addrem_writer$(EXEEXT) \ - swmr_sparse_reader$(EXEEXT) swmr_sparse_writer$(EXEEXT) swmr_start_write$(EXEEXT) \ - vds_env$(EXEEXT) vds_swmr_gen$(EXEEXT) vds_swmr_reader$(EXEEXT) vds_swmr_writer$(EXEEXT) -if HAVE_SHARED_CONDITIONAL - TEST_SCRIPT += test_plugin.sh - SCRIPT_DEPEND += filter_plugin$(EXEEXT) vfd_plugin $(EXEEXT) vol_plugin$(EXEEXT) -endif -if MIRROR_VFD_CONDITIONAL - TEST_SCRIPT += test_mirror.sh -endif - -check_SCRIPTS = $(TEST_SCRIPT) - -# These are our main targets. They should be listed in the order to be -# executed, generally most specific tests to least specific tests. -# As an exception, long-running tests should occur earlier in the list. -# This gives them more time to run when tests are executing in parallel. -TEST_PROG= testhdf5 \ - cache cache_api cache_image cache_tagging lheap ohdr \ - stab gheap evict_on_close farray earray btree2 fheap \ - accum hyperslab istore bittests dt_arith page_buffer \ - dtypes dsets chunk_info cmpd_dset mdset cmpd_dtransform filter_fail extend direct_chunk \ - external efc objcopy objcopy_ref links unlink twriteorder big mtime \ - fillval mount select_io_dset\ - flush1 flush2 app_ref enum set_extent ttsafe enc_dec_plist \ - enc_dec_plist_cross_platform getname vfd ros3 s3comms hdfs ntypes \ - dangle dtransform reserved cross_read freespace mf vds file_image \ - unregister cache_logging cork swmr vol timer event_set onion - -# List programs to be built when testing here -# -# error_test and err_compat are built at the same time as the other tests, but executed by test_error.sh -# tcheck_version is used by test_check_version.sh -# accum_swmr_reader is used by accum.c -# atomic_writer and atomic_reader are stand-alone programs -# links_env is used by test_links_env.sh -# external_env is used by test_external_env.sh -# filenotclosed and del_many_dense_attrs are used by test_abort_fail.sh -# flushrefresh is used by test_flush_refresh.sh -# use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_use_cases.sh -# swmr_* files (besides swmr.c) are used by test_swmr.sh -# vds_swmr_* files are used by test_vds_swmr.sh -# vds_env is used by test_vds_env.sh -# mirror_vfd is used by test_mirror.sh -# -# 'make check' doesn't run them directly, so they are not included in TEST_PROG. -# -# Also build testmeta, which is used for the timing test. It builds quickly -# and this lets automake keep all its test programs in one place. -check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \ - testmeta accum_swmr_reader atomic_writer atomic_reader external_env \ - links_env filenotclosed del_many_dense_attrs flushrefresh \ - use_append_chunk use_append_chunk_mirror use_append_mchunks use_disable_mdc_flushes \ - swmr_generator swmr_start_write swmr_reader swmr_writer swmr_remove_reader \ - swmr_remove_writer swmr_addrem_writer swmr_sparse_reader swmr_sparse_writer \ - vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer -if HAVE_SHARED_CONDITIONAL - check_PROGRAMS+= filter_plugin vfd_plugin vol_plugin -endif -if MIRROR_VFD_CONDITIONAL - check_PROGRAMS+= mirror_vfd -endif - -# These programs generate test files for the tests. They don't need to be -# compiled every time we want to test the library. However, putting -# them in a conditional causes automake to generate rules so that they -# can be built by hand. They can also be built by specifying -# --enable-build-all at configure time. -# The gen_old_* files can only be compiled with older versions of the library -# so do not appear in this list. -BUILD_ALL_PROGS=gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_new_array \ - gen_new_fill gen_new_group gen_new_mtime gen_new_super gen_noencoder \ - gen_nullspace gen_udlinks space_overflow gen_filespace gen_specmetaread \ - gen_sizes_lheap gen_file_image gen_plist gen_bad_offset gen_bounds - -if BUILD_ALL_CONDITIONAL - noinst_PROGRAMS=$(BUILD_ALL_PROGS) -endif - -if HAVE_SHARED_CONDITIONAL - # The libh5test library provides common support code for the tests. - # The filter_plugin* libraries are for use in filter_plugin.c. - # Build them as shared libraries if that option was enabled in configure. - noinst_LTLIBRARIES=libh5test.la libfilter_plugin1_dsets.la libfilter_plugin2_dsets.la libfilter_plugin3_dsets.la libfilter_plugin4_groups.la libnull_vfd_plugin.la libnull_vol_connector.la - libfilter_plugin1_dsets_la_SOURCES=filter_plugin1_dsets.c - libfilter_plugin2_dsets_la_SOURCES=filter_plugin2_dsets.c - libfilter_plugin3_dsets_la_SOURCES=filter_plugin3_dsets.c - libfilter_plugin4_groups_la_SOURCES=filter_plugin4_groups.c - libfilter_plugin1_dsets_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere - libfilter_plugin2_dsets_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere - libfilter_plugin3_dsets_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere - libfilter_plugin4_groups_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere - libfilter_plugin3_dsets_la_LIBADD=$(LIBHDF5) - libfilter_plugin4_groups_la_LIBADD=$(LIBHDF5) - - # VFD plugin test libraries - # - # null_vfd_plugin is used for testing basic VFD plugin functionality. - libnull_vfd_plugin_la_SOURCES=null_vfd_plugin.c - libnull_vfd_plugin_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere - - # VOL plugin test libraries - # - # null_vol_connector is used for testing basic VOL plugin functionality. - libnull_vol_connector_la_SOURCES=null_vol_connector.c - libnull_vol_connector_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere - -else - # The libh5test library provides common support code for the tests. - noinst_LTLIBRARIES=libh5test.la -endif - -libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c external_common.c - -# Use libh5test.la to compile all of the tests -LDADD=libh5test.la $(LIBHDF5) - -# List the source files for tests that have more than one -ttsafe_SOURCES=ttsafe.c ttsafe_acreate.c ttsafe_atomic.c ttsafe_attr_vlen.c \ - ttsafe_cancel.c ttsafe_dcreate.c ttsafe_develop.c ttsafe_error.c \ - ttsafe_rwlock.c ttsafe_rec_rwlock.c ttsafe_semaphore.c \ - ttsafe_thread_id.c ttsafe_thread_pool.c ttsafe_error_stacks.c -cache_image_SOURCES=cache_image.c genall5.c -mirror_vfd_SOURCES=mirror_vfd.c genall5.c - -# Additional target for running timing test -timings _timings: testmeta - @for timing in $(TIMINGS) dummy; do \ - if test $$timing != dummy; then \ - echo "Running $$timing $(TEST_FLAGS)"; \ - $(RUNEXEC) ./$$timing $(TEST_FLAGS) || exit 1; \ - fi; \ - done; - -# The flush1 test must run before the flush2 test -flush2.chkexe_: flush1.chkexe_ - -# Temporary files. These files are the ones created by setting the -# HDF5_NOCLEANUP environment variable and running `make test' without -# specifying a file prefix or low-level driver. Changing the file -# prefix or low-level driver with environment variables will influence -# the temporary file name in ways that the makefile is not aware of. -CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 mdset.h5 compact_dataset.h5 dataset.h5 dset_offset.h5 \ - max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \ - huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_fast.h5 chunk_expand.h5 \ - chunk_fixed.h5 copy_dcpl_newfile.h5 partial_chunks.h5 layout_extend.h5 \ - zero_chunk.h5 chunk_single.h5 swmr_non_latest.h5 \ - earray_hdr_fd.h5 farray_hdr_fd.h5 bt2_hdr_fd.h5 \ - storage_size.h5 dls_01_strings.h5 power2up.h5 version_bounds.h5 \ - alloc_0sized.h5 h5s_block.h5 h5s_plist.h5 \ - extend.h5 istore.h5 extlinks*.h5 frspace.h5 links*.h5 \ - sys_file1 tfile[1-8].h5 th5s[1-4].h5 lheap.h5 fheap.h5 ohdr.h5 \ - stab.h5 extern_[1-5].h5 extern_[1-4][rw].raw gheap[0-4].h5 \ - ohdr_min_a.h5 ohdr_min_b.h5 min_dset_ohdr_testfile.h5 \ - dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 \ - tmp tmp_links tmp2_links tmp_links_env tmp_vds tmp_vds_env \ - big.data big[0-9][0-9][0-9][0-9][0-9].h5 \ - stdio.h5 sec2.h5 dtypes[0-9].h5 dtypes1[0].h5 dt_arith[1-2].h5 tattr.h5 \ - tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \ - fillval_[0-9].h5 fillval.raw mount_[0-9].h5 testmeta.h5 ttime.h5 \ - trefer[1-3].h5 trefer_*.h5 tvltypes.h5 tvlstr.h5 tvlstr2.h5 twriteorder.dat \ - flush.h5 flush-swmr.h5 noflush.h5 noflush-swmr.h5 flush_extend.h5 \ - flush_extend-swmr.h5 noflush_extend.h5 noflush_extend-swmr.h5 \ - enum1.h5 titerate.h5 ttsafe.h5 tarray1.h5 tgenprop.h5 \ - tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin \ - getname.h5 getname[1-3].h5 sec2_file.h5 direct_file.h5 \ - family_file000[0-3][0-9].h5 new_family_v16-000[0-3][0-9].h5 \ - multi_file-[rs].h5 core_file filter_plugin.h5 \ - new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 \ - dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \ - unlink_chunked.h5 btree2.h5 btree2_tmp.h5 objcopy_src.h5 objcopy_dst.h5 \ - objcopy_ext.dat app_ref.h5 farray.h5 farray_tmp.h5 \ - earray.h5 earray_tmp.h5 efc[0-5].h5 log_vfd_out.log log_ros3_out.log \ - log_s3comms_out.log new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \ - split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \ - file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5 \ - vds_virt.h5 vds_dapl.h5 vds_src_[0-1].h5 \ - swmr_data.h5 use_use_append_chunk.h5 use_append_mchunks.h5 \ - use_disable_mdc_flushes.h5 flushrefresh.h5 flushrefresh_VERIFICATION_START \ - flushrefresh_VERIFICATION_CHECKPOINT1 flushrefresh_VERIFICATION_CHECKPOINT2 \ - flushrefresh_VERIFICATION_DONE filenotclosed.h5 del_many_dense_attrs.h5 \ - atomic_data accum_swmr_big.h5 ohdr_swmr.h5 \ - test_swmr*.h5 cache_logging.h5 cache_logging.out vds_swmr.h5 vds_swmr_src_*.h5 \ - swmr[0-2].h5 swmr_writer.out swmr_writer.log.* swmr_reader.out.* swmr_reader.log.* \ - tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 native_vol_test.h5 \ - splitter*.h5 splitter.log mirror_rw mirror_ro event_set_[0-9].h5 \ - cmpd_dtransform.h5 single_latest.h5 source_file.h5 stdio_file.h5 \ - tfile_is_accessible.h5 tfile_is_accessible_non_hdf5.h5 tverbounds_dtype.h5 \ - virtual_file1.h5 tfile_double_open.h5 tfile_incr_filesize.h5 flushrefresh_test - -# Sources for testhdf5 executable -testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ - tgenprop.c th5o.c th5s.c th5_system.c tcoords.c tid.c titerate.c tmeta.c tmisc.c \ - trefer.c trefer_deprec.c trefstr.c tselect.c tskiplist.c tsohm.c ttime.c tunicode.c \ - tvlstr.c tvltypes.c - -# Sources for Use Cases -use_append_chunk_SOURCES=use_append_chunk.c use_common.c -use_append_chunk_mirror_SOURCES=use_append_chunk_mirror.c use_common.c -use_append_mchunks_SOURCES=use_append_mchunks.c use_common.c -use_disable_mdc_flushes_SOURCES=use_disable_mdc_flushes.c - -# Temporary files. -DISTCLEANFILES=test_abort_fail.sh test_check_version.sh test_error.sh test_external_env.sh \ - test_flush_refresh.sh test_libinfo.sh test_links_env.sh test_plugin.sh \ - test_swmr.sh test_use_cases.sh test_vds_env.sh test_vds_swmr.sh -if MIRROR_VFD_CONDITIONAL - DISTCLEANFILES+= test_mirror.sh -endif - -include $(top_srcdir)/config/conclude.am diff --git a/test/test_abort_fail.sh.in b/test/test_abort_fail.sh.in deleted file mode 100644 index 5d5a858222c..00000000000 --- a/test/test_abort_fail.sh.in +++ /dev/null @@ -1,65 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Test to verify that the assertion/abort failure is fixed when the application -# does not close the file. (See HDFFV-10160) -# -# Test to verify that the infinite loop closing library/abort failure is fixed -# when the application creates and removes dense attributes (See HDFFV-10659) - -srcdir=@srcdir@ - -nerrors=0 - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# -# -echo "Testing file not closed assertion/abort failure" -TEST_NAME=filenotclosed # The test name -TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary -# -# Run the test -$RUNSERIAL $TEST_BIN >/dev/null 2>&1 -exitcode=$? -if [ $exitcode -eq 0 ]; then - echo "Test PASSED" -else - echo "Test FAILED" - nerrors="`expr $nerrors + 1`" -fi -# -# -echo "Testing infinite loop closing library/abort failure" -TEST_NAME=del_many_dense_attrs # The test name -TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary -# Run the test -$RUNSERIAL $TEST_BIN >/dev/null 2>&1 -exitcode=$? -if [ $exitcode -eq 0 ]; then - echo "Test PASSED" -else - echo "Test FAILED" - nerrors="`expr $nerrors + 1`" -fi -# -# -if test $nerrors -eq 0 ; then - echo "All tests for abort failure passed." - exit 0 -else - echo "Tests for abort failure failed with $nerrors errors." - exit 1 -fi diff --git a/test/test_check_version.sh.in b/test/test_check_version.sh.in deleted file mode 100644 index c08536de328..00000000000 --- a/test/test_check_version.sh.in +++ /dev/null @@ -1,258 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - -# -# Tests for the H5check_version function. -# - -srcdir=@srcdir@ - -# Variables filled in by the configure process. -# Determine the configure options of the hdf5 library and executables. -Shared_Lib=@enable_shared@ -Static_Lib=@enable_static@ -Static_exec=@STATIC_EXEC@ -h5haveexitcode=yes # default is yes - -CMP='cmp -s' -DIFF='diff -c' -RM='rm -f' - -# Function definitions -# -# Show the purpose of this test script and a note about the abort messages. -PURPOSE() { - echo "Tests for the H5check_version function." - echo "Note that abort messages may appear due to the expected termination" - echo "of the program when it is tested with mis-matched version numbers." -} - -# Print a line-line message left justified in a field of 70 characters. -# -LINEMSG() { - SPACES=" " - echo "$* $SPACES" | cut -c1-70 | tr -d '\012' -} - - -# Print a "SKIP" message -SKIP() { - LINEMSG $* - echo " -SKIP-" -} - - -# Print warning message of version mismatch. -WarnMesg(){ - echo "Warning! ***HDF5 library version mismatched error***" - echo "The HDF5 header files used to compile this application do not match" - echo "the version used by the HDF5 library to which this application is linked." - echo "Data corruption or segmentation faults may occur if the application continues." - echo "This can happen when an application was compiled by one version of HDF5 but" - echo "linked with a different version of static or shared HDF5 library." - echo "You should recompile the application or check your shared library related" - echo "settings such as 'LD_LIBRARY_PATH'." - echo "You can, at your own risk, disable this warning by setting the environment" - echo "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'." - echo "Setting it to 2 or higher will suppress the warning messages totally." - echo "Headers are $xxh5versmajor.$xxh5versminor.$xxh5versrelease, library is $h5versmajor.$h5versminor.$h5versrelease" - test -n "$H5_HAVE_EMBEDDED_LIBINFO" && cat $h5libsettings - echo "Bye..." -} - - -# Print warning message2 of version mismatch. -WarnMesg2(){ - echo "Warning! ***HDF5 library version mismatched error***" - echo "The HDF5 header files used to compile this application do not match" - echo "the version used by the HDF5 library to which this application is linked." - echo "Data corruption or segmentation faults may occur if the application continues." - echo "This can happen when an application was compiled by one version of HDF5 but" - echo "linked with a different version of static or shared HDF5 library." - echo "You should recompile the application or check your shared library related" - echo "settings such as 'LD_LIBRARY_PATH'." - echo "'HDF5_DISABLE_VERSION_CHECK' environment variable is set to 1, application will" - echo "continue at your own risk." - echo "Headers are $xxh5versmajor.$xxh5versminor.$xxh5versrelease, library is $h5versmajor.$h5versminor.$h5versrelease" - test -n "$H5_HAVE_EMBEDDED_LIBINFO" && cat $h5libsettings -} - - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output generated according to the parameter values and compared -# against actual output. -# The expected and actual output files are removed unless $HDF5_NOCLEANUP -# has a non-zero value. -# $1: the set value of $HDF5_DISABLE_VERSION_CHECK. (unset means not to set -# it at all. -# $2: Change the version number(s) to cause a mismatch. (none means no -# mismatch). -# -# Expected results: -# Value of $HDF5_DISABLE_VERSION_CHECK -# unset "" -1 0 1 2 3 -# Matched OK OK OK OK OK OK OK -# Mismatched W/A W/A W/A W/A W2/OK OK W2/OK -# Result codes: -# OK: No warning, exit 0. -# W/A: Warning, abort and exit non-0. -# W2/OK: Different Warning, exit 0. -# -# Implemented only exit code matching. Still need to match output. -TESTING() { - DEBUGPRINT command is $0 $* - TEST_NAME=tcheck_version # The test name - TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary - - expect=${TEST_NAME}_expect.out - actual=${TEST_NAME}_actual.out - actual_err=${TEST_NAME}_actual.err - arguments= - - h5DisableVersion="$1" - wrongversionnumbers="$2" - xxh5versmajor=$h5versmajor - xxh5versminor=$h5versminor - xxh5versrelease=$h5versrelease - - if [ "$h5DisableVersion" = unset ]; then - envcmd="" # noop - else - envcmd="env HDF5_DISABLE_VERSION_CHECK=$h5DisableVersion" - fi - - if [ "$wrongversionnumbers" = none ]; then - # OK: No warning, exit 0 - cp /dev/null $expect - expect_code=0 - else - arguments=-t"$wrongversionnumbers" - # calculate mismatched version numbers by listing. - case $wrongversionnumbers in - "M") xxh5versmajor=`expr $h5versmajor + 1` - ;; - "m") xxh5versminor=`expr $h5versminor + 1` - ;; - "r") xxh5versrelease=`expr $h5versrelease + 1` - ;; - esac - case "$h5DisableVersion" in - 1) - # W2/OK: Different Warning, exit 0. - WarnMesg2 > $expect - expect_code=0 - ;; - [2-9]|[1-9][0-9]*) - # OK: No warning, exit 0 - cp /dev/null $expect - expect_code=0 - ;; - *) # W/A: Warning, abort and exit non-0. - WarnMesg > $expect - expect_code=6 # Signal Abort exit code (128+6) - ;; - esac - fi - - # Run test. - LINEMSG $envcmd $TEST_NAME $arguments - ( - $envcmd $RUNSERIAL $TEST_BIN $arguments - ) >$actual 2>$actual_err - ret_code=$? - cat $actual_err >> $actual - - if [ $h5haveexitcode = 'yes' -a \( $expect_code -ne $ret_code \) ]; then - echo "*FAILED*" - echo " Expected exit code ($expect_code) differs from actual code ($ret_code)" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file. - # Also clean the core file generated by H5check_version's abort. - if test -z "$HDF5_NOCLEANUP"; then - $RM $expect $actual $actual_err - $RM core - fi -} - - -# Echo parameters for debugging if verbose mode is on. -DEBUGPRINT() { - if [ -n "$debugmode" ]; then - echo $* - fi -} - - -# MAIN Body -nerrors=0 -verbose=yes # default on -debugmode= # default off -H5_HAVE_EMBEDDED_LIBINFO=`grep '#define H5_HAVE_EMBEDDED_LIBINFO ' ../src/H5pubconf.h` -h5libsettings=../src/libhdf5.settings - -PURPOSE - -# Figure out library version numbers from the header file. -h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | awk '{print $3}'` -h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | awk '{print $3}'` -h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | awk '{print $3}'` -DEBUGPRINT $h5versmajor.$h5versminor.$h5versrelease -case "$h5versmajor$h5versminor$h5versrelease" in - [0-9]*) # good. noop. - ;; - *) - echo "Illegal library version numbers($h5versmajor.$h5versminor.$h5versrelease)" - echo "Test aborted" - exit 1 - ;; -esac - -# RUNSERIAL is used. Check if it can return exit code from executalbe correctly. -if [ -n "$RUNSERIAL_NOEXITCODE" ]; then - echo "***Warning*** Serial Exit Code is not passed back to shell correctly." - echo "***Warning*** Exit code checking is skipped." - h5haveexitcode=no -fi - -# Three Categories of tests: -# Normal: where the version numbers all matched (wrong_version == none). -# Mismatched version numbers (could be Major or minor version -# or release numbers or a combination of all three.) -# Test all the above with different values of the environment variable, -# HDF5_DISABLE_VERSION_CHECK, as unset, "", -1, 0, 1, 2, 3 - -for val_disable_version_check in unset "" -1 0 1 2 3; do - for wrong_version in none M m; do - TESTING "$val_disable_version_check" "$wrong_version" - done -done - - -# Check and report results. -if [ $nerrors -gt 0 ]; then - echo "***$nerrors errors encountered***" - exit 1 -else - echo "No error encountered" - exit 0 -fi diff --git a/test/test_error.sh.in b/test/test_error.sh.in deleted file mode 100644 index 3657a7c1ad1..00000000000 --- a/test/test_error.sh.in +++ /dev/null @@ -1,125 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for test_error and err_compat - -srcdir=@srcdir@ - -# Check if backward compatibility options are enabled -DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@" - -CMP='cmp -s' -DIFF='diff -c' - -# Skip plugin module to test missing filter -# Also reset the VOL connector to only use the native connector, because of the -# error stack checking. QAK - 2019/03/09 -ENVCMD="env HDF5_PLUGIN_PRELOAD=:: HDF5_VOL_CONNECTOR=native" - -nerrors=0 -verbose=yes - -test -d ./testfiles || mkdir ./testfiles - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -TEST() { - TEST_ERR=$1 # The test name - TEST_ERR_BIN=`pwd`/$TEST_ERR # The path of the test binary - - expect1="$srcdir/testfiles/$1_1" - expect2="$srcdir/testfiles/$1_2" - actual="./`basename $1`.out" - actual_err="./`basename $1`.err" - actual_ext="./`basename $1`.ext" - shift - - # Run test. - TESTING $TEST_ERR - ( - # Skip the plugin for testing missing filter. - $ENVCMD $RUNSERIAL $TEST_ERR_BIN - ) >$actual 2>$actual_err - - # Check for core dump - if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` - fi - - # Extract file name, line number, version and thread IDs because they may be different - sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ - -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ - -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ - -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ - $actual_err > $actual_ext - cat $actual_ext >> $actual - - if $CMP $expect1 $actual; then - echo " PASSED" - elif $CMP $expect2 $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect1 $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_ext - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $@ - echo " -SKIP-" -} - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - -# test for err_compat -if test $DEPRECATED_SYMBOLS != "yes"; then -SKIP err_compat -else -TEST err_compat -fi - -# test for error_test. Skip the plugin for testing missing filter. -TEST error_test - -if test $nerrors -eq 0 ; then - echo "All Error API tests passed." -fi - -exit $nerrors diff --git a/test/test_external_env.sh.in b/test/test_external_env.sh.in deleted file mode 100644 index 41e04f16982..00000000000 --- a/test/test_external_env.sh.in +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Test for external file with environment variable: HDF5_EXTFILE_PREFIX - -srcdir=@srcdir@ - -nerrors=0 - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - -# test for external file with HDF5_EXTFILE_PREFIX -echo "Testing external file with HDF5_EXTFILE_PREFIX" -TEST_NAME=external_env # The test name -TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary -ENVCMD="env HDF5_EXTFILE_PREFIX=\${ORIGIN}" # The environment variable & value -# -# Run the test -# echo "$ENVCMD $RUNSERIAL $TEST_BIN" -$ENVCMD $RUNSERIAL $TEST_BIN -exitcode=$? -if [ $exitcode -eq 0 ]; then - echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED" -else - nerrors="`expr $nerrors + 1`" - echo "***Error encountered for HDF5_EXTFILE_PREFIX test***" -fi -exit $nerrors diff --git a/test/test_libinfo.sh.in b/test/test_libinfo.sh.in deleted file mode 100644 index b016a6159e5..00000000000 --- a/test/test_libinfo.sh.in +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. - - -# -# Tests for the embedded library information feature. -# Part 1: -# Verify the HDF5 library does contains an exact copy of the content of the -# libhdf5.settings file. -# Part 2: -# If executable is linked with the static hdf5 library (how to determine?), -# verify an executable indeed contains an exact copy of the content of the -# libhdf5.settings file. -# - -srcdir=@srcdir@ - -# Determine the configure options of the hdf5 library and executables. - -Shared_Lib=@enable_shared@ -Static_Lib=@enable_static@ -Static_exec=@STATIC_EXEC@ - - -# Print a line-line message left justified in a field of 70 characters. -# -LINEMSG() { - SPACES=" " - echo "Check file $* $SPACES" | cut -c1-70 | tr -d '\012' -} - - -# Print a "SKIP" message -SKIP() { - LINEMSG $* - echo " -SKIP-" -} - -# Function definitions -CHECK_LIBINFO(){ - LINEMSG $1 - # Some systems, like Mac, the strings command inspects library files. Older - # versions of strings may not know newer library format, resulting in - # command errors. Make it read the file as stdin to avoid the problem. - if strings < $1 | grep "SUMMARY OF THE HDF5 CONFIGURATION" > /dev/null; then - echo " PASSED" - else - echo " FAILED" - nerrors=`expr $nerrors + 1` - fi -} - - -# MAIN Body -nerrors=0 -H5_HAVE_EMBEDDED_LIBINFO=`grep '#define H5_HAVE_EMBEDDED_LIBINFO ' ../src/H5pubconf.h` - -# Skip the rest if embedded-libinfo is not enabled. -if [ -z "$H5_HAVE_EMBEDDED_LIBINFO" ]; then - echo "embedded-libinfo is not enabled. Test skipped." - exit 0 -fi - -# The location of HDF library file(s) depends on whether shared lib is -# built too. -if [ -n $Shared_Lib ]; then - h5libdir=../src/.libs - shlib=$(grep dlname ../src/libhdf5.la | sed -e "s/dlname='//" -e "s/'//") -else - h5libdir=../src -fi - -h5libsettings=../src/libhdf5.settings - -# Part 1: -# Verify the HDF5 library does contains an exact copy of the content of the -# libhdf5.settings file. -# Check dynamic library file if built. -if [ x-$Shared_Lib = x-yes ]; then - CHECK_LIBINFO ${h5libdir}/${shlib} -else - SKIP shlib -fi - -# Though rare, libhdf5.a may not have been built. -if [ x-$Static_Lib = x-yes ]; then - CHECK_LIBINFO ${h5libdir}/libhdf5.a -else - SKIP ${h5libdir}/libhdf5.a -fi - -# Check if executables has the lib information only if shared lib is not -# built or static-exec is used. (Don't care static-exec since it affects -# tools binary only.) -if [ x-$Shared_Lib != x-yes ]; then - CHECK_LIBINFO testhdf5 -else - SKIP testhdf5 -fi - - -if [ $nerrors -gt 0 ]; then - echo "***$nerrors errors encountered***" - exit 1 -else - echo "No error encountered" - exit 0 -fi diff --git a/test/test_links_env.sh.in b/test/test_links_env.sh.in deleted file mode 100644 index 060fcd5d956..00000000000 --- a/test/test_links_env.sh.in +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Test for external link with environment variable: HDF5_EXT_PREFIX - -srcdir=@srcdir@ - -nerrors=0 - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - -# test for external links with HDF5_EXT_PREFIX -echo "Testing external link with HDF5_EXT_PREFIX" -TEST_NAME=links_env # The test name -TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary -ENVCMD="env HDF5_EXT_PREFIX=.:tmp_links_env" # The environment variable & value -# -# Run the test -echo "$ENVCMD $RUNSERIAL $TEST_BIN" -$ENVCMD $RUNSERIAL $TEST_BIN -exitcode=$? -if [ $exitcode -eq 0 ]; then - echo "Test for HDF5_EXT_PREFIX PASSED" -else - nerrors="`expr $nerrors + 1`" - echo "***Error encountered for HDF5_EXT_PREFIX test***" -fi -exit $nerrors diff --git a/test/test_mirror.sh.in b/test/test_mirror.sh.in deleted file mode 100644 index ab092e57719..00000000000 --- a/test/test_mirror.sh.in +++ /dev/null @@ -1,110 +0,0 @@ -#! /bin/bash -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the Mirror VFD feature. -# - -############################################################################### -## test parameters -############################################################################### - -nerrors=0 - -SERVER_VERBOSITY="--verbosity=1" -# Choose random ephemeral port number -RANDOM_PORT=$[ $RANDOM % 16384 + 49152 ] -echo "Using port: $RANDOM_PORT" -SERVER_PORT="--port=$RANDOM_PORT" - - -############################################################################### -## Main -############################################################################### - -## TODO: arguments for main port, port range, verbosity? -# Parse options (none accepted at this time) -while [ $# -gt 0 ]; do - case "$1" in - *) # unknown option - echo "$0: Unknown option ($1)" - exit 1 - ;; - esac -done - -RUN_DIR=mirror_vfd_test -MIRROR_UTILS=../utils/mirror_vfd # TODO: presupposes from test/ - -# Start clean -if test -d $RUN_DIR ; then - rm -rf $RUN_DIR -fi -mkdir $RUN_DIR - -# Copy program files into dedicated test directory -for FILE in $MIRROR_UTILS/mirror_* ; do - case "$FILE" in - *.o) continue ;; # Don't copy .o files - esac - cp $FILE $RUN_DIR -done -cp mirror_vfd $RUN_DIR - -# With the --disable-shared option, program files are built in their main -# directories; otherwise they are built in dir/.libs with a corresponding -# wrapper script. Copy these libs builds if appropriate. -if [ -f $MIRROR_UTILS/.libs/mirror_server ] ; then - RUN_LIBS=$RUN_DIR/.libs - # Delete previous .libs directory, to remove any generated libtool files - if test -d $RUN_LIBS ; then - rm -rf $RUN_LIBS - fi - mkdir $RUN_LIBS - for FILE in $MIRROR_UTILS/.libs/mirror_* ; do - case "$FILE" in - *.o) continue ;; # Don't copy .o files - esac - cp $FILE $RUN_LIBS - done - cp .libs/mirror_vfd $RUN_LIBS -fi - -cd $RUN_DIR - -echo "Launching Mirror Server" -SERVER_ARGS="$SERVER_PORT $SERVER_VERBOSITY" -./mirror_server $SERVER_ARGS & - -./mirror_vfd $SERVER_PORT -nerrors=$? - -echo "Stopping Mirror Server" -./mirror_server_stop $SERVER_PORT - -# Wait for background server process to exit -wait - -############################################################################### -## Report and exit -############################################################################### -cd .. -if test $nerrors -eq 0 ; then - echo "Mirror VFD tests passed." - if test -z "$HDF5_NOCLEANUP" ; then - rm -rf $RUN_DIR - fi - exit 0 -else - echo "Mirror VFD tests FAILED." - exit 1 -fi - diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in deleted file mode 100644 index d96aba4e331..00000000000 --- a/test/test_plugin.sh.in +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# This shell script is for testing filter, VFD, and VOL plugins. -# -srcdir=@srcdir@ -TOP_BUILDDIR=@top_builddir@ - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -CP="cp -rp" # Use -p to preserve mode,ownership, timestamps -RM="rm -rf" - -nerrors=0 -verbose=yes -exit_code=$EXIT_SUCCESS - -# Test binary names -FILTER_TEST_NAME=filter_plugin -FILTER_TEST_BIN=`pwd`/$FILTER_TEST_NAME - -VFD_TEST_NAME=vfd_plugin -VFD_TEST_BIN=`pwd`/$VFD_TEST_NAME - -VOL_TEST_NAME=vol_plugin -VOL_TEST_BIN=`pwd`/$VOL_TEST_NAME - -# Paths to actual plugins ("libraries" in test directory are just stubs) -FROM_DIR=`pwd`/.libs -case $(uname) in - CYGWIN* ) - NULL_VFD_PLUGIN="$FROM_DIR/cygnull_vfd_plugin*" - NULL_VOL_PLUGIN="$FROM_DIR/cygnull_vol_connector*" - PLUGINS_FOR_DIR1="$FROM_DIR/cygfilter_plugin1* $FROM_DIR/cygfilter_plugin3*" - PLUGINS_FOR_DIR2="$FROM_DIR/cygfilter_plugin2* $FROM_DIR/cygfilter_plugin4*" - ;; - *) - NULL_VFD_PLUGIN="$FROM_DIR/libnull_vfd_plugin*" - NULL_VOL_PLUGIN="$FROM_DIR/libnull_vol_connector*" - PLUGINS_FOR_DIR1="$FROM_DIR/libfilter_plugin1* $FROM_DIR/libfilter_plugin3*" - PLUGINS_FOR_DIR2="$FROM_DIR/libfilter_plugin2* $FROM_DIR/libfilter_plugin4*" - ;; -esac - -# Directories where we'll copy plugins -TEMP_PLUGIN_DIR=temp_plugins -TEMP_FILTER_DIR1=temp_filter_plugin_dir1 -TEMP_FILTER_DIR2=temp_filter_plugin_dir2 - -# Function to print a line-line message left justified in a field of -# 70 characters beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -############# -# Main Body # -############# - -# Create plugin directories -test -d $TEMP_PLUGIN_DIR || mkdir -p $TEMP_PLUGIN_DIR -if [ $? != 0 ]; then - echo "Failed to create plugin test directory ($TEMP_PLUGIN_DIR)" - exit $EXIT_FAILURE -fi -test -d $TEMP_FILTER_DIR1 || mkdir -p $TEMP_FILTER_DIR1 -if [ $? != 0 ]; then - echo "Failed to create filter plugin test directory ($TEMP_FILTER_DIR1)" - exit $EXIT_FAILURE -fi -test -d $TEMP_FILTER_DIR2 || mkdir -p $TEMP_FILTER_DIR2 -if [ $? != 0 ]; then - echo "Failed to create filter plugin test directory ($TEMP_FILTER_DIR2)" - exit $EXIT_FAILURE -fi - -# Copy plugins for the tests -$CP $NULL_VFD_PLUGIN $TEMP_PLUGIN_DIR -if [ $? != 0 ]; then - echo "Failed to copy NULL VFD plugin ($NULL_VFD_PLUGIN) to test directory." - exit $EXIT_FAILURE -fi -$CP $NULL_VOL_PLUGIN $TEMP_PLUGIN_DIR -if [ $? != 0 ]; then - echo "Failed to copy NULL VOL plugin ($NULL_VOL_PLUGIN) to test directory." - exit $EXIT_FAILURE -fi -$CP $PLUGINS_FOR_DIR1 $TEMP_FILTER_DIR1 -if [ $? != 0 ]; then - echo "Failed to copy filter plugins ($PLUGINS_FOR_DIR1) to test directory." - exit $EXIT_FAILURE -fi -$CP $PLUGINS_FOR_DIR2 $TEMP_FILTER_DIR2 -if [ $? != 0 ]; then - echo "Failed to copy filter plugins ($PLUGINS_FOR_DIR2) to test directory." - exit $EXIT_FAILURE -fi - -# Set plugin path -ENVCMD="env HDF5_PLUGIN_PATH=${TEMP_PLUGIN_DIR}:${TEMP_FILTER_DIR1}:${TEMP_FILTER_DIR2}:${HDF5_PLUGIN_PATH}" - -# Run the tests -$ENVCMD $FILTER_TEST_BIN -if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` -fi -$ENVCMD $VFD_TEST_BIN -if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` -fi -$ENVCMD $VOL_TEST_BIN -if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` -fi - -# Print results -if test $nerrors -ne 0 ; then - echo "$nerrors errors encountered" - exit_code=$EXIT_FAILURE -else - echo "All plugin tests passed." - exit_code=$EXIT_SUCCESS -fi - -# Clean up temporary files/directories and leave -$RM $TEMP_PLUGIN_DIR $TEMP_FILTER_DIR1 $TEMP_FILTER_DIR2 - -exit $exit_code diff --git a/test/test_vds_env.sh.in b/test/test_vds_env.sh.in deleted file mode 100644 index 97518f112c6..00000000000 --- a/test/test_vds_env.sh.in +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Test for external file with environment variable: HDF5_VDS_PREFIX - -srcdir=@srcdir@ - -nerrors=0 - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - -# test for VDS with HDF5_VDS_PREFIX -echo "Testing basic virtual dataset I/O via H5Pset_vds_prefix(): all selection with ENV prefix" -TEST_NAME=vds_env # The test name -TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary -ENVCMD="env HDF5_VDS_PREFIX=\${ORIGIN}/tmp_vds_env" # Set the environment variable & value -UNENVCMD="unset HDF5_VDS_PREFIX" # Unset the environment variable & value -# -# Run the test -# echo "$ENVCMD $RUNSERIAL $TEST_BIN" -$ENVCMD $RUNSERIAL $TEST_BIN -exitcode=$? -if [ $exitcode -eq 0 ]; then - echo "Test prefix for HDF5_VDS_PREFIX PASSED" -else - nerrors="`expr $nerrors + 1`" - echo "***Error encountered for HDF5_VDS_PREFIX test***" -fi -$UNENVCMD -exit $nerrors diff --git a/testpar/Makefile.am b/testpar/Makefile.am deleted file mode 100644 index 27002fa3de3..00000000000 --- a/testpar/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# hdf5 Parallel Library Test Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test - -if SUBFILING_VFD_CONDITIONAL - AM_CPPFLAGS += -I$(top_srcdir)/src/H5FDsubfiling -endif - -# Test scripts-- -# testpflush.sh: -TEST_SCRIPT_PARA = testpflush.sh -SCRIPT_DEPEND = t_pflush1$(EXEEXT) t_pflush2$(EXEEXT) - -check_SCRIPTS = $(TEST_SCRIPT_PARA) - -# Test programs. These are our main targets. -# -TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pread t_pshutdown t_prestart t_init_term t_pmulti_dset t_select_io_dset t_shapesame t_filters_parallel t_2Gio t_vfd - -if SUBFILING_VFD_CONDITIONAL - TEST_PROG_PARA += t_subfiling_vfd -endif - -# t_pflush1 and t_pflush2 are used by testpflush.sh -check_PROGRAMS = $(TEST_PROG_PARA) t_pflush1 t_pflush2 - -# The libh5testpar library provides common support code for the tests. -noinst_LTLIBRARIES=libh5testpar.la - -libh5testpar_la_SOURCES=testpar.c - -testphdf5_SOURCES=testphdf5.c t_dset.c t_file.c t_file_image.c t_mdset.c \ - t_ph5basic.c t_coll_chunk.c t_span_tree.c t_chunk_alloc.c t_filter_read.c \ - t_prop.c t_coll_md.c t_oflush.c - -# The tests all depend on the hdf5 library and the test libraries -LDADD = $(LIBH5TEST) libh5testpar.la $(LIBHDF5) - -# Temporary files -# MPItest.h5 is from t_mpi -# Para*.h5 are from testphdf -# bigio_test.h5 is from t_bigio -# ShapeSameTest.h5 is from t_shapesame -# shutdown.h5 is from t_pshutdown -# after_mpi_fin.h5 is from t_init_term -# go is used for debugging. See testphdf5.c. -CHECK_CLEANFILES+=MPItest.h5 Para*.h5 bigio_test.h5 CacheTestDummy.h5 \ - ShapeSameTest.h5 shutdown.h5 pmulti_dset.h5 after_mpi_fin.h5 go noflush.h5 \ - mpio_select_test_file.h5 *.btr - -include $(top_srcdir)/config/conclude.am diff --git a/testpar/testpflush.sh.in b/testpar/testpflush.sh.in deleted file mode 100644 index 483d0d92d26..00000000000 --- a/testpar/testpflush.sh.in +++ /dev/null @@ -1,61 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -# Test script for the parallel flush test -# -# The parallel flush test uses two programs to test flush operations -# in parallel HDF5. The first program purposely exits without calling -# MPI_Finalize(), which is an error under the MPI standard and mpiexec -# in some implementations will return an error code even though all -# processes exit successfully. This script lets us swallow the error -# from the first program. -# -# True errors in the first program will be detected as errors in the -# second program, so watch out for that. -# - -# The build (current) directory might be different than the source directory. -if test -z "$srcdir"; then - srcdir=. -fi - -# Turn the $$ we use to avoid Autotools munging into $ -# -# Allowing $$ to substitute in both the RUNPARALLEL string and the -# regexp is intentional. There doesn't seem to be a way around -# this using quote shenanigans. The downside is that there is a remote -# chance that the shell's pid will match a number in the RUNPARALLEL -# variable, but that seems less likely to cause problems than expecting -# library builders to specify two almost identical versions of the -# RUNPARALLEL command, one for use in scripts and one via Makefiles. -RUNPARALLELSCRIPT=`echo "@RUNPARALLEL@" | sed "s/$$/\$/g"` - -# ========================================== -# Run the first parallel flush test program -# (note that we ignore any errors here) -# ========================================== -echo "*** NOTE ***********************************************************" -echo "You may see complaints from mpiexec et al. that not all processes" -echo "called MPI_Finalize(). This is an intended characteristic of the" -echo "test and should not be considered an error." -echo "********************************************************************" -eval ${RUNPARALLELSCRIPT} ./t_pflush1 - - -# =========================================== -# Run the second parallel flush test program -# The return code of this call is the return -# code of the script. -# =========================================== -eval ${RUNPARALLELSCRIPT} ./t_pflush2 - diff --git a/tools/Makefile.am b/tools/Makefile.am deleted file mode 100644 index d0a6c5c5bc4..00000000000 --- a/tools/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# Tools HDF5 Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -if BUILD_TESTS_CONDITIONAL - TESTSERIAL_DIR=libtest test -else - TESTSERIAL_DIR= -endif - -CONFIG=ordered - -# All subdirectories -SUBDIRS=lib src $(TESTSERIAL_DIR) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/lib/Makefile.am b/tools/lib/Makefile.am deleted file mode 100644 index 12427d91307..00000000000 --- a/tools/lib/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include files in /src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src - -# This is our main target, the h5tools library. -noinst_LTLIBRARIES=libh5tools.la - -libh5tools_la_SOURCES=h5tools.c h5tools_dump.c h5tools_str.c h5tools_utils.c h5diff.c \ - h5diff_array.c h5diff_attr.c h5diff_dset.c h5diff_util.c h5trav.c \ - h5tools_filters.c h5tools_ref.c h5tools_type.c io_timer.c - -# Test program. Link using libhdf5 and libh5tools -TEST_PROG= -check_PROGRAMS=$(TEST_PROG) - -# Name libh5tools.la so that dependencies work out. Automake knows how -# to build 'libh5tools.la', but not '../../tools/lib/libh5tools.la'. -LDADD=libh5tools.la $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am - diff --git a/tools/libtest/Makefile.am b/tools/libtest/Makefile.am deleted file mode 100644 index 8a503d033b2..00000000000 --- a/tools/libtest/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src, test, and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib - -# All programs depend on the hdf5, hdf5 test, and h5tools libraries -LDADD=$(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5) - - -# main target -noinst_PROGRAMS=h5tools_test_utils -# check_PROGRAMS=$(TEST_PROG) - - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/Makefile.am b/tools/src/Makefile.am deleted file mode 100644 index 7527e48f256..00000000000 --- a/tools/src/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# Tools HDF5 Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -CONFIG=ordered - -# All subdirectories -SUBDIRS=h5diff h5ls h5dump misc h5import h5repack h5jam h5copy \ - h5format_convert h5stat h5perf - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5copy/Makefile.am b/tools/src/h5copy/Makefile.am deleted file mode 100644 index 93a6d01b894..00000000000 --- a/tools/src/h5copy/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# This is our main target, the h5copy tool -bin_PROGRAMS=h5copy -check_PROGRAMS=$(TEST_PROG) - -# Add h5copy specific linker flags here -h5copy_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# All programs depend on the hdf5 and h5tools libraries -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -# Temporary files. *.h5 are generated by h5dumpgentest. They should -# copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES+=*.h5 - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5diff/Makefile.am b/tools/src/h5diff/Makefile.am deleted file mode 100644 index f6e1001fd19..00000000000 --- a/tools/src/h5diff/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# Always build and test h5diff but build and test ph5diff only if parallel -# is enabled. -if BUILD_PARALLEL_CONDITIONAL - H5PDIFF=ph5diff -endif - -# Our main target, h5diff -bin_PROGRAMS=h5diff $(H5PDIFF) - -# Add h5diff specific linker flags here -h5diff_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# Source files for the program -h5diff_SOURCES=h5diff_main.c h5diff_common.c -ph5diff_SOURCES=ph5diff_main.c h5diff_common.c - -# Programs depend on the main HDF5 library and tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am - diff --git a/tools/src/h5dump/Makefile.am b/tools/src/h5dump/Makefile.am deleted file mode 100644 index 30fd78a81e0..00000000000 --- a/tools/src/h5dump/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include files in /src directory and /tools/lib directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# Our main target, the h5dump tool. -bin_PROGRAMS=h5dump - -# Add h5dump specific linker flags here -h5dump_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# All the programs depend on the hdf5 and h5tools libraries -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -# Source files for the program -h5dump_SOURCES=h5dump.c h5dump_ddl.c h5dump_xml.c - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5format_convert/Makefile.am b/tools/src/h5format_convert/Makefile.am deleted file mode 100644 index 3b17a4a1de7..00000000000 --- a/tools/src/h5format_convert/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# These are our main targets, the tools -bin_PROGRAMS=h5format_convert -bin_SCRIPTS= - -# Add h5format_convert specific linker flags here -h5format_convert_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -CLEANFILES= - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5import/Makefile.am b/tools/src/h5import/Makefile.am deleted file mode 100644 index 7797a9842fc..00000000000 --- a/tools/src/h5import/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# Our main targets -bin_PROGRAMS=h5import - -# Add h5import specific linker flags here -h5import_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# All programs depend on the main hdf5 library and the tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5jam/Makefile.am b/tools/src/h5jam/Makefile.am deleted file mode 100644 index d29314d5c74..00000000000 --- a/tools/src/h5jam/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -bin_PROGRAMS=h5jam h5unjam - -# Add h5jam and h5unjam specific linker flags here -h5jam_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -h5unjam_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# Link against the main HDF5 library and tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5ls/Makefile.am b/tools/src/h5ls/Makefile.am deleted file mode 100644 index ee9ecdbc130..00000000000 --- a/tools/src/h5ls/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# This is our main target, the h5ls tool -bin_PROGRAMS=h5ls - -# Add h5ls specific linker flags here -h5ls_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# All programs depend on the hdf5 and h5tools libraries -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5perf/Makefile.am b/tools/src/h5perf/Makefile.am deleted file mode 100644 index 09ac26bce4b..00000000000 --- a/tools/src/h5perf/Makefile.am +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Library Performance Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib - -# bin_PROGRAMS will be installed. -if BUILD_PARALLEL_CONDITIONAL - bin_PROGRAMS=h5perf_serial h5perf -else - bin_PROGRAMS=h5perf_serial -endif - -# Add h5perf and h5perf_serial specific linker flags here -h5perf_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -h5perf_serial_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# Some programs are not built or run by default, but can be built by hand or by -# specifying --enable-build-all at configure time. -# Also, some of these programs should only be built in parallel. -# Currently there is no such program. -if BUILD_PARALLEL_CONDITIONAL - PARA_BUILD_ALL= -endif -if BUILD_ALL_CONDITIONAL - BUILD_ALL_PROGS=$(PARA_BUILD_ALL) -endif - -# Define programs that will be run in 'make check' -# List them in the order they should be run. -# Parallel test programs. -if BUILD_PARALLEL_CONDITIONAL - TEST_PROG_PARA=h5perf -endif - -h5perf_SOURCES=pio_perf.c pio_engine.c -h5perf_serial_SOURCES=sio_perf.c sio_engine.c - -# All of the programs depend on the main hdf5 library, and some of them -# depend on test or tools library. -LDADD=$(LIBHDF5) -h5perf_LDADD=$(LIBH5TOOLS) $(LIBHDF5) -h5perf_serial_LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5repack/Makefile.am b/tools/src/h5repack/Makefile.am deleted file mode 100644 index 9af6e9d4603..00000000000 --- a/tools/src/h5repack/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src, test, and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib - -# A convenience library for the h5repack tool and the h5repack tests -noinst_LTLIBRARIES=libh5repack.la - -libh5repack_la_SOURCES=h5repack.c h5repack_copy.c h5repack_filters.c \ - h5repack_opttable.c h5repack_parse.c h5repack_refs.c \ - h5repack_verify.c -libh5repack_la_LDFLAGS = $(AM_LDFLAGS) -libh5repack_la_LIBADD=$(LIBH5TOOLS) $(LIBHDF5) - - -# Our main target, h5repack tool -bin_PROGRAMS=h5repack - -h5repack_SOURCES=h5repack_main.c - -# Add h5repack specific linker flags here -h5repack_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# Depend on the hdf5 library, the tools library, the h5repack library -h5repack_LDADD=libh5repack.la $(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/h5stat/Makefile.am b/tools/src/h5stat/Makefile.am deleted file mode 100644 index b8bd906cc1b..00000000000 --- a/tools/src/h5stat/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# These are our main targets, the tools -bin_PROGRAMS=h5stat -bin_SCRIPTS= - -# Add h5stat specific linker flags here -h5stat_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# Tell automake to clean h5redeploy script -CLEANFILES= - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/src/misc/Makefile.am b/tools/src/misc/Makefile.am deleted file mode 100644 index 709be6e5825..00000000000 --- a/tools/src/misc/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# These are our main targets, the tools -bin_PROGRAMS=h5debug h5repart h5mkgrp h5clear h5delete - -# Add h5debug, h5repart, and h5mkgrp specific linker flags here -h5debug_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -h5repart_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -h5mkgrp_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -h5clear_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -h5delete_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/Makefile.am b/tools/test/Makefile.am deleted file mode 100644 index c32dd18e568..00000000000 --- a/tools/test/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# Tools HDF5 Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -CONFIG=ordered - -# All subdirectories -SUBDIRS=h5diff h5ls h5dump misc h5import h5repack h5jam h5copy \ - h5format_convert h5stat perform - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5copy/Makefile.am b/tools/test/h5copy/Makefile.am deleted file mode 100644 index 6010f987442..00000000000 --- a/tools/test/h5copy/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# Test programs and scripts -TEST_PROG=h5copygentest -TEST_SCRIPT=testh5copy.sh - -check_SCRIPTS=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../src/h5copy/h5copy$(EXEEXT) - -# This is our main target, the h5copy tool -check_PROGRAMS=$(TEST_PROG) - -# source file for the test file generator -h5copygentest_SOURCES=h5copygentest.c - -# All programs depend on the hdf5 and h5tools libraries -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -# Temporary files. *.h5 are generated by h5dumpgentest. They should -# copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES+=*.h5 - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in deleted file mode 100644 index 84a746c23b4..00000000000 --- a/tools/test/h5copy/testh5copy.sh.in +++ /dev/null @@ -1,617 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5copy tool -# -# Pedro Vicente Nunes, Albert Cheng -# Thursday, July 20, 2006 -# - -srcdir=@srcdir@ - -# Determine which filters are available -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -# source dirs -SRC_TOOLS="$srcdir/../.." -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5COPY_OUTFILES="$SRC_TOOLS/test/h5copy/expected" - -TESTNAME=h5copy -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -# List of files that will be copied over to local test dir -LIST_HDF5_TEST_FILES=" -$SRC_H5COPY_TESTFILES/h5copytst.h5 -$SRC_H5COPY_TESTFILES/h5copy_ref.h5 -$SRC_H5COPY_TESTFILES/h5copy_extlinks_src.h5 -$SRC_H5COPY_TESTFILES/h5copy_extlinks_trg.h5 -" - -# List of expect files that will be copied over to local test dir -LIST_OTHER_TEST_FILES=" -$SRC_H5COPY_OUTFILES/h5copy_misc1.out -$SRC_H5COPY_OUTFILES/h5copy_help1.ddl -$SRC_H5COPY_OUTFILES/h5copy_help2.ddl -" - -H5COPY=../../src/h5copy/h5copy # The tool name -H5COPY_BIN=`pwd`/$H5COPY # The path of the tool binary -H5DIFF=../../src/h5diff/h5diff # The h5diff tool name -H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary -H5LS=../../src/h5ls/h5ls # The h5ls tool name -H5LS_ARGS=-Svr # Arguments to the h5ls tool -H5LS_BIN=`pwd`/$H5LS # The path of the h5ls tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' -GREP='grep' - -nerrors=0 -verbose=yes -h5haveexitcode=yes # default is yes - -TESTDIR=./tmp -test -d $TESTDIR || mkdir $TESTDIR - -# RUNSERIAL is used. Check if it can return exit code from executalbe correctly. -if [ -n "$RUNSERIAL_NOEXITCODE" ]; then - echo "***Warning*** Serial Exit Code is not passed back to shell correctly." - echo "***Warning*** Exit code checking is skipped." - h5haveexitcode=no -fi - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5COPY_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - - -# Print a "SKIP" message -SKIP() { - TESTING $H5COPY $@ - echo " -SKIP-" -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -TESTING() -{ - SPACES=" " - echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -VERIFY() -{ - SPACES=" " - echo "Verifying h5diff output $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -VERIFY_OUTPUT() -{ - SPACES=" " - echo "Verifying output files $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If h5copy can complete -# with exit status 0, consider it pass. If a test fails then increment -# the `nerrors' global variable. -# Assumed arguments: -# $1 is -i -# $2 is input file -# $3 is -o -# $4 is output file -# $* everything else arguments for h5copy. - -TOOLTEST() -{ - actual="$TESTDIR/tooltest.actual" - actual_err="$TESTDIR/tooltest.actual_err" - runh5diff=yes - if [ "$1" = -i ]; then - inputfile=$2 - else - if [ "$1" = -f ]; then - inputfile=$4 - else - inputfile=$3 - fi - runh5diff=no - fi - - if [ "$3" = -o ]; then - outputfile=$4 - else - if [ "$1" = -f ]; then - outputfile=$6 - else - outputfile=$5 - fi - runh5diff=no - fi - - TESTING $H5COPY $@ - ( - echo "#############################" - echo " output for '$H5COPY $@'" - echo "#############################" - $RUNSERIAL $H5COPY_BIN $@ - ) > $actual 2> $actual_err - RET=$? - - if [ $RET != 0 ]; then - echo "*FAILED*" - echo "failed result is:" - cat $actual - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - - if [ $runh5diff != no ]; then - H5DIFFTEST $inputfile $outputfile $7 $9 - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $outputfile - fi - fi -} - -# TOOLTEST back-to-back -TOOLTEST_PREFILL() -{ - actual="$TESTDIR/tooltest.actual" - actual_err="$TESTDIR/tooltest.actual_err" - runh5diff=yes - if [ "$1" = -i ]; then - inputfile=$2 - else - runh5diff=no - fi - if [ "$3" = -o ]; then - outputfile=$4 - else - runh5diff=no - fi - - grp_name=$5 - grp_name2=$6 - obj_name=$7 - obj_name2=$8 - - TESTING $H5COPY $@ - ( - echo "#############################" - echo " output for '$H5COPY $@'" - echo "#############################" - $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name2 - ) > $actual 2> $actual_err - RET=$? - - if [ $RET != 0 ]; then - echo "*FAILED*" - echo "failed result is:" - cat $actual - nerrors="`expr $nerrors + 1`" - else - TESTING $H5COPY $@ - ( - echo "#############################" - echo " output for '$H5COPY $@'" - echo "#############################" - $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $obj_name -d $obj_name2 - ) > $actual 2> $actual_err - RET=$? - - if [ $RET != 0 ]; then - echo "*FAILED*" - echo "failed result is:" - cat $actual - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - - if [ $runh5diff != no ]; then - H5DIFFTEST $inputfile $outputfile $obj_name $obj_name2 - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $outputfile - fi - fi - fi -} - -# TOOLTEST back-to-back -TOOLTEST_SAME() -{ - actual="$TESTDIR/tooltest.actual" - actual_err="$TESTDIR/tooltest.actual_err" - runh5diff=yes - if [ "$1" = -i ]; then - inputfile=$2 - else - runh5diff=no - fi - - if [ "$3" = -o ]; then - outputfile=$4 - else - runh5diff=no - fi - - grp_name=$5 - grp_name2=$6 - - TESTING $H5COPY $@ - ( - echo "#############################" - echo " output for '$H5COPY $@'" - echo "#############################" - $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name - ) > $actual 2> $actual_err - RET=$? - - if [ $RET != 0 ]; then - echo "*FAILED*" - echo "failed result is:" - cat $actual - nerrors="`expr $nerrors + 1`" - else - TESTING $H5COPY $@ - ( - echo "#############################" - echo " output for '$H5COPY $@'" - echo "#############################" - $RUNSERIAL $H5COPY_BIN -i $outputfile -o $outputfile -v -s $grp_name -d $grp_name2 - ) > $actual 2> $actual_err - RET=$? - - if [ $RET != 0 ]; then - echo "*FAILED*" - echo "failed result is:" - cat $actual - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - - if [ $runh5diff != no ]; then - H5DIFFTEST $outputfile $outputfile $grp_name $grp_name2 - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $outputfile - fi - fi - fi -} - - -# Call the h5copy tool and grep for a value -# txttype ERRTXT greps test error output, otherwise greps test output -GREPTEST() -{ - txttype=$1 - expectdata=$2 - expectout="$TESTDIR/$3" - expecterr="$TESTDIR/`basename $3 .out`.err" - actual="$TESTDIR/$3.actual" - actual_err="$TESTDIR/$3.actual_err" - shift - shift - shift - if [ "$1" = -i ]; then - inputfile=$2 - fi - - if [ "$3" = -o ]; then - outputfile=$4 - fi - - # Run test. - TESTING $H5COPY $@ - ( - $RUNSERIAL $H5COPY_BIN $@ - ) > $actual 2> $actual_err - RET=$? - - if [ "$txttype" = "ERRTXT" ]; then - $GREP "$expectdata" $actual_err > /dev/null - else - $GREP "$expectdata" $actual > /dev/null - fi - - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo " FAILED" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -# Call the h5diff tool -# -H5DIFFTEST() -{ - VERIFY $@ - $RUNSERIAL $H5DIFF_BIN -q "$@" - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi -} - -# ADD_HELP_TEST -TOOLTEST_HELP() { - - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.err" - shift - - # Run test. - TESTING $H5COPY $@ - ( - cd $TESTDIR - $RUNSERIAL $H5COPY_BIN "$@" - ) >$actual 2>$actual_err - - if [ ! -f $expectdata ]; then - # Create the expect data file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect-CREATED - echo " Expected output (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected output (*.ddl) differs from actual output (*.out)" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi - -} - -# Copy single datasets of various forms from one group to another, -# adding object copied to the destination file each time -# -# Assumed arguments: -# -COPY_OBJECTS() -{ - TESTFILE="$TESTDIR/h5copytst.h5" - - echo "Test copying various forms of datasets" - TOOLTEST -i $TESTFILE -o $TESTDIR/simple.out.h5 -v -s simple -d simple - TOOLTEST -i $TESTFILE -o $TESTDIR/chunk.out.h5 -v -s chunk -d chunk - TOOLTEST -i $TESTFILE -o $TESTDIR/compact.out.h5 -v -s compact -d compact - TOOLTEST -i $TESTFILE -o $TESTDIR/compound.out.h5 -v -s compound -d compound -if test $USE_FILTER_DEFLATE = "yes" ; then - TOOLTEST -i $TESTFILE -o $TESTDIR/compressed.out.h5 -v -s compressed -d compressed -fi - TOOLTEST -i $TESTFILE -o $TESTDIR/named_vl.out.h5 -v -s named_vl -d named_vl - TOOLTEST -i $TESTFILE -o $TESTDIR/nested_vl.out.h5 -v -s nested_vl -d nested_vl - TOOLTEST -i $TESTFILE -o $TESTDIR/dset_attr.out.h5 -v -s /dset_attr -d /dset_attr - - echo "Test copying dataset within group in source file to root of destination" - TOOLTEST -i $TESTFILE -o $TESTDIR/simple_top.out.h5 -v -s grp_dsets/simple -d simple_top - - echo "Test copying & renaming dataset" - TOOLTEST -i $TESTFILE -o $TESTDIR/dsrename.out.h5 -v -s compound -d rename - - echo "Test copying empty, 'full' & 'nested' groups" - TOOLTEST -i $TESTFILE -o $TESTDIR/grp_empty.out.h5 -v -s grp_empty -d grp_empty -if test $USE_FILTER_DEFLATE = "yes" ; then - TOOLTEST -i $TESTFILE -o $TESTDIR/grp_dsets.out.h5 -v -s grp_dsets -d grp_dsets - TOOLTEST -i $TESTFILE -o $TESTDIR/grp_nested.out.h5 -v -s grp_nested -d grp_nested -fi - TOOLTEST -i $TESTFILE -o $TESTDIR/grp_attr.out.h5 -v -s grp_attr -d grp_attr - - echo "Test copying dataset within group in source file to group in destination" - TOOLTEST_PREFILL -i $TESTFILE -o $TESTDIR/simple_group.out.h5 grp_dsets grp_dsets /grp_dsets/simple /grp_dsets/simple_group -if test $USE_FILTER_DEFLATE = "yes" ; then - echo "Test copying & renaming group" - TOOLTEST -i $TESTFILE -o $TESTDIR/grp_rename.out.h5 -v -s grp_dsets -d grp_rename - echo "Test copying 'full' group hierarchy into group in destination file" - TOOLTEST_PREFILL -i $TESTFILE -o $TESTDIR/grp_dsets_rename.out.h5 grp_dsets grp_rename grp_dsets /grp_rename/grp_dsets -fi - - echo "Test copying objects into group hier. that doesn't exist yet in destination file" - TOOLTEST -i $TESTFILE -o $TESTDIR/A_B1_simple.out.h5 -vp -s simple -d /A/B1/simple - TOOLTEST -i $TESTFILE -o $TESTDIR/A_B2_simple2.out.h5 -vp -s simple -d /A/B2/simple2 - TOOLTEST -i $TESTFILE -o $TESTDIR/C_D_simple.out.h5 -vp -s /grp_dsets/simple -d /C/D/simple -if test $USE_FILTER_DEFLATE = "yes" ; then - TOOLTEST -i $TESTFILE -o $TESTDIR/E_F_grp_dsets.out.h5 -vp -s /grp_dsets -d /E/F/grp_dsets - TOOLTEST -i $TESTFILE -o $TESTDIR/G_H_grp_nested.out.h5 -vp -s /grp_nested -d /G/H/grp_nested -fi -} - -# Copy references in various way. -# -# Assumed arguments: -# -COPY_REFERENCES() -{ - TESTFILE="$TESTDIR/h5copy_ref.h5" - - echo "Test copying object and region references" - TOOLTEST -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY -} - -# Copy external links. -# adding to the destination file each time compare the result -# -# Assumed arguments: -# -COPY_EXT_LINKS() -{ - TESTFILE="$TESTDIR/h5copy_extlinks_src.h5" - - echo "Test copying external link directly without -f ext" - TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link.out.h5 -s /group_ext/extlink_dset -d /copy1_dset - - echo "Test copying external link directly with -f ext" - TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset - - echo "Test copying dangling external link (no obj) directly without -f ext" - TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_noobj.out.h5 -s /group_ext/extlink_notyet1 -d /copy_dangle1_1 - - echo "Test copying dangling external link (no obj) directly with -f ext" - TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2 - - echo "Test copying dangling external link (no file) directly without -f ext" - TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_nofile.out.h5 -s /group_ext/extlink_notyet2 -d /copy_dangle2_1 - - echo "Test copying dangling external link (no file) directly with -f ext" - TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2 - - echo "Test copying a group contains external links without -f ext" - TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link_group.out.h5 -s /group_ext -d /copy1_group - - echo "Test copying a group contains external links with -f ext" - TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group -} - -# Test misc. -# -# Assumed arguments: -# -TEST_MISC() -{ - TESTFILE="$TESTDIR/h5copytst.h5" - - echo "Test copying object into group which doesn't exist, without -p" - GREPTEST ERRTXT "h5copy error" h5copy_misc1.out -i $TESTFILE -o $TESTDIR/h5copy_misc1.out.h5 -v -s /simple -d /g1/g2/simple - - echo "Test copying objects to the same file " - TOOLTEST_SAME -i $TESTFILE -o $TESTDIR/samefile1.out.h5 /simple /simple_cp -if test $USE_FILTER_DEFLATE = "yes" ; then - TOOLTEST_SAME -i $TESTFILE -o $TESTDIR/samefile2.out.h5 /grp_dsets /grp_dsets_cp -fi -} - -############################################################################## -### T H E T E S T S ### -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# check help text -TOOLTEST_HELP h5copy_help1.ddl -h -TOOLTEST_HELP h5copy_help2.ddl --help - -# Start tests -COPY_OBJECTS -COPY_REFERENCES -COPY_EXT_LINKS -TEST_MISC - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5diff/Makefile.am b/tools/test/h5diff/Makefile.am deleted file mode 100644 index f920afab74a..00000000000 --- a/tools/test/h5diff/Makefile.am +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# Always build and test h5diff but build and test ph5diff only if parallel -# is enabled. -if BUILD_PARALLEL_CONDITIONAL - H5PDIFF=../../src/h5diff/ph5diff - TEST_SCRIPT_PARA=testph5diff.sh -endif - -# Test programs and scripts -TEST_PROG=h5diffgentest -TEST_SCRIPT=testh5diff.sh - -check_PROGRAMS=$(TEST_PROG) -check_SCRIPTS=$(TEST_SCRIPT) $(TEST_SCRIPT_PARA) -# The parallel test script testph5diff.sh actually depends on testh5diff.sh. -if BUILD_PARALLEL_CONDITIONAL - SCRIPT_DEPEND=../../src/h5diff/h5diff$(EXEEXT) $(H5PDIFF) $(TEST_SCRIPT) -else - SCRIPT_DEPEND=../../src/h5diff/h5diff$(EXEEXT) $(H5PDIFF) -endif -if HAVE_SHARED_CONDITIONAL -if USE_PLUGINS_CONDITIONAL - TEST_SCRIPT += h5diff_plugin.sh -endif -endif - -# Source files for the program -h5diffgentest_SOURCES=h5diffgentest.c - -# Programs depend on the main HDF5 library and tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -if HAVE_SHARED_CONDITIONAL - # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlibdiff.la - libdynlibdiff_la_SOURCES=dynlib_diff.c - libdynlibdiff_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere -endif - -# Temporary files. *.h5 are generated by h5diff. They should -# be copied to the testfiles/ directory if update is required -CHECK_CLEANFILES+=*.h5 *.onion expect_sorted actual_sorted -DISTCLEANFILES=testh5diff.sh h5diff_plugin.sh - -include $(top_srcdir)/config/conclude.am - diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in deleted file mode 100644 index 98ccf639d8c..00000000000 --- a/tools/test/h5diff/h5diff_plugin.sh.in +++ /dev/null @@ -1,320 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -srcdir=@srcdir@ -TOP_BUILDDIR=@top_builddir@ - -# Determine backward compatibility options enabled -DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@" - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5DIFF=../../src/h5diff/h5diff # The tool name -H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary - -nerrors=0 -verbose=yes -h5haveexitcode=yes # default is yes - -TEST_NAME=ud_plugin -FROM_DIR=`pwd`/.libs -PLUGIN_LIB="$FROM_DIR/libdynlibdiff.*" -PLUGIN_LIBDIR=testdir3 -RM='rm -rf' - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5DIFF_OUTFILES="$SRC_TOOLS/test/h5diff/expected" - -TESTDIR=./tmppl -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DIFF_TESTFILES/tudfilter.h5 -$SRC_H5DIFF_TESTFILES/tudfilter2.h5 -$SRC_H5DIFF_OUTFILES/h5diff_ud.txt -$SRC_H5DIFF_OUTFILES/h5diff_udfail.txt -" - -# Main Body -# Create test directories if not exists yet. -test -d $PLUGIN_LIBDIR || mkdir -p $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to create test directory($PLUGIN_LIBDIR)" - exit $EXIT_FAILURE -fi - -# copy plugin library for test -$CP $PLUGIN_LIB $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to copy plugin library ($PLUGIN_LIB) for test." - exit $EXIT_FAILURE -fi - -# setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}:${HDF5_PLUGIN_PATH}" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5DIFF_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Parse option -# -p run ph5diff tests -# -h print help page -while [ $# -gt 0 ]; do - case "$1" in - -p) # reset the tool name and bin to run ph5diff tests - TESTNAME=ph5diff - H5DIFF=../../src/h5diff/ph5diff # The tool name - H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary - pmode=yes - shift - ;; - -h) # print help page - echo "$0 [-p] [-h]" - echo " -p run ph5diff tests" - echo " -h print help page" - shift - exit 0 - ;; - *) # unknown option - echo "$0: Unknown option ($1)" - exit 1 - ;; - esac -done - -# RUNSERIAL is used. Check if it can return exit code from executalbe correctly. -if [ -n "$RUNSERIAL_NOEXITCODE" ]; then - echo "***Warning*** Serial Exit Code is not passed back to shell correctly." - echo "***Warning*** Exit code checking is skipped." - h5haveexitcode=no -fi - - -# Print a $* message left justified in a field of 70 characters -# -MESSAGE() { - SPACES=" " - echo "$* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -VERIFY() { - MESSAGE "Verifying $*" -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -# Need eval before the RUNCMD command because some machines like -# AIX, has RUNPARALLEL in the style as -# MP_PROCS=3 MP_TASKS_PER_NODE=3 poe ./a.out -# that throws the shell script off. -# -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .txt`.out" - actual_err="$TESTDIR/`basename $1 .txt`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - if test -n "$pmode"; then - RUNCMD=$RUNPARALLEL - else - RUNCMD=$RUNSERIAL - fi - - # Run test. - TESTING $H5DIFF $@ - ( - #echo "#############################" - #echo "Expected output for '$H5DIFF $@'" - #echo "#############################" - cd $TESTDIR - eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@" - ) >$actual 2>$actual_err - EXIT_CODE=$? - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - cat $actual_err >> $actual - - # don't add exit code check in pmode, as it causes failure. (exit code - # is from mpirun not tool) - # if any problem occurs relate to an exit code, it will be caught in - # serial mode, so the test is fulfilled. - if test $h5haveexitcode = 'yes' -a -z "$pmode"; then - echo "EXIT CODE: $EXIT_CODE" >> $actual - fi - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - elif test $h5haveexitcode = 'yes' -a -z "$pmode"; then - echo "*FAILED*" - echo " Expected result ($expect) differs from actual result ($actual)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - else - # parallel mode output are often of different ordering from serial - # output. If the sorted expected and actual files compare the same, - # it is safe to assume the actual output match the expected file. - expect_sorted=expect_sorted - actual_sorted=actual_sorted - sort $expect -o $expect_sorted - sort $actual -o $actual_sorted - - # remove "EXIT CODE:" line from expect file. test for exit code - # is done by serial mode. - grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit - mv $expect_sorted.noexit $expect_sorted - - if $CMP $expect_sorted $actual_sorted; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" - $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' - echo "====The actual output ($actual_sav)" - sed 's/^/ /' < $actual_sav - echo "====The actual stderr ($actual_err_sav)" - sed 's/^/ /' < $actual_err_sav - echo "====End of actual stderr ($actual_err_sav)" - echo "" - fi - fi - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - rm -f $actual_sorted $expect_sorted - fi -} - -############################################################################## -### T H E T E S T S -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# Run the test -TOOLTEST h5diff_ud.txt -v tudfilter.h5 tudfilter2.h5 - -# print results -if test $nerrors -ne 0 ; then - echo "$nerrors errors encountered" - exit_code=$EXIT_FAILURE -else - echo "All Plugin API tests passed." - exit_code=$EXIT_SUCCESS -fi - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -# Clean up temporary files/directories and leave -$RM $PLUGIN_LIBDIR - -exit $exit_code diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in deleted file mode 100644 index 2cde4571982..00000000000 --- a/tools/test/h5diff/testh5diff.sh.in +++ /dev/null @@ -1,1232 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5diff tool -# - -srcdir=@srcdir@ - -TESTNAME=h5diff -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5DIFF=../../src/h5diff/h5diff # The tool name -H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 -verbose=yes -h5haveexitcode=yes # default is yes -pmode= # default to run h5diff tests -mydomainname=`domainname 2>/dev/null` - -# source dirs -SRC_TOOLS="$srcdir/../.." -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5DIFF_OUTFILES="$SRC_TOOLS/test/h5diff/expected" - -TESTDIR=./tmp -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DIFF_TESTFILES/h5diff_basic1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_basic2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_types.h5 -$SRC_H5DIFF_TESTFILES/h5diff_dtypes.h5 -$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_attr2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_attr3.h5 -$SRC_H5DIFF_TESTFILES/h5diff_dset1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_dset2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_dset3.h5 -$SRC_H5DIFF_TESTFILES/h5diff_hyper1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_hyper2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_empty.h5 -$SRC_H5DIFF_TESTFILES/h5diff_links.h5 -$SRC_H5DIFF_TESTFILES/h5diff_softlinks.h5 -$SRC_H5DIFF_TESTFILES/h5diff_linked_softlink.h5 -$SRC_H5DIFF_TESTFILES/h5diff_extlink_src.h5 -$SRC_H5DIFF_TESTFILES/h5diff_extlink_trg.h5 -$SRC_H5DIFF_TESTFILES/h5diff_ext2softlink_src.h5 -$SRC_H5DIFF_TESTFILES/h5diff_ext2softlink_trg.h5 -$SRC_H5DIFF_TESTFILES/h5diff_dset_zero_dim_size1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_dset_zero_dim_size2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_danglelinks1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_danglelinks2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse_ext1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse_ext2-1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse_ext2-2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse_ext2-3.h5 -$SRC_H5DIFF_TESTFILES/h5diff_exclude1-1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_exclude1-2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_exclude2-1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_exclude2-2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_exclude3-1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_exclude3-2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_comp_vl_strs.h5 -$SRC_H5DIFF_TESTFILES/compounds_array_vlen1.h5 -$SRC_H5DIFF_TESTFILES/compounds_array_vlen2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_attr_v_level1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_attr_v_level2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_enum_invalid_values.h5 -$SRC_H5DIFF_TESTFILES/non_comparables1.h5 -$SRC_H5DIFF_TESTFILES/non_comparables2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_strings1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_strings2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_eps1.h5 -$SRC_H5DIFF_TESTFILES/h5diff_eps2.h5 -$SRC_H5DIFF_TESTFILES/h5diff_onion_objs.h5 -$SRC_H5DIFF_TESTFILES/h5diff_onion_objs.h5.onion -$SRC_H5DIFF_TESTFILES/h5diff_onion_dset_ext.h5 -$SRC_H5DIFF_TESTFILES/h5diff_onion_dset_ext.h5.onion -$SRC_H5DIFF_TESTFILES/h5diff_onion_dset_1d.h5 -$SRC_H5DIFF_TESTFILES/h5diff_onion_dset_1d.h5.onion -" - -LIST_HDF5_VDS_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/vds/1_a.h5 -$SRC_H5DUMP_TESTFILES/vds/1_b.h5 -$SRC_H5DUMP_TESTFILES/vds/1_c.h5 -$SRC_H5DUMP_TESTFILES/vds/1_d.h5 -$SRC_H5DUMP_TESTFILES/vds/1_e.h5 -$SRC_H5DUMP_TESTFILES/vds/1_f.h5 -$SRC_H5DUMP_TESTFILES/vds/1_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/2_a.h5 -$SRC_H5DUMP_TESTFILES/vds/2_b.h5 -$SRC_H5DUMP_TESTFILES/vds/2_c.h5 -$SRC_H5DUMP_TESTFILES/vds/2_d.h5 -$SRC_H5DUMP_TESTFILES/vds/2_e.h5 -$SRC_H5DUMP_TESTFILES/vds/2_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/4_0.h5 -$SRC_H5DUMP_TESTFILES/vds/4_1.h5 -$SRC_H5DUMP_TESTFILES/vds/4_2.h5 -$SRC_H5DUMP_TESTFILES/vds/4_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/5_a.h5 -$SRC_H5DUMP_TESTFILES/vds/5_b.h5 -$SRC_H5DUMP_TESTFILES/vds/5_c.h5 -$SRC_H5DUMP_TESTFILES/vds/5_vds.h5 -" - -LIST_HDF5_STD_REF_OBJ_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/tvlstr.h5 -$SRC_H5DUMP_TESTFILES/trefer_attr.h5 -$SRC_H5DUMP_TESTFILES/trefer_compat.h5 -$SRC_H5DUMP_TESTFILES/trefer_ext1.h5 -$SRC_H5DUMP_TESTFILES/trefer_ext2.h5 -$SRC_H5DUMP_TESTFILES/trefer_grp.h5 -$SRC_H5DUMP_TESTFILES/trefer_obj_del.h5 -$SRC_H5DUMP_TESTFILES/trefer_obj.h5 -$SRC_H5DUMP_TESTFILES/trefer_param.h5 -$SRC_H5DUMP_TESTFILES/trefer_reg_1d.h5 -$SRC_H5DUMP_TESTFILES/trefer_reg.h5 -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5DIFF_OUTFILES/h5diff_10.txt -$SRC_H5DIFF_OUTFILES/h5diff_100.txt -$SRC_H5DIFF_OUTFILES/h5diff_101.txt -$SRC_H5DIFF_OUTFILES/h5diff_102.txt -$SRC_H5DIFF_OUTFILES/h5diff_103.txt -$SRC_H5DIFF_OUTFILES/h5diff_104.txt -$SRC_H5DIFF_OUTFILES/h5diff_11.txt -$SRC_H5DIFF_OUTFILES/h5diff_12.txt -$SRC_H5DIFF_OUTFILES/h5diff_13.txt -$SRC_H5DIFF_OUTFILES/h5diff_14.txt -$SRC_H5DIFF_OUTFILES/h5diff_15.txt -$SRC_H5DIFF_OUTFILES/h5diff_16_1.txt -$SRC_H5DIFF_OUTFILES/h5diff_16_2.txt -$SRC_H5DIFF_OUTFILES/h5diff_16_3.txt -$SRC_H5DIFF_OUTFILES/h5diff_17.txt -$SRC_H5DIFF_OUTFILES/h5diff_171.txt -$SRC_H5DIFF_OUTFILES/h5diff_172.txt -$SRC_H5DIFF_OUTFILES/h5diff_18_1.txt -$SRC_H5DIFF_OUTFILES/h5diff_18.txt -$SRC_H5DIFF_OUTFILES/h5diff_20.txt -$SRC_H5DIFF_OUTFILES/h5diff_200.txt -$SRC_H5DIFF_OUTFILES/h5diff_201.txt -$SRC_H5DIFF_OUTFILES/h5diff_202.txt -$SRC_H5DIFF_OUTFILES/h5diff_203.txt -$SRC_H5DIFF_OUTFILES/h5diff_204.txt -$SRC_H5DIFF_OUTFILES/h5diff_205.txt -$SRC_H5DIFF_OUTFILES/h5diff_206.txt -$SRC_H5DIFF_OUTFILES/h5diff_207.txt -$SRC_H5DIFF_OUTFILES/h5diff_208.txt -$SRC_H5DIFF_OUTFILES/h5diff_220.txt -$SRC_H5DIFF_OUTFILES/h5diff_221.txt -$SRC_H5DIFF_OUTFILES/h5diff_222.txt -$SRC_H5DIFF_OUTFILES/h5diff_223.txt -$SRC_H5DIFF_OUTFILES/h5diff_224.txt -$SRC_H5DIFF_OUTFILES/h5diff_21.txt -$SRC_H5DIFF_OUTFILES/h5diff_22.txt -$SRC_H5DIFF_OUTFILES/h5diff_23.txt -$SRC_H5DIFF_OUTFILES/h5diff_24.txt -$SRC_H5DIFF_OUTFILES/h5diff_25.txt -$SRC_H5DIFF_OUTFILES/h5diff_26.txt -$SRC_H5DIFF_OUTFILES/h5diff_27.txt -$SRC_H5DIFF_OUTFILES/h5diff_28.txt -$SRC_H5DIFF_OUTFILES/h5diff_30.txt -$SRC_H5DIFF_OUTFILES/h5diff_300.txt -$SRC_H5DIFF_OUTFILES/h5diff_400.txt -$SRC_H5DIFF_OUTFILES/h5diff_401.txt -$SRC_H5DIFF_OUTFILES/h5diff_402.txt -$SRC_H5DIFF_OUTFILES/h5diff_403.txt -$SRC_H5DIFF_OUTFILES/h5diff_404.txt -$SRC_H5DIFF_OUTFILES/h5diff_405.txt -$SRC_H5DIFF_OUTFILES/h5diff_406.txt -$SRC_H5DIFF_OUTFILES/h5diff_407.txt -$SRC_H5DIFF_OUTFILES/h5diff_408.txt -$SRC_H5DIFF_OUTFILES/h5diff_409.txt -$SRC_H5DIFF_OUTFILES/h5diff_410.txt -$SRC_H5DIFF_OUTFILES/h5diff_411.txt -$SRC_H5DIFF_OUTFILES/h5diff_412.txt -$SRC_H5DIFF_OUTFILES/h5diff_413.txt -$SRC_H5DIFF_OUTFILES/h5diff_414.txt -$SRC_H5DIFF_OUTFILES/h5diff_415.txt -$SRC_H5DIFF_OUTFILES/h5diff_416.txt -$SRC_H5DIFF_OUTFILES/h5diff_417.txt -$SRC_H5DIFF_OUTFILES/h5diff_418.txt -$SRC_H5DIFF_OUTFILES/h5diff_419.txt -$SRC_H5DIFF_OUTFILES/h5diff_420.txt -$SRC_H5DIFF_OUTFILES/h5diff_421.txt -$SRC_H5DIFF_OUTFILES/h5diff_422.txt -$SRC_H5DIFF_OUTFILES/h5diff_423.txt -$SRC_H5DIFF_OUTFILES/h5diff_424.txt -$SRC_H5DIFF_OUTFILES/h5diff_425.txt -$SRC_H5DIFF_OUTFILES/h5diff_450.txt -$SRC_H5DIFF_OUTFILES/h5diff_451.txt -$SRC_H5DIFF_OUTFILES/h5diff_452.txt -$SRC_H5DIFF_OUTFILES/h5diff_453.txt -$SRC_H5DIFF_OUTFILES/h5diff_454.txt -$SRC_H5DIFF_OUTFILES/h5diff_455.txt -$SRC_H5DIFF_OUTFILES/h5diff_456.txt -$SRC_H5DIFF_OUTFILES/h5diff_457.txt -$SRC_H5DIFF_OUTFILES/h5diff_458.txt -$SRC_H5DIFF_OUTFILES/h5diff_459.txt -$SRC_H5DIFF_OUTFILES/h5diff_465.txt -$SRC_H5DIFF_OUTFILES/h5diff_466.txt -$SRC_H5DIFF_OUTFILES/h5diff_467.txt -$SRC_H5DIFF_OUTFILES/h5diff_468.txt -$SRC_H5DIFF_OUTFILES/h5diff_469.txt -$SRC_H5DIFF_OUTFILES/h5diff_471.txt -$SRC_H5DIFF_OUTFILES/h5diff_472.txt -$SRC_H5DIFF_OUTFILES/h5diff_473.txt -$SRC_H5DIFF_OUTFILES/h5diff_474.txt -$SRC_H5DIFF_OUTFILES/h5diff_475.txt -$SRC_H5DIFF_OUTFILES/h5diff_480.txt -$SRC_H5DIFF_OUTFILES/h5diff_481.txt -$SRC_H5DIFF_OUTFILES/h5diff_482.txt -$SRC_H5DIFF_OUTFILES/h5diff_483.txt -$SRC_H5DIFF_OUTFILES/h5diff_484.txt -$SRC_H5DIFF_OUTFILES/h5diff_485.txt -$SRC_H5DIFF_OUTFILES/h5diff_486.txt -$SRC_H5DIFF_OUTFILES/h5diff_487.txt -$SRC_H5DIFF_OUTFILES/h5diff_50.txt -$SRC_H5DIFF_OUTFILES/h5diff_51.txt -$SRC_H5DIFF_OUTFILES/h5diff_52.txt -$SRC_H5DIFF_OUTFILES/h5diff_53.txt -$SRC_H5DIFF_OUTFILES/h5diff_54.txt -$SRC_H5DIFF_OUTFILES/h5diff_55.txt -$SRC_H5DIFF_OUTFILES/h5diff_56.txt -$SRC_H5DIFF_OUTFILES/h5diff_57.txt -$SRC_H5DIFF_OUTFILES/h5diff_58.txt -$SRC_H5DIFF_OUTFILES/h5diff_58_ref.txt -$SRC_H5DIFF_OUTFILES/h5diff_59.txt -$SRC_H5DIFF_OUTFILES/h5diff_500.txt -$SRC_H5DIFF_OUTFILES/h5diff_501.txt -$SRC_H5DIFF_OUTFILES/h5diff_502.txt -$SRC_H5DIFF_OUTFILES/h5diff_503.txt -$SRC_H5DIFF_OUTFILES/h5diff_504.txt -$SRC_H5DIFF_OUTFILES/h5diff_505.txt -$SRC_H5DIFF_OUTFILES/h5diff_506.txt -$SRC_H5DIFF_OUTFILES/h5diff_507.txt -$SRC_H5DIFF_OUTFILES/h5diff_508.txt -$SRC_H5DIFF_OUTFILES/h5diff_509.txt -$SRC_H5DIFF_OUTFILES/h5diff_510.txt -$SRC_H5DIFF_OUTFILES/h5diff_511.txt -$SRC_H5DIFF_OUTFILES/h5diff_512.txt -$SRC_H5DIFF_OUTFILES/h5diff_513.txt -$SRC_H5DIFF_OUTFILES/h5diff_514.txt -$SRC_H5DIFF_OUTFILES/h5diff_515.txt -$SRC_H5DIFF_OUTFILES/h5diff_516.txt -$SRC_H5DIFF_OUTFILES/h5diff_517.txt -$SRC_H5DIFF_OUTFILES/h5diff_518.txt -$SRC_H5DIFF_OUTFILES/h5diff_530.txt -$SRC_H5DIFF_OUTFILES/h5diff_540.txt -$SRC_H5DIFF_OUTFILES/h5diff_60.txt -$SRC_H5DIFF_OUTFILES/h5diff_61.txt -$SRC_H5DIFF_OUTFILES/h5diff_62.txt -$SRC_H5DIFF_OUTFILES/h5diff_63.txt -$SRC_H5DIFF_OUTFILES/h5diff_600.txt -$SRC_H5DIFF_OUTFILES/h5diff_601.txt -$SRC_H5DIFF_OUTFILES/h5diff_603.txt -$SRC_H5DIFF_OUTFILES/h5diff_604.txt -$SRC_H5DIFF_OUTFILES/h5diff_605.txt -$SRC_H5DIFF_OUTFILES/h5diff_606.txt -$SRC_H5DIFF_OUTFILES/h5diff_607.txt -$SRC_H5DIFF_OUTFILES/h5diff_608.txt -$SRC_H5DIFF_OUTFILES/h5diff_609.txt -$SRC_H5DIFF_OUTFILES/h5diff_610.txt -$SRC_H5DIFF_OUTFILES/h5diff_612.txt -$SRC_H5DIFF_OUTFILES/h5diff_613.txt -$SRC_H5DIFF_OUTFILES/h5diff_614.txt -$SRC_H5DIFF_OUTFILES/h5diff_615.txt -$SRC_H5DIFF_OUTFILES/h5diff_616.txt -$SRC_H5DIFF_OUTFILES/h5diff_617.txt -$SRC_H5DIFF_OUTFILES/h5diff_618.txt -$SRC_H5DIFF_OUTFILES/h5diff_619.txt -$SRC_H5DIFF_OUTFILES/h5diff_621.txt -$SRC_H5DIFF_OUTFILES/h5diff_622.txt -$SRC_H5DIFF_OUTFILES/h5diff_623.txt -$SRC_H5DIFF_OUTFILES/h5diff_624.txt -$SRC_H5DIFF_OUTFILES/h5diff_625.txt -$SRC_H5DIFF_OUTFILES/h5diff_626.txt -$SRC_H5DIFF_OUTFILES/h5diff_627.txt -$SRC_H5DIFF_OUTFILES/h5diff_628.txt -$SRC_H5DIFF_OUTFILES/h5diff_629.txt -$SRC_H5DIFF_OUTFILES/h5diff_630.txt -$SRC_H5DIFF_OUTFILES/h5diff_631.txt -$SRC_H5DIFF_OUTFILES/h5diff_640.txt -$SRC_H5DIFF_OUTFILES/h5diff_641.txt -$SRC_H5DIFF_OUTFILES/h5diff_642.txt -$SRC_H5DIFF_OUTFILES/h5diff_643.txt -$SRC_H5DIFF_OUTFILES/h5diff_644.txt -$SRC_H5DIFF_OUTFILES/h5diff_645.txt -$SRC_H5DIFF_OUTFILES/h5diff_646.txt -$SRC_H5DIFF_OUTFILES/h5diff_70.txt -$SRC_H5DIFF_OUTFILES/h5diff_700.txt -$SRC_H5DIFF_OUTFILES/h5diff_701.txt -$SRC_H5DIFF_OUTFILES/h5diff_702.txt -$SRC_H5DIFF_OUTFILES/h5diff_703.txt -$SRC_H5DIFF_OUTFILES/h5diff_704.txt -$SRC_H5DIFF_OUTFILES/h5diff_705.txt -$SRC_H5DIFF_OUTFILES/h5diff_706.txt -$SRC_H5DIFF_OUTFILES/h5diff_707.txt -$SRC_H5DIFF_OUTFILES/h5diff_708.txt -$SRC_H5DIFF_OUTFILES/h5diff_709.txt -$SRC_H5DIFF_OUTFILES/h5diff_710.txt -$SRC_H5DIFF_OUTFILES/h5diff_80.txt -$SRC_H5DIFF_OUTFILES/h5diff_800.txt -$SRC_H5DIFF_OUTFILES/h5diff_801.txt -$SRC_H5DIFF_OUTFILES/h5diff_830.txt -$SRC_H5DIFF_OUTFILES/h5diff_90.txt -$SRC_H5DIFF_OUTFILES/h5diff_900.txt -$SRC_H5DIFF_OUTFILES/h5diff_901.txt -$SRC_H5DIFF_OUTFILES/h5diff_902.txt -$SRC_H5DIFF_OUTFILES/h5diff_8625.txt -$SRC_H5DIFF_OUTFILES/h5diff_8639.txt -$SRC_H5DIFF_OUTFILES/h5diff_reg.txt -$SRC_H5DIFF_OUTFILES/h5diff_v1.txt -$SRC_H5DIFF_OUTFILES/h5diff_v2.txt -$SRC_H5DIFF_OUTFILES/h5diff_v3.txt -$SRC_H5DIFF_OUTFILES/h5diff_vlstr.txt -$SRC_H5DIFF_OUTFILES/h5diff_eps.txt -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_HDF5_VDS_TEST_FILES $LIST_HDF5_STD_REF_OBJ_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5DIFF_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - else - # files in $LIST_HDF5_VDS_TEST_FILES are copied in from a different - # directory, so when srcdir is the same as destdir and $TESTDIR is - # not deleted, the copy n $TESTDIR of each file from - # $LIST_HDF5_VDS_TEST_FILES will need to be deleted. - for tstfile in $LIST_HDF5_VDS_TEST_FILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - fname=`basename $tstfile` - rm $TESTDIR/$fname - fi - done - fi -} - -# Parse option -# -p run ph5diff tests -# -h print help page -while [ $# -gt 0 ]; do - case "$1" in - -p) # reset the tool name and bin to run ph5diff tests - TESTNAME=ph5diff - H5DIFF=../../src/h5diff/ph5diff # The tool name - H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary - pmode=yes - shift - ;; - -h) # print help page - echo "$0 [-p] [-h]" - echo " -p run ph5diff tests" - echo " -h print help page" - shift - exit 0 - ;; - *) # unknown option - echo "$0: Unknown option ($1)" - exit 1 - ;; - esac -done - -# RUNSERIAL is used. Check if it can return exit code from executalbe correctly. -if [ -n "$RUNSERIAL_NOEXITCODE" ]; then - echo "***Warning*** Serial Exit Code is not passed back to shell correctly." - echo "***Warning*** Exit code checking is skipped." - h5haveexitcode=no -fi - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -# Need eval before the RUNCMD command because some machines like -# AIX, has RUNPARALLEL in the style as -# MP_PROCS=3 MP_TASKS_PER_NODE=3 poe ./a.out -# that throws the shell script off. -# -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .txt`.out" - actual_err="$TESTDIR/`basename $1 .txt`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - if test -n "$pmode"; then - RUNCMD=$RUNPARALLEL - else - RUNCMD=$RUNSERIAL - fi - - # Run test. - TESTING $H5DIFF $@ - ( - #echo "#############################" - #echo "Expected output for '$H5DIFF $@'" - #echo "#############################" - cd $TESTDIR - eval $RUNCMD $H5DIFF_BIN "$@" - ) >$actual 2>$actual_err - EXIT_CODE=$? - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - - # don't add exit code check in pmode, as it causes failure. (exit code - # is from mpirun not tool) - # if any problem occurs relate to an exit code, it will be caught in - # serial mode, so the test is fulfilled. - if test $h5haveexitcode = 'yes' -a -z "$pmode"; then - echo "EXIT CODE: $EXIT_CODE" >> $actual - fi - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - elif test $h5haveexitcode = 'yes' -a -z "$pmode"; then - echo "*FAILED*" - echo " Expected result ($expect) differs from actual result ($actual)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - else - # parallel mode output are often of different ordering from serial - # output. If the sorted expected and actual files compare the same, - # it is safe to assume the actual output match the expected file. - expect_sorted=expect_sorted - actual_sorted=actual_sorted - sort $expect -o $expect_sorted - sort $actual -o $actual_sorted - # remove "EXIT CODE:" line from expect file. test for exit code - # is done by serial mode. - grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit - mv $expect_sorted.noexit $expect_sorted - - if $CMP $expect_sorted $actual_sorted; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" - $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' - echo "====The actual output ($actual_sav)" - sed 's/^/ /' < $actual_sav - echo "====The actual stderr ($actual_err_sav)" - sed 's/^/ /' < $actual_err_sav - echo "====End of actual stderr ($actual_err_sav)" - echo "" - fi - fi - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - rm -f $actual_sorted $expect_sorted - fi -} - - -# Print a "SKIP" message -SKIP() { - TESTING $H5DIFF $@ - echo " -SKIP-" -} - - - -############################################################################## -# The tests -# To avoid the printing of the complete full path of the test file, that hides -# all the other parameters for long paths, the printing of the command line -# is done first in -# TESTING with the name only of the test file $TOOL, not its full path $TESTFILE -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR -# second copy of tvlstr.h5 -$CP -f $SRC_H5DUMP_TESTFILES/tvlstr.h5 $TESTDIR/tvlstr2.h5 - -# ############################################################################ -# # Common usage -# ############################################################################ - -# 1.0 -TOOLTEST h5diff_10.txt -h - -# 1.1 normal mode -TOOLTEST h5diff_11.txt h5diff_basic1.h5 h5diff_basic2.h5 - -# 1.2 normal mode with objects -TOOLTEST h5diff_12.txt h5diff_basic1.h5 h5diff_basic2.h5 g1/dset1 g1/dset2 - -# 1.3 report mode -TOOLTEST h5diff_13.txt -r h5diff_basic1.h5 h5diff_basic2.h5 - -# 1.4 report mode with objects -TOOLTEST h5diff_14.txt -r h5diff_basic1.h5 h5diff_basic2.h5 g1/dset1 g1/dset2 - -# 1.5 with -d -TOOLTEST h5diff_15.txt --report --delta=5 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 1.6.1 with -p (int) -TOOLTEST h5diff_16_1.txt -v -p 0.02 h5diff_basic1.h5 h5diff_basic1.h5 g1/dset5 g1/dset6 - -# 1.6.2 with -p (unsigned long_long) -TOOLTEST h5diff_16_2.txt --verbose --relative=0.02 h5diff_basic1.h5 h5diff_basic1.h5 g1/dset7 g1/dset8 - -# 1.6.3 with -p (double) -TOOLTEST h5diff_16_3.txt -v -p 0.02 h5diff_basic1.h5 h5diff_basic1.h5 g1/dset9 g1/dset10 - -# 1.7 verbose mode -TOOLTEST h5diff_17.txt -v h5diff_basic1.h5 h5diff_basic2.h5 - -# 1.7 test 32-bit INFINITY -TOOLTEST h5diff_171.txt -v h5diff_basic1.h5 h5diff_basic1.h5 /g1/fp19 /g1/fp19_COPY - -# 1.7 test 64-bit INFINITY -TOOLTEST h5diff_172.txt -v h5diff_basic1.h5 h5diff_basic1.h5 /g1/fp20 /g1/fp20_COPY - -# 1.8 quiet mode -TOOLTEST h5diff_18.txt -q h5diff_basic1.h5 h5diff_basic2.h5 - -# 1.8 -v and -q -TOOLTEST h5diff_18_1.txt -v -q h5diff_basic1.h5 h5diff_basic2.h5 - - -# ############################################################################## -# # not comparable types -# ############################################################################## - -# 2.0 -TOOLTEST h5diff_20.txt -v h5diff_types.h5 h5diff_types.h5 dset g1 - -# 2.1 -TOOLTEST h5diff_21.txt -v h5diff_types.h5 h5diff_types.h5 dset l1 - -# 2.2 -TOOLTEST h5diff_22.txt -v h5diff_types.h5 h5diff_types.h5 dset t1 - -# ############################################################################## -# # compare groups, types, links (no differences and differences) -# ############################################################################## - -# 2.3 -TOOLTEST h5diff_23.txt -v h5diff_types.h5 h5diff_types.h5 g1 g1 - -# 2.4 -TOOLTEST h5diff_24.txt -v h5diff_types.h5 h5diff_types.h5 t1 t1 - -# 2.5 -TOOLTEST h5diff_25.txt -v h5diff_types.h5 h5diff_types.h5 l1 l1 - -# 2.6 -TOOLTEST h5diff_26.txt -v h5diff_types.h5 h5diff_types.h5 g1 g2 - -# 2.7 -TOOLTEST h5diff_27.txt -v h5diff_types.h5 h5diff_types.h5 t1 t2 - -# 2.8 -TOOLTEST h5diff_28.txt -v h5diff_types.h5 h5diff_types.h5 l1 l2 - - -# ############################################################################## -# # Enum value tests (may become more comprehensive in the future) -# ############################################################################## - -# 3.0 -# test enum types which may have invalid values -TOOLTEST h5diff_30.txt -v h5diff_enum_invalid_values.h5 h5diff_enum_invalid_values.h5 dset1 dset2 - - -# ############################################################################## -# # Dataset datatypes -# ############################################################################## - -# 5.0 -TOOLTEST h5diff_50.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset0a dset0b - -# 5.1 -TOOLTEST h5diff_51.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset1a dset1b - -# 5.2 -TOOLTEST h5diff_52.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset2a dset2b - -# 5.3 -TOOLTEST h5diff_53.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset3a dset4b - -# 5.4 -TOOLTEST h5diff_54.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset4a dset4b - -# 5.5 -TOOLTEST h5diff_55.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset5a dset5b - -# 5.6 -TOOLTEST h5diff_56.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset6a dset6b - -# 5.7 -TOOLTEST h5diff_57.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset7a dset7b - -# 5.8 (region reference) -TOOLTEST h5diff_58.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 refreg -TOOLTEST h5diff_58_ref.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 /g1/reference2D -# STD_REF_OBJ -TOOLTEST h5diff_reg.txt -v2 trefer_attr.h5 trefer_ext2.h5 Dataset3 Dataset3 - -# test for both dset and attr with same type but with different size -# ( HDDFV-7942 ) -TOOLTEST h5diff_59.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset11a dset11b - -# Strings -# ( HDFFV-10128 ) -TOOLTEST h5diff_60.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string1 string1 -TOOLTEST h5diff_61.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string2 string2 -TOOLTEST h5diff_62.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string3 string3 -TOOLTEST h5diff_63.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string4 string4 - -# ############################################################################## -# # Error messages -# ############################################################################## - - -# 6.0: Check if the command line number of arguments is less than 3 -TOOLTEST h5diff_600.txt h5diff_basic1.h5 - -# 6.1: Check if non-exist object name is specified -TOOLTEST h5diff_601.txt h5diff_basic1.h5 h5diff_basic1.h5 nono_obj - - -# ############################################################################## -# # -d -# ############################################################################## - - -# 6.3: negative value -TOOLTEST h5diff_603.txt -d -4 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.4: zero -TOOLTEST h5diff_604.txt -d 0 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.5: non number -TOOLTEST h5diff_605.txt -d u h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.6: hexadecimal -TOOLTEST h5diff_606.txt -d 0x1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.7: string -TOOLTEST h5diff_607.txt -d "1" h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.8: use system epsilon -TOOLTEST h5diff_608.txt --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.9: number larger than biggest difference -TOOLTEST h5diff_609.txt -d 200 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.10: number smaller than smallest difference -TOOLTEST h5diff_610.txt -d 1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# eps: number smaller than epsilon -TOOLTEST h5diff_eps.txt -v3 -d 1e-16 h5diff_eps1.h5 h5diff_eps2.h5 - - -# ############################################################################## -# # -p -# ############################################################################## - - -# 6.12: negative value -TOOLTEST h5diff_612.txt -p -4 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.13: zero -TOOLTEST h5diff_613.txt -p 0 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.14: non number -TOOLTEST h5diff_614.txt -p u h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.15: hexadecimal -TOOLTEST h5diff_615.txt -p 0x1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.16: string -TOOLTEST h5diff_616.txt -p "0.21" h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.17: repeated option -TOOLTEST h5diff_617.txt -p 0.21 -p 0.22 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.18: number larger than biggest difference -TOOLTEST h5diff_618.txt -p 2 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.19: number smaller than smallest difference -TOOLTEST h5diff_619.txt -p 0.005 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# ############################################################################## -# # -n -# ############################################################################## - -# 6.21: negative value -TOOLTEST h5diff_621.txt -n -4 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.22: zero -TOOLTEST h5diff_622.txt -n 0 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.23: non number -TOOLTEST h5diff_623.txt -n u h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.24: hexadecimal -TOOLTEST h5diff_624.txt -n 0x1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.25: string -TOOLTEST h5diff_625.txt -n "2" h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.26: repeated option -TOOLTEST h5diff_626.txt -n 2 -n 3 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.27: number larger than biggest difference -TOOLTEST h5diff_627.txt --count=200 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# 6.28: number smaller than smallest difference -TOOLTEST h5diff_628.txt -n 1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - -# Disabling this test as it hangs - LRK 20090618 -# 6.29 non valid files -#TOOLTEST h5diff_629.txt file1.h6 file2.h6 - -# ############################################################################## -# # NaN -# ############################################################################## -# 6.30: test (NaN == NaN) must be true based on our documentation -- XCAO -TOOLTEST h5diff_630.txt -v -d "0.0001" h5diff_basic1.h5 h5diff_basic1.h5 g1/fp18 g1/fp18_COPY -TOOLTEST h5diff_631.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/fp18 g1/fp18_COPY - - -# ############################################################################## -# 7. attributes -# ############################################################################## -TOOLTEST h5diff_70.txt -v h5diff_attr1.h5 h5diff_attr2.h5 - -# ################################################## -# attrs with verbose option level -# ################################################## -TOOLTEST h5diff_700.txt -v1 h5diff_attr1.h5 h5diff_attr2.h5 -TOOLTEST h5diff_701.txt -v2 h5diff_attr1.h5 h5diff_attr2.h5 -TOOLTEST h5diff_702.txt --verbose=1 h5diff_attr1.h5 h5diff_attr2.h5 -TOOLTEST h5diff_703.txt --verbose=2 h5diff_attr1.h5 h5diff_attr2.h5 - -# same attr number , all same attr name -TOOLTEST h5diff_704.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g - -# same attr number , some same attr name -TOOLTEST h5diff_705.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /dset - -# same attr number , all different attr name -TOOLTEST h5diff_706.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /ntype - -# different attr number , same attr name (intersected) -TOOLTEST h5diff_707.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g2 - -# different attr number , all different attr name -TOOLTEST h5diff_708.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g3 - -# when no attributes exist in both objects -TOOLTEST h5diff_709.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g4 - -# file vs file -TOOLTEST h5diff_710.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 - -# ############################################################################## -# 8. all dataset datatypes -# ############################################################################## -TOOLTEST h5diff_80.txt -v h5diff_dset1.h5 h5diff_dset2.h5 - -# 9. compare a file with itself -TOOLTEST h5diff_90.txt -v h5diff_basic2.h5 h5diff_basic2.h5 - -# 10. read by hyperslab, print indexes -TOOLTEST h5diff_100.txt -v h5diff_hyper1.h5 h5diff_hyper2.h5 - -# 11. floating point comparison -# double value -TOOLTEST h5diff_101.txt -v h5diff_basic1.h5 h5diff_basic1.h5 g1/d1 g1/d2 - -# float value -TOOLTEST h5diff_102.txt -v h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2 - -# with --use-system-epsilon for double value -TOOLTEST h5diff_103.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/d1 g1/d2 - -# with --use-system-epsilon for float value -TOOLTEST h5diff_104.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2 - -# not comparable -c flag -TOOLTEST h5diff_200.txt h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2 - -TOOLTEST h5diff_201.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2 - -TOOLTEST h5diff_202.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset2 g2/dset3 - -TOOLTEST h5diff_203.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset3 g2/dset4 - -TOOLTEST h5diff_204.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset4 g2/dset5 - -TOOLTEST h5diff_205.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset5 g2/dset6 - -# not comparable in compound -TOOLTEST h5diff_206.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset7 g2/dset8 - -TOOLTEST h5diff_207.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset8 g2/dset9 - -# not comparable in dataspace of zero dimension size -TOOLTEST h5diff_208.txt -c h5diff_dset_zero_dim_size1.h5 h5diff_dset_zero_dim_size2.h5 - -# non-comparable dataset with comparable attribute, and other comparable datasets. -# Also test non-compatible attributes with different type, dimension, rank. -# All the comparables should display differences. -TOOLTEST h5diff_220.txt -c non_comparables1.h5 non_comparables2.h5 /g1 - -# comparable dataset with non-comparable attribute and other comparable attributes. -# All the comparables should display differences. -TOOLTEST h5diff_221.txt -c non_comparables1.h5 non_comparables2.h5 /g2 - -# entire file -# All the comparables should display differences. -TOOLTEST h5diff_222.txt -c non_comparables1.h5 non_comparables2.h5 - -# non-comparable test for common objects (same name) with different object types -# (HDFFV-7644) -TOOLTEST h5diff_223.txt -c non_comparables1.h5 non_comparables2.h5 /diffobjtypes -# swap files -TOOLTEST h5diff_224.txt -c non_comparables2.h5 non_comparables1.h5 /diffobjtypes - -# ############################################################################## -# # Links compare without --follow-symlinks nor --no-dangling-links -# ############################################################################## -# test for bug1749 -TOOLTEST h5diff_300.txt -v h5diff_links.h5 h5diff_links.h5 /link_g1 /link_g2 - -# ############################################################################## -# # Links compare with --follow-symlinks Only -# ############################################################################## -# soft links file to file -TOOLTEST h5diff_400.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 - -# softlink vs dset" -TOOLTEST h5diff_401.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset1_1 /target_dset2 - -# dset vs softlink" -TOOLTEST h5diff_402.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /target_dset2 /softlink_dset1_1 - -# softlink vs softlink" -TOOLTEST h5diff_403.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset1_1 /softlink_dset2 - -# extlink vs extlink (FILE)" -TOOLTEST h5diff_404.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 - -# extlink vs dset" -TOOLTEST h5diff_405.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_trg.h5 /ext_link_dset1 /target_group2/x_dset - -# dset vs extlink" -TOOLTEST h5diff_406.txt --follow-symlinks -v h5diff_extlink_trg.h5 h5diff_extlink_src.h5 /target_group2/x_dset /ext_link_dset1 - -# extlink vs extlink" -TOOLTEST h5diff_407.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_dset2 - -# softlink vs extlink" -TOOLTEST h5diff_408.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_extlink_src.h5 /softlink_dset1_1 /ext_link_dset2 - -# extlink vs softlink " -TOOLTEST h5diff_409.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_softlinks.h5 /ext_link_dset2 /softlink_dset1_1 - -# linked_softlink vs linked_softlink (FILE)" -TOOLTEST h5diff_410.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 - -# dset2 vs linked_softlink_dset1" -TOOLTEST h5diff_411.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /target_dset2 /softlink1_to_slink2 - -# linked_softlink_dset1 vs dset2" -TOOLTEST h5diff_412.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /softlink1_to_slink2 /target_dset2 - -# linked_softlink_to_dset1 vs linked_softlink_to_dset2" -TOOLTEST h5diff_413.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /softlink1_to_slink2 /softlink2_to_slink2 - -# group vs linked_softlink_group1" -TOOLTEST h5diff_414.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /target_group /softlink3_to_slink2 - -# linked_softlink_group1 vs group" -TOOLTEST h5diff_415.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /softlink3_to_slink2 /target_group - -# linked_softlink_to_group1 vs linked_softlink_to_group2" -TOOLTEST h5diff_416.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /softlink3_to_slink2 /softlink4_to_slink2 - -# non-exist-softlink vs softlink" -TOOLTEST h5diff_417.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_noexist /softlink_dset2 - -# softlink vs non-exist-softlink" -TOOLTEST h5diff_418.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset2 /softlink_noexist - -# non-exist-extlink_file vs extlink" -TOOLTEST h5diff_419.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist2 /ext_link_dset2 - -# exlink vs non-exist-extlink_file" -TOOLTEST h5diff_420.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset2 /ext_link_noexist2 - -# extlink vs non-exist-extlink_obj" -TOOLTEST h5diff_421.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset2 /ext_link_noexist1 - -# non-exist-extlink_obj vs extlink" -TOOLTEST h5diff_422.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist1 /ext_link_dset2 - -# extlink_to_softlink_to_dset1 vs dset2" -TOOLTEST h5diff_423.txt --follow-symlinks -v h5diff_ext2softlink_src.h5 h5diff_ext2softlink_trg.h5 /ext_link_to_slink1 /dset2 - -# dset2 vs extlink_to_softlink_to_dset1" -TOOLTEST h5diff_424.txt --follow-symlinks -v h5diff_ext2softlink_trg.h5 h5diff_ext2softlink_src.h5 /dset2 /ext_link_to_slink1 - -# extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2" -TOOLTEST h5diff_425.txt --follow-symlinks -v h5diff_ext2softlink_src.h5 h5diff_ext2softlink_src.h5 /ext_link_to_slink1 /ext_link_to_slink2 - -# ############################################################################## -# # Dangling links compare (--follow-symlinks and --no-dangling-links) -# ############################################################################## -# dangling links --follow-symlinks (FILE to FILE) -TOOLTEST h5diff_450.txt --follow-symlinks -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 - -# dangling links --follow-symlinks and --no-dangling-links (FILE to FILE) -TOOLTEST h5diff_451.txt --follow-symlinks -v --no-dangling-links h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 - -# try --no-dangling-links without --follow-symlinks options -TOOLTEST h5diff_452.txt --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 - -# dangling link found for soft links (FILE to FILE) -TOOLTEST h5diff_453.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 - -# dangling link found for soft links (obj to obj) -TOOLTEST h5diff_454.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset2 /softlink_noexist - -# dangling link found for soft links (obj to obj) Both dangle links -TOOLTEST h5diff_455.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_noexist /softlink_noexist - -# dangling link found for ext links (FILE to FILE) -TOOLTEST h5diff_456.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 - -# dangling link found for ext links (obj to obj). target file exist -TOOLTEST h5diff_457.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist1 - -# dangling link found for ext links (obj to obj). target file NOT exist -TOOLTEST h5diff_458.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist2 - -# dangling link found for ext links (obj to obj). Both dangle links -TOOLTEST h5diff_459.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist1 /ext_link_noexist2 - -# dangling link --follow-symlinks (obj vs obj) -# (HDFFV-7836) -TOOLTEST h5diff_465.txt --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1 -# (HDFFV-7835) -# soft dangling vs. soft dangling -TOOLTEST h5diff_466.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1 -# soft link vs. soft dangling -TOOLTEST h5diff_467.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link2 -# ext dangling vs. ext dangling -TOOLTEST h5diff_468.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4 -# ext link vs. ext dangling -TOOLTEST h5diff_469.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2 - -#---------------------------------------- -# dangling links without follow symlink -# (HDFFV-7998) -# test - soft dangle links (same and different paths), -# - external dangle links (same and different paths) -TOOLTEST h5diff_471.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 -TOOLTEST h5diff_472.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1 -TOOLTEST h5diff_473.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link4 -TOOLTEST h5diff_474.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4 -TOOLTEST h5diff_475.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link1 - -# ############################################################################## -# # test for group diff recursively -# ############################################################################## -# root -TOOLTEST h5diff_500.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / / -TOOLTEST h5diff_501.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / / - -# root vs group -TOOLTEST h5diff_502.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / /grp1/grp2/grp3 - -# group vs group (same name and structure) -TOOLTEST h5diff_503.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /grp1 - -# group vs group (different name and structure) -TOOLTEST h5diff_504.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1/grp2 /grp1/grp2/grp3 - -# groups vs soft-link -TOOLTEST h5diff_505.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /slink_grp1 -TOOLTEST h5diff_506.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1/grp2 /slink_grp2 - -# groups vs ext-link -TOOLTEST h5diff_507.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /elink_grp1 -TOOLTEST h5diff_508.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /elink_grp1 - -# soft-link vs ext-link -TOOLTEST h5diff_509.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp1 /elink_grp1 -TOOLTEST h5diff_510.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp1 /elink_grp1 - -# circled ext links -TOOLTEST h5diff_511.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp10 /grp11 -TOOLTEST h5diff_512.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp10 /grp11 - -# circled soft2ext-link vs soft2ext-link -TOOLTEST h5diff_513.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp10 /slink_grp11 -TOOLTEST h5diff_514.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp10 /slink_grp11 - -############################################################################### -# Test for group recursive diff via multi-linked external links -# With follow-symlinks, file h5diff_grp_recurse_ext1.h5 and h5diff_grp_recurse_ext2-1.h5 should -# be same with the external links. -############################################################################### -# file vs file -TOOLTEST h5diff_515.txt -v h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5 -TOOLTEST h5diff_516.txt -v --follow-symlinks h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5 -# group vs group -TOOLTEST h5diff_517.txt -v h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5 /g1 -TOOLTEST h5diff_518.txt -v --follow-symlinks h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5 /g1 - -# ############################################################################## -# # Exclude objects (--exclude-path) -# ############################################################################## -# -# Same structure, same names and different value. -# -# Exclude the object with different value. Expect return - same -TOOLTEST h5diff_480.txt -v --exclude-path /group1/dset3 h5diff_exclude1-1.h5 h5diff_exclude1-2.h5 -# Verify different by not excluding. Expect return - diff -TOOLTEST h5diff_481.txt -v h5diff_exclude1-1.h5 h5diff_exclude1-2.h5 - -# -# Different structure, different names. -# -# Exclude all the different objects. Expect return - same -TOOLTEST h5diff_482.txt -v --exclude-path "/group1" --exclude-path "/dset1" h5diff_exclude2-1.h5 h5diff_exclude2-2.h5 -# Exclude only some different objects. Expect return - diff -TOOLTEST h5diff_483.txt -v --exclude-path "/group1" h5diff_exclude2-1.h5 h5diff_exclude2-2.h5 - -# Exclude from group compare -TOOLTEST h5diff_484.txt -v --exclude-path "/dset3" h5diff_exclude1-1.h5 h5diff_exclude1-2.h5 /group1 - -# -# Only one file contains unique objs. Common objs are same. -# (HDFFV-7837) -# -TOOLTEST h5diff_485.txt -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5 -TOOLTEST h5diff_486.txt -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5 -TOOLTEST h5diff_487.txt -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5 - - -# ############################################################################## -# # diff various multiple vlen and fixed strings in a compound type dataset -# ############################################################################## -TOOLTEST h5diff_530.txt -v h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group /group_copy -# test to verify HDFFV-8625 -TOOLTEST h5diff_8625.txt -v --enable-error-stack h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group/Compound_dset1 /group_copy/Compound_dset3 -# test to verify HDFFV-8639 -TOOLTEST h5diff_8639.txt -v h5diff_attr3.h5 h5diff_attr2.h5 /g1 -TOOLTEST h5diff_vlstr.txt -v tvlstr.h5 tvlstr2.h5 - -# ############################################################################## -# # Test container types (array,vlen) with multiple nested compound types -# # Complex compound types in dataset and attribute -# ############################################################################## -TOOLTEST h5diff_540.txt -v compounds_array_vlen1.h5 compounds_array_vlen2.h5 - -# ############################################################################## -# # Test mutually exclusive options -# ############################################################################## -# -# Test with -d , -p and --use-system-epsilon. -TOOLTEST h5diff_640.txt -v -d 5 -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 -TOOLTEST h5diff_641.txt -v -d 5 -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 -TOOLTEST h5diff_642.txt -v -p 0.05 -d 5 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 -TOOLTEST h5diff_643.txt -v -d 5 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 -TOOLTEST h5diff_644.txt -v --use-system-epsilon -d 5 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 -TOOLTEST h5diff_645.txt -v -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 -TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 - -# ############################################################################## -# # Test array variances -# ############################################################################## -TOOLTEST h5diff_800.txt -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array /g1/array -TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array - -# ############################################################################## -# # dataset subsets -# ############################################################################## -#TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 "/g1/array3D[0,0,0;2,2,1;2,2,2;]" "/g1/array3D[0,0,0;2,2,1;2,2,2;]" - -# ############################################################################## -# VDS tests -# ############################################################################## -TOOLTEST h5diff_v1.txt -v 1_vds.h5 2_vds.h5 -TOOLTEST h5diff_v2.txt -r 1_vds.h5 2_vds.h5 -TOOLTEST h5diff_v3.txt -c 1_vds.h5 2_vds.h5 - -# ############################################################################## -# Onion VFD tests -# ############################################################################## -# These tests won't pass under ph5diff -if test -z "$pmode"; then - TOOLTEST h5diff_900.txt -r -v --vfd-name-1 onion --vfd-info-1 0 --vfd-name-2 onion --vfd-info-2 1 h5diff_onion_objs.h5 h5diff_onion_objs.h5 - TOOLTEST h5diff_901.txt -r -v --vfd-name-1 onion --vfd-info-1 0 --vfd-name-2 onion --vfd-info-2 1 h5diff_onion_dset_ext.h5 h5diff_onion_dset_ext.h5 - TOOLTEST h5diff_902.txt -r -v --vfd-name-1 onion --vfd-info-1 0 --vfd-name-2 onion --vfd-info-2 1 h5diff_onion_dset_1d.h5 h5diff_onion_dset_1d.h5 -fi - -# ############################################################################## -# # END -# ############################################################################## - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5diff/testph5diff.sh.in b/tools/test/h5diff/testph5diff.sh.in deleted file mode 100644 index a8345e65046..00000000000 --- a/tools/test/h5diff/testph5diff.sh.in +++ /dev/null @@ -1,61 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -srcdir=@srcdir@ - -TESTNAME=ph5diff -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -TOOL=testh5diff.sh - -nerrors=0 - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Run a test. If a test fails then increment the `nerrors' global variable. -# -TOOLTEST() { - # Run test. - echo $TOOL "$@" - /bin/sh $TOOL "$@" - - # Check if the command failed and increment nerrors if so. - if test $? -ne 0 ; then - nerrors="`expr $nerrors + 1`" - fi -} - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - -# Invoke the regular h5diff testing script, with the -p parameter to indicate -# that it should run the parallel version of the tests -TOOLTEST -p - -# no need to print any message since this is just a shell to invoke -# testh5diff.sh which has already printed the result. Just exit. -if test $nerrors -eq 0 ; then - exit $EXIT_SUCCESS -else - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am deleted file mode 100644 index 619647c670e..00000000000 --- a/tools/test/h5dump/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include files in /src directory and /tools/lib directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib - -# Test programs and scripts -TEST_PROG=h5dumpgentest -TEST_SCRIPT=testh5dump.sh testh5dumppbits.sh testh5dumpvds.sh testh5dumpxml.sh - -check_PROGRAMS=$(TEST_PROG) binread -check_SCRIPTS=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../src/h5dump/h5dump$(EXEEXT) -if HAVE_SHARED_CONDITIONAL -if USE_PLUGINS_CONDITIONAL - TEST_SCRIPT += h5dump_plugin.sh -endif -endif - -# All the programs depend on the hdf5 and h5tools libraries -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -if HAVE_SHARED_CONDITIONAL - # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlibdump.la - libdynlibdump_la_SOURCES=dynlib_dump.c - libdynlibdump_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere -endif - -# Temporary files. *.h5 are generated by h5dumpgentest. They should -# copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES+=*.h5 *.bin *.onion -DISTCLEANFILES=testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh h5dump_plugin.sh - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5dump/h5dump_plugin.sh.in b/tools/test/h5dump/h5dump_plugin.sh.in deleted file mode 100644 index c9e485d565f..00000000000 --- a/tools/test/h5dump/h5dump_plugin.sh.in +++ /dev/null @@ -1,241 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -srcdir=@srcdir@ -TOP_BUILDDIR=@top_builddir@ - -# Determine backward compatibility options enabled -DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@" - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5DUMP=../../src/h5dump/h5dump # The h5dump tool name -H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary - -nerrors=0 -verbose=yes -h5haveexitcode=yes # default is yes - -TEST_NAME=ud_plugin -FROM_DIR=`pwd`/.libs -PLUGIN_LIB="$FROM_DIR/libdynlibdump.*" -PLUGIN_LIBDIR=testdir3 -RM='rm -rf' - -RM='rm -rf' -GREP='grep' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected" - -TESTDIR=./tmppl -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/tudfilter.h5 -$SRC_H5DUMP_OUTFILES/tudfilter.ddl -" - -# RUNSERIAL is used. Check if it can return exit code from executable correctly. -if [ -n "$RUNSERIAL_NOEXITCODE" ]; then - echo "***Warning*** Serial Exit Code is not passed back to shell correctly." - echo "***Warning*** Exit code checking is skipped." - h5haveexitcode=no -fi - -# Main Body -# Create test directories if not exists yet. -test -d $PLUGIN_LIBDIR || mkdir -p $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to create test directory($PLUGIN_LIBDIR)" - exit $EXIT_FAILURE -fi - -# copy plugin library for test -$CP $PLUGIN_LIB $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to copy plugin library ($PLUGIN_LIB) for test." - exit $EXIT_FAILURE -fi - -# setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}:${HDF5_PLUGIN_PATH}" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5DUMP_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a $* message left justified in a field of 70 characters -# -MESSAGE() { - SPACES=" " - echo "$* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -VERIFY() { - MESSAGE "Verifying $*" -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# If $1 == ignorecase then do caseless CMP and DIFF. -# ADD_H5_TEST -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - - # Run test. - TESTING $H5DUMP $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@" - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - cat $actual_err >> $actual - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual > /dev/null 2>&1 ; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext - fi - -} - -############################################################################## -### T H E T E S T S -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# Run the test -TOOLTEST tudfilter.ddl --enable-error-stack tudfilter.h5 - -# print results -if test $nerrors -ne 0 ; then - echo "$nerrors errors encountered" - exit_code=$EXIT_FAILURE -else - echo "All Plugin API tests passed." - exit_code=$EXIT_SUCCESS -fi - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -# Clean up temporary files/directories and leave -$RM $PLUGIN_LIBDIR - -exit $exit_code diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in deleted file mode 100644 index 6a60785e959..00000000000 --- a/tools/test/h5dump/testh5dump.sh.in +++ /dev/null @@ -1,1487 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5dump tool - -srcdir=@srcdir@ - -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=h5dump -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -DUMPER=../../src/h5dump/h5dump # The tool name -DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary - -H5DIFF=../../src/h5diff/h5diff # The h5diff tool name -H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary - -H5IMPORT=../../src/h5import/h5import # The h5import tool name -H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary - -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -GREP='grep' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -# Skip plugin module to test missing filter -# Also reset the VOL connector to only use the native connector, because of the -# error stack checking. QAK - 2019/03/09 -ENVCMD="env HDF5_PLUGIN_PRELOAD=:: HDF5_VOL_CONNECTOR=native" - -WORDS_BIGENDIAN="@WORDS_BIGENDIAN@" - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected" -SRC_H5DUMP_EXPFILES="$SRC_TOOLS/test/h5dump/exportfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" - -TEST_P_DIR=./testfiles -TESTDIR=./tmp -test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR -test -d $TESTDIR || mkdir -p $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/charsets.h5 -$SRC_H5DUMP_TESTFILES/file_space.h5 -$SRC_H5DUMP_TESTFILES/filter_fail.h5 -$SRC_H5DUMP_TESTFILES/packedbits.h5 -$SRC_H5DUMP_TESTFILES/t128bit_float.h5 -$SRC_H5DUMP_TESTFILES/taindices.h5 -$SRC_H5DUMP_TESTFILES/tall.h5 -$SRC_H5DUMP_TESTFILES/tarray1.h5 -$SRC_H5DUMP_TESTFILES/tarray1_big.h5 -$SRC_H5DUMP_TESTFILES/tarray2.h5 -$SRC_H5DUMP_TESTFILES/tarray3.h5 -$SRC_H5DUMP_TESTFILES/tarray4.h5 -$SRC_H5DUMP_TESTFILES/tarray5.h5 -$SRC_H5DUMP_TESTFILES/tarray6.h5 -$SRC_H5DUMP_TESTFILES/tarray7.h5 -$SRC_H5DUMP_TESTFILES/tarray8.h5 -$SRC_H5DUMP_TESTFILES/tattr.h5 -$SRC_H5DUMP_TESTFILES/tattr2.h5 -$SRC_H5DUMP_TESTFILES/tattr4_be.h5 -$SRC_H5DUMP_TESTFILES/tattrintsize.h5 -$SRC_H5DUMP_TESTFILES/tattrreg.h5 -$SRC_H5DUMP_TESTFILES/tbigdims.h5 -$SRC_H5DUMP_TESTFILES/tbinary.h5 -$SRC_H5DUMP_TESTFILES/tbitnopaque.h5 -$SRC_H5DUMP_TESTFILES/tchar.h5 -$SRC_H5DUMP_TESTFILES/tcmpdattrintsize.h5 -$SRC_H5DUMP_TESTFILES/tcmpdintsize.h5 -$SRC_H5DUMP_TESTFILES/tcompound.h5 -$SRC_H5DUMP_TESTFILES/tcompound_complex.h5 -$SRC_H5DUMP_TESTFILES/tcompound_complex2.h5 -$SRC_H5DUMP_TESTFILES/tdatareg.h5 -$SRC_H5DUMP_TESTFILES/tdset.h5 -$SRC_H5DUMP_TESTFILES/tempty.h5 -$SRC_H5DUMP_TESTFILES/tsoftlinks.h5 -$SRC_H5DUMP_TESTFILES/textlinkfar.h5 -$SRC_H5DUMP_TESTFILES/textlinksrc.h5 -$SRC_H5DUMP_TESTFILES/textlinktar.h5 -$SRC_H5DUMP_TESTFILES/textlink.h5 -$SRC_H5DUMP_TESTFILES/tfamily00000.h5 -$SRC_H5DUMP_TESTFILES/tfamily00001.h5 -$SRC_H5DUMP_TESTFILES/tfamily00002.h5 -$SRC_H5DUMP_TESTFILES/tfamily00003.h5 -$SRC_H5DUMP_TESTFILES/tfamily00004.h5 -$SRC_H5DUMP_TESTFILES/tfamily00005.h5 -$SRC_H5DUMP_TESTFILES/tfamily00006.h5 -$SRC_H5DUMP_TESTFILES/tfamily00007.h5 -$SRC_H5DUMP_TESTFILES/tfamily00008.h5 -$SRC_H5DUMP_TESTFILES/tfamily00009.h5 -$SRC_H5DUMP_TESTFILES/tfamily00010.h5 -$SRC_H5DUMP_TESTFILES/tfcontents1.h5 -$SRC_H5DUMP_TESTFILES/tfcontents2.h5 -$SRC_H5DUMP_TESTFILES/tfilters.h5 -$SRC_H5DUMP_TESTFILES/tfloatsattrs.h5 -$SRC_H5DUMP_TESTFILES/tfloat16.h5 -$SRC_H5DUMP_TESTFILES/tfloat16_be.h5 -$SRC_H5DUMP_TESTFILES/tfpformat.h5 -$SRC_H5DUMP_TESTFILES/tfvalues.h5 -$SRC_H5DUMP_TESTFILES/tgroup.h5 -$SRC_H5DUMP_TESTFILES/3790_infinite_loop.h5 -$SRC_H5DUMP_TESTFILES/tgrp_comments.h5 -$SRC_H5DUMP_TESTFILES/tgrpnullspace.h5 -$SRC_H5DUMP_TESTFILES/thlink.h5 -$SRC_H5DUMP_TESTFILES/thyperslab.h5 -$SRC_H5DUMP_TESTFILES/tintsattrs.h5 -$SRC_H5DUMP_TESTFILES/tints4dims.h5 -$SRC_H5DUMP_TESTFILES/tlarge_objname.h5 -$SRC_H5DUMP_TESTFILES/tldouble.h5 -$SRC_H5DUMP_TESTFILES/tldouble_scalar.h5 -$SRC_H5DUMP_TESTFILES/tlonglinks.h5 -$SRC_H5DUMP_TESTFILES/tloop.h5 -$SRC_H5DUMP_TESTFILES/tmulti-b.h5 -$SRC_H5DUMP_TESTFILES/tmulti-g.h5 -$SRC_H5DUMP_TESTFILES/tmulti-l.h5 -$SRC_H5DUMP_TESTFILES/tmulti-o.h5 -$SRC_H5DUMP_TESTFILES/tmulti-r.h5 -$SRC_H5DUMP_TESTFILES/tmulti-s.h5 -$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5 -$SRC_H5DUMP_TESTFILES/tnestedcomp.h5 -$SRC_H5DUMP_TESTFILES/tnestedcmpddt.h5 -$SRC_H5DUMP_TESTFILES/tno-subset.h5 -$SRC_H5DUMP_TESTFILES/tnullspace.h5 -$SRC_H5DUMP_TESTFILES/zerodim.h5 -$SRC_H5DUMP_TESTFILES/torderattr.h5 -$SRC_H5DUMP_TESTFILES/tordergr.h5 -$SRC_H5DUMP_TESTFILES/tsaf.h5 -$SRC_H5DUMP_TESTFILES/tscalarattrintsize.h5 -$SRC_H5DUMP_TESTFILES/tscalarintattrsize.h5 -$SRC_H5DUMP_TESTFILES/tscalarintsize.h5 -$SRC_H5DUMP_TESTFILES/tscalarstring.h5 -$SRC_H5DUMP_TESTFILES/tslink.h5 -$SRC_H5DUMP_TESTFILES/tsplit_file-m.h5 -$SRC_H5DUMP_TESTFILES/tsplit_file-r.h5 -$SRC_H5DUMP_TESTFILES/tstr.h5 -$SRC_H5DUMP_TESTFILES/tstr2.h5 -$SRC_H5DUMP_TESTFILES/tstr3.h5 -$SRC_H5DUMP_TESTFILES/tudlink.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes1.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes2.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes3.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes4.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes5.h5 -$SRC_H5DUMP_TESTFILES/tvlenstr_array.h5 -$SRC_H5DUMP_TESTFILES/tvlstr.h5 -$SRC_H5DUMP_TESTFILES/tvms.h5 -$SRC_H5DUMP_TESTFILES/err_attr_dspace.h5 -$SRC_H5DUMP_TESTFILES/tCVE_2018_11206_fill_old.h5 -$SRC_H5DUMP_TESTFILES/tCVE_2018_11206_fill_new.h5 -$SRC_H5DUMP_TESTFILES/tCVE-2021-37501_attr_decode.h5 -$SRC_H5DUMP_TESTFILES/tst_onion_objs.h5 -$SRC_H5DUMP_TESTFILES/tst_onion_objs.h5.onion -$SRC_H5DUMP_TESTFILES/tst_onion_dset_ext.h5 -$SRC_H5DUMP_TESTFILES/tst_onion_dset_ext.h5.onion -$SRC_H5DUMP_TESTFILES/tst_onion_dset_1d.h5 -$SRC_H5DUMP_TESTFILES/tst_onion_dset_1d.h5.onion -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5DUMP_OUTFILES/charsets.ddl -$SRC_H5DUMP_OUTFILES/file_space.ddl -$SRC_H5DUMP_OUTFILES/file_space_cache.ddl -$SRC_H5DUMP_OUTFILES/filter_fail.ddl -$SRC_H5DUMP_OUTFILES/non_existing.ddl -$SRC_H5DUMP_OUTFILES/infinite_loop.ddl -$SRC_H5DUMP_OUTFILES/packedbits.ddl -$SRC_H5DUMP_OUTFILES/tall-1.ddl -$SRC_H5DUMP_OUTFILES/tall-2.ddl -$SRC_H5DUMP_OUTFILES/tall-2A.ddl -$SRC_H5DUMP_OUTFILES/tall-2A0.ddl -$SRC_H5DUMP_OUTFILES/tall-2B.ddl -$SRC_H5DUMP_OUTFILES/tall-3.ddl -$SRC_H5DUMP_OUTFILES/tall-4s.ddl -$SRC_H5DUMP_OUTFILES/tall-5s.ddl -$SRC_H5DUMP_OUTFILES/tall-6.ddl -$SRC_H5DUMP_OUTFILES/tall-7.ddl -$SRC_H5DUMP_OUTFILES/tall-7N.ddl -$SRC_H5DUMP_OUTFILES/tallfilters.ddl -$SRC_H5DUMP_OUTFILES/tarray1.ddl -$SRC_H5DUMP_OUTFILES/tarray1_big.ddl -$SRC_H5DUMP_OUTFILES/tarray2.ddl -$SRC_H5DUMP_OUTFILES/tarray3.ddl -$SRC_H5DUMP_OUTFILES/tarray4.ddl -$SRC_H5DUMP_OUTFILES/tarray5.ddl -$SRC_H5DUMP_OUTFILES/tarray6.ddl -$SRC_H5DUMP_OUTFILES/tarray7.ddl -$SRC_H5DUMP_OUTFILES/tarray8.ddl -$SRC_H5DUMP_OUTFILES/tattr-1.ddl -$SRC_H5DUMP_OUTFILES/tattr-2.ddl -$SRC_H5DUMP_OUTFILES/tattr-3.ddl -$SRC_H5DUMP_OUTFILES/tattr-4_be.ddl -$SRC_H5DUMP_OUTFILES/tattrcontents1.ddl -$SRC_H5DUMP_OUTFILES/tattrcontents2.ddl -$SRC_H5DUMP_OUTFILES/tattrintsize.ddl -$SRC_H5DUMP_OUTFILES/tattrreg.ddl -$SRC_H5DUMP_OUTFILES/tattrregR.ddl -$SRC_H5DUMP_OUTFILES/tbin1.ddl -$SRC_H5DUMP_OUTFILES/tbin1.ddl -$SRC_H5DUMP_OUTFILES/tbin2.ddl -$SRC_H5DUMP_OUTFILES/tbin3.ddl -$SRC_H5DUMP_OUTFILES/tbin4.ddl -$SRC_H5DUMP_OUTFILES/tbinregR.ddl -$SRC_H5DUMP_OUTFILES/tbigdims.ddl -$SRC_H5DUMP_OUTFILES/tbitnopaque_be.ddl -$SRC_H5DUMP_OUTFILES/tbitnopaque_le.ddl -$SRC_H5DUMP_OUTFILES/tboot1.ddl -$SRC_H5DUMP_OUTFILES/tboot2.ddl -$SRC_H5DUMP_OUTFILES/tboot2A.ddl -$SRC_H5DUMP_OUTFILES/tboot2B.ddl -$SRC_H5DUMP_OUTFILES/tchar1.ddl -$SRC_H5DUMP_OUTFILES/tchunked.ddl -$SRC_H5DUMP_OUTFILES/tcmpdattrintsize.ddl -$SRC_H5DUMP_OUTFILES/tcmpdintsize.ddl -$SRC_H5DUMP_OUTFILES/tcomp-1.ddl -$SRC_H5DUMP_OUTFILES/tcomp-2.ddl -$SRC_H5DUMP_OUTFILES/tcomp-3.ddl -$SRC_H5DUMP_OUTFILES/tcomp-4.ddl -$SRC_H5DUMP_OUTFILES/tcompound_complex2.ddl -$SRC_H5DUMP_OUTFILES/tcompact.ddl -$SRC_H5DUMP_OUTFILES/tcontents.ddl -$SRC_H5DUMP_OUTFILES/tcontiguos.ddl -$SRC_H5DUMP_OUTFILES/tdatareg.ddl -$SRC_H5DUMP_OUTFILES/tdataregR.ddl -$SRC_H5DUMP_OUTFILES/tdeflate.ddl -$SRC_H5DUMP_OUTFILES/tdset-1.ddl -$SRC_H5DUMP_OUTFILES/tdset-2.ddl -$SRC_H5DUMP_OUTFILES/tdset-3s.ddl -$SRC_H5DUMP_OUTFILES/tempty.ddl -$SRC_H5DUMP_OUTFILES/texceedsubstart.ddl -$SRC_H5DUMP_OUTFILES/texceedsubcount.ddl -$SRC_H5DUMP_OUTFILES/texceedsubstride.ddl -$SRC_H5DUMP_OUTFILES/texceedsubblock.ddl -$SRC_H5DUMP_OUTFILES/texternal.ddl -$SRC_H5DUMP_OUTFILES/textlinksrc.ddl -$SRC_H5DUMP_OUTFILES/textlinkfar.ddl -$SRC_H5DUMP_OUTFILES/textlink.ddl -$SRC_H5DUMP_OUTFILES/tfamily.ddl -$SRC_H5DUMP_OUTFILES/tfill.ddl -$SRC_H5DUMP_OUTFILES/tfletcher32.ddl -$SRC_H5DUMP_OUTFILES/tfloatsattrs.ddl -$SRC_H5DUMP_OUTFILES/tfloat16.ddl -$SRC_H5DUMP_OUTFILES/tfloat16_be.ddl -$SRC_H5DUMP_OUTFILES/tfpformat.ddl -$SRC_H5DUMP_OUTFILES/tgroup-1.ddl -$SRC_H5DUMP_OUTFILES/tgroup-2.ddl -$SRC_H5DUMP_OUTFILES/tgrp_comments.ddl -$SRC_H5DUMP_OUTFILES/tgrpnullspace.ddl -$SRC_H5DUMP_OUTFILES/thlink-1.ddl -$SRC_H5DUMP_OUTFILES/thlink-2.ddl -$SRC_H5DUMP_OUTFILES/thlink-3.ddl -$SRC_H5DUMP_OUTFILES/thlink-4.ddl -$SRC_H5DUMP_OUTFILES/thlink-5.ddl -$SRC_H5DUMP_OUTFILES/thyperslab.ddl -$SRC_H5DUMP_OUTFILES/tindicesno.ddl -$SRC_H5DUMP_OUTFILES/tindicessub1.ddl -$SRC_H5DUMP_OUTFILES/tindicessub2.ddl -$SRC_H5DUMP_OUTFILES/tindicessub3.ddl -$SRC_H5DUMP_OUTFILES/tindicessub4.ddl -$SRC_H5DUMP_OUTFILES/tindicesyes.ddl -$SRC_H5DUMP_OUTFILES/tints4dims.ddl -$SRC_H5DUMP_OUTFILES/tints4dimsBlock2.ddl -$SRC_H5DUMP_OUTFILES/tints4dimsBlockEq.ddl -$SRC_H5DUMP_OUTFILES/tints4dimsCount2.ddl -$SRC_H5DUMP_OUTFILES/tints4dimsCountEq.ddl -$SRC_H5DUMP_OUTFILES/tints4dimsStride2.ddl -$SRC_H5DUMP_OUTFILES/tintsattrs.ddl -$SRC_H5DUMP_OUTFILES/tlarge_objname.ddl -$SRC_H5DUMP_OUTFILES/tldouble.ddl -$SRC_H5DUMP_OUTFILES/tldouble_scalar.ddl -$SRC_H5DUMP_OUTFILES/tlonglinks.ddl -$SRC_H5DUMP_OUTFILES/tloop-1.ddl -$SRC_H5DUMP_OUTFILES/tmulti.ddl -$SRC_H5DUMP_OUTFILES/tmultifile.ddl -$SRC_H5DUMP_OUTFILES/tqmarkfile.ddl -$SRC_H5DUMP_OUTFILES/tstarfile.ddl -$SRC_H5DUMP_OUTFILES/tnamed_dtype_attr.ddl -$SRC_H5DUMP_OUTFILES/tnestcomp-1.ddl -$SRC_H5DUMP_OUTFILES/tnestedcmpddt.ddl -$SRC_H5DUMP_OUTFILES/tnbit.ddl -$SRC_H5DUMP_OUTFILES/tnoattrdata.ddl -$SRC_H5DUMP_OUTFILES/tnoattrddl.ddl -$SRC_H5DUMP_OUTFILES/tnodata.ddl -$SRC_H5DUMP_OUTFILES/tnoddl.ddl -$SRC_H5DUMP_OUTFILES/tnoddlfile.ddl -$SRC_H5DUMP_OUTFILES/tno-subset.ddl -$SRC_H5DUMP_OUTFILES/tnullspace.ddl -$SRC_H5DUMP_OUTFILES/trawdatafile.ddl -$SRC_H5DUMP_OUTFILES/trawssetfile.ddl -$SRC_H5DUMP_OUTFILES/zerodim.ddl -$SRC_H5DUMP_OUTFILES/tordergr1.ddl -$SRC_H5DUMP_OUTFILES/tordergr2.ddl -$SRC_H5DUMP_OUTFILES/tordergr3.ddl -$SRC_H5DUMP_OUTFILES/tordergr4.ddl -$SRC_H5DUMP_OUTFILES/tordergr5.ddl -$SRC_H5DUMP_OUTFILES/torderattr1.ddl -$SRC_H5DUMP_OUTFILES/torderattr2.ddl -$SRC_H5DUMP_OUTFILES/torderattr3.ddl -$SRC_H5DUMP_OUTFILES/torderattr4.ddl -$SRC_H5DUMP_OUTFILES/tordercontents1.ddl -$SRC_H5DUMP_OUTFILES/tordercontents2.ddl -$SRC_H5DUMP_OUTFILES/torderlinks1.ddl -$SRC_H5DUMP_OUTFILES/torderlinks2.ddl -$SRC_H5DUMP_OUTFILES/tperror.ddl -$SRC_H5DUMP_OUTFILES/treadfilter.ddl -$SRC_H5DUMP_OUTFILES/treadintfilter.ddl -$SRC_H5DUMP_OUTFILES/treference.ddl -$SRC_H5DUMP_OUTFILES/tsaf.ddl -$SRC_H5DUMP_OUTFILES/tscalarattrintsize.ddl -$SRC_H5DUMP_OUTFILES/tscalarintattrsize.ddl -$SRC_H5DUMP_OUTFILES/tscalarintsize.ddl -$SRC_H5DUMP_OUTFILES/tscalarstring.ddl -$SRC_H5DUMP_OUTFILES/tscaleoffset.ddl -$SRC_H5DUMP_OUTFILES/tshuffle.ddl -$SRC_H5DUMP_OUTFILES/tslink-1.ddl -$SRC_H5DUMP_OUTFILES/tslink-2.ddl -$SRC_H5DUMP_OUTFILES/tslink-D.ddl -$SRC_H5DUMP_OUTFILES/tsplit_file.ddl -$SRC_H5DUMP_OUTFILES/tstr-1.ddl -$SRC_H5DUMP_OUTFILES/tstr-2.ddl -$SRC_H5DUMP_OUTFILES/tstring.ddl -$SRC_H5DUMP_OUTFILES/tstring2.ddl -$SRC_H5DUMP_OUTFILES/tstringe.ddl -$SRC_H5DUMP_OUTFILES/tszip.ddl -$SRC_H5DUMP_OUTFILES/tudlink-1.ddl -$SRC_H5DUMP_OUTFILES/tudlink-2.ddl -$SRC_H5DUMP_OUTFILES/tuserfilter.ddl -$SRC_H5DUMP_OUTFILES/tvldtypes1.ddl -$SRC_H5DUMP_OUTFILES/tvldtypes2.ddl -$SRC_H5DUMP_OUTFILES/tvldtypes3.ddl -$SRC_H5DUMP_OUTFILES/tvldtypes4.ddl -$SRC_H5DUMP_OUTFILES/tvldtypes5.ddl -$SRC_H5DUMP_OUTFILES/tvlenstr_array.ddl -$SRC_H5DUMP_OUTFILES/tvlstr.ddl -$SRC_H5DUMP_OUTFILES/tvms.ddl -$SRC_H5DUMP_OUTFILES/twidedisplay.ddl -$SRC_H5DUMP_OUTFILES/twithddlfile.ddl -$SRC_H5DUMP_OUTFILES/h5dump-help.txt -$SRC_H5DUMP_OUTFILES/out3.h5import -$SRC_H5DUMP_OUTFILES/err_attr_dspace.ddl -$SRC_H5DUMP_OUTFILES/tst_onion_objs.ddl -$SRC_H5DUMP_OUTFILES/tst_onion_dset_ext.ddl -$SRC_H5DUMP_OUTFILES/tst_onion_dset_1d.ddl -$SRC_H5DUMP_OUTFILES/tst_onion_revision_count.ddl -" - -LIST_EXPORT_TEST_FILES=" -$SRC_H5DUMP_EXPFILES/tall-6.exp -$SRC_H5DUMP_EXPFILES/tbinregR.exp -$SRC_H5DUMP_EXPFILES/tnoddlfile.exp -$SRC_H5DUMP_EXPFILES/trawdatafile.exp -$SRC_H5DUMP_EXPFILES/trawssetfile.exp -$SRC_H5DUMP_EXPFILES/tstr2bin2.exp -$SRC_H5DUMP_EXPFILES/tstr2bin6.exp -$SRC_H5DUMP_EXPFILES/twithddl.exp -$SRC_H5DUMP_EXPFILES/twithddlfile.exp -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_EXPORT_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5DUMP_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# If $1 == ignorecase then do caseless CMP and DIFF. -# ADD_H5_TEST -TOOLTEST() { - # check if caseless compare and diff requested - if [ "$1" = ignorecase ]; then - caseless="-i" - # replace cmp with diff which runs much longer. - xCMP="$DIFF -i" - shift - else - caseless="" - # stick with faster cmp if ignorecase is not requested. - xCMP="$CMP" - fi - - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $xCMP $expect $actual > /dev/null 2>&1 ; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext - fi - -} - -# same as TOOLTEST but masks out the compression values -TOOLTESTC() { - # check if caseless compare and diff requested - if [ "$1" = ignorecase ]; then - caseless="-i" - # replace cmp with diff which runs much longer. - xCMP="$DIFF -i" - shift - else - caseless="" - # stick with faster cmp if ignorecase is not requested. - xCMP="$CMP" - fi - - txttype=$1 - expect="$TESTDIR/$2" - actual="$TESTDIR/`basename $2 .ddl`.out" - actual_err="$TESTDIR/`basename $2 .ddl`.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - - tmp_file=/tmp/h5test_tmp_$$ - cp $actual $tmp_file - sed -e 's/SIZE [0-9]* ('"$txttype"'\.[0-9][0-9][0-9]:1 COMPRESSION)/SIZE XXXX ('"$txttype"'.XXX:1 COMPRESSION)/' \ - < $tmp_file > $actual - rm -f $tmp_file - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $xCMP $expect $actual > /dev/null 2>&1 ; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext - fi - -} - -# same as TOOLTEST1 but compares generated file to expected output -# and compares the generated data file to the expected data file -# used for the binary tests that expect a full path in -o without -b -# ADD_H5_EXPORT_TEST -TOOLTEST2() { - - expectdata="$TESTDIR/$1" - expect="$TESTDIR/`basename $1 .exp`.ddl" - actualdata="$TESTDIR/`basename $1 .exp`.txt" - actual="$TESTDIR/`basename $1 .exp`.out" - actual_err="$TESTDIR/`basename $1 .exp`.err" - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - if [ ! -f $expectdata ]; then - # Create the expect data file if it doesn't yet exist. - echo " CREATED" - cp $actualdata $expectdata - echo " Expected data (*.exp) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expectdata $actualdata; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected datafile (*.exp) differs from actual datafile (*.txt)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /' - fi - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actualdata $actual_err - fi - -} - -# same as TOOLTEST2 but compares generated file to expected ddl file -# and compares the generated data file to the expected data file -# used for the binary tests that expect a full path in -o without -b -# ADD_H5_TEST_EXPORT -TOOLTEST2A() { - - expectdata="$TESTDIR/$1" - expect="$TESTDIR/`basename $1 .exp`.ddl" - actualdata="$TESTDIR/`basename $1 .exp`.txt" - actual="$TESTDIR/`basename $1 .exp`.out" - actual_err="$TESTDIR/`basename $1 .exp`.err" - shift - expectmeta="$TESTDIR/$1" - actualmeta="$TESTDIR/`basename $1 .exp`.txt" - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - if [ ! -f $expectdata ]; then - # Create the expect data file if it doesn't yet exist. - echo " CREATED" - cp $actualdata $expectdata - echo " Expected data (*.exp) missing" - nerrors="`expr $nerrors + 1`" - elif $DIFF $expectdata $actualdata; then - if [ ! -f $expectmeta ]; then - # Create the expect meta file if it doesn't yet exist. - echo " CREATED" - cp $actualmeta $expectmeta - echo " Expected metafile (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expectmeta $actualmeta; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /' - fi - else - echo "*FAILED*" - echo " Expected datafile (*.exp) differs from actual datafile (*.txt)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /' - fi - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actualdata $actual_err $actualmeta - fi -} - -# same as TOOLTEST2 but only compares the generated data file to the expected data file -# used for the binary tests that expect a full path in -o with -b -# ADD_H5_EXPORT_TEST -TOOLTEST2B() { - - expectdata="$TESTDIR/$1" - actualdata="$TESTDIR/`basename $1 .exp`.txt" - actual="$TESTDIR/`basename $1 .exp`.out" - actual_err="$TESTDIR/`basename $1 .exp`.err" - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - if [ ! -f $expectdata ]; then - # Create the expect data file if it doesn't yet exist. - echo " CREATED" - cp $actualdata $expectdata - echo " Expected data (*.exp) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expectdata $actualdata; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected datafile (*.exp) differs from actual datafile (*.txt)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actualdata $actual_err - fi - -} - -# same as TOOLTEST but filters error stack outp -# Extract file name, line number, version and thread IDs because they may be different -TOOLTEST3() { - - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.err" - actual_ext="$TESTDIR/`basename $1 .ddl`.ext" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - - # Extract file name, line number, version and thread IDs because they may be different - sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ - -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ - -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ - -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ - $actual_err > $actual_ext - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - fi -} - -# same as TOOLTEST1 but expects h5dump to fail -# -TOOLTEST_FAIL() { - - infile=$1 - expect="$TESTDIR/`basename $1 exp`.ddl" - actual="$TESTDIR/`basename $1 .exp`.out" - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" $infile - ) >&$actual - RET=$? - # Segfault occurred - if [ $RET == 139 ] ; then - nerrors="`expr $nerrors + 1`" - echo "*FAILED - test on $infile failed with segmentation fault" - # Should fail but didn't - elif [ $RET == 0 ] ; then - nerrors="`expr $nerrors + 1`" - echo "*FAILED - test on $infile did not fail as expected" - else - echo " PASSED" - fi - -} - -# ADD_HELP_TEST -TOOLTEST_HELP() { - - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .txt`.out" - actual_err="$TESTDIR/`basename $1 .txt`.err" - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - if [ ! -f $expectdata ]; then - # Create the expect data file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect-CREATED - echo " Expected output (*.txt) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected output (*.txt) differs from actual output (*.out)" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi - -} - -# Call the h5dump tool and grep for a value -# txttype ERRTXT greps test error output, otherwise greps test output -GREPTEST() -{ - txttype=$1 - expectdata=$2 - actual=$TESTDIR/$3 - actual_err="$TESTDIR/`basename $3 .ddl`.oerr" - shift - shift - shift - - # Run test. - TESTING $DUMPER -p $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@" - ) >$actual 2>$actual_err - - if [ "$txttype" = "ERRTXT" ]; then - $GREP "$expectdata" $actual_err > /dev/null - else - $GREP "$expectdata" $actual > /dev/null - fi - - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo " FAILED" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -# Call the h5dump tool and grep for a value but disables plugin filter loading -# txttype ERRTXT greps test error output, otherwise greps test output -GREPTEST2() -{ - txttype=$1 - expectdata=$2 - actual=$TESTDIR/$3 - actual_err="$TESTDIR/`basename $3 .ddl`.oerr" - shift - shift - shift - - # Run test. - TESTING $DUMPER -p $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@" - ) >$actual 2>$actual_err - - if [ "$txttype" = "ERRTXT" ]; then - $GREP "$expectdata" $actual_err > /dev/null - else - $GREP "$expectdata" $actual > /dev/null - fi - - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo " FAILED" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -# Call the h5dump tool and grep for a value but also compares the ddl output -# txttype ERRTXT greps test error output, otherwise greps test output -GREPTEST3() -{ - txttype=$1 - expectdata=$2 - expect="$TESTDIR/$3" - actual="$TESTDIR/`basename $3 .txt`.out" - actual_err="$TESTDIR/`basename $3 .ddl`.oerr" - actual_ext="$TESTDIR/`basename $3 .ddl`.ext" - shift - shift - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - if [ "$txttype" = "ERRTXT" ]; then - if $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - $GREP "$expectdata" $actual_err > /dev/null - else - $GREP "$expectdata" $actual > /dev/null - fi - - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo " FAILED" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $DUMPER $@ - echo " -SKIP-" -} - -# Print a line-line message left justified in a field of 70 characters -# -PRINT_H5DIFF() { - SPACES=" " - echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012' -} - - -# Call the h5diff tool -# -DIFFTEST() -{ - PRINT_H5DIFF $@ - ( - cd $TESTDIR - $RUNSERIAL $H5DIFF_BIN "$@" -q - ) - RET=$? - - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -PRINT_H5IMPORT() { - SPACES=" " - echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Call the h5import tool -# -IMPORTTEST() -{ - # remove the output hdf5 file if it exists - hdf5_file="$TESTDIR/$5" - if [ -f $hdf5_file ]; then - rm -f $hdf5_file - fi - - PRINT_H5IMPORT $@ - ( - cd $TESTDIR - $RUNSERIAL $H5IMPORT_BIN "$@" - ) - RET=$? - - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - -} - - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -TOOLTEST_HELP h5dump-help.txt -h - -# test data output redirection -TOOLTEST tnoddl.ddl --enable-error-stack --ddl -y packedbits.h5 -TOOLTEST tnodata.ddl --enable-error-stack --output packedbits.h5 -TOOLTEST tnoattrddl.ddl --enable-error-stack -O -y tattr.h5 -TOOLTEST tnoattrdata.ddl --enable-error-stack -A -o tattr.h5 -TOOLTEST2 trawdatafile.exp --enable-error-stack -y -o trawdatafile.txt packedbits.h5 -TOOLTEST2 tnoddlfile.exp --enable-error-stack -O -y -o tnoddlfile.txt packedbits.h5 -TOOLTEST2A twithddlfile.exp twithddl.exp --enable-error-stack --ddl=twithddl.txt -y -o twithddlfile.txt packedbits.h5 -TOOLTEST2 trawssetfile.exp --enable-error-stack -d "/dset1[1,1;;;]" -y -o trawssetfile.txt tdset.h5 - -# test for maximum display datasets -TOOLTEST twidedisplay.ddl --enable-error-stack -w0 packedbits.h5 - -# test for signed/unsigned datasets -TOOLTEST packedbits.ddl --enable-error-stack packedbits.h5 -# test for compound signed/unsigned datasets -TOOLTEST tcmpdintsize.ddl --enable-error-stack tcmpdintsize.h5 -# test for signed/unsigned scalar datasets -TOOLTEST tscalarintsize.ddl --enable-error-stack tscalarintsize.h5 -# test for signed/unsigned attributes -TOOLTEST tattrintsize.ddl --enable-error-stack tattrintsize.h5 -# test for compound signed/unsigned attributes -TOOLTEST tcmpdattrintsize.ddl --enable-error-stack tcmpdattrintsize.h5 -# test for signed/unsigned scalar attributes -TOOLTEST tscalarattrintsize.ddl --enable-error-stack tscalarattrintsize.h5 -# test for signed/unsigned scalar datasets with attributes -TOOLTEST tscalarintattrsize.ddl --enable-error-stack tscalarintattrsize.h5 -# test for signed/unsigned datasets attributes -TOOLTEST tintsattrs.ddl --enable-error-stack tintsattrs.h5 -# test for string scalar dataset attribute -TOOLTEST tscalarstring.ddl --enable-error-stack tscalarstring.h5 -# test for displaying groups -TOOLTEST tgroup-1.ddl --enable-error-stack tgroup.h5 -# test for displaying the selected groups -GREPTEST ERRTXT "h5dump error: unable to open group" tgroup-2.ddl --enable-error-stack --group=/g2 --group / -g /y tgroup.h5 - -# test for displaying simple space datasets -TOOLTEST tdset-1.ddl --enable-error-stack tdset.h5 -# test for displaying selected datasets -GREPTEST ERRTXT "h5dump error: unable to get link info from" tdset-2.ddl --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5 - -# test for displaying attributes -TOOLTEST tattr-1.ddl --enable-error-stack tattr.h5 -# test for displaying the selected attributes of string type and scalar space -TOOLTEST tattr-2.ddl --enable-error-stack -a "/\/attr1" --attribute /attr4 --attribute=/attr5 tattr.h5 -TOOLTEST tattr-2.ddl --enable-error-stack -N "/\/attr1" --any_path /attr4 --any_path=/attr5 tattr.h5 -# test for header and error messages -GREPTEST ERRTXT "h5dump error: unable to open attribute" tattr-3.ddl --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5 -# test for displaying at least 9 attributes on root from a BE machine -TOOLTEST tattr-4_be.ddl --enable-error-stack tattr4_be.h5 -# test for displaying attributes in shared datatype (also in group and dataset) -TOOLTEST tnamed_dtype_attr.ddl --enable-error-stack tnamed_dtype_attr.h5 - -# test for displaying soft links and user-defined links -TOOLTEST tslink-1.ddl --enable-error-stack tslink.h5 -TOOLTEST tudlink-1.ddl --enable-error-stack tudlink.h5 -# test for displaying the selected link -TOOLTEST tslink-2.ddl --enable-error-stack -l slink2 tslink.h5 -TOOLTEST tslink-2.ddl --enable-error-stack -N slink2 tslink.h5 -TOOLTEST tudlink-2.ddl --enable-error-stack -l udlink2 tudlink.h5 -# test for displaying dangling soft links -GREPTEST ERRTXT "component not found" tslink-D.ddl --enable-error-stack -d /slink1 tslink.h5 - -# tests for hard links -TOOLTEST thlink-1.ddl --enable-error-stack thlink.h5 -TOOLTEST thlink-2.ddl --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5 -TOOLTEST thlink-3.ddl --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5 -TOOLTEST thlink-4.ddl --enable-error-stack -g /g1 thlink.h5 -TOOLTEST thlink-4.ddl --enable-error-stack -N /g1 thlink.h5 -TOOLTEST thlink-5.ddl --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5 -TOOLTEST thlink-5.ddl --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5 - -# tests for compound data types -TOOLTEST tcomp-1.ddl --enable-error-stack tcompound.h5 -# test for named data types -TOOLTEST tcomp-2.ddl --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5 -TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5 -# test for unnamed type -GREPTEST ERRTXT "object '#6632' doesn't exist" tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5 -# test complicated compound datatype -TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5 -TOOLTEST tcompound_complex2.ddl --enable-error-stack tcompound_complex2.h5 -# tests for bitfields and opaque data types -if test $WORDS_BIGENDIAN != "yes"; then - TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5 -else - TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5 -fi - -#test for the nested compound type -TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5 -TOOLTEST tnestedcmpddt.ddl --enable-error-stack tnestedcmpddt.h5 - -# test for options -GREPTEST ERRTXT "unable to open external file, external link file name" tall-1.ddl --enable-error-stack tall.h5 -TOOLTEST tall-2.ddl --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5 -TOOLTEST tall-3.ddl --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5 -TOOLTEST tall-3.ddl --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5 -TOOLTEST tall-7.ddl --enable-error-stack -a attr1 tall.h5 -TOOLTEST tall-7N.ddl --enable-error-stack -N attr1 tall.h5 - -# test for loop detection -TOOLTEST tloop-1.ddl --enable-error-stack tloop.h5 - -# test for string -TOOLTEST tstr-1.ddl --enable-error-stack tstr.h5 -TOOLTEST tstr-2.ddl --enable-error-stack tstr2.h5 - -# test for file created by Lib SAF team -TOOLTEST tsaf.ddl --enable-error-stack tsaf.h5 - -# test for file with variable length data -TOOLTEST tvldtypes1.ddl --enable-error-stack tvldtypes1.h5 -TOOLTEST tvldtypes2.ddl --enable-error-stack tvldtypes2.h5 -TOOLTEST tvldtypes3.ddl --enable-error-stack tvldtypes3.h5 -TOOLTEST tvldtypes4.ddl --enable-error-stack tvldtypes4.h5 -TOOLTEST tvldtypes5.ddl --enable-error-stack tvldtypes5.h5 - -#test for file with variable length string data -TOOLTEST tvlstr.ddl --enable-error-stack tvlstr.h5 -TOOLTEST tvlenstr_array.ddl --enable-error-stack tvlenstr_array.h5 - -# test for files with array data -TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5 -# # added for bug# 2092 - tarray1_big.h -GREPTEST ERRTXT "NULL token size" tarray1_big.ddl --enable-error-stack -R tarray1_big.h5 -TOOLTEST tarray2.ddl --enable-error-stack tarray2.h5 -TOOLTEST tarray3.ddl --enable-error-stack tarray3.h5 -TOOLTEST tarray4.ddl --enable-error-stack tarray4.h5 -TOOLTEST tarray5.ddl --enable-error-stack tarray5.h5 -TOOLTEST tarray6.ddl --enable-error-stack tarray6.h5 -TOOLTEST tarray7.ddl --enable-error-stack tarray7.h5 -TOOLTEST tarray8.ddl --enable-error-stack tarray8.h5 - -# test for wildcards in filename (does not work with cmake) -# inconsistent across platforms TOOLTEST3 tstarfile.ddl --enable-error-stack -H -d Dataset1 tarr*.h5 -#GREPTEST ERRTXT "unable to get link info from" tqmarkfile.ddl --enable-error-stack -H -d Dataset1 tarray?.h5 -TOOLTEST tmultifile.ddl --enable-error-stack -H -d Dataset1 tarray2.h5 tarray3.h5 tarray4.h5 tarray5.h5 tarray6.h5 tarray7.h5 - -# test for files with empty data -TOOLTEST tempty.ddl --enable-error-stack tempty.h5 - -# test for files with groups that have comments -TOOLTEST tgrp_comments.ddl --enable-error-stack tgrp_comments.h5 - -# test the --filedriver flag -TOOLTEST tsplit_file.ddl --enable-error-stack --filedriver=split tsplit_file -TOOLTEST tfamily.ddl --enable-error-stack --filedriver=family tfamily%05d.h5 -TOOLTEST tmulti.ddl --enable-error-stack --filedriver=multi tmulti - -# test for files with group names which reach > 1024 bytes in size -TOOLTEST tlarge_objname.ddl --enable-error-stack -w157 tlarge_objname.h5 - -# test '-A' to suppress data but print attr's -GREPTEST ERRTXT "unable to open external file, external link file name" tall-2A.ddl --enable-error-stack -A tall.h5 - -# test '-A' to suppress attr's but print data -GREPTEST ERRTXT "unable to open external file, external link file name" tall-2A0.ddl --enable-error-stack -A 0 tall.h5 - -# test '-r' to print attributes in ASCII instead of decimal -GREPTEST ERRTXT "unable to open external file, external link file name" tall-2B.ddl --enable-error-stack -A -r tall.h5 - -# test Subsetting -TOOLTEST tall-4s.ddl --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5 -TOOLTEST tall-5s.ddl --enable-error-stack -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5 -TOOLTEST tdset-3s.ddl --enable-error-stack -d "/dset1[1,1;;;]" tdset.h5 -TOOLTEST tno-subset.ddl --enable-error-stack --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5 - -TOOLTEST tints4dimsCount2.ddl --enable-error-stack -d FourDimInts -s 0,0,0,0 -c 2,2,2,2 tints4dims.h5 -TOOLTEST tints4dimsBlock2.ddl --enable-error-stack -d FourDimInts -s 0,0,0,0 -c 1,1,1,1 -k 2,2,2,2 tints4dims.h5 -TOOLTEST tints4dimsStride2.ddl --enable-error-stack -d FourDimInts -s 0,0,0,0 -S 2,2,2,2 -c 2,2,2,2 tints4dims.h5 -TOOLTEST tints4dimsCountEq.ddl --enable-error-stack -d FourDimInts -s 0,0,0,0 -S 2,2,1,1 -k 1,2,1,1 -c 2,2,4,4 tints4dims.h5 -TOOLTEST tints4dimsBlockEq.ddl --enable-error-stack -d FourDimInts -s 0,0,0,0 -S 2,2,1,1 -c 2,2,1,1 -k 1,2,4,4 tints4dims.h5 - -# test printing characters in ASCII instead of decimal -TOOLTEST tchar1.ddl --enable-error-stack -r tchar.h5 - -# test datatypes in ASCII and UTF8 -TOOLTEST charsets.ddl --enable-error-stack charsets.h5 - -# rev. 2004 - -# tests for super block -TOOLTEST tboot1.ddl --enable-error-stack -H -B -d dset tfcontents1.h5 -TOOLTEST tboot2.ddl --enable-error-stack -B tfcontents2.h5 -TOOLTEST tboot2A.ddl --enable-error-stack --boot-block tfcontents2.h5 -TOOLTEST tboot2B.ddl --enable-error-stack --superblock tfcontents2.h5 -TOOLTEST file_space.ddl --enable-error-stack -B file_space.h5 -TOOLTEST file_space_cache.ddl --enable-error-stack=2 --page-buffer-size=16384 -B file_space.h5 - -# test -p with a non existing dataset -GREPTEST ERRTXT "h5dump error: unable to get link info from" tperror.ddl --enable-error-stack -p -d bogus tfcontents1.h5 - -# test for file contents -TOOLTEST tcontents.ddl --enable-error-stack -n tfcontents1.h5 -TOOLTEST tordercontents1.ddl --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5 -TOOLTEST tordercontents2.ddl --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5 -TOOLTEST tattrcontents1.ddl --enable-error-stack -n 1 --sort_order=ascending tall.h5 -TOOLTEST tattrcontents2.ddl --enable-error-stack -n 1 --sort_order=descending tall.h5 - -# tests for storage layout -# compact -TOOLTEST tcompact.ddl --enable-error-stack -H -p -d compact tfilters.h5 -# contiguous -TOOLTEST tcontiguos.ddl --enable-error-stack -H -p -d contiguous tfilters.h5 -# chunked -TOOLTEST tchunked.ddl --enable-error-stack -H -p -d chunked tfilters.h5 -# external -TOOLTEST texternal.ddl --enable-error-stack -H -p -d external tfilters.h5 - -# fill values -TOOLTEST tfill.ddl --enable-error-stack -p tfvalues.h5 - -# several datatype, with references , print path -TOOLTEST treference.ddl --enable-error-stack tattr2.h5 - -# escape/not escape non printable characters -TOOLTEST tstringe.ddl --enable-error-stack -e tstr3.h5 -TOOLTEST tstring.ddl --enable-error-stack tstr3.h5 -# char data as ASCII with non escape -TOOLTEST tstring2.ddl --enable-error-stack -r -d str4 tstr3.h5 - -# array indices print/not print -TOOLTEST tindicesyes.ddl --enable-error-stack taindices.h5 -TOOLTEST tindicesno.ddl --enable-error-stack -y taindices.h5 - -########## array indices with subsetting -# 1D case -TOOLTEST tindicessub1.ddl --enable-error-stack -d 1d -s 1 -S 10 -c 2 -k 3 taindices.h5 - -# 2D case -TOOLTEST tindicessub2.ddl --enable-error-stack -d 2d -s 1,2 -S 3,3 -c 3,2 -k 2,2 taindices.h5 - -# 3D case -TOOLTEST tindicessub3.ddl --enable-error-stack -d 3d -s 0,1,2 -S 1,3,3 -c 2,2,2 -k 1,2,2 taindices.h5 - -# 4D case -TOOLTEST tindicessub4.ddl --enable-error-stack -d 4d -s 0,0,1,2 -c 2,2,3,2 -S 1,1,3,3 -k 1,1,2,2 taindices.h5 - -#Exceed the dimensions for subsetting -GREPTEST ERRTXT "exceed dataset dims" texceedsubstart.ddl --enable-error-stack -d 1d -s 1,3 taindices.h5 -GREPTEST ERRTXT "exceed dataset dims" texceedsubcount.ddl --enable-error-stack -d 1d -c 1,3 taindices.h5 -GREPTEST ERRTXT "exceed dataset dims" texceedsubstride.ddl --enable-error-stack -d 1d -S 1,3 taindices.h5 -GREPTEST ERRTXT "exceed dataset dims" texceedsubblock.ddl --enable-error-stack -d 1d -k 1,3 taindices.h5 - - -# tests for filters -# SZIP -TOOLTESTC 2 tszip.ddl --enable-error-stack -H -p -d szip tfilters.h5 -# deflate -TOOLTESTC 2 tdeflate.ddl --enable-error-stack -H -p -d deflate tfilters.h5 -# shuffle -TOOLTEST tshuffle.ddl --enable-error-stack -H -p -d shuffle tfilters.h5 -# fletcher32 -TOOLTESTC 0 tfletcher32.ddl --enable-error-stack -H -p -d fletcher32 tfilters.h5 -# nbit -TOOLTESTC 1 tnbit.ddl --enable-error-stack -H -p -d nbit tfilters.h5 -# scaleoffset -TOOLTESTC 4 tscaleoffset.ddl --enable-error-stack -H -p -d scaleoffset tfilters.h5 -# all -TOOLTESTC 1 tallfilters.ddl --enable-error-stack -H -p -d all tfilters.h5 -# user defined -TOOLTEST tuserfilter.ddl --enable-error-stack -H -p -d myfilter tfilters.h5 - -if test $USE_FILTER_DEFLATE = "yes" ; then - # data read internal filters - TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5 - if test $USE_FILTER_SZIP = "yes"; then - # data read - TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5 - fi -fi - -# test for displaying objects with very long names -TOOLTEST tlonglinks.ddl --enable-error-stack tlonglinks.h5 - -# dimensions over 4GB, print boundary -TOOLTEST tbigdims.ddl --enable-error-stack -d dset4gb -s 4294967284 -c 22 tbigdims.h5 - -# hyperslab read -TOOLTEST thyperslab.ddl --enable-error-stack thyperslab.h5 - -# test for displaying dataset and attribute of null space -TOOLTEST tnullspace.ddl --enable-error-stack tnullspace.h5 -TOOLTEST tgrpnullspace.ddl -p --enable-error-stack tgrpnullspace.h5 - -# test for displaying dataset and attribute of space with 0 dimension size -TOOLTEST zerodim.ddl --enable-error-stack zerodim.h5 - -# test for long double (some systems do not have long double) -TOOLTEST tfloatsattrs.ddl -p --enable-error-stack tfloatsattrs.h5 -TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5 -TOOLTEST tldouble_scalar.ddl -p --enable-error-stack tldouble_scalar.h5 - -# tests for _Float16 type -TOOLTEST tfloat16.ddl --enable-error-stack tfloat16.h5 -TOOLTEST tfloat16_be.ddl --enable-error-stack tfloat16_be.h5 - -# test for vms -TOOLTEST tvms.ddl --enable-error-stack tvms.h5 - -# test for binary output -TOOLTEST tbin1.ddl --enable-error-stack -d integer -o out1.bin -b LE tbinary.h5 - -# test for string binary output -TOOLTEST2B tstr2bin2.exp --enable-error-stack -d /g2/dset2 -b -o tstr2bin2.txt tstr2.h5 -TOOLTEST2B tstr2bin6.exp --enable-error-stack -d /g6/dset6 -b -o tstr2bin6.txt tstr2.h5 - -# NATIVE default. the NATIVE test can be validated with h5import/h5diff -TOOLTEST tbin1.ddl --enable-error-stack -d integer -o out1.bin -b tbinary.h5 -IMPORTTEST out1.bin -c out3.h5import -o out1.h5 -DIFFTEST tbinary.h5 out1.h5 /integer /integer -# Same but use h5dump as input to h5import -IMPORTTEST out1.bin -c tbin1.ddl -o out1D.h5 -#DIFFTEST tbinary.h5 out1D.h5 /integer /integer - -TOOLTEST tbin2.ddl --enable-error-stack -b BE -d float -o out2.bin tbinary.h5 - -# the NATIVE test can be validated with h5import/h5diff -TOOLTEST tbin3.ddl --enable-error-stack -d integer -o out3.bin -b NATIVE tbinary.h5 -IMPORTTEST out3.bin -c out3.h5import -o out3.h5 -DIFFTEST tbinary.h5 out3.h5 /integer /integer -# Same but use h5dump as input to h5import -IMPORTTEST out3.bin -c tbin3.ddl -o out3D.h5 -#DIFFTEST tbinary.h5 out3D.h5 /integer /integer - -TOOLTEST tbin4.ddl --enable-error-stack -d double -b FILE -o out4.bin tbinary.h5 - -# Clean up binary output files -if test -z "$HDF5_NOCLEANUP"; then - rm -f out[1-4].bin - rm -f out1.h5 - rm -f out3.h5 -fi - -# test for dataset region references -TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5 -GREPTEST ERRTXT "NULL token size" tdataregR.ddl --enable-error-stack -R tdatareg.h5 -TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5 -GREPTEST ERRTXT "NULL token size" tattrregR.ddl --enable-error-stack -R tattrreg.h5 -TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5 - -# Clean up text output files -if test -z "$HDF5_NOCLEANUP"; then - rm -f tbinregR.txt -fi - -# tests for group creation order -# "1" tracked, "2" name, root tracked -TOOLTEST tordergr1.ddl --enable-error-stack --group=1 --sort_by=creation_order --sort_order=ascending tordergr.h5 -TOOLTEST tordergr2.ddl --enable-error-stack --group=1 --sort_by=creation_order --sort_order=descending tordergr.h5 -TOOLTEST tordergr3.ddl --enable-error-stack -g 2 -q name -z ascending tordergr.h5 -TOOLTEST tordergr4.ddl --enable-error-stack -g 2 -q name -z descending tordergr.h5 -TOOLTEST tordergr5.ddl --enable-error-stack -q creation_order tordergr.h5 - -# tests for attribute order -TOOLTEST torderattr1.ddl --enable-error-stack -H --sort_by=name --sort_order=ascending torderattr.h5 -TOOLTEST torderattr2.ddl --enable-error-stack -H --sort_by=name --sort_order=descending torderattr.h5 -TOOLTEST torderattr3.ddl --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5 -TOOLTEST torderattr4.ddl --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5 - -# tests for link references and order -GREPTEST3 ERRTXT "unable to open external file, external link file name = 'fname'" torderlinks1.ddl --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5 -GREPTEST3 ERRTXT "unable to open external file, external link file name = 'fname'" torderlinks2.ddl --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5 - -# tests for floating point user defined printf format -TOOLTEST tfpformat.ddl --enable-error-stack -m %.7f tfpformat.h5 - -# tests for traversal of external links -GREPTEST3 ERRTXT "Too many soft links in path" textlinksrc.ddl --enable-error-stack textlinksrc.h5 -GREPTEST3 ERRTXT "Too many soft links in path" textlinkfar.ddl --enable-error-stack textlinkfar.h5 - -# test for dangling external links -GREPTEST3 ERRTXT "unable to open external file, external link file name = 'anotherfile'" textlink.ddl --enable-error-stack textlink.h5 - -# test for error stack display (BZ2048) -GREPTEST2 ERRTXT "filter plugins disabled" filter_fail.ddl --enable-error-stack filter_fail.h5 - -# test for -o -y for dataset with attributes -TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5 - -# test for non-existing file -GREPTEST ERRTXT "unable to open file" non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5 - -# test to verify github issue #3790: infinite loop closing library -GREPTEST ERRTXT "unable to open file" infinite_loop.ddl 3790_infinite_loop.h5 - -# test to verify HDFFV-10333: error similar to H5O_attr_decode in the jira issue -GREPTEST ERRTXT "error getting attribute information" err_attr_dspace.ddl err_attr_dspace.h5 - -# test to verify HDFFV-9407: long double full precision -#GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5 - -# test to verify HDFFV-10480: out of bounds read in H5O_fill_new[old]_decode -TOOLTEST_FAIL tCVE_2018_11206_fill_old.h5 -TOOLTEST_FAIL tCVE_2018_11206_fill_new.h5 - -# test to verify fix for CVE-2021-37501: multiplication overflow in H5O__attr_decode() -# https://github.com/ST4RF4LL/Something_Found/blob/main/HDF5_v1.13.0_h5dump_heap_overflow.assets/poc -TOOLTEST_FAIL tCVE-2021-37501_attr_decode.h5 - -# test Onion VFD -TOOLTEST tst_onion_objs.ddl --enable-error-stack --vfd-name onion --vfd-info 3 tst_onion_objs.h5 -TOOLTEST tst_onion_dset_ext.ddl --enable-error-stack --vfd-name onion --vfd-info 1 tst_onion_dset_ext.h5 -TOOLTEST tst_onion_dset_1d.ddl --enable-error-stack --vfd-name onion --vfd-info 1 tst_onion_dset_1d.h5 -TOOLTEST tst_onion_revision_count.ddl --enable-error-stack --vfd-name onion --vfd-info revision_count tst_onion_objs.h5 - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in deleted file mode 100644 index 181dfb1b978..00000000000 --- a/tools/test/h5dump/testh5dumppbits.sh.in +++ /dev/null @@ -1,389 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5dump tool with packed bits type files - -srcdir=@srcdir@ - -# Determine which filters are available -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=h5dump -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -DUMPER=../../src/h5dump/h5dump # The tool name -DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary - -H5DIFF=../../src/h5diff/h5diff # The h5diff tool name -H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary - -H5IMPORT=../../src/h5import/h5import # The h5import tool name -H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -GREP='grep' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" - -TEST_P_DIR=./testfiles -TESTDIR=./tmpbits -test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR -test -d $TESTDIR || mkdir -p $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/packedbits.h5 -$SRC_H5DUMP_TESTFILES/tarray1.h5 -$SRC_H5DUMP_TESTFILES/tcompound.h5 -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5DUMP_OUTFILES/pbits/tnofilename-with-packed-bits.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsArray.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsCompound.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsIncomplete.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsLengthExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsCharLengthExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsIntLengthExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsLongLengthExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsLengthPositive.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsMax.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsMaxExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsOffsetExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsCharOffsetExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsIntOffsetExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsLongOffsetExceeded.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsOffsetNegative.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsOverlapped.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSigned.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsigned.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedInt.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedInt.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLong.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLong.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLong.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLong.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedWhole.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedWhole.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedIntWhole.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedIntWhole.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongWhole.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongWhole.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLongWhole.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLongWhole.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLongWhole1.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLongWhole1.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLongWhole63.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLongWhole63.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSigned4.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsigned4.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedInt8.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedInt8.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLong16.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLong16.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLong32.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLong32.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSigned2.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsigned2.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedInt4.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedInt4.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLong8.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLong8.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLong16.ddl -$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLong16.ddl -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5DUMP_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext - fi -} - - -# Call the h5dump tool and grep for a value -# txttype ERRTXT greps test error output, otherwise greps test output -GREPTEST() -{ - txttype=$1 - expectdata=$2 - expect="$TESTDIR/$3" - actual="$TESTDIR/`basename $3 .ddl`.out" - actual_err="$TESTDIR/`basename $3 .ddl`.oerr" - shift - shift - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - if [ "$txttype" = "ERRTXT" ]; then - $GREP "$expectdata" $actual_err > /dev/null - else - $GREP "$expectdata" $actual > /dev/null - fi - - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo " FAILED" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $DUMPER $@ - echo " -SKIP-" -} - - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -####### test for dataset packed bits ###### - -# test failure handling -# Missing file name -GREPTEST ERRTXT "missing file name" tnofilename-with-packed-bits.ddl --enable-error-stack -# Limits: -# Maximum number of packed bits is 8 (for now). -# Maximum integer size is 64 (for now). -# Maximum Offset is 63 (Maximum size - 1). -# Maximum Offset+Length is 64 (Maximum size). -# Tests: -# Normal operation on both signed and unsigned int datasets. -# Sanity check -# Their rawdata output should be the same. -TOOLTEST tpbitsSignedWhole.ddl --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5 -TOOLTEST tpbitsUnsignedWhole.ddl --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5 -TOOLTEST tpbitsSignedIntWhole.ddl --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5 -TOOLTEST tpbitsUnsignedIntWhole.ddl --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5 -TOOLTEST tpbitsSignedLongWhole.ddl --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5 -TOOLTEST tpbitsUnsignedLongWhole.ddl --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5 -TOOLTEST tpbitsSignedLongLongWhole.ddl --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLongWhole.ddl --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5 -TOOLTEST tpbitsSignedLongLongWhole63.ddl --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLongWhole63.ddl --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5 -TOOLTEST tpbitsSignedLongLongWhole1.ddl --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLongWhole1.ddl --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5 -# Half sections -TOOLTEST tpbitsSigned4.ddl --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5 -TOOLTEST tpbitsUnsigned4.ddl --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5 -TOOLTEST tpbitsSignedInt8.ddl --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5 -TOOLTEST tpbitsUnsignedInt8.ddl --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5 -TOOLTEST tpbitsSignedLong16.ddl --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5 -TOOLTEST tpbitsUnsignedLong16.ddl --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5 -TOOLTEST tpbitsSignedLongLong32.ddl --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLong32.ddl --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5 -# Quarter sections -TOOLTEST tpbitsSigned2.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5 -TOOLTEST tpbitsUnsigned2.ddl --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5 -TOOLTEST tpbitsSignedInt4.ddl --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5 -TOOLTEST tpbitsUnsignedInt4.ddl --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5 -TOOLTEST tpbitsSignedLong8.ddl --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5 -TOOLTEST tpbitsUnsignedLong8.ddl --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5 -TOOLTEST tpbitsSignedLongLong16.ddl --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLong16.ddl --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5 -# Begin and End -TOOLTEST tpbitsSigned.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5 -TOOLTEST tpbitsUnsigned.ddl --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5 -TOOLTEST tpbitsSignedInt.ddl --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5 -TOOLTEST tpbitsUnsignedInt.ddl --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5 -TOOLTEST tpbitsSignedLong.ddl --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5 -TOOLTEST tpbitsUnsignedLong.ddl --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5 -TOOLTEST tpbitsSignedLongLong.ddl --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLong.ddl --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5 -# Overlapped packed bits. -TOOLTEST tpbitsOverlapped.ddl --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5 -# Maximum number of packed bits. -TOOLTEST tpbitsMax.ddl --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5 -# Compound type. -TOOLTEST tpbitsCompound.ddl --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5 -# Array type. -TOOLTEST tpbitsArray.ddl --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5 -# Test Error handling. -# Too many packed bits requested. Max is 8 for now. -GREPTEST ERRTXT "Too many masks requested" tpbitsMaxExceeded.ddl --enable-error-stack -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5 -# Offset too large. Max is 7 (8-1) for now. -GREPTEST ERRTXT "must be between 0 and 63" tpbitsOffsetExceeded.ddl --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5 -TOOLTEST tpbitsCharOffsetExceeded.ddl --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5 -TOOLTEST tpbitsIntOffsetExceeded.ddl --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5 -TOOLTEST tpbitsLongOffsetExceeded.ddl --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5 -# Bad offset, must not be negative. -GREPTEST ERRTXT "Bad mask list" tpbitsOffsetNegative.ddl --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5 -# Bad length, must not be positive. -GREPTEST ERRTXT "must be positive" tpbitsLengthPositive.ddl --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5 -# Offset+Length is too large. Max is 8 for now. -GREPTEST ERRTXT "too large" tpbitsLengthExceeded.ddl --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5 -TOOLTEST tpbitsCharLengthExceeded.ddl --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5 -TOOLTEST tpbitsIntLengthExceeded.ddl --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5 -TOOLTEST tpbitsLongLengthExceeded.ddl --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5 -# Incomplete pair of packed bits request. -GREPTEST ERRTXT "Bad mask list" tpbitsIncomplete.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5 - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in deleted file mode 100644 index 9c992303d67..00000000000 --- a/tools/test/h5dump/testh5dumpvds.sh.in +++ /dev/null @@ -1,288 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5dump tool with vds type files - -srcdir=@srcdir@ - -# Determine which filters are available -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=h5dump -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -DUMPER=../../src/h5dump/h5dump # The tool name -DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary - -H5DIFF=../../src/h5diff/h5diff # The h5diff tool name -H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary - -H5IMPORT=../../src/h5import/h5import # The h5import tool name -H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" - -TEST_P_DIR=./testfiles -TESTDIR=./tmpvds -test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR -test -d $TESTDIR || mkdir -p $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/vds/1_a.h5 -$SRC_H5DUMP_TESTFILES/vds/1_b.h5 -$SRC_H5DUMP_TESTFILES/vds/1_c.h5 -$SRC_H5DUMP_TESTFILES/vds/1_d.h5 -$SRC_H5DUMP_TESTFILES/vds/1_e.h5 -$SRC_H5DUMP_TESTFILES/vds/1_f.h5 -$SRC_H5DUMP_TESTFILES/vds/1_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/2_a.h5 -$SRC_H5DUMP_TESTFILES/vds/2_b.h5 -$SRC_H5DUMP_TESTFILES/vds/2_c.h5 -$SRC_H5DUMP_TESTFILES/vds/2_d.h5 -$SRC_H5DUMP_TESTFILES/vds/2_e.h5 -$SRC_H5DUMP_TESTFILES/vds/2_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/4_0.h5 -$SRC_H5DUMP_TESTFILES/vds/4_1.h5 -$SRC_H5DUMP_TESTFILES/vds/4_2.h5 -$SRC_H5DUMP_TESTFILES/vds/4_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/5_a.h5 -$SRC_H5DUMP_TESTFILES/vds/5_b.h5 -$SRC_H5DUMP_TESTFILES/vds/5_c.h5 -$SRC_H5DUMP_TESTFILES/vds/5_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/a.h5 -$SRC_H5DUMP_TESTFILES/vds/b.h5 -$SRC_H5DUMP_TESTFILES/vds/c.h5 -$SRC_H5DUMP_TESTFILES/vds/d.h5 -$SRC_H5DUMP_TESTFILES/vds/vds-percival-unlim-maxmin.h5 -$SRC_H5DUMP_TESTFILES/vds/f-0.h5 -$SRC_H5DUMP_TESTFILES/vds/f-3.h5 -$SRC_H5DUMP_TESTFILES/vds/vds-eiger.h5 -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5DUMP_OUTFILES/vds/tvds-1.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds-2.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds-3_1.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds-3_2.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds-4.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds-5.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds_layout-1.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds_layout-2.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds_layout-3_1.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds_layout-3_2.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds_layout-4.ddl -$SRC_H5DUMP_OUTFILES/vds/tvds_layout-5.ddl -$SRC_H5DUMP_OUTFILES/vds/vds-first.ddl -$SRC_H5DUMP_OUTFILES/vds/vds-gap1.ddl -$SRC_H5DUMP_OUTFILES/vds/vds-gap2.ddl -$SRC_H5DUMP_OUTFILES/vds/vds_layout-eiger.ddl -$SRC_H5DUMP_OUTFILES/vds/vds_layout-maxmin.ddl -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5DUMP_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - cat $actual_err >> $actual - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext - fi -} - - -# Print a "SKIP" message -SKIP() { - TESTING $DUMPER $@ - echo " -SKIP-" -} - - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -####### test for dataset vds ###### - -# Data read -if test $USE_FILTER_DEFLATE = "yes" ; then - TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5 - TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5 - TOOLTEST tvds-3_1.ddl --enable-error-stack 3_1_vds.h5 - TOOLTEST tvds-3_2.ddl --enable-error-stack 3_2_vds.h5 - TOOLTEST tvds-4.ddl --enable-error-stack 4_vds.h5 - TOOLTEST tvds-5.ddl --enable-error-stack 5_vds.h5 - TOOLTEST vds-first.ddl --vds-view-first-missing --enable-error-stack vds-percival-unlim-maxmin.h5 - TOOLTEST vds-gap1.ddl -d /VDS-Eiger --vds-gap-size=1 --enable-error-stack vds-eiger.h5 - TOOLTEST vds-gap2.ddl --vds-gap-size=2 --enable-error-stack vds-eiger.h5 -fi - -# Layout read -if test $USE_FILTER_DEFLATE = "yes" ; then - TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5 - TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5 - TOOLTEST tvds_layout-3_1.ddl -p --enable-error-stack 3_1_vds.h5 - TOOLTEST tvds_layout-3_2.ddl -p --enable-error-stack 3_2_vds.h5 - TOOLTEST tvds_layout-4.ddl -p --enable-error-stack 4_vds.h5 - TOOLTEST tvds_layout-5.ddl -p --enable-error-stack 5_vds.h5 - TOOLTEST vds_layout-eiger.ddl -p --enable-error-stack vds-eiger.h5 - TOOLTEST vds_layout-maxmin.ddl -p --enable-error-stack vds-percival-unlim-maxmin.h5 -fi - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in deleted file mode 100644 index b95d5c4ff34..00000000000 --- a/tools/test/h5dump/testh5dumpxml.sh.in +++ /dev/null @@ -1,409 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5dump tool - -srcdir=@srcdir@ - -TESTNAME=h5dumpxml -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -DUMPER=../../src/h5dump/h5dump # The tool name -DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -WORDS_BIGENDIAN="@WORDS_BIGENDIAN@" - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected" - -TEST_P_DIR=./testfiles -TESTDIR=./tmpxml -test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR -test -d $TESTDIR || mkdir -p $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES_XML=" -$SRC_H5DUMP_TESTFILES/xml/tbitfields.h5 -$SRC_H5DUMP_TESTFILES/xml/tcompound2.h5 -$SRC_H5DUMP_TESTFILES/xml/tdset2.h5 -$SRC_H5DUMP_TESTFILES/xml/tenum.h5 -$SRC_H5DUMP_TESTFILES/xml/test35.nc -$SRC_H5DUMP_TESTFILES/xml/tloop2.h5 -$SRC_H5DUMP_TESTFILES/xml/tmany.h5 -$SRC_H5DUMP_TESTFILES/xml/tname-amp.h5 -$SRC_H5DUMP_TESTFILES/xml/tname-apos.h5 -$SRC_H5DUMP_TESTFILES/xml/tname-gt.h5 -$SRC_H5DUMP_TESTFILES/xml/tname-lt.h5 -$SRC_H5DUMP_TESTFILES/xml/tname-quot.h5 -$SRC_H5DUMP_TESTFILES/xml/tname-sp.h5 -$SRC_H5DUMP_TESTFILES/xml/tnodata.h5 -$SRC_H5DUMP_TESTFILES/xml/tobjref.h5 -$SRC_H5DUMP_TESTFILES/xml/topaque.h5 -$SRC_H5DUMP_TESTFILES/xml/tref.h5 -$SRC_H5DUMP_TESTFILES/xml/tref-escapes.h5 -$SRC_H5DUMP_TESTFILES/xml/tref-escapes-at.h5 -$SRC_H5DUMP_TESTFILES/xml/tstring.h5 -$SRC_H5DUMP_TESTFILES/xml/tstring-at.h5 -" - -LIST_HDF5_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/tall.h5 -$SRC_H5DUMP_TESTFILES/tarray1.h5 -$SRC_H5DUMP_TESTFILES/tarray2.h5 -$SRC_H5DUMP_TESTFILES/tarray3.h5 -$SRC_H5DUMP_TESTFILES/tarray6.h5 -$SRC_H5DUMP_TESTFILES/tarray7.h5 -$SRC_H5DUMP_TESTFILES/tattr.h5 -$SRC_H5DUMP_TESTFILES/tcompound.h5 -$SRC_H5DUMP_TESTFILES/tcompound_complex.h5 -$SRC_H5DUMP_TESTFILES/tdatareg.h5 -$SRC_H5DUMP_TESTFILES/tdset.h5 -$SRC_H5DUMP_TESTFILES/tempty.h5 -$SRC_H5DUMP_TESTFILES/textlink.h5 -$SRC_H5DUMP_TESTFILES/tfloat16.h5 -$SRC_H5DUMP_TESTFILES/tfloat16_be.h5 -$SRC_H5DUMP_TESTFILES/tfpformat.h5 -$SRC_H5DUMP_TESTFILES/tgroup.h5 -$SRC_H5DUMP_TESTFILES/thlink.h5 -$SRC_H5DUMP_TESTFILES/tloop.h5 -$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5 -$SRC_H5DUMP_TESTFILES/tnestedcomp.h5 -$SRC_H5DUMP_TESTFILES/tnullspace.h5 -$SRC_H5DUMP_TESTFILES/torderattr.h5 -$SRC_H5DUMP_TESTFILES/tsaf.h5 -$SRC_H5DUMP_TESTFILES/tslink.h5 -$SRC_H5DUMP_TESTFILES/tstr.h5 -$SRC_H5DUMP_TESTFILES/tstr2.h5 -$SRC_H5DUMP_TESTFILES/tudlink.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes1.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes2.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes3.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes4.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes5.h5 -$SRC_H5DUMP_TESTFILES/tvlstr.h5 -" - -LIST_OTHER_TEST_FILES_XML=" -$SRC_H5DUMP_OUTFILES/xml/tall.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tall-2A.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tarray1.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tarray2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tarray3.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tarray6.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tarray7.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tattr.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tbitfields_be.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tbitfields_le.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tcompound_complex.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tcompound.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tcompound2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tdatareg.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tdset.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tdset2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty-dtd.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty-dtd-2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty-dtd-uri.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty-nons.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty-nons-2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty-nons-uri.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty-ns.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tempty-ns-2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tenum.h5.xml -$SRC_H5DUMP_OUTFILES/xml/test35.nc.xml -$SRC_H5DUMP_OUTFILES/xml/textlink.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tfloat16.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tfloat16_be.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tfpformat.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tgroup.h5.xml -$SRC_H5DUMP_OUTFILES/xml/thlink.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tloop.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tloop2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tmany.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tname-amp.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tname-apos.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tnamed_dtype_attr.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tname-gt.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tname-lt.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tname-quot.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tname-sp.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tnestedcomp.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tnodata.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tnullspace.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tobjref.h5.xml -$SRC_H5DUMP_OUTFILES/xml/topaque.h5.xml -$SRC_H5DUMP_OUTFILES/xml/torderattr1.h5.xml -$SRC_H5DUMP_OUTFILES/xml/torderattr2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/torderattr3.h5.xml -$SRC_H5DUMP_OUTFILES/xml/torderattr4.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tref.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tref-escapes.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tref-escapes-at.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tsaf.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tslink.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tstr.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tstr2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tstring.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tstring-at.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tudlink.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tvldtypes1.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tvldtypes2.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tvldtypes3.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tvldtypes4.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tvldtypes5.h5.xml -$SRC_H5DUMP_OUTFILES/xml/tvlstr.h5.xml -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5DUMP_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .xml`.out" - actual_err="$TESTDIR/`basename $1 .xml`.err" - shift - - # Run test. - TESTING $DUMPER $@ - ( - cd $TESTDIR - $RUNSERIAL $DUMPER_BIN "$@" - ) >$actual 2>$actual_err - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.xml) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.xml) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $DUMPER $@ - echo " -SKIP-" -} - - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# test XML -TOOLTEST tall.h5.xml --xml tall.h5 -TOOLTEST tattr.h5.xml --xml tattr.h5 -if test $WORDS_BIGENDIAN != "yes"; then -TOOLTEST tbitfields_le.h5.xml --xml tbitfields.h5 -else -TOOLTEST tbitfields_be.h5.xml --xml tbitfields.h5 -fi -TOOLTEST tcompound.h5.xml --xml tcompound.h5 -TOOLTEST tcompound2.h5.xml --xml tcompound2.h5 -TOOLTEST tdatareg.h5.xml --xml tdatareg.h5 -TOOLTEST tdset.h5.xml --xml tdset.h5 -TOOLTEST tdset2.h5.xml --xml tdset2.h5 -TOOLTEST tenum.h5.xml --xml tenum.h5 -TOOLTEST tgroup.h5.xml --xml tgroup.h5 -TOOLTEST thlink.h5.xml --xml thlink.h5 -TOOLTEST tloop.h5.xml --xml tloop.h5 -TOOLTEST tloop2.h5.xml --xml tloop2.h5 -TOOLTEST tmany.h5.xml --xml tmany.h5 -TOOLTEST tnestedcomp.h5.xml --xml tnestedcomp.h5 -TOOLTEST tcompound_complex.h5.xml --xml tcompound_complex.h5 -TOOLTEST tobjref.h5.xml --xml tobjref.h5 -TOOLTEST topaque.h5.xml --xml topaque.h5 -TOOLTEST tslink.h5.xml --xml tslink.h5 -TOOLTEST tudlink.h5.xml --xml tudlink.h5 -TOOLTEST textlink.h5.xml --xml textlink.h5 -TOOLTEST tstr.h5.xml --xml tstr.h5 -TOOLTEST tstr2.h5.xml --xml tstr2.h5 -TOOLTEST tref.h5.xml --xml tref.h5 -TOOLTEST tname-amp.h5.xml --xml tname-amp.h5 -TOOLTEST tname-apos.h5.xml --xml tname-apos.h5 -TOOLTEST tname-gt.h5.xml --xml tname-gt.h5 -TOOLTEST tname-lt.h5.xml --xml tname-lt.h5 -TOOLTEST tname-quot.h5.xml --xml tname-quot.h5 -TOOLTEST tname-sp.h5.xml --xml tname-sp.h5 -TOOLTEST tstring.h5.xml --xml tstring.h5 -TOOLTEST tstring-at.h5.xml --xml tstring-at.h5 -TOOLTEST tref-escapes.h5.xml --xml tref-escapes.h5 -TOOLTEST tref-escapes-at.h5.xml --xml tref-escapes-at.h5 -TOOLTEST tnodata.h5.xml --xml tnodata.h5 -TOOLTEST tarray1.h5.xml --xml tarray1.h5 -TOOLTEST tarray2.h5.xml --xml tarray2.h5 -TOOLTEST tarray3.h5.xml --xml tarray3.h5 -TOOLTEST tarray6.h5.xml --xml tarray6.h5 -TOOLTEST tarray7.h5.xml --xml tarray7.h5 -TOOLTEST tvldtypes1.h5.xml --xml tvldtypes1.h5 -TOOLTEST tvldtypes2.h5.xml --xml tvldtypes2.h5 -TOOLTEST tvldtypes3.h5.xml --xml tvldtypes3.h5 -TOOLTEST tvldtypes4.h5.xml --xml tvldtypes4.h5 -TOOLTEST tvldtypes5.h5.xml --xml tvldtypes5.h5 -TOOLTEST tvlstr.h5.xml --xml tvlstr.h5 -TOOLTEST tsaf.h5.xml --xml tsaf.h5 -TOOLTEST tempty.h5.xml --xml tempty.h5 -TOOLTEST tnamed_dtype_attr.h5.xml --xml tnamed_dtype_attr.h5 -TOOLTEST tnullspace.h5.xml --xml tnullspace.h5 - -# other options for xml - -TOOLTEST tempty-dtd.h5.xml --xml --use-dtd tempty.h5 -TOOLTEST tempty-dtd-2.h5.xml --xml -u tempty.h5 -TOOLTEST tempty-nons.h5.xml --xml -X ":" tempty.h5 -TOOLTEST tempty-nons-2.h5.xml --xml --xml-ns=":" tempty.h5 - -## Some of these combinations are syntactically correct but -## the URLs are dummies -TOOLTEST tempty-ns.h5.xml --xml -X "thing:" tempty.h5 -TOOLTEST tempty-ns-2.h5.xml --xml --xml-ns="thing:" tempty.h5 -TOOLTEST tempty-nons-uri.h5.xml --xml --xml-ns=":" --xml-dtd="http://somewhere.net" tempty.h5 -TOOLTEST tempty-dtd-uri.h5.xml --xml --use-dtd --xml-dtd="http://somewhere.net" tempty.h5 - -TOOLTEST tall-2A.h5.xml --xml -A tall.h5 - - -# tests for attribute order -TOOLTEST torderattr1.h5.xml --xml -H --sort_by=name --sort_order=ascending torderattr.h5 -TOOLTEST torderattr2.h5.xml --xml -H --sort_by=name --sort_order=descending torderattr.h5 -TOOLTEST torderattr3.h5.xml --xml -H --sort_by=creation_order --sort_order=ascending torderattr.h5 -TOOLTEST torderattr4.h5.xml --xml -H --sort_by=creation_order --sort_order=descending torderattr.h5 - -# tests for _Float16 type -TOOLTEST tfloat16.h5.xml --xml tfloat16.h5 -TOOLTEST tfloat16_be.h5.xml --xml tfloat16_be.h5 - -# tests for floating point user defined printf format -TOOLTEST tfpformat.h5.xml -u -m %.7f tfpformat.h5 - -# test for HDFFV-10256 issue -TOOLTEST test35.nc.xml --xml test35.nc - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5format_convert/Makefile.am b/tools/test/h5format_convert/Makefile.am deleted file mode 100644 index 1ab0151bb19..00000000000 --- a/tools/test/h5format_convert/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -#test script and program -TEST_PROG=h5fc_gentest -TEST_SCRIPT=testh5fc.sh - -check_PROGRAMS=$(TEST_PROG) h5fc_chk_idx -check_SCRIPTS=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../src/h5format_convert/h5format_convert$(EXEEXT) - -CLEANFILES= - -# Tell automake to clean h5redeploy script -CHECK_CLEANFILES+=*.h5 - -# These were generated by configure. Remove them only when distclean. -DISTCLEANFILES=testh5fc.sh - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in deleted file mode 100644 index 6b75248f3c3..00000000000 --- a/tools/test/h5format_convert/testh5fc.sh.in +++ /dev/null @@ -1,660 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5format_convert tool -# -# - -srcdir=@srcdir@ - -# Determine which filters are available -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" -USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@" -USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" -USE_FILTER_NBIT="@USE_FILTER_NBIT@" -USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@" - -TESTNAME=h5format_convert -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -FORMCONV=../../src/h5format_convert/h5format_convert # The tool name -FORMCONV_BIN=`pwd`/$FORMCONV # The path of the tool binary - -CHK_IDX=h5fc_chk_idx # The program name -CHK_IDX_BIN=`pwd`/$CHK_IDX # The program to verify the chunk indexing type is v1 B-tree - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -H5DUMP=../../src/h5dump/h5dump # The h5dump tool name -H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary -DIRNAME='dirname' -LS='ls' -AWK='awk' -GREP='grep' - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5FORMCONV_TESTFILES="$SRC_TOOLS/test/h5format_convert/testfiles" -SRC_H5FORMCONV_OUTFILES="$SRC_TOOLS/test/h5format_convert/expected" - -TESTDIR=./tmp -test -d $TESTDIR || mkdir $TESTDIR - -# Copy the testfile to a temporary file for testing as h5format_convert is changing the file in place -TMPOUTFILE=tmp.h5 -TMPFILE=tmp.h5 -TMPCHKFILE=tmp.h5 -TMPDMPFILE=tmp.h5 - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5FORMCONV_TESTFILES/h5fc_non_v3.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_edge_v3.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_ext_none.h5 -$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext_none.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_i.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_s.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_f.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_if.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_is.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_sf.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_ext3_isf.h5 -$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_i.h5 -$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_s.h5 -$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_f.h5 -$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_if.h5 -$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_is.h5 -$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_sf.h5 -$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext3_isf.h5 -$SRC_H5FORMCONV_TESTFILES/h5fc_err_level.h5 -" - -LIST_ERR_TEST_FILES=" -$SRC_H5FORMCONV_OUTFILES/h5fc_d_file.ddl.err -$SRC_H5FORMCONV_OUTFILES/h5fc_dname.err -$SRC_H5FORMCONV_OUTFILES/h5fc_nonexistfile.ddl.err -$SRC_H5FORMCONV_OUTFILES/h5fc_nonexistdset_file.ddl.err -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5FORMCONV_OUTFILES/h5fc_help.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_nooption.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_d_file.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_dname.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_v_non_chunked.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_v_bt1.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_v_ndata_bt1.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_v_all.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_v_n_1d.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_v_n_all.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_ext1_i.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_ext1_s.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_ext1_f.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_ext2_if.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_ext2_is.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_ext2_sf.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_ext3_isf.ddl -$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext1_i.ddl -$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext1_s.ddl -$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext1_f.ddl -$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext2_if.ddl -$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext2_is.ddl -$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext2_sf.ddl -$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext3_isf.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_v_err.ddl -$SRC_H5FORMCONV_OUTFILES/h5fc_v_err.ddl.err -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_ERR_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5FORMCONV_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - else - $RM $TESTDIR/$TMPFILE - $RM $TESTDIR/$TMPOUTFILE - $RM $TESTDIR/$TMPCHKFILE - $RM $TESTDIR/*-$TMPDMPFILE - fi -} - -# Print a line-line message left justified in a field of 80 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-80 | tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -# $1: expected output -# $2: the test file name -# --fname might be empty or fname does not exist -# --fname is copied to a temporary file for testing -# $3 to at most $6--options to the tool such as: -# -d dname or --dname=dname -# -v or --verbose -# -n or --noop -TOOLTEST_OUT() { - # Prepare expected and actual output - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - testfile="`basename $1 .ddl`-tmp.h5" - - # Prepare the test file - $RM $TESTDIR/$testfile - TFILE=$2 - if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then - $CP $TESTDIR/$2 $TESTDIR/$testfile - TFILE=$testfile - fi - - # Run test. - TESTING $FORMCONV $3 $4 $5 $6 $2 - ( - cd $TESTDIR - $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $6 $TFILE - ) >$actual 2>$actual_err - cp $actual $actual_sav - cp $actual_err $actual_err_sav - - # Compare output - COMPARE_OUT $expect $actual - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err - $RM $actual $actual_err $actual_sav $actual_err_sav - fi -} -# Same as TOOLTEST_OUT but filters error stack output and compares to an error file -TOOLTEST_MASK_OUT() { - # Prepare expected and actual output - expect="$TESTDIR/$1" - expect_err="$TESTDIR/$1.err" - actual_ext="$TESTDIR/$1.ext" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - testfile="`basename $1 .ddl`-tmp.h5" - - # Prepare the test file - $RM $TESTDIR/$testfile - TFILE=$2 - if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then - $CP $TESTDIR/$2 $TESTDIR/$testfile - TFILE=$testfile - fi - - # Run test. - TESTING $FORMCONV $3 $4 $5 $6 $2 - ( - cd $TESTDIR - $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $6 $TFILE - ) >$actual 2>$actual_err - cp $actual $actual_sav - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - - # Extract file name, line number, version and thread IDs because they may be different - sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ - -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ - -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ - -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ - $actual_err > $actual_ext - - # Compare output - if $CMP $expect $actual; then - if $CMP $expect_err $actual_ext; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.err) differs from actual result (*.oerr)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' - fi - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err - $RM $actual $actual_err $actual_sav $actual_err_sav - fi -} -# Same as TOOLTEST_OUT except only compares error output -TOOLTEST_ERR() { - # Prepare expected and actual output - expect="$TESTDIR/$1" - expect_err="$TESTDIR/$1.err" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - testfile="`basename $1 .ddl`-tmp.h5" - - # Prepare the test file - $RM $TESTDIR/$testfile - TFILE=$2 - if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then - $CP $TESTDIR/$2 $TESTDIR/$testfile - TFILE=$testfile - fi - - # Run test. - TESTING $FORMCONV $3 $4 $5 $6 $2 - ( - cd $TESTDIR - $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $6 $TFILE - ) >$actual 2>$actual_err - cp $actual $actual_sav - cp $actual_err $actual_err_sav - - # Compare output - COMPARE_OUT $expect_err $actual_err - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err - $RM $actual $actual_err $actual_sav $actual_err_sav - fi -} -# Same as TOOLTEST_OUT except only grep error output -TOOLTEST_GREP() { - # Prepare expected and actual output - expect="$TESTDIR/$1" - expected=$2 - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - testfile="`basename $1 .ddl`-tmp.h5" - - # Run test. - TESTING $FORMCONV $3 $4 $5 $6 $2 - ( - cd $TESTDIR - $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $6 $TFILE - ) >$actual 2>$actual_err - cp $actual $actual_sav - cp $actual_err $actual_err_sav - - # Compare output - $GREP "$expectdata" $actual_err > /dev/null - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected error message not found in actual output" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err - $RM $actual $actual_err $actual_sav $actual_err_sav - fi -} - -# To check that the tool exits success, no output -# Assume all short options -# $1 is the test file name -# --fname exists -# --fname is copied to a temporary file for testing -# $2 is the temporary file name -# $3 to at most $5--options to the tool such as: -# -d dname -# -n -TOOLTEST() { - TESTING $FORMCONV $3 $4 $5 $1 - testfile="`basename $1 .h5`-tmp.h5" - $RM $TESTDIR/$testfile - $CP $TESTDIR/$1 $TESTDIR/$testfile - $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $TESTDIR/$testfile - exitcode=$? - if [ $exitcode -ne 0 ]; then - echo "*FAILED*" - echo " The tool exits failure" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi -} - -CHECKING() { - SPACES=" " - echo "Verifying $* $SPACES" | cut -c1-80 | tr -d '\012' -} - -# Assume $TESTDIR/$TMPFILE is the converted test file -# $1 dataset name -IDX_CHECK() { - CHECKING $1 - $RUNSERIAL $CHK_IDX_BIN $TESTDIR/$2 $1 - ret=$? - if [ $ret -eq 0 ]; then - echo " PASSED" - else - echo "*FAILED*" - echo " The chunk indexing type is not correct" - nerrors="`expr $nerrors + 1`" - fi -} - -# $1 is the expected output -# $2 is the output from testing -COMPARE_OUT() { - if $CMP $1 $2; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi -} - -# Assume $TESTDIR/$TMPFILE is the converted test file -# $1 is the test file for verifying h5dump output -# $2 is the expected output from h5dump -H5DUMP_CHECK() { - CHECKING h5dump output for $1 - expect="$TESTDIR/$2" - actual="$TESTDIR/`basename $2 .ddl`.out" - actual_err="$TESTDIR/`basename $2 .ddl`.err" - testfile="`basename $2 .ddl`-tmp.h5" - # Run test. - ( - cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN -BH $testfile - ) >$actual 2>$actual_err - cat $actual_err >> $actual - cp $actual $actual_sav - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - - # Compare output - COMPARE_OUT $expect $actual - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $STAT $@ - echo " -SKIP-" -} - - - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR -# -# -# -# h5format_convert --help -# h5format_convert (no options) -# h5format_convert nonexist.h5 (no options, file does not exist) -TOOLTEST_OUT h5fc_help.ddl '' --help -TOOLTEST_OUT h5fc_nooption.ddl '' -TOOLTEST_ERR h5fc_nonexistfile.ddl nonexist.h5 -#TOOLTEST_GREP h5fc_nonexistfile.ddl "unable to open file" -# -# -# h5format_convert -d old_h5fc_ext_none.h5 (just -d option, file exists) -# h5format_convert --dname old_h5fc_ext_none.h5 (just --dname option, file exists) -# h5format_convert --dname (just --dname option) -# h5format_convert --dname=nonexist old_h5fc_ext_none.h5 (dataset does not exist, file exists) -TOOLTEST_OUT h5fc_d_file.ddl old_h5fc_ext_none.h5 -d -TOOLTEST_OUT h5fc_d_file.ddl old_h5fc_ext_none.h5 --dname -TOOLTEST_OUT h5fc_dname.ddl '' --dname -TOOLTEST_ERR h5fc_nonexistdset_file.ddl old_h5fc_ext_none.h5 --dname=nonexist -# -# -# -# h5format_convert -d /DSET_CONTIGUOUS -v old_h5fc_ext_none.h5 (verbose, contiguous dataset) -# h5format_convert -d /GROUP/DSET_BT2 --verbose old_h5fc_ext_none.h5 (verbose, bt1 dataset) -# h5format_convert -d /DSET_NDATA_BT2 -v -n old_h5fc_ext_none.h5 (verbose, noop, bt1+nodata dataset) -# h5format_convert -v old_h5fc_ext_none.h5 (verbose, all datasets) -TOOLTEST_OUT h5fc_v_non_chunked.ddl old_h5fc_ext_none.h5 -d /DSET_CONTIGUOUS -v -TOOLTEST_OUT h5fc_v_bt1.ddl old_h5fc_ext_none.h5 -d /GROUP/DSET_BT2 --verbose -TOOLTEST_OUT h5fc_v_ndata_bt1.ddl old_h5fc_ext_none.h5 -d /DSET_NDATA_BT2 -v -n -TOOLTEST_OUT h5fc_v_all.ddl old_h5fc_ext_none.h5 -v -# -# -# -# h5format_convert -d /DSET_EA -v -n h5fc_ext_none.h5 (verbose, noop, one ea dataset) -# h5format_convert -v -n h5fc_non_v3.h5 (verbose, noop, all datasets) -TOOLTEST_OUT h5fc_v_n_1d.ddl h5fc_ext_none.h5 -d /DSET_EA -v -n -TOOLTEST_OUT h5fc_v_n_all.ddl h5fc_non_v3.h5 -v -n -# -# -# -# h5format_convert -v h5fc_err_level.h5 (error encountered in converting the dataset) -TOOLTEST_MASK_OUT h5fc_v_err.ddl h5fc_err_level.h5 -v -# -# -# -# No output from tests -# 1) Use the tool to convert the dataset -# 2) Verify the chunk indexing type is correct -# h5format_convert -d /DSET_EA h5fc_ext_none.h5 -# h5format_convert -d /GROUP/DSET_NDATA_EA h5fc_ext_none.h5 -# h5format_convert -d /GROUP/DSET_BT2 h5fc_ext_none.h5 -# h5format_convert -d /DSET_NDATA_BT2 h5fc_ext_none.h5 -# h5format_convert -d /DSET_FA h5fc_ext_none.h5 -# h5format_convert -d /GROUP/DSET_FA h5fc_ext_none.h5 -# h5format_convert -d /DSET_NONE h5fc_ext_none.h5 -# h5format_convert -d /GROUP/DSET_NDATA_NONE h5fc_ext_none.h5 -TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_EA -IDX_CHECK /DSET_EA h5fc_ext_none-tmp.h5 -# -TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_EA -IDX_CHECK /GROUP/DSET_NDATA_EA h5fc_ext_none-tmp.h5 -# -TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_BT2 -IDX_CHECK /GROUP/DSET_BT2 h5fc_ext_none-tmp.h5 -# -TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_NDATA_BT2 -IDX_CHECK /DSET_NDATA_BT2 h5fc_ext_none-tmp.h5 -# -TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_FA -IDX_CHECK /DSET_FA h5fc_ext_none-tmp.h5 -# -TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_FA -IDX_CHECK /GROUP/DSET_NDATA_FA h5fc_ext_none-tmp.h5 -# -TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_NONE -IDX_CHECK /DSET_NONE h5fc_ext_none-tmp.h5 -# -TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_NONE -IDX_CHECK /GROUP/DSET_NDATA_NONE h5fc_ext_none-tmp.h5 -# -# -# -# No output from tests: just check exit code -# h5format_convert -d /DSET_NDATA_BT2 old_h5fc_ext_none.h5 (v1-btree dataset) -# h5format_convert -d /DSET_CONTIGUOUS h5fc_non_v3.h5 (non-chunked dataset) -TOOLTEST old_h5fc_ext_none.h5 old_h5fc_ext_none-tmp.h5 -d /DSET_NDATA_BT2 -TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -d /DSET_CONTIGUOUS -# -# -# -# No output from tests: just check exit code -# h5format_convert -d /GROUP/DSET_BT2 -n h5fc_non_v3.h5 (noop, one dataset) -# h5format_convert -n h5fc_non_v3.h5 (noop, all datasets) -TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -d /GROUP/DSET_BT2 -n -TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -n -# -# -# -# No output from tests: just check exit code -# h5format_convert h5fc_non_v3.h5 -# 1) convert all datasets -# 2) verify indexing types -TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -IDX_CHECK /DSET_NDATA_EA h5fc_non_v3-tmp.h5 -IDX_CHECK /DSET_NDATA_BT2 h5fc_non_v3-tmp.h5 -IDX_CHECK /GROUP/DSET_BT2 h5fc_non_v3-tmp.h5 -IDX_CHECK /GROUP/DSET_EA h5fc_non_v3-tmp.h5 -# -# -# -# No output from test: just check exit code -# h5format_convert h5fc_edge_v3.h5 -# 1) convert the chunked dataset (filter, no-filter-edge-chunk) -# 2) verify the indexing type -TOOLTEST h5fc_edge_v3.h5 h5fc_edge_v3-tmp.h5 -IDX_CHECK /DSET_EDGE h5fc_edge_v3-tmp.h5 -# -# - -# The following test files have messages in the superblock extension. -# Verify h5dump output for correctness after conversion -TOOLTEST h5fc_ext1_i.h5 h5fc_ext1_i-tmp.h5 -H5DUMP_CHECK h5fc_ext1_i.h5 h5fc_ext1_i.ddl -TOOLTEST h5fc_ext1_s.h5 h5fc_ext1_s-tmp.h5 -H5DUMP_CHECK h5fc_ext1_s.h5 h5fc_ext1_s.ddl -TOOLTEST h5fc_ext1_f.h5 h5fc_ext1_f-tmp.h5 -H5DUMP_CHECK h5fc_ext1_f.h5 h5fc_ext1_f.ddl -# -TOOLTEST h5fc_ext2_if.h5 h5fc_ext2_if-tmp.h5 -H5DUMP_CHECK h5fc_ext2_if.h5 h5fc_ext2_if.ddl -TOOLTEST h5fc_ext2_is.h5 h5fc_ext2_is-tmp.h5 -H5DUMP_CHECK h5fc_ext2_is.h5 h5fc_ext2_is.ddl -TOOLTEST h5fc_ext2_sf.h5 h5fc_ext2_sf-tmp.h5 -H5DUMP_CHECK h5fc_ext2_sf.h5 h5fc_ext2_sf.ddl -# -TOOLTEST h5fc_ext3_isf.h5 h5fc_ext3_isf-tmp.h5 -H5DUMP_CHECK h5fc_ext3_isf.h5 h5fc_ext3_isf.ddl -# -# -# -TOOLTEST old_h5fc_ext1_i.h5 old_h5fc_ext1_i-tmp.h5 -H5DUMP_CHECK old_h5fc_ext1_i.h5 old_h5fc_ext1_i.ddl -TOOLTEST old_h5fc_ext1_s.h5 old_h5fc_ext1_s-tmp.h5 -H5DUMP_CHECK old_h5fc_ext1_s.h5 old_h5fc_ext1_s.ddl -TOOLTEST old_h5fc_ext1_f.h5 old_h5fc_ext1_f-tmp.h5 -H5DUMP_CHECK old_h5fc_ext1_f.h5 old_h5fc_ext1_f.ddl -# -TOOLTEST old_h5fc_ext2_if.h5 old_h5fc_ext2_if-tmp.h5 -H5DUMP_CHECK old_h5fc_ext2_if.h5 old_h5fc_ext2_if.ddl -TOOLTEST old_h5fc_ext2_is.h5 old_h5fc_ext2_is-tmp.h5 -H5DUMP_CHECK old_h5fc_ext2_is.h5 old_h5fc_ext2_is.ddl -TOOLTEST old_h5fc_ext2_sf.h5 old_h5fc_ext2_sf-tmp.h5 -H5DUMP_CHECK old_h5fc_ext2_sf.h5 old_h5fc_ext2_sf.ddl -# -TOOLTEST old_h5fc_ext3_isf.h5 old_h5fc_ext3_isf-tmp.h5 -H5DUMP_CHECK old_h5fc_ext3_isf.h5 old_h5fc_ext3_isf.ddl -# -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi - diff --git a/tools/test/h5import/Makefile.am b/tools/test/h5import/Makefile.am deleted file mode 100644 index 6cd9947320d..00000000000 --- a/tools/test/h5import/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# Test programs and scripts -TEST_PROG=h5importtest -TEST_SCRIPT=h5importtestutil.sh - -check_PROGRAMS=$(TEST_PROG) -check_SCRIPT=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../src/h5import/h5import$(EXEEXT) - -# All programs depend on the main hdf5 library and the tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -# Temporary files from h5importtest -CHECK_CLEANFILES+=*.bin - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5import/h5importtestutil.sh.in b/tools/test/h5import/h5importtestutil.sh.in deleted file mode 100644 index 04582ee87c2..00000000000 --- a/tools/test/h5import/h5importtestutil.sh.in +++ /dev/null @@ -1,406 +0,0 @@ -#!/bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5import tool - -srcdir=@srcdir@ - -# Determine which filters are available -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=h5import -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -DUMPER=../../src/h5dump/h5dump # The tool name -DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary - -H5DIFF=../../src/h5diff/h5diff # The h5diff tool name -H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary - -H5IMPORT=../../src/h5import/h5import # The h5import tool name -H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary - -RM='rm -rf' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -# initialize errors variable -nerrors=0 - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" - -TESTDIR=./tmp -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5IMPORT_TESTFILES/binfp64.h5 -$SRC_H5IMPORT_TESTFILES/binin8.h5 -$SRC_H5IMPORT_TESTFILES/binin8w.h5 -$SRC_H5IMPORT_TESTFILES/binin16.h5 -$SRC_H5IMPORT_TESTFILES/binin32.h5 -$SRC_H5IMPORT_TESTFILES/binuin16.h5 -$SRC_H5IMPORT_TESTFILES/binuin32.h5 -$SRC_H5IMPORT_TESTFILES/txtfp32.h5 -$SRC_H5IMPORT_TESTFILES/txtfp64.h5 -$SRC_H5IMPORT_TESTFILES/txtin8.h5 -$SRC_H5IMPORT_TESTFILES/txtin16.h5 -$SRC_H5IMPORT_TESTFILES/txtin32.h5 -$SRC_H5IMPORT_TESTFILES/txtuin16.h5 -$SRC_H5IMPORT_TESTFILES/txtuin32.h5 -$SRC_H5IMPORT_TESTFILES/txtstr.h5 -$SRC_H5IMPORT_TESTFILES/textpfe.h5 -$SRC_H5DUMP_TESTFILES/tall.h5 -$SRC_H5DUMP_TESTFILES/tintsattrs.h5 -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5IMPORT_TESTFILES/txtfp32.conf -$SRC_H5IMPORT_TESTFILES/txtfp64.conf -$SRC_H5IMPORT_TESTFILES/txtin8.conf -$SRC_H5IMPORT_TESTFILES/txtin16.conf -$SRC_H5IMPORT_TESTFILES/txtin32.conf -$SRC_H5IMPORT_TESTFILES/txtuin16.conf -$SRC_H5IMPORT_TESTFILES/txtuin32.conf -$SRC_H5IMPORT_TESTFILES/textpfe.conf -$SRC_H5IMPORT_TESTFILES/txtstr.conf -$SRC_H5IMPORT_TESTFILES/txtfp32.txt -$SRC_H5IMPORT_TESTFILES/txtfp64.txt -$SRC_H5IMPORT_TESTFILES/txtuin16.txt -$SRC_H5IMPORT_TESTFILES/txtuin32.txt -$SRC_H5IMPORT_TESTFILES/txtin8.txt -$SRC_H5IMPORT_TESTFILES/txtin16.txt -$SRC_H5IMPORT_TESTFILES/txtin32.txt -$SRC_H5IMPORT_TESTFILES/textpfe64.txt -$SRC_H5IMPORT_TESTFILES/txtstr.txt -$SRC_H5IMPORT_TESTFILES/dbinfp64.h5.txt -$SRC_H5IMPORT_TESTFILES/dbinin8.h5.txt -$SRC_H5IMPORT_TESTFILES/dbinin8w.h5.txt -$SRC_H5IMPORT_TESTFILES/dbinin16.h5.txt -$SRC_H5IMPORT_TESTFILES/dbinin32.h5.txt -$SRC_H5IMPORT_TESTFILES/dbinuin16.h5.txt -$SRC_H5IMPORT_TESTFILES/dbinuin32.h5.txt -$SRC_H5IMPORT_TESTFILES/dtxtstr.h5.txt -$SRC_H5IMPORT_TESTFILES/tall_fp32.ddl -$SRC_H5IMPORT_TESTFILES/tall_i32.ddl -$SRC_H5IMPORT_TESTFILES/tintsattrs_u32.ddl -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5IMPORT_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a "SKIP" message -SKIP() { - TESTING $TESTNAME $@ - echo " -SKIP-" -} - -TOOLTEST() -{ -err=0 -$RUNSERIAL $H5IMPORT_BIN $* -$RUNSERIAL $DUMPER_BIN $5 >log2 - -cd tmp_testfiles -$RUNSERIAL $DUMPER_BIN $5 >log1 -cd .. - -cmp -s tmp_testfiles/log1 log2 || err=1 -rm -f log2 tmp_testfiles/log1 -if [ $err -eq 1 ]; then -nerrors="` expr $nerrors + 1 `"; - echo "*FAILED*" -else - echo " PASSED" -fi -} - -# Use h5dump output as input to h5import for binary numbers -# Use h5diff to verify results -TOOLTEST2() -{ -err=0 -$RUNSERIAL $DUMPER_BIN -p -d $1 -o d$2.bin -b NATIVE tmp_testfiles/$2 > d$2.dmp -$RUNSERIAL $H5IMPORT_BIN d$2.bin -c d$2.dmp -o d$2 > d$2.imp -$RUNSERIAL $H5DIFF_BIN -v d$2 tmp_testfiles/$2 $1 $1 > log2 -$CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1 - -cmp -s log1 log2 || err=1 -rm -f log1 log2 -if [ $err -eq 1 ]; then -nerrors="` expr $nerrors + 1 `"; - echo "*FAILED*" -else - echo " PASSED" -fi -} - -# Same as TOOLTEST2 except for strings -# Use h5dump output as input to h5import for strings -# Use h5diff to verify results -TOOLTEST3() -{ -err=0 -$RUNSERIAL $DUMPER_BIN -p -d $1 -o d$2.bin -y --width=1 tmp_testfiles/$2 > d$2.dmp -$RUNSERIAL $H5IMPORT_BIN d$2.bin -c d$2.dmp -o d$2 > d$2.imp -$RUNSERIAL $H5DIFF_BIN -v d$2 tmp_testfiles/$2 $1 $1 > log2 -$CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1 - -cmp -s log1 log2 || err=1 -rm -f log1 log2 -if [ $err -eq 1 ]; then -nerrors="` expr $nerrors + 1 `"; - echo "*FAILED*" -else - echo " PASSED" -fi -} - -# Same as TOOLTEST3 except for h5diff uses report mode without warnings -# Use h5dump output as input to h5import for strings -# Use h5diff to verify results -TOOLTEST4() -{ -err=0 -$RUNSERIAL $DUMPER_BIN -p -d $1 -o d$2.bin -y --width=1 tmp_testfiles/$2 > d$2.dmp -$RUNSERIAL $H5IMPORT_BIN d$2.bin -c d$2.dmp -o d$2 > d$2.imp -$RUNSERIAL $H5DIFF_BIN -r d$2 tmp_testfiles/$2 $1 $1 > log2 -$CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1 - - -cmp -s log1 log2 || err=1 -rm -f log1 log2 -if [ $err -eq 1 ]; then -nerrors="` expr $nerrors + 1 `"; - echo "*FAILED*" -else - echo " PASSED" -fi -} - -# Same as TOOLTEST2 except for subsets -# Use h5dump output as input to h5import for binary numbers -# Use h5dump to verify results -TOOLTEST5() -{ -err=0 -$RUNSERIAL $DUMPER_BIN -p -d $3 $4 -o ds$1.bin -b NATIVE tmp_testfiles/$2 > ds$1.dmp -$RUNSERIAL $H5IMPORT_BIN ds$1.bin -c ds$1.dmp -o ds$1.h5 > ds$1.imp -$RUNSERIAL $DUMPER_BIN -p ds$1.h5 > log2 -$CP -f $SRC_H5IMPORT_TESTFILES/$1.ddl log1 - -cmp -s log1 log2 || err=1 -rm -f log1 log2 -if [ $err -eq 1 ]; then -nerrors="` expr $nerrors + 1 `"; - echo "*FAILED*" -else - echo " PASSED" -fi -} - -echo "" -echo "==============================" -echo "H5IMPORT tests started" -echo "==============================" - -#echo "** Testing h5import ***" - -rm -f output.h5 log1 tx* b* *.dat - -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -mkdir tmp_testfiles -$CP $TESTDIR/*.h5 ./tmp_testfiles/ - -$RUNSERIAL ./h5importtest - -################################################ -### T H E T E S T S -################################################ - -TESTING "ASCII I32 rank 3 - Output BE " ; -TOOLTEST $TESTDIR/txtin32.txt -c $TESTDIR/txtin32.conf -o txtin32.h5 - -TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" -TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin16.conf -o txtin16.h5 - -TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " -TOOLTEST $TESTDIR/txtin8.txt -c $TESTDIR/txtin8.conf -o txtin8.h5 - - -TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " -TOOLTEST $TESTDIR/txtuin16.txt -c $TESTDIR/txtuin16.conf -o txtuin16.h5 - -TESTING "ASCII UI32 - rank 3 - Output BE" -TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin32.conf -o txtuin32.h5 - - -TESTING "ASCII F32 - rank 3 - Output LE " -TOOLTEST $TESTDIR/txtfp32.txt -c $TESTDIR/txtfp32.conf -o txtfp32.h5 - -TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " -TOOLTEST $TESTDIR/txtfp64.txt -c $TESTDIR/txtfp64.conf -o txtfp64.h5 - - -TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " -TOOLTEST binfp64.bin -c binfp64.conf -o binfp64.h5 -TESTING "H5DUMP-BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " -if test $USE_FILTER_DEFLATE != "yes"; then - SKIP "/fp/bin/64-bit" binfp64.h5 -else - TOOLTEST2 "/fp/bin/64-bit" binfp64.h5 -fi - - -TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " -TOOLTEST binin8.bin -c binin8.conf -o binin8.h5 -TESTING "H5DUMP-BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " -if test $USE_FILTER_DEFLATE != "yes"; then - SKIP "/int/bin/8-bit" binin8.h5 -else - TOOLTEST2 "/int/bin/8-bit" binin8.h5 -fi - -TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " -TOOLTEST binin16.bin -c binin16.conf -o binin16.h5 -TESTING "H5DUMP-BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " -TOOLTEST2 "/int/bin/16-bit" binin16.h5 - -TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " -TOOLTEST binin32.bin -c binin32.conf -o binin32.h5 -TESTING "H5DUMP-BINARY I32 - rank 3 - Output BE + CHUNKED " -TOOLTEST2 "/int/bin/32-bit" binin32.h5 - - -TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " -TOOLTEST binuin16.bin -c binuin16.conf -o binuin16.h5 -TESTING "H5DUMP-BINARY UI16 - rank 3 - Output byte BE + CHUNKED " -TOOLTEST2 "/int/buin/16-bit" binuin16.h5 - -TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED " -TOOLTEST binuin32.bin -c binuin32.conf -o binuin32.h5 -TESTING "H5DUMP-BINARY UI32 - rank 3 - Output LE + CHUNKED " -TOOLTEST2 "/int/buin/32-bit" binuin32.h5 - - -TESTING "STR" -TOOLTEST $TESTDIR/txtstr.txt -c $TESTDIR/txtstr.conf -o txtstr.h5 -TESTING "H5DUMP-STR" -TOOLTEST4 "/mytext/data" txtstr.h5 - - -TESTING "BINARY I8 CR LF EOF" -TOOLTEST binin8w.bin -c binin8w.conf -o binin8w.h5 -TESTING "H5DUMP-BINARY I8 CR LF EOF" -TOOLTEST2 "/dataset0" binin8w.h5 - -TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " -TOOLTEST $TESTDIR/textpfe64.txt -c $TESTDIR/textpfe.conf -o textpfe.h5 - -TESTING "Binary Subset FP" -TOOLTEST5 tall_fp32 tall.h5 "/g2/dset2.2" "--start=1,1 --stride=2,3 --count=1,2 --block=1,1" -TESTING "Binary Subset INT" -TOOLTEST5 tall_i32 tall.h5 "/g1/g1.1/dset1.1.1" "--start=1,1 --stride=2,3 --count=3,2 --block=1,1" -TESTING "Binary Subset UINT" -TOOLTEST5 tintsattrs_u32 tintsattrs.h5 "/DU32BITS" "--start=1,1 --stride=2,3 --count=3,2 --block=1,1" - - -rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.dmp *.conf *.imp *.h5 -rm -rf tmp_testfiles - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -# -# Check errors result -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5jam/Makefile.am b/tools/test/h5jam/Makefile.am deleted file mode 100644 index 06e8e86e404..00000000000 --- a/tools/test/h5jam/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -check_PROGRAMS=tellub h5jamgentest getub -TEST_SCRIPT=testh5jam.sh - -check_SCRIPTS=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../src/h5jam/h5jam$(EXEEXT) ../../src/h5jam/h5unjam$(EXEEXT) - -# Link against the main HDF5 library and tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -# Temporary files. *.h5 are generated by jamgentest. They should -# copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES+=*.h5 testfiles/h5jam-*-sav testfiles/h5unjam-*-sav -DISTCLEANFILES=testh5jam.sh - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5jam/testh5jam.sh.in b/tools/test/h5jam/testh5jam.sh.in deleted file mode 100644 index ee34377047d..00000000000 --- a/tools/test/h5jam/testh5jam.sh.in +++ /dev/null @@ -1,698 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5jam/h5unjam tools - -srcdir=@srcdir@ - -# Determine which filters are available -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=../../src/h5jam/h5unjam -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -DUMPER=../../src/h5dump/h5dump # The dumper to use -DUMPER_BIN=`pwd`/../$DUMPER # The path of the dumper binary -JAM=../../src/h5jam/h5jam # Tool to test -UNJAM=../../src/h5jam/h5unjam # Tool to test -JAM_BIN="$RUNSERIAL "`pwd` # The path of the jam binary -UNJAM_BIN=`pwd` # The path of the jam binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -AWK='awk' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5JAM_OUTFILES="$SRC_TOOLS/test/h5jam/expected" - -TESTDIR=./tmp -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5JAM_TESTFILES/tall.h5 -$SRC_H5JAM_TESTFILES/twithub.h5 -$SRC_H5JAM_TESTFILES/twithub513.h5 -" -LIST_OTHER_TEST_FILES=" -$SRC_H5JAM_OUTFILES/u10.txt -$SRC_H5JAM_OUTFILES/u511.txt -$SRC_H5JAM_OUTFILES/u512.txt -$SRC_H5JAM_OUTFILES/u513.txt -$SRC_H5JAM_OUTFILES/h5jam-help.txt -$SRC_H5JAM_OUTFILES/h5unjam-help.txt -$SRC_H5JAM_OUTFILES/h5jam-ub-nohdf5.txt -" - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5JAM_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Compare". -# -COMPARE() { - SPACES=" " - echo "Compare $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a "SKIP" message -SKIP() { - TESTING $JAM $@ - echo " -SKIP-" -} - -# -# COMPARE_FILES a.h5 b.h5 -# Compare two files, skipping the first line. This is used to -# compare the output of the dumper, skipping the file name which -# is different. -# The result is stored in 'compval'. -# -cmpval=0; -COMPARE_FILES() { - $AWK 'NR > 1' $1 > $1.cmp - $AWK 'NR > 1' $2 > $2.cmp - $CMP $1.cmp $2.cmp - cmpval=$? - rm -f $1.cmp $2.cmp -} - -# CLEANUP files -# Clean up named files. -CLEANUP() { - if test -z "$HDF5_NOCLEANUP"; then - for i in $* - do - rm -f $i - done - fi -} - -# SETUP file tocopy -# Clone a standard input file in the test directory -# -# Was using "cp" command which means file $2 will inherit the permission -# setting of file $1. If $1 is read-only, so will $2. That will cause -# failure when the test attempts to write it later on. Changed to use -# the "cat" command. -# -SETUP() { - cat < $1 > $2 -} - -# -# CHECKFILE orig.h5 compar.h5 -# Check that the test file is the same as an original. -# The two files are dumped with the dumper, and the output -# compared with COMPARE_FILES. -# If the files are the same, the test reports " PASSED", -# otherwise, it reports "*FAILED*" -CHECKFILE() { - expected="`dirname $2`/`basename $2 .h5`.out" - expected_err="`dirname $2`/`basename $2 .h5`.err" - actual="`basename $1 .h5`.out" - actual_err="`basename $1 .h5`.err" - - $RUNSERIAL $DUMPER_BIN/$DUMPER $1 >$expected 2>$expected_err - cat $expected_err >> $expected - - # dump the test file - COMPARE $2 to $1 - $RUNSERIAL $DUMPER_BIN/$DUMPER $2 >$actual 2>$actual_err - cat $actual_err >> $actual - - # compare the two files (ignore line 1) - COMPARE_FILES $actual $expected - if [ "$cmpval" = 0 ] ; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expected $actual |sed 's/^/ /' - fi - - # Clean up output files - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - rm -f $expected $expected_err - fi -} - -# -# CHECK_UB file.h5 user_block_file origfile.h5 -# -# Check the user block in 'file.h5' is the same as -# 'user_block' (allowing for padding). -# -# If the original file had a user block before the test -# then 'compare.h5' is passed. The user block must be extracted -# and the test file compared to: -# cat compare_ub user_block_file. -# -# This test uses './getub' to extract the user block from -# 'file.h5', which is compared to the file described above. -# -# The result is set in variable 'result1'. -# -result1=0; -CHECK_UB_1() { - hfile="$1" - ufile="$2" - - # check for third argument (the original file) - origfile=""; - if [ -n "$3" ]; - then - origfile="$3" - fi - - # find the length of the user block to check - s1=`cat $ufile | wc -c | sed -e 's/ //g'` - if [ "$s1" = "0" ]; - then - echo "File "$ufile" is empty" - result1=1; - fi - - # Get the size of the original user block, if any. - if [ -n "$origfile" ]; - then - # 'tellub' calls H5Fget_user_block to get the size - # of the user block - s2=`$JAM_BIN/tellub $origfile` - if [ "$s2" = "0" ]; - then - size=$s1; - cmpfile=$ufile - else - cmpfile="tt2" - size=`expr $s2 + $s1` - $JAM_BIN/getub -c $s2 $origfile > $cmpfile - cat $ufile >> $cmpfile - fi - else - # assume no user block - s2="0" - size=$s1; - cmpfile=$ufile - fi - - # Extract 'size' bytes from the front of 'hfile' - # Compare to 'cmpfile', result is set in result1 - tfile="tt1" - $JAM_BIN/getub -c $size $hfile > $tfile - res=`cmp $cmpfile $tfile` - if [ "$?" != "0" ]; - then - echo $res - result1=1; - else - result1=0; - fi - - # clean up - rm -f $tfile - if [ "$s2" != "0" ] ; - then - rm -f $cmpfile - fi -} - - -# CHECK_NOUB file.h5 -# -# Check that 'file.h5' has no user block. -# Setst result2 to 1 if there is a user block (fail), 0 if none (pass) - -result2=0; - -CHECK_NOUB() { - hfile="$1" - - # call 'ubsize' to get the size of the user block - ubsize=`$JAM_BIN/tellub $hfile` - - if [ "$?" != "0" ]; - then - # error - result2=1; - else - if [ "$ubsize" = "0" ]; - then - # pass - result2=0; - else - # fail - result2=1; - fi - fi -} - -# JAMTEST user_block file.h5 [--clobber] [ofile.h5] -# -# Test the 'jam' tool: -# 1. figure out the input and output, and the comparison -# that will be done. -# 2. call 'jam' with the appropriate arguments -# 3. check the user block is correct in the output (Check_UB) -# If the user block is correct, print "PASSED", else "*FAILED*" -JAMTEST() { - ufile="$1" - ifile="$2" - compare_test="" # the file to test - compare_orig="" # the comparison to test against - cleanup="" - - # sort out the arguments for the test and the check - do_clobber="no" - if [ "$3" = "--clobber" ]; - then - # clobber overwrites any existing user block - do_clobber="yes" - clobber="--clobber" - compare_orig="" - if [ -z "$4" ]; - then - # output goes to infile, compare ubfile to infile - ofile="" - compare_test="$ifile" - else - # output goes to $4, compare ofile to ubfile - ofile="$4" - compare_test="$ofile" - fi - else - clobber="" - # add user block to existing ub, if any - if [ -z "$3" ]; - then - # output goes to infile, compare ubfile to infile - ofile="" - compare_test="$ifile" - cp $ifile xxofile.h5 - compare_orig="xxofile.h5" - cleanup="$cleanup $compare_orig" - else - # output goes to $3, compare ofile to ubfile - ofile="$3" - compare_test="$ofile" - compare_orig="$ifile" - fi - fi - - # call 'jam' with the appropriate arguments - if [ -n "$ofile" ]; - then - TESTING h5jam -u `basename $ufile` -i `basename $ifile` -o `basename $ofile` $clobber - $JAM_BIN/$JAM -u $ufile -i $ifile -o $ofile $clobber - else - TESTING jam -u `basename $ufile` -i `basename $ifile` $clobber - $JAM_BIN/$JAM -u $ufile -i $ifile $clobber - fi - - #echo "CHECK_UB_1 $compare_test $ufile $compare_orig" - CHECK_UB_1 $compare_test $ufile $compare_orig - - if [ "$result1" = "0" ] ; - then - echo " PASSED" - else - echo " *FAILED*" - nerrors="`expr $nerrors + 1`" - fi - CLEANUP $cleanup -} - -# UNJAMTEST file.h5 [- | --delete] ofile -# -# Test the 'unjam' tool -# -###fix the working directory here and in jamtest -UNJAMTEST () { - infile="$1" - ofile="$3" - if [ "$2" = "-" ]; - then - uofile="uofile" - TESTING h5unjam -i `basename $infile` -o `basename $ofile` "> "`basename $uofile` - $JAM_BIN/$UNJAM -i $infile -o $ofile > $uofile - else - if [ "$2" = "--delete" ]; - then - uofile="none" - TESTING h5unjam -i `basename $infile` -o `basename $ofile` --delete - $JAM_BIN/$UNJAM -i $infile -o $ofile --delete - - else - uofile="$2" - TESTING h5unjam -i `basename $infile` -u `basename $uofile` -o `basename $ofile` - $JAM_BIN/$UNJAM -i $infile -u $uofile -o $ofile - fi - fi - - result1=0 - result2=0 - cleanup="" - if [ "$uofile" != "none" ]; - then - # sets result1 - CHECK_UB_1 $infile $uofile - CLEANUP $uofile - fi - - # sets result2 - CHECK_NOUB $ofile - - if [ "$result1" = "0" -a "$result2" = "0" ]; - then - echo " PASSED" - else - echo " *FAILED*" - nerrors="`expr $nerrors + 1`" - fi -} - - -# -# TOOLTEST_OUTPUT < JAM | UNJAM > expect-output.txt exit-code options -# -# Only verify stdout/stderr output from h5jam and j5unjam -# - -TOOLTEST_OUTPUT() { - if [ "$1" = "JAM" ]; then - TOOLCMD=$JAM_BIN/$JAM - elif [ "$1" = "UNJAM" ]; then - TOOLCMD=$JAM_BIN/$UNJAM - fi - shift - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ls`.out" - actual_err="$TESTDIR/`basename $1 .ls`.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - retvalexpect=$1 - shift - - TESTING h5jam $@ - ( - cd $TESTDIR - $TOOLCMD "$@" - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - # combine stderr to stdout for output compare - cat $actual_err >> $actual - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ls) missing" - nerrors="`expr $nerrors + 1`" - rm -f $actual $actual_sav $actual_err $actual_err_sav - elif $CMP $expect $actual; then - echo " PASSED" - rm -f $actual $actual_sav $actual_err $actual_err_sav - else - echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi -} - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -#------------------------------- -# Testing h5jam -#------------------------------- -# help page -TOOLTEST_OUTPUT JAM h5jam-help.txt 0 -h - -# don't allow HDF5 format file as an user block file -TOOLTEST_OUTPUT JAM h5jam-ub-nohdf5.txt 1 -i tall.h5 -u tall.h5 -o tall-tmp.h5 - -JAMTEST $TESTDIR/u10.txt $TESTDIR/tall.h5 ta2.h5 -CHECKFILE $TESTDIR/tall.h5 ta2.h5 -CLEANUP ta2.h5 -JAMTEST $TESTDIR/u511.txt $TESTDIR/tall.h5 ta3.h5 -CHECKFILE $TESTDIR/tall.h5 ta3.h5 -CLEANUP ta3.h5 -JAMTEST $TESTDIR/u512.txt $TESTDIR/tall.h5 ta4.h5 -CHECKFILE $TESTDIR/tall.h5 ta4.h5 -CLEANUP ta4.h5 -JAMTEST $TESTDIR/u513.txt $TESTDIR/tall.h5 ta5.h5 -CHECKFILE $TESTDIR/tall.h5 ta5.h5 -CLEANUP ta5.h5 - -SETUP $TESTDIR/tall.h5 ta6.h5 -JAMTEST $TESTDIR/u10.txt ta6.h5 -CHECKFILE $TESTDIR/tall.h5 ta6.h5 -CLEANUP ta6.h5 -SETUP $TESTDIR/tall.h5 ta7.h5 -JAMTEST $TESTDIR/u511.txt ta7.h5 -CHECKFILE $TESTDIR/tall.h5 ta7.h5 -CLEANUP ta7.h5 -SETUP $TESTDIR/tall.h5 ta8.h5 -JAMTEST $TESTDIR/u512.txt ta8.h5 -CHECKFILE $TESTDIR/tall.h5 ta8.h5 -CLEANUP ta8.h5 -SETUP $TESTDIR/tall.h5 ta9.h5 -JAMTEST $TESTDIR/u513.txt ta9.h5 -CHECKFILE $TESTDIR/tall.h5 ta9.h5 -CLEANUP ta9.h5 - -JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub.h5 tax2.h5 -CHECKFILE $TESTDIR/tall.h5 tax2.h5 -CLEANUP tax2.h5 -JAMTEST $TESTDIR/u511.txt $TESTDIR/twithub.h5 tax3.h5 -CHECKFILE $TESTDIR/tall.h5 tax3.h5 -CLEANUP tax3.h5 -JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub.h5 tax4.h5 -CHECKFILE $TESTDIR/tall.h5 tax4.h5 -CLEANUP tax4.h5 -JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub.h5 tax5.h5 -CHECKFILE $TESTDIR/tall.h5 tax5.h5 -CLEANUP tax5.h5 - -JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub513.h5 tax6.h5 -CHECKFILE $TESTDIR/tall.h5 tax6.h5 -CLEANUP tax6.h5 -JAMTEST $TESTDIR/u511.txt $TESTDIR/twithub513.h5 tax7.h5 -CHECKFILE $TESTDIR/tall.h5 tax7.h5 -CLEANUP tax7.h5 -JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub513.h5 tax8.h5 -CHECKFILE $TESTDIR/tall.h5 tax8.h5 -CLEANUP tax8.h5 -JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub513.h5 tax9.h5 -CHECKFILE $TESTDIR/tall.h5 tax9.h5 -CLEANUP tax9.h5 - -JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub.h5 --clobber taz2.h5 -CHECKFILE $TESTDIR/tall.h5 taz2.h5 -CLEANUP taz2.h5 -JAMTEST $TESTDIR/u511.txt $TESTDIR/twithub.h5 --clobber taz3.h5 -CHECKFILE $TESTDIR/tall.h5 taz3.h5 -CLEANUP taz3.h5 -JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub.h5 --clobber taz4.h5 -CHECKFILE $TESTDIR/tall.h5 taz4.h5 -CLEANUP taz4.h5 -JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub.h5 --clobber taz5.h5 -CHECKFILE $TESTDIR/tall.h5 taz5.h5 -CLEANUP taz5.h5 - -JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub513.h5 --clobber taz6.h5 -CHECKFILE $TESTDIR/tall.h5 taz6.h5 -CLEANUP taz6.h5 -JAMTEST $TESTDIR/u511.txt $TESTDIR/twithub513.h5 --clobber taz7.h5 -CHECKFILE $TESTDIR/tall.h5 taz7.h5 -CLEANUP taz7.h5 -JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub513.h5 --clobber taz8.h5 -CHECKFILE $TESTDIR/tall.h5 taz8.h5 -CLEANUP taz8.h5 -JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub513.h5 --clobber taz9.h5 -CHECKFILE $TESTDIR/tall.h5 taz9.h5 -CLEANUP taz9.h5 - -SETUP $TESTDIR/twithub.h5 tay2.h5 -JAMTEST $TESTDIR/u10.txt tay2.h5 --clobber -CHECKFILE $TESTDIR/tall.h5 tay2.h5 -CLEANUP tay2.h5 -SETUP $TESTDIR/twithub.h5 tay3.h5 -JAMTEST $TESTDIR/u511.txt tay3.h5 --clobber -CHECKFILE $TESTDIR/tall.h5 tay3.h5 -CLEANUP tay3.h5 -SETUP $TESTDIR/twithub.h5 tay4.h5 -JAMTEST $TESTDIR/u512.txt tay4.h5 --clobber -CHECKFILE $TESTDIR/tall.h5 tay4.h5 -CLEANUP tay4.h5 -SETUP $TESTDIR/twithub.h5 tay5.h5 -JAMTEST $TESTDIR/u513.txt tay5.h5 --clobber -CHECKFILE $TESTDIR/tall.h5 tay5.h5 -CLEANUP tay5.h5 - -SETUP $TESTDIR/twithub513.h5 tay6.h5 -JAMTEST $TESTDIR/u10.txt tay6.h5 --clobber -CHECKFILE $TESTDIR/tall.h5 tay6.h5 -CLEANUP tay6.h5 -SETUP $TESTDIR/twithub513.h5 tay7.h5 -JAMTEST $TESTDIR/u511.txt tay7.h5 --clobber -CHECKFILE $TESTDIR/tall.h5 tay7.h5 -CLEANUP tay7.h5 -SETUP $TESTDIR/twithub513.h5 tay8.h5 -JAMTEST $TESTDIR/u512.txt tay8.h5 --clobber -CHECKFILE $TESTDIR/tall.h5 tay8.h5 -CLEANUP tay8.h5 -SETUP $TESTDIR/twithub513.h5 tay9.h5 -JAMTEST $TESTDIR/u513.txt tay9.h5 --clobber -CHECKFILE $TESTDIR/tall.h5 tay9.h5 -CLEANUP tay9.h5 - -#--------------------------------- -# Testing h5unjam -#--------------------------------- -# help page -TOOLTEST_OUTPUT UNJAM h5unjam-help.txt 0 -h - -SETUP $TESTDIR/twithub.h5 tai1.h5 -UNJAMTEST tai1.h5 o10.txt taa1.h5 -CHECKFILE $TESTDIR/tall.h5 taa1.h5 -CLEANUP taa1.h5 tai1.h5 o10.txt -SETUP $TESTDIR/twithub513.h5 tai2.h5 -UNJAMTEST tai2.h5 o512.txt taa2.h5 -CHECKFILE $TESTDIR/tall.h5 taa2.h5 -CLEANUP taa2.h5 tai2.h5 o512.txt - -SETUP $TESTDIR/twithub.h5 tai3.h5 -UNJAMTEST tai3.h5 - taa3.h5 -CHECKFILE $TESTDIR/tall.h5 taa3.h5 -CLEANUP taa3.h5 tai3.h5 -SETUP $TESTDIR/twithub513.h5 tai4.h5 -UNJAMTEST tai4.h5 - taa4.h5 -CHECKFILE $TESTDIR/tall.h5 taa4.h5 -CLEANUP taa4.h5 tai4.h5 - -SETUP $TESTDIR/twithub.h5 taj2.h5 -UNJAMTEST taj2.h5 --delete tac2.h5 -CHECKFILE $TESTDIR/tall.h5 tac2.h5 -CLEANUP tac2.h5 taj2.h5 -SETUP $TESTDIR/twithub513.h5 taj3.h5 -UNJAMTEST taj3.h5 --delete tac3.h5 -CHECKFILE $TESTDIR/tall.h5 tac3.h5 -CLEANUP tac3.h5 taj3.h5 - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5ls/Makefile.am b/tools/test/h5ls/Makefile.am deleted file mode 100644 index f802f881ce2..00000000000 --- a/tools/test/h5ls/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -# Test programs and scripts -TEST_SCRIPT=testh5ls.sh testh5lsvds.sh -check_SCRIPTS=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../src/h5ls/h5ls$(EXEEXT) -if HAVE_SHARED_CONDITIONAL -if USE_PLUGINS_CONDITIONAL - TEST_SCRIPT += h5ls_plugin.sh -endif -endif - -# All programs depend on the hdf5 and h5tools libraries -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -if HAVE_SHARED_CONDITIONAL - # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlibls.la - libdynlibls_la_SOURCES=dynlib_ls.c - libdynlibls_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere -endif - - -DISTCLEANFILES=h5ls_plugin.sh - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in deleted file mode 100644 index 8b606d6ff29..00000000000 --- a/tools/test/h5ls/h5ls_plugin.sh.in +++ /dev/null @@ -1,254 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -srcdir=@srcdir@ -TOP_BUILDDIR=@top_builddir@ - -# Determine backward compatibility options enabled -DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@" - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5LS=../../src/h5ls/h5ls # The tool name -H5LS_BIN=`pwd`/$H5LS # The path of the tool binary - -nerrors=0 -verbose=yes -h5haveexitcode=yes # default is yes - -TEST_NAME=ud_plugin -FROM_DIR=`pwd`/.libs -PLUGIN_LIB="$FROM_DIR/libdynlibls.*" -PLUGIN_LIBDIR=testdir3 -RM='rm -rf' - -RM='rm -rf' -GREP='grep' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5LS_OUTFILES="$SRC_TOOLS/test/h5ls/expected" - -TESTDIR=./tmppl -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/tudfilter.h5 -$SRC_H5LS_OUTFILES/tudfilter.ls -" - -# RUNSERIAL is used. Check if it can return exit code from executable correctly. -if [ -n "$RUNSERIAL_NOEXITCODE" ]; then - echo "***Warning*** Serial Exit Code is not passed back to shell correctly." - echo "***Warning*** Exit code checking is skipped." - h5haveexitcode=no -fi - -# Main Body -# Create test directories if not exists yet. -test -d $PLUGIN_LIBDIR || mkdir -p $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to create test directory($PLUGIN_LIBDIR)" - exit $EXIT_FAILURE -fi - -# copy plugin library for test -$CP $PLUGIN_LIB $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to copy plugin library ($PLUGIN_LIB) for test." - exit $EXIT_FAILURE -fi - -# setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}:${HDF5_PLUGIN_PATH}" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5LS_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a $* message left justified in a field of 70 characters -# -MESSAGE() { - SPACES=" " - echo "$* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -VERIFY() { - MESSAGE "Verifying $*" -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. For now, if h5ls can complete -# with exit status 0, consider it pass. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display up to $NLINS -# lines of the actual output from the tool test. The actual output is not -# removed if $HDF5_NOCLEANUP has a non-zero value. -# Arguments: -# $1 -- actual output filename to use -# $2 and on -- argument for the h5ls tool -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ls`.out" - actual_err="$TESTDIR/`basename $1 .ls`.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - retvalexpect=$1 - shift - - # Run test. - # Stderr is included in stdout so that the diff can detect - # any unexpected output from that stream too. - TESTING $H5LS $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $H5LS_BIN "$@" - ) >$actual 2>$actual_err - - exitcode=$? - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - cat $actual_err >> $actual - if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - echo "test returned with exit code $exitcode" - echo "test output: (up to $NLINES lines)" - head -$NLINES $actual - echo "***end of test output***" - echo "" - fi - elif [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ls) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - fi -} - -############################################################################## -### T H E T E S T S -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# Run the test -TOOLTEST tudfilter.ls 0 -w80 -d tudfilter.h5 - -# print results -if test $nerrors -ne 0 ; then - echo "$nerrors errors encountered" - exit_code=$EXIT_FAILURE -else - echo "All Plugin API tests passed." - exit_code=$EXIT_SUCCESS -fi - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -# Clean up temporary files/directories and leave -$RM $PLUGIN_LIBDIR - -exit $exit_code diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in deleted file mode 100644 index 78844cfc654..00000000000 --- a/tools/test/h5ls/testh5ls.sh.in +++ /dev/null @@ -1,464 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5ls tool - -srcdir=@srcdir@ - -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" -HAVE__FLOAT16="@HAVE__FLOAT16@" -WORDS_BIGENDIAN="@WORDS_BIGENDIAN@" - -TESTNAME=h5ls -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5LS=../../src/h5ls/h5ls # The tool name -H5LS_BIN=`pwd`/$H5LS # The path of the tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -NLINES=20 # Max. lines of output to display if test fails -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 -verbose=yes -h5haveexitcode=yes # default is yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5LS_OUTFILES="$SRC_TOOLS/test/h5ls/expected" - -TESTDIR=./tmp -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/tall.h5 -$SRC_H5DUMP_TESTFILES/tarray1.h5 -$SRC_H5DUMP_TESTFILES/tattr2.h5 -$SRC_H5DUMP_TESTFILES/tattrreg.h5 -$SRC_H5DUMP_TESTFILES/tcompound.h5 -$SRC_H5DUMP_TESTFILES/tdatareg.h5 -$SRC_H5DUMP_TESTFILES/tdset.h5 -$SRC_H5DUMP_TESTFILES/tempty.h5 -$SRC_H5DUMP_TESTFILES/textlink.h5 -$SRC_H5DUMP_TESTFILES/textlinksrc.h5 -$SRC_H5DUMP_TESTFILES/textlinktar.h5 -$SRC_H5DUMP_TESTFILES/tfloat16.h5 -$SRC_H5DUMP_TESTFILES/tfloat16_be.h5 -$SRC_H5DUMP_TESTFILES/tgroup.h5 -$SRC_H5DUMP_TESTFILES/tgrp_comments.h5 -$SRC_H5DUMP_TESTFILES/tgrpnullspace.h5 -$SRC_H5DUMP_TESTFILES/thlink.h5 -$SRC_H5DUMP_TESTFILES/tloop.h5 -$SRC_H5DUMP_TESTFILES/tnestedcomp.h5 -$SRC_H5DUMP_TESTFILES/tsaf.h5 -$SRC_H5DUMP_TESTFILES/tslink.h5 -$SRC_H5DUMP_TESTFILES/tsoftlinks.h5 -$SRC_H5DUMP_TESTFILES/tstr.h5 -$SRC_H5DUMP_TESTFILES/tudlink.h5 -$SRC_H5DUMP_TESTFILES/tvldtypes1.h5 -$SRC_H5LS_TESTFILES/tdset_idx.h5 -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5LS_OUTFILES/help-1.ls -$SRC_H5LS_OUTFILES/help-2.ls -$SRC_H5LS_OUTFILES/help-3.ls -$SRC_H5LS_OUTFILES/nosuchfile.ls -$SRC_H5LS_OUTFILES/tall-1.ls -$SRC_H5LS_OUTFILES/tall-2.ls -$SRC_H5LS_OUTFILES/tarray1.ls -$SRC_H5LS_OUTFILES/tattr2.ls -$SRC_H5LS_OUTFILES/tattrreg_le.ls -$SRC_H5LS_OUTFILES/tattrreg_be.ls -$SRC_H5LS_OUTFILES/tcomp-1.ls -$SRC_H5LS_OUTFILES/tdataregbe.ls -$SRC_H5LS_OUTFILES/tdataregle.ls -$SRC_H5LS_OUTFILES/tdset-1.ls -$SRC_H5LS_OUTFILES/tempty.ls -$SRC_H5LS_OUTFILES/textlink-1.ls -$SRC_H5LS_OUTFILES/textlinksrc-1.ls -$SRC_H5LS_OUTFILES/textlinksrc-2.ls -$SRC_H5LS_OUTFILES/textlinksrc-3.ls -$SRC_H5LS_OUTFILES/textlinksrc-4.ls -$SRC_H5LS_OUTFILES/textlinksrc-5.ls -$SRC_H5LS_OUTFILES/textlinksrc-6.ls -$SRC_H5LS_OUTFILES/textlinksrc-7.ls -$SRC_H5LS_OUTFILES/textlinksrc-1-old.ls -$SRC_H5LS_OUTFILES/textlinksrc-2-old.ls -$SRC_H5LS_OUTFILES/textlinksrc-3-old.ls -$SRC_H5LS_OUTFILES/textlinksrc-6-old.ls -$SRC_H5LS_OUTFILES/textlinksrc-7-old.ls -$SRC_H5LS_OUTFILES/tfloat16.ls -$SRC_H5LS_OUTFILES/tfloat16_nosupport.ls -$SRC_H5LS_OUTFILES/tfloat16_be.ls -$SRC_H5LS_OUTFILES/tfloat16_be_nosupport.ls -$SRC_H5LS_OUTFILES/tsoftlinks-1.ls -$SRC_H5LS_OUTFILES/tsoftlinks-2.ls -$SRC_H5LS_OUTFILES/tsoftlinks-3.ls -$SRC_H5LS_OUTFILES/tsoftlinks-4.ls -$SRC_H5LS_OUTFILES/tsoftlinks-5.ls -$SRC_H5LS_OUTFILES/textlinksrc-nodangle-1.ls -$SRC_H5LS_OUTFILES/textlinksrc-nodangle-2.ls -$SRC_H5LS_OUTFILES/tgrp_comments.ls -$SRC_H5LS_OUTFILES/tsoftlinks-nodangle-1.ls -$SRC_H5LS_OUTFILES/thlinks-nodangle-1.ls -$SRC_H5LS_OUTFILES/tgroup.ls -$SRC_H5LS_OUTFILES/tgroup-1.ls -$SRC_H5LS_OUTFILES/tgroup-2.ls -$SRC_H5LS_OUTFILES/tgroup-3.ls -$SRC_H5LS_OUTFILES/tgrpnullspace.ls -$SRC_H5LS_OUTFILES/thlink-1.ls -$SRC_H5LS_OUTFILES/tloop-1.ls -$SRC_H5LS_OUTFILES/tmultifile.ls -$SRC_H5LS_OUTFILES/tnestcomp-1.ls -$SRC_H5LS_OUTFILES/tnestcomp-2.ls -$SRC_H5LS_OUTFILES/tnestcomp-3.ls -$SRC_H5LS_OUTFILES/tnestcomp-4.ls -$SRC_H5LS_OUTFILES/tsaf.ls -$SRC_H5LS_OUTFILES/tslink-1.ls -$SRC_H5LS_OUTFILES/tstr-1.ls -$SRC_H5LS_OUTFILES/tudlink-1.ls -$SRC_H5LS_OUTFILES/tvldtypes1.ls -$SRC_H5LS_OUTFILES/tvldtypes2le.ls -$SRC_H5LS_OUTFILES/tvldtypes2be.ls -$SRC_H5LS_OUTFILES/tdset_idx.ls -" - - -# RUNSERIAL is used. Check if it can return exit code from executalbe correctly. -if [ -n "$RUNSERIAL_NOEXITCODE" ]; then - echo "***Warning*** Serial Exit Code is not passed back to shell correctly." - echo "***Warning*** Exit code checking is skipped." - h5haveexitcode=no -fi - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5LS_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. For now, if h5ls can complete -# with exit status 0, consider it pass. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display up to $NLINS -# lines of the actual output from the tool test. The actual output is not -# removed if $HDF5_NOCLEANUP has a non-zero value. -# Arguments: -# $1 -- actual output filename to use -# $2 and on -- argument for the h5ls tool -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ls`.out" - actual_err="$TESTDIR/`basename $1 .ls`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - retvalexpect=$1 - shift - - # Run test. - # Stderr is included in stdout so that the diff can detect - # any unexpected output from that stream too. - TESTING $H5LS $@ - ( - cd $TESTDIR - $RUNSERIAL $H5LS_BIN "$@" - ) >$actual 2>$actual_err - - exitcode=$? - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - echo "test returned with exit code $exitcode" - echo "test output: (up to $NLINES lines)" - head -$NLINES $actual - echo "***end of test output***" - echo "" - fi - elif [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ls) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - fi -} - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# Toss in a bunch of tests. Not sure if they are the right kinds. -# test the help syntax -TOOLTEST help-1.ls 0 -w80 -h -TOOLTEST help-2.ls 0 -w80 -help -TOOLTEST help-3.ls 0 -w80 -? - -# test simple command -TOOLTEST tall-1.ls 0 -w80 tall.h5 -TOOLTEST tall-2.ls 0 -w80 -r -d tall.h5 -TOOLTEST tgroup.ls 0 -w80 tgroup.h5 -TOOLTEST tgroup-3.ls 0 -w80 tgroup.h5/g1 - -# test for displaying groups -# The following combination of arguments is expected to return an error message -# and return value 1 -TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 -TOOLTEST tgroup-2.ls 0 -w80 -g tgroup.h5/g1 - -# test for files with groups that have long comments -TOOLTEST tgrp_comments.ls 0 -w80 -v -g tgrp_comments.h5/glongcomment - -# test for displaying simple space datasets -TOOLTEST tdset-1.ls 0 -w80 -r -d tdset.h5 - -# test for displaying soft links -TOOLTEST tslink-1.ls 0 -w80 -r tslink.h5 - -# test for displaying more soft links with --follow-symlinks -TOOLTEST tsoftlinks-1.ls 0 --follow-symlinks tsoftlinks.h5 -TOOLTEST tsoftlinks-2.ls 0 --follow-symlinks -r tsoftlinks.h5 -TOOLTEST tsoftlinks-3.ls 0 --follow-symlinks tsoftlinks.h5/group1 -TOOLTEST tsoftlinks-4.ls 0 --follow-symlinks -r tsoftlinks.h5/group1 -TOOLTEST tsoftlinks-5.ls 0 --follow-symlinks tsoftlinks.h5/soft_dset1 - -# test for displaying external and user-defined links with --follow-symlinks -TOOLTEST textlink-1.ls 0 -w80 -r textlink.h5 -TOOLTEST textlinksrc-1.ls 0 -w80 --follow-symlinks -r textlinksrc.h5 -TOOLTEST textlinksrc-2.ls 0 -w80 --follow-symlinks -rv textlinksrc.h5/ext_link5 -TOOLTEST textlinksrc-3.ls 0 -w80 --follow-symlinks -r textlinksrc.h5/ext_link1 -TOOLTEST textlinksrc-4.ls 0 -w80 -r textlinksrc.h5 -TOOLTEST textlinksrc-5.ls 0 -w80 -r textlinksrc.h5/ext_link1 -TOOLTEST textlinksrc-6.ls 0 -w80 --follow-symlinks textlinksrc.h5 -TOOLTEST textlinksrc-7.ls 0 -w80 --follow-symlinks textlinksrc.h5/ext_link1 -TOOLTEST tudlink-1.ls 0 -w80 -r tudlink.h5 - -# test for displaying external links with -E -# the option -E will be depriciated but keep it for backward compatibility -TOOLTEST textlinksrc-1-old.ls 0 -w80 -Er textlinksrc.h5 -TOOLTEST textlinksrc-2-old.ls 0 -w80 -Erv textlinksrc.h5/ext_link5 -TOOLTEST textlinksrc-3-old.ls 0 -w80 -Er textlinksrc.h5/ext_link1 -TOOLTEST textlinksrc-6-old.ls 0 -w80 -E textlinksrc.h5 -TOOLTEST textlinksrc-7-old.ls 0 -w80 -E textlinksrc.h5/ext_link1 - -# tests for no-dangling-links -# if this option is given on dangling link, h5ls should return exit code 1 -# when used alone , expect to print out help and return exit code 1 -TOOLTEST textlinksrc-nodangle-1.ls 1 -w80 --no-dangling-links textlinksrc.h5 -# external dangling link - expected exit code 1 -TOOLTEST textlinksrc-nodangle-2.ls 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5 -# soft dangling link - expected exit code 1 -TOOLTEST tsoftlinks-nodangle-1.ls 1 -w80 --follow-symlinks --no-dangling-links tsoftlinks.h5 -# when used file with no dangling links - expected exit code 0 -TOOLTEST thlinks-nodangle-1.ls 0 -w80 --follow-symlinks --no-dangling-links thlink.h5 - -# test for _Float16 type -if test $HAVE__FLOAT16 = "yes" ; then - if test $WORDS_BIGENDIAN = "yes" ; then - TOOLTEST tfloat16_be.ls 0 -w80 -v tfloat16_be.h5 - else - TOOLTEST tfloat16.ls 0 -w80 -v tfloat16.h5 - fi -else - TOOLTEST tfloat16_nosupport.ls 0 -w80 -v tfloat16.h5 - TOOLTEST tfloat16_be_nosupport.ls 0 -w80 -v tfloat16_be.h5 -fi - -# test for wildcards in filename (does not work with cmake) -# this h5ls test script does not pass the filename properly like the h5dump test script??? -#TOOLTEST tstarfile.ls 0 -w80 t*link.h5 -#TOOLTEST tqmarkfile.ls 0 -w80 t?link.h5 -TOOLTEST tmultifile.ls 0 -w80 thlink.h5 tslink.h5 - -# tests for hard links -TOOLTEST thlink-1.ls 0 -w80 thlink.h5 - -# tests for compound data types -TOOLTEST tcomp-1.ls 0 -w80 -r -d tcompound.h5 - -#test for the nested compound type -TOOLTEST tnestcomp-1.ls 0 -w80 -r -d tnestedcomp.h5 - -TOOLTEST tnestcomp-2.ls 0 -w80 -r -d -S tnestedcomp.h5 - -TOOLTEST tnestcomp-3.ls 0 -w80 -r -d -l tnestedcomp.h5 - -TOOLTEST tnestcomp-4.ls 0 -w80 -r -d -l -S tnestedcomp.h5 - -# test for loop detection -TOOLTEST tloop-1.ls 0 -w80 -r -d tloop.h5 - -# test for string -TOOLTEST tstr-1.ls 0 -w80 -r -d tstr.h5 - -# test test file created from lib SAF team -TOOLTEST tsaf.ls 0 -w80 -r -d tsaf.h5 - -# test for variable length data types -TOOLTEST tvldtypes1.ls 0 -w80 -r -d tvldtypes1.h5 - -# test for array data types -TOOLTEST tarray1.ls 0 -w80 -r -d tarray1.h5 - -# test for empty data -TOOLTEST tempty.ls 0 -w80 -d tempty.h5 - -# test for displaying dataset and attribute of null space -TOOLTEST tgrpnullspace.ls 0 -w80 -v -S tgrpnullspace.h5 - -# test for all dataset types written to attributes -# enable -S for avoiding printing NATIVE types -TOOLTEST tattr2.ls 0 -w80 -v -S tattr2.h5 - -# test for attribute with region references without verbose mode -# ( HDFFV-7838, ) -if test $WORDS_BIGENDIAN != "yes"; then -TOOLTEST tattrreg_le.ls 0 -w80 -v -d tattrreg.h5 -else -TOOLTEST tattrreg_be.ls 0 -w80 -v -d tattrreg.h5 -fi - -# tests for error handling. -# test for non-existing file -TOOLTEST nosuchfile.ls 1 nosuchfile.h5 - -# test for variable length data types in verbose mode -if test $WORDS_BIGENDIAN != "yes"; then - TOOLTEST tvldtypes2le.ls 0 -v tvldtypes1.h5 -else - TOOLTEST tvldtypes2be.ls 0 -v tvldtypes1.h5 -fi - - -# test for dataset region references data types in verbose mode -if test $WORDS_BIGENDIAN != "yes"; then - TOOLTEST tdataregle.ls 0 -v tdatareg.h5 -else - TOOLTEST tdataregbe.ls 0 -v tdatareg.h5 -fi - -# test for file with datasets that use Fixed Array chunk indices -if test $USE_FILTER_DEFLATE = "yes" ; then - # data read internal filters - TOOLTEST tdset_idx.ls 0 -w80 -d tdset_idx.h5 -else - echo "***skip testing tdset_idx.h5" -fi - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5ls/testh5lsvds.sh.in b/tools/test/h5ls/testh5lsvds.sh.in deleted file mode 100644 index 9038cf18ddd..00000000000 --- a/tools/test/h5ls/testh5lsvds.sh.in +++ /dev/null @@ -1,257 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5ls tool - -srcdir=@srcdir@ - -TESTNAME=h5ls -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5LS=../../src/h5ls/h5ls # The tool name -H5LS_BIN=`pwd`/$H5LS # The path of the tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -NLINES=20 # Max. lines of output to display if test fails -DIRNAME='dirname' -LS='ls' -AWK='awk' - -WORDS_BIGENDIAN="@WORDS_BIGENDIAN@" - -nerrors=0 -verbose=yes -h5haveexitcode=yes # default is yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5LS_OUTFILES="$SRC_TOOLS/test/h5ls/expected" - -TEST_P_DIR=./testfiles -TESTDIR=./tmpvds -test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/vds/1_a.h5 -$SRC_H5DUMP_TESTFILES/vds/1_b.h5 -$SRC_H5DUMP_TESTFILES/vds/1_c.h5 -$SRC_H5DUMP_TESTFILES/vds/1_d.h5 -$SRC_H5DUMP_TESTFILES/vds/1_e.h5 -$SRC_H5DUMP_TESTFILES/vds/1_f.h5 -$SRC_H5DUMP_TESTFILES/vds/1_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/2_a.h5 -$SRC_H5DUMP_TESTFILES/vds/2_b.h5 -$SRC_H5DUMP_TESTFILES/vds/2_c.h5 -$SRC_H5DUMP_TESTFILES/vds/2_d.h5 -$SRC_H5DUMP_TESTFILES/vds/2_e.h5 -$SRC_H5DUMP_TESTFILES/vds/2_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/4_0.h5 -$SRC_H5DUMP_TESTFILES/vds/4_1.h5 -$SRC_H5DUMP_TESTFILES/vds/4_2.h5 -$SRC_H5DUMP_TESTFILES/vds/4_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/5_a.h5 -$SRC_H5DUMP_TESTFILES/vds/5_b.h5 -$SRC_H5DUMP_TESTFILES/vds/5_c.h5 -$SRC_H5DUMP_TESTFILES/vds/5_vds.h5 -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5LS_OUTFILES/vds/tvds-1.ls -$SRC_H5LS_OUTFILES/vds/tvds-2.ls -$SRC_H5LS_OUTFILES/vds/tvds-3_1.ls -$SRC_H5LS_OUTFILES/vds/tvds-3_2.ls -$SRC_H5LS_OUTFILES/vds/tvds-4.ls -$SRC_H5LS_OUTFILES/vds/tvds-5.ls -" - - -# RUNSERIAL is used. Check if it can return exit code from executalbe correctly. -if [ -n "$RUNSERIAL_NOEXITCODE" ]; then - echo "***Warning*** Serial Exit Code is not passed back to shell correctly." - echo "***Warning*** Exit code checking is skipped." - h5haveexitcode=no -fi - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5LS_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. For now, if h5ls can complete -# with exit status 0, consider it pass. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display up to $NLINS -# lines of the actual output from the tool test. The actual output is not -# removed if $HDF5_NOCLEANUP has a non-zero value. -# Arguments: -# $1 -- actual output filename to use -# $2 and on -- argument for the h5ls tool -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ls`.out" - actual_err="$TESTDIR/`basename $1 .ls`.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - retvalexpect=$1 - shift - - # Run test. - # Stderr is included in stdout so that the diff can detect - # any unexpected output from that stream too. - TESTING $H5LS $@ - ( - cd $TESTDIR - $RUNSERIAL $H5LS_BIN "$@" - ) >$actual 2>$actual_err - - exitcode=$? - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - cat $actual_err >> $actual - if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - echo "test returned with exit code $exitcode" - echo "test output: (up to $NLINES lines)" - head -$NLINES $actual - echo "***end of test output***" - echo "" - fi - elif [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ls) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - fi -} - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -####### test for dataset vds ###### - -TOOLTEST tvds-1.ls 0 -w80 -v -S 1_vds.h5 -TOOLTEST tvds-2.ls 0 -w80 -v -S 2_vds.h5 -TOOLTEST tvds-3_1.ls 0 -w80 -v -S 3_1_vds.h5 -TOOLTEST tvds-3_2.ls 0 -w80 -v -S 3_2_vds.h5 -TOOLTEST tvds-4.ls 0 -w80 -v -S 4_vds.h5 -TOOLTEST tvds-5.ls 0 -w80 -v -S 5_vds.h5 - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am deleted file mode 100644 index a3db2548c55..00000000000 --- a/tools/test/h5repack/Makefile.am +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src, test, and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib -I$(top_srcdir)/tools/src/h5repack - -# Test programs and scripts -TEST_PROG=h5repackgentest -TEST_SCRIPT=h5repack.sh - -noinst_PROGRAMS=h5repacktst testh5repack_detect_szip - -check_PROGRAMS=$(TEST_PROG) -SCRIPT_DEPEND=../../src/h5repack/h5repack$(EXEEXT) h5repacktst$(EXEEXT) -if HAVE_SHARED_CONDITIONAL -if USE_PLUGINS_CONDITIONAL - TEST_SCRIPT += h5repack_plugin.sh -endif -endif - -check_SCRIPTS=$(TEST_SCRIPT) - -# Depend on the h5repack library, the hdf5 library, the tools library, the test library -LDADD=../../src/h5repack/libh5repack.la $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5) - -testh5repack_detect_szip_SOURCES=testh5repack_detect_szip.c - -h5repacktst_SOURCES=h5repacktst.c - - -if HAVE_SHARED_CONDITIONAL - # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la - libdynlibadd_la_SOURCES=dynlib_rpk.c - libdynlibvers_la_SOURCES=dynlib_vrpk.c - libdynlibadd_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere - libdynlibvers_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere - libdynlibadd_la_LIBADD=$(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5) - libdynlibvers_la_LIBADD=$(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5) -endif - - -# Temporary files. *.h5 are generated by h5repack. They should -# copied to the testfiles/ directory if update is required. -# *.dat files may be created by h5repackgentest. -CHECK_CLEANFILES+=*.h5 *.dat *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 -DISTCLEANFILES=h5repack.sh h5repack_plugin.sh - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in deleted file mode 100644 index 9b4af9dda45..00000000000 --- a/tools/test/h5repack/h5repack.sh.in +++ /dev/null @@ -1,1969 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5repack tool -# - -srcdir=@srcdir@ - -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=h5repack -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5REPACK=../../src/h5repack/h5repack # The tool name -H5REPACK_BIN=`pwd`/$H5REPACK # The path of the tool binary - -H5DIFF=../../src/h5diff/h5diff # The h5diff tool name -H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary - -H5DUMP=../../src/h5dump/h5dump # The h5dump tool name -H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary - -H5STAT=../../src/h5stat/h5stat # The h5stat tool name -H5STAT_BIN=`pwd`/$H5STAT # The path of the h5stat tool binary - -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -GREP='grep' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -# Reset the VOL connector to only use the native connector, because of the -# error stack checking. QAK - 2019/03/09 -ENVCMD="env HDF5_VOL_CONNECTOR=native" - -H5DETECTSZIP=testh5repack_detect_szip -H5DETECTSZIP_BIN=`pwd`/$H5DETECTSZIP - - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5REPACK_OUTFILES="$SRC_TOOLS/test/h5repack/expected" - -TESTDIR=./tmp -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5REPACK_TESTFILES/bounds_latest_latest.h5 -$SRC_H5REPACK_TESTFILES/h5repack_attr.h5 -$SRC_H5REPACK_TESTFILES/h5repack_attr_refs.h5 -$SRC_H5REPACK_TESTFILES/h5repack_deflate.h5 -$SRC_H5REPACK_TESTFILES/h5repack_early.h5 -$SRC_H5REPACK_TESTFILES/h5repack_ext.h5 -$SRC_H5REPACK_TESTFILES/h5repack_f32le.h5 -$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex.h5 -$SRC_H5REPACK_TESTFILES/h5repack_fill.h5 -$SRC_H5REPACK_TESTFILES/h5repack_filters.h5 -$SRC_H5REPACK_TESTFILES/h5repack_fletcher.h5 -$SRC_H5REPACK_TESTFILES/h5repack_hlink.h5 -$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d.h5 -$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex.h5 -$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d.h5 -$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex.h5 -$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d.h5 -$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex.h5 -$SRC_H5REPACK_TESTFILES/h5repack_layout.h5 -$SRC_H5REPACK_TESTFILES/h5repack_layouto.h5 -$SRC_H5REPACK_TESTFILES/h5repack_layout2.h5 -$SRC_H5REPACK_TESTFILES/h5repack_layout3.h5 -$SRC_H5REPACK_TESTFILES/h5repack_named_dtypes.h5 -$SRC_H5REPACK_TESTFILES/h5repack_nested_8bit_enum.h5 -$SRC_H5REPACK_TESTFILES/h5repack_nested_8bit_enum_deflated.h5 -$SRC_H5REPACK_TESTFILES/h5repack_nbit.h5 -$SRC_H5REPACK_TESTFILES/h5repack_objs.h5 -$SRC_H5REPACK_TESTFILES/h5repack_refs.h5 -$SRC_H5REPACK_TESTFILES/h5repack_shuffle.h5 -$SRC_H5REPACK_TESTFILES/h5repack_soffset.h5 -$SRC_H5REPACK_TESTFILES/h5repack_szip.h5 -$SRC_H5REPACK_TESTFILES/h5repack_uint8be.h5 -$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex.h5 -########fsm#files######## -$SRC_H5REPACK_TESTFILES/h5repack_aggr.h5 -$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_nopersist.h5 -$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_persist.h5 -$SRC_H5REPACK_TESTFILES/h5repack_none.h5 -$SRC_H5REPACK_TESTFILES/h5repack_paged_nopersist.h5 -$SRC_H5REPACK_TESTFILES/h5repack_paged_persist.h5 -########h5diff/testfile######## -$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5 -########test#HDFFV-10590######## -$SRC_H5REPACK_TESTFILES/h5repack_CVE-2018-17432.h5 -$SRC_H5REPACK_TESTFILES/h5repack_CVE-2018-14460.h5 -########tools/testfiles#for#external#links######## -$SRC_H5DUMP_TESTFILES/tsoftlinks.h5 -$SRC_H5DUMP_TESTFILES/textlinkfar.h5 -$SRC_H5DUMP_TESTFILES/textlinksrc.h5 -$SRC_H5DUMP_TESTFILES/textlinktar.h5 -$SRC_H5DUMP_TESTFILES/textlink.h5 -$SRC_H5COPY_TESTFILES/h5copy_extlinks_src.h5 -$SRC_H5COPY_TESTFILES/h5copy_extlinks_trg.h5 -########tools/testfiles######## -$SRC_H5DUMP_TESTFILES/tfamily00000.h5 -$SRC_H5DUMP_TESTFILES/tfamily00001.h5 -$SRC_H5DUMP_TESTFILES/tfamily00002.h5 -$SRC_H5DUMP_TESTFILES/tfamily00003.h5 -$SRC_H5DUMP_TESTFILES/tfamily00004.h5 -$SRC_H5DUMP_TESTFILES/tfamily00005.h5 -$SRC_H5DUMP_TESTFILES/tfamily00006.h5 -$SRC_H5DUMP_TESTFILES/tfamily00007.h5 -$SRC_H5DUMP_TESTFILES/tfamily00008.h5 -$SRC_H5DUMP_TESTFILES/tfamily00009.h5 -$SRC_H5DUMP_TESTFILES/tfamily00010.h5 -$SRC_H5DUMP_TESTFILES/tordergr.h5 -########reference#conversion#files######## -########tools/testfiles/vds######## -$SRC_H5DUMP_TESTFILES/vds/1_a.h5 -$SRC_H5DUMP_TESTFILES/vds/1_b.h5 -$SRC_H5DUMP_TESTFILES/vds/1_c.h5 -$SRC_H5DUMP_TESTFILES/vds/1_d.h5 -$SRC_H5DUMP_TESTFILES/vds/1_e.h5 -$SRC_H5DUMP_TESTFILES/vds/1_f.h5 -$SRC_H5DUMP_TESTFILES/vds/1_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/2_a.h5 -$SRC_H5DUMP_TESTFILES/vds/2_b.h5 -$SRC_H5DUMP_TESTFILES/vds/2_c.h5 -$SRC_H5DUMP_TESTFILES/vds/2_d.h5 -$SRC_H5DUMP_TESTFILES/vds/2_e.h5 -$SRC_H5DUMP_TESTFILES/vds/2_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/4_0.h5 -$SRC_H5DUMP_TESTFILES/vds/4_1.h5 -$SRC_H5DUMP_TESTFILES/vds/4_2.h5 -$SRC_H5DUMP_TESTFILES/vds/4_vds.h5 -$SRC_H5DUMP_TESTFILES/vds/5_a.h5 -$SRC_H5DUMP_TESTFILES/vds/5_b.h5 -$SRC_H5DUMP_TESTFILES/vds/5_c.h5 -$SRC_H5DUMP_TESTFILES/vds/5_vds.h5 -########tools/testfiles######## -$SRC_H5DUMP_TESTFILES/tst_onion_dset_1d.h5 -$SRC_H5DUMP_TESTFILES/tst_onion_dset_1d.h5.onion -$SRC_H5DUMP_TESTFILES/tst_onion_dset_ext.h5 -$SRC_H5DUMP_TESTFILES/tst_onion_dset_ext.h5.onion -$SRC_H5DUMP_TESTFILES/tst_onion_objs.h5 -$SRC_H5DUMP_TESTFILES/tst_onion_objs.h5.onion -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5REPACK_OUTFILES/h5repack-help.txt -$SRC_H5REPACK_TESTFILES/h5repack_ext.bin -$SRC_H5REPACK_TESTFILES/ublock.bin -$SRC_H5REPACK_TESTFILES/h5repack.info -########dat#files######## -$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex-0.dat -$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex-0.dat -$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex-1.dat -$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex-0.dat -$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex-0.dat -$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-0.dat -$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-1.dat -$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-2.dat -$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-3.dat -############### -$SRC_H5REPACK_OUTFILES/crtorder.tordergr.h5.ddl -$SRC_H5REPACK_OUTFILES/deflate_limit.h5repack_layout.h5.ddl -$SRC_H5REPACK_OUTFILES/h5repack_layout.h5.ddl -$SRC_H5REPACK_OUTFILES/h5repack_layout.h5-plugin_test.ddl -########fsm#files######## -$SRC_H5REPACK_OUTFILES/SP.h5repack_fsm_aggr_nopersist.h5.ddl -$SRC_H5REPACK_OUTFILES/S.h5repack_fsm_aggr_persist.h5.ddl -$SRC_H5REPACK_OUTFILES/STG.h5repack_none.h5.ddl -$SRC_H5REPACK_OUTFILES/GS.h5repack_paged_nopersist.h5.ddl -$SRC_H5REPACK_OUTFILES/SP.h5repack_paged_persist.h5.ddl -$SRC_H5REPACK_OUTFILES/SPT.h5repack_aggr.h5.ddl -########vds#files######## -$SRC_H5REPACK_OUTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl -$SRC_H5REPACK_OUTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl -$SRC_H5REPACK_OUTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl -$SRC_H5REPACK_OUTFILES/4_vds.h5-vds_compa-v.ddl -$SRC_H5REPACK_OUTFILES/4_vds.h5-vds_conti-v.ddl -########refs#files######## -$SRC_H5REPACK_OUTFILES/attrregion.tattrreg.h5.ddl -$SRC_H5REPACK_OUTFILES/dataregion.tdatareg.h5.ddl -########external#links#files######## -$SRC_H5REPACK_OUTFILES/textlinkfar-base.textlinkfar.h5.ddl -$SRC_H5REPACK_OUTFILES/textlinksrc-base.textlinksrc.h5.ddl -$SRC_H5REPACK_OUTFILES/textlinktar-base.textlinktar.h5.ddl -$SRC_H5REPACK_OUTFILES/textlink-base.textlink.h5.ddl -$SRC_H5REPACK_OUTFILES/tsoftlinks-base.tsoftlinks.h5.ddl -$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl -$SRC_H5REPACK_OUTFILES/textlinkfar-merge.textlinkfar.h5.tst -$SRC_H5REPACK_OUTFILES/textlinksrc-merge.textlinksrc.h5.tst -$SRC_H5REPACK_OUTFILES/textlinktar-merge.textlinktar.h5.tst -$SRC_H5REPACK_OUTFILES/textlink-merge.textlink.h5.tst -$SRC_H5REPACK_OUTFILES/tsoftlinks-merge.tsoftlinks.h5.tst -$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst -$SRC_H5REPACK_OUTFILES/textlinkfar-prune.textlinkfar.h5.ddl -$SRC_H5REPACK_OUTFILES/textlinksrc-prune.textlinksrc.h5.ddl -$SRC_H5REPACK_OUTFILES/textlinktar-prune.textlinktar.h5.ddl -$SRC_H5REPACK_OUTFILES/textlink-prune.textlink.h5.ddl -$SRC_H5REPACK_OUTFILES/tsoftlinks-prune.tsoftlinks.h5.ddl -$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl -$SRC_H5REPACK_OUTFILES/textlinkfar-mergeprune.textlinkfar.h5.ddl -$SRC_H5REPACK_OUTFILES/textlinksrc-mergeprune.textlinksrc.h5.ddl -$SRC_H5REPACK_OUTFILES/textlinktar-mergeprune.textlinktar.h5.ddl -$SRC_H5REPACK_OUTFILES/textlink-mergeprune.textlink.h5.ddl -$SRC_H5REPACK_OUTFILES/tsoftlinks-mergeprune.tsoftlinks.h5.ddl -$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl -########tst#files######## -$SRC_H5REPACK_OUTFILES/h5repack_filters.h5-gzip_verbose_filters.tst -$SRC_H5REPACK_OUTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst -$SRC_H5REPACK_OUTFILES/plugin_test.h5repack_layout.h5.tst -########external#links#tst#files######## -$SRC_H5REPACK_OUTFILES/tsoftlinks-merge.tsoftlinks.h5.tst -$SRC_H5REPACK_OUTFILES/textlinkfar-merge.textlinkfar.h5.tst -$SRC_H5REPACK_OUTFILES/textlinksrc-merge.textlinksrc.h5.tst -$SRC_H5REPACK_OUTFILES/textlinktar-merge.textlinktar.h5.tst -$SRC_H5REPACK_OUTFILES/textlink-merge.textlink.h5.tst -$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst -########onion#files######## -$SRC_H5REPACK_OUTFILES/onion.tst_onion_dset_1d.h5.ddl -$SRC_H5REPACK_OUTFILES/onion.tst_onion_dset_ext.h5.ddl -$SRC_H5REPACK_OUTFILES/onion.tst_onion_objs.h5.ddl -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5REPACK_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a $* message left justified in a field of 70 characters -# -MESSAGE() { - SPACES=" " - echo "$* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - MESSAGE "Testing $*" -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -VERIFY() { - MESSAGE "Verifying $*" -} - -# Print a message that a test has been skipped (because a required filter -# was unavailable) -SKIP() { - TESTING $H5REPACK $@ - echo " -SKIP-" -} - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - -# Call the h5diff tool -# -DIFFTEST() -{ - VERIFY h5diff output $@ - ( - cd $TESTDIR - $RUNSERIAL $H5DIFF_BIN -q "$@" - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - -} - -# Call h5repack -# - - -# call TOOLTEST_MAIN and delete $output file -TOOLTEST() -{ - echo $@ - infile=$2 - outfile=out-$1.$2 - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - rm -f $outfile -} - -#------------------------------------------ -# Verifying layouts of a dataset -VERIFY_LAYOUT_DSET() -{ - layoutfile=layout-$1.$2 - dset=$3 - expectlayout=$4 - infile=$2 - outfile=out-$1.$2 - shift - shift - shift - shift - - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - - #--------------------------------- - # check the layout from a dataset - VERIFY "a dataset layout" - ( - cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN -d $dset -pH $outfile > $layoutfile - ) - $GREP $expectlayout $TESTDIR/$layoutfile > /dev/null - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo " FAILED" - nerrors="`expr $nerrors + 1`" - fi - - # clean up tmp files -# rm -f $outfile -# rm -f $layoutfile -} - -#------------------------------------------ -# Verifying layouts of a dataset -VERIFY_LAYOUT_VDS() -{ - layoutfile=layout-$1.$2 - dset=$3 - expectlayout=$4 - infile=$2 - outfile=out-$1.$2 - - expect="$TESTDIR/$2-$1-v.ddl" - actual="$TESTDIR/$2-$1-v.out" - actual_err="$TESTDIR/$2-$1-v.err" - - shift - shift - shift - shift - - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - - #--------------------------------- - # check the layout from a dataset - VERIFY "a dataset layout" - ( - cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN -d $dset -p $outfile - ) >$actual 2>$actual_err - - cat $actual_err >> $actual - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual > /dev/null 2>&1 ; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi - - # clean up tmp files - rm -f $outfile -} - -#---------------------------------------- -# Verifying layouts from entire file -VERIFY_LAYOUT_ALL() -{ - infile=$2 - outfile=out-$1.$2 - layoutfile=layout-$1.$2 - expectlayout=$3 - shift - shift - shift - - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - - - #--------------------------------- - # check the layout from a dataset - # check if the other layouts still exist - VERIFY "layouts" - ( - cd $TESTDIR - echo - # if CONTIGUOUS - if [ $expectlayout = "CONTIGUOUS" ]; then - TESTING $H5DUMP_BIN -pH $outfile - ( - $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile - ) - $GREP "COMPACT" $layoutfile > /dev/null - if [ $? -eq 0 ]; then - echo " FAILED" - nerrors="`expr $nerrors + 1`" - else - $GREP "CHUNKED" $layoutfile > /dev/null - if [ $? -eq 0 ]; then - echo " FAILED" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - fi - else - # if COMPACT - if [ $expectlayout = "COMPACT" ]; then - TESTING $H5DUMP_BIN -pH $outfile - ( - $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile - ) - $GREP "CHUNKED" $layoutfile > /dev/null - if [ $? -eq 0 ]; then - echo " FAILED" - nerrors="`expr $nerrors + 1`" - else - $GREP "CONTIGUOUS" $layoutfile > /dev/null - if [ $? -eq 0 ]; then - echo " FAILED" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - fi - else - # if CHUNKED - if [ $expectlayout = "CHUNKED" ]; then - TESTING $H5DUMP_BIN -pH $outfile - ( - $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile - ) - $GREP "CONTIGUOUS" $layoutfile > /dev/null - if [ $? -eq 0 ]; then - echo " FAILED" - nerrors="`expr $nerrors + 1`" - else - $GREP "COMPACT" $layoutfile > /dev/null - if [ $? -eq 0 ]; then - echo " FAILED" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - fi - fi - fi - fi - ) - - # clean up tmp files - rm -f $outfile - rm -f $layoutfile -} - -#-------------------------------------------------------------- -# Verifying superblock of a file with different version bounds -VERIFY_SUPERBLOCK() -{ - lowbound=$1 - highbound=$2 - superblock=$3 - infile=$4 - layoutfile=verbounds-low$lowbound-high$highbound.$4 - outfile=out-verbounds-low$lowbound-high$highbound.$infile - expectedsuperblock="SUPERBLOCK_VERSION $superblock" - - shift - shift - shift - shift - - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN -j $lowbound -k $highbound $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - - #--------------------------------- - # check the layout from a dataset - VERIFY "superblock" - ( - cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN -H -B $outfile > $layoutfile - ) - $GREP "$expectedsuperblock" $TESTDIR/$layoutfile > /dev/null - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo " FAILED" - nerrors="`expr $nerrors + 1`" - fi - - # clean up tmp files - rm -f $outfile - rm -f $layoutfile - -} # end of VERIFY_SUPERBLOCK - -#------------------------------------------------------------------ -# Verifying that a latest file cannot be opened with earlier bounds -VERIFY_INVALIDBOUNDS() -{ - lowbound=$1 - highbound=$2 - infile=$3 - outfile=out-verbounds-low$lowbound-high$highbound.$infile - - #-------------------------------------- - # check for failure with invalid bounds - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN -j $lowbound -k $highbound $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - fi - - # clean up tmp files - rm -f $outfile - -} # end of VERIFY_INVALIDBOUNDS - -# ----------------------------------------------------------------------------- -# Expect h5diff to fail -# Use only by VERIFY_EXTERNAL_CONSOLIDATION -# ----------------------------------------------------------------------------- -DIFFFAIL() -{ - VERIFY h5diff unequal $@ - ( - cd $TESTDIR - $RUNSERIAL $H5DIFF_BIN -q "$@" - ) - RET=$? - if [ $RET -eq 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi -} - -# ----------------------------------------------------------------------------- -# Catchall test for repacking with external files -# Loops over all (internally-listed) cases and applies the given arguments -# to h5repack. -# Each test file family must be listed in the for loop at the start of the -# 'function'. -# Expects case files to be of format: -# + h5repack_.h5 -# + h5repack__ex.h5 -# + h5repack__ex-.dat -# ...where NAME is part of the internal list, and N is a positive decimal -# number; multiple external files (*.dat) are allowed per file, but they must -# follow the pattern and be in contiguous numerical sequence starting at 0. -# ----------------------------------------------------------------------------- -VERIFY_EXTERNAL_CONSOLIDATION() -{ - for name in f32le int32le_1d int32le_2d int32le_3d uint8be - do - basename="h5repack_${name}" - base_ext="${basename}_ex" - base_rpkg="${basename}_rp" - canonical="${basename}.h5" - external="${base_ext}.h5" - ex_dat="${base_ext}-0.dat" - ex_dat_mv="__${ext_dat}" - repacked="${base_rpkg}.h5" - prev_nerrors=$nerrors - - TESTING external consolidation on $name with h5repack $@ - echo " . . ." - - # baseline comparison of known files - DIFFTEST $canonical $external - - # repack the external file, verify integrity - ( cd $TESTDIR - $H5REPACK_BIN $@ $external $repacked - ) - DIFFTEST $repacked $canonical - DIFFTEST $repacked $external - - # invalidate external file by moving its first data file; verify - ( cd $TESTDIR - mv $ex_dat $ex_dat_mv - ) - DIFFFAIL $canonical $external - DIFFFAIL $repacked $external - DIFFTEST $canonical $repacked - - # reset test state for re-runs with different h5repack arguments - ( cd $TESTDIR - mv $ex_dat_mv $ex_dat - rm $repacked - ) - - # flag if any of the above checks failed - if [ $prev_nerrors != $nerrors ] - then - echo ". . . *FAILED*" - nerrors="`expr $prev_nerrors + 1`" - else - echo ". . . PASSED" - fi - done -} # end VERIFY_EXTERNAL_CONSOLIDATION - -# ----------------------------------------------------------------------------- -# same as TOOLTEST, but it uses the old syntax -i input_file -o output_file -# ----------------------------------------------------------------------------- -TOOLTEST0() -{ - infile=$2 - outfile=out-$1.$2 - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@" - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - rm -f $outfile -} - - -# same as TOOLTEST, but it uses without -i -o options -# used to test the family driver, where these files reside -# -TOOLTEST1() -{ - infile=$2 - outfile=out-$1.$2 - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - rm -f $outfile -} - -# This is same as TOOLTEST() with comparing display output -# from -v option -# -TOOLTESTV() -{ - expect="$TESTDIR/$2-$1.tst" - actual="$TESTDIR/`basename $2 .ddl`.out" - actual_err="$TESTDIR/`basename $2 .ddl`.err" - - infile=$2 - outfile=out-$1.$2 - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - - # display output compare - STDOUT_FILTER $actual - tmp_file=/tmp/h5test_tmp_$$ - cp $actual $tmp_file - sed -e 's/GZIP (0\.[0-9][0-9][0-9]:1)/GZIP (0.XXX:1)/' \ - < $tmp_file > $actual - rm -f $tmp_file - cat $actual_err >> $actual - - VERIFY output from $H5REPACK $@ - if cmp -s $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.tst) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' - fi - - rm -f $actual $actual_err - rm -f $outfile -} - -# Same as TOOLTEST, but expects h5repack fails -# -TOOLTEST_FAIL() -{ - infile=$1 - outfile=$2 - expect="$TESTDIR/$2-$1.ddl" - actual="$TESTDIR/$2-$1.out" - actual_err="$TESTDIR/$2-$1.err" - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >&$actual - RET=$? - - # Normally h5repack of files tested with this function are expected - # to return not 0, but if the command results in "Segmentation fault" - # or "core dumped" it is a failure regardless of the return value. - failure=`grep -e 'Segmentation fault' -e 'core dumped' $actual` - if [ "$failure" != "" ]; then - nerrors="`expr $nerrors + 1`" - echo " FAILED" - echo " $failure" - else - if [ $RET == 0 ] ; then - nerrors="`expr $nerrors + 1`" - echo " FAILED" - else - echo " PASSED" - fi - fi - rm -f $outfile -} - -# This is same as TOOLTESTV() with comparing display output -# with actual filename swapped -# -TOOLTESTSV() -{ - expect="$TESTDIR/$1.$2.tst" - actual="$TESTDIR/`basename $2 .ddl`.out" - actual_err="$TESTDIR/`basename $2 .ddl`.err" - - infile=$2 - outfile=out-$1.$2 - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - VERIFY h5diff equal $@ - ( - cd $TESTDIR - $RUNSERIAL $H5DIFF_BIN -v $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - fi - - # display output compare - STDOUT_FILTER $actual - cat $actual_err >> $actual - - VERIFY output from $H5REPACK $@ - if cmp -s $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.tst) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' - fi - - rm -f $actual $actual_err - rm -f $outfile -} - -# This is same as TOOLTESTSV() but expects a diff fail -# -TOOLFAILSV() -{ - expect="$TESTDIR/$1.$2.tst" - actual="$TESTDIR/`basename $2 .ddl`.out" - actual_err="$TESTDIR/`basename $2 .ddl`.err" - - infile=$2 - outfile=out-$1.$2 - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - VERIFY h5diff unequal $@ - ( - cd $TESTDIR - $RUNSERIAL $H5DIFF_BIN -v $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET == 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - fi - fi - - # display output compare - STDOUT_FILTER $actual - cat $actual_err >> $actual - - VERIFY output from $H5REPACK $@ - if cmp -s $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.tst) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' - fi - - rm -f $actual $actual_err - rm -f $outfile -} - -# same as TOOLTESTV but filters error stack output and compares to an error file -# Extract file name, line number, version and thread IDs because they may be different -# ADD_H5ERR_MASK_TEST -TOOLTESTM() { - - expect="$TESTDIR/$2-$1.tst" - actual="$TESTDIR/`basename $2 .tst`.out" - actual_err="$TESTDIR/`basename $2 .tst`.oerr" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - - infile=$2 - outfile=out-$1.$2 - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - cp $actual_err $actual_err_sav - - # Extract file name, line number, version and thread IDs because they may be different - sed -e 's/ thread [0-9]*//' -e 's/: .*\.c /: (file name) /' \ - -e 's/line [0-9]*/line (number)/' \ - -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ - -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ - -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ - -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ - $actual_err > $actual - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.tst) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.tst) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - fi - -} - -# This is same as TOOLTESTV() with comparing h5dump output -# from -pH option -# -TOOLTEST_DUMP() -{ - infile=$2 - outfile=out-$1.$2 - expect="$TESTDIR/$1.$2.ddl" - actual="$TESTDIR/out-$1.$2.out" - actual_err="$TESTDIR/out-$1.$2.err" - - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - VERIFY h5dump output $@ - ( - cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN -q creation_order -pH $outfile - ) >$actual 2>$actual_err - cat $actual_err >> $actual - - RET=$? - - fi - - if cmp -s $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' - fi - - rm -f $actual $actual_err - rm -f $outfile -} - -# This is same as TOOLTESTV() with comparing h5dump output -# from -pH option and MASK out compression -# -TOOLTEST_DUMP_MASK() -{ - infile=$2 - outfile=out-$1.$2 - expect="$TESTDIR/$1.$2.ddl" - actual="$TESTDIR/out-$1.$2.out" - actual_err="$TESTDIR/out-$1.$2.err" - - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - VERIFY h5dump output $@ - ( - cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN -q creation_order -pH $outfile - ) >$actual 2>$actual_err - cat $actual_err >> $actual - - RET=$? - - fi - - tmp_file=/tmp/h5test_tmp_$$ - cp $actual $tmp_file - sed -e 's/SIZE [0-9][0-9][0-9][0-9] (2\.[0-9][0-9][0-9]:1 COMPRESSION)/SIZE XXXX (2.XXX:1 COMPRESSION)/' \ - < $tmp_file > $actual - rm -f $tmp_file - cat $actual_err >> $actual - - if cmp -s $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' - fi - - rm -f $actual $actual_err - rm -f $outfile -} - -# This is same as TOOLTEST_DUMP() with comparing h5dump output -# without any option -# -TOOLTEST_DUMP_NO_OPT() -{ - infile=$2 - outfile=out-$1.$2 - expect="$TESTDIR/$1.$2.ddl" - actual="$TESTDIR/out-$1.$2.out" - actual_err="$TESTDIR/out-$1.$2.err" - - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - VERIFY h5dump output $@ - ( - cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN $outfile - ) >$actual 2>$actual_err - cat $actual_err >> $actual - - RET=$? - - fi - - if cmp -s $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' - fi - - rm -f $actual $actual_err - rm -f $outfile -} - -# This is similar to TOOLTEST_DUMP(). -# Test h5repack with options added for paged aggregation. -# h5stat is used on the repacked file and the expected output -# is compared for correctness. -# -TOOLTEST_STAT() -{ - infile=$2 - outfile=out-$1.$2 - expect="$TESTDIR/$1.$2.ddl" - actual="$TESTDIR/out-$1.$2.out" - actual_err="$TESTDIR/out-$1.$2.err" - - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) >$actual 2>$actual_err - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - VERIFY h5stat output $@ - ( - cd $TESTDIR - $RUNSERIAL $H5STAT_BIN -S -s $outfile - ) >$actual 2>$actual_err - cat $actual_err >> $actual - - RET=$? - - fi - - if cmp -s $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' - fi - - rm -f $actual $actual_err - rm -f $outfile -} - -# TOOLTEST_META: -# Test metadata block size option. -# Reason to create a function here is to localize all special steps related to -# metadata block size option in one place. This is a quick solution. More -# thought out solution needed when there is more time. -# -# $1: test input file -# $2:$: metadata options (either "-M size" or "--metadata_block_size=size") -# -# Algorithm: -# Run it once without the metadata option ($2-$); -# Save the result output file; -# Run it second time with the metadata option; -# Verify the output file of second run is larger than the one of 1st run. -TOOLTEST_META() -{ - infile=$2 - outfile=out-$1.$2 - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - # get the size of the first output file - size1=`wc -c $TESTDIR/$outfile | cut -d' ' -f1` - - # 2nd run with metadata option - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile - ) - RET=$? - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - DIFFTEST $infile $outfile - fi - # get the size of the second output file - size2=`wc -c $TESTDIR/$outfile | cut -d' ' -f1` - - # verify sizes. - MESSAGE "Verify the sizes of both output files ($size1 vs $size2)" - if [ $size1 -lt $size2 ]; then - # pass - echo " PASSED" - else - #fail - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - fi - - rm -f $outfile -} - -# ADD_HELP_TEST -TOOLTEST_HELP() { - - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .txt`.out" - actual_err="$TESTDIR/`basename $1 .txt`.err" - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $RUNSERIAL $H5REPACK_BIN "$@" - ) >$actual 2>$actual_err - cat $actual_err >> $actual - - if [ ! -f $expect ]; then - # Create the expect data file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect-CREATED - echo " Expected result (*.txt) missing" - nerrors="`expr $nerrors + 1`" - elif cmp -s $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected output (*.txt) differs from actual output (*.out)" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi - -} - -# This is different from $srcdir/../../../bin/output_filter.sh -STDOUT_FILTER() { - result_file=$1 - tmp_file=/tmp/h5test_tmp_$$ - # Filter name of files. - cp $result_file $tmp_file - sed -e '/^Opening file/d' -e '/^Making file/d' \ - < $tmp_file > $result_file - # cleanup - rm -f $tmp_file -} - -# -# The tests -# We use the files generated by h5repacktst -# Each run generates ".out.h5" and the tool h5diff is used to -# compare the input and output files -# -# the tests are the same as the program h5repacktst, but run from the CLI -# - -# See which filters are usable (and skip tests for filters we -# don't have). Do this by searching H5pubconf.h to see which -# filters are defined. - -# detect whether the encoder is present. -USE_FILTER_SZIP_ENCODER="no"; -if test $USE_FILTER_SZIP = "yes"; then -USE_FILTER_SZIP_ENCODER=`$RUNSERIAL $H5DETECTSZIP_BIN` -fi - -############################################################################## -### T H E T E S T S -############################################################################## - -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -TOOLTEST_HELP h5repack-help.txt -h - -# copy files (these files have no filters) -TOOLTEST fill h5repack_fill.h5 -TOOLTEST objs h5repack_objs.h5 -TOOLTEST attr h5repack_attr.h5 -TOOLTEST hlink h5repack_hlink.h5 -TOOLTEST layout h5repack_layout.h5 -TOOLTEST early h5repack_early.h5 - -# nested 8bit enum in both deflated and non-deflated datafiles -if [ $USE_FILTER_DEFLATE != "yes" ]; then -TOOLTEST nested_8bit_enum h5repack_nested_8bit_enum.h5 -else -TOOLTEST nested_8bit_enum h5repack_nested_8bit_enum_deflated.h5 -fi - -# use h5repack_layout.h5 to write some filters (this file has no filters) - -# gzip with individual object -arg="h5repack_layout.h5 -f dset1:GZIP=1 -l dset1:CHUNK=20x10" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST gzip_individual $arg -fi - -# gzip for all -arg="h5repack_layout.h5 -f GZIP=1" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST gzip_all $arg -fi - -# szip with individual object -arg="h5repack_layout.h5 -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10" -if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then - SKIP $arg -else - TOOLTEST szip_individual $arg -fi - -# szip for all -arg="h5repack_layout.h5 -f SZIP=8,NN" -if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then - SKIP $arg -else - TOOLTEST szip_all $arg -fi - -# shuffle with individual object -arg="h5repack_layout.h5 -f dset2:SHUF -l dset2:CHUNK=20x10" -TOOLTEST shuffle_individual $arg - - -# shuffle for all -arg="h5repack_layout.h5 -f SHUF" -TOOLTEST shuffle_all $arg - -# fletcher32 with individual object -arg="h5repack_layout.h5 -f dset2:FLET -l dset2:CHUNK=20x10" -TOOLTEST fletcher_individual $arg - -# fletcher32 for all -arg="h5repack_layout.h5 -f FLET" -TOOLTEST fletcher_all $arg - -# all filters -arg="h5repack_layout.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10" -if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST all_filters $arg -fi - -# verbose gzip with individual object -arg="h5repack_filters.h5 -v -f /dset_deflate:GZIP=9" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - # compare output - TOOLTESTV gzip_verbose_filters $arg -fi - -########################################################### -# the following tests assume the input files have filters -########################################################### - -# szip copy -arg="h5repack_szip.h5" -if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then - SKIP $arg -else - TOOLTEST szip_copy $arg -fi - -# szip remove -arg="h5repack_szip.h5 --filter=dset_szip:NONE" -if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then - SKIP $arg -else - TOOLTEST szip_remove $arg -fi - -# deflate copy -arg="h5repack_deflate.h5" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST deflate_copy $arg -fi - -# deflate remove -arg="h5repack_deflate.h5 -f dset_deflate:NONE" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST deflate_remove $arg -fi - -# shuffle copy -arg="h5repack_shuffle.h5" -TOOLTEST shuffle_copy $arg - -# shuffle remove -arg="h5repack_shuffle.h5 -f dset_shuffle:NONE" -TOOLTEST shuffle_remove $arg - -# fletcher32 copy -arg="h5repack_fletcher.h5" -TOOLTEST fletcher_copy $arg - -# fletcher32 remove -arg="h5repack_fletcher.h5 -f dset_fletcher32:NONE" -TOOLTEST fletcher_remove $arg - -# nbit copy -arg="h5repack_nbit.h5" -TOOLTEST nbit_copy $arg - -# nbit remove -arg="h5repack_nbit.h5 -f dset_nbit:NONE" -TOOLTEST nbit_remove $arg - -# nbit add -arg="h5repack_nbit.h5 -f dset_int31:NBIT" -TOOLTEST nbit_add $arg - -# scaleoffset copy -arg="h5repack_soffset.h5" -TOOLTEST scale_copy $arg - -# scaleoffset add -arg="h5repack_soffset.h5 -f dset_none:SOFF=31,IN" -TOOLTEST scale_add $arg - -# scaleoffset remove -arg="h5repack_soffset.h5 -f dset_scaleoffset:NONE" -TOOLTEST scale_remove $arg - -# remove all filters -arg="h5repack_filters.h5 -f NONE" -if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" ; then - SKIP $arg -else - TOOLTEST remove_all $arg -fi - -#filter conversions - -arg="h5repack_deflate.h5 -f dset_deflate:SZIP=8,NN" -if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST deflate_convert $arg -fi - -arg="h5repack_szip.h5 -f dset_szip:GZIP=1" -if test $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST szip_convert $arg -fi - - -#limit -arg="h5repack_layout.h5 -f GZIP=2 -m 1024" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST_DUMP_MASK deflate_limit $arg -fi - -#file -arg="h5repack_layout.h5 -e h5repack.info" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST deflate_file $arg -fi - -#crtorder -arg="tordergr.h5 -L" -TOOLTEST_DUMP crtorder $arg - -################################################################################################### -# Testing paged aggregation related options: -# -G pagesize -# -P 1 or 0 -# -S strategy -# -T threshold -# -# The testfiles used are generated by test/gen_filespace.c and the file names are prepended with "h5repack_": -# (1) "fsm_aggr_nopersist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + not persisting free-space */ -# (2) "fsm_aggr_persist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + persisting free-space */ -# (3) "paged_nopersist.h5" /* H5F_FSPACE_STRATEGY_PAGE + not persisting free-space */ -# (4) "paged_persist.h5" /* H5F_FSPACE_STRATEGY_PAGE + persisting free-space */ -# (5) "aggr.h5" /* H5F_FSPACE_STRATEGY_AGGR */ -# (6) "none.h5" /* H5F_FSPACE_STRATEGY_NONE */ -# -##################################################################################################### -# -arg="h5repack_fsm_aggr_nopersist.h5 -S PAGE -P 1" -TOOLTEST_STAT SP $arg -# -arg="h5repack_fsm_aggr_persist.h5 -S AGGR" -TOOLTEST_STAT S $arg -# -arg="h5repack_none.h5 -S PAGE -T 10 -G 2048" -TOOLTEST_STAT STG $arg -# -arg="h5repack_paged_nopersist.h5 -G 512 -S AGGR" -TOOLTEST_STAT GS $arg -# -arg="h5repack_paged_persist.h5 -S NONE -P 1" -TOOLTEST_STAT SP $arg -# -arg="h5repack_aggr.h5 -S FSM_AGGR -P 1 -T 5" -TOOLTEST_STAT SPT $arg - - -######################################################### -# layout options (these files have no filters) -######################################################### -VERIFY_LAYOUT_DSET dset2_chunk_20x10 h5repack_layout.h5 dset2 CHUNKED --layout dset2:CHUNK=20x10 -VERIFY_LAYOUT_ALL chunk_20x10 h5repack_layout.h5 CHUNKED -l CHUNK=20x10 -VERIFY_LAYOUT_DSET dset2_conti h5repack_layout.h5 dset2 CONTIGUOUS -l dset2:CONTI -VERIFY_LAYOUT_ALL conti h5repack_layout.h5 CONTIGUOUS -l CONTI -VERIFY_LAYOUT_DSET dset2_compa h5repack_layout.h5 dset2 COMPACT -l dset2:COMPA -VERIFY_LAYOUT_ALL compa h5repack_layout.h5 COMPACT -l COMPA -TOOLTESTM dset2_chunk_20x10-errstk h5repack_layout.h5 --layout=dset2:CHUNK=20x10x5 --enable-error-stack - -################################################################ -# layout conversions (file has no filters) -############################################################### -VERIFY_LAYOUT_DSET dset_compa_conti h5repack_layout.h5 dset_compact CONTIGUOUS -l dset_compact:CONTI -VERIFY_LAYOUT_DSET dset_compa_chunk h5repack_layout.h5 dset_compact CHUNKED -l dset_compact:CHUNK=2x5 -VERIFY_LAYOUT_DSET dset_compa_compa h5repack_layout.h5 dset_compact COMPACT -l dset_compact:COMPA -VERIFY_LAYOUT_DSET dset_conti_compa h5repack_layout.h5 dset_contiguous COMPACT -l dset_contiguous:COMPA -VERIFY_LAYOUT_DSET dset_conti_chunk h5repack_layout.h5 dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6 -VERIFY_LAYOUT_DSET dset_conti_conti h5repack_layout.h5 dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI -VERIFY_LAYOUT_DSET chunk_compa h5repack_layout.h5 dset_chunk COMPACT -l dset_chunk:COMPA -VERIFY_LAYOUT_DSET chunk_conti h5repack_layout.h5 dset_chunk CONTIGUOUS -l dset_chunk:CONTI -VERIFY_LAYOUT_DSET chunk_18x13 h5repack_layout.h5 dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13 - -# test convert small size dataset ( < 1k) to compact layout without -m -VERIFY_LAYOUT_DSET contig_small_compa h5repack_layout2.h5 contig_small COMPACT -l contig_small:COMPA -VERIFY_LAYOUT_DSET contig_small_fixed_compa h5repack_layout2.h5 chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA - -#--------------------------------------------------------------------------- -# Test file contains chunked datasets (need multiple dsets) with -# unlimited max dims. (HDFFV-7933) -# Use first dset to test. -#--------------------------------------------------------------------------- -# chunk to chunk - specify chunk dim bigger than any current dim -VERIFY_LAYOUT_DSET chunk2chunk h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300 - -# chunk to contiguous -VERIFY_LAYOUT_DSET chunk2conti h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI - -# chunk to compact - convert big dataset (should be > 64k) for this purpose, -# should remain as original layout (chunk) -VERIFY_LAYOUT_DSET chunk2compa h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA - -#-------------------------------------------------------------------------- -# Test -f for some specific cases. Chunked dataset with unlimited max dims. -# (HDFFV-8012) -#-------------------------------------------------------------------------- -# - should not fail -# - should not change max dims from unlimit - -# chunk dim is bigger than dataset dim. ( dset size < 64k ) -VERIFY_LAYOUT_DSET error1 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE -# chunk dim is bigger than dataset dim. ( dset size > 64k ) - -VERIFY_LAYOUT_DSET error2 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE - -# chunk dims are smaller than dataset dims. ( dset size < 64k ) -#TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit3:NONE -VERIFY_LAYOUT_DSET error3 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE - -# file input - should not fail -TOOLTEST error4 h5repack_layout3.h5 -f NONE - -#-------------------------------------------------------------------------- -# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset -# (dset size < 64K) and with unlimited max dims on a condition as follow. -# (HDFFV-8214) -#-------------------------------------------------------------------------- -# chunk dim is bigger than dataset dim. should succeed. -VERIFY_LAYOUT_DSET ckdim_biger h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI -# chunk dim is smaller than dataset dim. should succeed. -VERIFY_LAYOUT_DSET ckdim_smaller h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI - - -# Native option -# Do not use FILE1, as the named dtype will be converted to native, and h5diff will -# report a difference. -TOOLTEST native_fill h5repack_fill.h5 -n -TOOLTEST native_attr h5repack_attr.h5 -n - - -# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters) -arg="h5repack_layout.h5 --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype]" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - VERIFY_LAYOUT_ALL layout_long_switches h5repack_layout.h5 CHUNKED --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype] -fi - -# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) -arg="h5repack_layout.h5 -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - VERIFY_LAYOUT_ALL layout_short_switches h5repack_layout.h5 CHUNKED -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype] -fi - -# several global filters -arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST global_filters $arg -fi - -# syntax of -i infile -o outfile -# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) -arg="h5repack_layout.h5 -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST0 old_style_layout_short_switches $arg -fi - -# add a userblock to file -arg="h5repack_objs.h5 -u ublock.bin -b 2048" -TOOLTEST add_userblock $arg - -# reserve a userblock to file -arg="h5repack_objs.h5 -b 2048" -TOOLTEST reserve_userblock $arg - -# add alignment -arg="h5repack_objs.h5 -t 1 -a 1 " -TOOLTEST add_alignment $arg - -# Check repacking file with old version of layout message (should get upgraded -# to new version and be readable, etc.) -TOOLTEST upgrade_layout h5repack_layouto.h5 - -# test for datum size > H5TOOLS_MALLOCSIZE -arg="h5repack_objs.h5 -f GZIP=1" -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg -else - TOOLTEST gt_mallocsize $arg -fi - -# Check repacking file with committed datatypes in odd configurations -TOOLTEST committed_dt h5repack_named_dtypes.h5 - -# tests family driver (file is located in common testfiles folder, uses TOOLTEST1 -TOOLTEST1 family tfamily%05d.h5 - -# test various references (bug 1814 and 1726) -TOOLTEST bug1814 h5repack_refs.h5 - -# test attribute with various references (bug1797 / HDFFV-5932) -# the references in attribute of compound or vlen datatype -TOOLTEST HDFFV-5932 h5repack_attr_refs.h5 - -# Add test for memory leak in attribute. This test is verified by CTEST. -# 1. leak from vlen string -# 2. leak from compound type without reference member -# (HDFFV-7840, ) -# Note: this test is experimental for sharing test file among tools -TOOLTEST HDFFV-7840 h5diff_attr1.h5 - -# test HDFFV-10590 -arg="h5repack_CVE-2018-17432.h5 h5repack_CVE-2018-17432_out.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6" -TOOLTEST_FAIL $arg - -# test HDFFV-11223 -arg="h5repack_CVE-2018-14460.h5 h5repack_CVE-2018-14460_out.h5" -TOOLTEST_FAIL $arg - -# tests for metadata block size option -TOOLTEST_META meta_short h5repack_layout.h5 -M 8192 -TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192 - -# VDS tests - -################################################################ -# layout conversions -############################################################### -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP vds_dset_chunk_20x10x5 -else - VERIFY_LAYOUT_VDS vds_dset_chunk20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5 -fi - -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP vds_chunk2x5x8 -else - VERIFY_LAYOUT_VDS vds_chunk2x5x8 3_1_vds.h5 vds_dset CHUNKED -l vds_dset:CHUNK=2x5x8 -fi - -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP vds_chunk3x6x9 -else - VERIFY_LAYOUT_VDS vds_chunk3x6x9 2_vds.h5 vds_dset CHUNKED -l vds_dset:CHUNK=3x6x9 -fi - -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP vds_compa 4_vds.h5 -else - VERIFY_LAYOUT_VDS vds_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA -fi - -if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP vds_conti 4_vds.h5 -else - VERIFY_LAYOUT_VDS vds_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI -fi - -################################################################ -# reference new api conversions -############################################################### -#TOOLTEST_DUMP attrregion tattrreg.h5 -#TOOLTEST_DUMP dataregion tdatareg.h5 - -############################################################################## -### V E R S I O N B O U N D S T E S T S -############################################################################## -# -j 0 -k 2, superblock will be 0 -VERIFY_SUPERBLOCK 0 2 0 h5repack_layout.h5 -j 0 -k 2 h5repack_layout.h5 -# -j 1 -k 2, superblock will be 2 -VERIFY_SUPERBLOCK 1 2 2 h5repack_layout.h5 -j 1 -k 2 h5repack_layout.h5 -# -j 2 -k 2, superblock will be 3 -VERIFY_SUPERBLOCK 2 2 3 h5repack_layout.h5 -j 2 -k 2 h5repack_layout.h5 -# -j 0 -k 1, file cannot be opened -VERIFY_INVALIDBOUNDS 0 1 bounds_latest_latest.h5 - -############################################################################## -### E X T E R N A L S T O R A G E T E S T S -############################################################################## -VERIFY_EXTERNAL_CONSOLIDATION -l CONTI - -############################################################################## -### E X T E R N A L L I N K T E S T S -############################################################################## -### HDFFV-11128 needs fixed to enable the following test -#TOOLTEST_DUMP h5copy_extlinks_src-base h5copy_extlinks_src.h5 --enable-error-stack -TOOLTEST_DUMP tsoftlinks-base tsoftlinks.h5 --enable-error-stack -TOOLTEST_DUMP textlink-base textlink.h5 --enable-error-stack -TOOLTEST_DUMP textlinkfar-base textlinkfar.h5 --enable-error-stack -TOOLTEST_DUMP textlinksrc-base textlinksrc.h5 --enable-error-stack -TOOLTEST_DUMP textlinktar-base textlinktar.h5 --enable-error-stack - -TOOLTESTSV h5copy_extlinks_src-merge h5copy_extlinks_src.h5 --merge -TOOLFAILSV tsoftlinks-merge tsoftlinks.h5 --merge -TOOLTESTSV textlink-merge textlink.h5 --merge -### HDFFV-11128 needs fixed to enable the following test -#TOOLFAILSV textlinkfar-merge textlinkfar.h5 --merge -### HDFFV-11128 needs fixed to enable the following test -#TOOLFAILSV textlinksrc-merge textlinksrc.h5 --merge -### HDFFV-11128 needs fixed to enable the following test -#TOOLFAILSV textlinktar-merge textlinktar.h5 --merge - -TOOLTEST_DUMP h5copy_extlinks_src-prune h5copy_extlinks_src.h5 --prune --enable-error-stack -TOOLTEST_DUMP tsoftlinks-prune tsoftlinks.h5 --prune --enable-error-stack -TOOLTEST_DUMP textlink-prune textlink.h5 --prune --enable-error-stack -TOOLTEST_DUMP textlinkfar-prune textlinkfar.h5 --prune --enable-error-stack -TOOLTEST_DUMP textlinksrc-prune textlinksrc.h5 --prune --enable-error-stack -TOOLTEST_DUMP textlinktar-prune textlinktar.h5 --prune --enable-error-stack - -TOOLTEST_DUMP h5copy_extlinks_src-mergeprune h5copy_extlinks_src.h5 --merge --prune --enable-error-stack -TOOLTEST_DUMP tsoftlinks-mergeprune tsoftlinks.h5 --merge --prune --enable-error-stack -TOOLTEST_DUMP textlink-mergeprune textlink.h5 --merge --prune --enable-error-stack -### HDFFV-11128 needs fixed to enable the following test -#TOOLTEST_DUMP textlinkfar-mergeprune textlinkfar.h5 --merge --prune --enable-error-stack -### HDFFV-11128 needs fixed to enable the following test -#TOOLTEST_DUMP textlinksrc-mergeprune textlinksrc.h5 --merge --prune --enable-error-stack -### HDFFV-11128 needs fixed to enable the following test -#TOOLTEST_DUMP textlinktar-mergeprune textlinktar.h5 --merge --prune --enable-error-stack -TOOLTEST_DUMP_NO_OPT onion tst_onion_dset_1d.h5 --src-vfd-name onion --src-vfd-info 1 -TOOLTEST_DUMP_NO_OPT onion tst_onion_dset_ext.h5 --src-vfd-name onion --src-vfd-info 1 -TOOLTEST_DUMP_NO_OPT onion tst_onion_objs.h5 --src-vfd-name onion --src-vfd-info 1 - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi - diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in deleted file mode 100644 index a39cd7b967f..00000000000 --- a/tools/test/h5repack/h5repack_plugin.sh.in +++ /dev/null @@ -1,275 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -srcdir=@srcdir@ -TOP_BUILDDIR=@top_builddir@ - -# Determine backward compatibility options enabled -DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@" - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5REPACK=../../src/h5repack/h5repack # The tool name -H5REPACK_BIN=`pwd`/$H5REPACK # The path of the tool binary - -H5DUMP=../../src/h5dump/h5dump # The h5dump tool name -H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary - -nerrors=0 -verbose=yes -exit_code=$EXIT_SUCCESS - -TEST_NAME=ud_plugin -FROM_DIR=`pwd`/.libs -PLUGIN_LIB="$FROM_DIR/libdynlibadd.*" -PLUGIN_LIB2="$FROM_DIR/libdynlibvers.*" -PLUGIN_LIBDIR=testdir3 -RM='rm -rf' - -GREP='grep' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5REPACK_OUTFILES="$SRC_TOOLS/test/h5repack/expected" - -TESTDIR=./tmppl -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5REPACK_TESTFILES/h5repack_layout.h5 -$SRC_H5REPACK_OUTFILES/h5repack_layout.h5-plugin_test.ddl -$SRC_H5REPACK_OUTFILES/plugin_test.h5repack_layout.h5.tst -$SRC_H5REPACK_OUTFILES/h5repack_layout.h5-plugin_version_test.ddl -$SRC_H5REPACK_OUTFILES/plugin_version_test.h5repack_layout.h5.tst -" -#$SRC_H5REPACK_TESTFILES/h5repack_layout.UD.h5 -#$SRC_H5REPACK_OUTFILES/h5repack_layout.UD.h5-plugin_none.ddl -#$SRC_H5REPACK_OUTFILES/plugin_none.h5repack_layout.UD.h5.tst -#" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES" - -# Main Body -# Create test directories if not exists yet. -test -d $PLUGIN_LIBDIR || mkdir -p $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to create test directory($PLUGIN_LIBDIR)" - exit $EXIT_FAILURE -fi - -# copy plugin library for test -$CP $PLUGIN_LIB $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to copy plugin library ($PLUGIN_LIB) for test." - exit $EXIT_FAILURE -fi -$CP $PLUGIN_LIB2 $PLUGIN_LIBDIR -if [ $? != 0 ]; then - echo "Failed to copy plugin library ($PLUGIN_LIB2) for test." - exit $EXIT_FAILURE -fi - -# setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}:${HDF5_PLUGIN_PATH}" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5REPACK_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a $* message left justified in a field of 70 characters -# -MESSAGE() { - SPACES=" " - echo "$* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -VERIFY() { - MESSAGE "Verifying $*" -} - -# This is different from $srcdir/../../../bin/output_filter.sh -STDOUT_FILTER() { - result_file=$1 - tmp_file=/tmp/h5test_tmp_$$ - # Filter name of files. - cp $result_file $tmp_file - sed -e '/^Opening file/d' -e '/^Making file/d' \ - < $tmp_file > $result_file - # cleanup - rm -f $tmp_file -} - -# This runs h5repack comparing output with h5dump output -# from -pH option -# -TOOLTEST_DUMP() -{ - echo $@ - infile=$2 - outfile=out-$1.$2 - expect1="$TESTDIR/$1.$2.tst" - actual1="$TESTDIR/$1.$2.out" - actual1_err="$TESTDIR/$1.$2.err" - expect2="$TESTDIR/$2-$1.ddl" - actual2="$TESTDIR/$2-$1.out" - actual2_err="$TESTDIR/$2-$1.err" - - shift - shift - - # Run test. - TESTING $H5REPACK $@ - ( - cd $TESTDIR - $ENVCMD $H5REPACK_BIN "$@" $infile $outfile - ) >$actual1 2>$actual1_err - RET=$? - STDOUT_FILTER $actual1 - cat $actual1_err >> $actual1 - if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - if cmp -s $expect1 $actual1; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.tst) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect1 $actual1 |sed 's/^/ /' - fi - VERIFY h5dump output -pH $outfile - ( - cd $TESTDIR - $ENVCMD $H5DUMP_BIN -pH $outfile - ) >$actual2 2>$actual2_err - RET=$? - cat $actual2_err >> $actual2 - - if cmp -s $expect2 $actual2; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect2 $actual2 |sed 's/^/ /' - fi - - fi - - - rm -f $actual1 $actual1_err $actual2 $actual2_err - rm -f $outfile -} - -############################################################################## -### T H E T E S T S -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR -version_str=`echo @H5_VERSION@ | awk -F"-" '{print $1}' | sed 's/\./,/g'` - -# Run the test -arg="h5repack_layout.h5 -v -f UD=260,0,4,9,$version_str" -TOOLTEST_DUMP plugin_version_test $arg - -arg="h5repack_layout.h5 -v -f UD=257,0,1,9" -TOOLTEST_DUMP plugin_test $arg - -#arg="h5repack_layout.UD.h5 -v -f NONE" -#TOOLTEST_DUMP plugin_none $arg - -# print results -if test $nerrors -ne 0 ; then - echo "$nerrors errors encountered" - exit_code=$EXIT_FAILURE -else - echo "All Plugin API tests passed." - exit_code=$EXIT_SUCCESS -fi - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -# Clean up temporary files/directories and leave -$RM $PLUGIN_LIBDIR - -exit $exit_code diff --git a/tools/test/h5stat/Makefile.am b/tools/test/h5stat/Makefile.am deleted file mode 100644 index 530c86cd66a..00000000000 --- a/tools/test/h5stat/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -#test script and program -TEST_PROG=h5stat_gentest -TEST_SCRIPT=testh5stat.sh - -check_PROGRAMS=$(TEST_PROG) -check_SCRIPTS=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../src/h5stat/h5stat$(EXEEXT) - -# Tell automake to clean h5redeploy script -CLEANFILES= - -# Temporary files. *.h5 are generated by h5repart_gentest. They should -# copied to the testfiles/ directory if update is required. fst_family*.h5 -# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable. -CHECK_CLEANFILES+=*.h5 ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 - -# These were generated by configure. Remove them only when distclean. -DISTCLEANFILES=testh5stat.sh - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5stat/testh5stat.sh.in b/tools/test/h5stat/testh5stat.sh.in deleted file mode 100644 index b44c43921de..00000000000 --- a/tools/test/h5stat/testh5stat.sh.in +++ /dev/null @@ -1,366 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5stat tool -# - -srcdir=@srcdir@ - -# Determine which filters are available -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=h5stat -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -STAT=../../src/h5stat/h5stat # The tool name -STAT_BIN=`pwd`/$STAT # The path of the tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' -GREP='grep' - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles" -SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles" -SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles" -SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles" -SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles" -SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles" -SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles" -SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" -SRC_H5STAT_OUTFILES="$SRC_TOOLS/test/h5stat/expected" - -TESTDIR=./tmp -test -d $TESTDIR || mkdir $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_HDF5_TEST_FILES=" -$SRC_H5STAT_TESTFILES/h5stat_err_refcount.h5 -$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.h5 -$SRC_H5STAT_TESTFILES/h5stat_err_old_fill.h5 -$SRC_H5STAT_TESTFILES/h5stat_filters.h5 -$SRC_H5STAT_TESTFILES/h5stat_tsohm.h5 -$SRC_H5STAT_TESTFILES/h5stat_newgrat.h5 -$SRC_H5STAT_TESTFILES/h5stat_idx.h5 -$SRC_H5STAT_TESTFILES/h5stat_threshold.h5 -" - -LIST_OTHER_TEST_FILES=" -$SRC_H5STAT_OUTFILES/h5stat_err_refcount.ddl -$SRC_H5STAT_OUTFILES/h5stat_err_old_layout.ddl -$SRC_H5STAT_OUTFILES/h5stat_err_old_fill.ddl -$SRC_H5STAT_OUTFILES/h5stat_help1.ddl -$SRC_H5STAT_OUTFILES/h5stat_help2.ddl -$SRC_H5STAT_OUTFILES/h5stat_notexist.ddl -$SRC_H5STAT_OUTFILES/h5stat_nofile.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters-cache.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters-file.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters-F.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters-d.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters-g.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters-dT.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters-UD.ddl -$SRC_H5STAT_OUTFILES/h5stat_filters-UT.ddl -$SRC_H5STAT_OUTFILES/h5stat_tsohm.ddl -$SRC_H5STAT_OUTFILES/h5stat_newgrat.ddl -$SRC_H5STAT_OUTFILES/h5stat_newgrat-UG.ddl -$SRC_H5STAT_OUTFILES/h5stat_newgrat-UA.ddl -$SRC_H5STAT_OUTFILES/h5stat_idx.ddl -$SRC_H5STAT_OUTFILES/h5stat_links1.ddl -$SRC_H5STAT_OUTFILES/h5stat_links2.ddl -$SRC_H5STAT_OUTFILES/h5stat_links3.ddl -$SRC_H5STAT_OUTFILES/h5stat_links4.ddl -$SRC_H5STAT_OUTFILES/h5stat_links5.ddl -$SRC_H5STAT_OUTFILES/h5stat_dims1.ddl -$SRC_H5STAT_OUTFILES/h5stat_dims2.ddl -$SRC_H5STAT_OUTFILES/h5stat_numattrs1.ddl -$SRC_H5STAT_OUTFILES/h5stat_numattrs2.ddl -$SRC_H5STAT_OUTFILES/h5stat_numattrs3.ddl -$SRC_H5STAT_OUTFILES/h5stat_numattrs4.ddl -" - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5STAT_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -TOOLTEST() { - expect="$TESTDIR/$1" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - shift - - # Run test. - TESTING $STAT $@ - ( - cd $TESTDIR - $RUNSERIAL $STAT_BIN $@ - ) >$actual 2>$actual_err - - # save actual and actual_err in case they are needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - cp $actual_err $actual_err_sav - STDERR_FILTER $actual_err - - if $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - fi -} - - -# Call the h5stat tool and grep for a value -# txttype ERRTXT greps test error output, otherwise greps test output -GREPTEST() -{ - txttype=$1 - expectdata=$2 - expect="$TESTDIR/$3" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.out.err" - shift - shift - shift - if [ "$1" = -i ]; then - inputfile=$2 - fi - - if [ "$3" = -o ]; then - outputfile=$4 - fi - - TESTING $STAT $@ - ( - cd $TESTDIR - $RUNSERIAL $STAT_BIN $@ - ) >$actual 2>$actual_err - RET=$? - - if [ "$txttype" = "ERRTXT" ]; then - $GREP "$expectdata" $actual_err > /dev/null - else - $GREP "$expectdata" $actual > /dev/null - fi - - if [ $? -eq 0 ]; then - echo " PASSED" - else - echo " FAILED" - nerrors="`expr $nerrors + 1`" - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $STAT $@ - echo " -SKIP-" -} - - - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# Test for help flag -TOOLTEST h5stat_help1.ddl -h -TOOLTEST h5stat_help2.ddl --help -# Test when h5stat a file that does not exist -TOOLTEST h5stat_notexist.ddl notexist.h5 -TOOLTEST h5stat_nofile.ddl '' - -# Test file with groups, compressed datasets, user-applied filters, etc. -# h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4 -TOOLTEST h5stat_filters.ddl h5stat_filters.h5 -TOOLTEST h5stat_filters-file.ddl -f h5stat_filters.h5 -TOOLTEST h5stat_filters-F.ddl -F h5stat_filters.h5 -TOOLTEST h5stat_filters-d.ddl -d h5stat_filters.h5 -TOOLTEST h5stat_filters-g.ddl -g h5stat_filters.h5 -TOOLTEST h5stat_filters-dT.ddl -dT h5stat_filters.h5 -TOOLTEST h5stat_filters-UD.ddl -D h5stat_filters.h5 -TOOLTEST h5stat_filters-UT.ddl -T h5stat_filters.h5 -# Test for page buffer cache size option -TOOLTEST h5stat_filters-cache.ddl --page-buffer-size=8192 h5stat_filters.h5 -# -# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c -# as of release 1.8.7-snap0 (on a 64-bit machine) -TOOLTEST h5stat_tsohm.ddl h5stat_tsohm.h5 -# h5stat_newgrat.h5 is generated by h5stat_gentest.c -TOOLTEST h5stat_newgrat.ddl h5stat_newgrat.h5 -TOOLTEST h5stat_newgrat-UG.ddl -G h5stat_newgrat.h5 -TOOLTEST h5stat_newgrat-UA.ddl -A h5stat_newgrat.h5 -# h5stat_idx.h5 is generated by h5stat_gentest.c -TOOLTEST h5stat_idx.ddl h5stat_idx.h5 -# -# Tests for -l (--links) option on h5stat_threshold.h5: -# -l 0 (incorrect threshold value) -# -g -l 8 -# --links=8 -# --links=20 -g -GREPTEST ERRTXT "Invalid threshold for small groups" h5stat_err1_links.ddl -l 0 h5stat_threshold.h5 -TOOLTEST h5stat_links1.ddl -g -l 8 h5stat_threshold.h5 -TOOLTEST h5stat_links2.ddl --links=8 h5stat_threshold.h5 -TOOLTEST h5stat_links3.ddl --links=20 -g h5stat_threshold.h5 -# -# Tests for -l (--links) option on h5stat_newgrat.h5: -# -g -# -g -l 40000 -TOOLTEST h5stat_links4.ddl -g h5stat_newgrat.h5 -TOOLTEST h5stat_links5.ddl -g -l 40000 h5stat_newgrat.h5 -# -# Tests for -m (--dims) option on h5stat_threshold.h5 -# -d --dims=-1 (incorrect threshold value) -# -gd -m 5 -# -d --di=15 -GREPTEST ERRTXT "Invalid threshold for small datasets" h5stat_err1_dims.ddl -d --dims=-1 h5stat_threshold.h5 -TOOLTEST h5stat_dims1.ddl -gd -m 5 h5stat_threshold.h5 -TOOLTEST h5stat_dims2.ddl -d --dims=15 h5stat_threshold.h5 -# -# Tests for -a option on h5stat_threshold.h5 -# -a -2 (incorrect threshold value) -# --numattrs (without threshold value) -# -AS -a 10 -# -a 1 -# -A --numattrs=25 -GREPTEST ERRTXT "Invalid threshold for small # of attributes" h5stat_err1_numattrs.ddl -a -2 h5stat_threshold.h5 -GREPTEST ERRTXT "Invalid threshold for small # of attributes" h5stat_err2_numattrs.ddl --numattrs h5stat_threshold.h5 -TOOLTEST h5stat_numattrs1.ddl -AS -a 10 h5stat_threshold.h5 -TOOLTEST h5stat_numattrs2.ddl -a 1 h5stat_threshold.h5 -TOOLTEST h5stat_numattrs3.ddl -A --numattrs=25 h5stat_threshold.h5 -# -# Tests for -a option on h5stat_newgrat.h5 -# -A -a 100 -TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5 -# -# -# Tests to verify HDFFV-10333 -# h5stat_err_refcount.h5 is generated by h5stat_gentest.c -# h5stat_err_old_layout.h5 and h5stat_err_old_fill.h5: see explanation in h5stat_gentest.c -TOOLTEST h5stat_err_refcount.ddl h5stat_err_refcount.h5 -TOOLTEST h5stat_err_old_layout.ddl h5stat_err_old_layout.h5 -TOOLTEST h5stat_err_old_fill.ddl h5stat_err_old_fill.h5 -# -# -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi - diff --git a/tools/test/misc/Makefile.am b/tools/test/misc/Makefile.am deleted file mode 100644 index e222af2f21a..00000000000 --- a/tools/test/misc/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -SUBDIRS=vds - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib - -#test scripts and programs -TEST_PROG=h5repart_gentest h5clear_gentest talign -TEST_SCRIPT=testh5repart.sh testh5mkgrp.sh testh5clear.sh - -check_PROGRAMS=$(TEST_PROG) repart_test clear_open_chk -check_SCRIPTS=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../src/misc/h5repart$(EXEEXT) ../../src/misc/h5mkgrp$(EXEEXT) ../../src/misc/h5clear$(EXEEXT) - -# Temporary files. *.h5 are generated by h5repart_gentest. They should -# copied to the testfiles/ directory if update is required. fst_family*.h5 -# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable. -CHECK_CLEANFILES+=*.h5 ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 append.log - -# These were generated by configure. Remove them only when distclean. -DISTCLEANFILES=testh5repart.sh testh5clear.sh - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in deleted file mode 100644 index b97509415e2..00000000000 --- a/tools/test/misc/testh5clear.sh.in +++ /dev/null @@ -1,461 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5clear tool -# -srcdir=@srcdir@ -TESTNAME=h5clear -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5CLEAR=../../src/misc/h5clear # The tool name -H5CLEAR_BIN=`pwd`/$H5CLEAR # The path of the tool binary - -OPENCHK=clear_open_chk # Program to check whether the file can be opened -OPENCHK_BIN=`pwd`/$OPENCHK # The path to the binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' -GREP='grep' - -SUCCEED=0 -FAIL=1 - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5CLEAR_TESTFILES="$SRC_TOOLS/test/misc/testfiles" -SRC_H5CLEAR_OUTFILES="$SRC_TOOLS/test/misc/expected" - -TESTDIR=./tmpclr -test -d $TESTDIR || mkdir -p $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES=" -$SRC_H5CLEAR_OUTFILES/h5clear_usage.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_missing_file.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_status_noclose_after_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_noclose_before_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_noclose_after_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_equal_before_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_equal_after_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_greater_before_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_greater_after_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_less_before_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_less_after_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_user_equal_before_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_user_equal_after_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_user_greater_before_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_user_greater_after_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_user_less_before_size.ddl -$SRC_H5CLEAR_OUTFILES/h5clear_user_less_after_size.ddl -$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v0.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v2.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v3.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_log_v3.h5 -$SRC_H5CLEAR_TESTFILES/latest_h5clear_log_v3.h5 -$SRC_H5CLEAR_TESTFILES/latest_h5clear_sec2_v3.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_mdc_image.h5 -$SRC_H5CLEAR_TESTFILES/mod_h5clear_mdc_image.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_status_noclose.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_noclose.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_equal.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_greater.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_less.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_user_equal.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_user_greater.h5 -$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_user_less.h5 -" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5CLEAR_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# -# -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# $1 is the expected output -# $2 is the output from testing -COMPARE_OUT() { - if $CMP $1 $2; then - echo "PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi -} - -# -# -# -# Run h5clear and verify the expected output -# $1: the test file name -# $2: option 1 passed to the tool -# $3: option 2 passed to the tool -# $4: the expected output -TOOLTEST_OUT() { - fname=$1 - option1=$2 - option2=$3 - option3=$4 - expected=$5 - # Prepare expected and actual output - expect="$TESTDIR/$expected" - actual="$TESTDIR/`basename $expected .ddl`.out" - actual_err="$TESTDIR/`basename $expected .ddl`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - - # Run test. - TESTING $H5CLEAR $option1 $option2 $option3 $option4 $fname - ( - cd $TESTDIR - $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $option3 $option4 $fname - ) >$actual 2>$actual_err - cp $actual $actual_sav - cp $actual_err $actual_err_sav - - # Compare output - COMPARE_OUT $expect $actual - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err $actual_sav $actual_err_sav - fi -} -# same as TOOLTEST_OUT just grep stderr -TOOLTEST_ERR() { - fname=$1 - expected=$2 - option1=$3 - option2=$4 - option3=$5 - # Prepare expected and actual output - actual="$TESTDIR/`basename $fname .h5`.out" - actual_err="$TESTDIR/`basename $fname .h5`.out.err" - actual_sav=${actual}-sav - actual_err_sav=${actual_err}-sav - - # Run test. - TESTING $H5CLEAR $option1 $option2 $option3 $option4 $fname - ( - cd $TESTDIR - $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $option3 $option4 $fname - ) >$actual 2>$actual_err - cp $actual $actual_sav - cp $actual_err $actual_err_sav - - # grep output - $GREP "$expected" $actual_err > /dev/null - if test $? -eq 0; then - echo "PASSED" - else - echo "*FAILED*" - echo " Expected text not found in actual result (*.out.err)" - nerrors="`expr $nerrors + 1`" - fi - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err $actual_sav $actual_err_sav - fi -} - -# $1 is the filename to open -# $2 is the expected return from the open/check program -OPEN_CHK() { - fname=$1 - expected=$2 - ( - cd $TESTDIR - $OPENCHK_BIN $fname 2>/dev/null - ) - actual=$? - if test $actual -ne $expected; then - echo "Unexpected return from $OPENCHK" - nerrors=`expr $nerrors + 1` - fi -} - -# Run h5clear and verify the expected exit code -# $1 is the filename to open -# $2 is option 1 -# $3 is option 2 -# $4 is the expected exit code from the tool -TOOLTEST() { - fname=$1 - option1=$2 - option2=$3 - ret_expected=$4 - # - TESTING $H5CLEAR $option1 $option2 $fname - # h5clear $option1 $option2 $fname - ( - cd $TESTDIR - $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname 2>/dev/null 1>/dev/null - ) - if test $? -ne $ret_expected; then - echo "*FAILED*" - nerrors=`expr $nerrors + 1` - else - echo "PASSED" - fi -} - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for testing -COPY_TESTFILES_TO_TESTDIR -# For Cmake -$CP -f $TESTDIR/h5clear_sec2_v0.h5 $TESTDIR/orig_h5clear_sec2_v0.h5 -$CP -f $TESTDIR/h5clear_sec2_v2.h5 $TESTDIR/orig_h5clear_sec2_v2.h5 -$CP -f $TESTDIR/h5clear_sec2_v3.h5 $TESTDIR/orig_h5clear_sec2_v3.h5 -# -# -# -# The following are tests to verify the expected output from h5clear -# "h5clear -h" -# "h5clear" (no options, no file) -# "h5clear junk.h5" (no options, nonexisting file) -# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) -# "h5clear -m" (valid 1 option, no file) -# "h5clear -s junk.h5" (valid 1 option, nonexisting file) -# "h5clear -m -s" (valid 2 options, no file) -# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) -# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) -# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) -TOOLTEST_OUT "" -h "" "" h5clear_usage.ddl -TOOLTEST_OUT "" "" "" "" h5clear_usage.ddl -TOOLTEST_OUT junk.h5 "" "" "" h5clear_usage.ddl -TOOLTEST_OUT orig_h5clear_sec2_v3.h5 "" "" "" h5clear_usage.ddl -TOOLTEST_OUT "" -m "" "" h5clear_missing_file.ddl -TOOLTEST_ERR junk.h5 "h5clear error" -s "" "" -TOOLTEST_OUT "" -m -s "" h5clear_missing_file.ddl -TOOLTEST_ERR junk.h5 "h5clear error" -m -s "" -TOOLTEST_ERR orig_h5clear_sec2_v2.h5 "h5clear warning" -m "" "" -TOOLTEST_ERR orig_h5clear_sec2_v0.h5 "h5clear warning" -s -m "" -# -# -# The following are tests to verify the expected exit code from h5clear: -# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) -# "h5clear --version" (valid option, version #, succeed exit code) -# "h5clear -k" (invalid 1 option, no file, fail exit code) -# "h5clear -k junk.h5" (invalid 1 option, nonexisting file, fail exit code) -# "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code) -# "h5clear -m -k" (valid/invalid 2 options, nofile, fail exit code) -# "h5clear -l -m" (invalid/valid 2 options, nofile, fail exit code) -# "h5clear -m -l junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) -# "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code) -# "h5clear -m -l h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) -# "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code) -TOOLTEST h5clear_mdc_image.h5 -m "" $SUCCEED -TOOLTEST "" --version "" $SUCCEED -TOOLTEST "" -k "" $FAIL -TOOLTEST junk.h5 -k "" $FAIL -TOOLTEST h5clear_sec2_v2.h5 -l "" $FAIL -TOOLTEST "" -m -k $FAIL -TOOLTEST "" -l -m $FAIL -TOOLTEST junk.h5 -m -l $FAIL -TOOLTEST junk.h5 -l -m $FAIL -TOOLTEST h5clear_sec2_v0.h5 -m -l $FAIL -TOOLTEST h5clear_sec2_v0.h5 -l -m $FAIL -# -# -# -# h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: -TOOLTEST_ERR mod_h5clear_mdc_image.h5 "h5clear warning" -m "" "" -TOOLTEST_ERR mod_h5clear_mdc_image.h5 "h5clear warning" -s -m "" -# -# -# -# The following are tests to verify the status_flags field is cleared properly: -OPEN_CHK h5clear_sec2_v3.h5 $FAIL -TOOLTEST h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v3.h5 $SUCCEED -# -OPEN_CHK h5clear_log_v3.h5 $FAIL -TOOLTEST h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK h5clear_log_v3.h5 $SUCCEED -# -OPEN_CHK latest_h5clear_sec2_v3.h5 $FAIL -TOOLTEST latest_h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK latest_h5clear_sec2_v3.h5 $SUCCEED -# -OPEN_CHK latest_h5clear_log_v3.h5 $FAIL -TOOLTEST latest_h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK latest_h5clear_log_v3.h5 $SUCCEED -# -# File open succeeds for the following 2 test files because the -# library does not check status_flags for files with < v3 superblock: -OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED -TOOLTEST h5clear_sec2_v0.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED -# -OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED -TOOLTEST h5clear_sec2_v2.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED -# -# -# -# (1) h5clear_status_noclose.h5 -# "h5clear --filesize h5clear_status_noclose.h5" (unable to open the file because status_flag is on) -# "h5clear -s --increment=0 h5clear_status_noclose.h5" (clear status_flag, EOA = MAX(EOA, EOF) + 0) -# (no output, check exit code) -# "h5clear --filesize h5clear_status_noclose_user.h5" (print EOA/EOF after the last action) -TOOLTEST_ERR h5clear_status_noclose.h5 "h5clear error:" --filesize "" "" -TOOLTEST h5clear_status_noclose.h5 -s --increment=0 $SUCCEED -TOOLTEST_OUT h5clear_status_noclose.h5 --filesize "" "" h5clear_status_noclose_after_size.ddl -# -# (2) h5clear_fsm_persist_noclose.h5 -# "h5clear --filesize h5clear_fsm_persist_noclose.h5" (print EOA/EOF before the next action) -# "h5clear --increment=0 h5clear_fsm_persist_noclose.h5" (EOA = MAX(EOA, EOF)) (no output, check exit code) -# "h5clear --filesize h5clear_fsm_persist_noclose.h5" (print EOA/EOF after the last action) -TOOLTEST_OUT h5clear_fsm_persist_noclose.h5 --filesize "" "" h5clear_noclose_before_size.ddl -TOOLTEST h5clear_fsm_persist_noclose.h5 --increment=0 "" $SUCCEED -TOOLTEST_OUT h5clear_fsm_persist_noclose.h5 --filesize "" "" h5clear_noclose_after_size.ddl -# -# (3) h5clear_fsm_persist_equal.h5 -# "h5clear --filesize h5clear_fsm_persist_equal.h5" (print EOA/EOF before the next action) -# "h5clear --increment h5clear_fsm_persist_equal.h5" (EOA = MAX(EOA, EOF) + 1M) (no output, check exit code) -# "h5clear --filesize h5clear_fsm_persist_equal.h5" (print EOA/EOF after the last action) -TOOLTEST_OUT h5clear_fsm_persist_equal.h5 --filesize "" "" h5clear_equal_before_size.ddl -TOOLTEST h5clear_fsm_persist_equal.h5 --increment "" $SUCCEED -TOOLTEST_OUT h5clear_fsm_persist_equal.h5 --filesize "" "" h5clear_equal_after_size.ddl -# -# (4) h5clear_fsm_persist_greater.h5 -# "h5clear --filesize h5clear_fsm_persist_greater.h5" (print EOA/EOF before the next action) -# "h5clear --increment=0 h5clear_fsm_persist_greater.h5" (EOA = MAX(EOA, EOF) + 0) (no output, check exit code) -# "h5clear --filesize h5clear_fsm_persist_greater.h5" (print EOA/EOF after the last action) -TOOLTEST_OUT h5clear_fsm_persist_greater.h5 --filesize "" "" h5clear_greater_before_size.ddl -TOOLTEST h5clear_fsm_persist_greater.h5 --increment=0 "" $SUCCEED -TOOLTEST_OUT h5clear_fsm_persist_greater.h5 --filesize "" "" h5clear_greater_after_size.ddl -# -# (5) h5clear_fsm_persist_less.h5 -# "h5clear --filesize h5clear_fsm_persist_less.h5" (print EOA/EOF before the next action) -# "h5clear --increment=200 h5clear_fsm_persist_less.h5" (EOA = MAX(EOA, EOF) + 200) (no output, check exit code) -# "h5clear --filesize h5clear_fsm_persist_less.h5" (print EOA/EOF after the last action) -TOOLTEST_OUT h5clear_fsm_persist_less.h5 --filesize "" "" h5clear_less_before_size.ddl -TOOLTEST h5clear_fsm_persist_less.h5 --increment=200 "" $SUCCEED -TOOLTEST_OUT h5clear_fsm_persist_less.h5 --filesize "" "" h5clear_less_after_size.ddl -# -# (6) h5clear_fsm_persist_user_equal.h5 -# "h5clear --filesize h5clear_fsm_persist_user_equal.h5" (print EOA/EOF before the next action) -# "h5clear --increment h5clear_fsm_persist_user_equal.h5" (EOA = MAX(EOA, EOF) + 1M) (no output, check exit code) -# "h5clear --filesize h5clear_fsm_persist_user_equal.h5" (print EOA/EOF after the last action) -TOOLTEST_OUT h5clear_fsm_persist_user_equal.h5 --filesize "" "" h5clear_user_equal_before_size.ddl -TOOLTEST h5clear_fsm_persist_user_equal.h5 --increment "" $SUCCEED -TOOLTEST_OUT h5clear_fsm_persist_user_equal.h5 --filesize "" "" h5clear_user_equal_after_size.ddl -# -# (7) h5clear_fsm_persist_user_greater.h5 -# "h5clear --filesize h5clear_fsm_persist_user_greater.h5" (print EOA/EOF before the next action) -# "h5clear --increment=0 h5clear_fsm_persist_user_greater.h5" (EOA = MAX(EOA, EOF) + 0) (no output, check exit code) -# "h5clear --filesize h5clear_fsm_persist_user_greater.h5" (print EOA/EOF after the last action) -TOOLTEST_OUT h5clear_fsm_persist_user_greater.h5 --filesize "" "" h5clear_user_greater_before_size.ddl -TOOLTEST h5clear_fsm_persist_user_greater.h5 --increment=0 "" $SUCCEED -TOOLTEST_OUT h5clear_fsm_persist_user_greater.h5 --filesize "" "" h5clear_user_greater_after_size.ddl -# -# (8) h5clear_fsm_persist_user_less.h5 -# "h5clear --filesize h5clear_fsm_persist_user_less.h5" (print EOA/EOF before the next action) -# "h5clear --increment=200 h5clear_fsm_persist_user_less.h5" (EOA = MAX(EOA, EOF) + 200) (no output, check exit code) -# "h5clear --filesize h5clear_fsm_persist_user_less.h5" (print EOA/EOF after the last action) -TOOLTEST_OUT h5clear_fsm_persist_user_less.h5 --filesize "" "" h5clear_user_less_before_size.ddl -TOOLTEST h5clear_fsm_persist_user_less.h5 --increment=200 "" $SUCCEED -TOOLTEST_OUT h5clear_fsm_persist_user_less.h5 --filesize "" "" h5clear_user_less_after_size.ddl -# -# -# -# Clean up test files -if test -z "$HDF5_NOCLEANUP"; then - rm -f h5clear_*.h5 latest_h5clear*.h5 -fi -# -# -# -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors error(s)." - exit $EXIT_FAILURE -fi diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in deleted file mode 100644 index 297f89f9f19..00000000000 --- a/tools/test/misc/testh5mkgrp.sh.in +++ /dev/null @@ -1,321 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5mkgrp tool -# - -srcdir=@srcdir@ - -TESTNAME=h5mkgrp -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -H5MKGRP=../../src/misc/h5mkgrp # The tool name -H5MKGRP_BIN=`pwd`/$H5MKGRP # The path of the tool binary -H5LS=../../src/h5ls/h5ls # The h5ls tool name -H5LS_ARGS=-vr # Arguments to the h5ls tool -H5LS_BIN=`pwd`/$H5LS # The path of the h5ls tool binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -# testfiles source dirs for tools -SRC_H5MKGRP_TESTFILES="$SRC_TOOLS/test/misc/testfiles" -SRC_H5MKGRP_OUTFILES="$SRC_TOOLS/test/misc/expected" - -TESTDIR=./tmpmkg -test -d $TESTDIR || mkdir -p $TESTDIR - -###################################################################### -# test files -# -------------------------------------------------------------------- -# All the test files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# Any test files from other tools can be used in this framework. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES=" -$SRC_H5MKGRP_OUTFILES/h5mkgrp_help.txt -$SRC_H5MKGRP_OUTFILES/h5mkgrp_single.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_single_v.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_single_p.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_single_l.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_several.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_several_v.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_several_p.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_several_l.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_nested_p.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_nested_lp.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_nested_mult_p.ls -$SRC_H5MKGRP_OUTFILES/h5mkgrp_nested_mult_lp.ls -" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5MKGRP_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -TESTING() -{ - SPACES=" " - echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' -} - -# Source in the output filter function definitions. -. $srcdir/../../../bin/output_filter.sh - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Verifying". -# -VERIFY_H5LS() -{ - SPACES=" " - echo "Verifying h5ls file structure $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Run a test and print PASS or *FAIL*. If h5mkgrp can complete -# with exit status 0, consider it pass. If a test fails then increment -# the `nerrors' global variable. -# Assumed arguments: -# $* arguments for h5mkgrp. - -TOOLTEST() -{ - TESTING $H5MKGRP $@ - ( - cd $TESTDIR - $RUNSERIAL $H5MKGRP_BIN $@ - ) > output.out - RET=$? - - if [ $RET != 0 ]; then - echo "*FAILED*" - echo "failed result is:" - cat output.out - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f output.out - fi - fi -} - -# Call the h5ls tool to verify the correct output data in the destination file -# -H5LSTEST() -{ - expect="$TESTDIR/`basename $1 .h5`.ls" - actual="$TESTDIR/`basename $1 .h5`.out" - actual_sav=${actual}-sav - - # Stderr is included in stdout so that the diff can detect - # any unexpected output from that stream too. - VERIFY_H5LS $@ - ( - cd $TESTDIR - $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@ - ) 2>&1 |sed 's/Modified:.*/Modified: XXXX-XX-XX XX:XX:XX XXX/' >$actual - - # save actual in case it is needed later. - cp $actual $actual_sav - STDOUT_FILTER $actual - STDERR_FILTER $actual - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ls) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.ls) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_sav - fi -} - -# Single run of tool -# -# Assumed arguments: -# $1 is test file name -# $2 is h5mkgrp options -# $* are groups to create -RUNTEST() -{ - FILEOUT=$1 - shift - H5MKGRP_ARGS=$1 - shift - - # Remove any output file left over from previous test run - rm -f $FILEOUT - - # Run test - TOOLTEST $H5MKGRP_ARGS $FILEOUT $@ - - # Verify that the file created above is correct - H5LSTEST $FILEOUT - - # Remove output file created, if the "no cleanup" environment variable is - # not defined - if test -z "$HDF5_NOCLEANUP"; then - rm -f $TESTDIR/$FILEOUT - fi -} - -# Single run of tool -# -# Assumed arguments: -# $1 is test expected output file -# $2 is h5mkgrp options -# $* are groups to create -CMPTEST() -{ - FILEOUT=$1 - expect="$TESTDIR/`basename $1 .h5`.txt" - actual="$TESTDIR/`basename $1 .h5`.out" - actual_err="$TESTDIR/`basename $1 .h5`.err" - shift - - # Stderr is included in stdout so that the diff can detect - # any unexpected output from that stream too. - TESTING $H5MKGRP $@ - ( - cd $TESTDIR - $RUNSERIAL $H5MKGRP_BIN $@ - ) >$actual 2>$actual_err - cat $actual_err >> $actual - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.txt) missing" - nerrors="`expr $nerrors + 1`" - elif $CMP $expect $actual; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.txt) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi - - # Clean up output file - if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err - fi -} - -############################################################################## -### T H E T E S T S ### -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# Check that help & version is displayed properly -CMPTEST h5mkgrp_help.h5 "-h" -#CMPTEST h5mkgrp_version.h5 "-V" - -# Create single group at root level -RUNTEST h5mkgrp_single.h5 " " single -RUNTEST h5mkgrp_single_v.h5 "-v" single -RUNTEST h5mkgrp_single_p.h5 "-p" single -RUNTEST h5mkgrp_single_l.h5 "-l" latest - -# Create several groups at root level -RUNTEST h5mkgrp_several.h5 " " one two -RUNTEST h5mkgrp_several_v.h5 "-v" one two -RUNTEST h5mkgrp_several_p.h5 "-p" one two -RUNTEST h5mkgrp_several_l.h5 "-l" one two - -# Create various nested groups -RUNTEST h5mkgrp_nested_p.h5 "-p" /one/two -RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two -RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four -RUNTEST h5mkgrp_nested_mult_lp.h5 "-lp" /one/two /three/four - -# Clean up temporary files/directories -CLEAN_TESTFILES_AND_TESTDIR - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/misc/testh5repart.sh.in b/tools/test/misc/testh5repart.sh.in deleted file mode 100644 index e101b088067..00000000000 --- a/tools/test/misc/testh5repart.sh.in +++ /dev/null @@ -1,196 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# Tests for the h5repart tool - -srcdir=@srcdir@ - -TESTNAME=h5repart -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -REPART=../../src/misc/h5repart # The tool name -REPART_BIN=`pwd`/$REPART # The path of the tool binary - -REPARTED_FAM=repart_test # The test name -REPARTED_FAM_BIN=`pwd`/$REPARTED_FAM # The path of the test binary - -RM='rm -rf' -CMP='cmp -s' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 -verbose=yes - -# source dirs -SRC_TOOLS="$srcdir/../.." - -SRC_H5REPART_TESTFILES="$SRC_TOOLS/test/misc/testfiles" - -TESTDIR=./tmprp -test -d $TESTDIR || mkdir -p $TESTDIR - -# -# copy test files and expected output files from source dirs to test dir -# -COPY_TESTFILES=" -$SRC_H5REPART_TESTFILES/family_file00000.h5 -$SRC_H5REPART_TESTFILES/family_file00001.h5 -$SRC_H5REPART_TESTFILES/family_file00002.h5 -$SRC_H5REPART_TESTFILES/family_file00003.h5 -$SRC_H5REPART_TESTFILES/family_file00004.h5 -$SRC_H5REPART_TESTFILES/family_file00005.h5 -$SRC_H5REPART_TESTFILES/family_file00006.h5 -$SRC_H5REPART_TESTFILES/family_file00007.h5 -$SRC_H5REPART_TESTFILES/family_file00008.h5 -$SRC_H5REPART_TESTFILES/family_file00009.h5 -$SRC_H5REPART_TESTFILES/family_file00010.h5 -$SRC_H5REPART_TESTFILES/family_file00011.h5 -$SRC_H5REPART_TESTFILES/family_file00012.h5 -$SRC_H5REPART_TESTFILES/family_file00013.h5 -$SRC_H5REPART_TESTFILES/family_file00014.h5 -$SRC_H5REPART_TESTFILES/family_file00015.h5 -$SRC_H5REPART_TESTFILES/family_file00016.h5 -$SRC_H5REPART_TESTFILES/family_file00017.h5 -" - -COPY_TESTFILES_TO_TESTDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_TESTFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_TESTFILES_AND_TESTDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=$SRC_H5REPART_TESTFILES - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $TESTDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# Run a test and print PASS or *FAIL*. If a test fails then increment -# the `nerrors' global variable. -# -TOOLTEST() { - # Run tool test. - TESTING $REPART $@ - ( -# echo - cd $TESTDIR - $RUNSERIAL $REPART_BIN $@ - ) - - if test $? -eq 0; then - echo " PASSED" - else - echo " FAILED" - nerrors=`expr $nerrors + 1` - fi -} - -OUTPUTTEST() { - # Run test program. - TESTING $REPARTED_FAM $@ - ( - cd $TESTDIR - $RUNSERIAL $REPARTED_FAM_BIN $@ - ) - - if test $? -eq 0; then - echo " PASSED" - else - echo " FAILED" - nerrors=`expr $nerrors + 1` - fi -} - -# Print a "SKIP" message -SKIP() { - TESTING $REPART $@ - echo " -SKIP-" -} - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## -# prepare for test -COPY_TESTFILES_TO_TESTDIR - -# repartition family member size to 20,000 bytes. -TOOLTEST -m 20000 family_file%05d.h5 fst_family%05d.h5 -# repartition family member size to 5 KB. -TOOLTEST -m 5k family_file%05d.h5 scd_family%05d.h5 -# convert family file to single file of 20,000 bytes -TOOLTEST -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5 -# convert family file to single file of 20,000 bytes (old argument) -TOOLTEST -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5 - -# test the output files repartitioned above. -OUTPUTTEST -echo - -# Clean up output file -CLEAN_TESTFILES_AND_TESTDIR - -if test -z "$HDF5_NOCLEANUP"; then - cd $actual_dir - rm -f fst_family*.h5 scd_family*.h5 family_to_single.h5 family_to_sec2.h5 -fi - -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/tools/test/misc/vds/Makefile.am b/tools/test/misc/vds/Makefile.am deleted file mode 100644 index f2cc259e634..00000000000 --- a/tools/test/misc/vds/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/tools/test/misc/vds - -#test scripts and programs -TEST_PROG=UC_1_one_dim_gen UC_2_two_dims_gen UC_3_gaps_gen UC_4_printf_gen \ - UC_5_stride_gen - -check_PROGRAMS=$(TEST_PROG) - -# Temporary files. -CHECK_CLEANFILES+=*.h5 - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/tools/test/perform/Makefile.am b/tools/test/perform/Makefile.am deleted file mode 100644 index 14755ca46f0..00000000000 --- a/tools/test/perform/Makefile.am +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# HDF5 Library Performance Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib - -# Some programs are not built or run by default, but can be built by hand or by -# specifying --enable-build-all at configure time. -# Also, some of these programs should only be built in parallel. -# Currently there is no such program. -if BUILD_PARALLEL_CONDITIONAL - PARA_BUILD_ALL= -endif -if BUILD_ALL_CONDITIONAL - BUILD_ALL_PROGS=$(PARA_BUILD_ALL) -endif - -# Define programs that will be run in 'make check' -# List them in the order they should be run. -# Parallel test programs. -if BUILD_PARALLEL_CONDITIONAL - TEST_PROG_PARA= -endif -# Serial test programs. -TEST_PROG = iopipe chunk chunk_cache overhead zip_perf perf_meta $(BUILD_ALL_PROGS) - -# check_PROGRAMS will be built but not installed. Do not any executable -# that is in bin_PROGRAMS already. Otherwise, it will be removed twice in -# "make clean" and some systems, e.g., AIX, do not like it. -check_PROGRAMS= $(TEST_PROG) $(BUILD_ALL_PROGS) - -# These are the files that `make clean' (and derivatives) will remove from -# this directory. -CLEANFILES=*.h5 *.raw *.dat x-gnuplot perftest.out - -# All of the programs depend on the main hdf5 library, and some of them -# depend on test or tools library. -LDADD=$(LIBHDF5) -iopipe_LDADD=$(LIBH5TEST) $(LIBHDF5) -zip_perf_LDADD=$(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5) -perf_meta_LDADD=$(LIBH5TEST) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/utils/Makefile.am b/utils/Makefile.am deleted file mode 100644 index 740f5c36fbf..00000000000 --- a/utils/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# Utils HDF5 Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -CONFIG=ordered - -if BUILD_TESTS_CONDITIONAL - TESTUTIL_DIR =test -else - TESTUTIL_DIR= -endif - -if MIRROR_VFD_CONDITIONAL - MIRROR_VFD_DIR = mirror_vfd -else - MIRROR_VFD_DIR= -endif - -if BUILD_TOOLS_CONDITIONAL - TOOLS_DIR =tools -else - TOOLS_DIR= -endif - -# All subdirectories -SUBDIRS=$(MIRROR_VFD_DIR) $(TESTUTIL_DIR) $(TOOLS_DIR) - -bin_SCRIPTS = subfiling_vfd/h5fuse - -include $(top_srcdir)/config/conclude.am diff --git a/utils/mirror_vfd/Makefile.am b/utils/mirror_vfd/Makefile.am deleted file mode 100644 index f263c4e73b0..00000000000 --- a/utils/mirror_vfd/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -AM_CPPFLAGS+=-I$(top_srcdir)/src - -bin_PROGRAMS = mirror_server mirror_server_stop - -mirror_server_SOURCES = mirror_server.c mirror_writer.c mirror_remote.c -#mirror_writer_SOURCES = mirror_writer.c mirror_remote.c - -# All programs depend on the hdf5 library -LDADD=$(LIBHDF5) - -include $(top_srcdir)/config/conclude.am diff --git a/utils/test/Makefile.am b/utils/test/Makefile.am deleted file mode 100644 index 43a8d6109b7..00000000000 --- a/utils/test/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src and tools/lib directories -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib -I$(top_srcdir)/utils/test - -# These are our main targets, the tools - -noinst_PROGRAMS=swmr_check_compat_vfd - -# Programs all depend on the hdf5 library, the tools library, and the HL -# library. -LDADD=$(LIBH5TEST) $(LIBHDF5) - -CHECK_CLEANFILES+=*.h5 - -include $(top_srcdir)/config/conclude.am diff --git a/utils/tools/Makefile.am b/utils/tools/Makefile.am deleted file mode 100644 index 0c89aff24f9..00000000000 --- a/utils/tools/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# Tools HDF5 Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -if PARALLEL_TOOLS_CONDITIONAL - H5DWALK=h5dwalk -else - H5DWALK= -endif - -if BUILD_TESTS_CONDITIONAL - TESTSERIAL_DIR =test -else - TESTSERIAL_DIR= -endif - -CONFIG=ordered - -# All subdirectories -SUBDIRS=$(H5DWALK) $(TESTSERIAL_DIR) - -include $(top_srcdir)/config/conclude.am diff --git a/utils/tools/h5dwalk/Makefile.am b/utils/tools/h5dwalk/Makefile.am deleted file mode 100644 index 34cdb32d5f0..00000000000 --- a/utils/tools/h5dwalk/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib $(H5DWALK_CPPFLAGS) - -# These are our main targets, the tools -# h5dwalk_SOURCES=h5dwalk.c $(TOOLSOURCES) -bin_PROGRAMS=h5dwalk -#bin_SCRIPTS=install-examples - -# Add h5stat specific linker flags here -h5dwalk_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) $(H5DWALK_LDFLAGS) - -# Tell automake to clean h5redeploy script -CLEANFILES= - -# All programs rely on hdf5 library and h5tools library -h5dwalk_LDADD=$(LIBH5TOOLS) $(LIBHDF5) $(H5DWALK_LIBS) - -include $(top_srcdir)/config/conclude.am diff --git a/utils/tools/test/Makefile.am b/utils/tools/test/Makefile.am deleted file mode 100644 index 88104f201d7..00000000000 --- a/utils/tools/test/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -## -# -# Tools HDF5 Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -if PARALLEL_TOOLS_CONDITIONAL - H5DWALK=h5dwalk -else - H5DWALK= -endif - -CONFIG=ordered - -# All subdirectories -SUBDIRS=$(H5DWALK) - -include $(top_srcdir)/config/conclude.am diff --git a/utils/tools/test/h5dwalk/Makefile.am b/utils/tools/test/h5dwalk/Makefile.am deleted file mode 100644 index c32dd0fdf35..00000000000 --- a/utils/tools/test/h5dwalk/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -## -## Makefile.am -## Run automake to generate a Makefile.in from this file. -# -# HDF5 Library Makefile(.in) -# - -include $(top_srcdir)/config/commence.am - -# Include src directory -AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib - -install-examples: - @echo "Creating demo files" && \ - . copy_demo_files.sh $(top_srcdir)/src - -bin_SCRIPTS:install-examples - -#test script and program -TEST_SCRIPT=testh5dwalk.sh copy_demo_files.sh -check_SCRIPTS=$(TEST_SCRIPT) -SCRIPT_DEPEND=../../h5dwalk/h5dwalk$(EXEEXT) - -# Tell automake to clean h5redeploy script -CLEANFILES= - -# These were generated by configure. Remove them only when distclean. -DISTCLEANFILES=testh5dwalk.sh copy_demo_files.sh - -# All programs rely on hdf5 library and h5tools library -LDADD=$(LIBH5TOOLS) $(LIBHDF5) - -include $(top_srcdir)/config/conclude.am