From f864953abdc47d61fb4331288328ab76a05faf2c Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 14 Jun 2023 17:47:50 +0100 Subject: [PATCH 01/69] Bump required C++ standard to 17 --- CMakeLists.txt | 2 +- README.md | 2 +- manual/sphinx/user_docs/installing.rst | 4 ++-- manual/sphinx/user_docs/quickstart.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26ed0f00bb..ff40d756ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -461,7 +461,7 @@ set(CONFIG_LDFLAGS "${CONFIG_LDFLAGS} -L\$BOUT_LIB_PATH -lbout++") set(BOUT_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/include") set(CONFIG_CFLAGS "${CONFIG_CFLAGS} -I\${BOUT_INCLUDE_PATH} -I${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CXX_FLAGS}") -target_compile_features(bout++ PUBLIC cxx_std_14) +target_compile_features(bout++ PUBLIC cxx_std_17) set_target_properties(bout++ PROPERTIES CXX_EXTENSIONS OFF) # Optional compiler features diff --git a/README.md b/README.md index 35e5fba02c..5e2cd4a0d2 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Homepage found at [http://boutproject.github.io/](http://boutproject.github.io/) BOUT++ needs the following: -* A C++14 compiler +* A C++17 compiler * MPI * NetCDF diff --git a/manual/sphinx/user_docs/installing.rst b/manual/sphinx/user_docs/installing.rst index 28c03b6730..e7e3a1509a 100644 --- a/manual/sphinx/user_docs/installing.rst +++ b/manual/sphinx/user_docs/installing.rst @@ -124,7 +124,7 @@ Installing dependencies The bare-minimum requirements for compiling and running BOUT++ are: -#. A C++ compiler that supports C++14 +#. A C++ compiler that supports C++17 #. An MPI compiler such as OpenMPI (`www.open-mpi.org/ `__), MPICH ( `https://www.mpich.org/ `__) @@ -140,7 +140,7 @@ FFTW-3, these options will not be available. .. note:: If you use an Intel compiler, you must also make sure that you have - a version of GCC that supports C++14 (GCC 5+). + a version of GCC that supports C++17 (GCC 8+). On supercomputers, or in other environments that use a module system, you may need to load modules for both Intel and GCC. diff --git a/manual/sphinx/user_docs/quickstart.rst b/manual/sphinx/user_docs/quickstart.rst index ed736130cc..93e144daf3 100644 --- a/manual/sphinx/user_docs/quickstart.rst +++ b/manual/sphinx/user_docs/quickstart.rst @@ -17,7 +17,7 @@ the following tools and libraries: * ``git`` (>= 2.x) * `CMake `_ -* a C++-14 compiler (for example, GCC >= 5.0) +* a C++-17 compiler (for example, GCC >= 8.0) * an ``MPI`` implementation (for example OpenMPI or MPICH) * The `NetCDF C library `__ From f3b6992cb9f29d34af0bc97fd30845bdfe340c03 Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 13 Sep 2023 10:25:29 +0200 Subject: [PATCH 02/69] Prefer dnf5 dnf5 is faster, and is sufficiently feature complete for our needs --- .ci_fedora.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index 1a3d2d92b2..13bcd3b33f 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -39,9 +39,9 @@ then echo "install_weak_deps=False" >> /etc/dnf/dnf.conf time dnf -y install dnf5-plugins python3-pip cmake # Allow to override packages - see #2073 - time dnf copr enable -y davidsch/fixes4bout || : - time dnf -y upgrade - time dnf -y builddep bout++ + time dnf5 copr enable -y davidsch/fixes4bout || : + time dnf5 -y upgrade + time dnf5 -y builddep bout++ useradd test cp -a /tmp/BOUT-dev /home/test/ chown -R test /home/test From 5986581a9813489d31447a43fc355bec47c3ffbe Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 13 Sep 2023 14:30:04 +0200 Subject: [PATCH 03/69] Change default to rawhide This is what is tested in CI --- .ci_fedora.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index 13bcd3b33f..be369e0814 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -19,7 +19,7 @@ then cmd="sudo docker" fi test . != ".$2" && mpi="$2" || mpi=openmpi - test . != ".$3" && version="$3" || version=latest + test . != ".$3" && version="$3" || version=rawhide time $cmd pull registry.fedoraproject.org/fedora:$version time $cmd create --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \ --name mobydick registry.fedoraproject.org/fedora:$version \ From f5e90c806316959760d1eccdf8dcd557a8a1cf4c Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 13 Sep 2023 14:30:34 +0200 Subject: [PATCH 04/69] Ensure submodules are present for local testing --- .ci_fedora.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index be369e0814..154f5d1cb4 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -15,6 +15,8 @@ then # 3. docker start -a mobydick <=> start to run the container (initialized with docker-cp) if test $1 = podman ; then cmd=podman + # For the use of testing + git submodule update --init # --recursive else cmd="sudo docker" fi From 3de5e26f5c1205a18fa2d472bace4d0bdeb52c80 Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 13 Sep 2023 14:30:51 +0200 Subject: [PATCH 05/69] Default to current working directory --- .ci_fedora.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index 154f5d1cb4..bab7b5f5aa 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -26,7 +26,7 @@ then time $cmd create --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \ --name mobydick registry.fedoraproject.org/fedora:$version \ /tmp/BOUT-dev/.ci_fedora.sh $mpi - time $cmd cp ${TRAVIS_BUILD_DIR} mobydick:/tmp + time $cmd cp ${TRAVIS_BUILD_DIR:-$(pwd)} mobydick:/tmp/BOUT-dev time $cmd start -a mobydick exit 0 fi From a573c82aa91d6f2df58804a487faa73d314b4dfd Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 13 Sep 2023 14:32:00 +0200 Subject: [PATCH 06/69] Switch to fedora packes Should be faster and more consistent --- .ci_fedora.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index bab7b5f5aa..525b01e955 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -39,7 +39,8 @@ then cat /etc/os-release # Ignore weak depencies echo "install_weak_deps=False" >> /etc/dnf/dnf.conf - time dnf -y install dnf5-plugins python3-pip cmake + time dnf -y install dnf5 + time dnf5 -y install dnf5-plugins cmake python3-zoidberg python3-natsort # Allow to override packages - see #2073 time dnf5 copr enable -y davidsch/fixes4bout || : time dnf5 -y upgrade @@ -51,7 +52,6 @@ then sudo -u test ${0/\/tmp/\/home\/test} $mpi ## If we are called as normal user, run test else - pip install --user zoidberg natsort . /etc/profile.d/modules.sh module load mpi/${1}-x86_64 export OMPI_MCA_rmaps_base_oversubscribe=yes From 7d3fa7cd30f12ae808e08e553db040b875c38437 Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 15 Sep 2023 14:43:36 +0200 Subject: [PATCH 07/69] CI: switch to mpich to workaround openmpi issue --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da209d6595..fd19d3cc09 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -194,7 +194,7 @@ jobs: with: submodules: true - name: Build Fedora rawhide - run: ./.ci_fedora.sh setup openmpi rawhide + run: ./.ci_fedora.sh setup mpich rawhide shell: bash env: TRAVIS_BUILD_DIR: ${{ github.workspace }} From 2b4cc3e6b3e2b3a844010ef073d6292d7d758711 Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 22 Sep 2023 14:57:06 +0200 Subject: [PATCH 08/69] Switch back to openmpi --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fd19d3cc09..da209d6595 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -194,7 +194,7 @@ jobs: with: submodules: true - name: Build Fedora rawhide - run: ./.ci_fedora.sh setup mpich rawhide + run: ./.ci_fedora.sh setup openmpi rawhide shell: bash env: TRAVIS_BUILD_DIR: ${{ github.workspace }} From 1ec4255f302042e82f95610556a20fc4c8cb9bfd Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 22 Sep 2023 14:57:22 +0200 Subject: [PATCH 09/69] Also give a backtrace if we are hitting a bus error --- src/bout++.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bout++.cxx b/src/bout++.cxx index 7d7b38b947..127cb6ff4a 100644 --- a/src/bout++.cxx +++ b/src/bout++.cxx @@ -218,6 +218,7 @@ namespace experimental { void setupSignalHandler(SignalHandler signal_handler) { #if BOUT_USE_SIGNAL std::signal(SIGSEGV, signal_handler); + std::signal(SIGBUS, signal_handler); #endif #if BOUT_USE_SIGFPE std::signal(SIGFPE, signal_handler); From 1d49f98f44a7a2c80f2016077eb1a8c554b88b04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:00:32 +0000 Subject: [PATCH 10/69] Bump externalpackages/boututils from `c2e97a2` to `433995f` Bumps [externalpackages/boututils](https://github.com/boutproject/boututils) from `c2e97a2` to `433995f`. - [Release notes](https://github.com/boutproject/boututils/releases) - [Commits](https://github.com/boutproject/boututils/compare/c2e97a226a8a7728b8f5085792f7744484943512...433995f7c27cea912eb2cc6c02893e351635229e) --- updated-dependencies: - dependency-name: externalpackages/boututils dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- externalpackages/boututils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externalpackages/boututils b/externalpackages/boututils index c2e97a226a..433995f7c2 160000 --- a/externalpackages/boututils +++ b/externalpackages/boututils @@ -1 +1 @@ -Subproject commit c2e97a226a8a7728b8f5085792f7744484943512 +Subproject commit 433995f7c27cea912eb2cc6c02893e351635229e From ba822e78336030fafdfd5e06215a7ffe8d7e2cfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:00:42 +0000 Subject: [PATCH 11/69] Bump codecov/codecov-action from 1 to 3 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v1...v3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da209d6595..f9bbabb6b3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -182,7 +182,7 @@ jobs: - name: Upload coverage if: ${{ matrix.config.name == 'Coverage' }} - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 Fedora: # This is its own job as it doesn't use most of the steps of the From 462fe41720f511c755bd107b00adcc32b2d2a341 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:00:48 +0000 Subject: [PATCH 12/69] Bump actions/checkout from 2 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/black-fix.yml | 2 +- .github/workflows/clang-format.yml | 2 +- .github/workflows/clang-tidy-review.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/python-package.yml | 6 +++--- .github/workflows/tests.yml | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/black-fix.yml b/.github/workflows/black-fix.yml index 5c95bc9261..4cbd3d7f5d 100644 --- a/.github/workflows/black-fix.yml +++ b/.github/workflows/black-fix.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 7d5c01a821..fce127e262 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: # Checkout the pull request branch, also include all history - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} fetch-depth: 0 diff --git a/.github/workflows/clang-tidy-review.yml b/.github/workflows/clang-tidy-review.yml index 24e87cd447..8ab3e2f68d 100644 --- a/.github/workflows/clang-tidy-review.yml +++ b/.github/workflows/clang-tidy-review.yml @@ -17,7 +17,7 @@ jobs: review: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index dda81cd8fc..4c37783ddb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -52,7 +52,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f3edfaca69..b6b01bf77c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -17,7 +17,7 @@ jobs: if: always() steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true @@ -57,7 +57,7 @@ jobs: if: always() steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true @@ -106,7 +106,7 @@ jobs: if: always() steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da209d6595..7e8ca2d8bd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -143,7 +143,7 @@ jobs: liblapack-dev libparpack2-dev - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true @@ -190,7 +190,7 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true - name: Build Fedora rawhide From 14326b1481ce018a878420f52d97d579305a4713 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:00:55 +0000 Subject: [PATCH 13/69] Bump docker/metadata-action Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 to 879dcbb708d40f8b8679d4f7941b938a086e23a7. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7...879dcbb708d40f8b8679d4f7941b938a086e23a7) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index dda81cd8fc..08a57ffee6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -63,7 +63,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@879dcbb708d40f8b8679d4f7941b938a086e23a7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} flavor: | From bffe9230bcde7c05c94a036abbac818ba58e1adb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:01:01 +0000 Subject: [PATCH 14/69] Bump actions/cache from 2 to 3 Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da209d6595..5918bff773 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -154,7 +154,7 @@ jobs: echo ~/.local/bin >> $GITHUB_PATH - name: Cache SUNDIALS build - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /home/runner/local key: bout-sundials-${{ matrix.config.os }}${{ matrix.config.build_petsc }} From 2aa8a16f7c910a7b59f27682c7b61338140c5723 Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 6 Oct 2023 09:14:15 +0200 Subject: [PATCH 15/69] Try disabeling PETSc --- .ci_fedora.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index 525b01e955..b920a76548 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -60,7 +60,7 @@ else cd cd BOUT-dev echo "starting configure" - time cmake -S . -B build -DBOUT_USE_PETSC=ON + time cmake -S . -B build -DBOUT_USE_PETSC=OFF time make -C build build-check -j 2 time make -C build check fi From 63f8243cce9fe53b151bf14a7b82396eba3fb2ca Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 6 Oct 2023 10:08:08 +0200 Subject: [PATCH 16/69] CI: Reenable petsc --- .ci_fedora.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index b920a76548..525b01e955 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -60,7 +60,7 @@ else cd cd BOUT-dev echo "starting configure" - time cmake -S . -B build -DBOUT_USE_PETSC=OFF + time cmake -S . -B build -DBOUT_USE_PETSC=ON time make -C build build-check -j 2 time make -C build check fi From 6651addec69899e65cde4a2d272ee22d7c04f6ca Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 6 Oct 2023 10:09:59 +0200 Subject: [PATCH 17/69] CI: Use more system packages --- .ci_fedora.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index 525b01e955..5b62228092 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -60,7 +60,12 @@ else cd cd BOUT-dev echo "starting configure" - time cmake -S . -B build -DBOUT_USE_PETSC=ON + time cmake -S . -B build -DBOUT_USE_PETSC=ON \ + -DBOUT_UPDATE_GIT_SUBMODULE=OFF \ + -DBOUT_USE_SYSTEM_FMT=ON \ + -DBOUT_USE_SYSTEM_MPARK_VARIANT=ON \ + -DBOUT_USE_SUNDIALS=ON + time make -C build build-check -j 2 time make -C build check fi From 320b88c7882f46b5b1dd17836581941ef882e0b2 Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 6 Oct 2023 11:18:05 +0200 Subject: [PATCH 18/69] Do not try to print KSPConvergedReason --- src/invert/laplace/impls/petsc/petsc_laplace.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invert/laplace/impls/petsc/petsc_laplace.cxx b/src/invert/laplace/impls/petsc/petsc_laplace.cxx index 1df560f288..d125b90694 100644 --- a/src/invert/laplace/impls/petsc/petsc_laplace.cxx +++ b/src/invert/laplace/impls/petsc/petsc_laplace.cxx @@ -856,7 +856,7 @@ FieldPerp LaplacePetsc::solve(const FieldPerp& b, const FieldPerp& x0) { if (reason <= 0) { throw BoutException( "petsc_laplace: inversion failed to converge. KSPConvergedReason: {} ({})", - KSPConvergedReasons[reason], reason); + KSPConvergedReasons[reason], static_cast(reason)); } // Add data to FieldPerp Object From 12ef939b0799392d7f7871ef5a467294097f87ab Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 6 Oct 2023 11:27:09 +0200 Subject: [PATCH 19/69] Cast reason to int for formatting --- src/invert/laplace/impls/petsc3damg/petsc3damg.cxx | 2 +- src/solver/impls/imex-bdf2/imex-bdf2.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx index 24d61af783..633e938ccc 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx @@ -267,7 +267,7 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { if (reason <= 0) { throw BoutException( "Petsc3dAmg: inversion failed to converge. KSPConvergedReason: {} ({})", - KSPConvergedReasons[reason], reason); + KSPConvergedReasons[reason], static_cast(reason)); } // Create field from result diff --git a/src/solver/impls/imex-bdf2/imex-bdf2.cxx b/src/solver/impls/imex-bdf2/imex-bdf2.cxx index 11954d331a..d8515660ea 100644 --- a/src/solver/impls/imex-bdf2/imex-bdf2.cxx +++ b/src/solver/impls/imex-bdf2/imex-bdf2.cxx @@ -1228,17 +1228,17 @@ PetscErrorCode IMEXBDF2::solve_implicit(BoutReal curtime, BoutReal gamma) { KSPGetConvergedReason(ksp, &kreason); if (kreason < 0) { if (verbose) { - output << "KSP Failed to converge with reason " << kreason << endl; + output << "KSP Failed to converge with reason " << static_cast(kreason) << endl; } linear_fails++; } else { nonlinear_fails++; if (verbose) { - output << "KSP Succeeded with reason " << kreason << endl; + output << "KSP Succeeded with reason " << static_cast(kreason) << endl; } }; if (verbose) { - output << "SNES failed to converge with reason " << reason << endl; + output << "SNES failed to converge with reason " << static_cast(reason) << endl; } throw PetscLib::SNESFailure(snesUse); } From 3184fe185d865594f37aee897b981e7839d80c27 Mon Sep 17 00:00:00 2001 From: dschwoerer Date: Fri, 6 Oct 2023 09:29:19 +0000 Subject: [PATCH 20/69] Apply clang-format changes --- src/solver/impls/imex-bdf2/imex-bdf2.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/solver/impls/imex-bdf2/imex-bdf2.cxx b/src/solver/impls/imex-bdf2/imex-bdf2.cxx index d8515660ea..adafbb71c5 100644 --- a/src/solver/impls/imex-bdf2/imex-bdf2.cxx +++ b/src/solver/impls/imex-bdf2/imex-bdf2.cxx @@ -1228,7 +1228,8 @@ PetscErrorCode IMEXBDF2::solve_implicit(BoutReal curtime, BoutReal gamma) { KSPGetConvergedReason(ksp, &kreason); if (kreason < 0) { if (verbose) { - output << "KSP Failed to converge with reason " << static_cast(kreason) << endl; + output << "KSP Failed to converge with reason " << static_cast(kreason) + << endl; } linear_fails++; } else { @@ -1238,7 +1239,8 @@ PetscErrorCode IMEXBDF2::solve_implicit(BoutReal curtime, BoutReal gamma) { } }; if (verbose) { - output << "SNES failed to converge with reason " << static_cast(reason) << endl; + output << "SNES failed to converge with reason " << static_cast(reason) + << endl; } throw PetscLib::SNESFailure(snesUse); } From 5a7ba06ccb8e36d02bf66efa3122029e4a476ce3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 19:10:29 +0000 Subject: [PATCH 21/69] Bump externalpackages/googletest from `6092810` to `2dd1c13` Bumps [externalpackages/googletest](https://github.com/google/googletest) from `6092810` to `2dd1c13`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/609281088cfefc76f9d0ce82e1ff6c30cc3591e5...2dd1c131950043a8ad5ab0d2dda0e0970596586a) --- updated-dependencies: - dependency-name: externalpackages/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- externalpackages/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externalpackages/googletest b/externalpackages/googletest index 609281088c..2dd1c13195 160000 --- a/externalpackages/googletest +++ b/externalpackages/googletest @@ -1 +1 @@ -Subproject commit 609281088cfefc76f9d0ce82e1ff6c30cc3591e5 +Subproject commit 2dd1c131950043a8ad5ab0d2dda0e0970596586a From 8d3431fe20b312a2edf322e87fc7c670c03862fd Mon Sep 17 00:00:00 2001 From: David Bold Date: Mon, 9 Oct 2023 09:32:05 +0200 Subject: [PATCH 22/69] Ensure also lower case is accepted --- tools/pylib/boutconfig/__init__.py.cin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pylib/boutconfig/__init__.py.cin b/tools/pylib/boutconfig/__init__.py.cin index 2205f2d7bd..9a386c6742 100644 --- a/tools/pylib/boutconfig/__init__.py.cin +++ b/tools/pylib/boutconfig/__init__.py.cin @@ -41,7 +41,7 @@ def has(): _has = {} for k in config: if k.startswith("has_"): - _has[k[4:]] = _yesno[config[k]] + _has[k[4:]] = _yesno[config[k].upper()] return _has From cc8a53d4b7de3e546db9a0157fe7f72f87212887 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 19:57:05 +0000 Subject: [PATCH 23/69] Bump docker/build-push-action Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from f2a1d5e99d037542a71f64918e516c093c6f3fc4 to 0f847266c302569530c95bfa228489494c43b002. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/f2a1d5e99d037542a71f64918e516c093c6f3fc4...0f847266c302569530c95bfa228489494c43b002) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index dda81cd8fc..5e55c7950c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -70,7 +70,7 @@ jobs: prefix=${{ matrix.mpi }}-${{matrix.metric3d.tag_prefix}}${{ matrix.config.tag_postfix }}- - name: Build and push Docker image - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + uses: docker/build-push-action@0f847266c302569530c95bfa228489494c43b002 with: build-args: | BASE=${{ matrix.mpi }}-${{ matrix.metric3d.base_prefix }}${{ matrix.config.base_postfix }}-main From 12e61982ac696d1aea53e0e084385606b93e684b Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 10 Oct 2023 17:11:37 +0200 Subject: [PATCH 24/69] Fix sphinx configuration --- manual/sphinx/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/sphinx/conf.py b/manual/sphinx/conf.py index 0705e9e5c8..29c0985841 100755 --- a/manual/sphinx/conf.py +++ b/manual/sphinx/conf.py @@ -176,8 +176,8 @@ def __getattr__(cls, name): # General information about the project. project = "BOUT++" -copyright = "2017-2023" author = "B. Dudson and The BOUT++ team" +copyright = f"2017-2023, {author}" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -193,7 +193,7 @@ def __getattr__(cls, name): # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. From c41e7dfb07537c63079f266b8150b964e5cd50dd Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 12 Oct 2023 17:32:42 +0100 Subject: [PATCH 25/69] Docs: Remove remaining references to `./configure` from docs --- manual/sphinx/user_docs/advanced_install.rst | 144 ++----------------- manual/sphinx/user_docs/installing.rst | 57 +------- 2 files changed, 12 insertions(+), 189 deletions(-) diff --git a/manual/sphinx/user_docs/advanced_install.rst b/manual/sphinx/user_docs/advanced_install.rst index b2b6b49c80..957173b820 100644 --- a/manual/sphinx/user_docs/advanced_install.rst +++ b/manual/sphinx/user_docs/advanced_install.rst @@ -47,7 +47,7 @@ source directory: CHECK=no bin/bout-build-deps.sh # or with openmp - not tested, maybe not good to add it to FFTW PETSCFLAGS=--with-openmp=1 FFTWFLAGS="--enable-avx512 --enable-avx-128-fma --with-openmp --enable-threads" bin/bout-build-deps.sh - # and add "--enable-openmp" to ./configure + # and add "-DBOUT_ENABLE_OPENMP=ON" to cmake configure line Infos about options and further info can be obtained by running: @@ -84,29 +84,6 @@ When using CMake on Cray systems like Archer, you need to pass ``-DCMAKE_SYSTEM_NAME=CrayLinuxEnvironment`` so that the Cray compiler wrappers are detected properly. -KNL @ Archer -~~~~~~~~~~~~ - -To use the KNL system, configure BOUT++ as follows: - -.. code-block:: bash - - ./configure MPICXX=CC --host=knl --with-netcdf --with-pnetcdf=no --with-hypre=no CXXFLAGS="-xMIC-AVX512 -D_GLIBCXX_USE_CXX11_ABI=0" - -Atlas -~~~~~ - -.. code-block:: bash - - ./configure --with-netcdf=/usr/local/tools/hdf5-gnu-serial-1.8.1/lib --with-fftw=/usr/local --with-pdb=/usr/gapps/pact/new/lnx-2.5-ib/gnu - -Cab -~~~ - -.. code-block:: bash - - ./configure --with-netcdf=/usr/local/tools/hdf5-gnu-serial-1.8.1/lib --with-fftw=/usr/local/tools/fftw3-3.2 --with-pdb=/usr/gapps/pact/new/lnx-2.5-ib/gnu - Cori ~~~~ @@ -152,52 +129,6 @@ on GPU machines, including Cori. Note that in order to access GPU nodes a request must be made through `NERSC services `_. -Edison -~~~~~~ - -.. code-block:: bash - - module swap PrgEnv-intel PrgEnv-gnu - module load fftw - ./configure MPICC=cc MPICXX=CC --with-netcdf=/global/u2/c/chma/PUBLIC/netcdf_edison/netcdf --with-fftw=/opt/fftw/3.3.0.1/x86_64 - -Hoffman2 -~~~~~~~~ - -.. code-block:: bash - - ./configure --with-netcdf=/u/local/apps/netcdf/current --with-fftw=/u/local/apps/fftw3/current --with-cvode=/u/local/apps/sundials/2.4.0 --with-lapack=/u/local/apps/lapack/current - -Hopper -~~~~~~ - -.. code-block:: bash - - module swap PrgEnv-pgi PrgEnv-gnu - module load netcdf - module swap netcdf netcdf/4.1.3 - module swap gcc gcc/4.6.3 - ./configure MPICC=cc MPICXX=CC --with-fftw=/opt/fftw/3.2.2.1 --with-pdb=/global/homes/u/umansky/PUBLIC/PACT_HOPP2/pact - -Hyperion -~~~~~~~~ - -With the bash shell use - -.. code-block:: bash - - export PETSC_DIR=~farley9/projects/petsc/petsc-3.2-p1 - export PETSC_ARCH=arch-c - ./configure --with-netcdf=/usr/local/tools/netcdf-gnu-4.1 --with-fftw=/usr/local MPICXX=mpiCC EXTRA_LIBS=-lcurl --with-petsc --with-cvode=~farley9/local --with-ida=~farley9/local - -With the tcsh shell use - -.. code-block:: tcsh - - setenv PETSC_DIR ~farley9/projects/petsc/petsc-3.2-p1 - setenv PETSC_ARCH arch-c - ./configure --with-netcdf=/usr/local/tools/netcdf-gnu-4.1 --with-fftw=/usr/local MPICXX=mpiCC EXTRA_LIBS=-lcurl --with-petsc --with-cvode=~farley9/local --with-ida=~farley9/local - MacOS / Apple Darwin ~~~~~~~~~~~~~~~~~~~~ @@ -211,71 +142,9 @@ Compiling with Apple Clang 12, the following configuration has been known to wor where ```` is the path to the build directory -Marconi -~~~~~~~ - -.. code-block:: bash - - module load intel intelmpi fftw lapack - module load szip zlib/1.2.8--gnu--6.1.0 - module load hdf5/1.8.17--intel--pe-xe-2017--binary - module load netcdf-cxx4 - module load python - -To compile for the SKL partition, configure with - -.. code-block:: bash - - ./configure --enable-checks=0 CPPFLAGS="-Ofast -funroll-loops -xCORE-AVX512 -mtune=skylake" --host skl - -to enable AVX512 vectorization. - -.. note:: As of 20/04/2018, an issue with the netcdf and netcdf-cxx4 - modules means that you will need to remove ``-lnetcdf`` from - ``EXTRA_LIBS`` in ``make.config`` after running - ``./configure`` and before running ``make``. ``-lnetcdf`` - needs also to be removed from ``bin/bout-config`` to allow a - successful build of the python interface. Recreation of - ``boutpp.pyx`` needs to be manually triggered, if - ``boutpp.pyx`` has already been created. - -Marconi with gnu compilers -************************** - -It is also possible to configure on Marconi using gnu compilers, which may give better performance. A set of modules which work as of 4/5/2021 is - -.. code-block:: bash - - module load env-skl - module load profile/advanced - module load intel/pe-xe-2018--binary # note need to keep the 'intel' module loaded in order for shared libraries needed by numpy/scipy to be available - module load gnu/7.3.0 - module load openmpi/4.0.1--gnu--7.3.0 - module load mkl/2017--binary - module load python/3.6.4 - module load szip/2.1--gnu--6.1.0 zlib/1.2.8--gnu--6.1.0 - - bin/bout-build-deps.sh - -And follow the instructions. The result could look something like this with <...> the appropriate path. - -* for an optimized build (some experimentation with optimisation flags would be welcome, please share the results if you do!):: - - ./configure --enable-optimize=3 --enable-checks=no --enable-static --with-netcdf=<...> --with-sundials=<...> --with-fftw=<...> --with-petsc=<...> - -* for a debugging build:: - - ./configure --enable-debug --enable-static --with-netcdf=<...> --with-sundials=<...> --with-fftw=<...> --with-petsc=<...> - -Ubgl -~~~~ - -.. code-block:: bash - - ./configure --with-netcdf CXXFLAGS=-DMPICH_IGNORE_CXX_SEEK CFLAGS=-DMPICH_IGNORE_CXX_SEEK --with-pdb=/usr/gapps/pact/new_s/lnx-2.5-ib --with-netcdf=/usr/local/tools/netcdf/netcdf-4.1_c++ -Raven / Cobra / Draco -~~~~~~~~~~~~~~~~~~~~~ +MPCDF HPC Systems +~~~~~~~~~~~~~~~~~ .. code-block:: bash module purge # or at least onload intel and impi and mkl @@ -290,7 +159,12 @@ for a production run use: .. code-block:: bash module load bout-dep - ./configure --with-netcdf=$BOUT_DEP --with-sundials=$BOUT_DEP --with-fftw=$BOUT_DEP --with-petsc=$BOUT_DEP --enable-optimize --enable-openmp + cmake .. -DBOUT_USE_NETCDF=ON -DnetCDF_ROOT=$BOUT_DEP -DnetCDFCxx_ROOT=$BOUT_DEP \ + -DBOUT_USE_PETSC=ON -DPETSC_DIR=$BOUT_DEP \ + -DBOUT_USE_FFTW=ON -DFFTW_ROOT=$BOUT_DEP \ + -DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=$BOUT_DEP \ + -DBOUT_ENABLE_OPENMP=ON \ + -DCMAKE_BUILD_TYPE=Release File formats diff --git a/manual/sphinx/user_docs/installing.rst b/manual/sphinx/user_docs/installing.rst index 7f8c26ffbe..8e3daaa57a 100644 --- a/manual/sphinx/user_docs/installing.rst +++ b/manual/sphinx/user_docs/installing.rst @@ -218,10 +218,10 @@ To get precompiled BOUT++ run:: $ # get the python3 modules - python2 is available as well $ sudo dnf install python3-bout++ -.. _sec-cmake: +.. _sec-config-bout: -CMake ------ +Configuring BOUT++ +------------------ BOUT++ uses the `CMake `_ build system generator. You will need CMake >= 3.17. @@ -391,57 +391,6 @@ The recommended way to use ``googletest`` is to compile it at the same time as your project, therefore there is no option to use an external installation for that. -.. _sec-config-bout: - -./configure ------------ - -.. warning:: - As of BOUT++ 5.0, ``./configure`` is no longer supported and will - be removed in 6.0. Please switch to using CMake to build BOUT++. - -To compile BOUT++, you first need to configure it. -Go into the ``BOUT-dev`` directory and run:: - - $ ./configure - -If this finishes by printing a summary, and paths for IDL, Python, and -Octave, then the libraries are set up and you can skip to the next -section. If you see a message -“``ERROR: FFTW not found. Required by BOUT++``” then make sure -FFTW-3 is installed (See the previous section on :ref:`installing dependencies ` ). - -If FFTW-3 is installed in a non-standard location, you can specify the -directory with the ``–with-fftw=`` option e.g:: - - $ ./configure --with-fftw=$HOME/local - -Configure should now find FFTW, and search for the NetCDF library. If -configure finishes successfully, then skip to the next section, but if -you see a message ``NetCDF support disabled`` then configure couldn’t -find the NetCDF library. This will be followed by a message -``ERROR: At least one file format must be supported``. Check that you have -NetCDF installed (See the previous section on :ref:`installing dependencies ` ). - -Like the FFTW-3 library, if NetCDF is installed in a non-standard location then -you can specify the directory with the ``--with-netcdf=`` option e.g.:: - - $ ./configure --with-fftw=$HOME/local --with-netcdf=$HOME/local - -which should now finish successfully, printing a summary of the -configuration:: - - Configuration summary - PETSc support: no - SLEPc support: no - IDA support: yes - CVODE support: yes - ARKODE support: yes - NetCDF support: yes - Parallel-NetCDF support: no - -If not, see :ref:`sec-advancedinstall` for some things you can try to -resolve common problems. Working with an active ``conda`` environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From e9dda7bf251bf3fd573b2632ab016c8d81302e02 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 12 Oct 2023 17:33:58 +0100 Subject: [PATCH 26/69] Remove all autoconf files --- autoconf_build_defines.hxx.in | 102 - configure | 17273 ---------------- configure.ac | 1499 -- examples/2Dturbulence_multigrid/makefile | 6 - examples/6field-simple/makefile | 6 - examples/IMEX/advection-diffusion/makefile | 6 - examples/IMEX/advection-reaction/makefile | 6 - examples/IMEX/diffusion-nl/makefile | 6 - examples/IMEX/drift-wave-constraint/makefile | 6 - examples/IMEX/drift-wave/makefile | 6 - examples/advdiff/makefile | 6 - examples/advdiff2/makefile | 7 - examples/backtrace/makefile | 11 - examples/blob2d-laplacexz/makefile | 6 - examples/blob2d-outerloop/makefile | 6 - examples/blob2d/makefile | 6 - .../boundary-conditions/advection/makefile | 6 - examples/conducting-wall-mode/makefile | 6 - examples/conduction-snb/makefile | 6 - examples/conduction/makefile | 6 - examples/constraints/alfven-wave/makefile | 6 - examples/constraints/laplace-dae/makefile | 6 - examples/dalf3/doc/makefile | 11 - examples/dalf3/makefile | 6 - examples/eigen-box/makefile | 6 - examples/elm-pb-outerloop/makefile | 6 - examples/elm-pb/doc/makefile | 14 - examples/elm-pb/makefile | 6 - examples/em-drift/makefile | 5 - examples/fci-wave-logn/makefile | 6 - examples/fci-wave/makefile | 6 - examples/finite-volume/diffusion/makefile | 6 - examples/finite-volume/fluid/makefile | 6 - examples/finite-volume/test/makefile | 6 - examples/gas-compress/makefile | 6 - examples/gravity_reduced/makefile | 6 - examples/gyro-gem/doc/makefile | 11 - examples/gyro-gem/makefile | 6 - examples/hasegawa-wakatani-3d/makefile | 6 - examples/hasegawa-wakatani/makefile | 6 - examples/invertable_operator/makefile | 11 - examples/jorek-compare/doc/makefile | 11 - examples/jorek-compare/makefile | 6 - examples/lapd-drift/makefile | 6 - examples/laplace-petsc3d/makefile | 5 - .../makefile.create-initial-profiles | 5 - examples/laplacexy/alfven-wave/makefile | 6 - examples/laplacexy/laplace_perp/makefile | 6 - examples/laplacexy/simple/makefile | 6 - examples/monitor-newapi/makefile | 6 - examples/monitor/makefile | 6 - examples/orszag-tang/makefile | 6 - examples/performance/arithmetic/makefile | 10 - examples/performance/arithmetic_3d2d/makefile | 10 - examples/performance/bracket/makefile | 6 - examples/performance/communications/makefile | 5 - examples/performance/ddx/makefile | 6 - examples/performance/ddy/makefile | 6 - examples/performance/ddz/makefile | 6 - .../performance/iterator-offsets/makefile | 6 - examples/performance/iterator/makefile | 6 - examples/performance/laplace/makefile | 6 - .../tuning_regionblocksize/makefile | 6 - examples/preconditioning/wave/makefile | 5 - examples/reconnect-2field/makefile | 6 - examples/shear-alfven-wave/makefile | 6 - examples/staggered_grid/makefile | 6 - examples/subsampling/makefile | 6 - examples/tokamak-2fluid/makefile | 6 - examples/uedge-benchmark/makefile | 6 - examples/wave-slab/makefile | 6 - m4/ax_append_compile_flags.m4 | 67 - m4/ax_append_flag.m4 | 71 - m4/ax_check_compile_flag.m4 | 74 - m4/ax_code_coverage.m4 | 241 - m4/ax_cxx_compile_stdcxx.m4 | 951 - m4/ax_prog_cxx_mpi.m4 | 175 - m4/ax_require_defined.m4 | 37 - m4/bout.m4 | 306 - make.config.in | 441 - makefile | 117 - makefile.submodules | 15 - src/field/makefile | 23 - src/fmt/makefile | 7 - src/invert/laplace/impls/cyclic/makefile | 8 - src/invert/laplace/impls/hypre3d/makefile | 8 - .../impls/iterative_parallel_tri/makefile | 8 - src/invert/laplace/impls/makefile | 6 - src/invert/laplace/impls/multigrid/makefile | 8 - src/invert/laplace/impls/naulin/makefile | 8 - src/invert/laplace/impls/pcr/makefile | 8 - src/invert/laplace/impls/pcr_thomas/makefile | 8 - src/invert/laplace/impls/petsc/makefile | 10 - src/invert/laplace/impls/petsc3damg/makefile | 8 - src/invert/laplace/impls/serial_band/makefile | 8 - src/invert/laplace/impls/serial_tri/makefile | 8 - src/invert/laplace/impls/spt/makefile | 8 - src/invert/laplace/makefile | 9 - src/invert/laplacexy/makefile | 7 - src/invert/laplacexy2/makefile | 7 - src/invert/laplacexz/impls/cyclic/makefile | 7 - src/invert/laplacexz/impls/makefile | 7 - src/invert/laplacexz/impls/petsc/makefile | 7 - src/invert/laplacexz/makefile | 8 - src/invert/makefile | 9 - src/invert/parderiv/impls/cyclic/makefile | 8 - src/invert/parderiv/impls/makefile | 7 - src/invert/parderiv/makefile | 9 - src/invert/pardiv/impls/cyclic/makefile | 8 - src/invert/pardiv/impls/makefile | 7 - src/invert/pardiv/makefile | 8 - src/makefile.in | 96 - src/mesh/data/makefile | 8 - src/mesh/impls/bout/makefile | 8 - src/mesh/impls/makefile | 7 - src/mesh/interpolation/makefile | 10 - src/mesh/makefile | 14 - src/mesh/parallel/makefile | 8 - src/physics/makefile | 8 - src/solver/impls/adams_bashforth/makefile | 8 - src/solver/impls/arkode/makefile | 8 - src/solver/impls/cvode/makefile | 8 - src/solver/impls/euler/makefile | 8 - src/solver/impls/ida/makefile | 8 - src/solver/impls/imex-bdf2/makefile | 8 - src/solver/impls/makefile | 13 - src/solver/impls/petsc/makefile | 8 - src/solver/impls/power/makefile | 8 - src/solver/impls/pvode/makefile | 8 - src/solver/impls/rk3-ssp/makefile | 8 - src/solver/impls/rk4/makefile | 8 - .../impls/rkgeneric/impls/cashkarp/makefile | 8 - src/solver/impls/rkgeneric/impls/makefile | 7 - .../impls/rkgeneric/impls/rk4simple/makefile | 8 - .../impls/rkgeneric/impls/rkf34/makefile | 8 - .../impls/rkgeneric/impls/rkf45/makefile | 8 - src/solver/impls/rkgeneric/makefile | 9 - src/solver/impls/slepc/makefile | 8 - src/solver/impls/snes/makefile | 8 - src/solver/impls/split-rk/makefile | 8 - src/solver/makefile | 8 - src/sys/makefile | 14 - src/sys/options/makefile | 7 - 143 files changed, 22417 deletions(-) delete mode 100644 autoconf_build_defines.hxx.in delete mode 100755 configure delete mode 100644 configure.ac delete mode 100644 examples/2Dturbulence_multigrid/makefile delete mode 100644 examples/6field-simple/makefile delete mode 100644 examples/IMEX/advection-diffusion/makefile delete mode 100644 examples/IMEX/advection-reaction/makefile delete mode 100644 examples/IMEX/diffusion-nl/makefile delete mode 100644 examples/IMEX/drift-wave-constraint/makefile delete mode 100644 examples/IMEX/drift-wave/makefile delete mode 100644 examples/advdiff/makefile delete mode 100644 examples/advdiff2/makefile delete mode 100644 examples/backtrace/makefile delete mode 100644 examples/blob2d-laplacexz/makefile delete mode 100644 examples/blob2d-outerloop/makefile delete mode 100644 examples/blob2d/makefile delete mode 100644 examples/boundary-conditions/advection/makefile delete mode 100644 examples/conducting-wall-mode/makefile delete mode 100644 examples/conduction-snb/makefile delete mode 100644 examples/conduction/makefile delete mode 100644 examples/constraints/alfven-wave/makefile delete mode 100644 examples/constraints/laplace-dae/makefile delete mode 100644 examples/dalf3/doc/makefile delete mode 100644 examples/dalf3/makefile delete mode 100644 examples/eigen-box/makefile delete mode 100644 examples/elm-pb-outerloop/makefile delete mode 100644 examples/elm-pb/doc/makefile delete mode 100644 examples/elm-pb/makefile delete mode 100644 examples/em-drift/makefile delete mode 100644 examples/fci-wave-logn/makefile delete mode 100644 examples/fci-wave/makefile delete mode 100644 examples/finite-volume/diffusion/makefile delete mode 100644 examples/finite-volume/fluid/makefile delete mode 100644 examples/finite-volume/test/makefile delete mode 100644 examples/gas-compress/makefile delete mode 100644 examples/gravity_reduced/makefile delete mode 100644 examples/gyro-gem/doc/makefile delete mode 100644 examples/gyro-gem/makefile delete mode 100644 examples/hasegawa-wakatani-3d/makefile delete mode 100644 examples/hasegawa-wakatani/makefile delete mode 100644 examples/invertable_operator/makefile delete mode 100644 examples/jorek-compare/doc/makefile delete mode 100644 examples/jorek-compare/makefile delete mode 100644 examples/lapd-drift/makefile delete mode 100644 examples/laplace-petsc3d/makefile delete mode 100644 examples/laplace-petsc3d/makefile.create-initial-profiles delete mode 100644 examples/laplacexy/alfven-wave/makefile delete mode 100644 examples/laplacexy/laplace_perp/makefile delete mode 100644 examples/laplacexy/simple/makefile delete mode 100644 examples/monitor-newapi/makefile delete mode 100644 examples/monitor/makefile delete mode 100644 examples/orszag-tang/makefile delete mode 100644 examples/performance/arithmetic/makefile delete mode 100644 examples/performance/arithmetic_3d2d/makefile delete mode 100644 examples/performance/bracket/makefile delete mode 100644 examples/performance/communications/makefile delete mode 100644 examples/performance/ddx/makefile delete mode 100644 examples/performance/ddy/makefile delete mode 100644 examples/performance/ddz/makefile delete mode 100644 examples/performance/iterator-offsets/makefile delete mode 100644 examples/performance/iterator/makefile delete mode 100644 examples/performance/laplace/makefile delete mode 100644 examples/performance/tuning_regionblocksize/makefile delete mode 100644 examples/preconditioning/wave/makefile delete mode 100644 examples/reconnect-2field/makefile delete mode 100644 examples/shear-alfven-wave/makefile delete mode 100644 examples/staggered_grid/makefile delete mode 100644 examples/subsampling/makefile delete mode 100644 examples/tokamak-2fluid/makefile delete mode 100644 examples/uedge-benchmark/makefile delete mode 100644 examples/wave-slab/makefile delete mode 100644 m4/ax_append_compile_flags.m4 delete mode 100644 m4/ax_append_flag.m4 delete mode 100644 m4/ax_check_compile_flag.m4 delete mode 100644 m4/ax_code_coverage.m4 delete mode 100644 m4/ax_cxx_compile_stdcxx.m4 delete mode 100644 m4/ax_prog_cxx_mpi.m4 delete mode 100644 m4/ax_require_defined.m4 delete mode 100644 m4/bout.m4 delete mode 100644 make.config.in delete mode 100644 makefile delete mode 100644 makefile.submodules delete mode 100644 src/field/makefile delete mode 100644 src/fmt/makefile delete mode 100644 src/invert/laplace/impls/cyclic/makefile delete mode 100644 src/invert/laplace/impls/hypre3d/makefile delete mode 100644 src/invert/laplace/impls/iterative_parallel_tri/makefile delete mode 100644 src/invert/laplace/impls/makefile delete mode 100644 src/invert/laplace/impls/multigrid/makefile delete mode 100644 src/invert/laplace/impls/naulin/makefile delete mode 100644 src/invert/laplace/impls/pcr/makefile delete mode 100644 src/invert/laplace/impls/pcr_thomas/makefile delete mode 100644 src/invert/laplace/impls/petsc/makefile delete mode 100644 src/invert/laplace/impls/petsc3damg/makefile delete mode 100644 src/invert/laplace/impls/serial_band/makefile delete mode 100644 src/invert/laplace/impls/serial_tri/makefile delete mode 100644 src/invert/laplace/impls/spt/makefile delete mode 100644 src/invert/laplace/makefile delete mode 100644 src/invert/laplacexy/makefile delete mode 100644 src/invert/laplacexy2/makefile delete mode 100644 src/invert/laplacexz/impls/cyclic/makefile delete mode 100644 src/invert/laplacexz/impls/makefile delete mode 100644 src/invert/laplacexz/impls/petsc/makefile delete mode 100644 src/invert/laplacexz/makefile delete mode 100644 src/invert/makefile delete mode 100644 src/invert/parderiv/impls/cyclic/makefile delete mode 100644 src/invert/parderiv/impls/makefile delete mode 100644 src/invert/parderiv/makefile delete mode 100644 src/invert/pardiv/impls/cyclic/makefile delete mode 100644 src/invert/pardiv/impls/makefile delete mode 100644 src/invert/pardiv/makefile delete mode 100644 src/makefile.in delete mode 100644 src/mesh/data/makefile delete mode 100644 src/mesh/impls/bout/makefile delete mode 100644 src/mesh/impls/makefile delete mode 100644 src/mesh/interpolation/makefile delete mode 100644 src/mesh/makefile delete mode 100644 src/mesh/parallel/makefile delete mode 100644 src/physics/makefile delete mode 100644 src/solver/impls/adams_bashforth/makefile delete mode 100644 src/solver/impls/arkode/makefile delete mode 100644 src/solver/impls/cvode/makefile delete mode 100644 src/solver/impls/euler/makefile delete mode 100644 src/solver/impls/ida/makefile delete mode 100644 src/solver/impls/imex-bdf2/makefile delete mode 100644 src/solver/impls/makefile delete mode 100644 src/solver/impls/petsc/makefile delete mode 100644 src/solver/impls/power/makefile delete mode 100644 src/solver/impls/pvode/makefile delete mode 100644 src/solver/impls/rk3-ssp/makefile delete mode 100644 src/solver/impls/rk4/makefile delete mode 100644 src/solver/impls/rkgeneric/impls/cashkarp/makefile delete mode 100644 src/solver/impls/rkgeneric/impls/makefile delete mode 100644 src/solver/impls/rkgeneric/impls/rk4simple/makefile delete mode 100644 src/solver/impls/rkgeneric/impls/rkf34/makefile delete mode 100644 src/solver/impls/rkgeneric/impls/rkf45/makefile delete mode 100644 src/solver/impls/rkgeneric/makefile delete mode 100644 src/solver/impls/slepc/makefile delete mode 100644 src/solver/impls/snes/makefile delete mode 100644 src/solver/impls/split-rk/makefile delete mode 100644 src/solver/makefile delete mode 100644 src/sys/makefile delete mode 100644 src/sys/options/makefile diff --git a/autoconf_build_defines.hxx.in b/autoconf_build_defines.hxx.in deleted file mode 100644 index a1f23082a1..0000000000 --- a/autoconf_build_defines.hxx.in +++ /dev/null @@ -1,102 +0,0 @@ -/* autoconf_build_defines.hxx.in. Generated from configure.ac by autoheader. */ - -/* Runtime error checking level */ -#undef BOUT_CHECK_LEVEL - -/* ARKODE support */ -#undef BOUT_HAS_ARKODE - -/* Caliper support */ -#undef BOUT_HAS_CALIPER - -/* CVODE support */ -#undef BOUT_HAS_CVODE - -/* FFTW support */ -#undef BOUT_HAS_FFTW - -/* NLS support */ -#undef BOUT_HAS_GETTEXT - -/* Hypre support */ -#undef BOUT_HAS_HYPRE - -/* IDA support */ -#undef BOUT_HAS_IDA - -/* LAPACK support */ -#undef BOUT_HAS_LAPACK - -/* NETCDF support */ -#undef BOUT_HAS_LEGACY_NETCDF - -/* NETCDF support */ -#undef BOUT_HAS_NETCDF - -/* PETSc support */ -#undef BOUT_HAS_PETSC - -/* PNETCDF support */ -#undef BOUT_HAS_PNETCDF - -/* Compiler PRETTYFUNCTION support */ -#undef BOUT_HAS_PRETTY_FUNCTION - -/* PVODE support */ -#undef BOUT_HAS_PVODE - -/* RAJA support */ -#undef BOUT_HAS_RAJA - -/* Score-P support */ -#undef BOUT_HAS_SCOREP - -/* SLEPc support */ -#undef BOUT_HAS_SLEPC - -/* SUNDIALS support */ -#undef BOUT_HAS_SUNDIALS - -/* Umpire support */ -#undef BOUT_HAS_UMPIRE - -/* Use libuuid for UUID generation */ -#undef BOUT_HAS_UUID_SYSTEM_GENERATOR - -/* Type of the metric fields */ -#undef BOUT_METRIC_TYPE - -/* OpenMP schedule */ -#undef BOUT_OPENMP_SCHEDULE - -/* Enable backtrace in exceptions */ -#undef BOUT_USE_BACKTRACE - -/* Enable color logs option */ -#undef BOUT_USE_COLOR - -/* Enable CUDA */ -#undef BOUT_HAS_CUDA - -/* Is the metric field 3D */ -#undef BOUT_USE_METRIC_3D - -/* Enable MsgStack for traces */ -#undef BOUT_USE_MSGSTACK - -/* Enable OpenMP */ -#undef BOUT_USE_OPENMP - -/* Enabled extra debug output */ -#undef BOUT_USE_OUTPUT_DEBUG - -/* Enable floating point exceptions */ -#undef BOUT_USE_SIGFPE - -/* Enable signal handlers */ -#undef BOUT_USE_SIGNAL - -/* Enable field name tracking */ -#undef BOUT_USE_TRACK - -// NOTE TO DEVELOPERS: PLEASE KEEP THIS LINE AND DELETE AUTOGENERATED CONTENT BELOW! diff --git a/configure b/configure deleted file mode 100755 index 359fd6d7a9..0000000000 --- a/configure +++ /dev/null @@ -1,17273 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for BOUT++ 5.1.0. -# -# 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 -test \$(( 1 + 1 )) = 2 || 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 bd512@york.ac.uk -$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='BOUT++' -PACKAGE_TARNAME='bout--' -PACKAGE_VERSION='5.1.0' -PACKAGE_STRING='BOUT++ 5.1.0' -PACKAGE_BUGREPORT='bd512@york.ac.uk' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -gt_needs= -ac_subst_vars='SLEPC_ARCH -SLEPC_DIR -SLEPC_MAKE_INCLUDE -PETSC_ARCH -PETSC_DIR -PETSC_MAKE_INCLUDE -PETSC_HAS_SUNDIALS -BOUT_METRIC_TYPE -BOUT_USE_MSGSTACK -BOUT_USE_TRACK -BOUT_USE_SIGNAL -BOUT_USE_SIGFPE -BOUT_USE_OPENMP -BOUT_USE_OUTPUT_DEBUG -BOUT_USE_COLOR -BOUT_USE_BACKTRACE -BOUT_HAS_UUID_SYSTEM_GENERATOR -BOUT_HAS_SUNDIALS -BOUT_HAS_SLEPC -BOUT_HAS_SCOREP -BOUT_HAS_PVODE -BOUT_HAS_PRETTY_FUNCTION -BOUT_HAS_PNETCDF -BOUT_HAS_HYPRE -BOUT_HAS_PETSC -BOUT_HAS_LEGACY_NETCDF -BOUT_HAS_NETCDF -BOUT_HAS_LAPACK -BOUT_HAS_IDA -BOUT_HAS_GETTEXT -BOUT_HAS_FFTW -BOUT_HAS_CVODE -BOUT_HAS_ARKODE -BOUT_OPENMP_SCHEDULE -BOUT_CHECK_LEVEL -BOUT_REVISION -BOUT_VERSION_TAG -BOUT_VERSION_PATCH -BOUT_VERSION_MINOR -BOUT_VERSION_MAJOR -BOUT_VERSION -SHARED_EXTRA -STATIC_EXTRA -LIB_TO_BUILD -PYTHONCONFIGPATH -IDLCONFIGPATH -PREFIX -OWN_MPARK -MPARK_INCLUDE -MPARK_VARIANT_INCLUDE_PATH -FMT_INCLUDE_PATH -BOUT_INCLUDE_PATH -BOUT_LIB_PATH -CONFIG_LDFLAGS -CONFIG_CFLAGS -BOUT_HAS_CALIPER -BOUT_HAS_UMPIRE -BOUT_HAS_RAJA -BOUT_HAS_CUDA -LTLIBOBJS -POSUB -LTLIBINTL -LIBINTL -INTLLIBS -LTLIBICONV -LIBICONV -INTL_MACOSX_LIBS -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -ac_ct_CC -CFLAGS -CC -XGETTEXT_EXTRA_OPTIONS -MSGMERGE -XGETTEXT_015 -XGETTEXT -GMSGFMT_015 -MSGFMT_015 -GMSGFMT -MSGFMT -GETTEXT_MACRO_VERSION -USE_NLS -SCOREPPATH -sundials_config -PETSC_LIBS -PETSC_CFLAGS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG -NCMPIDUMP_PATH -NCCONF -fftw_path -works -COVERAGE_FLAGS -CODE_COVERAGE_RULES -CODE_COVERAGE_LDFLAGS -CODE_COVERAGE_LIBS -CODE_COVERAGE_CXXFLAGS -CODE_COVERAGE_CFLAGS -CODE_COVERAGE_CPPFLAGS -GENHTML -LCOV -GCOV -CODE_COVERAGE_ENABLED -CODE_COVERAGE_ENABLED_FALSE -CODE_COVERAGE_ENABLED_TRUE -SED -OPENMP_CXXFLAGS -LIBOBJS -EGREP -GREP -CXXCPP -HAVE_CXX14 -ARFLAGS -RANLIB -MAKE -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -SET_MAKE -LN_S -OBJEXT -EXEEXT -ac_ct_CXX -CPPFLAGS -CXX -ac_ct_MPICXX -MPICXX -PRECON_SOURCE -MKDIR_P -LDFLAGS -CXXFLAGS -EXTRA_LIBS -EXTRA_INCS -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 -with_netcdf -with_pnetcdf -with_ida -with_cvode -with_sundials -with_fftw -with_lapack -with_petsc -with_slepc -with_pvode -with_arkode -with_scorep -with_hypre -with_system_mpark -with_system_uuid -enable_warnings -enable_checks -enable_msgstack -enable_signal -enable_color -enable_track -enable_debug -enable_output_debug -enable_optimize -enable_sigfpe -enable_backtrace -enable_shared -enable_static -enable_openmp -with_openmp_schedule -enable_pvode_openmp -enable_metric_3d -with_gcov -enable_code_coverage -enable_nls -with_gnu_ld -enable_rpath -with_libiconv_prefix -with_libintl_prefix -' - ac_precious_vars='build_alias -host_alias -target_alias -EXTRA_INCS -EXTRA_LIBS -CXXFLAGS -LDFLAGS -LIBS -MPICXX -CXX -CPPFLAGS -CCC -CXXCPP -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR -PETSC_CFLAGS -PETSC_LIBS -CC -CFLAGS' - - -# 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 BOUT++ 5.1.0 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/bout--] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of BOUT++ 5.1.0:";; - 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] - --disable-warnings Disable compiler warnings - --enable-checks=no/1/2/3 - Set run-time checking level - --enable-msgstack=no/yes - Enable MstStack for backtrace. Default based on - check level. - --disable-signal Disable SEGFAULT handling - --disable-color Disable -c option to color output - --enable-track Enable variable tracking - --enable-debug Enable all debugging flags - --enable-output-debug Enable some extra debugging output - --enable-optimize=no/1/2/3/4 - Enable optimization - --enable-sigfpe Enable FloatingPointExceptions - --disable-backtrace Disable function backtrace - --enable-shared Enable building bout++ into an shared object - --enable-static Enable building bout++ into an static library - --enable-openmp Enable building with OpenMP support - --enable-pvode-openmp Enable building PVODE with OpenMP support - --enable-metric-3d Use Field3D to store coordinates metric data - --disable-openmp do not use OpenMP - --enable-code-coverage Whether to enable code coverage support - --disable-nls do not use Native Language Support - --disable-rpath do not hardcode runtime library paths - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-netcdf Enable support for netCDF files - --with-pnetcdf Set path to Parallel NetCDF library - --with-ida=/path/to/ida Use the SUNDIALS IDA solver - --with-cvode Use the SUNDIALS CVODE solver - --with-sundials Use CVODE and IDA - --with-fftw Set directory of FFTW3 library - --with-lapack Use the LAPACK library - --with-petsc Enable PETSc interface - --with-slepc Enable SLEPc interface - --with-pvode Build and enable PVODE 98 (DEFAULT) - --with-arkode Use the SUNDIALS ARKODE solver - --with-scorep Enable support for scorep based instrumentation - --with-hypre Enable support for HYPRE - --with-system-mpark Use mpark.variant already installed rather then the - bundled one - --with-system-uuid Use libuuid to generate UUIDs - --with-openmp-schedule=static/dynamic/guided/auto - Set OpenMP schedule (default: static) - --with-gcov=GCOV use given GCOV for coverage (GCOV=gcov). - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib - --without-libiconv-prefix don't search for libiconv in includedir and libdir - --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib - --without-libintl-prefix don't search for libintl in includedir and libdir - -Some influential environment variables: - EXTRA_INCS Extra compile flags - EXTRA_LIBS Extra linking flags - CXXFLAGS Extra compile flags - LDFLAGS Extra linking flags - LIBS Extra linking libraries - MPICXX MPI C++ compiler command - CXX C++ compiler command - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CXXCPP C++ preprocessor - PKG_CONFIG path to pkg-config utility - PKG_CONFIG_PATH - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path - PETSC_CFLAGS - C compiler flags for PETSC, overriding pkg-config - PETSC_LIBS linker flags for PETSC, overriding pkg-config - CC C compiler command - CFLAGS C 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 -BOUT++ configure 5.1.0 -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_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_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_cxx_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_cxx_try_compile - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - 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>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_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; 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_cxx_try_cpp - -# ac_fn_cxx_try_run LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_cxx_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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; } && { ac_try='./conftest$ac_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 : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_run - -# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------- ## -## Report this to bd512@york.ac.uk ## -## ------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_cxx_check_header_mongrel - -# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_cxx_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_cxx_check_header_compile - -# ac_fn_cxx_check_func LINENO FUNC VAR -# ------------------------------------ -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_cxx_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_cxx_check_func - -# 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 -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 BOUT++ $as_me 5.1.0, 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 - -gt_needs="$gt_needs " -# 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 - - -ac_aux_dir= -for ac_dir in build-aux "$srcdir"/build-aux; 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 build-aux \"$srcdir\"/build-aux" "$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. - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ./configure is deprecated and will be removed in a future version, please use CMake instead" >&5 -$as_echo "$as_me: WARNING: ./configure is deprecated and will be removed in a future version, please use CMake instead" >&2;} - - -# Check whether --with-netcdf was given. -if test "${with_netcdf+set}" = set; then : - withval=$with_netcdf; -fi - - -# Check whether --with-pnetcdf was given. -if test "${with_pnetcdf+set}" = set; then : - withval=$with_pnetcdf; -fi - - -# Check whether --with-ida was given. -if test "${with_ida+set}" = set; then : - withval=$with_ida; -fi - - -# Check whether --with-cvode was given. -if test "${with_cvode+set}" = set; then : - withval=$with_cvode; -fi - - -# Check whether --with-sundials was given. -if test "${with_sundials+set}" = set; then : - withval=$with_sundials; -fi - - -# Check whether --with-fftw was given. -if test "${with_fftw+set}" = set; then : - withval=$with_fftw; -fi - - -# Check whether --with-lapack was given. -if test "${with_lapack+set}" = set; then : - withval=$with_lapack; -else - with_lapack=guess -fi - - -# Check whether --with-petsc was given. -if test "${with_petsc+set}" = set; then : - withval=$with_petsc; -else - with_petsc=no -fi - - -# Check whether --with-slepc was given. -if test "${with_slepc+set}" = set; then : - withval=$with_slepc; -else - with_slepc=no -fi - - -# Check whether --with-pvode was given. -if test "${with_pvode+set}" = set; then : - withval=$with_pvode; -fi - - -# Check whether --with-arkode was given. -if test "${with_arkode+set}" = set; then : - withval=$with_arkode; -fi - - -# Check whether --with-scorep was given. -if test "${with_scorep+set}" = set; then : - withval=$with_scorep; -else - with_scorep=no -fi - - -# Check whether --with-hypre was given. -if test "${with_hypre+set}" = set; then : - withval=$with_hypre; -else - with_hypre=no -fi - - - -# Check whether --with-system_mpark was given. -if test "${with_system_mpark+set}" = set; then : - withval=$with_system_mpark; -else - with_system_mpark=auto -fi - - -# Check whether --with-system_uuid was given. -if test "${with_system_uuid+set}" = set; then : - withval=$with_system_uuid; -else - with_system_uuid=auto -fi - - -# Check whether --enable-warnings was given. -if test "${enable_warnings+set}" = set; then : - enableval=$enable_warnings; -fi - -# Check whether --enable-checks was given. -if test "${enable_checks+set}" = set; then : - enableval=$enable_checks; -else - enable_checks=default -fi - -# Check whether --enable-msgstack was given. -if test "${enable_msgstack+set}" = set; then : - enableval=$enable_msgstack; -else - enable_msgstack=maybe -fi - -# Check whether --enable-signal was given. -if test "${enable_signal+set}" = set; then : - enableval=$enable_signal; -fi - -# Check whether --enable-color was given. -if test "${enable_color+set}" = set; then : - enableval=$enable_color; -fi - -# Check whether --enable-track was given. -if test "${enable_track+set}" = set; then : - enableval=$enable_track; -fi - -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; -fi - -# Check whether --enable-output_debug was given. -if test "${enable_output_debug+set}" = set; then : - enableval=$enable_output_debug; -fi - -# Check whether --enable-optimize was given. -if test "${enable_optimize+set}" = set; then : - enableval=$enable_optimize; -fi - -# Check whether --enable-sigfpe was given. -if test "${enable_sigfpe+set}" = set; then : - enableval=$enable_sigfpe; -fi - -# Check whether --enable-backtrace was given. -if test "${enable_backtrace+set}" = set; then : - enableval=$enable_backtrace; -else - enable_backtrace=maybe -fi - -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; -else - enable_shared=no -fi - -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; -else - enable_static=auto -fi - -# Check whether --enable-openmp was given. -if test "${enable_openmp+set}" = set; then : - enableval=$enable_openmp; -else - enable_openmp=no -fi - - -# Check whether --with-openmp_schedule was given. -if test "${with_openmp_schedule+set}" = set; then : - withval=$with_openmp_schedule; -else - with_openmp_schedule=static -fi - -# Check whether --enable-pvode_openmp was given. -if test "${enable_pvode_openmp+set}" = set; then : - enableval=$enable_pvode_openmp; -else - enable_pvode_openmp=no -fi - -# Check whether --enable-metric_3d was given. -if test "${enable_metric_3d+set}" = set; then : - enableval=$enable_metric_3d; -else - enable_metric_3d=no -fi - - - - - -file_formats="" # Record which file formats are being supported - -# Delete the build log from last time -rm -f config-build.log - -# only keep BOUT related undefs -if ! grep -q 'NOTE TO DEVEL' autoconf_build_defines.hxx.in ; then - grep 'undef BOUT' -B 4 -A 1 autoconf_build_defines.hxx.in > autoconf_build_defines.hxx.in.tmp - echo '// NOTE TO DEVELOPERS: PLEASE KEEP THIS LINE AND DELETE AUTOGENERATED CONTENT BELOW!' >> autoconf_build_defines.hxx.in.tmp - mv autoconf_build_defines.hxx.in.tmp autoconf_build_defines.hxx.in -fi - - - - - -LIBS="$LIBS $LDLIBS" - - - - - -# Adding variables for additional sources - - -# We're using C++ -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -############################################################# -# Checks for programs -############################################################# - -# Autoconf inserts "-g -O2" into flags by default -# Set them to be just "-g", but only if the user hasn't already set CXXFLAGS -# We then put "-O2" back in later, assuming optimisations aren't explicitly disabled -: ${CXXFLAGS="-g"} - -# Search for MPI compiler; fail if not found - - - _ax_prog_cxx_mpi_mpi_wanted=yes - if test x"$_ax_prog_cxx_mpi_mpi_wanted" = xyes; then - if test -n "$ac_tool_prefix"; then - for ac_prog in mpic++ mpicxx mpiCC sxmpic++ hcp mpxlC_r mpxlC mpixlcxx_r mpixlcxx mpg++ mpc++ mpCC cmpic++ mpiFCC CCicpc pgCC pathCC sxc++ xlC_r xlC bgxlC_r bgxlC openCC sunCC crayCC aCC CC g++ c++ gpp cxx cc++ cl.exe FCC KCC RCC - 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_MPICXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MPICXX"; then - ac_cv_prog_MPICXX="$MPICXX" # 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_MPICXX="$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 -MPICXX=$ac_cv_prog_MPICXX -if test -n "$MPICXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5 -$as_echo "$MPICXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$MPICXX" && break - done -fi -if test -z "$MPICXX"; then - ac_ct_MPICXX=$MPICXX - for ac_prog in mpic++ mpicxx mpiCC sxmpic++ hcp mpxlC_r mpxlC mpixlcxx_r mpixlcxx mpg++ mpc++ mpCC cmpic++ mpiFCC CCicpc pgCC pathCC sxc++ xlC_r xlC bgxlC_r bgxlC openCC sunCC crayCC aCC CC g++ c++ gpp cxx cc++ cl.exe FCC KCC RCC -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_MPICXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MPICXX"; then - ac_cv_prog_ac_ct_MPICXX="$ac_ct_MPICXX" # 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_MPICXX="$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_MPICXX=$ac_cv_prog_ac_ct_MPICXX -if test -n "$ac_ct_MPICXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MPICXX" >&5 -$as_echo "$ac_ct_MPICXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_MPICXX" && break -done - - if test "x$ac_ct_MPICXX" = x; then - MPICXX="" - 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 - MPICXX=$ac_ct_MPICXX - fi -fi - - CXX="$MPICXX" - fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - 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_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # 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_CXX="$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 -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -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_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - 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 - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# 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_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - - - -# Check for compiler -# Needs to be split off into an extra macro to ensure right expansion -# order. - - -if test x"$_ax_prog_cxx_mpi_mpi_wanted" = xno; then : - _ax_prog_cxx_mpi_mpi_found=no -else - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - # test whether MPI_Init() is available - # We do not use AC_SEARCH_LIBS here, as it caches its outcome and - # thus disallows corresponding calls in the other AX_PROG_*_MPI - # macros. - for lib in NONE mpi mpich; do - save_LIBS=$LIBS - if test x"$lib" = xNONE; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function MPI_Init" >&5 -$as_echo_n "checking for function MPI_Init... " >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function MPI_Init in -l$lib" >&5 -$as_echo_n "checking for function MPI_Init in -l$lib... " >&6; } - LIBS="-l$lib $LIBS" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -extern "C" { void MPI_Init(); } - -int -main () -{ -MPI_Init(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - _ax_prog_cxx_mpi_mpi_found=yes -else - _ax_prog_cxx_mpi_mpi_found=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ax_prog_cxx_mpi_mpi_found" >&5 -$as_echo "$_ax_prog_cxx_mpi_mpi_found" >&6; } - if test "x$_ax_prog_cxx_mpi_mpi_found" = "xyes"; then - break; - fi - LIBS=$save_LIBS - done - - # Check for header - if test x"$_ax_prog_cxx_mpi_mpi_found" = xyes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5 -$as_echo_n "checking for mpi.h... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _ax_prog_cxx_mpi_mpi_found=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -fi - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$_ax_prog_cxx_mpi_mpi_found" = xyes; then : - - -$as_echo "#define HAVE_MPI 1" >>confdefs.h - - : - -else - - - as_fn_error $? "*** An MPI compiler is required. You might need to set MPICXX correctly." "$LINENO" 5 - - : - -fi - - - -# Utility programs -{ $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; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $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 - -# 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' - - -# Set MAKE to gmake if possible, otherwise make -# Extract the first word of "gmake", so it can be a program name with args. -set dummy gmake; 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_MAKE+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MAKE"; then - ac_cv_prog_MAKE="$MAKE" # 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_MAKE="gmake" - $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 - - test -z "$ac_cv_prog_MAKE" && ac_cv_prog_MAKE="make" -fi -fi -MAKE=$ac_cv_prog_MAKE -if test -n "$MAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 -$as_echo "$MAKE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" - $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 -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; 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_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" - $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_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - 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 - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - - - -ARFLAGS='' -for flag in cruU cru -do - echo 1 > artest1 - ar $flag artest artest1 &&ar $flag artest artest1 - arexit=$? - rm -f artest1 artest - if test $arexit -eq 0 - then - ARFLAGS="$flag" - break; - fi -done -test -z $ARFLAGS && as_fn_error $? "Failed to find suitable flags for ar" "$LINENO" 5 - -# Check for and enable C++14 support -# Error if not supported - ax_cxx_compile_alternatives="14 1y" ax_cxx_compile_cxx14_required=true - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ac_success=no - - - - if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=`$as_echo "ax_cv_cxx_compile_cxx14_$switch" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++14 features with $switch" >&5 -$as_echo_n "checking whether $CXX supports C++14 features with $switch... " >&6; } -if eval \${$cachevar+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_CXX="$CXX" - CXX="$CXX $switch" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual ~Base() {} - virtual void f() {} - }; - - struct Derived : public Base - { - virtual ~Derived() override {} - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - - - - -// If the compiler admits that it is not ready for C++14, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201402L - -#error "This is not a C++14 compiler" - -#else - -namespace cxx14 -{ - - namespace test_polymorphic_lambdas - { - - int - test() - { - const auto lambda = [](auto&&... args){ - const auto istiny = [](auto x){ - return (sizeof(x) == 1UL) ? 1 : 0; - }; - const int aretiny[] = { istiny(args)... }; - return aretiny[0]; - }; - return lambda(1, 1L, 1.0f, '1'); - } - - } - - namespace test_binary_literals - { - - constexpr auto ivii = 0b0000000000101010; - static_assert(ivii == 42, "wrong value"); - - } - - namespace test_generalized_constexpr - { - - template < typename CharT > - constexpr unsigned long - strlen_c(const CharT *const s) noexcept - { - auto length = 0UL; - for (auto p = s; *p; ++p) - ++length; - return length; - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("x") == 1UL, ""); - static_assert(strlen_c("test") == 4UL, ""); - static_assert(strlen_c("another\0test") == 7UL, ""); - - } - - namespace test_lambda_init_capture - { - - int - test() - { - auto x = 0; - const auto lambda1 = [a = x](int b){ return a + b; }; - const auto lambda2 = [a = lambda1(x)](){ return a; }; - return lambda2(); - } - - } - - namespace test_digit_separators - { - - constexpr auto ten_million = 100'000'000; - static_assert(ten_million == 100000000, ""); - - } - - namespace test_return_type_deduction - { - - auto f(int& x) { return x; } - decltype(auto) g(int& x) { return x; } - - template < typename T1, typename T2 > - struct is_same - { - static constexpr auto value = false; - }; - - template < typename T > - struct is_same - { - static constexpr auto value = true; - }; - - int - test() - { - auto x = 0; - static_assert(is_same::value, ""); - static_assert(is_same::value, ""); - return x; - } - - } - -} // namespace cxx14 - -#endif // __cplusplus >= 201402L - - - -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval $cachevar=yes -else - eval $cachevar=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXX="$ac_save_CXX" -fi -eval ac_res=\$$cachevar - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - if test x$ac_success = xyes; then - break - fi - done - fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - if test x$ax_cxx_compile_cxx14_required = xtrue; then - if test x$ac_success = xno; then - as_fn_error $? "*** A compiler with support for C++14 language features is required." "$LINENO" 5 - fi - fi - if test x$ac_success = xno; then - HAVE_CXX14=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++14 support was found" >&5 -$as_echo "$as_me: No compiler with C++14 support was found" >&6;} - else - HAVE_CXX14=1 - -$as_echo "#define HAVE_CXX14 1" >>confdefs.h - - fi - - - -############################################################# -# STD Library functions -############################################################# - -# Checks for libraries. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 -$as_echo_n "checking for sqrt in -lm... " >&6; } -if ${ac_cv_lib_m_sqrt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sqrt (); -int -main () -{ -return sqrt (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_m_sqrt=yes -else - ac_cv_lib_m_sqrt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 -$as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -# Checks for header files. -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -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 $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in malloc.h stdlib.h string.h strings.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# Checks for library functions. -for ac_header in stdlib.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if ${ac_cv_func_malloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif - -int -main () -{ -return ! malloc (0); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - ac_cv_func_malloc_0_nonnull=yes -else - ac_cv_func_malloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then : - -$as_echo "#define HAVE_MALLOC 1" >>confdefs.h - -else - $as_echo "#define HAVE_MALLOC 0" >>confdefs.h - - case " $LIBOBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" - ;; -esac - - -$as_echo "#define malloc rpl_malloc" >>confdefs.h - -fi - - -for ac_header in stdlib.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if ${ac_cv_func_realloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_realloc_0_nonnull=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif - -int -main () -{ -return ! realloc (0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - ac_cv_func_realloc_0_nonnull=yes -else - ac_cv_func_realloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then : - -$as_echo "#define HAVE_REALLOC 1" >>confdefs.h - -else - $as_echo "#define HAVE_REALLOC 0" >>confdefs.h - - case " $LIBOBJS " in - *" realloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS realloc.$ac_objext" - ;; -esac - - -$as_echo "#define realloc rpl_realloc" >>confdefs.h - -fi - - -for ac_func in vprintf -do : - ac_fn_cxx_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VPRINTF 1 -_ACEOF - -ac_fn_cxx_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = xyes; then : - -$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h - -fi - -fi -done - - - -# Check for OpenMP support -: ${enable_openmp=no} # Disable by default - - OPENMP_CXXFLAGS= - # Check whether --enable-openmp was given. -if test "${enable_openmp+set}" = set; then : - enableval=$enable_openmp; -fi - - if test "$enable_openmp" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CXX option to support OpenMP" >&5 -$as_echo_n "checking for $CXX option to support OpenMP... " >&6; } -if ${ac_cv_prog_cxx_openmp+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef _OPENMP - choke me -#endif -#include -int main () { return omp_get_num_threads (); } - -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_prog_cxx_openmp='none needed' -else - ac_cv_prog_cxx_openmp='unsupported' - for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ - -Popenmp --openmp; do - ac_save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $ac_option" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef _OPENMP - choke me -#endif -#include -int main () { return omp_get_num_threads (); } - -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_prog_cxx_openmp=$ac_option -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CXXFLAGS=$ac_save_CXXFLAGS - if test "$ac_cv_prog_cxx_openmp" != unsupported; then - break - fi - done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_openmp" >&5 -$as_echo "$ac_cv_prog_cxx_openmp" >&6; } - case $ac_cv_prog_cxx_openmp in #( - "none needed" | unsupported) - ;; #( - *) - OPENMP_CXXFLAGS=$ac_cv_prog_cxx_openmp ;; - esac - fi - - -BOUT_USE_OPENMP=$enable_openmp - -BOUT_OPENMP_SCHEDULE=$with_openmp_schedule - -# Check if we have access to __PRETTY_FUNCTION__ - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking does C++ compiler support __PRETTY_FUNCTION__" >&5 -$as_echo_n "checking does C++ compiler support __PRETTY_FUNCTION__... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -const char* name = __PRETTY_FUNCTION__; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - BOUT_HAS_PRETTY_FUNCTION=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - BOUT_HAS_PRETTY_FUNCTION=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - -############################################################# -# Code coverage using gcov -# -# Mutally exclusive with optimisation, therefore needs to come first -# so we can turn off optimisation if coverage is enabled -############################################################# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - 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_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - - - - - # allow to override gcov location - -# Check whether --with-gcov was given. -if test "${with_gcov+set}" = set; then : - withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov -else - _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 -$as_echo_n "checking whether to build with code coverage support... " >&6; } - # Check whether --enable-code-coverage was given. -if test "${enable_code_coverage+set}" = set; then : - enableval=$enable_code_coverage; -else - enable_code_coverage=no -fi - - - if test x$enable_code_coverage = xyes; then - CODE_COVERAGE_ENABLED_TRUE= - CODE_COVERAGE_ENABLED_FALSE='#' -else - CODE_COVERAGE_ENABLED_TRUE='#' - CODE_COVERAGE_ENABLED_FALSE= -fi - - CODE_COVERAGE_ENABLED=$enable_code_coverage - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 -$as_echo "$enable_code_coverage" >&6; } - - if test "$enable_code_coverage" = "yes" ; then : - - # check for gcov - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. -set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; 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_GCOV+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$GCOV"; then - ac_cv_prog_GCOV="$GCOV" # 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_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" - $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 -GCOV=$ac_cv_prog_GCOV -if test -n "$GCOV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 -$as_echo "$GCOV" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_GCOV"; then - ac_ct_GCOV=$GCOV - # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. -set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; 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_GCOV+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_GCOV"; then - ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # 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_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" - $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_GCOV=$ac_cv_prog_ac_ct_GCOV -if test -n "$ac_ct_GCOV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 -$as_echo "$ac_ct_GCOV" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_GCOV" = x; then - GCOV=":" - 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 - GCOV=$ac_ct_GCOV - fi -else - GCOV="$ac_cv_prog_GCOV" -fi - - if test "X$GCOV" = "X:"; then : - as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 -fi - - - if test "$GCC" = "no" ; then : - - as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 - -fi - - # Extract the first word of "lcov", so it can be a program name with args. -set dummy lcov; 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_LCOV+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LCOV"; then - ac_cv_prog_LCOV="$LCOV" # 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_LCOV="lcov" - $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 -LCOV=$ac_cv_prog_LCOV -if test -n "$LCOV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 -$as_echo "$LCOV" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - # Extract the first word of "genhtml", so it can be a program name with args. -set dummy genhtml; 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_GENHTML+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$GENHTML"; then - ac_cv_prog_GENHTML="$GENHTML" # 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_GENHTML="genhtml" - $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 -GENHTML=$ac_cv_prog_GENHTML -if test -n "$GENHTML"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 -$as_echo "$GENHTML" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test -z "$LCOV" ; then : - - as_fn_error $? "To enable code coverage reporting you must have lcov installed" "$LINENO" 5 - -fi - - if test -z "$GENHTML" ; then : - - as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 - -fi - - CODE_COVERAGE_CPPFLAGS="-DNDEBUG" - CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_LIBS="-lgcov" - CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" - - - - - - - - CODE_COVERAGE_RULES_CAPTURE=' - @$(LCOV) --quiet $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --no-external --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --no-checksum $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) - @$(LCOV) --quiet $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) - -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - @LANG=C $(GENHTML) --quiet $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --demangle-cpp --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "BOUT++ Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) - @$(LCOV) --summary $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_LCOV_OPTIONS) - @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" -' - CODE_COVERAGE_RULES_CLEAN=' -clean:: code-coverage-clean -distclean:: code-coverage-clean -code-coverage-clean: - -@$(LCOV) --directory $(abs_builddir) -z --quiet - -@$(RM) -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -@find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete -' - -else - - CODE_COVERAGE_RULES_CHECK=' - @echo "Need to reconfigure with --enable-code-coverage" -' - CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" - CODE_COVERAGE_RULES_CLEAN='' - -fi - -CODE_COVERAGE_RULES=' -# Code coverage -# -# Optional: -# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. -# Multiple directories may be specified, separated by whitespace. -# (Default: $(top_builddir)) -# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated -# by lcov for code coverage. (Default: -# bout-coverage.info) -# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage -# reports to be created. (Default: -# bout-coverage) -# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, -# set to 0 to disable it and leave empty to stay with the default. -# (Default: empty) -# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov -# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) -# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov -# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) -# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov -# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the -# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov -# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering -# lcov instance. (Default: empty) -# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov -# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) -# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the -# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) -# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) -# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore -# -# The generated report will be titled using the $(PACKAGE_NAME) and -# $(PACKAGE_VERSION). In order to add the current git hash to the title, -# use the git-version-gen script, available online. - -# Optional variables -CODE_COVERAGE_DIRECTORY ?= $(abs_builddir) -CODE_COVERAGE_OUTPUT_FILE ?= bout-coverage.info -CODE_COVERAGE_OUTPUT_DIRECTORY ?= bout-coverage -CODE_COVERAGE_BRANCH_COVERAGE ?= -CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ ---rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) -CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" -CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= -CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) -CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ -$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ ---rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) -CODE_COVERAGE_IGNORE_PATTERN ?= "*test*/*" - -# Use recursive makes in order to ignore errors during check -check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' - -# Capture code coverage data -code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' - -# Hook rule executed before code-coverage-capture, overridable by the user -code-coverage-capture-hook: - -'"$CODE_COVERAGE_RULES_CLEAN"' - -GITIGNOREFILES ?= -GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean -' - - - -if test "x$enable_code_coverage" = "xyes"; then : - - if test "x$enable_optimize"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Code coverage clashes with optimisations, disabling optimisations" >&5 -$as_echo "$as_me: WARNING: Code coverage clashes with optimisations, disabling optimisations" >&2;} - enable_optimize="no" - -fi - COVERAGE_FLAGS="--coverage --no-inline" - LDFLAGS="$LDFLAGS --coverage" - -else - - COVERAGE_FLAGS= - -fi - - -############################################################# -# General Options -############################################################# - -# Always pass -Werror=unknown-warning-option to get Clang to fail on bad -# flags, otherwise they are always appended to the warn_cxxflags variable, -# and Clang warns on them for every compilation unit. -# If this is passed to GCC, it will explode, so the flag must be enabled -# conditionally. -# This check taken from AX_COMPILER_FLAGS_CXXFLAGS -extra_compiler_flags_test="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Werror=unknown-warning-option" >&5 -$as_echo_n "checking whether C++ compiler accepts -Werror=unknown-warning-option... " >&6; } -if ${ax_cv_check_cxxflags___Werror_unknown_warning_option+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv_check_cxxflags___Werror_unknown_warning_option=yes -else - ax_cv_check_cxxflags___Werror_unknown_warning_option=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___Werror_unknown_warning_option" >&5 -$as_echo "$ax_cv_check_cxxflags___Werror_unknown_warning_option" >&6; } -if test "x$ax_cv_check_cxxflags___Werror_unknown_warning_option" = xyes; then : - - extra_compiler_flags_test="-Werror=unknown-warning-option" - -else - : -fi - -# A similar check to above, but for Intel. -we is undocumented, but -# the equivalent (?) -diag-error gets accepted by GCC. 10006 is -# "unknown option", and 10148 is the more recent "unknown warning -# option" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -we10006,10148" >&5 -$as_echo_n "checking whether C++ compiler accepts -we10006,10148... " >&6; } -if ${ax_cv_check_cxxflags___we10006_10148+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -we10006,10148" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv_check_cxxflags___we10006_10148=yes -else - ax_cv_check_cxxflags___we10006_10148=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___we10006_10148" >&5 -$as_echo "$ax_cv_check_cxxflags___we10006_10148" >&6; } -if test "x$ax_cv_check_cxxflags___we10006_10148" = xyes; then : - - extra_compiler_flags_test="-we10006,10148" - -else - : -fi - - -if test "x$enable_warnings" != "xno"; then : - -# Some hopefully sensible default compiler warning flags - - - - - -for flag in -Wall -Wextra -Wnull-dereference ; do - as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$extra_compiler_flags_test_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 -$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $extra_compiler_flags_test $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - -if ${CXXFLAGS+:} false; then : - - case " $CXXFLAGS " in #( - *" $flag "*) : - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 - (: CXXFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } ;; #( - *) : - - as_fn_append CXXFLAGS " $flag" - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 - (: CXXFLAGS="$CXXFLAGS") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; -esac - -else - - CXXFLAGS=$flag - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 - (: CXXFLAGS="$CXXFLAGS") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - -fi - -else - : -fi - -done - - -# Note we explicitly turn off -Wcast-function-type as PETSc *requires* -# we cast a function to the wrong type in MatFDColoringSetFunction - -# Also note that gcc ignores unknown flags of the form "-Wno-warning" -# for backwards compatibility. Therefore we need to add the positive -# form as an additional flag which it will choke on (if it doesn't -# exist). See: https://gcc.gnu.org/wiki/FAQ#wnowarning - - - - - -for flag in -Wno-cast-function-type ; do - as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$extra_compiler_flags_test "-Wcast-function-type"_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 -$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $extra_compiler_flags_test "-Wcast-function-type" $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - -if ${CXXFLAGS+:} false; then : - - case " $CXXFLAGS " in #( - *" $flag "*) : - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 - (: CXXFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } ;; #( - *) : - - as_fn_append CXXFLAGS " $flag" - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 - (: CXXFLAGS="$CXXFLAGS") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; -esac - -else - - CXXFLAGS=$flag - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 - (: CXXFLAGS="$CXXFLAGS") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - -fi - -else - : -fi - -done - - - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Compiler warnings disabled" >&5 -$as_echo "$as_me: Compiler warnings disabled" >&6;} - -fi - -OPT_FLAGS="" -enable_checks_def=2 -if test "$enable_debug" != ""; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling all debug options" >&5 -$as_echo "$as_me: Enabling all debug options" >&6;} - enable_checks_def=3 - # use -Og with available, otherwise fall back to -O0 - OPT_FLAGS="-g -O0 -Og -fno-inline -hipa1" - -else - - if test "x$enable_optimize" != "xno"; then : - - case "$enable_optimize" in #( - "default" | "yes" | "") : - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling default optimisations" >&5 -$as_echo "$as_me: Enabling default optimisations" >&6;} - OPT_FLAGS="-O2" ;; #( - "fast" | "4") : - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling level 4 optimisations" >&5 -$as_echo "$as_me: Enabling level 4 optimisations" >&6;} - OPT_FLAGS="-Ofast -fno-finite-math-only -march=native -funroll-loops" - enable_checks_def=0 ;; #( - "3") : - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling level 3 optimisations" >&5 -$as_echo "$as_me: Enabling level 3 optimisations" >&6;} - OPT_FLAGS="-O3 -march=native -funroll-loops" - enable_checks_def=0 ;; #( - "2") : - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling level 2 optimisations" >&5 -$as_echo "$as_me: Enabling level 2 optimisations" >&6;} - OPT_FLAGS="-O2 -march=native" - enable_checks_def=1 ;; #( - "1" | "0") : - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling level $enable_optimize optimisations" >&5 -$as_echo "$as_me: Enabling level $enable_optimize optimisations" >&6;} - OPT_FLAGS="-O$enable_optimize" ;; #( - *) : - - as_fn_error $? "unrecognized option: --enable-optimize=$enable_optimize" "$LINENO" 5 - ;; -esac - -else - OPT_FLAGS="" -fi - -fi - -# Append optimisation/debug flags if they work with this compiler - - - - -for flag in $OPT_FLAGS ; do - as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$extra_compiler_flags_test_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 -$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $extra_compiler_flags_test $flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval "$as_CACHEVAR=yes" -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - -if ${CXXFLAGS+:} false; then : - - case " $CXXFLAGS " in #( - *" $flag "*) : - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 - (: CXXFLAGS already contains $flag) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } ;; #( - *) : - - as_fn_append CXXFLAGS " $flag" - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 - (: CXXFLAGS="$CXXFLAGS") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - ;; -esac - -else - - CXXFLAGS=$flag - { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS\""; } >&5 - (: CXXFLAGS="$CXXFLAGS") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - -fi - -else - : -fi - -done - - -# Disable checks if optimization > 2 is used -if test "x$enable_checks" = "xdefault" ; then : - - enable_checks=$enable_checks_def - -fi - -BOUT_CHECK_LEVEL=0 -if test "x$enable_checks" != "xno" && test "x$enable_checks" != "x0"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Run-time checking enabled" >&5 -$as_echo "$as_me: Run-time checking enabled" >&6;} - case $enable_checks in #( - 1) : - { $as_echo "$as_me:${as_lineno-$LINENO}: -> Level 1 (Basic checking)" >&5 -$as_echo "$as_me: -> Level 1 (Basic checking)" >&6;} - CXXFLAGS="$CXXFLAGS -DCHECK=1" - BOUT_CHECK_LEVEL=1 ;; #( - 3) : - { $as_echo "$as_me:${as_lineno-$LINENO}: -> Level 3 (Full checking)" >&5 -$as_echo "$as_me: -> Level 3 (Full checking)" >&6;} - enable_output_debug=yes - CXXFLAGS="$CXXFLAGS -DCHECK=3" - BOUT_CHECK_LEVEL=3 ;; #( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: -> Level 2 (Enhanced checking)" >&5 -$as_echo "$as_me: -> Level 2 (Enhanced checking)" >&6;} - CXXFLAGS="$CXXFLAGS -DCHECK=2" - BOUT_CHECK_LEVEL=2 ;; -esac - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Run-time checking disabled" >&5 -$as_echo "$as_me: Run-time checking disabled" >&6;} - -fi - -BOUT_USE_MSGSTACK=$(test $BOUT_CHECK_LEVEL -gt 1 && echo yes || echo no) -if test "x$enable_msgstack" = "xyes" ; then : - - BOUT_USE_MSGSTACK=yes - -else - - if test "x$enable_msgstack" = "xno" ; then : - - BOUT_USE_MSGSTACK=no - -fi - -fi -if test $BOUT_USE_MSGSTACK = no ; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Stack tracing disabled" >&5 -$as_echo "$as_me: Stack tracing disabled" >&6;} - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Stack tracing enabled" >&5 -$as_echo "$as_me: Stack tracing enabled" >&6;} - -fi - -BOUT_USE_SIGNAL=no -if test "x$enable_signal" != "xno"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Segmentation fault handling enabled" >&5 -$as_echo "$as_me: Segmentation fault handling enabled" >&6;} - BOUT_USE_SIGNAL=yes - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Segmentation fault handling disabled" >&5 -$as_echo "$as_me: Segmentation fault handling disabled" >&6;} - -fi - -BOUT_USE_COLOR=no -if test "x$enable_color" != "xno"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Output coloring enabled" >&5 -$as_echo "$as_me: Output coloring enabled" >&6;} - BOUT_USE_COLOR=yes - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Output coloring disabled" >&5 -$as_echo "$as_me: Output coloring disabled" >&6;} - -fi - -BOUT_USE_TRACK=no -if test "x$enable_track" = "xyes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Field name tracking enabled" >&5 -$as_echo "$as_me: Field name tracking enabled" >&6;} - BOUT_USE_TRACK=yes - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Field name tracking disabled" >&5 -$as_echo "$as_me: Field name tracking disabled" >&6;} - -fi - -BOUT_USE_SIGFPE=no -if test "x$enable_sigfpe" = "xyes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Signaling floating point exceptions enabled" >&5 -$as_echo "$as_me: Signaling floating point exceptions enabled" >&6;} - BOUT_USE_SIGFPE=yes - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Signaling floating point exceptions disabled" >&5 -$as_echo "$as_me: Signaling floating point exceptions disabled" >&6;} - -fi - -BOUT_USE_OUTPUT_DEBUG=no -if test "x$enable_output_debug" = "xyes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Extra debug output enabled" >&5 -$as_echo "$as_me: Extra debug output enabled" >&6;} - BOUT_USE_OUTPUT_DEBUG=yes - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Extra debug output disabled" >&5 -$as_echo "$as_me: Extra debug output disabled" >&6;} - -fi - -BOUT_VERSION=$PACKAGE_VERSION -BOUT_VERSION_MAJOR=$(echo $PACKAGE_VERSION | cut -d. -f1) -BOUT_VERSION_MINOR=$(echo $PACKAGE_VERSION | cut -d. -f2) -BOUT_VERSION_PATCH=$(echo ${PACKAGE_VERSION%-*} | cut -d. -f3) -BOUT_VERSION_TAG=$(echo $PACKAGE_VERSION | cut -d- -f2) - -############################################################# -# Enable Backtrace if possible -############################################################# - -BOUT_USE_BACKTRACE=no -if test "x$enable_backtrace" = "xyes" || test "x$enable_backtrace" = "xmaybe"; then : - - # Extract the first word of "addr2line", so it can be a program name with args. -set dummy addr2line; 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_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$works"; then - ac_cv_prog_works="$works" # 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_works="yes" - $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 - - test -z "$ac_cv_prog_works" && ac_cv_prog_works="no" -fi -fi -works=$ac_cv_prog_works -if test -n "$works"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5 -$as_echo "$works" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test $works = yes; then : - - for ac_func in popen backtrace -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - works=yes -else - works=no; break -fi -done - - -fi - - if test $works = yes; then : - - for ac_header in execinfo.h dlfcn.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - works=yes -else - works=no; break -fi - -done - - -fi - - if test $works = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dladdr" >&5 -$as_echo_n "checking for library containing dladdr... " >&6; } -if ${ac_cv_search_dladdr+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dladdr (); -int -main () -{ -return dladdr (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_search_dladdr=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_dladdr+:} false; then : - break -fi -done -if ${ac_cv_search_dladdr+:} false; then : - -else - ac_cv_search_dladdr=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dladdr" >&5 -$as_echo "$ac_cv_search_dladdr" >&6; } -ac_res=$ac_cv_search_dladdr -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - works=yes -else - works=no; break -fi - - -fi - - if test $works = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Native backtrace enabled" >&5 -$as_echo "$as_me: Native backtrace enabled" >&6;} - BOUT_USE_BACKTRACE=yes - -else - - if test "x$enable_backtrace" = "xyes"; then : - - as_fn_error $? "backtrace requested, but cannot be enabled" "$LINENO" 5 - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Native backtrace disabled" >&5 -$as_echo "$as_me: WARNING: Native backtrace disabled" >&2;} - -fi - -fi - -fi - -if test "x$enable_metric_3d" != "xno"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using Field3D to store coordinates data, this is experimental." >&5 -$as_echo "$as_me: WARNING: Using Field3D to store coordinates data, this is experimental." >&2;} - BOUT_METRIC_TYPE="3D" - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Using Field2D to store coordinates data" >&5 -$as_echo "$as_me: Using Field2D to store coordinates data" >&6;} - BOUT_METRIC_TYPE="2D" - -fi - -############################################################# -# Build into shared object (pic) -############################################################# - -LIB_TO_BUILD='' -if test "x$enable_shared" = "xyes"; then : - - # compile as position independent code. - # -fpic is apparently faster then -fPIC, but -fPIC works always. - # From a SO comment (https://stackoverflow.com/a/3544211/3384414): - # What's more: I did a little experiment here (on x86_64 - # platform), -fPIC and -fpic appears to have generated the same - # code. It seems they generate a different code only on m68k, - # PowerPC and SPARC. - # Therfore use -fPIC for now - CXXFLAGS="$CXXFLAGS -fPIC" - LIB_TO_BUILD="$LIB_TO_BUILD"' $(BOUT_LIB_PATH)/libbout++.so' - if test "x$enable_static" = "xauto"; then : - - enable_static=no - -fi - SHARED_EXTRA=':' - if test "x$enable_static" = "xno"; then : - - SHARED_EXTRA='$(RM) -f $(BOUT_LIB_PATH)/libbout++.a' - -fi - -else - - if test "x$enable_static" = "xauto"; then : - - enable_static=yes - -fi - -fi - -if test "x$enable_static" = "xyes"; then : - - LIB_TO_BUILD="$LIB_TO_BUILD"' $(BOUT_LIB_PATH)/libbout++.a' - STATIC_EXTRA=':' - # In case we only build static, make sure shared libs are removed - if ! test "x$enable_shared" = "xyes"; then : - - STATIC_EXTRA='$(RM) -f $(BOUT_LIB_PATH)/*.so*' - -fi - -fi - -if test "x$LIB_TO_BUILD" = x ; then : - - as_fn_error $? "Need to enable at least one of static or shared!" "$LINENO" 5 - -fi - -############################################################# -# Git revision number -############################################################# - -rev=`git rev-parse HEAD` -if test $? = 0; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Git revision: $rev" >&5 -$as_echo "$as_me: Git revision: $rev" >&6;} - BOUT_REVISION=$rev - -else - - BOUT_REVISION= - -fi - -############################################################# -# FFT routines -############################################################# - -if test "x$with_fftw" != "xno"; then : - -# Extract the first word of "fftw-wisdom", so it can be a program name with args. -set dummy fftw-wisdom; 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_path_fftw_path+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $fftw_path in - [\\/]* | ?:[\\/]*) - ac_cv_path_fftw_path="$fftw_path" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $with_fftw$PATH_SEPARATOR$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_path_fftw_path="$as_dir/$ac_word$ac_exec_ext" - $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 - - test -z "$ac_cv_path_fftw_path" && ac_cv_path_fftw_path="no" - ;; -esac -fi -fftw_path=$ac_cv_path_fftw_path -if test -n "$fftw_path"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fftw_path" >&5 -$as_echo "$fftw_path" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "x$fftw_path" != "xno"; then : - - fftw_wisdom0=`$as_dirname -- "$fftw_path" || -$as_expr X"$fftw_path" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$fftw_path" : 'X\(//\)[^/]' \| \ - X"$fftw_path" : 'X\(//\)$' \| \ - X"$fftw_path" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$fftw_path" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - fftw_wisdom=`$as_dirname -- "$fftw_wisdom0" || -$as_expr X"$fftw_wisdom0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$fftw_wisdom0" : 'X\(//\)[^/]' \| \ - X"$fftw_wisdom0" : 'X\(//\)$' \| \ - X"$fftw_wisdom0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$fftw_wisdom0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - with_fftw="$with_fftw $fftw_wisdom" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: FFTW3 requested but fftw-wisdom not found" >&5 -$as_echo "$as_me: FFTW3 requested but fftw-wisdom not found" >&6;} -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw3.h" >&5 -$as_echo_n "checking for fftw3.h... " >&6; } - - save_CPPFLAGS=$CPPFLAGS - BACH_found=no - - if test ."$with_fftw" != .yes; then : - extra_prefix="$with_fftw" -else - extra_prefix="" -fi - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - BACH_found=yes - - - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $BACH_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local - do - for path in $search_prefix $search_prefix/include - do - if test -d $path; then : - - CPPFLAGS="$save_CPPFLAGS -I$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - BACH_found=yes - EXTRA_INCS="$EXTRA_INCS -I$path" - - - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - done - if test .$BACH_found = .yes; then : - break; -fi - done - -fi - - if test $BACH_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CPPFLAGS=$save_CPPFLAGS - -fi - if test .$BACH_found = .yes; then : - -else - as_fn_error $? "FFTW3 requested but header not found" "$LINENO" 5 -fi - - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfftw3" >&5 -$as_echo_n "checking for libfftw3... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - BACL_found=no - - # Try with no extra libraries first - if test ."$with_fftw" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_fftw" -fi - LIBS="$save_LIBS $EXTRA_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char fftw_plan_dft_r2c_1d(); - -int -main () -{ -return fftw_plan_dft_r2c_1d(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - - # Now try with explicitly linking library - if test $BACL_found != yes; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lfftw3" - if test ."$with_fftw" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_fftw" -fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char fftw_plan_dft_r2c_1d(); - -int -main () -{ -return fftw_plan_dft_r2c_1d(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -lfftw3" - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - - if test $BACL_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local ; do - for path in $search_prefix $search_prefix/lib $search_prefix/lib64 $search_prefix/x86_64-linux-gnu - do - if test -d $path; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lfftw3" - LDFLAGS="$save_LDFLAGS -L$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char fftw_plan_dft_r2c_1d(); - -int -main () -{ -return fftw_plan_dft_r2c_1d(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -L$path -lfftw3" - - - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - done - if test .$BACL_found = .yes; then : - break; -fi - done - -fi - - if test $BACL_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - if test $BACL_found = yes; then : - -else - as_fn_error $? "FFTW3 requested but library not found" "$LINENO" 5 -fi - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS=$save_CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - BOUT_HAS_FFTW="yes" - -else - -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring without FFTW3 is not recommended" >&5 -$as_echo "$as_me: Configuring without FFTW3 is not recommended" >&6;} -BOUT_HAS_FFTW="no" - -fi - -############################################################# -# netCDF support -############################################################# - -NCCONF="" # Configuration script - -BOUT_HAS_NETCDF=no -BOUT_HAS_LEGACY_NETCDF=no -if test "x$with_netcdf" != "xno"; then : - - ########################################## - # Try to find a valid NetCDF configuration - # - # at first, try to find ncconf script - - # Search for NetCDF config scripts, prefer ncxx4-config over nc-config - # Check if the path to the config script has been supplied directly, otherwise - # check the path provided by --with-netcdf, appending "/bin" if need - # be, then check system path - # Set NCCONF to the full path of the found scropt - case `basename $with_netcdf 2> /dev/null` in #( - "ncxx4-config") : - NCCONF=$with_netcdf ;; #( - "nc-config") : - NCCONF=$with_netcdf ;; #( - *) : - for ac_prog in ncxx4-config nc-config -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_path_NCCONF+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $NCCONF in - [\\/]* | ?:[\\/]*) - ac_cv_path_NCCONF="$NCCONF" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $with_netcdf$PATH_SEPARATOR$with_netcdf/bin$PATH_SEPARATOR$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_path_NCCONF="$as_dir/$ac_word$ac_exec_ext" - $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 - - ;; -esac -fi -NCCONF=$ac_cv_path_NCCONF -if test -n "$NCCONF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NCCONF" >&5 -$as_echo "$NCCONF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$NCCONF" && break -done - ;; -esac - - ########################################## - # Get configuration - if test "x$NCCONF" != "x" ; then : - - # If we found nc-config rather than ncxx4-config, we need to check if it supports C++ - if test `basename $NCCONF` = 'nc-config'; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $NCCONF has C++4 support" >&5 -$as_echo_n "checking if $NCCONF has C++4 support... " >&6; } - nc_has_cpp4=`$NCCONF --has-c++4` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nc_has_cpp4" >&5 -$as_echo "$nc_has_cpp4" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $NCCONF has C++ support" >&5 -$as_echo_n "checking if $NCCONF has C++ support... " >&6; } - nc_has_cpp=`$NCCONF --has-c++` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nc_has_cpp" >&5 -$as_echo "$nc_has_cpp" >&6; } - -else - - nc_has_cpp4="yes" - -fi - - NCINC=`$NCCONF --cflags` - EXTRA_INCS="$EXTRA_INCS $NCINC" - if test "x$nc_has_cpp4" = "xyes"; then : - - NCLIB=`$NCCONF --libs` - BOUT_HAS_NETCDF=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: -> NetCDF-4 support enabled" >&5 -$as_echo "$as_me: -> NetCDF-4 support enabled" >&6;} - -else - - # nc-config might not *say* it has C++ support, but we can try anyway - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile NetCDF with C++" >&5 -$as_echo_n "checking if we can compile NetCDF with C++... " >&6; } - # Note netcdf_c++ needed - NCLIB=`$NCCONF --libs | sed s/-lnetcdf/-lnetcdf_c++\ -lnetcdf/` - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CXXFLAGS=$CXXFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - LIBS="$save_LIBS $NCLIB" - LDFLAGS="$save_LDFLAGS $NCLIB" - CXXFLAGS="$save_CXXFLAGS $NCINC" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ -NcFile file("foo.nc"); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: -> Legacy NetCDF support enabled" >&5 -$as_echo "$as_me: -> Legacy NetCDF support enabled" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "*** Could not compile NetCDF C++ program! -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CXXFLAGS="$save_CXXFLAGS" - BOUT_HAS_NETCDF=yes - BOUT_HAS_LEGACY_NETCDF=yes - -fi - EXTRA_LIBS="$EXTRA_LIBS $NCLIB" - - file_formats="$file_formats netCDF" - NCPATH="found" - NCFOUND=yes - -else - - # if nc-config / ncxx4-config is not found, try to find library directly - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for netcdfcpp.h" >&5 -$as_echo_n "checking for netcdfcpp.h... " >&6; } - - save_CPPFLAGS=$CPPFLAGS - BACH_found=no - - if test ."$with_netcdf" != .yes; then : - extra_prefix="$with_netcdf" -else - extra_prefix="" -fi - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - BACH_found=yes - - - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $BACH_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local - do - for path in $search_prefix $search_prefix/include - do - if test -d $path; then : - - CPPFLAGS="$save_CPPFLAGS -I$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - BACH_found=yes - EXTRA_INCS="$EXTRA_INCS -I$path" - - - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - done - if test .$BACH_found = .yes; then : - break; -fi - done - -fi - - if test $BACH_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CPPFLAGS=$save_CPPFLAGS - -fi - if test .$BACH_found = .yes; then : - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnetcdf" >&5 -$as_echo_n "checking for libnetcdf... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - BACL_found=no - - # Try with no extra libraries first - if test ."$with_netcdf" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_netcdf" -fi - LIBS="$save_LIBS $EXTRA_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char nc_get_att(); - -int -main () -{ -return nc_get_att(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - - # Now try with explicitly linking library - if test $BACL_found != yes; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lnetcdf" - if test ."$with_netcdf" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_netcdf" -fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char nc_get_att(); - -int -main () -{ -return nc_get_att(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -lnetcdf" - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - - if test $BACL_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local ; do - for path in $search_prefix $search_prefix/lib $search_prefix/lib64 $search_prefix/x86_64-linux-gnu - do - if test -d $path; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lnetcdf" - LDFLAGS="$save_LDFLAGS -L$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char nc_get_att(); - -int -main () -{ -return nc_get_att(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -L$path -lnetcdf" - - - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - done - if test .$BACL_found = .yes; then : - break; -fi - done - -fi - - if test $BACL_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - if test $BACL_found = yes; then : - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnetcdf_c++" >&5 -$as_echo_n "checking for libnetcdf_c++... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - BACL_found=no - - # Try with no extra libraries first - if test ."$with_netcdf" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_netcdf" -fi - LIBS="$save_LIBS $EXTRA_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char nc_close(); - -int -main () -{ -return nc_close(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - - # Now try with explicitly linking library - if test $BACL_found != yes; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lnetcdf_c++" - if test ."$with_netcdf" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_netcdf" -fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char nc_close(); - -int -main () -{ -return nc_close(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -lnetcdf_c++" - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - - if test $BACL_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local ; do - for path in $search_prefix $search_prefix/lib $search_prefix/lib64 $search_prefix/x86_64-linux-gnu - do - if test -d $path; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lnetcdf_c++" - LDFLAGS="$save_LDFLAGS -L$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char nc_close(); - -int -main () -{ -return nc_close(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -L$path -lnetcdf_c++" - - - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - done - if test .$BACL_found = .yes; then : - break; -fi - done - -fi - - if test $BACL_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - if test $BACL_found = yes; then : - NCFOUND=yes -else - NCFOUND=no -fi - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS=$save_CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -else - NCFOUND=no -fi - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS=$save_CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -else - NCFOUND=no -fi - - - if test "x$NCFOUND" = "xyes"; then : - - file_formats="$file_formats netCDF" - { $as_echo "$as_me:${as_lineno-$LINENO}: -> Legacy NetCDF support enabled" >&5 -$as_echo "$as_me: -> Legacy NetCDF support enabled" >&6;} - NCPATH="found" - BOUT_HAS_NETCDF=yes - BOUT_HAS_LEGACY_NETCDF=yes - -fi - -fi - - if test $with_netcdf && test "x$NCFOUND" != "xyes" ; then : - as_fn_error $? "NetCDF requested but not found" "$LINENO" 5 -fi - if test "x$NCFOUND" != "xyes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: -> NetCDF support disabled" >&5 -$as_echo "$as_me: -> NetCDF support disabled" >&6;} -fi - -fi - -############################################################# -# Parallel NetCDF support -############################################################# - -PNCPATH="" -if test "$with_pnetcdf" != "no" && test "x$with_pnetcdf" != "x" ; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Searching for Parallel-NetCDF library" >&5 -$as_echo "$as_me: Searching for Parallel-NetCDF library" >&6;} - - if test "x$with_pnetcdf" != "xyes"; then : - - # Given a path to the library - as_ac_File=`$as_echo "ac_cv_file_$with_pnetcdf/include/pnetcdf.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_pnetcdf/include/pnetcdf.h" >&5 -$as_echo_n "checking for $with_pnetcdf/include/pnetcdf.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_pnetcdf/include/pnetcdf.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_pnetcdf/include/pnetcdf.h" | $as_tr_cpp` 1 -_ACEOF -PNCPATH=$with_pnetcdf -else - { $as_echo "$as_me:${as_lineno-$LINENO}: parallel-netcdf not found in given directory" >&5 -$as_echo "$as_me: parallel-netcdf not found in given directory" >&6;} - -fi - - -fi - - # Find the utilities included with pnetcdf - if test "x$PNCPATH" = "x"; then : - - if test "x$with_pnetcdf" = "xyes"; then : - - # Extract the first word of "ncmpidump", so it can be a program name with args. -set dummy ncmpidump; 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_path_NCMPIDUMP_PATH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $NCMPIDUMP_PATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_NCMPIDUMP_PATH="$NCMPIDUMP_PATH" # Let the user override the test with a path. - ;; - *) - 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_path_NCMPIDUMP_PATH="$as_dir/$ac_word$ac_exec_ext" - $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 - - ;; -esac -fi -NCMPIDUMP_PATH=$ac_cv_path_NCMPIDUMP_PATH -if test -n "$NCMPIDUMP_PATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NCMPIDUMP_PATH" >&5 -$as_echo "$NCMPIDUMP_PATH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -else - - # Extract the first word of "ncmpidump", so it can be a program name with args. -set dummy ncmpidump; 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_path_NCMPIDUMP_PATH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $NCMPIDUMP_PATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_NCMPIDUMP_PATH="$NCMPIDUMP_PATH" # Let the user override the test with a path. - ;; - *) - 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_path_NCMPIDUMP_PATH="$as_dir/$ac_word$ac_exec_ext" - $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 - - test -z "$ac_cv_path_NCMPIDUMP_PATH" && ac_cv_path_NCMPIDUMP_PATH="$with_pnetcdf$PATH_SEPARATOR$PATH" - ;; -esac -fi -NCMPIDUMP_PATH=$ac_cv_path_NCMPIDUMP_PATH -if test -n "$NCMPIDUMP_PATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NCMPIDUMP_PATH" >&5 -$as_echo "$NCMPIDUMP_PATH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -fi - if test "$NCMPIDUMP_PATH" != ""; then : - - as_ac_File=`$as_echo "ac_cv_file_$NCMPIDUMP_PATH/../include/pnetcdf.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $NCMPIDUMP_PATH/../include/pnetcdf.h" >&5 -$as_echo_n "checking for $NCMPIDUMP_PATH/../include/pnetcdf.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$NCMPIDUMP_PATH/../include/pnetcdf.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$NCMPIDUMP_PATH/../include/pnetcdf.h" | $as_tr_cpp` 1 -_ACEOF -PNCPATH=$NCMPIDUMP_PATH/../ -fi - - -fi - -fi - - if test "x$PNCPATH" != "x"; then : - - as_ac_File=`$as_echo "ac_cv_file_$path/lib/libpnetcdf.a" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $path/lib/libpnetcdf.a" >&5 -$as_echo_n "checking for $path/lib/libpnetcdf.a... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$path/lib/libpnetcdf.a"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$path/lib/libpnetcdf.a" | $as_tr_cpp` 1 -_ACEOF -PNCPATHLIB='lib' -else - as_ac_File=`$as_echo "ac_cv_file_$path/lib64/libpnetcdf.a" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $path/lib64/libpnetcdf.a" >&5 -$as_echo_n "checking for $path/lib64/libpnetcdf.a... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$path/lib64/libpnetcdf.a"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$path/lib64/libpnetcdf.a" | $as_tr_cpp` 1 -_ACEOF -PNCPATHLIB='lib64' -else - PNCPATH='' -fi - -fi - - -fi - - if test "x$PNCPATH" = "x" && test "x$with_pnetcdf" != "x"; then : - - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "*** Parallel-NetCDF requested but not found -See \`config.log' for more details" "$LINENO" 5; } - -fi - -fi - -if test "x$PNCPATH" = "x"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Parallel-NetCDF support disabled" >&5 -$as_echo "$as_me: Parallel-NetCDF support disabled" >&6;} - -else - - # Set a compile-time flag - CXXFLAGS="$CXXFLAGS -DPNCDF" - EXTRA_INCS="$EXTRA_INCS -I$PNCPATH/include" - EXTRA_LIBS="$EXTRA_LIBS -L$PNCPATH/$PNCPATHLIB -lpnetcdf" - - file_formats="$file_formats Parallel-NetCDF" - { $as_echo "$as_me:${as_lineno-$LINENO}: Parallel-NetCDF support enabled" >&5 -$as_echo "$as_me: Parallel-NetCDF support enabled" >&6;} - -fi - -############################################################# -# Check file formats -############################################################# - -if test "x$file_formats" = "x"; then : - - as_fn_error $? "*** At least one file format must be supported" "$LINENO" 5 - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Supported file formats:$file_formats" >&5 -$as_echo "$as_me: Supported file formats:$file_formats" >&6;} - -fi - -############################################################# -# LAPACK routines (Used for tri- and band-diagonal solvers) -############################################################# - -BOUT_HAS_LAPACK="no" -if test "x$with_lapack" != "xno"; then : - - if test "x$with_lapack" = "xguess" || test "x$with_lapack" = "x" ; then : - lapack_path="" -else - if test "x$with_lapack" != xyes; then : - lapack_path=$with_lapack - with_lapack=yes -else - lapack_path="" -fi - -fi - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libblas" >&5 -$as_echo_n "checking for libblas... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - BACL_found=no - - # Try with no extra libraries first - if test ."$lapack_path" = .yes; then : - extra_prefix="" -else - extra_prefix="$lapack_path" -fi - LIBS="$save_LIBS $EXTRA_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char zgemm_(); - -int -main () -{ -return zgemm_(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - - # Now try with explicitly linking library - if test $BACL_found != yes; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lblas" - if test ."$lapack_path" = .yes; then : - extra_prefix="" -else - extra_prefix="$lapack_path" -fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char zgemm_(); - -int -main () -{ -return zgemm_(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -lblas" - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - - if test $BACL_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local ; do - for path in $search_prefix $search_prefix/lib $search_prefix/lib64 $search_prefix/x86_64-linux-gnu - do - if test -d $path; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lblas" - LDFLAGS="$save_LDFLAGS -L$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char zgemm_(); - -int -main () -{ -return zgemm_(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -L$path -lblas" - - - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - done - if test .$BACL_found = .yes; then : - break; -fi - done - -fi - - if test $BACL_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - if test $BACL_found = yes; then : - BOUT_HAS_BLAS=yes -else - if test "x$with_lapack" = "xyes"; then : - as_fn_error $? "LAPACK requested but couldn't find BLAS" "$LINENO" 5 -fi -fi - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS=$save_CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblapack" >&5 -$as_echo_n "checking for liblapack... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - BACL_found=no - - # Try with no extra libraries first - if test ."$lapack_path" = .yes; then : - extra_prefix="" -else - extra_prefix="$lapack_path" -fi - LIBS="$save_LIBS $EXTRA_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char zgbsv_(); - -int -main () -{ -return zgbsv_(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - - # Now try with explicitly linking library - if test $BACL_found != yes; then : - - LIBS="$save_LIBS $EXTRA_LIBS -llapack" - if test ."$lapack_path" = .yes; then : - extra_prefix="" -else - extra_prefix="$lapack_path" -fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char zgbsv_(); - -int -main () -{ -return zgbsv_(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -llapack" - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - - if test $BACL_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local ; do - for path in $search_prefix $search_prefix/lib $search_prefix/lib64 $search_prefix/x86_64-linux-gnu - do - if test -d $path; then : - - LIBS="$save_LIBS $EXTRA_LIBS -llapack" - LDFLAGS="$save_LDFLAGS -L$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char zgbsv_(); - -int -main () -{ -return zgbsv_(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -L$path -llapack" - - - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - done - if test .$BACL_found = .yes; then : - break; -fi - done - -fi - - if test $BACL_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - if test $BACL_found = yes; then : - BOUT_HAS_LAPACK=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: Using LAPACK" >&5 -$as_echo "$as_me: Using LAPACK" >&6;} - -else - if test "x$with_lapack" = "xyes"; then : - as_fn_error $? "LAPACK requested but not found" "$LINENO" 5 -fi -fi - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS=$save_CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - -fi - -############################################################# -# PETSc library -############################################################# - - - - - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; 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_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $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 - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; 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_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - 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_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $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 - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - 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 - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi -if test "x$with_petsc" != "x" && test "$with_petsc" != "no"; then : - - -# Supplying an argument to "--with-petsc" only works if PETSC_ARCH -# *should* be empty. If it should be non-empty, THIS WILL NOT WORK - if test "$with_petsc" != "yes"; then : - - PETSC_DIR="$with_petsc" - PETSC_ARCH= - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: Using PETSC_DIR=$PETSC_DIR, PETSC_ARCH=$PETSC_ARCH" >&5 -$as_echo "$as_me: Using PETSC_DIR=$PETSC_DIR, PETSC_ARCH=$PETSC_ARCH" >&6;} - -# Define a macro for a nice error message that preserves the -# formatting. Use like: -# -# PETSC_ERROR_MESSAGE -# -# with no identation - - -# PETSc changed the location of the conf directory in 3.5, so we -# need to check both locations -# If we find nether, try to fall back to pkg-conf - PETSC_PKGCONF=no - as_ac_File=`$as_echo "ac_cv_file_$PETSC_DIR/$PETSC_ARCH/conf" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PETSC_DIR/$PETSC_ARCH/conf" >&5 -$as_echo_n "checking for $PETSC_DIR/$PETSC_ARCH/conf... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$PETSC_DIR/$PETSC_ARCH/conf"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - - PETSC_CONFDIR=${PETSC_DIR}/conf - -else - - as_ac_File=`$as_echo "ac_cv_file_$PETSC_DIR/$PETSC_ARCH/lib/petsc/conf" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf" >&5 -$as_echo_n "checking for $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$PETSC_DIR/$PETSC_ARCH/lib/petsc/conf"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - - PETSC_CONFDIR=${PETSC_DIR}/lib/petsc/conf - -else - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PETSc >= 3.4.0 " >&5 -$as_echo_n "checking for PETSc >= 3.4.0 ... " >&6; } - -if test -n "$PETSC_CFLAGS"; then - pkg_cv_PETSC_CFLAGS="$PETSC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"PETSc >= 3.4.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "PETSc >= 3.4.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PETSC_CFLAGS=`$PKG_CONFIG --cflags "PETSc >= 3.4.0 " 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$PETSC_LIBS"; then - pkg_cv_PETSC_LIBS="$PETSC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"PETSc >= 3.4.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "PETSc >= 3.4.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PETSC_LIBS=`$PKG_CONFIG --libs "PETSc >= 3.4.0 " 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - PETSC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "PETSc >= 3.4.0 " 2>&1` - else - PETSC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "PETSc >= 3.4.0 " 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$PETSC_PKG_ERRORS" >&5 - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for petsc >= 3.4.0 " >&5 -$as_echo_n "checking for petsc >= 3.4.0 ... " >&6; } - -if test -n "$PETSC_CFLAGS"; then - pkg_cv_PETSC_CFLAGS="$PETSC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"petsc >= 3.4.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "petsc >= 3.4.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PETSC_CFLAGS=`$PKG_CONFIG --cflags "petsc >= 3.4.0 " 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$PETSC_LIBS"; then - pkg_cv_PETSC_LIBS="$PETSC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"petsc >= 3.4.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "petsc >= 3.4.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PETSC_LIBS=`$PKG_CONFIG --libs "petsc >= 3.4.0 " 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - PETSC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "petsc >= 3.4.0 " 2>&1` - else - PETSC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "petsc >= 3.4.0 " 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$PETSC_PKG_ERRORS" >&5 - - - as_fn_error $? "--with-petsc was specified but could not find PETSc distribution. - You may need to specify PETSC_DIR and PETSC_ARCH like so: - --with-petsc PETSC_DIR=\$PETSC_DIR PETSC_ARCH=\$PETSC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#petsc - " "$LINENO" 5 - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - as_fn_error $? "--with-petsc was specified but could not find PETSc distribution. - You may need to specify PETSC_DIR and PETSC_ARCH like so: - --with-petsc PETSC_DIR=\$PETSC_DIR PETSC_ARCH=\$PETSC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#petsc - " "$LINENO" 5 - -else - PETSC_CFLAGS=$pkg_cv_PETSC_CFLAGS - PETSC_LIBS=$pkg_cv_PETSC_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - PETSC_PKGCONF=yes -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for petsc >= 3.4.0 " >&5 -$as_echo_n "checking for petsc >= 3.4.0 ... " >&6; } - -if test -n "$PETSC_CFLAGS"; then - pkg_cv_PETSC_CFLAGS="$PETSC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"petsc >= 3.4.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "petsc >= 3.4.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PETSC_CFLAGS=`$PKG_CONFIG --cflags "petsc >= 3.4.0 " 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$PETSC_LIBS"; then - pkg_cv_PETSC_LIBS="$PETSC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"petsc >= 3.4.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "petsc >= 3.4.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PETSC_LIBS=`$PKG_CONFIG --libs "petsc >= 3.4.0 " 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - PETSC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "petsc >= 3.4.0 " 2>&1` - else - PETSC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "petsc >= 3.4.0 " 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$PETSC_PKG_ERRORS" >&5 - - - as_fn_error $? "--with-petsc was specified but could not find PETSc distribution. - You may need to specify PETSC_DIR and PETSC_ARCH like so: - --with-petsc PETSC_DIR=\$PETSC_DIR PETSC_ARCH=\$PETSC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#petsc - " "$LINENO" 5 - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - as_fn_error $? "--with-petsc was specified but could not find PETSc distribution. - You may need to specify PETSC_DIR and PETSC_ARCH like so: - --with-petsc PETSC_DIR=\$PETSC_DIR PETSC_ARCH=\$PETSC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#petsc - " "$LINENO" 5 - -else - PETSC_CFLAGS=$pkg_cv_PETSC_CFLAGS - PETSC_LIBS=$pkg_cv_PETSC_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - PETSC_PKGCONF=yes -fi - -else - PETSC_CFLAGS=$pkg_cv_PETSC_CFLAGS - PETSC_LIBS=$pkg_cv_PETSC_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - PETSC_PKGCONF=yes -fi - -fi - - -fi - - - if test $PETSC_PKGCONF = no ; then : - -# We've found an installation, need to check we can use it. First we -# need to be able to check the version number, for which we need -# petscverion.h - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$PETSC_DIR/include" - ac_fn_cxx_check_header_mongrel "$LINENO" "petscversion.h" "ac_cv_header_petscversion_h" "$ac_includes_default" -if test "x$ac_cv_header_petscversion_h" = xyes; then : - FOUND_PETSC_HEADER=yes -else - FOUND_PETSC_HEADER=no - -fi - - - -# This is a terrible hack for some Linux distributions (Fedora) that -# install PETSc in a non-supported fashion. This is really the fault -# of PETSc for their weird method of installation - if test $FOUND_PETSC_HEADER = no; then : - - as_ac_File=`$as_echo "ac_cv_file_${PETSC_CONFDIR}/petscvariables" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PETSC_CONFDIR}/petscvariables" >&5 -$as_echo_n "checking for ${PETSC_CONFDIR}/petscvariables... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "${PETSC_CONFDIR}/petscvariables"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -else - - as_fn_error $? "Unable to find either petscversion.h or petscvariables - You may need to specify PETSC_DIR and PETSC_ARCH like so: - --with-petsc PETSC_DIR=\$PETSC_DIR PETSC_ARCH=\$PETSC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#petsc - " "$LINENO" 5 - -fi - - -# This relies on the assumption that PETSC_ARCH is empty - PETSC_CC_INCLUDES=$(grep ^PETSC_CC_INCLUDES ${PETSC_CONFDIR}/petscvariables | cut -d= -f 2-) - - { $as_echo "$as_me:${as_lineno-$LINENO}: Looking for petscverion.h using $PETSC_CC_INCLUDES from ${PETSC_CONFDIR}/petscvariables" >&5 -$as_echo "$as_me: Looking for petscverion.h using $PETSC_CC_INCLUDES from ${PETSC_CONFDIR}/petscvariables" >&6;} - - # This is the cache variable set by the previous call to - # AC_CHECK_HEADER. We need to unset it so we can call the macro - # again, but now with different CPPFLAGS - { ac_cv_header_petscversion_h=; unset ac_cv_header_petscversion_h;} - - CPPFLAGS="$CPPFLAGS $PETSC_CC_INCLUDES" - ac_fn_cxx_check_header_mongrel "$LINENO" "petscversion.h" "ac_cv_header_petscversion_h" "$ac_includes_default" -if test "x$ac_cv_header_petscversion_h" = xyes; then : - -else - - as_fn_error $? "Couldn't find or include petscversion.h. - You may need to specify PETSC_DIR and PETSC_ARCH like so: - --with-petsc PETSC_DIR=\$PETSC_DIR PETSC_ARCH=\$PETSC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#petsc - " "$LINENO" 5 - -fi - - - -fi - -# Now we have the header we want, we can check the version number - { $as_echo "$as_me:${as_lineno-$LINENO}: checking PETSc is at least 3.4.0" >&5 -$as_echo_n "checking PETSc is at least 3.4.0... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #if PETSC_VERSION_GE(3, 4, 0) - yes - #endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - PETSC_VERSION_OK="yes" -else - PETSC_VERSION_OK="no" -fi -rm -f conftest* - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PETSC_VERSION_OK" >&5 -$as_echo "$PETSC_VERSION_OK" >&6; } - CPPFLAGS="$save_CPPFLAGS" - - if test $PETSC_VERSION_OK = no; then : - - as_fn_error $? "PETSc version must be at least 3.4.0" "$LINENO" 5 - -fi - -# Check if PETSc was compiled with SUNDIALS - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$PETSC_DIR/$PETSC_ARCH/include" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking PETSc has SUNDIALS support" >&5 -$as_echo_n "checking PETSc has SUNDIALS support... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #ifdef PETSC_HAVE_SUNDIALS - yes - #endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - PETSC_HAS_SUNDIALS="yes" -else - PETSC_HAS_SUNDIALS="no" -fi -rm -f conftest* - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PETSC_HAS_SUNDIALS" >&5 -$as_echo "$PETSC_HAS_SUNDIALS" >&6; } - CPPFLAGS="$save_CPPFLAGS" - - if test "$PETSC_HAS_SUNDIALS" = "yes"; then : - - CXXFLAGS="$CXXFLAGS -DPETSC_HAS_SUNDIALS " - -fi - - # Set the line to be included in the make.conf file - PETSC_MAKE_INCLUDE="include ${PETSC_CONFDIR}/variables" - - BOUT_HAS_PETSC="yes" - - EXTRA_INCS="$EXTRA_INCS \$(PETSC_CC_INCLUDES)" - EXTRA_LIBS="$EXTRA_LIBS \$(PETSC_LIB)" - -else - - # Check if PETSc was compiled with SUNDIALS - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $PETSC_CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking PETSc has SUNDIALS support" >&5 -$as_echo_n "checking PETSc has SUNDIALS support... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #ifdef PETSC_HAVE_SUNDIALS - yes - #endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - PETSC_HAS_SUNDIALS="yes" -else - PETSC_HAS_SUNDIALS="no" -fi -rm -f conftest* - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PETSC_HAS_SUNDIALS" >&5 -$as_echo "$PETSC_HAS_SUNDIALS" >&6; } - CPPFLAGS="$save_CPPFLAGS" - - if test "$PETSC_HAS_SUNDIALS" = "yes"; then : - - CXXFLAGS="$CXXFLAGS -DPETSC_HAS_SUNDIALS " - -fi - PETSC_MAKE_INCLUDE= - BOUT_HAS_PETSC="yes" - - EXTRA_INCS="$EXTRA_INCS $PETSC_CFLAGS" - EXTRA_LIBS="$PETSC_LIBS $EXTRA_LIBS" - -fi - -else - - PETSC_MAKE_INCLUDE= - BOUT_HAS_PETSC="no" - PETSC_HAS_SUNDIALS="no" - -fi - -############################################################# -# SLEPc library -############################################################# - -if test "x$with_slepc" != "x" && test "$with_slepc" != "no"; then : - - - if test $BOUT_HAS_PETSC = "no"; then : - - as_fn_error $? "--with-slepc specified, but no PETSc detected. Please reconfigure and specify --with-petsc - You may need to specify PETSC_DIR and PETSC_ARCH like so: - --with-petsc PETSC_DIR=\$PETSC_DIR PETSC_ARCH=\$PETSC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#petsc - " "$LINENO" 5 - -fi - -# Supplying an argument to "--with-slepc" only works if SLEPC_ARCH -# *should* be empty. If it should be non-empty, THIS WILL NOT WORK - if test "$with_slepc" != "yes"; then : - - SLEPC_DIR="$with_slepc" - SLEPC_ARCH= - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: Using SLEPC_DIR=$SLEPC_DIR, SLEPC_ARCH=$SLEPC_ARCH" >&5 -$as_echo "$as_me: Using SLEPC_DIR=$SLEPC_DIR, SLEPC_ARCH=$SLEPC_ARCH" >&6;} - -# Define a macro for a nice error message that preserves the -# formatting. Use like: -# -# SLEPC_ERROR_MESSAGE -# -# with no identation - - -# Slepc changed the location of the conf directory in 3.5, so we -# need to check both locations - as_ac_File=`$as_echo "ac_cv_file_$SLEPC_DIR/$SLEPC_ARCH/conf" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SLEPC_DIR/$SLEPC_ARCH/conf" >&5 -$as_echo_n "checking for $SLEPC_DIR/$SLEPC_ARCH/conf... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$SLEPC_DIR/$SLEPC_ARCH/conf"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - - SLEPC_CONFDIR=${SLEPC_DIR}/conf - -else - - as_ac_File=`$as_echo "ac_cv_file_$SLEPC_DIR/$SLEPC_ARCH/lib/slepc/conf" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SLEPC_DIR/$SLEPC_ARCH/lib/slepc/conf" >&5 -$as_echo_n "checking for $SLEPC_DIR/$SLEPC_ARCH/lib/slepc/conf... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$SLEPC_DIR/$SLEPC_ARCH/lib/slepc/conf"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - - SLEPC_CONFDIR=${SLEPC_DIR}/lib/slepc/conf - -else - - as_fn_error $? "--with-slepc was specified but could not find Slepc distribution. - You may need to specify SLEPC_DIR and SLEPC_ARCH like so: - --with-slepc SLEPC_DIR=\$SLEPC_DIR SLEPC_ARCH=\$SLEPC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#slepc - " "$LINENO" 5 - -fi - - -fi - - -# We've found an installation, need to check we can use it. First we -# need to be able to check the version number, for which we need -# slepcverion.h - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$SLEPC_DIR/include" - ac_fn_cxx_check_header_mongrel "$LINENO" "slepcversion.h" "ac_cv_header_slepcversion_h" "$ac_includes_default" -if test "x$ac_cv_header_slepcversion_h" = xyes; then : - FOUND_SLEPC_HEADER=yes -else - FOUND_SLEPC_HEADER=no - -fi - - - -# This is a terrible hack for some Linux distributions (Fedora) that -# install Slepc in a non-supported fashion. This is really the fault -# of Slepc for their weird method of installation - if test $FOUND_SLEPC_HEADER = no; then : - - as_ac_File=`$as_echo "ac_cv_file_${SLEPC_CONFDIR}/slepc_variables" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${SLEPC_CONFDIR}/slepc_variables" >&5 -$as_echo_n "checking for ${SLEPC_CONFDIR}/slepc_variables... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "${SLEPC_CONFDIR}/slepc_variables"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -else - - as_fn_error $? "Unable to find either slepcversion.h or slepc_variables - You may need to specify SLEPC_DIR and SLEPC_ARCH like so: - --with-slepc SLEPC_DIR=\$SLEPC_DIR SLEPC_ARCH=\$SLEPC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#slepc - " "$LINENO" 5 - -fi - - -# This relies on the assumption that SLEPC_ARCH is empty - SLEPC_CC_INCLUDES=$(grep ^SLEPC_CC_INCLUDES ${SLEPC_CONFDIR}/slepc_variables | cut -d= -f 2-) - - { $as_echo "$as_me:${as_lineno-$LINENO}: Looking for slepcverion.h using $SLEPC_CC_INCLUDES from ${SLEPC_CONFDIR}/slepc_variables" >&5 -$as_echo "$as_me: Looking for slepcverion.h using $SLEPC_CC_INCLUDES from ${SLEPC_CONFDIR}/slepc_variables" >&6;} - - # This is the cache variable set by the previous call to - # AC_CHECK_HEADER. We need to unset it so we can call the macro - # again, but now with different CPPFLAGS - { ac_cv_header_slepcversion_h=; unset ac_cv_header_slepcversion_h;} - - CPPFLAGS="$CPPFLAGS $SLEPC_CC_INCLUDES" - ac_fn_cxx_check_header_mongrel "$LINENO" "slepcversion.h" "ac_cv_header_slepcversion_h" "$ac_includes_default" -if test "x$ac_cv_header_slepcversion_h" = xyes; then : - -else - - as_fn_error $? "Couldn't find or include slepcversion.h. - You may need to specify SLEPC_DIR and SLEPC_ARCH like so: - --with-slepc SLEPC_DIR=\$SLEPC_DIR SLEPC_ARCH=\$SLEPC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#slepc - " "$LINENO" 5 - -fi - - - -fi - -# Now we have the header we want, we can check the version number - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Slepc is at least 3.4.0" >&5 -$as_echo_n "checking Slepc is at least 3.4.0... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #if SLEPC_VERSION_GE(3, 4, 0) - yes - #endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - SLEPC_VERSION_OK="yes" -else - SLEPC_VERSION_OK="no" -fi -rm -f conftest* - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SLEPC_VERSION_OK" >&5 -$as_echo "$SLEPC_VERSION_OK" >&6; } - CPPFLAGS="$save_CPPFLAGS" - - if test $SLEPC_VERSION_OK = no; then : - - as_fn_error $? "Slepc version must be at least 3.4.0" "$LINENO" 5 - -fi - -# Check if Slepc was compiled with SUNDIALS - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$SLEPC_DIR/$SLEPC_ARCH/include" - - # Set the line to be included in the make.conf file - SLEPC_MAKE_INCLUDE="include ${SLEPC_CONFDIR}/slepc_variables" - - BOUT_HAS_SLEPC="yes" - - EXTRA_INCS="$EXTRA_INCS \$(SLEPC_INCLUDE)" - EXTRA_LIBS="$EXTRA_LIBS \$(SLEPC_LIB)" - - -else - - SLEPC_MAKE_INCLUDE= - BOUT_HAS_SLEPC="no" - -fi - -############################################################# -# Solver choice: SUNDIALS' IDA, SUNDIALS' CVODE, PVODE -############################################################# - -BOUT_HAS_SUNDIALS=no -if test "x$with_sundials" != "x" && test "x$with_sundials" != "xno"; then : - - - # Now follows a few different checks for the version of SUNDIALS. - # We need the sundials_config.h header, which comes with all the - # versions we care about - - # If we've been given a path, look in there first - if test "x$with_sundials" != "xyes"; then : - - as_ac_File=`$as_echo "ac_cv_file_$with_sundials/include/sundials/sundials_config.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_sundials/include/sundials/sundials_config.h" >&5 -$as_echo_n "checking for $with_sundials/include/sundials/sundials_config.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_sundials/include/sundials/sundials_config.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - SUNDIALS_INC=$with_sundials/include -else - SUNDIALS_INC="" -fi - - -fi - - # If we've got one, add the include dir to the preprocessor flags - save_CPPFLAGS=$CPPFLAGS - if test "x$SUNDIALS_INC" != "x"; then : - CPPFLAGS="-I$SUNDIALS_INC" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SUNDIALS config header" >&5 -$as_echo_n "checking for SUNDIALS config header... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include "sundials/sundials_config.h" - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "*** Could not determine SUNDIALS version -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SUNDIALS minor version" >&5 -$as_echo_n "checking for SUNDIALS minor version... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include "sundials/sundials_config.h" - #ifdef SUNDIALS_PACKAGE_VERSION - SUNDIALS_PACKAGE_VERSION - #endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "^ *\"? *[12]\.[0-5]\." >/dev/null 2>&1; then : - sundials_minor_ver="too low" -else - sundials_minor_ver=ok -fi -rm -f conftest* - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_minor_ver" >&5 -$as_echo "$sundials_minor_ver" >&6; } - - CPPFLAGS=$save_CPPFLAGS - - if test "$sundials_minor_ver" = "too low"; then : - - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "*** Unsupported SUNDIALS version: Requires at least 2.6 -See \`config.log' for more details" "$LINENO" 5; } - -fi - - # Set both IDA and CVODE if not set already - if test "x$with_ida" = "x"; then : - - with_ida=$with_sundials - -fi - - if test "x$with_cvode" = "x"; then : - - with_cvode=$with_sundials - -fi - - if test "x$with_arkode" = "x"; then : - - with_arkode=$with_sundials - -fi - BOUT_HAS_SUNDIALS=yes - -fi - -if test "x$with_ida" != "x" && test "x$with_ida" != "xno"; then : - - - - with_module=$with_ida - module_upper=IDA - - { $as_echo "$as_me:${as_lineno-$LINENO}: Searching for SUNDIALS $module_upper library" >&5 -$as_echo "$as_me: Searching for SUNDIALS $module_upper library" >&6;} - if test "$with_module" = "yes"; then : - - # No path specified. Try using sundials-config - # Extract the first word of "sundials-config", so it can be a program name with args. -set dummy sundials-config; 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_path_sundials_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $sundials_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_sundials_config="$sundials_config" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $with_sundials$PATH_SEPARATOR$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_path_sundials_config="$as_dir/$ac_word$ac_exec_ext" - $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 - - test -z "$ac_cv_path_sundials_config" && ac_cv_path_sundials_config="no" - ;; -esac -fi -sundials_config=$ac_cv_path_sundials_config -if test -n "$sundials_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_config" >&5 -$as_echo "$sundials_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$sundials_config" != xno; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found sundials-config, this means your version of SUNDIALS is < 2.6, and probably won't work" >&5 -$as_echo "$as_me: WARNING: Found sundials-config, this means your version of SUNDIALS is < 2.6, and probably won't work" >&2;} - sundials_module_includes=`$sundials_config -m ida -t p -l c -s cppflags` - sundials_module_libs=`$sundials_config -m ida -t p -l c -s libs` - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No sundials-config available, no path given, will try compiling with $module_upper anyway" >&5 -$as_echo "$as_me: WARNING: No sundials-config available, no path given, will try compiling with $module_upper anyway" >&2;} - sundials_module_includes="" - # Need to link to libsundials_ida, libsundials_cvode or libsundials_arkode - sundials_module_libs="-lsundials_ida -lsundials_nvecparallel $SUNDIALS_EXTRA_LIBS" - -fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile with SUNDIALS $module_upper" >&5 -$as_echo_n "checking if we can compile with SUNDIALS $module_upper... " >&6; } - save_LIBS=$LIBS - save_CXXFLAGS=$CXXFLAGS - LIBS="$save_LIBS $sundials_module_libs" - CXXFLAGS="$save_CXXFLAGS $sundials_module_includes" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #include - extern void foo(N_Vector); - - -int -main () -{ -IDACreate(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - sundials_config_worked=yes -else - sundials_config_worked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_config_worked" >&5 -$as_echo "$sundials_config_worked" >&6; } - if test $sundials_config_worked = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Using SUNDIALS $module_upper solver" >&5 -$as_echo "$as_me: Using SUNDIALS $module_upper solver" >&6;} - -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 $? "Could not compile SUNDIALS $module_upper program, check your SUNDIALS version -See \`config.log' for more details" "$LINENO" 5; } - -fi - LIBS=$save_LIBS - CXXFLAGS="$save_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -else - - # Specified with path - { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for $module_upper header files" >&5 -$as_echo "$as_me: Checking for $module_upper header files" >&6;} - - # Check whether user supplied path to $module_upper install dir... - as_ac_File=`$as_echo "ac_cv_file_$with_module/include/ida/ida.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/ida/ida.h" >&5 -$as_echo_n "checking for $with_module/include/ida/ida.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/ida/ida.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/ida/ida.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/ida/ida_spgmr.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/ida/ida_spgmr.h" >&5 -$as_echo_n "checking for $with_module/include/ida/ida_spgmr.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/ida/ida_spgmr.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/ida/ida_spgmr.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/ida/ida_bbdpre.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/ida/ida_bbdpre.h" >&5 -$as_echo_n "checking for $with_module/include/ida/ida_bbdpre.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/ida/ida_bbdpre.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/ida/ida_bbdpre.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/nvector/nvector_parallel.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/nvector/nvector_parallel.h" >&5 -$as_echo_n "checking for $with_module/include/nvector/nvector_parallel.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/nvector/nvector_parallel.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/nvector/nvector_parallel.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/sundials/sundials_types.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/sundials/sundials_types.h" >&5 -$as_echo_n "checking for $with_module/include/sundials/sundials_types.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/sundials/sundials_types.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/sundials/sundials_types.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi - - if test $sundials_module_includes_found = no; then : - - # ...or path to $module_upper lib dir - as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/ida/ida.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/ida/ida.h" >&5 -$as_echo_n "checking for $with_module/../include/ida/ida.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/ida/ida.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/ida/ida.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/ida/ida_spgmr.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/ida/ida_spgmr.h" >&5 -$as_echo_n "checking for $with_module/../include/ida/ida_spgmr.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/ida/ida_spgmr.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/ida/ida_spgmr.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/ida/ida_bbdpre.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/ida/ida_bbdpre.h" >&5 -$as_echo_n "checking for $with_module/../include/ida/ida_bbdpre.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/ida/ida_bbdpre.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/ida/ida_bbdpre.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/nvector/nvector_parallel.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/nvector/nvector_parallel.h" >&5 -$as_echo_n "checking for $with_module/../include/nvector/nvector_parallel.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/nvector/nvector_parallel.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/nvector/nvector_parallel.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/sundials/sundials_types.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/sundials/sundials_types.h" >&5 -$as_echo_n "checking for $with_module/../include/sundials/sundials_types.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/sundials/sundials_types.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/sundials/sundials_types.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi - - -fi - - if test $sundials_module_includes_found = no; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Missing one or more $module_upper headers -See \`config.log' for more details" "$LINENO" 5; } -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: Found $module_upper include path: $sundials_module_includes_path" >&5 -$as_echo "$as_me: Found $module_upper include path: $sundials_module_includes_path" >&6;} - - # We've now got the include directory and can specify what libraries we need - sundials_module_includes="-I$sundials_module_includes_path" - sundials_module_libs="-lsundials_ida -lsundials_nvecparallel $SUNDIALS_EXTRA_LIBS" - - # Try compiling something simple with a few different common paths - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - for sundials_module_lib_path in "$with_module" "$with_module/lib" "$with_module/lib64" - do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SUNDIALS $module_upper library path is $sundials_module_lib_path" >&5 -$as_echo_n "checking if SUNDIALS $module_upper library path is $sundials_module_lib_path... " >&6; } - LIBS="$save_LIBS $sundials_module_libs" - LDFLAGS="$save_LDFLAGS -L$sundials_module_lib_path" - CPPFLAGS="$save_CPPFLAGS $sundials_module_includes" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #include - extern void foo(N_Vector); - - -int -main () -{ -IDACreate(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - sundials_module_lib_path_found=yes -else - sundials_module_lib_path_found=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_module_lib_path_found" >&5 -$as_echo "$sundials_module_lib_path_found" >&6; } - if test "x$sundials_module_lib_path_found" = "xyes"; then : - break -fi - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS="$save_CPPFLAGS" - done - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - SUNDIALS_MODULE_LDFLAGS="-L$sundials_module_lib_path" - -fi - - if test "x$sundials_module_lib_path_found" = "xno"; then : - { { $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 compile $module_upper program -See \`config.log' for more details" "$LINENO" 5; } -fi - - # Compile in the $module_upper solver - { $as_echo "$as_me:${as_lineno-$LINENO}: => $module_upper solver enabled" >&5 -$as_echo "$as_me: => $module_upper solver enabled" >&6;} - EXTRA_LIBS="$EXTRA_LIBS $SUNDIALS_MODULE_LDFLAGS $sundials_module_libs" - EXTRA_INCS="$EXTRA_INCS $sundials_module_includes" - - eval "`$as_echo "BOUT_HAS_$module_upper" | $as_tr_sh`=yes" - eval "`$as_echo "${module_upper}LIBS" | $as_tr_sh`=\"\$SUNDIALS_MODULE_LDFLAGS \$sundials_module_libs\"" - eval "`$as_echo "${module_upper}INCS" | $as_tr_sh`=\"\$sundials_module_includes\"" - - -fi - -if test "x$with_cvode" != "x" && test "x$with_cvode" != "xno"; then : - - - - with_module=$with_cvode - module_upper=CVODE - - { $as_echo "$as_me:${as_lineno-$LINENO}: Searching for SUNDIALS $module_upper library" >&5 -$as_echo "$as_me: Searching for SUNDIALS $module_upper library" >&6;} - if test "$with_module" = "yes"; then : - - # No path specified. Try using sundials-config - # Extract the first word of "sundials-config", so it can be a program name with args. -set dummy sundials-config; 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_path_sundials_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $sundials_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_sundials_config="$sundials_config" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $with_sundials$PATH_SEPARATOR$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_path_sundials_config="$as_dir/$ac_word$ac_exec_ext" - $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 - - test -z "$ac_cv_path_sundials_config" && ac_cv_path_sundials_config="no" - ;; -esac -fi -sundials_config=$ac_cv_path_sundials_config -if test -n "$sundials_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_config" >&5 -$as_echo "$sundials_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$sundials_config" != xno; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found sundials-config, this means your version of SUNDIALS is < 2.6, and probably won't work" >&5 -$as_echo "$as_me: WARNING: Found sundials-config, this means your version of SUNDIALS is < 2.6, and probably won't work" >&2;} - sundials_module_includes=`$sundials_config -m cvode -t p -l c -s cppflags` - sundials_module_libs=`$sundials_config -m cvode -t p -l c -s libs` - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No sundials-config available, no path given, will try compiling with $module_upper anyway" >&5 -$as_echo "$as_me: WARNING: No sundials-config available, no path given, will try compiling with $module_upper anyway" >&2;} - sundials_module_includes="" - # Need to link to libsundials_ida, libsundials_cvode or libsundials_arkode - sundials_module_libs="-lsundials_cvode -lsundials_nvecparallel $SUNDIALS_EXTRA_LIBS" - -fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile with SUNDIALS $module_upper" >&5 -$as_echo_n "checking if we can compile with SUNDIALS $module_upper... " >&6; } - save_LIBS=$LIBS - save_CXXFLAGS=$CXXFLAGS - LIBS="$save_LIBS $sundials_module_libs" - CXXFLAGS="$save_CXXFLAGS $sundials_module_includes" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #include - extern void foo(N_Vector); - - -int -main () -{ - - #if SUNDIALS_VERSION_MAJOR >= 4 - CVodeCreate(0); - #else - CVodeCreate(0, 0); - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - sundials_config_worked=yes -else - sundials_config_worked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_config_worked" >&5 -$as_echo "$sundials_config_worked" >&6; } - if test $sundials_config_worked = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Using SUNDIALS $module_upper solver" >&5 -$as_echo "$as_me: Using SUNDIALS $module_upper solver" >&6;} - -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 $? "Could not compile SUNDIALS $module_upper program, check your SUNDIALS version -See \`config.log' for more details" "$LINENO" 5; } - -fi - LIBS=$save_LIBS - CXXFLAGS="$save_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -else - - # Specified with path - { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for $module_upper header files" >&5 -$as_echo "$as_me: Checking for $module_upper header files" >&6;} - - # Check whether user supplied path to $module_upper install dir... - as_ac_File=`$as_echo "ac_cv_file_$with_module/include/cvode/cvode.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/cvode/cvode.h" >&5 -$as_echo_n "checking for $with_module/include/cvode/cvode.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/cvode/cvode.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/cvode/cvode.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/cvode/cvode_spgmr.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/cvode/cvode_spgmr.h" >&5 -$as_echo_n "checking for $with_module/include/cvode/cvode_spgmr.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/cvode/cvode_spgmr.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/cvode/cvode_spgmr.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/cvode/cvode_bbdpre.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/cvode/cvode_bbdpre.h" >&5 -$as_echo_n "checking for $with_module/include/cvode/cvode_bbdpre.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/cvode/cvode_bbdpre.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/cvode/cvode_bbdpre.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/nvector/nvector_parallel.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/nvector/nvector_parallel.h" >&5 -$as_echo_n "checking for $with_module/include/nvector/nvector_parallel.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/nvector/nvector_parallel.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/nvector/nvector_parallel.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/sundials/sundials_types.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/sundials/sundials_types.h" >&5 -$as_echo_n "checking for $with_module/include/sundials/sundials_types.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/sundials/sundials_types.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/sundials/sundials_types.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi - - if test $sundials_module_includes_found = no; then : - - # ...or path to $module_upper lib dir - as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/cvode/cvode.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/cvode/cvode.h" >&5 -$as_echo_n "checking for $with_module/../include/cvode/cvode.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/cvode/cvode.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/cvode/cvode.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/cvode/cvode_spgmr.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/cvode/cvode_spgmr.h" >&5 -$as_echo_n "checking for $with_module/../include/cvode/cvode_spgmr.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/cvode/cvode_spgmr.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/cvode/cvode_spgmr.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/cvode/cvode_bbdpre.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/cvode/cvode_bbdpre.h" >&5 -$as_echo_n "checking for $with_module/../include/cvode/cvode_bbdpre.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/cvode/cvode_bbdpre.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/cvode/cvode_bbdpre.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/nvector/nvector_parallel.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/nvector/nvector_parallel.h" >&5 -$as_echo_n "checking for $with_module/../include/nvector/nvector_parallel.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/nvector/nvector_parallel.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/nvector/nvector_parallel.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/sundials/sundials_types.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/sundials/sundials_types.h" >&5 -$as_echo_n "checking for $with_module/../include/sundials/sundials_types.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/sundials/sundials_types.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/sundials/sundials_types.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi - - -fi - - if test $sundials_module_includes_found = no; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Missing one or more $module_upper headers -See \`config.log' for more details" "$LINENO" 5; } -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: Found $module_upper include path: $sundials_module_includes_path" >&5 -$as_echo "$as_me: Found $module_upper include path: $sundials_module_includes_path" >&6;} - - # We've now got the include directory and can specify what libraries we need - sundials_module_includes="-I$sundials_module_includes_path" - sundials_module_libs="-lsundials_cvode -lsundials_nvecparallel $SUNDIALS_EXTRA_LIBS" - - # Try compiling something simple with a few different common paths - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - for sundials_module_lib_path in "$with_module" "$with_module/lib" "$with_module/lib64" - do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SUNDIALS $module_upper library path is $sundials_module_lib_path" >&5 -$as_echo_n "checking if SUNDIALS $module_upper library path is $sundials_module_lib_path... " >&6; } - LIBS="$save_LIBS $sundials_module_libs" - LDFLAGS="$save_LDFLAGS -L$sundials_module_lib_path" - CPPFLAGS="$save_CPPFLAGS $sundials_module_includes" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #include - extern void foo(N_Vector); - - -int -main () -{ - - #if SUNDIALS_VERSION_MAJOR >= 4 - CVodeCreate(0); - #else - CVodeCreate(0, 0); - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - sundials_module_lib_path_found=yes -else - sundials_module_lib_path_found=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_module_lib_path_found" >&5 -$as_echo "$sundials_module_lib_path_found" >&6; } - if test "x$sundials_module_lib_path_found" = "xyes"; then : - break -fi - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS="$save_CPPFLAGS" - done - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - SUNDIALS_MODULE_LDFLAGS="-L$sundials_module_lib_path" - -fi - - if test "x$sundials_module_lib_path_found" = "xno"; then : - { { $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 compile $module_upper program -See \`config.log' for more details" "$LINENO" 5; } -fi - - # Compile in the $module_upper solver - { $as_echo "$as_me:${as_lineno-$LINENO}: => $module_upper solver enabled" >&5 -$as_echo "$as_me: => $module_upper solver enabled" >&6;} - EXTRA_LIBS="$EXTRA_LIBS $SUNDIALS_MODULE_LDFLAGS $sundials_module_libs" - EXTRA_INCS="$EXTRA_INCS $sundials_module_includes" - - eval "`$as_echo "BOUT_HAS_$module_upper" | $as_tr_sh`=yes" - eval "`$as_echo "${module_upper}LIBS" | $as_tr_sh`=\"\$SUNDIALS_MODULE_LDFLAGS \$sundials_module_libs\"" - eval "`$as_echo "${module_upper}INCS" | $as_tr_sh`=\"\$sundials_module_includes\"" - - -fi - -if test "x$with_arkode" != "x" && test "x$with_arkode" != "xno"; then : - - - - with_module=$with_arkode - module_upper=ARKODE - - { $as_echo "$as_me:${as_lineno-$LINENO}: Searching for SUNDIALS $module_upper library" >&5 -$as_echo "$as_me: Searching for SUNDIALS $module_upper library" >&6;} - if test "$with_module" = "yes"; then : - - # No path specified. Try using sundials-config - # Extract the first word of "sundials-config", so it can be a program name with args. -set dummy sundials-config; 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_path_sundials_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $sundials_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_sundials_config="$sundials_config" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $with_sundials$PATH_SEPARATOR$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_path_sundials_config="$as_dir/$ac_word$ac_exec_ext" - $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 - - test -z "$ac_cv_path_sundials_config" && ac_cv_path_sundials_config="no" - ;; -esac -fi -sundials_config=$ac_cv_path_sundials_config -if test -n "$sundials_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_config" >&5 -$as_echo "$sundials_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$sundials_config" != xno; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found sundials-config, this means your version of SUNDIALS is < 2.6, and probably won't work" >&5 -$as_echo "$as_me: WARNING: Found sundials-config, this means your version of SUNDIALS is < 2.6, and probably won't work" >&2;} - sundials_module_includes=`$sundials_config -m arkode -t p -l c -s cppflags` - sundials_module_libs=`$sundials_config -m arkode -t p -l c -s libs` - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No sundials-config available, no path given, will try compiling with $module_upper anyway" >&5 -$as_echo "$as_me: WARNING: No sundials-config available, no path given, will try compiling with $module_upper anyway" >&2;} - sundials_module_includes="" - # Need to link to libsundials_ida, libsundials_cvode or libsundials_arkode - sundials_module_libs="-lsundials_arkode -lsundials_nvecparallel $SUNDIALS_EXTRA_LIBS" - -fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile with SUNDIALS $module_upper" >&5 -$as_echo_n "checking if we can compile with SUNDIALS $module_upper... " >&6; } - save_LIBS=$LIBS - save_CXXFLAGS=$CXXFLAGS - LIBS="$save_LIBS $sundials_module_libs" - CXXFLAGS="$save_CXXFLAGS $sundials_module_includes" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #if SUNDIALS_VERSION_MAJOR >= 4 - #include - #else - #include - #endif - extern void foo(N_Vector); - - -int -main () -{ - - #if SUNDIALS_VERSION_MAJOR >= 4 - ARKStepCreate(0, 0, 0, 0); - #else - ARKodeCreate(); - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - sundials_config_worked=yes -else - sundials_config_worked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_config_worked" >&5 -$as_echo "$sundials_config_worked" >&6; } - if test $sundials_config_worked = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Using SUNDIALS $module_upper solver" >&5 -$as_echo "$as_me: Using SUNDIALS $module_upper solver" >&6;} - -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 $? "Could not compile SUNDIALS $module_upper program, check your SUNDIALS version -See \`config.log' for more details" "$LINENO" 5; } - -fi - LIBS=$save_LIBS - CXXFLAGS="$save_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -else - - # Specified with path - { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for $module_upper header files" >&5 -$as_echo "$as_me: Checking for $module_upper header files" >&6;} - - # Check whether user supplied path to $module_upper install dir... - as_ac_File=`$as_echo "ac_cv_file_$with_module/include/arkode/arkode.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/arkode/arkode.h" >&5 -$as_echo_n "checking for $with_module/include/arkode/arkode.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/arkode/arkode.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/arkode/arkode.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/arkode/arkode_spgmr.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/arkode/arkode_spgmr.h" >&5 -$as_echo_n "checking for $with_module/include/arkode/arkode_spgmr.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/arkode/arkode_spgmr.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/arkode/arkode_spgmr.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/arkode/arkode_bbdpre.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/arkode/arkode_bbdpre.h" >&5 -$as_echo_n "checking for $with_module/include/arkode/arkode_bbdpre.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/arkode/arkode_bbdpre.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/arkode/arkode_bbdpre.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/nvector/nvector_parallel.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/nvector/nvector_parallel.h" >&5 -$as_echo_n "checking for $with_module/include/nvector/nvector_parallel.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/nvector/nvector_parallel.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/nvector/nvector_parallel.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/include/sundials/sundials_types.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/include/sundials/sundials_types.h" >&5 -$as_echo_n "checking for $with_module/include/sundials/sundials_types.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/include/sundials/sundials_types.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/include/sundials/sundials_types.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include -else - sundials_module_includes_found=no -fi - - if test $sundials_module_includes_found = no; then : - - # ...or path to $module_upper lib dir - as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/arkode/arkode.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/arkode/arkode.h" >&5 -$as_echo_n "checking for $with_module/../include/arkode/arkode.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/arkode/arkode.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/arkode/arkode.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/arkode/arkode_spgmr.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/arkode/arkode_spgmr.h" >&5 -$as_echo_n "checking for $with_module/../include/arkode/arkode_spgmr.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/arkode/arkode_spgmr.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/arkode/arkode_spgmr.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/arkode/arkode_bbdpre.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/arkode/arkode_bbdpre.h" >&5 -$as_echo_n "checking for $with_module/../include/arkode/arkode_bbdpre.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/arkode/arkode_bbdpre.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/arkode/arkode_bbdpre.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/nvector/nvector_parallel.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/nvector/nvector_parallel.h" >&5 -$as_echo_n "checking for $with_module/../include/nvector/nvector_parallel.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/nvector/nvector_parallel.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/nvector/nvector_parallel.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi -as_ac_File=`$as_echo "ac_cv_file_$with_module/../include/sundials/sundials_types.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_module/../include/sundials/sundials_types.h" >&5 -$as_echo_n "checking for $with_module/../include/sundials/sundials_types.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$with_module/../include/sundials/sundials_types.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$with_module/../include/sundials/sundials_types.h" | $as_tr_cpp` 1 -_ACEOF -sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include -else - sundials_module_includes_found=no -fi - - -fi - - if test $sundials_module_includes_found = no; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Missing one or more $module_upper headers -See \`config.log' for more details" "$LINENO" 5; } -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: Found $module_upper include path: $sundials_module_includes_path" >&5 -$as_echo "$as_me: Found $module_upper include path: $sundials_module_includes_path" >&6;} - - # We've now got the include directory and can specify what libraries we need - sundials_module_includes="-I$sundials_module_includes_path" - sundials_module_libs="-lsundials_arkode -lsundials_nvecparallel $SUNDIALS_EXTRA_LIBS" - - # Try compiling something simple with a few different common paths - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - for sundials_module_lib_path in "$with_module" "$with_module/lib" "$with_module/lib64" - do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SUNDIALS $module_upper library path is $sundials_module_lib_path" >&5 -$as_echo_n "checking if SUNDIALS $module_upper library path is $sundials_module_lib_path... " >&6; } - LIBS="$save_LIBS $sundials_module_libs" - LDFLAGS="$save_LDFLAGS -L$sundials_module_lib_path" - CPPFLAGS="$save_CPPFLAGS $sundials_module_includes" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #if SUNDIALS_VERSION_MAJOR >= 4 - #include - #else - #include - #endif - extern void foo(N_Vector); - - -int -main () -{ - - #if SUNDIALS_VERSION_MAJOR >= 4 - ARKStepCreate(0, 0, 0, 0); - #else - ARKodeCreate(); - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - sundials_module_lib_path_found=yes -else - sundials_module_lib_path_found=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sundials_module_lib_path_found" >&5 -$as_echo "$sundials_module_lib_path_found" >&6; } - if test "x$sundials_module_lib_path_found" = "xyes"; then : - break -fi - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS="$save_CPPFLAGS" - done - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - SUNDIALS_MODULE_LDFLAGS="-L$sundials_module_lib_path" - -fi - - if test "x$sundials_module_lib_path_found" = "xno"; then : - { { $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 compile $module_upper program -See \`config.log' for more details" "$LINENO" 5; } -fi - - # Compile in the $module_upper solver - { $as_echo "$as_me:${as_lineno-$LINENO}: => $module_upper solver enabled" >&5 -$as_echo "$as_me: => $module_upper solver enabled" >&6;} - EXTRA_LIBS="$EXTRA_LIBS $SUNDIALS_MODULE_LDFLAGS $sundials_module_libs" - EXTRA_INCS="$EXTRA_INCS $sundials_module_includes" - - eval "`$as_echo "BOUT_HAS_$module_upper" | $as_tr_sh`=yes" - eval "`$as_echo "${module_upper}LIBS" | $as_tr_sh`=\"\$SUNDIALS_MODULE_LDFLAGS \$sundials_module_libs\"" - eval "`$as_echo "${module_upper}INCS" | $as_tr_sh`=\"\$sundials_module_includes\"" - - -fi - -############################################################# -# HYPRE -############################################################# - -BOUT_HAS_HYPRE="no" -if test "$with_hypre" != "no"; then : - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HYPRE.h" >&5 -$as_echo_n "checking for HYPRE.h... " >&6; } - - save_CPPFLAGS=$CPPFLAGS - BACH_found=no - - if test ."$with_hypre - " != .yes; then : - extra_prefix="$with_hypre - " -else - extra_prefix="" -fi - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - BACH_found=yes - - - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $BACH_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local - do - for path in $search_prefix $search_prefix/include - do - if test -d $path; then : - - CPPFLAGS="$save_CPPFLAGS -I$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - BACH_found=yes - EXTRA_INCS="$EXTRA_INCS -I$path" - - - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - done - if test .$BACH_found = .yes; then : - break; -fi - done - -fi - - if test $BACH_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CPPFLAGS=$save_CPPFLAGS - -fi - if test .$BACH_found = .yes; then : - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libHYPRE" >&5 -$as_echo_n "checking for libHYPRE... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - BACL_found=no - - # Try with no extra libraries first - if test ."$with_hypre" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_hypre" -fi - LIBS="$save_LIBS $EXTRA_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char HYPRE_IJVectorCreate(); - -int -main () -{ -return HYPRE_IJVectorCreate(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - - # Now try with explicitly linking library - if test $BACL_found != yes; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lHYPRE" - if test ."$with_hypre" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_hypre" -fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char HYPRE_IJVectorCreate(); - -int -main () -{ -return HYPRE_IJVectorCreate(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -lHYPRE" - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - - if test $BACL_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local ; do - for path in $search_prefix $search_prefix/lib $search_prefix/lib64 $search_prefix/x86_64-linux-gnu - do - if test -d $path; then : - - LIBS="$save_LIBS $EXTRA_LIBS -lHYPRE" - LDFLAGS="$save_LDFLAGS -L$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char HYPRE_IJVectorCreate(); - -int -main () -{ -return HYPRE_IJVectorCreate(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -L$path -lHYPRE" - - - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - done - if test .$BACL_found = .yes; then : - break; -fi - done - -fi - - if test $BACL_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - if test $BACL_found = yes; then : - - BOUT_HAS_HYPRE="yes" - -else - as_fn_error $? "HYPRE requested but not found" "$LINENO" 5 -fi - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS=$save_CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -else - as_fn_error $? "HYPRE requested but not found" "$LINENO" 5 -fi - - -fi - -############################################################# -# Scorep setup -############################################################# - -BOUT_HAS_SCOREP="no" -if test "$with_scorep" != "no"; then : - - - if test "$with_scorep" != "yes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Searching for Scorep executable in $with_scorep" >&5 -$as_echo "$as_me: Searching for Scorep executable in $with_scorep" >&6;} - # Extract the first word of "scorep", so it can be a program name with args. -set dummy scorep; 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_path_SCOREPPATH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $SCOREPPATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_SCOREPPATH="$SCOREPPATH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $with_scorep -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_path_SCOREPPATH="$as_dir/$ac_word$ac_exec_ext" - $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 - - ;; -esac -fi -SCOREPPATH=$ac_cv_path_SCOREPPATH -if test -n "$SCOREPPATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SCOREPPATH" >&5 -$as_echo "$SCOREPPATH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Searching for Scorep executable" >&5 -$as_echo "$as_me: Searching for Scorep executable" >&6;} - # Extract the first word of "scorep", so it can be a program name with args. -set dummy scorep; 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_path_SCOREPPATH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $SCOREPPATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_SCOREPPATH="$SCOREPPATH" # Let the user override the test with a path. - ;; - *) - 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_path_SCOREPPATH="$as_dir/$ac_word$ac_exec_ext" - $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 - - ;; -esac -fi -SCOREPPATH=$ac_cv_path_SCOREPPATH -if test -n "$SCOREPPATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SCOREPPATH" >&5 -$as_echo "$SCOREPPATH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -fi - - if test "$SCOREPPATH" = ""; then : - - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "*** Scorep requested, but executable not found. -Please supply the path using --with-scorep=/path/to/scorep -See \`config.log' for more details" "$LINENO" 5; } - -else - - CXX="$SCOREPPATH --user --nocompiler $CXX" - BOUT_HAS_SCOREP="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: Scorep support enabled" >&5 -$as_echo "$as_me: Scorep support enabled" >&6;} - -fi - - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Scorep support disabled" >&5 -$as_echo "$as_me: Scorep support disabled" >&6;} - -fi - -############################################################# -# Check for mpark.variant -############################################################# - -if test ".$with_system_mpark" = "no"; then : - - SYSTEM_HAS_MPARK=no - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpark.variant" >&5 -$as_echo_n "checking for mpark.variant... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include "mpark/variant.hpp" - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SYSTEM_HAS_MPARK=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SYSTEM_HAS_MPARK=no - if test "$with_system_mpark" = "yes"; then : - - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "*** System mpark.variant not found - but requested to use -See \`config.log' for more details" "$LINENO" 5; } - -fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - -if test "$SYSTEM_HAS_MPARK" = "yes"; then : - - MPARK_VARIANT_INCLUDE_PATH= - MPARK_INCLUDE= - OWN_MPARK= - -else - - if test -d externalpackages/mpark.variant/include; then : - -else - if test -d .git && which git; then : - - make -f makefile.submodules mpark_submodule || \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "*** Could not download mpark.variant -See \`config.log' for more details" "$LINENO" 5; } - -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 $? "mpark.variant not found. Please install mpark.variant or use the official releases. -See \`config.log' for more details" "$LINENO" 5; } - -fi - -fi - - MPARK_VARIANT_INCLUDE_PATH="$PWD/externalpackages/mpark.variant/include" - MPARK_INCLUDE="-I$MPARK_VARIANT_INCLUDE_PATH" - OWN_MPARK=yes - -fi - -############################################################# -# Check for libuuid -############################################################# - -if test ".$with_system_uuid" = "no"; then : - - BOUT_HAS_UUID_SYSTEM_GENERATOR=no - -else - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid/uuid.h" >&5 -$as_echo_n "checking for uuid/uuid.h... " >&6; } - - save_CPPFLAGS=$CPPFLAGS - BACH_found=no - - if test ."$with_system_uuid" != .yes; then : - extra_prefix="$with_system_uuid" -else - extra_prefix="" -fi - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - BACH_found=yes - - - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $BACH_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local - do - for path in $search_prefix $search_prefix/include - do - if test -d $path; then : - - CPPFLAGS="$save_CPPFLAGS -I$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - BACH_found=yes - EXTRA_INCS="$EXTRA_INCS -I$path" - - - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - done - if test .$BACH_found = .yes; then : - break; -fi - done - -fi - - if test $BACH_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CPPFLAGS=$save_CPPFLAGS - -fi - if test .$BACH_found = .yes; then : - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuuid" >&5 -$as_echo_n "checking for libuuid... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - BACL_found=no - - # Try with no extra libraries first - if test ."$with_system_uuid" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_system_uuid" -fi - LIBS="$save_LIBS $EXTRA_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char uuid_generate(); - -int -main () -{ -return uuid_generate(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - - # Now try with explicitly linking library - if test $BACL_found != yes; then : - - LIBS="$save_LIBS $EXTRA_LIBS -luuid" - if test ."$with_system_uuid" = .yes; then : - extra_prefix="" -else - extra_prefix="$with_system_uuid" -fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char uuid_generate(); - -int -main () -{ -return uuid_generate(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -luuid" - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - - if test $BACL_found != yes; then : - - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local ; do - for path in $search_prefix $search_prefix/lib $search_prefix/lib64 $search_prefix/x86_64-linux-gnu - do - if test -d $path; then : - - LIBS="$save_LIBS $EXTRA_LIBS -luuid" - LDFLAGS="$save_LDFLAGS -L$path" - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern "C" - char uuid_generate(); - -int -main () -{ -return uuid_generate(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -L$path -luuid" - - - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - done - if test .$BACL_found = .yes; then : - break; -fi - done - -fi - - if test $BACL_found = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - if test $BACL_found = yes; then : - BOUT_HAS_UUID_SYSTEM_GENERATOR=yes -else - BOUT_HAS_UUID_SYSTEM_GENERATOR=no -fi - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS=$save_CPPFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -else - BOUT_HAS_UUID_SYSTEM_GENERATOR=no -fi - - if test "$with_system_uuid" = "yes"; then : - - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "*** System UUID generator not found, but explicitly requested -See \`config.log' for more details" "$LINENO" 5; } - -fi - -fi - -############################################################# -# Download + Build PVODE '98 -############################################################# - -as_dir=externalpackages; as_fn_mkdir_p -as_dir=lib; as_fn_mkdir_p -as_dir=include; as_fn_mkdir_p - -BOUT_HAS_PVODE="no" -if test "$with_pvode" != "no"; then : - - if test "$enable_pvode_openmp" != "no" ; then : - - if test "$enable_openmp" != "no" ; then : - - PVODE_FLAGS="$CXXFLAGS $OPENMP_CXXFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: PVODE being built with OpenMP support" >&5 -$as_echo "$as_me: PVODE being built with OpenMP support" >&6;} - -else - - as_fn_error $? "Cannot enable openmp in PVODE as configuring with OpenMP disabled" "$LINENO" 5 - -fi - -else - - PVODE_FLAGS="$CXXFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: PVODE being built without OpenMP support" >&5 -$as_echo "$as_me: PVODE being built without OpenMP support" >&6;} - -fi - # Clean PVODE - CXX="$CXX" CXXFLAGS=$PVODE_FLAGS MKDIR="$MKDIR_P" RANLIB="$RANLIB" $MAKE clean -C externalpackages/PVODE/precon/ >> config-build.log 2>&1 - CXX="$CXX" CXXFLAGS=$PVODE_FLAGS MKDIR="$MKDIR_P" RANLIB="$RANLIB" $MAKE clean -C externalpackages/PVODE/source/ >> config-build.log 2>&1 - - { $as_echo "$as_me:${as_lineno-$LINENO}: Building PVODE" >&5 -$as_echo "$as_me: Building PVODE" >&6;} - echo "* Building PVODE" >> config-build.log - echo "*************************************************************" >> config-build.log - - CXX="$CXX" CXXFLAGS=$PVODE_FLAGS MKDIR="$MKDIR_P" RANLIB="$RANLIB" $MAKE -C externalpackages/PVODE/precon/ >> config-build.log 2>&1 - CXX="$CXX" CXXFLAGS=$PVODE_FLAGS MKDIR="$MKDIR_P" RANLIB="$RANLIB" $MAKE -C externalpackages/PVODE/source/ >> config-build.log 2>&1 - - if test -f externalpackages/PVODE/lib/libpvode.a && test -f externalpackages/PVODE/lib/libpvpre.a; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Successfully built PVODE" >&5 -$as_echo "$as_me: Successfully built PVODE" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Installing PVODE into BOUT++ sourcetree" >&5 -$as_echo "$as_me: Installing PVODE into BOUT++ sourcetree" >&6;} - - echo "*************************************************************" >> config-build.log - echo "* Successfully built PVODE" >> config-build.log - echo "*************************************************************" >> config-build.log - echo "* Installing PVODE into BOUT++ sourcetree" >> config-build.log - echo "*************************************************************" >> config-build.log - -else - - as_fn_error $? "Could not build PVODE. See config-build.log for errors" "$LINENO" 5 - -fi - - # Set the correct libraries and copy them to bout - as_dir=include/pvode; as_fn_mkdir_p - cp -r externalpackages/PVODE/include/pvode include - cp externalpackages/PVODE/lib/*.a lib/ - EXTRA_LIBS="$EXTRA_LIBS -L\$(BOUT_LIB_PATH) -lpvode -lpvpre" - BOUT_HAS_PVODE="yes" - -fi - -############################################################# -# Localisation (i18n) with gettext -############################################################# - -BOUT_HAS_GETTEXT="no" -# Use macro to test if Natural Language Support (gettext) is available. -# If available sets: -# - USE_NLS to "yes" -# - LIBINTL to the linker options -# - Modifies CPPFLAGS if needed - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 -$as_echo_n "checking whether NLS is requested... " >&6; } - # Check whether --enable-nls was given. -if test "${enable_nls+set}" = set; then : - enableval=$enable_nls; USE_NLS=$enableval -else - USE_NLS=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } - - - - - GETTEXT_MACRO_VERSION=0.19 - - - - -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - 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 - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "msgfmt", so it can be a program name with args. -set dummy msgfmt; 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_path_MSGFMT+:} false; then : - $as_echo_n "(cached) " >&6 -else - case "$MSGFMT" in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - echo "$as_me: trying $ac_dir/$ac_word..." >&5 - if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" - test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" - ;; -esac -fi -MSGFMT="$ac_cv_path_MSGFMT" -if test "$MSGFMT" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 -$as_echo "$MSGFMT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - # Extract the first word of "gmsgfmt", so it can be a program name with args. -set dummy gmsgfmt; 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_path_GMSGFMT+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $GMSGFMT in - [\\/]* | ?:[\\/]*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - *) - 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_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" - $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 - - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" - ;; -esac -fi -GMSGFMT=$ac_cv_path_GMSGFMT -if test -n "$GMSGFMT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 -$as_echo "$GMSGFMT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac - - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; - *) GMSGFMT_015=$GMSGFMT ;; - esac - - - -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - 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 - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; 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_path_XGETTEXT+:} false; then : - $as_echo_n "(cached) " >&6 -else - case "$XGETTEXT" in - [\\/]* | ?:[\\/]*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - echo "$as_me: trying $ac_dir/$ac_word..." >&5 - if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" - ;; -esac -fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test "$XGETTEXT" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 -$as_echo "$XGETTEXT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - rm -f messages.po - - case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; - *) XGETTEXT_015=$XGETTEXT ;; - esac - - - -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - 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 - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "msgmerge", so it can be a program name with args. -set dummy msgmerge; 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_path_MSGMERGE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case "$MSGMERGE" in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - echo "$as_me: trying $ac_dir/$ac_word..." >&5 - if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then - ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" - test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" - ;; -esac -fi -MSGMERGE="$ac_cv_path_MSGMERGE" -if test "$MSGMERGE" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 -$as_echo "$MSGMERGE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$localedir" || localedir='${datadir}/locale' - - - test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= - - - ac_config_commands="$ac_config_commands po-directories" - - - - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" - -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 - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; 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}gcc" - $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 - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; 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="gcc" - $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 - - 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 -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; 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}cc" - $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 - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; 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 - ac_prog_rejected=no -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 - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $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 - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -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 - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - 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 cl.exe -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 - -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 - -{ $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=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - 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 - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` - while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${acl_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$acl_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${acl_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$acl_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$acl_cv_prog_gnu_ld - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -$as_echo_n "checking for shared library run path origin... " >&6; } -if ${acl_cv_rpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -$as_echo "$acl_cv_rpath" >&6; } - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : - enableval=$enable_rpath; : -else - enable_rpath=yes -fi - - - - - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -$as_echo_n "checking for 64-bit host... " >&6; } -if ${gl_cv_solaris_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef _LP64 -sixtyfour bits -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sixtyfour bits" >/dev/null 2>&1; then : - gl_cv_solaris_64bit=yes -else - gl_cv_solaris_64bit=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -$as_echo "$gl_cv_solaris_64bit" >&6; } - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" - - - - - - - - - - - - - use_additional=yes - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - -# Check whether --with-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then : - withval=$with_libiconv_prefix; - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi - -fi - - LIBICONV= - LTLIBICONV= - INCICONV= - LIBICONV_PREFIX= - HAVE_LIBICONV= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='iconv ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$acl_hardcode_direct" = yes; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = 'iconv'; then - LIBICONV_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = 'iconv'; then - LIBICONV_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" - ;; - esac - done - fi - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" - done - fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 -$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : - $as_echo_n "(cached) " >&6 -else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -CFPreferencesCopyAppValue(NULL, NULL) - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - gt_cv_func_CFPreferencesCopyAppValue=yes -else - gt_cv_func_CFPreferencesCopyAppValue=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - -$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 -$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : - $as_echo_n "(cached) " >&6 -else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -CFLocaleCopyCurrent(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - gt_cv_func_CFLocaleCopyCurrent=yes -else - gt_cv_func_CFLocaleCopyCurrent=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - -$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h - - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - - - - - - - LIBINTL= - LTLIBINTL= - POSUB= - - case " $gt_needs " in - *" need-formatstring-macros "*) gt_api_version=3 ;; - *" need-ngettext "*) gt_api_version=2 ;; - *) gt_api_version=1 ;; - esac - gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" - gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" - - if test "$USE_NLS" = "yes"; then - gt_use_preinstalled_gnugettext=no - - - if test $gt_api_version -ge 3; then - gt_revision_test_code=' -#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -' - else - gt_revision_test_code= - fi - if test $gt_api_version -ge 2; then - gt_expression_test_code=' + * ngettext ("", "", 0)' - else - gt_expression_test_code= - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 -$as_echo_n "checking for GNU gettext in libc... " >&6; } -if eval \${$gt_func_gnugettext_libc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings; -#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) -#else -#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 -#endif -$gt_revision_test_code - -int -main () -{ - -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - eval "$gt_func_gnugettext_libc=yes" -else - eval "$gt_func_gnugettext_libc=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$gt_func_gnugettext_libc - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - - - - - - am_save_CPPFLAGS="$CPPFLAGS" - - for element in $INCICONV; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -$as_echo_n "checking for iconv... " >&6; } -if ${am_cv_func_iconv+:} false; then : - $as_echo_n "(cached) " >&6 -else - - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - am_cv_func_iconv=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - am_cv_lib_iconv=yes - am_cv_func_iconv=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -$as_echo "$am_cv_func_iconv" >&6; } - if test "$am_cv_func_iconv" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 -$as_echo_n "checking for working iconv... " >&6; } -if ${am_cv_func_iconv_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - - am_save_LIBS="$LIBS" - if test $am_cv_lib_iconv = yes; then - LIBS="$LIBS $LIBICONV" - fi - am_cv_func_iconv_works=no - for ac_iconv_const in '' 'const'; do - if test "$cross_compiling" = yes; then : - case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -#ifndef ICONV_CONST -# define ICONV_CONST $ac_iconv_const -#endif - -int -main () -{ -int result = 0; - /* Test against AIX 5.1 bug: Failures are not distinguishable from successful - returns. */ - { - iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); - if (cd_utf8_to_88591 != (iconv_t)(-1)) - { - static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ - char buf[10]; - ICONV_CONST char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_utf8_to_88591, - &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - result |= 1; - iconv_close (cd_utf8_to_88591); - } - } - /* Test against Solaris 10 bug: Failures are not distinguishable from - successful returns. */ - { - iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); - if (cd_ascii_to_88591 != (iconv_t)(-1)) - { - static ICONV_CONST char input[] = "\263"; - char buf[10]; - ICONV_CONST char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_ascii_to_88591, - &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - result |= 2; - iconv_close (cd_ascii_to_88591); - } - } - /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static ICONV_CONST char input[] = "\304"; - static char buf[2] = { (char)0xDE, (char)0xAD }; - ICONV_CONST char *inptr = input; - size_t inbytesleft = 1; - char *outptr = buf; - size_t outbytesleft = 1; - size_t res = iconv (cd_88591_to_utf8, - &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) - result |= 4; - iconv_close (cd_88591_to_utf8); - } - } -#if 0 /* This bug could be worked around by the caller. */ - /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; - char buf[50]; - ICONV_CONST char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_88591_to_utf8, - &inptr, &inbytesleft, - &outptr, &outbytesleft); - if ((int)res > 0) - result |= 8; - iconv_close (cd_88591_to_utf8); - } - } -#endif - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - am_cv_func_iconv_works=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - test "$am_cv_func_iconv_works" = no || break - done - LIBS="$am_save_LIBS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 -$as_echo "$am_cv_func_iconv_works" >&6; } - case "$am_cv_func_iconv_works" in - *no) am_func_iconv=no am_cv_lib_iconv=no ;; - *) am_func_iconv=yes ;; - esac - else - am_func_iconv=no am_cv_lib_iconv=no - fi - if test "$am_func_iconv" = yes; then - -$as_echo "#define HAVE_ICONV 1" >>confdefs.h - - fi - if test "$am_cv_lib_iconv" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -$as_echo_n "checking how to link with libiconv... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -$as_echo "$LIBICONV" >&6; } - else - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - - - - - - - - - - - - use_additional=yes - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - -# Check whether --with-libintl-prefix was given. -if test "${with_libintl_prefix+set}" = set; then : - withval=$with_libintl_prefix; - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi - -fi - - LIBINTL= - LTLIBINTL= - INCINTL= - LIBINTL_PREFIX= - HAVE_LIBINTL= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='intl ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBINTL; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$acl_hardcode_direct" = yes; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBINTL; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" - else - LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" - else - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = 'intl'; then - LIBINTL_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = 'intl'; then - LIBINTL_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCINTL; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBINTL; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBINTL; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" - ;; - esac - done - fi - else - LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" - done - fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 -$as_echo_n "checking for GNU gettext in libintl... " >&6; } -if eval \${$gt_func_gnugettext_libintl+:} false; then : - $as_echo_n "(cached) " >&6 -else - gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $INCINTL" - gt_save_LIBS="$LIBS" - LIBS="$LIBS $LIBINTL" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *); -#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) -#else -#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 -#endif -$gt_revision_test_code - -int -main () -{ - -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - eval "$gt_func_gnugettext_libintl=yes" -else - eval "$gt_func_gnugettext_libintl=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *); -#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) -#else -#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 -#endif -$gt_revision_test_code - -int -main () -{ - -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS" -fi -eval ac_res=\$$gt_func_gnugettext_libintl - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - fi - - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ - || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ - && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then - gt_use_preinstalled_gnugettext=yes - else - LIBINTL= - LTLIBINTL= - INCINTL= - fi - - - - if test -n "$INTL_MACOSX_LIBS"; then - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" - LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" - fi - fi - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - -$as_echo "#define ENABLE_NLS 1" >>confdefs.h - - else - USE_NLS=no - fi - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 -$as_echo_n "checking whether to use NLS... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } - if test "$USE_NLS" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 -$as_echo_n "checking where the gettext function comes from... " >&6; } - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - gt_source="external libintl" - else - gt_source="libc" - fi - else - gt_source="included intl directory" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 -$as_echo "$gt_source" >&6; } - fi - - if test "$USE_NLS" = "yes"; then - - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 -$as_echo_n "checking how to link with libintl... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 -$as_echo "$LIBINTL" >&6; } - - for element in $INCINTL; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done - - fi - - -$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h - - -$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h - - fi - - POSUB=po - fi - - - - INTLLIBS="$LIBINTL" - - - - - - -if test "$USE_NLS" = "yes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling language support with gettext" >&5 -$as_echo "$as_me: Enabling language support with gettext" >&6;} - # Turn the .po files into .mo files - $MAKE -C locale | tee -a config-build.log 2>&1 - - # Note: BOUT_LOCALE_PATH is defined in make.config, and may be changed by `make install`. - CXXFLAGS="$CXXFLAGS -DBOUT_LOCALE_PATH=\$(BOUT_LOCALE_PATH)" - - EXTRA_LIBS="$EXTRA_LIBS $LIBINTL" - - # Set variable substituted into bout-config - BOUT_HAS_GETTEXT="yes" - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: Language support with gettext not available" >&5 -$as_echo "$as_me: Language support with gettext not available" >&6;} - -fi - -############################################################# -# Sort out fmt -############################################################# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .git" >&5 -$as_echo_n "checking for .git... " >&6; } -if ${ac_cv_file__git+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r ".git"; then - ac_cv_file__git=yes -else - ac_cv_file__git=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__git" >&5 -$as_echo "$ac_cv_file__git" >&6; } -if test "x$ac_cv_file__git" = xyes; then : - - if test "x$BOUT_DONT_UPDATE_GIT_SUBMODULE" == "x"; then : - - git submodule update --init externalpackages/fmt - -fi - -fi - - -ac_config_links="$ac_config_links src/fmt/format.cxx:externalpackages/fmt/src/format.cc" - - -############################################################# -# Check environment -############################################################# - -if test "$CXXINCLUDE" != ""; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: ================================================" >&5 -$as_echo "$as_me: ================================================" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CXXINCLUDE environment variable set to:" >&5 -$as_echo "$as_me: WARNING: CXXINCLUDE environment variable set to:" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: $CXXINCLUDE" >&5 -$as_echo "$as_me: $CXXINCLUDE" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: => This will be added to compile commands" >&5 -$as_echo "$as_me: => This will be added to compile commands" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: If this is not intended, then run" >&5 -$as_echo "$as_me: If this is not intended, then run" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: export CXXINCLUDE=''" >&5 -$as_echo "$as_me: export CXXINCLUDE=''" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: before making BOUT++" >&5 -$as_echo "$as_me: before making BOUT++" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: ================================================" >&5 -$as_echo "$as_me: ================================================" >&6;} - -fi - -############################################################# -# Gather configuration info for bout-config -############################################################# - -EXTRA_INCS="${EXTRA_INCS} ${CPPFLAGS}" - -PREFIX=$PWD -IDLCONFIGPATH=$PWD/tools/idllib -PYTHONCONFIGPATH=$PWD/tools/pylib - -BOUT_HAS_IDA="yes" -if test "$IDALIBS" = "" -then - BOUT_HAS_IDA="no" -fi - -BOUT_HAS_CVODE="yes" -if test "$CVODELIBS" = "" -then - BOUT_HAS_CVODE="no" -fi - -BOUT_HAS_ARKODE="yes" -if test "$ARKODELIBS" = "" -then - BOUT_HAS_ARKODE="no" -fi - -BOUT_HAS_PNETCDF="yes" -if test "$PNCPATH" = "" -then - BOUT_HAS_PNETCDF="no" -fi - -# Only make.config is altered by configure -ac_config_files="$ac_config_files make.config" - -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}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -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 - - -if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then - as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" 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 BOUT++ $as_me 5.1.0, 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 - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_links="$ac_config_links" -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 - -Configuration files: -$config_files - -Configuration links: -$config_links - -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="\\ -BOUT++ config.status 5.1.0 -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' -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;; - --he | --h | --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 -# -# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - - -_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 - "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; - "src/fmt/format.cxx") CONFIG_LINKS="$CONFIG_LINKS src/fmt/format.cxx:externalpackages/fmt/src/format.cc" ;; - "make.config") CONFIG_FILES="$CONFIG_FILES make.config" ;; - - *) 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_LINKS+set}" = set || CONFIG_LINKS=$config_links - 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" - - -eval set X " :F $CONFIG_FILES :L $CONFIG_LINKS :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 - ;; - - :L) - # - # CONFIG_LINK - # - - if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then - : - else - # Prefer the file from the source tree if names are identical. - if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then - ac_source=$srcdir/$ac_source - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 -$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} - - if test ! -r "$ac_source"; then - as_fn_error $? "$ac_source: file not found" "$LINENO" 5 - fi - rm -f "$ac_file" - - # Try a relative symlink, then a hard link, then a copy. - case $ac_source in - [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; - *) ac_rel_source=$ac_top_build_prefix$ac_source ;; - esac - ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || - ln "$ac_source" "$ac_file" 2>/dev/null || - cp -p "$ac_source" "$ac_file" || - as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 - fi - ;; - :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 - "po-directories":C) - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - gt_tab=`printf '\t'` - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done ;; - - 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 - - -############################################################# -# Use a dummy Makefile to get the cflags and ldflags -# -# This is to capture flags from external libraries such -# as PETSc -############################################################# - -CONFIG_CFLAGS=`$MAKE cflags -f output.make` -CONFIG_LDFLAGS=`$MAKE ldflags -f output.make` - -############################################################# -# Defines which are supported by CMake build but not autoconf - -BOUT_HAS_CUDA="no" -BOUT_HAS_RAJA="no" -BOUT_HAS_UMPIRE="no" -BOUT_HAS_CALIPER="no" - - -if test "x$BOUT_HAS_CUDA" = "xyes"; then : - -$as_echo "#define BOUT_HAS_CUDA 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_CUDA 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_RAJA" = "xyes"; then : - -$as_echo "#define BOUT_HAS_RAJA 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_RAJA 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_UMPIRE" = "xyes"; then : - -$as_echo "#define BOUT_HAS_UMPIRE 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_UMPIRE 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_CALIPER" = "xyes"; then : - -$as_echo "#define BOUT_HAS_CALIPER 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_CALIPER 0" >>confdefs.h - -fi - - - -############################################################# -# Write configuration to bout-config -############################################################# - - - - -# Set path to lib and include here. -# If make install is run then that replaces these paths -BOUT_LIB_PATH=$PWD/lib -BOUT_INCLUDE_PATH=$PWD/include -FMT_INCLUDE_PATH=$PWD/externalpackages/fmt/include - - - - - - - - - - - - - - - - - - - - - - - -cat >>confdefs.h <<_ACEOF -#define BOUT_CHECK_LEVEL $BOUT_CHECK_LEVEL -_ACEOF - - - - -cat >>confdefs.h <<_ACEOF -#define BOUT_OPENMP_SCHEDULE $BOUT_OPENMP_SCHEDULE -_ACEOF - - - -if test "x$BOUT_HAS_ARKODE" = "xyes"; then : - -$as_echo "#define BOUT_HAS_ARKODE 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_ARKODE 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_CVODE" = "xyes"; then : - -$as_echo "#define BOUT_HAS_CVODE 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_CVODE 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_FFTW" = "xyes"; then : - -$as_echo "#define BOUT_HAS_FFTW 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_FFTW 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_GETTEXT" = "xyes"; then : - -$as_echo "#define BOUT_HAS_GETTEXT 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_GETTEXT 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_IDA" = "xyes"; then : - -$as_echo "#define BOUT_HAS_IDA 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_IDA 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_LAPACK" = "xyes"; then : - -$as_echo "#define BOUT_HAS_LAPACK 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_LAPACK 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_NETCDF" = "xyes"; then : - -$as_echo "#define BOUT_HAS_NETCDF 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_NETCDF 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_LEGACY_NETCDF" = "xyes"; then : - -$as_echo "#define BOUT_HAS_LEGACY_NETCDF 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_LEGACY_NETCDF 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_PETSC" = "xyes"; then : - -$as_echo "#define BOUT_HAS_PETSC 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_PETSC 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_HYPRE" = "xyes"; then : - -$as_echo "#define BOUT_HAS_HYPRE 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_HYPRE 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_PNETCDF" = "xyes"; then : - -$as_echo "#define BOUT_HAS_PNETCDF 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_PNETCDF 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_PRETTY_FUNCTION" = "xyes"; then : - -$as_echo "#define BOUT_HAS_PRETTY_FUNCTION 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_PRETTY_FUNCTION 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_PVODE" = "xyes"; then : - -$as_echo "#define BOUT_HAS_PVODE 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_PVODE 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_SCOREP" = "xyes"; then : - -$as_echo "#define BOUT_HAS_SCOREP 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_SCOREP 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_SLEPC" = "xyes"; then : - -$as_echo "#define BOUT_HAS_SLEPC 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_SLEPC 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_SUNDIALS" = "xyes"; then : - -$as_echo "#define BOUT_HAS_SUNDIALS 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_SUNDIALS 0" >>confdefs.h - -fi - - - -if test "x$BOUT_HAS_UUID_SYSTEM_GENERATOR" = "xyes"; then : - -$as_echo "#define BOUT_HAS_UUID_SYSTEM_GENERATOR 1" >>confdefs.h - -else - -$as_echo "#define BOUT_HAS_UUID_SYSTEM_GENERATOR 0" >>confdefs.h - -fi - - - -if test "x$BOUT_USE_BACKTRACE" = "xyes"; then : - -$as_echo "#define BOUT_USE_BACKTRACE 1" >>confdefs.h - -else - -$as_echo "#define BOUT_USE_BACKTRACE 0" >>confdefs.h - -fi - - - -if test "x$BOUT_USE_COLOR" = "xyes"; then : - -$as_echo "#define BOUT_USE_COLOR 1" >>confdefs.h - -else - -$as_echo "#define BOUT_USE_COLOR 0" >>confdefs.h - -fi - - - -if test "x$BOUT_USE_OUTPUT_DEBUG" = "xyes"; then : - -$as_echo "#define BOUT_USE_OUTPUT_DEBUG 1" >>confdefs.h - -else - -$as_echo "#define BOUT_USE_OUTPUT_DEBUG 0" >>confdefs.h - -fi - - - -if test "x$BOUT_USE_OPENMP" = "xyes"; then : - -$as_echo "#define BOUT_USE_OPENMP 1" >>confdefs.h - -else - -$as_echo "#define BOUT_USE_OPENMP 0" >>confdefs.h - -fi - - - -if test "x$BOUT_USE_SIGFPE" = "xyes"; then : - -$as_echo "#define BOUT_USE_SIGFPE 1" >>confdefs.h - -else - -$as_echo "#define BOUT_USE_SIGFPE 0" >>confdefs.h - -fi - - - -if test "x$BOUT_USE_SIGNAL" = "xyes"; then : - -$as_echo "#define BOUT_USE_SIGNAL 1" >>confdefs.h - -else - -$as_echo "#define BOUT_USE_SIGNAL 0" >>confdefs.h - -fi - - - -if test "x$BOUT_USE_TRACK" = "xyes"; then : - -$as_echo "#define BOUT_USE_TRACK 1" >>confdefs.h - -else - -$as_echo "#define BOUT_USE_TRACK 0" >>confdefs.h - -fi - - - -if test "x$BOUT_USE_MSGSTACK" = "xyes"; then : - -$as_echo "#define BOUT_USE_MSGSTACK 1" >>confdefs.h - -else - -$as_echo "#define BOUT_USE_MSGSTACK 0" >>confdefs.h - -fi - - - -cat >>confdefs.h <<_ACEOF -#define BOUT_METRIC_TYPE $BOUT_METRIC_TYPE -_ACEOF - -BOUT_METRIC_3D=$(test $BOUT_METRIC_TYPE != 3D ; echo $?) - -cat >>confdefs.h <<_ACEOF -#define BOUT_USE_METRIC_3D $BOUT_METRIC_3D -_ACEOF - - - - - - - - - - - - -ac_config_headers="$ac_config_headers include/bout/build_defines.hxx:autoconf_build_defines.hxx.in" - -ac_config_files="$ac_config_files include/bout/version.hxx" - -ac_config_files="$ac_config_files include/bout/revision.hxx" - -ac_config_files="$ac_config_files bin/bout-config" - -ac_config_files="$ac_config_files src/makefile" - -ac_config_files="$ac_config_files tools/pylib/boutconfig/__init__.py" - -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= -U= -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 - - -if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then - as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" 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 BOUT++ $as_me 5.1.0, 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_links="$ac_config_links" -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 links: -$config_links - -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="\\ -BOUT++ config.status 5.1.0 -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' -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 -# -# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - - -_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 - "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; - "src/fmt/format.cxx") CONFIG_LINKS="$CONFIG_LINKS src/fmt/format.cxx:externalpackages/fmt/src/format.cc" ;; - "make.config") CONFIG_FILES="$CONFIG_FILES make.config" ;; - "include/bout/build_defines.hxx") CONFIG_HEADERS="$CONFIG_HEADERS include/bout/build_defines.hxx:autoconf_build_defines.hxx.in" ;; - "include/bout/version.hxx") CONFIG_FILES="$CONFIG_FILES include/bout/version.hxx" ;; - "include/bout/revision.hxx") CONFIG_FILES="$CONFIG_FILES include/bout/revision.hxx" ;; - "bin/bout-config") CONFIG_FILES="$CONFIG_FILES bin/bout-config" ;; - "src/makefile") CONFIG_FILES="$CONFIG_FILES src/makefile" ;; - "tools/pylib/boutconfig/__init__.py") CONFIG_FILES="$CONFIG_FILES tools/pylib/boutconfig/__init__.py" ;; - - *) 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_LINKS+set}" = set || CONFIG_LINKS=$config_links - 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 :L $CONFIG_LINKS :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 - ;; - :L) - # - # CONFIG_LINK - # - - if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then - : - else - # Prefer the file from the source tree if names are identical. - if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then - ac_source=$srcdir/$ac_source - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 -$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} - - if test ! -r "$ac_source"; then - as_fn_error $? "$ac_source: file not found" "$LINENO" 5 - fi - rm -f "$ac_file" - - # Try a relative symlink, then a hard link, then a copy. - case $ac_source in - [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; - *) ac_rel_source=$ac_top_build_prefix$ac_source ;; - esac - ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || - ln "$ac_source" "$ac_file" 2>/dev/null || - cp -p "$ac_source" "$ac_file" || - as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 - fi - ;; - :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 - "po-directories":C) - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - gt_tab=`printf '\t'` - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done ;; - - 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 - -chmod a+x bin/bout-config - -############################################################# -# Print configuration info -############################################################# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: -------------------------" >&5 -$as_echo "$as_me: -------------------------" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration summary " >&5 -$as_echo "$as_me: Configuration summary " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: -------------------------" >&5 -$as_echo "$as_me: -------------------------" >&6;} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: PETSc support : $BOUT_HAS_PETSC (has SUNDIALS: $PETSC_HAS_SUNDIALS)" >&5 -$as_echo "$as_me: PETSc support : $BOUT_HAS_PETSC (has SUNDIALS: $PETSC_HAS_SUNDIALS)" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: SLEPc support : $BOUT_HAS_SLEPC" >&5 -$as_echo "$as_me: SLEPc support : $BOUT_HAS_SLEPC" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: IDA support : $BOUT_HAS_IDA" >&5 -$as_echo "$as_me: IDA support : $BOUT_HAS_IDA" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: CVODE support : $BOUT_HAS_CVODE" >&5 -$as_echo "$as_me: CVODE support : $BOUT_HAS_CVODE" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: ARKODE support : $BOUT_HAS_ARKODE" >&5 -$as_echo "$as_me: ARKODE support : $BOUT_HAS_ARKODE" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: FFTW support : $BOUT_HAS_FFTW" >&5 -$as_echo "$as_me: FFTW support : $BOUT_HAS_FFTW" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: NetCDF support : $BOUT_HAS_NETCDF (legacy: $BOUT_HAS_LEGACY_NETCDF)" >&5 -$as_echo "$as_me: NetCDF support : $BOUT_HAS_NETCDF (legacy: $BOUT_HAS_LEGACY_NETCDF)" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Parallel-NetCDF support : $BOUT_HAS_PNETCDF" >&5 -$as_echo "$as_me: Parallel-NetCDF support : $BOUT_HAS_PNETCDF" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Lapack support : $BOUT_HAS_LAPACK" >&5 -$as_echo "$as_me: Lapack support : $BOUT_HAS_LAPACK" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Scorep support : $BOUT_HAS_SCOREP" >&5 -$as_echo "$as_me: Scorep support : $BOUT_HAS_SCOREP" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: OpenMP support : $BOUT_USE_OPENMP (schedule: $OPENMP_SCHEDULE)" >&5 -$as_echo "$as_me: OpenMP support : $BOUT_USE_OPENMP (schedule: $OPENMP_SCHEDULE)" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Natural language support: $BOUT_HAS_GETTEXT (path: $localedir)" >&5 -$as_echo "$as_me: Natural language support: $BOUT_HAS_GETTEXT (path: $localedir)" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: HYPRE support : $BOUT_HAS_HYPRE" >&5 -$as_echo "$as_me: HYPRE support : $BOUT_HAS_HYPRE" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: System UUID generator : $BOUT_HAS_UUID_SYSTEM_GENERATOR" >&5 -$as_echo "$as_me: System UUID generator : $BOUT_HAS_UUID_SYSTEM_GENERATOR" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Enable backtrace : $BOUT_USE_BACKTRACE" >&5 -$as_echo "$as_me: Enable backtrace : $BOUT_USE_BACKTRACE" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Enable color logs : $BOUT_USE_COLOR" >&5 -$as_echo "$as_me: Enable color logs : $BOUT_USE_COLOR" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Enable more debug output: $BOUT_USE_OUTPUT_DEBUG" >&5 -$as_echo "$as_me: Enable more debug output: $BOUT_USE_OUTPUT_DEBUG" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Enable OpenMP : $BOUT_USE_OPENMP" >&5 -$as_echo "$as_me: Enable OpenMP : $BOUT_USE_OPENMP" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Enable FP exceptions : $BOUT_USE_SIGFPE" >&5 -$as_echo "$as_me: Enable FP exceptions : $BOUT_USE_SIGFPE" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Enable signal handlers : $BOUT_USE_SIGNAL" >&5 -$as_echo "$as_me: Enable signal handlers : $BOUT_USE_SIGNAL" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Enable field names : $BOUT_USE_TRACK" >&5 -$as_echo "$as_me: Enable field names : $BOUT_USE_TRACK" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Metric type : $BOUT_METRIC_TYPE" >&5 -$as_echo "$as_me: Metric type : $BOUT_METRIC_TYPE" >&6;} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: -------------------------------" >&5 -$as_echo "$as_me: -------------------------------" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Data analysis configuration " >&5 -$as_echo "$as_me: Data analysis configuration " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: -------------------------------" >&5 -$as_echo "$as_me: -------------------------------" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: === IDL ===" >&5 -$as_echo "$as_me: === IDL ===" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Make sure that the tools/idllib directory is in your IDL_PATH" >&5 -$as_echo "$as_me: Make sure that the tools/idllib directory is in your IDL_PATH" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: e.g. by adding to your ~/.bashrc file" >&5 -$as_echo "$as_me: e.g. by adding to your ~/.bashrc file" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: export IDL_PATH=+$PWD/tools/idllib:'':\$IDL_PATH" >&5 -$as_echo "$as_me: export IDL_PATH=+$PWD/tools/idllib:'':\$IDL_PATH" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: === Python ===" >&5 -$as_echo "$as_me: === Python ===" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Make sure that the tools/pylib directory is in your PYTHONPATH" >&5 -$as_echo "$as_me: Make sure that the tools/pylib directory is in your PYTHONPATH" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: e.g. by adding to your ~/.bashrc file" >&5 -$as_echo "$as_me: e.g. by adding to your ~/.bashrc file" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: export PYTHONPATH=$PWD/tools/pylib/:\$PYTHONPATH" >&5 -$as_echo "$as_me: export PYTHONPATH=$PWD/tools/pylib/:\$PYTHONPATH" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: *** Now run '$MAKE' to compile BOUT++ ***" >&5 -$as_echo "$as_me: *** Now run '$MAKE' to compile BOUT++ ***" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ./configure is deprecated and will be removed in a future version, please use CMake instead" >&5 -$as_echo "$as_me: WARNING: ./configure is deprecated and will be removed in a future version, please use CMake instead" >&2;} diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 0bacd1097a..0000000000 --- a/configure.ac +++ /dev/null @@ -1,1499 +0,0 @@ -# Copyright 2010 B D Dudson, S Farley -# -# Contact Ben Dudson, bd512@york.ac.uk -# -# This file is part of BOUT++. -# -# BOUT++ is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# BOUT++ 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 Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with BOUT++. If not, see . -# -##################################################################### -# -# Process this file with autoreconf to produce a configure script. -# -# $ autoreconf -if -# -# Changelog: -# -# 2010-03-09 Ben Dudson -# * Changing to always require FFTW (removing NR routines) -# 2015-08-08 David Schwörer -# * Searching for libs in lib and lib64 -# - -AC_PREREQ([2.69]) -AC_INIT([BOUT++],[5.1.0],[bd512@york.ac.uk]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) - -AC_MSG_WARN([./configure is deprecated and will be removed in a future version, please use CMake instead]) - -AC_ARG_WITH(netcdf, [AS_HELP_STRING([--with-netcdf], - [Enable support for netCDF files])],,[]) -AC_ARG_WITH(pnetcdf, [AS_HELP_STRING([--with-pnetcdf], - [Set path to Parallel NetCDF library])],,[]) -AC_ARG_WITH(ida, [AS_HELP_STRING([--with-ida=/path/to/ida], - [Use the SUNDIALS IDA solver])],,[]) -AC_ARG_WITH(cvode, [AS_HELP_STRING([--with-cvode], - [Use the SUNDIALS CVODE solver])],,[]) -AC_ARG_WITH(sundials, [AS_HELP_STRING([--with-sundials], - [Use CVODE and IDA])],,[]) -AC_ARG_WITH(fftw, [AS_HELP_STRING([--with-fftw], - [Set directory of FFTW3 library])],,[]) -AC_ARG_WITH(lapack, [AS_HELP_STRING([--with-lapack], - [Use the LAPACK library])],,[with_lapack=guess]) -AC_ARG_WITH(petsc, [AS_HELP_STRING([--with-petsc], - [Enable PETSc interface])],,[with_petsc=no]) -AC_ARG_WITH(slepc, [AS_HELP_STRING([--with-slepc], - [Enable SLEPc interface])],,[with_slepc=no]) -AC_ARG_WITH(pvode, [AS_HELP_STRING([--with-pvode], - [Build and enable PVODE 98 (DEFAULT)])],,[]) -AC_ARG_WITH(arkode, [AS_HELP_STRING([--with-arkode], - [Use the SUNDIALS ARKODE solver])],,[]) -AC_ARG_WITH(scorep, [AS_HELP_STRING([--with-scorep], - [Enable support for scorep based instrumentation])],,[with_scorep=no]) -AC_ARG_WITH(hypre, [AS_HELP_STRING([--with-hypre], - [Enable support for HYPRE])],,[with_hypre=no]) - -dnl --with-hdf5 flags are set in AX_LIB_{PARALLEL}HDF5 -AC_ARG_WITH(system_mpark, [AS_HELP_STRING([--with-system-mpark], - [Use mpark.variant already installed rather then the bundled one])],,[with_system_mpark=auto]) -AC_ARG_WITH(system_uuid, [AS_HELP_STRING([--with-system-uuid], - [Use libuuid to generate UUIDs])],,[with_system_uuid=auto]) - -AC_ARG_ENABLE(warnings, [AS_HELP_STRING([--disable-warnings], - [Disable compiler warnings])],,[]) -AC_ARG_ENABLE(checks, [AS_HELP_STRING([--enable-checks=no/1/2/3], - [Set run-time checking level])],,[enable_checks=default]) -AC_ARG_ENABLE(msgstack, [AS_HELP_STRING([--enable-msgstack=no/yes], - [Enable MstStack for backtrace. Default based on check level.])],,[enable_msgstack=maybe]) -AC_ARG_ENABLE(signal, [AS_HELP_STRING([--disable-signal], - [Disable SEGFAULT handling])],,[]) -AC_ARG_ENABLE(color, [AS_HELP_STRING([--disable-color], - [Disable -c option to color output])],,[]) -AC_ARG_ENABLE(track, [AS_HELP_STRING([--enable-track], - [Enable variable tracking])],,[]) -AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], - [Enable all debugging flags])],,[]) -AC_ARG_ENABLE(output_debug, [AS_HELP_STRING([--enable-output-debug], - [Enable some extra debugging output])],,[]) -AC_ARG_ENABLE(optimize, [AS_HELP_STRING([--enable-optimize=no/1/2/3/4], - [Enable optimization])],,[]) -AC_ARG_ENABLE(sigfpe, [AS_HELP_STRING([--enable-sigfpe], - [Enable FloatingPointExceptions])],,[]) -AC_ARG_ENABLE(backtrace, [AS_HELP_STRING([--disable-backtrace], - [Disable function backtrace])],,[enable_backtrace=maybe]) -AC_ARG_ENABLE(shared, [AS_HELP_STRING([--enable-shared], - [Enable building bout++ into an shared object])],,[enable_shared=no]) -AC_ARG_ENABLE(static, [AS_HELP_STRING([--enable-static], - [Enable building bout++ into an static library])],,[enable_static=auto]) -AC_ARG_ENABLE(openmp, [AS_HELP_STRING([--enable-openmp], - [Enable building with OpenMP support])],,[enable_openmp=no]) -AC_ARG_WITH(openmp_schedule,[AS_HELP_STRING([--with-openmp-schedule=static/dynamic/guided/auto], - [Set OpenMP schedule (default: static)])],,[with_openmp_schedule=static]) -AC_ARG_ENABLE(pvode_openmp, [AS_HELP_STRING([--enable-pvode-openmp], - [Enable building PVODE with OpenMP support])],,[enable_pvode_openmp=no]) -AC_ARG_ENABLE(metric_3d, [AS_HELP_STRING([--enable-metric-3d], - [Use Field3D to store coordinates metric data])],,[enable_metric_3d=no]) - -AC_ARG_VAR(EXTRA_INCS,[Extra compile flags]) -AC_ARG_VAR(EXTRA_LIBS,[Extra linking flags]) - -file_formats="" # Record which file formats are being supported - -# Delete the build log from last time -rm -f config-build.log - -# only keep BOUT related undefs -if ! grep -q 'NOTE TO DEVEL' autoconf_build_defines.hxx.in ; then - grep 'undef BOUT' -B 4 -A 1 autoconf_build_defines.hxx.in > autoconf_build_defines.hxx.in.tmp - echo '// NOTE TO DEVELOPERS: PLEASE KEEP THIS LINE AND DELETE AUTOGENERATED CONTENT BELOW!' >> autoconf_build_defines.hxx.in.tmp - mv autoconf_build_defines.hxx.in.tmp autoconf_build_defines.hxx.in -fi - - -AC_ARG_VAR(CXXFLAGS,[Extra compile flags]) -AC_ARG_VAR(LDFLAGS,[Extra linking flags]) -AC_ARG_VAR(LIBS,[Extra linking libraries]) -LIBS="$LIBS $LDLIBS" - -AC_SUBST(MKDIR_P) -AC_SUBST(EXTRA_INCS) -AC_SUBST(EXTRA_LIBS) - -# Adding variables for additional sources -AC_SUBST(PRECON_SOURCE) - -# We're using C++ -AC_LANG(C++) - -############################################################# -# Checks for programs -############################################################# - -# Autoconf inserts "-g -O2" into flags by default -# Set them to be just "-g", but only if the user hasn't already set CXXFLAGS -# We then put "-O2" back in later, assuming optimisations aren't explicitly disabled -: ${CXXFLAGS="-g"} - -# Search for MPI compiler; fail if not found -AX_PROG_CXX_MPI([], [], [ - AC_MSG_ERROR([*** An MPI compiler is required. You might need to set MPICXX correctly.]) -]) - -# Utility programs -AC_PROG_MKDIR_P -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_INSTALL - -# Set MAKE to gmake if possible, otherwise make -AC_CHECK_PROG(MAKE, gmake, gmake, make) - -AC_PROG_RANLIB - -AC_SUBST(ARFLAGS) - -ARFLAGS='' -for flag in cruU cru -do - echo 1 > artest1 - ar $flag artest artest1 &&ar $flag artest artest1 - arexit=$? - rm -f artest1 artest - if test $arexit -eq 0 - then - ARFLAGS="$flag" - break; - fi -done -test -z $ARFLAGS && AC_MSG_ERROR([Failed to find suitable flags for ar]) - -# Check for and enable C++14 support -# Error if not supported -AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory]) - -############################################################# -# STD Library functions -############################################################# - -# Checks for libraries. -AC_CHECK_LIB([m], [sqrt]) - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h]) - -# Checks for library functions. -AC_FUNC_MALLOC -AC_FUNC_REALLOC -AC_FUNC_VPRINTF - -# Check for OpenMP support -: ${enable_openmp=no} # Disable by default -AC_OPENMP -BOUT_USE_OPENMP=$enable_openmp - -BOUT_OPENMP_SCHEDULE=$with_openmp_schedule - -# Check if we have access to __PRETTY_FUNCTION__ -BOUT_CHECK_PRETTYFUNCTION - -############################################################# -# Code coverage using gcov -# -# Mutally exclusive with optimisation, therefore needs to come first -# so we can turn off optimisation if coverage is enabled -############################################################# - -AX_CODE_COVERAGE() -AS_IF([test "x$enable_code_coverage" = "xyes"], -[ - AS_IF([test "x$enable_optimize"], [ - AC_MSG_WARN([Code coverage clashes with optimisations, disabling optimisations]) - enable_optimize="no" - ]) - COVERAGE_FLAGS="--coverage --no-inline" - LDFLAGS="$LDFLAGS --coverage" -], [ - COVERAGE_FLAGS= -]) -AC_SUBST([COVERAGE_FLAGS]) - -############################################################# -# General Options -############################################################# - -# Always pass -Werror=unknown-warning-option to get Clang to fail on bad -# flags, otherwise they are always appended to the warn_cxxflags variable, -# and Clang warns on them for every compilation unit. -# If this is passed to GCC, it will explode, so the flag must be enabled -# conditionally. -# This check taken from AX_COMPILER_FLAGS_CXXFLAGS -extra_compiler_flags_test="" -AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ - extra_compiler_flags_test="-Werror=unknown-warning-option" -]) -# A similar check to above, but for Intel. -we is undocumented, but -# the equivalent (?) -diag-error gets accepted by GCC. 10006 is -# "unknown option", and 10148 is the more recent "unknown warning -# option" -AX_CHECK_COMPILE_FLAG([-we10006,10148],[ - extra_compiler_flags_test="-we10006,10148" -]) - -AS_IF([test "x$enable_warnings" != "xno"], [ -# Some hopefully sensible default compiler warning flags - - AX_APPEND_COMPILE_FLAGS([ dnl - -Wall dnl - -Wextra dnl - -Wnull-dereference dnl - ], [CXXFLAGS], [$extra_compiler_flags_test]) - -# Note we explicitly turn off -Wcast-function-type as PETSc *requires* -# we cast a function to the wrong type in MatFDColoringSetFunction - -# Also note that gcc ignores unknown flags of the form "-Wno-warning" -# for backwards compatibility. Therefore we need to add the positive -# form as an additional flag which it will choke on (if it doesn't -# exist). See: https://gcc.gnu.org/wiki/FAQ#wnowarning - - AX_APPEND_COMPILE_FLAGS([ dnl - -Wno-cast-function-type dnl - ], [CXXFLAGS], [$extra_compiler_flags_test "-Wcast-function-type"]) - -], [ - AC_MSG_NOTICE([Compiler warnings disabled]) -]) - -OPT_FLAGS="" -enable_checks_def=2 -AS_IF([test "$enable_debug" != ""], [ - AC_MSG_NOTICE([Enabling all debug options]) - enable_checks_def=3 - # use -Og with available, otherwise fall back to -O0 - OPT_FLAGS="-g -O0 -Og -fno-inline -hipa1" -], [ - AS_IF([test "x$enable_optimize" != "xno"], [ - AS_CASE(["$enable_optimize"], - ["default" | "yes" | ""], - [AC_MSG_NOTICE([Enabling default optimisations]) - OPT_FLAGS="-O2"], - ["fast" | "4"], - [AC_MSG_NOTICE([Enabling level 4 optimisations]) - OPT_FLAGS="-Ofast -fno-finite-math-only -march=native -funroll-loops" - enable_checks_def=0], - ["3"], - [AC_MSG_NOTICE([Enabling level 3 optimisations]) - OPT_FLAGS="-O3 -march=native -funroll-loops" - enable_checks_def=0], - ["2"], - [AC_MSG_NOTICE([Enabling level 2 optimisations]) - OPT_FLAGS="-O2 -march=native" - enable_checks_def=1], - ["1" | "0"], - [AC_MSG_NOTICE([Enabling level $enable_optimize optimisations]) - OPT_FLAGS="-O$enable_optimize"], - [ - AC_MSG_ERROR([unrecognized option: --enable-optimize=$enable_optimize]) - ]) - ], [OPT_FLAGS=""]) -]) - -# Append optimisation/debug flags if they work with this compiler -AX_APPEND_COMPILE_FLAGS([ dnl - $OPT_FLAGS dnl -], [CXXFLAGS], [$extra_compiler_flags_test]) - -# Disable checks if optimization > 2 is used -AS_IF([test "x$enable_checks" = "xdefault" ], [ - enable_checks=$enable_checks_def -]) - -BOUT_CHECK_LEVEL=0 -AS_IF([test "x$enable_checks" != "xno" && test "x$enable_checks" != "x0"], [ - AC_MSG_NOTICE([Run-time checking enabled]) - AS_CASE([$enable_checks], - [1], [AC_MSG_NOTICE([ -> Level 1 (Basic checking)]) - CXXFLAGS="$CXXFLAGS -DCHECK=1" - BOUT_CHECK_LEVEL=1], - [3], [AC_MSG_NOTICE([ -> Level 3 (Full checking)]) - enable_output_debug=yes - CXXFLAGS="$CXXFLAGS -DCHECK=3" - BOUT_CHECK_LEVEL=3], - [AC_MSG_NOTICE([ -> Level 2 (Enhanced checking)]) - CXXFLAGS="$CXXFLAGS -DCHECK=2" - BOUT_CHECK_LEVEL=2]) -], [ - AC_MSG_NOTICE([Run-time checking disabled]) -]) - -BOUT_USE_MSGSTACK=$(test $BOUT_CHECK_LEVEL -gt 1 && echo yes || echo no) -AS_IF([test "x$enable_msgstack" = "xyes" ], [ - BOUT_USE_MSGSTACK=yes -], [ - AS_IF([test "x$enable_msgstack" = "xno" ], [ - BOUT_USE_MSGSTACK=no - ], []) -]) -AS_IF([test $BOUT_USE_MSGSTACK = no ], [ - AC_MSG_NOTICE([Stack tracing disabled]) -], [ - AC_MSG_NOTICE([Stack tracing enabled]) -]) - -BOUT_USE_SIGNAL=no -AS_IF([test "x$enable_signal" != "xno"], [ - AC_MSG_NOTICE([Segmentation fault handling enabled]) - BOUT_USE_SIGNAL=yes -], [ - AC_MSG_NOTICE([Segmentation fault handling disabled]) -]) - -BOUT_USE_COLOR=no -AS_IF([test "x$enable_color" != "xno"], [ - AC_MSG_NOTICE([Output coloring enabled]) - BOUT_USE_COLOR=yes -], [ - AC_MSG_NOTICE([Output coloring disabled]) -]) - -BOUT_USE_TRACK=no -AS_IF([test "x$enable_track" = "xyes"], [ - AC_MSG_NOTICE([Field name tracking enabled]) - BOUT_USE_TRACK=yes -], [ - AC_MSG_NOTICE([Field name tracking disabled]) -]) - -BOUT_USE_SIGFPE=no -AS_IF([test "x$enable_sigfpe" = "xyes"], [ - AC_MSG_NOTICE([Signaling floating point exceptions enabled]) - BOUT_USE_SIGFPE=yes -], [ - AC_MSG_NOTICE([Signaling floating point exceptions disabled]) -]) - -BOUT_USE_OUTPUT_DEBUG=no -AS_IF([test "x$enable_output_debug" = "xyes"], [ - AC_MSG_NOTICE([Extra debug output enabled]) - BOUT_USE_OUTPUT_DEBUG=yes -], [ - AC_MSG_NOTICE([Extra debug output disabled]) -]) - -BOUT_VERSION=$PACKAGE_VERSION -BOUT_VERSION_MAJOR=$(echo $PACKAGE_VERSION | cut -d. -f1) -BOUT_VERSION_MINOR=$(echo $PACKAGE_VERSION | cut -d. -f2) -BOUT_VERSION_PATCH=$(echo ${PACKAGE_VERSION%-*} | cut -d. -f3) -BOUT_VERSION_TAG=$(echo $PACKAGE_VERSION | cut -d- -f2) - -############################################################# -# Enable Backtrace if possible -############################################################# - -BOUT_USE_BACKTRACE=no -AS_IF([test "x$enable_backtrace" = "xyes" || test "x$enable_backtrace" = "xmaybe"], [ - AC_CHECK_PROG([works], [addr2line], [yes], [no]) - - AS_IF([test $works = yes], [ - AC_CHECK_FUNCS([popen backtrace], [works=yes], [works=no; break]) - ]) - - AS_IF([test $works = yes], [ - AC_CHECK_HEADERS([execinfo.h dlfcn.h], [works=yes], [works=no; break]) - ]) - - AS_IF([test $works = yes], [ - AC_SEARCH_LIBS([dladdr], [dl], [works=yes], [works=no; break]) - ]) - - AS_IF([test $works = yes], [ - AC_MSG_NOTICE([Native backtrace enabled]) - BOUT_USE_BACKTRACE=yes - ], [ - AS_IF([test "x$enable_backtrace" = "xyes"], [ - AC_MSG_ERROR([backtrace requested, but cannot be enabled]) - ], [ - AC_MSG_WARN([Native backtrace disabled]) - ]) - ]) -]) - -AS_IF([test "x$enable_metric_3d" != "xno"], [ - AC_MSG_WARN([Using Field3D to store coordinates data, this is experimental.]) - BOUT_METRIC_TYPE="3D" -], [ - AC_MSG_NOTICE([Using Field2D to store coordinates data]) - BOUT_METRIC_TYPE="2D" -]) - -############################################################# -# Build into shared object (pic) -############################################################# - -LIB_TO_BUILD='' -AS_IF([test "x$enable_shared" = "xyes"], [ - # compile as position independent code. - # -fpic is apparently faster then -fPIC, but -fPIC works always. - # From a SO comment (https://stackoverflow.com/a/3544211/3384414): - # What's more: I did a little experiment here (on x86_64 - # platform), -fPIC and -fpic appears to have generated the same - # code. It seems they generate a different code only on m68k, - # PowerPC and SPARC. - # Therfore use -fPIC for now - CXXFLAGS="$CXXFLAGS -fPIC" - LIB_TO_BUILD="$LIB_TO_BUILD"' $(BOUT_LIB_PATH)/libbout++.so' - AS_IF([test "x$enable_static" = "xauto"], [ - enable_static=no - ]) - SHARED_EXTRA=':' - AS_IF([test "x$enable_static" = "xno"], [ - SHARED_EXTRA='$(RM) -f $(BOUT_LIB_PATH)/libbout++.a' - ]) -], [ - AS_IF([test "x$enable_static" = "xauto"], [ - enable_static=yes - ]) -]) - -AS_IF([test "x$enable_static" = "xyes"], [ - LIB_TO_BUILD="$LIB_TO_BUILD"' $(BOUT_LIB_PATH)/libbout++.a' - STATIC_EXTRA=':' - # In case we only build static, make sure shared libs are removed - AS_IF([! test "x$enable_shared" = "xyes"], [ - STATIC_EXTRA='$(RM) -f $(BOUT_LIB_PATH)/*.so*' - ]) -]) - -AS_IF([test "x$LIB_TO_BUILD" = x ], [ - AC_MSG_ERROR([Need to enable at least one of static or shared!]) -]) - -############################################################# -# Git revision number -############################################################# - -rev=`git rev-parse HEAD` -AS_IF([test $? = 0], [ - AC_MSG_NOTICE([Git revision: $rev]) - BOUT_REVISION=$rev -], [ - BOUT_REVISION= -]) - -############################################################# -# FFT routines -############################################################# - -AS_IF([test "x$with_fftw" != "xno"], [ -AC_PATH_PROG([fftw_path], [fftw-wisdom], [no], [$with_fftw$PATH_SEPARATOR$PATH]) - - AS_IF([test "x$fftw_path" != "xno"], [ - fftw_wisdom0=`AS_DIRNAME(["$fftw_path"])` - fftw_wisdom=`AS_DIRNAME(["$fftw_wisdom0"])` - with_fftw="$with_fftw $fftw_wisdom" - ], AC_MSG_NOTICE([FFTW3 requested but fftw-wisdom not found])) - - BOUT_ADDPATH_CHECK_HEADER(fftw3.h, ,AC_MSG_ERROR([FFTW3 requested but header not found]), $with_fftw) - BOUT_ADDPATH_CHECK_LIB(fftw3, fftw_plan_dft_r2c_1d, ,AC_MSG_ERROR([FFTW3 requested but library not found]), $with_fftw) - - BOUT_HAS_FFTW="yes" -], -[ -AC_MSG_NOTICE([Configuring without FFTW3 is not recommended]) -BOUT_HAS_FFTW="no" -]) - -############################################################# -# netCDF support -############################################################# - -NCCONF="" # Configuration script - -BOUT_HAS_NETCDF=no -BOUT_HAS_LEGACY_NETCDF=no -AS_IF([test "x$with_netcdf" != "xno"], -[ - ########################################## - # Try to find a valid NetCDF configuration - # - # at first, try to find ncconf script - - # Search for NetCDF config scripts, prefer ncxx4-config over nc-config - # Check if the path to the config script has been supplied directly, otherwise - # check the path provided by --with-netcdf, appending "/bin" if need - # be, then check system path - # Set NCCONF to the full path of the found scropt - AS_CASE([`basename $with_netcdf 2> /dev/null`], - ["ncxx4-config"], [NCCONF=$with_netcdf], - ["nc-config"], [NCCONF=$with_netcdf], - [AC_PATH_PROGS([NCCONF], [ncxx4-config nc-config], [], - [$with_netcdf$PATH_SEPARATOR$with_netcdf/bin$PATH_SEPARATOR$PATH])]) - - ########################################## - # Get configuration - AS_IF([test "x$NCCONF" != "x" ], - [ - # If we found nc-config rather than ncxx4-config, we need to check if it supports C++ - AS_IF([test `basename $NCCONF` = 'nc-config'], - [AC_MSG_CHECKING([if $NCCONF has C++4 support]) - nc_has_cpp4=`$NCCONF --has-c++4` - AC_MSG_RESULT([$nc_has_cpp4]) - AC_MSG_CHECKING([if $NCCONF has C++ support]) - nc_has_cpp=`$NCCONF --has-c++` - AC_MSG_RESULT([$nc_has_cpp]) - ], [ - nc_has_cpp4="yes" - ]) - - NCINC=`$NCCONF --cflags` - EXTRA_INCS="$EXTRA_INCS $NCINC" - AS_IF([test "x$nc_has_cpp4" = "xyes"], - [ - NCLIB=`$NCCONF --libs` - BOUT_HAS_NETCDF=yes - AC_MSG_NOTICE([ -> NetCDF-4 support enabled]) - ], [ - # nc-config might not *say* it has C++ support, but we can try anyway - AC_MSG_CHECKING([if we can compile NetCDF with C++]) - # Note netcdf_c++ needed - NCLIB=`$NCCONF --libs | sed s/-lnetcdf/-lnetcdf_c++\ -lnetcdf/` - - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CXXFLAGS=$CXXFLAGS - AC_LANG_PUSH([C++]) - LIBS="$save_LIBS $NCLIB" - LDFLAGS="$save_LDFLAGS $NCLIB" - CXXFLAGS="$save_CXXFLAGS $NCINC" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([ - #include - ], [NcFile file("foo.nc");])], - [AC_MSG_RESULT([yes]) - AC_MSG_NOTICE([ -> Legacy NetCDF support enabled])], - [AC_MSG_RESULT([no]) - AC_MSG_FAILURE([*** Could not compile NetCDF C++ program!])]) - AC_LANG_POP([C++]) - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CXXFLAGS="$save_CXXFLAGS" - BOUT_HAS_NETCDF=yes - BOUT_HAS_LEGACY_NETCDF=yes - ]) - EXTRA_LIBS="$EXTRA_LIBS $NCLIB" - - file_formats="$file_formats netCDF" - NCPATH="found" - NCFOUND=yes - ], [ - # if nc-config / ncxx4-config is not found, try to find library directly - BOUT_MSG_DEBUG([calling bout addpath]) - BOUT_ADDPATH_CHECK_HEADER(netcdfcpp.h, - BOUT_ADDPATH_CHECK_LIB(netcdf, nc_get_att, - BOUT_ADDPATH_CHECK_LIB(netcdf_c++, nc_close, NCFOUND=yes, NCFOUND=no, [$with_netcdf]), - NCFOUND=no, [$with_netcdf]), - NCFOUND=no, [$with_netcdf]) - - AS_IF([test "x$NCFOUND" = "xyes"], - [ - file_formats="$file_formats netCDF" - AC_MSG_NOTICE([ -> Legacy NetCDF support enabled]) - NCPATH="found" - BOUT_HAS_NETCDF=yes - BOUT_HAS_LEGACY_NETCDF=yes - ], []) - ]) - - AS_IF([test $with_netcdf && test "x$NCFOUND" != "xyes" ], AC_MSG_ERROR([NetCDF requested but not found]), []) - AS_IF([test "x$NCFOUND" != "xyes"], [AC_MSG_NOTICE([ -> NetCDF support disabled])], []) -], []) - -############################################################# -# Parallel NetCDF support -############################################################# - -PNCPATH="" -AS_IF([test "$with_pnetcdf" != "no" && test "x$with_pnetcdf" != "x" ], [ - AC_MSG_NOTICE([Searching for Parallel-NetCDF library]) - - AS_IF([test "x$with_pnetcdf" != "xyes"], [ - # Given a path to the library - AC_CHECK_FILES([$with_pnetcdf/include/pnetcdf.h], [PNCPATH=$with_pnetcdf], - AC_MSG_NOTICE([parallel-netcdf not found in given directory]) - ) - ]) - - # Find the utilities included with pnetcdf - AS_IF([test "x$PNCPATH" = "x"], [ - AS_IF([test "x$with_pnetcdf" = "xyes"], [ - AC_PATH_PROG([NCMPIDUMP_PATH], [ncmpidump]) - ], [ - AC_PATH_PROG([NCMPIDUMP_PATH], [ncmpidump], [$with_pnetcdf$PATH_SEPARATOR$PATH]) - ]) - AS_IF([test "$NCMPIDUMP_PATH" != ""], [ - AC_CHECK_FILES([$NCMPIDUMP_PATH/../include/pnetcdf.h], [PNCPATH=$NCMPIDUMP_PATH/../]) - ]) - ]) - - AS_IF([test "x$PNCPATH" != "x"], [ - AC_CHECK_FILES($path/lib/libpnetcdf.a, PNCPATHLIB='lib', - AC_CHECK_FILES($path/lib64/libpnetcdf.a, PNCPATHLIB='lib64', PNCPATH='')) - ]) - - AS_IF([test "x$PNCPATH" = "x" && test "x$with_pnetcdf" != "x"], [ - AC_MSG_FAILURE([*** Parallel-NetCDF requested but not found]) - ]) -]) - -AS_IF([test "x$PNCPATH" = "x"], [ - AC_MSG_NOTICE([Parallel-NetCDF support disabled]) -], [ - # Set a compile-time flag - CXXFLAGS="$CXXFLAGS -DPNCDF" - EXTRA_INCS="$EXTRA_INCS -I$PNCPATH/include" - EXTRA_LIBS="$EXTRA_LIBS -L$PNCPATH/$PNCPATHLIB -lpnetcdf" - - file_formats="$file_formats Parallel-NetCDF" - AC_MSG_NOTICE([Parallel-NetCDF support enabled]) -]) - -############################################################# -# Check file formats -############################################################# - -AS_IF([test "x$file_formats" = "x"], [ - AC_MSG_ERROR([*** At least one file format must be supported]) -], [ - AC_MSG_NOTICE([Supported file formats:$file_formats]) -]) - -############################################################# -# LAPACK routines (Used for tri- and band-diagonal solvers) -############################################################# - -BOUT_HAS_LAPACK="no" -AS_IF([test "x$with_lapack" != "xno"], [ - AS_IF([test "x$with_lapack" = "xguess" || test "x$with_lapack" = "x" ], - [lapack_path=""], - [AS_IF([test "x$with_lapack" != xyes], - [lapack_path=$with_lapack - with_lapack=yes], - [lapack_path=""]) - ]) - BOUT_ADDPATH_CHECK_LIB(blas, zgemm_, - [BOUT_HAS_BLAS=yes], - [AS_IF([test "x$with_lapack" = "xyes"], - AC_MSG_ERROR([LAPACK requested but couldn't find BLAS]))], - $lapack_path) - BOUT_ADDPATH_CHECK_LIB(lapack, zgbsv_, - [BOUT_HAS_LAPACK=yes - AC_MSG_NOTICE([Using LAPACK]) - ], - [AS_IF([test "x$with_lapack" = "xyes"], - AC_MSG_ERROR([LAPACK requested but not found]))], - $lapack_path) -]) - -############################################################# -# PETSc library -############################################################# - -AS_IF([test "x$with_petsc" != "x" && test "$with_petsc" != "no"], [ - -# Supplying an argument to "--with-petsc" only works if PETSC_ARCH -# *should* be empty. If it should be non-empty, THIS WILL NOT WORK - AS_IF([test "$with_petsc" != "yes"], [ - PETSC_DIR="$with_petsc" - PETSC_ARCH= - ]) - - AC_MSG_NOTICE([Using PETSC_DIR=$PETSC_DIR, PETSC_ARCH=$PETSC_ARCH]) - -# Define a macro for a nice error message that preserves the -# formatting. Use like: -# -# PETSC_ERROR_MESSAGE -# -# with no identation - m4_define(PETSC_ERROR_MESSAGE, - [ You may need to specify PETSC_DIR and PETSC_ARCH like so: - --with-petsc PETSC_DIR=\$PETSC_DIR PETSC_ARCH=\$PETSC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#petsc - ]) - -# PETSc changed the location of the conf directory in 3.5, so we -# need to check both locations -# If we find nether, try to fall back to pkg-conf - PETSC_PKGCONF=no - AC_CHECK_FILE($PETSC_DIR/$PETSC_ARCH/conf, [ - PETSC_CONFDIR=${PETSC_DIR}/conf - ], [ - AC_CHECK_FILE($PETSC_DIR/$PETSC_ARCH/lib/petsc/conf, [ - PETSC_CONFDIR=${PETSC_DIR}/lib/petsc/conf - ], [ - PKG_CHECK_MODULES(PETSC, PETSc >= 3.4.0 , - PETSC_PKGCONF=yes, [ - PKG_CHECK_MODULES(PETSC, petsc >= 3.4.0 , - PETSC_PKGCONF=yes, [ - AC_MSG_ERROR([--with-petsc was specified but could not find PETSc distribution. -PETSC_ERROR_MESSAGE]) - ]) - ]) - ]) - ]) - - AS_IF([test $PETSC_PKGCONF = no] , - [ -# We've found an installation, need to check we can use it. First we -# need to be able to check the version number, for which we need -# petscverion.h - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$PETSC_DIR/include" - AC_CHECK_HEADER([petscversion.h], - [FOUND_PETSC_HEADER=yes], - [FOUND_PETSC_HEADER=no] - ) - -# This is a terrible hack for some Linux distributions (Fedora) that -# install PETSc in a non-supported fashion. This is really the fault -# of PETSc for their weird method of installation - AS_IF([test $FOUND_PETSC_HEADER = no], [ - AC_CHECK_FILE([${PETSC_CONFDIR}/petscvariables], [], [ - AC_MSG_ERROR([Unable to find either petscversion.h or petscvariables -PETSC_ERROR_MESSAGE]) - ]) - -# This relies on the assumption that PETSC_ARCH is empty - PETSC_CC_INCLUDES=$(grep ^PETSC_CC_INCLUDES ${PETSC_CONFDIR}/petscvariables | cut -d= -f 2-) - - AC_MSG_NOTICE([Looking for petscverion.h using $PETSC_CC_INCLUDES from ${PETSC_CONFDIR}/petscvariables]) - - # This is the cache variable set by the previous call to - # AC_CHECK_HEADER. We need to unset it so we can call the macro - # again, but now with different CPPFLAGS - AS_UNSET([ac_cv_header_petscversion_h]) - - CPPFLAGS="$CPPFLAGS $PETSC_CC_INCLUDES" - AC_CHECK_HEADER([petscversion.h], [], [ - AC_MSG_ERROR([Couldn't find or include petscversion.h. -PETSC_ERROR_MESSAGE]) - ]) - ], []) - -# Now we have the header we want, we can check the version number - AC_MSG_CHECKING([PETSc is at least 3.4.0]) - AC_EGREP_CPP([yes], [ - #include - #if PETSC_VERSION_GE(3, 4, 0) - yes - #endif - ], [PETSC_VERSION_OK="yes"], - [PETSC_VERSION_OK="no"]) - AC_MSG_RESULT([$PETSC_VERSION_OK]) - CPPFLAGS="$save_CPPFLAGS" - - AS_IF([test $PETSC_VERSION_OK = no], [ - AC_MSG_ERROR([PETSc version must be at least 3.4.0]) - ]) - -# Check if PETSc was compiled with SUNDIALS - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$PETSC_DIR/$PETSC_ARCH/include" - AC_MSG_CHECKING([PETSc has SUNDIALS support]) - AC_EGREP_CPP([yes], [ - #include - #ifdef PETSC_HAVE_SUNDIALS - yes - #endif - ], [PETSC_HAS_SUNDIALS="yes"], - [PETSC_HAS_SUNDIALS="no"]) - AC_MSG_RESULT([$PETSC_HAS_SUNDIALS]) - CPPFLAGS="$save_CPPFLAGS" - - AS_IF([test "$PETSC_HAS_SUNDIALS" = "yes"], [ - CXXFLAGS="$CXXFLAGS -DPETSC_HAS_SUNDIALS " - ]) - - # Set the line to be included in the make.conf file - PETSC_MAKE_INCLUDE="include ${PETSC_CONFDIR}/variables" - - BOUT_HAS_PETSC="yes" - - EXTRA_INCS="$EXTRA_INCS \$(PETSC_CC_INCLUDES)" - EXTRA_LIBS="$EXTRA_LIBS \$(PETSC_LIB)" - ], [ dnl pkg-config version - - # Check if PETSc was compiled with SUNDIALS - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $PETSC_CFLAGS" - AC_MSG_CHECKING([PETSc has SUNDIALS support]) - AC_EGREP_CPP([yes], [ - #include - #ifdef PETSC_HAVE_SUNDIALS - yes - #endif - ], [PETSC_HAS_SUNDIALS="yes"], - [PETSC_HAS_SUNDIALS="no"]) - AC_MSG_RESULT([$PETSC_HAS_SUNDIALS]) - CPPFLAGS="$save_CPPFLAGS" - - AS_IF([test "$PETSC_HAS_SUNDIALS" = "yes"], [ - CXXFLAGS="$CXXFLAGS -DPETSC_HAS_SUNDIALS " - ]) - PETSC_MAKE_INCLUDE= - BOUT_HAS_PETSC="yes" - - EXTRA_INCS="$EXTRA_INCS $PETSC_CFLAGS" - EXTRA_LIBS="$PETSC_LIBS $EXTRA_LIBS" - ]) -], [ - PETSC_MAKE_INCLUDE= - BOUT_HAS_PETSC="no" - PETSC_HAS_SUNDIALS="no" -]) - -############################################################# -# SLEPc library -############################################################# - -AS_IF([test "x$with_slepc" != "x" && test "$with_slepc" != "no"], [ - - AS_IF([test $BOUT_HAS_PETSC = "no"], [ - AC_MSG_ERROR([--with-slepc specified, but no PETSc detected. Please reconfigure and specify --with-petsc -PETSC_ERROR_MESSAGE]) - ]) - -# Supplying an argument to "--with-slepc" only works if SLEPC_ARCH -# *should* be empty. If it should be non-empty, THIS WILL NOT WORK - AS_IF([test "$with_slepc" != "yes"], [ - SLEPC_DIR="$with_slepc" - SLEPC_ARCH= - ]) - - AC_MSG_NOTICE([Using SLEPC_DIR=$SLEPC_DIR, SLEPC_ARCH=$SLEPC_ARCH]) - -# Define a macro for a nice error message that preserves the -# formatting. Use like: -# -# SLEPC_ERROR_MESSAGE -# -# with no identation - m4_define(SLEPC_ERROR_MESSAGE, - [ You may need to specify SLEPC_DIR and SLEPC_ARCH like so: - --with-slepc SLEPC_DIR=\$SLEPC_DIR SLEPC_ARCH=\$SLEPC_ARCH - Also see the help online: - http://bout-dev.readthedocs.io/en/latest/user_docs/advanced_install.html#slepc - ]) - -# Slepc changed the location of the conf directory in 3.5, so we -# need to check both locations - AC_CHECK_FILE($SLEPC_DIR/$SLEPC_ARCH/conf, [ - SLEPC_CONFDIR=${SLEPC_DIR}/conf - ], [ - AC_CHECK_FILE($SLEPC_DIR/$SLEPC_ARCH/lib/slepc/conf, [ - SLEPC_CONFDIR=${SLEPC_DIR}/lib/slepc/conf - ], [ - AC_MSG_ERROR([--with-slepc was specified but could not find Slepc distribution. -SLEPC_ERROR_MESSAGE]) - ]) - ]) - -# We've found an installation, need to check we can use it. First we -# need to be able to check the version number, for which we need -# slepcverion.h - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$SLEPC_DIR/include" - AC_CHECK_HEADER([slepcversion.h], - [FOUND_SLEPC_HEADER=yes], - [FOUND_SLEPC_HEADER=no] - ) - -# This is a terrible hack for some Linux distributions (Fedora) that -# install Slepc in a non-supported fashion. This is really the fault -# of Slepc for their weird method of installation - AS_IF([test $FOUND_SLEPC_HEADER = no], [ - AC_CHECK_FILE([${SLEPC_CONFDIR}/slepc_variables], [], [ - AC_MSG_ERROR([Unable to find either slepcversion.h or slepc_variables -SLEPC_ERROR_MESSAGE]) - ]) - -# This relies on the assumption that SLEPC_ARCH is empty - SLEPC_CC_INCLUDES=$(grep ^SLEPC_CC_INCLUDES ${SLEPC_CONFDIR}/slepc_variables | cut -d= -f 2-) - - AC_MSG_NOTICE([Looking for slepcverion.h using $SLEPC_CC_INCLUDES from ${SLEPC_CONFDIR}/slepc_variables]) - - # This is the cache variable set by the previous call to - # AC_CHECK_HEADER. We need to unset it so we can call the macro - # again, but now with different CPPFLAGS - AS_UNSET([ac_cv_header_slepcversion_h]) - - CPPFLAGS="$CPPFLAGS $SLEPC_CC_INCLUDES" - AC_CHECK_HEADER([slepcversion.h], [], [ - AC_MSG_ERROR([Couldn't find or include slepcversion.h. -SLEPC_ERROR_MESSAGE]) - ]) - ], []) - -# Now we have the header we want, we can check the version number - AC_MSG_CHECKING([Slepc is at least 3.4.0]) - AC_EGREP_CPP([yes], [ - #include - #if SLEPC_VERSION_GE(3, 4, 0) - yes - #endif - ], [SLEPC_VERSION_OK="yes"], - [SLEPC_VERSION_OK="no"]) - AC_MSG_RESULT([$SLEPC_VERSION_OK]) - CPPFLAGS="$save_CPPFLAGS" - - AS_IF([test $SLEPC_VERSION_OK = no], [ - AC_MSG_ERROR([Slepc version must be at least 3.4.0]) - ]) - -# Check if Slepc was compiled with SUNDIALS - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$SLEPC_DIR/$SLEPC_ARCH/include" - - # Set the line to be included in the make.conf file - SLEPC_MAKE_INCLUDE="include ${SLEPC_CONFDIR}/slepc_variables" - - BOUT_HAS_SLEPC="yes" - - EXTRA_INCS="$EXTRA_INCS \$(SLEPC_INCLUDE)" - EXTRA_LIBS="$EXTRA_LIBS \$(SLEPC_LIB)" - -], [ - SLEPC_MAKE_INCLUDE= - BOUT_HAS_SLEPC="no" -]) - -############################################################# -# Solver choice: SUNDIALS' IDA, SUNDIALS' CVODE, PVODE -############################################################# - -BOUT_HAS_SUNDIALS=no -AS_IF([test "x$with_sundials" != "x" && test "x$with_sundials" != "xno"], [ - - # Now follows a few different checks for the version of SUNDIALS. - # We need the sundials_config.h header, which comes with all the - # versions we care about - - # If we've been given a path, look in there first - AS_IF([test "x$with_sundials" != "xyes"], [ - AC_CHECK_FILE([$with_sundials/include/sundials/sundials_config.h], - [SUNDIALS_INC=$with_sundials/include], [SUNDIALS_INC=""]) - ]) - - # If we've got one, add the include dir to the preprocessor flags - save_CPPFLAGS=$CPPFLAGS - AS_IF([test "x$SUNDIALS_INC" != "x"], [CPPFLAGS="-I$SUNDIALS_INC"]) - - AC_MSG_CHECKING([for SUNDIALS config header]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([ - #include "sundials/sundials_config.h" - ], [])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_FAILURE([*** Could not determine SUNDIALS version])]) - - AC_MSG_CHECKING([for SUNDIALS minor version]) - AC_EGREP_CPP([^ *\"? *[12]\.[0-5]\.], [ - #include "sundials/sundials_config.h" - #ifdef SUNDIALS_PACKAGE_VERSION - SUNDIALS_PACKAGE_VERSION - #endif - ], [sundials_minor_ver="too low"], [sundials_minor_ver=ok]) - AC_MSG_RESULT([$sundials_minor_ver]) - - CPPFLAGS=$save_CPPFLAGS - - AS_IF([test "$sundials_minor_ver" = "too low"], [ - AC_MSG_FAILURE([*** Unsupported SUNDIALS version: Requires at least 2.6]) - ]) - - # Set both IDA and CVODE if not set already - AS_IF([test "x$with_ida" = "x"], [ - with_ida=$with_sundials - ]) - - AS_IF([test "x$with_cvode" = "x"], [ - with_cvode=$with_sundials - ]) - - AS_IF([test "x$with_arkode" = "x"], [ - with_arkode=$with_sundials - ]) - BOUT_HAS_SUNDIALS=yes -]) - -AS_IF([test "x$with_ida" != "x" && test "x$with_ida" != "xno"], [ - BOUT_FIND_SUNDIALS_MODULE([ida], [ - #include - #include - extern void foo(N_Vector); - ], [IDACreate();]) -]) - -AS_IF([test "x$with_cvode" != "x" && test "x$with_cvode" != "xno"], [ - BOUT_FIND_SUNDIALS_MODULE([cvode], [ - #include - #include - extern void foo(N_Vector); - ], [ - #if SUNDIALS_VERSION_MAJOR >= 4 - CVodeCreate(0); - #else - CVodeCreate(0, 0); - #endif - ]) -]) - -AS_IF([test "x$with_arkode" != "x" && test "x$with_arkode" != "xno"], [ - BOUT_FIND_SUNDIALS_MODULE([arkode], [ - #include - #if SUNDIALS_VERSION_MAJOR >= 4 - #include - #else - #include - #endif - extern void foo(N_Vector); - ], [ - #if SUNDIALS_VERSION_MAJOR >= 4 - ARKStepCreate(0, 0, 0, 0); - #else - ARKodeCreate(); - #endif - ]) -]) - -############################################################# -# HYPRE -############################################################# - -BOUT_HAS_HYPRE="no" -AS_IF([test "$with_hypre" != "no"], [ - BOUT_ADDPATH_CHECK_HEADER(HYPRE.h, - BOUT_ADDPATH_CHECK_LIB(HYPRE, HYPRE_IJVectorCreate, - [ - BOUT_HAS_HYPRE="yes" - ], - AC_MSG_ERROR([HYPRE requested but not found]), - $with_hypre), - AC_MSG_ERROR([HYPRE requested but not found]), - $with_hypre - ) -]) - -############################################################# -# Scorep setup -############################################################# - -BOUT_HAS_SCOREP="no" -AS_IF([test "$with_scorep" != "no"], [ - - AS_IF([test "$with_scorep" != "yes"], [ - AC_MSG_NOTICE([Searching for Scorep executable in $with_scorep]) - AC_PATH_PROG([SCOREPPATH], [scorep], [], [$with_scorep]) - ], [ - AC_MSG_NOTICE([Searching for Scorep executable]) - AC_PATH_PROG([SCOREPPATH], [scorep], []) - ]) - - AS_IF([test "$SCOREPPATH" = ""], [ - AC_MSG_FAILURE([*** Scorep requested, but executable not found. -Please supply the path using --with-scorep=/path/to/scorep]) - ],[ - CXX="$SCOREPPATH --user --nocompiler $CXX" - BOUT_HAS_SCOREP="yes" - AC_MSG_NOTICE([Scorep support enabled]) - ]) - - ],[ - AC_MSG_NOTICE([Scorep support disabled]) -]) - -############################################################# -# Check for mpark.variant -############################################################# - -AS_IF([test ".$with_system_mpark" = "no"], [ - SYSTEM_HAS_MPARK=no -], [ - AC_MSG_CHECKING([for mpark.variant]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([ - #include "mpark/variant.hpp" - ], [])], - [AC_MSG_RESULT([yes]) - SYSTEM_HAS_MPARK=yes], - [AC_MSG_RESULT([no]) - SYSTEM_HAS_MPARK=no - AS_IF([test "$with_system_mpark" = "yes"], [ - AC_MSG_FAILURE([*** System mpark.variant not found - but requested to use]) - ])]) -]) - -AS_IF([test "$SYSTEM_HAS_MPARK" = "yes"], [ - MPARK_VARIANT_INCLUDE_PATH= - MPARK_INCLUDE= - OWN_MPARK= -], [ - AS_IF([test -d externalpackages/mpark.variant/include], [], - [ AS_IF([test -d .git && which git], [ - make -f makefile.submodules mpark_submodule || \ - AC_MSG_FAILURE([*** Could not download mpark.variant]) - ], [ - AC_MSG_FAILURE([mpark.variant not found. Please install mpark.variant or use the official releases.]) - ]) - ]) - - MPARK_VARIANT_INCLUDE_PATH="$PWD/externalpackages/mpark.variant/include" - MPARK_INCLUDE="-I$MPARK_VARIANT_INCLUDE_PATH" - OWN_MPARK=yes -]) - -############################################################# -# Check for libuuid -############################################################# - -AS_IF([test ".$with_system_uuid" = "no"], [ - BOUT_HAS_UUID_SYSTEM_GENERATOR=no -], [ - BOUT_ADDPATH_CHECK_HEADER(uuid/uuid.h, - BOUT_ADDPATH_CHECK_LIB(uuid, uuid_generate, - BOUT_HAS_UUID_SYSTEM_GENERATOR=yes, - BOUT_HAS_UUID_SYSTEM_GENERATOR=no, - [$with_system_uuid]), - BOUT_HAS_UUID_SYSTEM_GENERATOR=no, - [$with_system_uuid]) - AS_IF([test "$with_system_uuid" = "yes"], [ - AC_MSG_FAILURE([*** System UUID generator not found, but explicitly requested]) - ]) -]) - -############################################################# -# Download + Build PVODE '98 -############################################################# - -AS_MKDIR_P(externalpackages) -AS_MKDIR_P(lib) -AS_MKDIR_P(include) - -BOUT_HAS_PVODE="no" -AS_IF([test "$with_pvode" != "no"], [ - AS_IF([test "$enable_pvode_openmp" != "no" ], [ - AS_IF([test "$enable_openmp" != "no" ], [ - PVODE_FLAGS="$CXXFLAGS $OPENMP_CXXFLAGS" - AC_MSG_NOTICE([PVODE being built with OpenMP support]) - ], [ - AC_MSG_ERROR([Cannot enable openmp in PVODE as configuring with OpenMP disabled]) - ]) - ], [ - PVODE_FLAGS="$CXXFLAGS" - AC_MSG_NOTICE([PVODE being built without OpenMP support]) - ]) - # Clean PVODE - CXX="$CXX" CXXFLAGS=$PVODE_FLAGS MKDIR="$MKDIR_P" RANLIB="$RANLIB" $MAKE clean -C externalpackages/PVODE/precon/ >> config-build.log 2>&1 - CXX="$CXX" CXXFLAGS=$PVODE_FLAGS MKDIR="$MKDIR_P" RANLIB="$RANLIB" $MAKE clean -C externalpackages/PVODE/source/ >> config-build.log 2>&1 - - AC_MSG_NOTICE([Building PVODE]) - echo "* Building PVODE" >> config-build.log - echo "*************************************************************" >> config-build.log - - CXX="$CXX" CXXFLAGS=$PVODE_FLAGS MKDIR="$MKDIR_P" RANLIB="$RANLIB" $MAKE -C externalpackages/PVODE/precon/ >> config-build.log 2>&1 - CXX="$CXX" CXXFLAGS=$PVODE_FLAGS MKDIR="$MKDIR_P" RANLIB="$RANLIB" $MAKE -C externalpackages/PVODE/source/ >> config-build.log 2>&1 - - AS_IF([test -f externalpackages/PVODE/lib/libpvode.a && test -f externalpackages/PVODE/lib/libpvpre.a], [ - AC_MSG_NOTICE([Successfully built PVODE]) - AC_MSG_NOTICE([Installing PVODE into BOUT++ sourcetree]) - - echo "*************************************************************" >> config-build.log - echo "* Successfully built PVODE" >> config-build.log - echo "*************************************************************" >> config-build.log - echo "* Installing PVODE into BOUT++ sourcetree" >> config-build.log - echo "*************************************************************" >> config-build.log - ], [ - AC_MSG_ERROR(Could not build PVODE. See config-build.log for errors) - ]) - - # Set the correct libraries and copy them to bout - AS_MKDIR_P(include/pvode) - cp -r externalpackages/PVODE/include/pvode include - cp externalpackages/PVODE/lib/*.a lib/ - EXTRA_LIBS="$EXTRA_LIBS -L\$(BOUT_LIB_PATH) -lpvode -lpvpre" - BOUT_HAS_PVODE="yes" -]) - -############################################################# -# Localisation (i18n) with gettext -############################################################# - -BOUT_HAS_GETTEXT="no" -# Use macro to test if Natural Language Support (gettext) is available. -# If available sets: -# - USE_NLS to "yes" -# - LIBINTL to the linker options -# - Modifies CPPFLAGS if needed -AM_GNU_GETTEXT([external]) -AS_IF([test "$USE_NLS" = "yes"], [ - AC_MSG_NOTICE([Enabling language support with gettext]) - # Turn the .po files into .mo files - $MAKE -C locale | tee -a config-build.log 2>&1 - - # Note: BOUT_LOCALE_PATH is defined in make.config, and may be changed by `make install`. - CXXFLAGS="$CXXFLAGS -DBOUT_LOCALE_PATH=\$(BOUT_LOCALE_PATH)" - - EXTRA_LIBS="$EXTRA_LIBS $LIBINTL" - - # Set variable substituted into bout-config - BOUT_HAS_GETTEXT="yes" -],[ - AC_MSG_NOTICE([Language support with gettext not available]) -]) - -############################################################# -# Sort out fmt -############################################################# - -dnl If in a git repo, get submodule, unless BOUT_DONT_UPDATE_GIT_SUBMODULE is set -AC_CHECK_FILE([.git], [ - AS_IF([test "x$BOUT_DONT_UPDATE_GIT_SUBMODULE" == "x"], [ - git submodule update --init externalpackages/fmt - ]) -]) - -dnl Copy the one file we need to somewhere else -AC_CONFIG_LINKS(src/fmt/format.cxx:externalpackages/fmt/src/format.cc) - -############################################################# -# Check environment -############################################################# - -AS_IF([test "$CXXINCLUDE" != ""], [ - AC_MSG_NOTICE([================================================]) - AC_MSG_NOTICE([ WARNING: CXXINCLUDE environment variable set to:]) - AC_MSG_NOTICE([$CXXINCLUDE]) - AC_MSG_NOTICE([ => This will be added to compile commands]) - AC_MSG_NOTICE([ If this is not intended, then run]) - AC_MSG_NOTICE([ export CXXINCLUDE='']) - AC_MSG_NOTICE([ before making BOUT++]) - AC_MSG_NOTICE([================================================]) -]) - -############################################################# -# Gather configuration info for bout-config -############################################################# - -EXTRA_INCS="${EXTRA_INCS} ${CPPFLAGS}" - -PREFIX=$PWD -IDLCONFIGPATH=$PWD/tools/idllib -PYTHONCONFIGPATH=$PWD/tools/pylib - -BOUT_HAS_IDA="yes" -if test "$IDALIBS" = "" -then - BOUT_HAS_IDA="no" -fi - -BOUT_HAS_CVODE="yes" -if test "$CVODELIBS" = "" -then - BOUT_HAS_CVODE="no" -fi - -BOUT_HAS_ARKODE="yes" -if test "$ARKODELIBS" = "" -then - BOUT_HAS_ARKODE="no" -fi - -BOUT_HAS_PNETCDF="yes" -if test "$PNCPATH" = "" -then - BOUT_HAS_PNETCDF="no" -fi - -# Only make.config is altered by configure -AC_CONFIG_FILES([make.config]) -AC_OUTPUT - -############################################################# -# Use a dummy Makefile to get the cflags and ldflags -# -# This is to capture flags from external libraries such -# as PETSc -############################################################# - -CONFIG_CFLAGS=`$MAKE cflags -f output.make` -CONFIG_LDFLAGS=`$MAKE ldflags -f output.make` - -############################################################# -# Defines which are supported by CMake build but not autoconf - -BOUT_HAS_CUDA="no" -BOUT_HAS_RAJA="no" -BOUT_HAS_UMPIRE="no" -BOUT_HAS_CALIPER="no" - -BOUT_DEFINE_SUBST(BOUT_HAS_CUDA, [Enable CUDA]) -BOUT_DEFINE_SUBST(BOUT_HAS_RAJA, [RAJA support]) -BOUT_DEFINE_SUBST(BOUT_HAS_UMPIRE, [Umpire support]) -BOUT_DEFINE_SUBST(BOUT_HAS_CALIPER, [Caliper support]) - -############################################################# -# Write configuration to bout-config -############################################################# - -AC_SUBST(CONFIG_CFLAGS) -AC_SUBST(CONFIG_LDFLAGS) - -# Set path to lib and include here. -# If make install is run then that replaces these paths -BOUT_LIB_PATH=$PWD/lib -BOUT_INCLUDE_PATH=$PWD/include -FMT_INCLUDE_PATH=$PWD/externalpackages/fmt/include -AC_SUBST(BOUT_LIB_PATH) -AC_SUBST(BOUT_INCLUDE_PATH) -AC_SUBST(FMT_INCLUDE_PATH) -AC_SUBST(MPARK_VARIANT_INCLUDE_PATH) -AC_SUBST(MPARK_INCLUDE) -AC_SUBST(OWN_MPARK) - -AC_SUBST(PREFIX) -AC_SUBST(IDLCONFIGPATH) -AC_SUBST(PYTHONCONFIGPATH) -AC_SUBST(LIB_TO_BUILD) -AC_SUBST(STATIC_EXTRA) -AC_SUBST(SHARED_EXTRA) - -AC_SUBST(BOUT_VERSION) -AC_SUBST(BOUT_VERSION_MAJOR) -AC_SUBST(BOUT_VERSION_MINOR) -AC_SUBST(BOUT_VERSION_PATCH) -AC_SUBST(BOUT_VERSION_TAG) -AC_SUBST(BOUT_REVISION) - -AC_SUBST(BOUT_CHECK_LEVEL) -AC_DEFINE_UNQUOTED(BOUT_CHECK_LEVEL, [$BOUT_CHECK_LEVEL], [Runtime error checking level]) - -AC_SUBST(BOUT_OPENMP_SCHEDULE) -AC_DEFINE_UNQUOTED(BOUT_OPENMP_SCHEDULE, [$BOUT_OPENMP_SCHEDULE], [OpenMP schedule]) - -BOUT_DEFINE_SUBST(BOUT_HAS_ARKODE, [ARKODE support]) -BOUT_DEFINE_SUBST(BOUT_HAS_CVODE, [CVODE support]) -BOUT_DEFINE_SUBST(BOUT_HAS_FFTW, [FFTW support]) -BOUT_DEFINE_SUBST(BOUT_HAS_GETTEXT, [NLS support]) -BOUT_DEFINE_SUBST(BOUT_HAS_IDA, [IDA support]) -BOUT_DEFINE_SUBST(BOUT_HAS_LAPACK, [LAPACK support]) -BOUT_DEFINE_SUBST(BOUT_HAS_NETCDF, [NETCDF support]) -BOUT_DEFINE_SUBST(BOUT_HAS_LEGACY_NETCDF, [NETCDF support]) -BOUT_DEFINE_SUBST(BOUT_HAS_PETSC, [PETSc support]) -BOUT_DEFINE_SUBST(BOUT_HAS_HYPRE, [Hypre support]) -BOUT_DEFINE_SUBST(BOUT_HAS_PNETCDF, [PNETCDF support]) -BOUT_DEFINE_SUBST(BOUT_HAS_PRETTY_FUNCTION, [Compiler PRETTYFUNCTION support]) -BOUT_DEFINE_SUBST(BOUT_HAS_PVODE, [PVODE support]) -BOUT_DEFINE_SUBST(BOUT_HAS_SCOREP, [Score-P support]) -BOUT_DEFINE_SUBST(BOUT_HAS_SLEPC, [SLEPc support]) -BOUT_DEFINE_SUBST(BOUT_HAS_SUNDIALS, [SUNDIALS support]) -BOUT_DEFINE_SUBST(BOUT_HAS_UUID_SYSTEM_GENERATOR, [Use libuuid for UUID generation]) -BOUT_DEFINE_SUBST(BOUT_USE_BACKTRACE, [Enable backtrace in exceptions]) -BOUT_DEFINE_SUBST(BOUT_USE_COLOR, [Enable color logs option]) -BOUT_DEFINE_SUBST(BOUT_USE_OUTPUT_DEBUG, [Enabled extra debug output]) -BOUT_DEFINE_SUBST(BOUT_USE_OPENMP, [Enable OpenMP]) -BOUT_DEFINE_SUBST(BOUT_USE_SIGFPE, [Enable floating point exceptions]) -BOUT_DEFINE_SUBST(BOUT_USE_SIGNAL, [Enable signal handlers]) -BOUT_DEFINE_SUBST(BOUT_USE_TRACK, [Enable field name tracking]) -BOUT_DEFINE_SUBST(BOUT_USE_MSGSTACK, [Enable MsgStack for traces]) -AC_DEFINE_UNQUOTED([BOUT_METRIC_TYPE], $BOUT_METRIC_TYPE, [Type of the metric fields]) -BOUT_METRIC_3D=$(test $BOUT_METRIC_TYPE != 3D ; echo $?) -AC_DEFINE_UNQUOTED([BOUT_USE_METRIC_3D], $BOUT_METRIC_3D, [Is the metric field 3D]) -AC_SUBST(BOUT_METRIC_TYPE) - -AC_SUBST(PETSC_HAS_SUNDIALS) -AC_SUBST(PETSC_MAKE_INCLUDE) -AC_SUBST(PETSC_DIR) -AC_SUBST(PETSC_ARCH) -AC_SUBST(SLEPC_MAKE_INCLUDE) -AC_SUBST(SLEPC_DIR) -AC_SUBST(SLEPC_ARCH) - - -AC_CONFIG_HEADERS([include/bout/build_defines.hxx:autoconf_build_defines.hxx.in]) -AC_CONFIG_FILES([include/bout/version.hxx]) -AC_CONFIG_FILES([include/bout/revision.hxx]) -AC_CONFIG_FILES([bin/bout-config]) -AC_CONFIG_FILES([src/makefile]) -AC_CONFIG_FILES([tools/pylib/boutconfig/__init__.py]) -AC_OUTPUT -chmod a+x bin/bout-config - -############################################################# -# Print configuration info -############################################################# - -AC_MSG_NOTICE([-------------------------]) -AC_MSG_NOTICE([ Configuration summary ]) -AC_MSG_NOTICE([-------------------------]) - -AC_MSG_NOTICE([ PETSc support : $BOUT_HAS_PETSC (has SUNDIALS: $PETSC_HAS_SUNDIALS)]) -AC_MSG_NOTICE([ SLEPc support : $BOUT_HAS_SLEPC]) -AC_MSG_NOTICE([ IDA support : $BOUT_HAS_IDA]) -AC_MSG_NOTICE([ CVODE support : $BOUT_HAS_CVODE]) -AC_MSG_NOTICE([ ARKODE support : $BOUT_HAS_ARKODE]) -AC_MSG_NOTICE([ FFTW support : $BOUT_HAS_FFTW]) -AC_MSG_NOTICE([ NetCDF support : $BOUT_HAS_NETCDF (legacy: $BOUT_HAS_LEGACY_NETCDF)]) -AC_MSG_NOTICE([ Parallel-NetCDF support : $BOUT_HAS_PNETCDF]) -AC_MSG_NOTICE([ Lapack support : $BOUT_HAS_LAPACK]) -AC_MSG_NOTICE([ Scorep support : $BOUT_HAS_SCOREP]) -AC_MSG_NOTICE([ OpenMP support : $BOUT_USE_OPENMP (schedule: $OPENMP_SCHEDULE)]) -AC_MSG_NOTICE([ Natural language support: $BOUT_HAS_GETTEXT (path: $localedir)]) -AC_MSG_NOTICE([ HYPRE support : $BOUT_HAS_HYPRE]) -AC_MSG_NOTICE([ System UUID generator : $BOUT_HAS_UUID_SYSTEM_GENERATOR]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([ Enable backtrace : $BOUT_USE_BACKTRACE]) -AC_MSG_NOTICE([ Enable color logs : $BOUT_USE_COLOR]) -AC_MSG_NOTICE([ Enable more debug output: $BOUT_USE_OUTPUT_DEBUG]) -AC_MSG_NOTICE([ Enable OpenMP : $BOUT_USE_OPENMP]) -AC_MSG_NOTICE([ Enable FP exceptions : $BOUT_USE_SIGFPE]) -AC_MSG_NOTICE([ Enable signal handlers : $BOUT_USE_SIGNAL]) -AC_MSG_NOTICE([ Enable field names : $BOUT_USE_TRACK]) -AC_MSG_NOTICE([ Metric type : $BOUT_METRIC_TYPE]) - -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([-------------------------------]) -AC_MSG_NOTICE([ Data analysis configuration ]) -AC_MSG_NOTICE([-------------------------------]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([=== IDL ===]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([Make sure that the tools/idllib directory is in your IDL_PATH]) -AC_MSG_NOTICE([e.g. by adding to your ~/.bashrc file]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([ export IDL_PATH=+$PWD/tools/idllib:'':\$IDL_PATH]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([=== Python ===]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([Make sure that the tools/pylib directory is in your PYTHONPATH]) -AC_MSG_NOTICE([e.g. by adding to your ~/.bashrc file]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([ export PYTHONPATH=$PWD/tools/pylib/:\$PYTHONPATH]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([*** Now run '$MAKE' to compile BOUT++ ***]) -AC_MSG_NOTICE([]) -AC_MSG_WARN([./configure is deprecated and will be removed in a future version, please use CMake instead]) diff --git a/examples/2Dturbulence_multigrid/makefile b/examples/2Dturbulence_multigrid/makefile deleted file mode 100644 index f67cb0d1ba..0000000000 --- a/examples/2Dturbulence_multigrid/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../ - -SOURCEC = esel.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/6field-simple/makefile b/examples/6field-simple/makefile deleted file mode 100644 index 6f70c9d751..0000000000 --- a/examples/6field-simple/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../ - -SOURCEC = elm_6f.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/IMEX/advection-diffusion/makefile b/examples/IMEX/advection-diffusion/makefile deleted file mode 100644 index 588242e834..0000000000 --- a/examples/IMEX/advection-diffusion/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = imex.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/IMEX/advection-reaction/makefile b/examples/IMEX/advection-reaction/makefile deleted file mode 100644 index 689fd0c614..0000000000 --- a/examples/IMEX/advection-reaction/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = split_operator.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/IMEX/diffusion-nl/makefile b/examples/IMEX/diffusion-nl/makefile deleted file mode 100644 index 8dcd38cc0b..0000000000 --- a/examples/IMEX/diffusion-nl/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = diffusion-nl.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/IMEX/drift-wave-constraint/makefile b/examples/IMEX/drift-wave-constraint/makefile deleted file mode 100644 index fdf3abccc9..0000000000 --- a/examples/IMEX/drift-wave-constraint/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = test-drift.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/IMEX/drift-wave/makefile b/examples/IMEX/drift-wave/makefile deleted file mode 100644 index fdf3abccc9..0000000000 --- a/examples/IMEX/drift-wave/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = test-drift.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/advdiff/makefile b/examples/advdiff/makefile deleted file mode 100644 index 15bffe5c29..0000000000 --- a/examples/advdiff/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = advdiff.cxx - -include $(BOUT_TOP)/make.config \ No newline at end of file diff --git a/examples/advdiff2/makefile b/examples/advdiff2/makefile deleted file mode 100644 index e17c2c3c7a..0000000000 --- a/examples/advdiff2/makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOUT_TOP ?= ../.. - -SOURCEC = init.cxx rhs.cxx - -TARGET = advdiff - -include $(BOUT_TOP)/make.config diff --git a/examples/backtrace/makefile b/examples/backtrace/makefile deleted file mode 100644 index cb5c651884..0000000000 --- a/examples/backtrace/makefile +++ /dev/null @@ -1,11 +0,0 @@ -BOUT_TOP ?= ../.. - -TARGET=backtrace - -SOURCEC = $(TARGET).cxx - -include $(BOUT_TOP)/make.config - -$(TARGET).o: $(TARGET).cxx - @echo " Compiling " $< - @$(CXX) $(BOUT_INCLUDE) $(BOUT_FLAGS) -c $< -g -o $@ diff --git a/examples/blob2d-laplacexz/makefile b/examples/blob2d-laplacexz/makefile deleted file mode 100644 index ca2f949a73..0000000000 --- a/examples/blob2d-laplacexz/makefile +++ /dev/null @@ -1,6 +0,0 @@ -BOUT_TOP ?= ../.. - -SOURCEC = blob2d.cxx - -include $(BOUT_TOP)/make.config - diff --git a/examples/blob2d-outerloop/makefile b/examples/blob2d-outerloop/makefile deleted file mode 100644 index 1ab6de5387..0000000000 --- a/examples/blob2d-outerloop/makefile +++ /dev/null @@ -1,6 +0,0 @@ -BOUT_TOP = ../.. - -SOURCEC = blob2d.cxx - -include $(BOUT_TOP)/make.config - diff --git a/examples/blob2d/makefile b/examples/blob2d/makefile deleted file mode 100644 index ca2f949a73..0000000000 --- a/examples/blob2d/makefile +++ /dev/null @@ -1,6 +0,0 @@ -BOUT_TOP ?= ../.. - -SOURCEC = blob2d.cxx - -include $(BOUT_TOP)/make.config - diff --git a/examples/boundary-conditions/advection/makefile b/examples/boundary-conditions/advection/makefile deleted file mode 100644 index 962ca894c2..0000000000 --- a/examples/boundary-conditions/advection/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = advection.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/conducting-wall-mode/makefile b/examples/conducting-wall-mode/makefile deleted file mode 100644 index e3375e06d9..0000000000 --- a/examples/conducting-wall-mode/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = cwm.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/conduction-snb/makefile b/examples/conduction-snb/makefile deleted file mode 100644 index 90ecf242d8..0000000000 --- a/examples/conduction-snb/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = conduction-snb.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/conduction/makefile b/examples/conduction/makefile deleted file mode 100644 index 26a2d2686e..0000000000 --- a/examples/conduction/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = conduction.cxx - -include $(BOUT_TOP)/make.config \ No newline at end of file diff --git a/examples/constraints/alfven-wave/makefile b/examples/constraints/alfven-wave/makefile deleted file mode 100644 index cc53facb8e..0000000000 --- a/examples/constraints/alfven-wave/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = alfven.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/constraints/laplace-dae/makefile b/examples/constraints/laplace-dae/makefile deleted file mode 100644 index 224a696106..0000000000 --- a/examples/constraints/laplace-dae/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = laplace_dae.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/dalf3/doc/makefile b/examples/dalf3/doc/makefile deleted file mode 100644 index 6812b687f9..0000000000 --- a/examples/dalf3/doc/makefile +++ /dev/null @@ -1,11 +0,0 @@ - -DOCS=dalf3.pdf - -all:$(DOCS) - -%.pdf: %.tex - latexmk -pdf $< -interaction=batchmode - -.PHONY: clean -clean: - latexmk -C diff --git a/examples/dalf3/makefile b/examples/dalf3/makefile deleted file mode 100644 index 3c9eed60c1..0000000000 --- a/examples/dalf3/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = dalf3.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/eigen-box/makefile b/examples/eigen-box/makefile deleted file mode 100644 index 53855e725b..0000000000 --- a/examples/eigen-box/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = eigen-box.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/elm-pb-outerloop/makefile b/examples/elm-pb-outerloop/makefile deleted file mode 100644 index 5d9b045742..0000000000 --- a/examples/elm-pb-outerloop/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../ - -SOURCEC = elm_pb_outerloop.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/elm-pb/doc/makefile b/examples/elm-pb/doc/makefile deleted file mode 100644 index 66f9cd76f8..0000000000 --- a/examples/elm-pb/doc/makefile +++ /dev/null @@ -1,14 +0,0 @@ -# Makefile for the reference and user manuals - -.PHONY:all - -all: elm_pb.pdf - -%.pdf: %.tex - latexmk -pdf $(@F:.pdf=) -interaction=batchmode - -.PHONY:clean - -clean: - latexmk -C - diff --git a/examples/elm-pb/makefile b/examples/elm-pb/makefile deleted file mode 100644 index ea19cf6f83..0000000000 --- a/examples/elm-pb/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../ - -SOURCEC = elm_pb.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/em-drift/makefile b/examples/em-drift/makefile deleted file mode 100644 index e9c69ca443..0000000000 --- a/examples/em-drift/makefile +++ /dev/null @@ -1,5 +0,0 @@ -BOUT_TOP ?= ../.. - -SOURCEC = 2fluid.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/fci-wave-logn/makefile b/examples/fci-wave-logn/makefile deleted file mode 100644 index 24c0928db5..0000000000 --- a/examples/fci-wave-logn/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = fci-wave.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/fci-wave/makefile b/examples/fci-wave/makefile deleted file mode 100644 index 24c0928db5..0000000000 --- a/examples/fci-wave/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = fci-wave.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/finite-volume/diffusion/makefile b/examples/finite-volume/diffusion/makefile deleted file mode 100644 index c633a109d9..0000000000 --- a/examples/finite-volume/diffusion/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = diffusion.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/finite-volume/fluid/makefile b/examples/finite-volume/fluid/makefile deleted file mode 100644 index 4effb80b45..0000000000 --- a/examples/finite-volume/fluid/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = fluid.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/finite-volume/test/makefile b/examples/finite-volume/test/makefile deleted file mode 100644 index 96b5469333..0000000000 --- a/examples/finite-volume/test/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = finite_volume.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/gas-compress/makefile b/examples/gas-compress/makefile deleted file mode 100644 index 029f9335a1..0000000000 --- a/examples/gas-compress/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = gas_compress.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/gravity_reduced/makefile b/examples/gravity_reduced/makefile deleted file mode 100644 index eb5a62641a..0000000000 --- a/examples/gravity_reduced/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = gravity_reduced.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/gyro-gem/doc/makefile b/examples/gyro-gem/doc/makefile deleted file mode 100644 index 95a4b4d896..0000000000 --- a/examples/gyro-gem/doc/makefile +++ /dev/null @@ -1,11 +0,0 @@ - -DOCS=gem.pdf - -all:$(DOCS) - -%.pdf: %.tex - latexmk -pdf $< -interaction=batchmode - -.PHONY: clean -clean: - latexmk -C diff --git a/examples/gyro-gem/makefile b/examples/gyro-gem/makefile deleted file mode 100644 index 709cf2d5fa..0000000000 --- a/examples/gyro-gem/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = gem.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/hasegawa-wakatani-3d/makefile b/examples/hasegawa-wakatani-3d/makefile deleted file mode 100644 index 8f33b716b9..0000000000 --- a/examples/hasegawa-wakatani-3d/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP = ../.. - -SOURCEC = hw.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/hasegawa-wakatani/makefile b/examples/hasegawa-wakatani/makefile deleted file mode 100644 index 34395b1bf0..0000000000 --- a/examples/hasegawa-wakatani/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = hw.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/invertable_operator/makefile b/examples/invertable_operator/makefile deleted file mode 100644 index ff5ec8c809..0000000000 --- a/examples/invertable_operator/makefile +++ /dev/null @@ -1,11 +0,0 @@ -BOUT_TOP ?= ../.. - -SOURCEC = invertable_operator.cxx - -target: requires_petsc invertable_operator - -requires_petsc: - @test $$($(BOUT_TOP)/bin/bout-config --has-petsc ) = yes || \ - (echo "ERROR: This example requires PETSc. Please compile BOUT++ with PETSc." ; exit 1) - -include $(BOUT_TOP)/make.config diff --git a/examples/jorek-compare/doc/makefile b/examples/jorek-compare/doc/makefile deleted file mode 100644 index 66c36824ae..0000000000 --- a/examples/jorek-compare/doc/makefile +++ /dev/null @@ -1,11 +0,0 @@ - -DOCS=jorek_compare.pdf - -all:$(DOCS) - -%.pdf: %.tex - latexmk -pdf $< -interaction=batchmode - -.PHONY: clean -clean: - latexmk -C diff --git a/examples/jorek-compare/makefile b/examples/jorek-compare/makefile deleted file mode 100644 index 4d0898da1e..0000000000 --- a/examples/jorek-compare/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = jorek_compare.cxx - -include $(BOUT_TOP)/make.config \ No newline at end of file diff --git a/examples/lapd-drift/makefile b/examples/lapd-drift/makefile deleted file mode 100644 index abb567e24b..0000000000 --- a/examples/lapd-drift/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = lapd_drift.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/laplace-petsc3d/makefile b/examples/laplace-petsc3d/makefile deleted file mode 100644 index ad943fe51c..0000000000 --- a/examples/laplace-petsc3d/makefile +++ /dev/null @@ -1,5 +0,0 @@ -BOUT_TOP ?= ../.. - -SOURCEC = test-laplace3d.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/laplace-petsc3d/makefile.create-initial-profiles b/examples/laplace-petsc3d/makefile.create-initial-profiles deleted file mode 100644 index 1e0f564626..0000000000 --- a/examples/laplace-petsc3d/makefile.create-initial-profiles +++ /dev/null @@ -1,5 +0,0 @@ -BOUT_TOP ?= ../.. - -SOURCEC = create-initial-profiles.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/laplacexy/alfven-wave/makefile b/examples/laplacexy/alfven-wave/makefile deleted file mode 100644 index cc53facb8e..0000000000 --- a/examples/laplacexy/alfven-wave/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = alfven.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/laplacexy/laplace_perp/makefile b/examples/laplacexy/laplace_perp/makefile deleted file mode 100644 index 76f2d7cc5b..0000000000 --- a/examples/laplacexy/laplace_perp/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = test.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/laplacexy/simple/makefile b/examples/laplacexy/simple/makefile deleted file mode 100644 index d3da2c0196..0000000000 --- a/examples/laplacexy/simple/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = test-laplacexy.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/monitor-newapi/makefile b/examples/monitor-newapi/makefile deleted file mode 100644 index 0ec013a133..0000000000 --- a/examples/monitor-newapi/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = monitor.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/monitor/makefile b/examples/monitor/makefile deleted file mode 100644 index 0ec013a133..0000000000 --- a/examples/monitor/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = monitor.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/orszag-tang/makefile b/examples/orszag-tang/makefile deleted file mode 100644 index 9796b1c7a7..0000000000 --- a/examples/orszag-tang/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = mhd.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/arithmetic/makefile b/examples/performance/arithmetic/makefile deleted file mode 100644 index c9e6f1e69c..0000000000 --- a/examples/performance/arithmetic/makefile +++ /dev/null @@ -1,10 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = arithmetic.cxx - -include $(BOUT_TOP)/make.config - - -run:arithmetic - ./arithmetic -q -q -q diff --git a/examples/performance/arithmetic_3d2d/makefile b/examples/performance/arithmetic_3d2d/makefile deleted file mode 100644 index 386ab242e6..0000000000 --- a/examples/performance/arithmetic_3d2d/makefile +++ /dev/null @@ -1,10 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = arithmetic_3d2d.cxx - -include $(BOUT_TOP)/make.config - - -run:arithmetic_3d2d - ./arithmetic_3d2d -q -q -q diff --git a/examples/performance/bracket/makefile b/examples/performance/bracket/makefile deleted file mode 100644 index 3559c27e2d..0000000000 --- a/examples/performance/bracket/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = bracket.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/communications/makefile b/examples/performance/communications/makefile deleted file mode 100644 index 80cdd9062f..0000000000 --- a/examples/performance/communications/makefile +++ /dev/null @@ -1,5 +0,0 @@ -BOUT_TOP ?= ../../.. - -SOURCEC = communications.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/ddx/makefile b/examples/performance/ddx/makefile deleted file mode 100644 index 52f6ed7dc0..0000000000 --- a/examples/performance/ddx/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = ddx.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/ddy/makefile b/examples/performance/ddy/makefile deleted file mode 100644 index 57b502450a..0000000000 --- a/examples/performance/ddy/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = ddy.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/ddz/makefile b/examples/performance/ddz/makefile deleted file mode 100644 index 5f7aefa6cc..0000000000 --- a/examples/performance/ddz/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = ddz.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/iterator-offsets/makefile b/examples/performance/iterator-offsets/makefile deleted file mode 100644 index 94dac859f6..0000000000 --- a/examples/performance/iterator-offsets/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = iterator-offsets.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/iterator/makefile b/examples/performance/iterator/makefile deleted file mode 100644 index 33a11d30be..0000000000 --- a/examples/performance/iterator/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = iterator.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/laplace/makefile b/examples/performance/laplace/makefile deleted file mode 100644 index 3ff28a130e..0000000000 --- a/examples/performance/laplace/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = laplace.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/performance/tuning_regionblocksize/makefile b/examples/performance/tuning_regionblocksize/makefile deleted file mode 100644 index 6f906e3793..0000000000 --- a/examples/performance/tuning_regionblocksize/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../../.. - -SOURCEC = tuning_regionblocksize.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/preconditioning/wave/makefile b/examples/preconditioning/wave/makefile deleted file mode 100644 index 095c893d8e..0000000000 --- a/examples/preconditioning/wave/makefile +++ /dev/null @@ -1,5 +0,0 @@ -BOUT_TOP ?= ../../.. - -SOURCEC = test_precon.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/reconnect-2field/makefile b/examples/reconnect-2field/makefile deleted file mode 100644 index 0b7745f5af..0000000000 --- a/examples/reconnect-2field/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = 2field.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/shear-alfven-wave/makefile b/examples/shear-alfven-wave/makefile deleted file mode 100644 index 92ac3ce50d..0000000000 --- a/examples/shear-alfven-wave/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = 2fluid.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/staggered_grid/makefile b/examples/staggered_grid/makefile deleted file mode 100644 index e00eaecd74..0000000000 --- a/examples/staggered_grid/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = test_staggered.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/subsampling/makefile b/examples/subsampling/makefile deleted file mode 100644 index 0ec013a133..0000000000 --- a/examples/subsampling/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = monitor.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/tokamak-2fluid/makefile b/examples/tokamak-2fluid/makefile deleted file mode 100644 index 92ac3ce50d..0000000000 --- a/examples/tokamak-2fluid/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = 2fluid.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/uedge-benchmark/makefile b/examples/uedge-benchmark/makefile deleted file mode 100644 index 4c8a72d394..0000000000 --- a/examples/uedge-benchmark/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = ue_bmark.cxx - -include $(BOUT_TOP)/make.config diff --git a/examples/wave-slab/makefile b/examples/wave-slab/makefile deleted file mode 100644 index b20fcf6c8e..0000000000 --- a/examples/wave-slab/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP ?= ../.. - -SOURCEC = wave_slab.cxx - -include $(BOUT_TOP)/make.config diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4 deleted file mode 100644 index 5b6f1af51d..0000000000 --- a/m4/ax_append_compile_flags.m4 +++ /dev/null @@ -1,67 +0,0 @@ -# ============================================================================ -# https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html -# ============================================================================ -# -# SYNOPSIS -# -# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# For every FLAG1, FLAG2 it is checked whether the compiler works with the -# flag. If it does, the flag is added FLAGS-VARIABLE -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. During the check the flag is always added to the -# current language's flags. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: This macro depends on the AX_APPEND_FLAG and -# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with -# AX_APPEND_LINK_FLAGS. -# -# LICENSE -# -# Copyright (c) 2011 Maarten Bosmans -# -# 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 3 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 - -AC_DEFUN([AX_APPEND_COMPILE_FLAGS], -[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) -AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) -for flag in $1; do - AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4]) -done -])dnl AX_APPEND_COMPILE_FLAGS diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4 deleted file mode 100644 index e8c5312af6..0000000000 --- a/m4/ax_append_flag.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) -# -# DESCRIPTION -# -# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space -# added in between. -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains -# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly -# FLAG. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# 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 3 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 - -AC_DEFUN([AX_APPEND_FLAG], -[dnl -AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF -AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) -AS_VAR_SET_IF(FLAGS,[ - AS_CASE([" AS_VAR_GET(FLAGS) "], - [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], - [ - AS_VAR_APPEND(FLAGS,[" $1"]) - AC_RUN_LOG([: FLAGS="$FLAGS"]) - ]) - ], - [ - AS_VAR_SET(FLAGS,[$1]) - AC_RUN_LOG([: FLAGS="$FLAGS"]) - ]) -AS_VAR_POPDEF([FLAGS])dnl -])dnl AX_APPEND_FLAG diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 deleted file mode 100644 index dcabb92a14..0000000000 --- a/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# 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 3 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 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4 deleted file mode 100644 index 7a5b742b44..0000000000 --- a/m4/ax_code_coverage.m4 +++ /dev/null @@ -1,241 +0,0 @@ -# =========================================================================== -# This was modified for the BOUT++ project -# Original from: -# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CODE_COVERAGE() -# -# DESCRIPTION -# -# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, -# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included -# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every -# build target (program or library) which should be built with code -# coverage support. Also defines CODE_COVERAGE_RULES which should be -# substituted in your Makefile; and $enable_code_coverage which can be -# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined -# and substituted, and corresponds to the value of the -# --enable-code-coverage option, which defaults to being disabled. -# -# Test also for gcov program and create GCOV variable that could be -# substituted. -# -# Note that all optimization flags in CFLAGS must be disabled when code -# coverage is enabled. -# -# Usage example: -# -# configure.ac: -# -# AX_CODE_COVERAGE -# -# Makefile.am: -# -# @CODE_COVERAGE_RULES@ -# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ... -# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... -# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... -# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... -# -# This results in a "check-code-coverage" rule being added to any -# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module -# has been configured with --enable-code-coverage). Running `make -# check-code-coverage` in that directory will run the module's test suite -# (`make check`) and build a code coverage report detailing the code which -# was touched, then print the URI for the report. -# -# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined -# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of -# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is -# deprecated. They have the same value. -# -# This code was derived from Makefile.decl in GLib, originally licenced -# under LGPLv2.1+. -# -# LICENSE -# -# Copyright (c) 2012, 2016 Philip Withnall -# Copyright (c) 2012 Xan Lopez -# Copyright (c) 2012 Christian Persch -# Copyright (c) 2012 Paolo Borelli -# Copyright (c) 2012 Dan Winship -# Copyright (c) 2015 Bastien ROUCARIES -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or (at -# your option) any later version. -# -# This library 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 Lesser -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . - -#serial 24 - -AC_DEFUN([AX_CODE_COVERAGE],[ - dnl Check for --enable-code-coverage - AC_REQUIRE([AC_PROG_SED]) - - # allow to override gcov location - AC_ARG_WITH([gcov], - [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], - [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], - [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) - - AC_MSG_CHECKING([whether to build with code coverage support]) - AC_ARG_ENABLE([code-coverage], - AS_HELP_STRING([--enable-code-coverage], - [Whether to enable code coverage support]),, - enable_code_coverage=no) - - AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) - AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) - AC_MSG_RESULT($enable_code_coverage) - - AS_IF([ test "$enable_code_coverage" = "yes" ], [ - # check for gcov - AC_CHECK_TOOL([GCOV], - [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], - [:]) - AS_IF([test "X$GCOV" = "X:"], - [AC_MSG_ERROR([gcov is needed to do coverage])]) - AC_SUBST([GCOV]) - - dnl Check if gcc is being used - AS_IF([ test "$GCC" = "no" ], [ - AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) - ]) - - AC_CHECK_PROG([LCOV], [lcov], [lcov]) - AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) - - AS_IF([ test -z "$LCOV" ], [ - AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed]) - ]) - - AS_IF([ test -z "$GENHTML" ], [ - AC_MSG_ERROR([Could not find genhtml from the lcov package]) - ]) - - dnl Build the code coverage flags - dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility - CODE_COVERAGE_CPPFLAGS="-DNDEBUG" - CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_LIBS="-lgcov" - CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" - - AC_SUBST([CODE_COVERAGE_CPPFLAGS]) - AC_SUBST([CODE_COVERAGE_CFLAGS]) - AC_SUBST([CODE_COVERAGE_CXXFLAGS]) - AC_SUBST([CODE_COVERAGE_LIBS]) - AC_SUBST([CODE_COVERAGE_LDFLAGS]) - - [CODE_COVERAGE_RULES_CAPTURE=' - @$(LCOV) --quiet $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --no-external --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --no-checksum $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) - @$(LCOV) --quiet $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) - -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - @LANG=C $(GENHTML) --quiet $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --demangle-cpp --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "BOUT++ Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) - @$(LCOV) --summary $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_LCOV_OPTIONS) - @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" -'] - [CODE_COVERAGE_RULES_CLEAN=' -clean:: code-coverage-clean -distclean:: code-coverage-clean -code-coverage-clean: - -@$(LCOV) --directory $(abs_builddir) -z --quiet - -@$(RM) -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -@find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete -'] - ], [ - [CODE_COVERAGE_RULES_CHECK=' - @echo "Need to reconfigure with --enable-code-coverage" -'] - CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" - CODE_COVERAGE_RULES_CLEAN='' - ]) - -[CODE_COVERAGE_RULES=' -# Code coverage -# -# Optional: -# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. -# Multiple directories may be specified, separated by whitespace. -# (Default: $(top_builddir)) -# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated -# by lcov for code coverage. (Default: -# bout-coverage.info) -# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage -# reports to be created. (Default: -# bout-coverage) -# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, -# set to 0 to disable it and leave empty to stay with the default. -# (Default: empty) -# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov -# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) -# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov -# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) -# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov -# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the -# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov -# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering -# lcov instance. (Default: empty) -# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov -# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) -# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the -# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) -# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) -# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore -# -# The generated report will be titled using the $(PACKAGE_NAME) and -# $(PACKAGE_VERSION). In order to add the current git hash to the title, -# use the git-version-gen script, available online. - -# Optional variables -CODE_COVERAGE_DIRECTORY ?= $(abs_builddir) -CODE_COVERAGE_OUTPUT_FILE ?= bout-coverage.info -CODE_COVERAGE_OUTPUT_DIRECTORY ?= bout-coverage -CODE_COVERAGE_BRANCH_COVERAGE ?= -CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ ---rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) -CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" -CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= -CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) -CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ -$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ ---rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) -CODE_COVERAGE_IGNORE_PATTERN ?= "*test*/*" - -# Use recursive makes in order to ignore errors during check -check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' - -# Capture code coverage data -code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' - -# Hook rule executed before code-coverage-capture, overridable by the user -code-coverage-capture-hook: - -'"$CODE_COVERAGE_RULES_CLEAN"' - -GITIGNOREFILES ?= -GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean -'] - - AC_SUBST([CODE_COVERAGE_RULES]) -]) diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4 deleted file mode 100644 index 43087b2e68..0000000000 --- a/m4/ax_cxx_compile_stdcxx.m4 +++ /dev/null @@ -1,951 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the specified -# version of the C++ standard. If necessary, add switches to CXX and -# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) -# or '14' (for the C++14 standard). -# -# The second argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for an extended mode. -# -# The third argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline support for the specified C++ standard is -# required and that the macro should error out if no mode with that -# support is found. If specified 'optional', then configuration proceeds -# regardless, after defining HAVE_CXX${VERSION} if and only if a -# supporting mode is found. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov -# Copyright (c) 2015 Paul Norman -# Copyright (c) 2015 Moritz Klammler -# Copyright (c) 2016, 2018 Krzesimir Nowak -# Copyright (c) 2019 Enji Cooper -# -# 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 - -dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro -dnl (serial version number 13). - -AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl - m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], - [$1], [14], [ax_cxx_compile_alternatives="14 1y"], - [$1], [17], [ax_cxx_compile_alternatives="17 1z"], - [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$2], [], [], - [$2], [ext], [], - [$2], [noext], [], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], - [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], - [$3], [optional], [ax_cxx_compile_cxx$1_required=false], - [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - - m4_if([$2], [noext], [], [dnl - if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - switch="-std=gnu++${alternative}" - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - fi]) - - m4_if([$2], [ext], [], [dnl - if test x$ac_success = xno; then - dnl HP's aCC needs +std=c++11 according to: - dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf - dnl Cray's crayCC needs "-h std=c++11" - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - if test x$ac_success = xyes; then - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx$1_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) - fi - fi - if test x$ac_success = xno; then - HAVE_CXX$1=0 - AC_MSG_NOTICE([No compiler with C++$1 support was found]) - else - HAVE_CXX$1=1 - AC_DEFINE(HAVE_CXX$1,1, - [define if the compiler supports basic C++$1 syntax]) - fi - AC_SUBST(HAVE_CXX$1) -]) - - -dnl Test body for checking C++11 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 -) - - -dnl Test body for checking C++14 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 -) - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 -) - -dnl Tests for new features in C++11 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual ~Base() {} - virtual void f() {} - }; - - struct Derived : public Base - { - virtual ~Derived() override {} - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - -]]) - - -dnl Tests for new features in C++14 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ - -// If the compiler admits that it is not ready for C++14, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201402L - -#error "This is not a C++14 compiler" - -#else - -namespace cxx14 -{ - - namespace test_polymorphic_lambdas - { - - int - test() - { - const auto lambda = [](auto&&... args){ - const auto istiny = [](auto x){ - return (sizeof(x) == 1UL) ? 1 : 0; - }; - const int aretiny[] = { istiny(args)... }; - return aretiny[0]; - }; - return lambda(1, 1L, 1.0f, '1'); - } - - } - - namespace test_binary_literals - { - - constexpr auto ivii = 0b0000000000101010; - static_assert(ivii == 42, "wrong value"); - - } - - namespace test_generalized_constexpr - { - - template < typename CharT > - constexpr unsigned long - strlen_c(const CharT *const s) noexcept - { - auto length = 0UL; - for (auto p = s; *p; ++p) - ++length; - return length; - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("x") == 1UL, ""); - static_assert(strlen_c("test") == 4UL, ""); - static_assert(strlen_c("another\0test") == 7UL, ""); - - } - - namespace test_lambda_init_capture - { - - int - test() - { - auto x = 0; - const auto lambda1 = [a = x](int b){ return a + b; }; - const auto lambda2 = [a = lambda1(x)](){ return a; }; - return lambda2(); - } - - } - - namespace test_digit_separators - { - - constexpr auto ten_million = 100'000'000; - static_assert(ten_million == 100000000, ""); - - } - - namespace test_return_type_deduction - { - - auto f(int& x) { return x; } - decltype(auto) g(int& x) { return x; } - - template < typename T1, typename T2 > - struct is_same - { - static constexpr auto value = false; - }; - - template < typename T > - struct is_same - { - static constexpr auto value = true; - }; - - int - test() - { - auto x = 0; - static_assert(is_same::value, ""); - static_assert(is_same::value, ""); - return x; - } - - } - -} // namespace cxx14 - -#endif // __cplusplus >= 201402L - -]]) - - -dnl Tests for new features in C++17 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ - -// If the compiler admits that it is not ready for C++17, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201703L - -#error "This is not a C++17 compiler" - -#else - -#include -#include -#include - -namespace cxx17 -{ - - namespace test_constexpr_lambdas - { - - constexpr int foo = [](){return 42;}(); - - } - - namespace test::nested_namespace::definitions - { - - } - - namespace test_fold_expression - { - - template - int multiply(Args... args) - { - return (args * ... * 1); - } - - template - bool all(Args... args) - { - return (args && ...); - } - - } - - namespace test_extended_static_assert - { - - static_assert (true); - - } - - namespace test_auto_brace_init_list - { - - auto foo = {5}; - auto bar {5}; - - static_assert(std::is_same, decltype(foo)>::value); - static_assert(std::is_same::value); - } - - namespace test_typename_in_template_template_parameter - { - - template typename X> struct D; - - } - - namespace test_fallthrough_nodiscard_maybe_unused_attributes - { - - int f1() - { - return 42; - } - - [[nodiscard]] int f2() - { - [[maybe_unused]] auto unused = f1(); - - switch (f1()) - { - case 17: - f1(); - [[fallthrough]]; - case 42: - f1(); - } - return f1(); - } - - } - - namespace test_extended_aggregate_initialization - { - - struct base1 - { - int b1, b2 = 42; - }; - - struct base2 - { - base2() { - b3 = 42; - } - int b3; - }; - - struct derived : base1, base2 - { - int d; - }; - - derived d1 {{1, 2}, {}, 4}; // full initialization - derived d2 {{}, {}, 4}; // value-initialized bases - - } - - namespace test_general_range_based_for_loop - { - - struct iter - { - int i; - - int& operator* () - { - return i; - } - - const int& operator* () const - { - return i; - } - - iter& operator++() - { - ++i; - return *this; - } - }; - - struct sentinel - { - int i; - }; - - bool operator== (const iter& i, const sentinel& s) - { - return i.i == s.i; - } - - bool operator!= (const iter& i, const sentinel& s) - { - return !(i == s); - } - - struct range - { - iter begin() const - { - return {0}; - } - - sentinel end() const - { - return {5}; - } - }; - - void f() - { - range r {}; - - for (auto i : r) - { - [[maybe_unused]] auto v = i; - } - } - - } - - namespace test_lambda_capture_asterisk_this_by_value - { - - struct t - { - int i; - int foo() - { - return [*this]() - { - return i; - }(); - } - }; - - } - - namespace test_enum_class_construction - { - - enum class byte : unsigned char - {}; - - byte foo {42}; - - } - - namespace test_constexpr_if - { - - template - int f () - { - if constexpr(cond) - { - return 13; - } - else - { - return 42; - } - } - - } - - namespace test_selection_statement_with_initializer - { - - int f() - { - return 13; - } - - int f2() - { - if (auto i = f(); i > 0) - { - return 3; - } - - switch (auto i = f(); i + 4) - { - case 17: - return 2; - - default: - return 1; - } - } - - } - - namespace test_template_argument_deduction_for_class_templates - { - - template - struct pair - { - pair (T1 p1, T2 p2) - : m1 {p1}, - m2 {p2} - {} - - T1 m1; - T2 m2; - }; - - void f() - { - [[maybe_unused]] auto p = pair{13, 42u}; - } - - } - - namespace test_non_type_auto_template_parameters - { - - template - struct B - {}; - - B<5> b1; - B<'a'> b2; - - } - - namespace test_structured_bindings - { - - int arr[2] = { 1, 2 }; - std::pair pr = { 1, 2 }; - - auto f1() -> int(&)[2] - { - return arr; - } - - auto f2() -> std::pair& - { - return pr; - } - - struct S - { - int x1 : 2; - volatile double y1; - }; - - S f3() - { - return {}; - } - - auto [ x1, y1 ] = f1(); - auto& [ xr1, yr1 ] = f1(); - auto [ x2, y2 ] = f2(); - auto& [ xr2, yr2 ] = f2(); - const auto [ x3, y3 ] = f3(); - - } - - namespace test_exception_spec_type_system - { - - struct Good {}; - struct Bad {}; - - void g1() noexcept; - void g2(); - - template - Bad - f(T*, T*); - - template - Good - f(T1*, T2*); - - static_assert (std::is_same_v); - - } - - namespace test_inline_variables - { - - template void f(T) - {} - - template inline T g(T) - { - return T{}; - } - - template<> inline void f<>(int) - {} - - template<> int g<>(int) - { - return 5; - } - - } - -} // namespace cxx17 - -#endif // __cplusplus < 201703L - -]]) diff --git a/m4/ax_prog_cxx_mpi.m4 b/m4/ax_prog_cxx_mpi.m4 deleted file mode 100644 index 0199928f41..0000000000 --- a/m4/ax_prog_cxx_mpi.m4 +++ /dev/null @@ -1,175 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_prog_cxx_mpi.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PROG_CXX_MPI([MPI-WANTED-TEST[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) -# -# DESCRIPTION -# -# This macro tries to find out how to compile C++ programs that use MPI -# (Message Passing Interface), a standard API for parallel process -# communication (see http://www-unix.mcs.anl.gov/mpi/). The macro has to -# be used instead of the standard macro AC_PROG_CXX and will replace the -# standard variable CXX with the found compiler. -# -# MPI-WANTED-TEST is used to test whether MPI is actually wanted by the -# user. If MPI-WANTED_TEST is omitted or if it succeeds, the macro will -# try to find out how to use MPI, if it fails, the macro will call -# AC_PROG_CC to find a standard C compiler instead. -# -# When MPI is found, ACTION-IF-FOUND will be executed, if MPI is not found -# (or MPI-WANTED-TEST fails) ACTION-IF-NOT-FOUND is executed. If -# ACTION-IF-FOUND is not set, the macro will define HAVE_MPI. -# -# The following example demonstrates usage of the macro: -# -# # If --with-mpi=auto is used, try to find MPI, but use standard C compiler if it is not found. -# # If --with-mpi=yes is used, try to find MPI and fail if it isn't found. -# # If --with-mpi=no is used, use a standard C compiler instead. -# AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi], -# [compile with MPI (parallelization) support. If none is found, -# MPI is not used. Default: auto]) -# ],,[with_mpi=auto]) -# -# AX_PROG_CXX_MPI([test x"$with_mpi" != xno],[use_mpi=yes],[ -# use_mpi=no -# if test x"$with_mpi" = xyes; then -# AC_MSG_FAILURE([MPI compiler requested, but couldn't use MPI.]) -# else -# AC_MSG_WARN([No MPI compiler found, won't use MPI.]) -# fi -# ]) -# -# LICENSE -# -# Copyright (c) 2010,2011 Olaf Lenz -# -# 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 3 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 2 - -AC_DEFUN([AX_PROG_CXX_MPI], [ -AC_PREREQ(2.50) - -# Check for compiler -# Needs to be split off into an extra macro to ensure right expansion -# order. -AC_REQUIRE([_AX_PROG_CXX_MPI],[_AX_PROG_CXX_MPI([$1])]) - -AS_IF([test x"$_ax_prog_cxx_mpi_mpi_wanted" = xno], - [ _ax_prog_cxx_mpi_mpi_found=no ], - [ - AC_LANG_PUSH([C++]) - - # test whether MPI_Init() is available - # We do not use AC_SEARCH_LIBS here, as it caches its outcome and - # thus disallows corresponding calls in the other AX_PROG_*_MPI - # macros. - for lib in NONE mpi mpich; do - save_LIBS=$LIBS - if test x"$lib" = xNONE; then - AC_MSG_CHECKING([for function MPI_Init]) - else - AC_MSG_CHECKING([for function MPI_Init in -l$lib]) - LIBS="-l$lib $LIBS" - fi - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([ -extern "C" { void MPI_Init(); } -],[MPI_Init();])], - [ _ax_prog_cxx_mpi_mpi_found=yes ], - [ _ax_prog_cxx_mpi_mpi_found=no ]) - AC_MSG_RESULT($_ax_prog_cxx_mpi_mpi_found) - if test "x$_ax_prog_cxx_mpi_mpi_found" = "xyes"; then - break; - fi - LIBS=$save_LIBS - done - - # Check for header - AS_IF([test x"$_ax_prog_cxx_mpi_mpi_found" = xyes], [ - AC_MSG_CHECKING([for mpi.h]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ])], - [ AC_MSG_RESULT(yes)], - [ AC_MSG_RESULT(no) - _ax_prog_cxx_mpi_mpi_found=no - ]) - ]) - AC_LANG_POP([C++]) -]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -AS_IF([test x"$_ax_prog_cxx_mpi_mpi_found" = xyes], [ - ifelse([$2],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$2]) - : -],[ - $3 - : -]) - -])dnl AX_PROG_CXX_MPI - -dnl _AX_PROG_CXX_MPI is an internal macro required by AX_PROG_CXX_MPI. -dnl To ensure the right expansion order, the main function AX_PROG_CXX_MPI -dnl has to be split into two parts. -dnl -dnl Known MPI C++ compilers: -dnl mpic++ -dnl mpicxx -dnl mpiCC -dnl sxmpic++ NEC SX -dnl hcp -dnl mpxlC_r -dnl mpxlC -dnl mpixlcxx_r -dnl mpixlcxx -dnl mpg++ -dnl mpc++ -dnl mpCC -dnl cmpic++ -dnl mpiFCC Fujitsu -dnl CC -dnl -AC_DEFUN([_AX_PROG_CXX_MPI], [ - AC_ARG_VAR(MPICXX,[MPI C++ compiler command]) - ifelse([$1],,[_ax_prog_cxx_mpi_mpi_wanted=yes],[ - AC_MSG_CHECKING([whether to compile using MPI]) - if $1; then - _ax_prog_cxx_mpi_mpi_wanted=yes - else - _ax_prog_cxx_mpi_mpi_wanted=no - fi - AC_MSG_RESULT($_ax_prog_cxx_mpi_mpi_wanted) - ]) - if test x"$_ax_prog_cxx_mpi_mpi_wanted" = xyes; then - AC_CHECK_TOOLS([MPICXX], [mpic++ mpicxx mpiCC sxmpic++ hcp mpxlC_r mpxlC mpixlcxx_r mpixlcxx mpg++ mpc++ mpCC cmpic++ mpiFCC CCicpc pgCC pathCC sxc++ xlC_r xlC bgxlC_r bgxlC openCC sunCC crayCC aCC CC g++ c++ gpp cxx cc++ cl.exe FCC KCC RCC]) - CXX="$MPICXX" - fi - AC_PROG_CXX -])dnl _AX_PROG_CXX_MPI diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4 deleted file mode 100644 index 17c3eab7da..0000000000 --- a/m4/ax_require_defined.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_REQUIRE_DEFINED(MACRO) -# -# DESCRIPTION -# -# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have -# been defined and thus are available for use. This avoids random issues -# where a macro isn't expanded. Instead the configure script emits a -# non-fatal: -# -# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found -# -# It's like AC_REQUIRE except it doesn't expand the required macro. -# -# Here's an example: -# -# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) -# -# LICENSE -# -# Copyright (c) 2014 Mike Frysinger -# -# 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 2 - -AC_DEFUN([AX_REQUIRE_DEFINED], [dnl - m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) -])dnl AX_REQUIRE_DEFINED diff --git a/m4/bout.m4 b/m4/bout.m4 deleted file mode 100644 index a2e5a8a733..0000000000 --- a/m4/bout.m4 +++ /dev/null @@ -1,306 +0,0 @@ -dnl -*- mode: autoconf -*- -dnl Copyright 2010-2016 B D Dudson, BOUT++ Team -dnl -dnl Contact Ben Dudson, bd512@york.ac.uk -dnl -dnl This file is part of BOUT++. -dnl -dnl BOUT++ is free software: you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published by -dnl the Free Software Foundation, either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl BOUT++ is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with BOUT++. If not, see . -dnl -dnl ------------------------------------------------------------ -dnl -dnl Additional macros for configure.ac -dnl Functions inspired by ESPResSo (espressomd.org) - -AC_DEFUN([BOUT_MSG_DEBUG],[ - dnl Uncomment line below to enable debugging - dnl AC_MSG_NOTICE([debug: $1]) - ]) - -dnl define the macro to check for libraries -dnl first argument is the name of the library -dnl second arg is a function of that library -dnl third arg is to be executed if found -dnl forth arg is to be executed if not found -dnl fifth arg is an additional path to check -AC_DEFUN([BOUT_ADDPATH_CHECK_LIB],[ - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - AC_MSG_CHECKING([for lib$1]) - AC_LANG_PUSH([C++]) - BACL_found=no - - # Try with no extra libraries first - AS_IF([test ."$5" = .yes], [extra_prefix=""], [extra_prefix="$5"]) - LIBS="$save_LIBS $EXTRA_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - extern "C" - char $2(); - ]], [[return $2();]])], - [BACL_found=yes - BOUT_MSG_DEBUG([found $1 without path or library flag])], - []) - LIBS=$save_LIBS - - # Now try with explicitly linking library - AS_IF([test $BACL_found != yes], [ - LIBS="$save_LIBS $EXTRA_LIBS -l$1" - AS_IF([test ."$5" = .yes], [extra_prefix=""], [extra_prefix="$5"]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - extern "C" - char $2(); - ]], [[return $2();]])], - [BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -l$1" - BOUT_MSG_DEBUG([found $1 without path])], - []) - ]) - - AS_IF([test $BACL_found != yes], [ - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local ; do - for path in $search_prefix $search_prefix/lib $search_prefix/lib64 $search_prefix/x86_64-linux-gnu - do - AS_IF([test -d $path], [ - LIBS="$save_LIBS $EXTRA_LIBS -l$1" - LDFLAGS="$save_LDFLAGS -L$path" - BOUT_MSG_DEBUG([try link $1 with $path]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - extern "C" - char $2(); - ]], [[return $2();]])], - [BACL_found=yes - EXTRA_LIBS="$EXTRA_LIBS -L$path -l$1" - BOUT_MSG_DEBUG([found $1 with $path]) - break], - []) - ]) - done - AS_IF([test .$BACL_found = .yes],break;) - done - ]) - - AS_IF([test $BACL_found = yes], [ - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - ]) - - AS_IF([test $BACL_found = yes], [$3],[$4]) - - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS=$save_CPPFLAGS - AC_LANG_POP([C++]) -]) - - -dnl define the macro to check for header files -dnl first argument is the name of the header file -dnl secound arg is to be executed if found -dnl third arg is to be executed if not found -dnl forth arg is an additional path to check -AC_DEFUN([BOUT_ADDPATH_CHECK_HEADER],[ - AC_MSG_CHECKING([for $1]) - - save_CPPFLAGS=$CPPFLAGS - BACH_found=no - - AS_IF([test ."$4" != .yes], [extra_prefix="$4"], [extra_prefix=""]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ - #include <$1> - ])], [BACH_found=yes - BOUT_MSG_DEBUG([found $1 without path]) - break]) - - AS_IF([test $BACH_found != yes], [ - for search_prefix in $extra_prefix /usr /opt $HOME $HOME/local /usr/local - do - for path in $search_prefix $search_prefix/include - do - AS_IF([test -d $path], [ - CPPFLAGS="$save_CPPFLAGS -I$path" - BOUT_MSG_DEBUG([try compile $1 with $path]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #include <$1> - ], [])], - [BACH_found=yes - EXTRA_INCS="$EXTRA_INCS -I$path" - BOUT_MSG_DEBUG([found $1 with $path]) - break]) - ]) - done - AS_IF([test .$BACH_found = .yes], [break;]) - done - ]) - - AS_IF([test $BACH_found = yes], [ - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - CPPFLAGS=$save_CPPFLAGS - ]) - AS_IF([test .$BACH_found = .yes], [$2], [$3]) -]) - -AC_DEFUN([BOUT_CHECK_PRETTYFUNCTION], [ - AC_LANG_PUSH([C++]) - AC_MSG_CHECKING([does C++ compiler support __PRETTY_FUNCTION__]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], - [[const char* name = __PRETTY_FUNCTION__;]])], - [AC_MSG_RESULT(yes) - BOUT_HAS_PRETTY_FUNCTION=yes], - [AC_MSG_RESULT(no) - BOUT_HAS_PRETTY_FUNCTION=no]) - AC_LANG_POP([C++]) -]) - -dnl First argument is lower case module name -dnl Second argument is test program includes -dnl Third argument is test program main body -AC_DEFUN([BOUT_FIND_SUNDIALS_MODULE],[ - - dnl Slightly complicated as we have to deal with shell indirection - AS_VAR_COPY([with_module], [with_$1]) - module_upper=m4_toupper($1) - - AC_MSG_NOTICE([Searching for SUNDIALS $module_upper library]) - AS_IF([test "$with_module" = "yes"], [ - # No path specified. Try using sundials-config - AC_PATH_PROG([sundials_config], [sundials-config], [no], [$with_sundials$PATH_SEPARATOR$PATH]) - AS_IF([test "x$sundials_config" != xno], [ - AC_MSG_WARN( - [Found sundials-config, this means your version of SUNDIALS is < 2.6, and probably won't work]) - sundials_module_includes=`$sundials_config -m $1 -t p -l c -s cppflags` - sundials_module_libs=`$sundials_config -m $1 -t p -l c -s libs` - ], [ - AC_MSG_WARN([No sundials-config available, no path given, will try compiling with $module_upper anyway]) - sundials_module_includes="" - # Need to link to libsundials_ida, libsundials_cvode or libsundials_arkode - sundials_module_libs="-lsundials_$1 -lsundials_nvecparallel $SUNDIALS_EXTRA_LIBS" - ]) - AC_LANG_PUSH([C++]) - AC_MSG_CHECKING([if we can compile with SUNDIALS $module_upper]) - save_LIBS=$LIBS - save_CXXFLAGS=$CXXFLAGS - LIBS="$save_LIBS $sundials_module_libs" - CXXFLAGS="$save_CXXFLAGS $sundials_module_includes" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([ -$2 - ], [$3])], - [sundials_config_worked=yes], - [sundials_config_worked=no]) - AC_MSG_RESULT([$sundials_config_worked]) - AS_IF([test $sundials_config_worked = yes], [ - AC_MSG_NOTICE([Using SUNDIALS $module_upper solver]) - ], [ - AC_MSG_FAILURE([Could not compile SUNDIALS $module_upper program, check your SUNDIALS version]) - ]) - LIBS=$save_LIBS - CXXFLAGS="$save_CXXFLAGS" - AC_LANG_POP([C++]) - ], [ - # Specified with path - AC_MSG_NOTICE([Checking for $module_upper header files]) - - # Check whether user supplied path to $module_upper install dir... - AC_CHECK_FILES([$with_module/include/$1/$1.h - $with_module/include/$1/$1_spgmr.h - $with_module/include/$1/$1_bbdpre.h - $with_module/include/nvector/nvector_parallel.h - $with_module/include/sundials/sundials_types.h], - [sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/include], - [sundials_module_includes_found=no]) - AS_IF([test $sundials_module_includes_found = no], [ - # ...or path to $module_upper lib dir - AC_CHECK_FILES([$with_module/../include/$1/$1.h - $with_module/../include/$1/$1_spgmr.h - $with_module/../include/$1/$1_bbdpre.h - $with_module/../include/nvector/nvector_parallel.h - $with_module/../include/sundials/sundials_types.h], - [sundials_module_includes_found=yes - sundials_module_includes_path=$with_module/../include], - [sundials_module_includes_found=no]) - ]) - - AS_IF([test $sundials_module_includes_found = no], - [AC_MSG_FAILURE([Missing one or more $module_upper headers])]) - - AC_MSG_NOTICE([Found $module_upper include path: $sundials_module_includes_path]) - - # We've now got the include directory and can specify what libraries we need - sundials_module_includes="-I$sundials_module_includes_path" - sundials_module_libs="-lsundials_$1 -lsundials_nvecparallel $SUNDIALS_EXTRA_LIBS" - - # Try compiling something simple with a few different common paths - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - AC_LANG_PUSH([C++]) - for sundials_module_lib_path in "$with_module" "$with_module/lib" "$with_module/lib64" - do - AC_MSG_CHECKING([if SUNDIALS $module_upper library path is $sundials_module_lib_path]) - LIBS="$save_LIBS $sundials_module_libs" - LDFLAGS="$save_LDFLAGS -L$sundials_module_lib_path" - CPPFLAGS="$save_CPPFLAGS $sundials_module_includes" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([ -$2 - ], [$3])], - [sundials_module_lib_path_found=yes], - [sundials_module_lib_path_found=no]) - AC_MSG_RESULT([$sundials_module_lib_path_found]) - AS_IF([test "x$sundials_module_lib_path_found" = "xyes"], [break]) - LIBS=$save_LIBS - LDFLAGS=$save_LDFLAGS - CPPFLAGS="$save_CPPFLAGS" - done - AC_LANG_POP([C++]) - - SUNDIALS_MODULE_LDFLAGS="-L$sundials_module_lib_path" - ]) - - AS_IF([test "x$sundials_module_lib_path_found" = "xno"], - [AC_MSG_FAILURE([Cannot compile $module_upper program])]) - - # Compile in the $module_upper solver - AC_MSG_NOTICE([=> $module_upper solver enabled]) - EXTRA_LIBS="$EXTRA_LIBS $SUNDIALS_MODULE_LDFLAGS $sundials_module_libs" - EXTRA_INCS="$EXTRA_INCS $sundials_module_includes" - - dnl The following is slightly complicated, but basically we use - dnl AS_TR_SH to construct a shell variable from the variable - dnl module_upper. This causes some shell indirection though, so we - dnl then use AS_VAR_SET to actually assign the value we want to it - AS_VAR_SET([AS_TR_SH([BOUT_HAS_$module_upper])], [yes]) - AS_VAR_SET([AS_TR_SH([${module_upper}LIBS])], ["$SUNDIALS_MODULE_LDFLAGS $sundials_module_libs"]) - AS_VAR_SET([AS_TR_SH([${module_upper}INCS])], ["$sundials_module_includes"]) -]) - - -# BOUT_DEFINE_SUBST(NAME, VALUE, DESCRIPTION) -# Create an output variable and also define it for headers -# Taken from https://stackoverflow.com/a/8735145/2043465 -# ----------------------------------------- -AC_DEFUN([BOUT_DEFINE_SUBST], [ -AS_IF([test "x$$1" = "xyes"], -[AC_DEFINE([$1], [1], [$2])], -[AC_DEFINE([$1], [0], [$2])]) -AC_SUBST([$1]) -]) diff --git a/make.config.in b/make.config.in deleted file mode 100644 index b7a4bf69f4..0000000000 --- a/make.config.in +++ /dev/null @@ -1,441 +0,0 @@ -# configuration file for BOUT++ -# September 2008: Converted to use autoconf. Can be manually edited -# for the (very) rare occasions when autoconf fails - -# extra compilation flags: -# -DCHECK=lvl Enables a host of additional checks on each operation -# such as uninitialised data if lvl is > 0. -DCHECK=3 -# enables all tests, while -DCHECK=0 disables them. -# Helps when debugging -# -DTRACK Keeps track of variable names. -# Enables more useful error messages -# for SSE2: -msse2 -mfpmath=sse -# -# This must also specify one or more file formats -# -DPDBF PDB format (need to include pdb_format.cxx) -# -DNCDF NetCDF format (nc_format.cxx) - -# PETSc config variables need to be first, else they may clobber other -# options (e.g. CXX, CXXFLAGS) -PETSC_DIR ?= @PETSC_DIR@ -PETSC_ARCH ?= @PETSC_ARCH@ -@PETSC_MAKE_INCLUDE@ -SLEPC_DIR ?= @SLEPC_DIR@ -SLEPC_ARCH ?= @SLEPC_ARCH@ -@SLEPC_MAKE_INCLUDE@ - -# These lines can be replaced in "make install" to point to install directories -# They are used in the CXXFLAGS variable below rather than hard-coding the directories -BOUT_INCLUDE_PATH=$(BOUT_TOP)/include -BOUT_LIB_PATH=$(BOUT_TOP)/lib -BOUT_CONFIG_FILE=$(BOUT_TOP)/make.config - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datarootdir = @datarootdir@ - -# This path to the locale (.mo) files is hard-wired into bout++.cxx at compile time -BOUT_LOCALE_PATH=@localedir@ - -# Created this variable so that a user won't overwrite the CXXFLAGS variable -# on the command line, just add to this one -BOUT_FLAGS = $(CXXFLAGS) @CXXFLAGS@ @OPENMP_CXXFLAGS@ @COVERAGE_FLAGS@ -#Use := here to force a "static" evaluation of the current state of BOUT_FLAGS to -#avoid infinite recursion that would arise if BOUT_FLAGS appeared on both sides of = -BOUT_FLAGS := $(BOUT_FLAGS) -DBOUT_FLAGS_STRING="$(BOUT_FLAGS)" - -# Specify the MPI C++ compiler in CXX - -CXX = @CXX@ -CC = $(CXX) - -AR = ar -ARFLAGS = @ARFLAGS@ -RANLIB = @RANLIB@ -MKDIR = @MKDIR_P@ - -#################################################################### -# Do not need to alter anything below -#################################################################### - -LD = $(CXX) -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -CPPFLAGS = @CPPFLAGS@ - -#################################################################### -# Extra (optional) source files, includes and libs -# NOTE: EXTRA_SRC must include a solver (solver.cxx or ida_solver.cxx) -# and a file format (nc_format.cxx or pdb_format.cxx) -#################################################################### - -EXTRA_INCS = $(CPPFLAGS) @EXTRA_INCS@ -EXTRA_LIBS = $(LIBS) @EXTRA_LIBS@ @OPENMP_CXXFLAGS@ - -PRECON_SOURCE = @PRECON_SOURCE@ - -BOUT_VERSION = @PACKAGE_VERSION@ - -#################################################################### -# These are used for compiling physics modules using BOUT++ library -#################################################################### - -# Files that are needed by configure and should be dependencies for 'all' - -OBJ = $(SOURCEC:%.cxx=%.o) -ifndef RELEASED -# If this is part of an packaged and installed installation, the user cannot -# write these files, so they shouldn't be changed. Thus only set this, in -# the non installed case. -LIB_A = $(BOUT_LIB_PATH)/libbout++.a -LIB_SO = $(BOUT_LIB_PATH)/libbout++.so -LIB = @LIB_TO_BUILD@ -endif - -MPARK_VARIANT_INCLUDE_PATH=@MPARK_VARIANT_INCLUDE_PATH@ -FMT_INCLUDE_PATH=@FMT_INCLUDE_PATH@ -BOUT_INCLUDE = -I$(BOUT_INCLUDE_PATH) $(CXXINCLUDE) $(EXTRA_INCS) @MPARK_INCLUDE@ -I$(FMT_INCLUDE_PATH) -BOUT_LIBS = -lm -L$(BOUT_LIB_PATH) -lbout++ $(EXTRA_LIBS) - -CHANGED = $(shell find -f $(BOUT_TOP)/include $(BOUT_TOP)/src -type f \( -name \*.cxx -or -name \*.h \) -newer $(LIB) -print 2> /dev/null) - -# This will set a default if no TARGET is provided -TARGET ?= $(SOURCEC:%.cxx=%) - -#################################################################### -# Definining stuff for recursive make -#################################################################### - -# Phony targets since they are directory names -.PHONY: $(DIRS) lib install libfast runtest manual sphinx doxygen - -ifneq ("$(TARGET)","libfast") -all: $(BOUT_CONFIG_FILE) $(DIRS) $(TARGET) -else -all: $(BOUT_TOP)/config.status $(BOUT_CONFIG_FILE) $(DIRS) -endif -libfast: $(BOUT_CONFIG_FILE) $(DIRS) - -#################################################################### -# Recursively run make through subdirs -#################################################################### - -ifeq ("$(TARGET)" , "lib") -$(DIRS): -# make $@ slowly using the old method where parallel builds can cause -# race conditions that - @$(MAKE) -s --no-print-directory TARGET=lib -C $@ all -else -ifeq ("$(TARGET)","libfast") -$(DIRS): -# make $@ using the libfast method, where all .o files -# are only created in the end - @$(MAKE) -s --no-print-directory TARGET=$(TARGET) -C $@ $(TARGET) -else -MODULE_DIR?=$(shell pwd) -$(DIRS): -# MODULE_DIR: pass the module directory, where the libraries should be -# created. -# SUB_NAME is used for creating a library with the expected name. -# first a potential trailing slash is removed, and after that the -# directory name is extracted. This allows to e.g. specify a directory -# as fuu/bar/ and still get an archive named bar.a - @$(MAKE) -s --no-print-directory MODULE_DIR=$(MODULE_DIR) SUB_NAME=$(shell basename $@) TARGET=sub -C $@ -endif -endif - -# Create 'lib' and 'include' incase they don't exist -$(BOUT_TOP)/include $(BOUT_TOP)/lib: - $(MKDIR) $@ - -#################################################################### -# Install header files and libraries -#################################################################### - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -INSTALL_INCLUDE_PATH = $(DESTDIR)@includedir@/bout++/ - -# A list of relative paths e.g. "fr/LC_MESSAGES/libbout.mo zh_CN/LC_MESSAGES/libbout.mo" -MO_FILES = $(shell cd locale; ls */LC_MESSAGES/libbout.mo) - -install: libfast - $(PRE_INSTALL) # Pre-install commands follow. - - $(NORMAL_INSTALL) # Normal commands follow. - $(MKDIR) $(INSTALL_INCLUDE_PATH)/{,pvode,bout/sys,bout/invert} - $(MKDIR) $(DESTDIR)/{@libdir@,@bindir@,@datadir@/bout++/idllib} - $(MKDIR) $(DESTDIR)/@datadir@/bout++/pylib/{boutdata,boututils} - $(INSTALL_DATA) include/*.hxx $(INSTALL_INCLUDE_PATH) -ifeq ("@OWN_MPARK@", "yes") - $(MKDIR) $(INSTALL_INCLUDE_PATH)/mpark - $(INSTALL_DATA) $(MPARK_VARIANT_INCLUDE_PATH)/mpark/*.hpp $(INSTALL_INCLUDE_PATH)/mpark -endif - $(INSTALL_DATA) $(FMT_INCLUDE_PATH)/fmt/*.h $(INSTALL_INCLUDE_PATH)/fmt - $(INSTALL_DATA) include/pvode/*.h $(INSTALL_INCLUDE_PATH)/pvode/ - $(INSTALL_DATA) include/bout/*.hxx $(INSTALL_INCLUDE_PATH)/bout/ - $(INSTALL_DATA) include/bout/sys/*.hxx $(INSTALL_INCLUDE_PATH)/bout/sys/ - $(INSTALL_DATA) include/bout/invert/*.hxx $(INSTALL_INCLUDE_PATH)/bout/invert/ - $(INSTALL_DATA) lib/libbout++.a $(DESTDIR)@libdir@ - $(INSTALL_DATA) lib/libpvode.a $(DESTDIR)@libdir@ - $(INSTALL_DATA) lib/libpvpre.a $(DESTDIR)@libdir@ -ifneq ("@SHARED_EXTRA@x", "x") - $(INSTALL_PROGRAM) lib/libbout++.so.$(SONAME) $(DESTDIR)@libdir@ - $(INSTALL_PROGRAM) lib/libpvode.so.* $(DESTDIR)@libdir@ - $(INSTALL_PROGRAM) lib/libpvpre.so.* $(DESTDIR)@libdir@ - rm -f $(DESTDIR)@libdir@/lib{bout++,pvode,pvpre}.so - ln -s libbout++.so.$(SONAME) $(DESTDIR)@libdir@/libbout++.so - ln -s libpvode.so.1.0.0 $(DESTDIR)@libdir@/libpvode.so - ln -s libpvpre.so.1.0.0 $(DESTDIR)@libdir@/libpvpre.so -endif - $(INSTALL_PROGRAM) bin/bout-config $(DESTDIR)@bindir@ - $(INSTALL_PROGRAM) bin/bout-log-color $(DESTDIR)@bindir@ - $(INSTALL_DATA) tools/idllib/*.pro $(DESTDIR)@datadir@/bout++/idllib/ - $(INSTALL_DATA) tools/idllib/README $(DESTDIR)@datadir@/bout++/idllib/ - $(INSTALL_DATA) tools/pylib/boutdata/*.py $(DESTDIR)@datadir@/bout++/pylib/boutdata/ - $(INSTALL_DATA) tools/pylib/boututils/*.py $(DESTDIR)@datadir@/bout++/pylib/boututils/ - $(INSTALL_DATA) make.config $(INSTALL_INCLUDE_PATH) - for mo in $(MO_FILES); do $(MKDIR) $(DESTDIR)@localedir@/`dirname $$mo`; $(INSTALL_DATA) locale/$$mo $(DESTDIR)@localedir@/$$mo; done - $(POST_INSTALL) # Post-install commands follow. - - @# Modify paths in the bout-config script - sed -i "s|^BOUT_INCLUDE_PATH=.*|BOUT_INCLUDE_PATH=@includedir@/bout++|" $(DESTDIR)@bindir@/bout-config - sed -i "s|^BOUT_LIB_PATH=.*|BOUT_LIB_PATH=@libdir@|" $(DESTDIR)@bindir@/bout-config - sed -i "s|^BOUT_CONFIG_FILE=.*|BOUT_CONFIG_FILE=@includedir@/bout++/make.config|" $(DESTDIR)@bindir@/bout-config - sed -i "s|^idlpath=.*|idlpath=@datadir@/bout++/idllib/|" $(DESTDIR)@bindir@/bout-config - sed -i "s|^pythonpath=.*|pythonpath=@datadir@/bout++/pylib/|" $(DESTDIR)@bindir@/bout-config -ifeq ("@OWN_MPARK@", "yes") - sed -i "s|^MPARK_VARIANT_INCLUDE_PATH=.*|MPARK_VARIANT_INCLUDE_PATH=@includedir@/bout++|" $(DESTDIR)@bindir@/bout-config -endif - sed -i "s|^FMT_INCLUDE_PATH=.*|FMT_INCLUDE_PATH=@includedir@/bout++|" $(DESTDIR)@bindir@/bout-config - - @# Modify paths in the make.config file - sed -i "s|^BOUT_INCLUDE_PATH=.*|BOUT_INCLUDE_PATH=@includedir@/bout++|" $(INSTALL_INCLUDE_PATH)/make.config - sed -i "s|^BOUT_LIB_PATH=.*|BOUT_LIB_PATH=@libdir@|" $(INSTALL_INCLUDE_PATH)/make.config - sed -i "s|^BOUT_CONFIG_FILE=.*|BOUT_CONFIG_FILE=@includedir@/bout++/make.config|" $(INSTALL_INCLUDE_PATH)/make.config -ifeq ("@OWN_MPARK@", "yes") - sed -i "s|^MPARK_VARIANT_INCLUDE_PATH=.*|MPARK_VARIANT_INCLUDE_PATH=@includedir@/bout++|" $(INSTALL_INCLUDE_PATH)/make.config -endif - sed -i "s|^FMT_INCLUDE_PATH=.*|FMT_INCLUDE_PATH=@includedir@/bout++|" $(INSTALL_INCLUDE_PATH)/make.config - -# Set the make.config as released, so the library isn't rebuild. This way the .a file doesn't need to be preserved/installed - sed -i '26 i RELEASED = yes' $(INSTALL_INCLUDE_PATH)/make.config - -uninstall: - $(PRE_UNINSTALL) # Pre-uninstall commands follow. - - $(NORMAL_UNINSTALL) # Normal commands follow. - $(RM) -r $(DESTDIR)@datadir@/bout++/pylib/boututils/ - $(RM) -r $(DESTDIR)@datadir@/bout++/pylib/boutdata/ - $(RM) -r $(DESTDIR)@datadir@/bout++/idllib/ - $(RM) $(DESTDIR)@bindir@/bout-config - $(RM) $(DESTDIR)@bindir@/bout-log-color - $(RM) $(DESTDIR)@libdir@/libbout++.a - $(RM) $(DESTDIR)@libdir@/libpvode.a - $(RM) $(DESTDIR)@libdir@/libpvpre.a - $(RM) -r $(DESTDIR)@includedir@/bout++/ - $(RM) $(DESTDIR)@localedir@/*/LC_MESSAGES/libbout.mo - - $(POST_UNINSTALL) # Post-uninstall commands follow. - -#################################################################### -# Builds the library with $(OBJ) which is defined from the SOURCEC variable -#################################################################### - -# Rules for downloading submodules --include $(BOUT_TOP)/makefile.submodules - -ifeq ("$(TARGET)", "libfast") -libfast: makefile $(BOUT_CONFIG_FILE) $(BOUT_TOP)/include $(OBJ) $(DIRS) -endif - -ifeq ("$(TARGET)", "lib") -lib: makefile $(BOUT_CONFIG_FILE) $(BOUT_TOP)/include $(BOUT_TOP)/lib $(OBJ) -ifneq ("$(OBJ)foo", "foo") - @echo " Adding $(OBJ) to libbout++.a" - @$(AR) $(ARFLAGS) $(LIB_A) $(OBJ) - @$(RANLIB) $(LIB) -endif -endif - - -ifeq ("$(TARGET)", "sub") -LIB=$(MODULE_DIR)/$(SUB_NAME).a -sub:$(LIB) - -$(LIB): makefile $(BOUT_CONFIG_FILE) $(BOUT_TOP)/include $(BOUT_TOP)/lib $(OBJ) -ifneq ("$(OBJ)foo", "foo") - @echo " Adding $(OBJ) to $(LIB)" - @LIBT=$(LIB).$$$$.a && \ - $(AR) $(ARFLAGS) $${LIBT} $(OBJ) && \ - $(RANLIB) $${LIBT} && \ - mv $${LIBT} $(LIB) -endif -endif - -runtest: - ./runtest - - -ifneq ("$(TARGET)", "sub") -ifneq ("$(TARGET)", "libfast") -ifneq ("$(TARGET)", "lib") -ifneq ("$(TARGET)", "runtest") - -#################################################################### -# Make libbout++.a if it doesn't exist with the checklib target -#################################################################### -libbout++.a: - @echo "Rebuilding out-of-date bout++ library" - @$(MAKE) --no-print-directory -C $(BOUT_TOP) - -#################################################################### -# Make the target (e.g. gas_compress) -#################################################################### -# first we remove a trailing slash, if present. Note that currently we -# dont support several trailing slashes, as in fuu/bar/// -DIRS_=$(DIRS:%/=%) -# then we extract the directory name, in case it is a longer path -# We are not in a recipe, so # needs to be escaped -# $$ is an escaped $ -DIRS__=$(shell for d in $(DIRS_) ; do basename $$d;done) -# now we can generate a list of libraries -SUB_LIBS=$(DIRS__:%=%.a) -$(SUB_LIBS):$(DIRS__) - -$(SOURCEC): checklib -$(SOURCEC:%.cxx=%.o): $(LIB) -$(TARGET): | $(DIRS) -$(TARGET): makefile $(BOUT_CONFIG_FILE) $(OBJ) $(SUB_LIBS) - @echo " Linking" $(TARGET) - @$(LD) -o $(TARGET) $(OBJ) $(SUB_LIBS) $(BOUT_LIBS) $(LDFLAGS) - -checklib: -ifneq ("$(CHANGED)foo", "foo") - @echo "Rebuilding out-of-date bout++ library" - @$(MAKE) --no-print-directory -C $(BOUT_TOP) -endif - -endif -endif -endif -endif - -# Ignore missing requirement files --include .*.mk - -# If it is a libfast target, track changes to rebuild library if needed -# -# Further track dependencies using gcc's -M feature: -# -MF write the generated dependency rule to a file -# -MG assume missing headers will be generated and don't stop with an error -# -MM generate dependency rule for prerequisite, skipping system headers -# -MP add phony target for each header to prevent errors when header is missing -# -MT add a target to the generated dependency -# Ignore failure, in case some compiler does not support this -%.o: $(BOUT_CONFIG_FILE) %.cxx - @echo " Compiling " $(@:.o=.cxx) - @$(CXX) $(BOUT_INCLUDE) $(BOUT_FLAGS) -c $(@:.o=.cxx) -o $@ -ifeq ("$(TARGET)","libfast") - @test "$@" = "bout++-time.o" || touch $(BOUT_TOP)/lib/.last.o.file -endif - -#################################################################### -# Clean target. Pretty self explanatory. -# NOTE: See that double colon (::) below? That's signifies a rule that can be added to later -# See: -# http://owen.sj.ca.us/~rk/howto/slides/make/slides/makecolon.html -#################################################################### - -clean:: - -@$(RM) -rf $(OBJ) $(DEPS) $(TARGET) - @for pp in $(DIRS) $(DIRS_CLEAN); do echo " " cleaning $$pp; $(MAKE) --no-print-directory -C $$pp clean; done - @$(RM) -f $(SUB_LIBS) - -@$(RM) .*.mk - @test -f make.config && ( find src | grep '\.o$$' && echo "WARNING: Some object files remain - which might cause issues. Clean with $(MAKE) clean-remove-object-files" ) || exit 0 - -clean-remove-object-files: - find src|grep '\.o$$' | xargs rm - - -distclean:: clean clean-tests - @echo include cleaned -# Removing the externalpackage installation. When we have more packages, need a better way - @$(RM) -rf $(BOUT_TOP)/include/pvode - @echo lib cleaned - @$(RM) -rf $(BOUT_TOP)/lib/* - -@$(RM) $(BOUT_TOP)/externalpackages/PVODE/lib/*.a - -@$(RM) $(BOUT_TOP)/externalpackages/PVODE/source/obj/*.o - -@$(RM) $(BOUT_TOP)/externalpackages/PVODE/precon/obj/*.o - -@$(RM) -rf $(BOUT_TOP)/autom4te.cache make.config - @echo externalpackages cleaned - @touch $(BOUT_TOP)/configure - @echo autom4te.cache cleaned - -@$(RM) $(BOUT_TOP)/include/bout/version.hxx - -@$(RM) $(BOUT_TOP)/include/bout/revision.hxx - -@$(RM) $(BOUT_TOP)/include/bout/build_defines.hxx - @echo generated version headers cleaned - -@$(RM) $(BOUT_TOP)/tools/pylib/boutconfig/__init__.py - @echo generated Python boutconfig module cleaned - -clean-tests: clean-unit-tests clean-integrated-tests clean-mms-tests - -clean-unit-tests: - @echo " tests/unit cleaned" - @$(MAKE) --no-print-directory -C tests/unit clean - -clean-integrated-tests: - @echo " tests/integrated cleaned" - @$(MAKE) --no-print-directory -C tests/integrated clean - -clean-mms-tests: - @echo " tests/MMS cleaned" - @$(MAKE) --no-print-directory -C tests/MMS clean - -#################################################################### -# Documentation -#################################################################### - -MANUAL_DIR=$(BOUT_TOP)/manual - -doxygen: - $(MAKE) -C $(MANUAL_DIR) doxygen - -breathe-autogen: - $(MAKE) -C $(MANUAL_DIR) breathe_autogen - -sphinx-docs-html: - $(MAKE) -C $(MANUAL_DIR) sphinx-html - -sphinx-docs-latex: - $(MAKE) -C $(MANUAL_DIR) sphinx-pdf - -manual: - $(MAKE) -C $(MANUAL_DIR) - -manual-html: - $(MAKE) -C $(MANUAL_DIR) html - -manual-pdf: - $(MAKE) -C $(MANUAL_DIR) pdf - -python: libfast - $(MAKE) -C tools/pylib python3 - -python2: libfast - $(MAKE) -C tools/pylib python2 - -python-all:python python2 - -###################################################################### -# Code coverage -###################################################################### - -GCOV = @GCOV@ -LCOV = @LCOV@ -GENHTML = @GENHTML@ -abs_builddir = @abs_builddir@ - -@CODE_COVERAGE_RULES@ diff --git a/makefile b/makefile deleted file mode 100644 index 10949da529..0000000000 --- a/makefile +++ /dev/null @@ -1,117 +0,0 @@ -BOUT_TOP = $(PWD) - -DIRS = src - -DIRS_CLEAN = tests/integrated tests/unit tests/MMS - -TARGET ?= libfast - -include make.config - -# For compatibility ignore shared -shared: libfast - -###################################################################### -# Tests -###################################################################### - -check-unit-tests: libfast - @export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH}; $(MAKE) --no-print-directory -C tests/unit check - -check-mms-tests: libfast - +@cd tests/MMS; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite_make - +@cd tests/MMS; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite - -check-mms-tests-all: libfast - +@cd tests/MMS; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite_make --all - +@cd tests/MMS; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite --all - -check-integrated-tests: libfast - +@cd tests/integrated; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite_make - +@cd tests/integrated; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite - -check-integrated-tests-all: libfast - +@cd tests/integrated; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite_make --all - +@cd tests/integrated; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite --all - - -check: build-check - +@cd tests; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite -check-all: build-check-all - +@cd tests; export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} ; \ - PYTHONPATH=${PWD}/tools/pylib/:${PYTHONPATH} \ - OMPI_MCA_rmaps_base_oversubscribe=yes ./test_suite --all - -build-check-unit-tests: libfast - @$(MAKE) --no-print-directory -C tests/unit - -build-check-mms-tests: libfast - $(MAKE) --no-print-directory -C tests/MMS -build-check-mms-tests-all: libfast - $(MAKE) --no-print-directory -C tests/MMS all-all - -build-check-integrated-tests: libfast - $(MAKE) --no-print-directory -C tests/integrated -build-check-integrated-tests-all: libfast - $(MAKE) --no-print-directory -C tests/integrated all-all - - -build-check: build-check-integrated-tests build-check-mms-tests build-check-unit-tests -build-check-all: build-check-integrated-tests-all build-check-mms-tests-all build-check-unit-tests - -# Build the .mo files needed for Natural Language Support (gettext) -.PHONY: locale -locale: - $(MAKE) -C locale - -###################################################################### -# Releases -###################################################################### - -.PHONY: dist changelog - -# Makes the tarball BOUT++-v.tar.gz -dist: - @bin/bout-archive-helper.sh v$(BOUT_VERSION) - -CHANGELOG_ERR_MESSAGE := "Run like: make changelog TOKEN= LAST_VERSION=vX.Y.Z RELEASE_BRANCH=master|next" - -# Updates CHANGELOG.md, needs some arguments: -# -# make changelog TOKEN= LAST_VERSION=vX.Y.Z RELEASE_BRANCH=master|next -# -# Note: You should probably only run this if you are a maintainer (and -# also know what you're doing)! -changelog: -ifndef TOKEN - $(error $(CHANGELOG_ERR_MESSAGE)) -endif -ifndef LAST_VERSION - $(error $(CHANGELOG_ERR_MESSAGE)) -endif -ifndef RELEASE_BRANCH - $(error $(CHANGELOG_ERR_MESSAGE)) -endif - github_changelog_generator -t $(TOKEN) --since-tag \ - $(LAST_VERSION) --no-issues --max-issues 700 \ - --base CHANGELOG.md --future-release v$(BOUT_VERSION) \ - --release-branch $(RELEASE_BRANCH) \ - --user boutproject --project BOUT-dev diff --git a/makefile.submodules b/makefile.submodules deleted file mode 100644 index d590e0e72e..0000000000 --- a/makefile.submodules +++ /dev/null @@ -1,15 +0,0 @@ -# This is in a separate file so that we can download the submodules at -# configure-time, as well as exposing a nice target if things go wrong -# afterwards (for example, after changing branches) - -submodules: sub_all - -mpark_submodule: - @echo "Downloading mpark.variant" - git submodule update --init --recursive ./externalpackages/mpark.variant - -sub_all: - @for d in $$(ls externalpackages | grep -v PVODE) ; do echo "Downloading $$d" ; git submodule update --init --recursive ./externalpackages/$$d ; done - -python_submodules: - @for d in boututils boutdata ; do echo "Downloading $$d" ; git submodule update --init --recursive ./externalpackages/$$d ; done \ No newline at end of file diff --git a/src/field/makefile b/src/field/makefile deleted file mode 100644 index acefa6bbce..0000000000 --- a/src/field/makefile +++ /dev/null @@ -1,23 +0,0 @@ - -BOUT_TOP = ../.. - -SOURCEC = field.cxx field2d.cxx field3d.cxx fieldperp.cxx field_data.cxx \ - fieldgroup.cxx field_factory.cxx fieldgenerators.cxx \ - initialprofiles.cxx vecops.cxx vector2d.cxx vector3d.cxx \ - where.cxx globalfield.cxx generated_fieldops.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) field_data.hxx -TARGET = lib - - -include $(BOUT_TOP)/make.config - -# The C++ source file depends on both the Python driver and the Jinja -# template files. If either have changed, run the driver (first -# dependency), dumping the output in the C++ target file. We then try -# to apply clang-format to this file in-place, but don't worry if the -# formatting fails -generated_fieldops.cxx: gen_fieldops.py gen_fieldops.jinja - @echo " Generating $@" - @./$< --filename $@.tmp || (fail=$?; echo "touch $@ to ignore failed generation" ; exit $fail) - @mv $@.tmp $@ - @clang-format -i $@ || echo "Formatting failed" diff --git a/src/fmt/makefile b/src/fmt/makefile deleted file mode 100644 index 96c557e412..0000000000 --- a/src/fmt/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../.. - -SOURCEC = format.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/cyclic/makefile b/src/invert/laplace/impls/cyclic/makefile deleted file mode 100644 index f819d70781..0000000000 --- a/src/invert/laplace/impls/cyclic/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = cyclic_laplace.cxx -SOURCEH = cyclic_laplace.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/hypre3d/makefile b/src/invert/laplace/impls/hypre3d/makefile deleted file mode 100644 index 5181eebf98..0000000000 --- a/src/invert/laplace/impls/hypre3d/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = hypre3d_laplace.cxx -SOURCEH = hypre3d_laplace.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/iterative_parallel_tri/makefile b/src/invert/laplace/impls/iterative_parallel_tri/makefile deleted file mode 100644 index 78e2dac08d..0000000000 --- a/src/invert/laplace/impls/iterative_parallel_tri/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = iterative_parallel_tri.cxx -SOURCEH = iterative_parallel_tri.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/makefile b/src/invert/laplace/impls/makefile deleted file mode 100644 index 5f151c263a..0000000000 --- a/src/invert/laplace/impls/makefile +++ /dev/null @@ -1,6 +0,0 @@ - -BOUT_TOP = ../../../.. - -DIRS = serial_tri serial_band spt petsc cyclic multigrid naulin petsc3damg iterative_parallel_tri pcr pcr_thomas hypre3d - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/multigrid/makefile b/src/invert/laplace/impls/multigrid/makefile deleted file mode 100644 index 41c049a79e..0000000000 --- a/src/invert/laplace/impls/multigrid/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = multigrid_laplace.cxx multigrid_alg.cxx multigrid_solver.cxx -SOURCEH = multigrid_laplace.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/naulin/makefile b/src/invert/laplace/impls/naulin/makefile deleted file mode 100644 index 6ce4495e8e..0000000000 --- a/src/invert/laplace/impls/naulin/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = naulin_laplace.cxx -SOURCEH = naulin_laplace.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/pcr/makefile b/src/invert/laplace/impls/pcr/makefile deleted file mode 100644 index c15f57aea5..0000000000 --- a/src/invert/laplace/impls/pcr/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = pcr.cxx -SOURCEH = pcr.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/pcr_thomas/makefile b/src/invert/laplace/impls/pcr_thomas/makefile deleted file mode 100644 index 6370a5bd5e..0000000000 --- a/src/invert/laplace/impls/pcr_thomas/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = pcr_thomas.cxx -SOURCEH = pcr_thomas.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/petsc/makefile b/src/invert/laplace/impls/petsc/makefile deleted file mode 100644 index e60d45292c..0000000000 --- a/src/invert/laplace/impls/petsc/makefile +++ /dev/null @@ -1,10 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = petsc_laplace.cxx -SOURCEH = petsc_laplace.hxx -TARGET = lib - -CXXFLAGS +=-g - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/petsc3damg/makefile b/src/invert/laplace/impls/petsc3damg/makefile deleted file mode 100644 index 124b2cc607..0000000000 --- a/src/invert/laplace/impls/petsc3damg/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = petsc3damg.cxx -SOURCEH = petsc3damg.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/serial_band/makefile b/src/invert/laplace/impls/serial_band/makefile deleted file mode 100644 index 2adf384942..0000000000 --- a/src/invert/laplace/impls/serial_band/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = serial_band.cxx -SOURCEH = serial_band.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/serial_tri/makefile b/src/invert/laplace/impls/serial_tri/makefile deleted file mode 100644 index 771b7c9ea6..0000000000 --- a/src/invert/laplace/impls/serial_tri/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = serial_tri.cxx -SOURCEH = serial_tri.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/impls/spt/makefile b/src/invert/laplace/impls/spt/makefile deleted file mode 100644 index 41d0b54d64..0000000000 --- a/src/invert/laplace/impls/spt/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = spt.cxx -SOURCEH = spt.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplace/makefile b/src/invert/laplace/makefile deleted file mode 100644 index baa2f806bc..0000000000 --- a/src/invert/laplace/makefile +++ /dev/null @@ -1,9 +0,0 @@ - -BOUT_TOP = ../../.. - -DIRS = impls -SOURCEC = invert_laplace.cxx -SOURCEH = invert_laplace.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplacexy/makefile b/src/invert/laplacexy/makefile deleted file mode 100644 index 241d03c302..0000000000 --- a/src/invert/laplacexy/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../.. - -SOURCEC = laplacexy.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplacexy2/makefile b/src/invert/laplacexy2/makefile deleted file mode 100644 index c785581f2f..0000000000 --- a/src/invert/laplacexy2/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../.. - -SOURCEC = laplacexy2.cxx laplacexy2_hypre.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplacexz/impls/cyclic/makefile b/src/invert/laplacexz/impls/cyclic/makefile deleted file mode 100644 index da426eb84a..0000000000 --- a/src/invert/laplacexz/impls/cyclic/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = laplacexz-cyclic.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplacexz/impls/makefile b/src/invert/laplacexz/impls/makefile deleted file mode 100644 index cf12301782..0000000000 --- a/src/invert/laplacexz/impls/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../../.. - -DIRS = cyclic petsc -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplacexz/impls/petsc/makefile b/src/invert/laplacexz/impls/petsc/makefile deleted file mode 100644 index d6826dd574..0000000000 --- a/src/invert/laplacexz/impls/petsc/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = laplacexz-petsc.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/laplacexz/makefile b/src/invert/laplacexz/makefile deleted file mode 100644 index 42022dd0b6..0000000000 --- a/src/invert/laplacexz/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../.. - -DIRS = impls -SOURCEC = laplacexz.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/makefile b/src/invert/makefile deleted file mode 100644 index 7deae4cdc5..0000000000 --- a/src/invert/makefile +++ /dev/null @@ -1,9 +0,0 @@ - -BOUT_TOP = ../.. - -DIRS = parderiv pardiv laplace laplacexy laplacexz laplacexy2 -SOURCEC = fft_fftw.cxx lapack_routines.cxx -SOURCEH = fft.hxx invert_parderiv.hxx lapack_routines.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/parderiv/impls/cyclic/makefile b/src/invert/parderiv/impls/cyclic/makefile deleted file mode 100644 index 7617df09d5..0000000000 --- a/src/invert/parderiv/impls/cyclic/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = cyclic.cxx -SOURCEH = cyclic.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/parderiv/impls/makefile b/src/invert/parderiv/impls/makefile deleted file mode 100644 index 2f417f8106..0000000000 --- a/src/invert/parderiv/impls/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../../.. - -DIRS = cyclic -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/parderiv/makefile b/src/invert/parderiv/makefile deleted file mode 100644 index 93bad386bc..0000000000 --- a/src/invert/parderiv/makefile +++ /dev/null @@ -1,9 +0,0 @@ - -BOUT_TOP = ../../.. - -DIRS = impls -SOURCEC = invert_parderiv.cxx -SOURCEH = invert_parderiv.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/pardiv/impls/cyclic/makefile b/src/invert/pardiv/impls/cyclic/makefile deleted file mode 100644 index 0fa26267b9..0000000000 --- a/src/invert/pardiv/impls/cyclic/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../.. - -SOURCEC = pardiv_cyclic.cxx -SOURCEH = pardiv_cyclic.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/pardiv/impls/makefile b/src/invert/pardiv/impls/makefile deleted file mode 100644 index 2f417f8106..0000000000 --- a/src/invert/pardiv/impls/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../../.. - -DIRS = cyclic -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/invert/pardiv/makefile b/src/invert/pardiv/makefile deleted file mode 100644 index 0fe293644b..0000000000 --- a/src/invert/pardiv/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../.. - -DIRS = impls -SOURCEC = invert_pardiv.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/makefile.in b/src/makefile.in deleted file mode 100644 index 136f5b68c9..0000000000 --- a/src/makefile.in +++ /dev/null @@ -1,96 +0,0 @@ - -BOUT_TOP = .. - -DIRS = field invert mesh physics solver sys fmt - -SOURCEC = bout++.cxx bout++-time.cxx -SOURCEH = bout.hxx -CXXFLAGS += -DMD5SUM=$(CHECKSUM) -DBOUT_REVISION="$(BOUT_REVISION)" -TARGET ?= lib - -# Checksum passed to bout++.cxx -CHECKSUM := $(shell cat $(foreach DIR,$(DIRS),$(wildcard $(DIR)/*.cxx $(DIR)/*.hxx)) | md5sum | head -c 32 ) - -# Git revision passed to bout++.cxx -BOUT_REVISION := $(shell git rev-parse HEAD 2> /dev/null || hg id -n 2> /dev/null || { echo "Unknown"; } ) - -# From the legacy build script: -# This is a little obscure, so here is an explanation: -# the first 'all: initial_message' sets the prerequisite 'inital_message' -# to be the first one called -all: initial_message - -# Then the config file is included, which has all the other -# prerequisites for 'all' -include $(BOUT_TOP)/make.config - -# Rebuild bout++-time to get the correct time of the build - but only if -# any other file was rebuild -bout++-time.o: $(BOUT_LIB_PATH)/.last.o.file | $(DIRS) bout++.o - -# The recipie could be removed, as it only catches the case of -# out-of-date make.config -# The rest is needed to tell make that .last.o.file will be created -$(BOUT_LIB_PATH)/.last.o.file: | $(DIRS) - @test -f $@ || \ - echo "make.config is out of date - run ./configure" - @test -f $@ || \ - exit 1 - -libfast: | @LIB_TO_BUILD@ - -$(BOUT_LIB_PATH)/libbout++.a: bout++-time.o - @echo "Recreating libbout++.a" - @rm -f $(LIB_A) - @$(AR) $(ARFLAGS) $(LIB_A) $(shell find $(BOUT_TOP)/src -name \*.o -type f -print 2> /dev/null) || rm -f $(LIB_A) - @touch .libfast - @#$(RANLIB) $(LIB) - @@STATIC_EXTRA@ - -$(BOUT_LIB_PATH)/libbout++.so: bout++-time.o - @echo "Creating libbout++.so" - @echo $(BOUT_FLAGS) | grep -qi pic || (echo "not compiled with PIC support - reconfigure with --enable-shared" ;exit 1) - @$(RM) $(BOUT_LIB_PATH)/*.so* - @$(CXX) -shared -Wl,-soname,libbout++.so.$(BOUT_VERSION) -o $(LIB_SO).$(BOUT_VERSION) \ - $(shell find $(BOUT_TOP)/src -name \*.o -type f -print 2> /dev/null) \ - $(LDFLAGS) - @$(CXX) -shared -Wl,-soname,libpvode.so.1.0.0 -o $(BOUT_LIB_PATH)/libpvode_.so \ - -L $(BOUT_LIB_PATH) -Wl,--whole-archive -lpvode -Wl,--no-whole-archive \ - $(LDFLAGS) - @$(CXX) -shared -Wl,-soname,libpvpre.so.1.0.0 -o $(BOUT_LIB_PATH)/libpvpre_.so \ - -L $(BOUT_LIB_PATH) -Wl,--whole-archive -lpvpre -Wl,--no-whole-archive \ - $(LDFLAGS) - @mv $(BOUT_LIB_PATH)/libpvode_.so $(BOUT_LIB_PATH)/libpvode.so.1.0.0 - @mv $(BOUT_LIB_PATH)/libpvpre_.so $(BOUT_LIB_PATH)/libpvpre.so.1.0.0 - @ln -s libbout++.so.$(BOUT_VERSION) $(LIB_SO) - @ln -s libpvode.so.1.0.0 $(BOUT_LIB_PATH)/libpvode.so - @ln -s libpvpre.so.1.0.0 $(BOUT_LIB_PATH)/libpvpre.so - @@SHARED_EXTRA@ - -# From the legacy build script: -# Then set the last two preqrequisites for 'all' -all: lib end_message - -# Only needed for legacy build script -ifneq ("$(TARGET)","libfast") -# This to make sure build time is always printed correctly -.PHONY: bout++-time.cxx -endif - -checksum: - @echo $(CHECKSUM) - -# From the legacy build script -initial_message: - @echo "" - @echo "----- Compiling BOUT++ -----" - @echo "CXX = " $(CXX) - @echo "FLAGS = " $(BOUT_FLAGS) - @echo "CHECKSUM = " $(CHECKSUM) - @echo "INCLUDE = " $(BOUT_INCLUDE) - @rm -f $(BOUT_LIB_PATH)/libbout++.a - -# From the legacy build script -end_message: - @echo "Finished" - @echo "" diff --git a/src/mesh/data/makefile b/src/mesh/data/makefile deleted file mode 100644 index 28d8eb22a9..0000000000 --- a/src/mesh/data/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../.. - -SOURCEC = gridfromoptions.cxx gridfromfile.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/mesh/impls/bout/makefile b/src/mesh/impls/bout/makefile deleted file mode 100644 index 2d8ca5ae5c..0000000000 --- a/src/mesh/impls/bout/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = boutmesh.cxx -SOURCEH = boutmesh.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/mesh/impls/makefile b/src/mesh/impls/makefile deleted file mode 100644 index ed641625de..0000000000 --- a/src/mesh/impls/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../.. - -DIRS = bout -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/mesh/interpolation/makefile b/src/mesh/interpolation/makefile deleted file mode 100644 index e0c3a434eb..0000000000 --- a/src/mesh/interpolation/makefile +++ /dev/null @@ -1,10 +0,0 @@ - -BOUT_TOP = ../../.. - -DIRS = -SOURCEC = bilinear_xz.cxx hermite_spline_xz.cxx \ - monotonic_hermite_spline_xz.cxx lagrange_4pt_xz.cxx \ - hermite_spline_z.cxx interpolation_z.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/mesh/makefile b/src/mesh/makefile deleted file mode 100644 index c88bc28d8c..0000000000 --- a/src/mesh/makefile +++ /dev/null @@ -1,14 +0,0 @@ - -BOUT_TOP = ../.. - - -DIRS = impls parallel data interpolation -SOURCEC = difops.cxx interpolation_xz.cxx mesh.cxx boundary_standard.cxx \ - boundary_factory.cxx boundary_region.cxx \ - surfaceiter.cxx coordinates.cxx index_derivs.cxx \ - parallel_boundary_region.cxx parallel_boundary_op.cxx fv_ops.cxx \ - coordinates_accessor.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/mesh/parallel/makefile b/src/mesh/parallel/makefile deleted file mode 100644 index 9bbfd1a910..0000000000 --- a/src/mesh/parallel/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../.. - -DIRS = -SOURCEC = shiftedmetric.cxx shiftedmetricinterp.cxx fci.cxx identity.cxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/physics/makefile b/src/physics/makefile deleted file mode 100644 index 388cda9c8f..0000000000 --- a/src/physics/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../.. - -SOURCEC = physicsmodel.cxx smoothing.cxx sourcex.cxx gyro_average.cxx snb.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/adams_bashforth/makefile b/src/solver/impls/adams_bashforth/makefile deleted file mode 100644 index 5349d55f48..0000000000 --- a/src/solver/impls/adams_bashforth/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = adams_bashforth.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/arkode/makefile b/src/solver/impls/arkode/makefile deleted file mode 100644 index 3726417df3..0000000000 --- a/src/solver/impls/arkode/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = arkode.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/cvode/makefile b/src/solver/impls/cvode/makefile deleted file mode 100644 index 7c12eb1e64..0000000000 --- a/src/solver/impls/cvode/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = cvode.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/euler/makefile b/src/solver/impls/euler/makefile deleted file mode 100644 index 77576b9250..0000000000 --- a/src/solver/impls/euler/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = euler.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/ida/makefile b/src/solver/impls/ida/makefile deleted file mode 100644 index 87d2322a11..0000000000 --- a/src/solver/impls/ida/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = ida.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/imex-bdf2/makefile b/src/solver/impls/imex-bdf2/makefile deleted file mode 100644 index 845ade8ae4..0000000000 --- a/src/solver/impls/imex-bdf2/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = imex-bdf2.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/makefile b/src/solver/impls/makefile deleted file mode 100644 index 25729c1641..0000000000 --- a/src/solver/impls/makefile +++ /dev/null @@ -1,13 +0,0 @@ - -BOUT_TOP = ../../.. - -DIRS = arkode \ - pvode cvode ida \ - petsc \ - snes imex-bdf2 \ - power slepc adams_bashforth \ - rk4 euler rk3-ssp rkgeneric split-rk - -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/petsc/makefile b/src/solver/impls/petsc/makefile deleted file mode 100644 index ac2218bc76..0000000000 --- a/src/solver/impls/petsc/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = petsc.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/power/makefile b/src/solver/impls/power/makefile deleted file mode 100644 index b2fef299d8..0000000000 --- a/src/solver/impls/power/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = power.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/pvode/makefile b/src/solver/impls/pvode/makefile deleted file mode 100644 index 72d132b150..0000000000 --- a/src/solver/impls/pvode/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = pvode.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/rk3-ssp/makefile b/src/solver/impls/rk3-ssp/makefile deleted file mode 100644 index 8cae9d3c25..0000000000 --- a/src/solver/impls/rk3-ssp/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = rk3-ssp.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/rk4/makefile b/src/solver/impls/rk4/makefile deleted file mode 100644 index 04fad4a71f..0000000000 --- a/src/solver/impls/rk4/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = rk4.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/rkgeneric/impls/cashkarp/makefile b/src/solver/impls/rkgeneric/impls/cashkarp/makefile deleted file mode 100644 index 92a372d753..0000000000 --- a/src/solver/impls/rkgeneric/impls/cashkarp/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../../.. - -SOURCEC = cashkarp.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/rkgeneric/impls/makefile b/src/solver/impls/rkgeneric/impls/makefile deleted file mode 100644 index 62e5253110..0000000000 --- a/src/solver/impls/rkgeneric/impls/makefile +++ /dev/null @@ -1,7 +0,0 @@ - -BOUT_TOP = ../../../../.. - -DIRS = rkf45 cashkarp rk4simple rkf34 -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/rkgeneric/impls/rk4simple/makefile b/src/solver/impls/rkgeneric/impls/rk4simple/makefile deleted file mode 100644 index f0cf42ae7a..0000000000 --- a/src/solver/impls/rkgeneric/impls/rk4simple/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../../.. - -SOURCEC = rk4simple.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/rkgeneric/impls/rkf34/makefile b/src/solver/impls/rkgeneric/impls/rkf34/makefile deleted file mode 100644 index d7c13604e2..0000000000 --- a/src/solver/impls/rkgeneric/impls/rkf34/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../../.. - -SOURCEC = rkf34.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/rkgeneric/impls/rkf45/makefile b/src/solver/impls/rkgeneric/impls/rkf45/makefile deleted file mode 100644 index 6f5095b504..0000000000 --- a/src/solver/impls/rkgeneric/impls/rkf45/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../../../.. - -SOURCEC = rkf45.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/rkgeneric/makefile b/src/solver/impls/rkgeneric/makefile deleted file mode 100644 index 02e443a7d9..0000000000 --- a/src/solver/impls/rkgeneric/makefile +++ /dev/null @@ -1,9 +0,0 @@ - -BOUT_TOP = ../../../.. - -DIRS = impls -SOURCEC = rkgeneric.cxx rkscheme.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/slepc/makefile b/src/solver/impls/slepc/makefile deleted file mode 100644 index ae9b7b43e4..0000000000 --- a/src/solver/impls/slepc/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = slepc.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/snes/makefile b/src/solver/impls/snes/makefile deleted file mode 100644 index 8228444a5e..0000000000 --- a/src/solver/impls/snes/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = snes.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/impls/split-rk/makefile b/src/solver/impls/split-rk/makefile deleted file mode 100644 index 4d8153a3b5..0000000000 --- a/src/solver/impls/split-rk/makefile +++ /dev/null @@ -1,8 +0,0 @@ - -BOUT_TOP = ../../../.. - -SOURCEC = split-rk.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/solver/makefile b/src/solver/makefile deleted file mode 100644 index 7aa0327328..0000000000 --- a/src/solver/makefile +++ /dev/null @@ -1,8 +0,0 @@ -BOUT_TOP = ../.. - -DIRS = impls -SOURCEC = solver.cxx -SOURCEH = $(SOURCEC:%.cxx=%.hxx) -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/sys/makefile b/src/sys/makefile deleted file mode 100644 index 04d39971cf..0000000000 --- a/src/sys/makefile +++ /dev/null @@ -1,14 +0,0 @@ - -BOUT_TOP = ../.. -DIRS = options -SOURCEC = bout_types.cxx boutexception.cxx derivs.cxx \ - msg_stack.cxx options.cxx output.cxx \ - utils.cxx optionsreader.cxx boutcomm.cxx \ - timer.cxx range.cxx petsclib.cxx expressionparser.cxx \ - slepclib.cxx type_name.cxx generator_context.cxx \ - hyprelib.cxx - -SOURCEH = $(SOURCEC:%.cxx=%.hxx) globals.hxx bout_types.hxx multiostream.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config diff --git a/src/sys/options/makefile b/src/sys/options/makefile deleted file mode 100644 index e38608b68c..0000000000 --- a/src/sys/options/makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOUT_TOP = ../../.. -SOURCEC = options_ini.cxx options_netcdf.cxx - -SOURCEH = $(SOURCEC:%.cxx=%.hxx) globals.hxx bout_types.hxx multiostream.hxx -TARGET = lib - -include $(BOUT_TOP)/make.config From faa4ba6622a74d3e69c9cee83aa25f19aabb9283 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 12 Oct 2023 17:35:53 +0100 Subject: [PATCH 27/69] Docs: Note removal of `./configure` build system Also fix links for previous versions in changelog [skip ci] --- CHANGELOG.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d20a10f78..656b284b9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,14 @@ # Changelog -## [v5.1.0](https://github.com/boutproject/BOUT-dev/tree/v5.1.0 +## [v6.0.0](https://github.com/boutproject/BOUT-dev/tree/next) +[Full Changelog](https://github.com/boutproject/BOUT-dev/compare/v5.1.0...next) +### Breaking changes + +- The autotools `./configure` build system has been removed + + +## [v5.1.0](https://github.com/boutproject/BOUT-dev/tree/v5.1.0) [Full Changelog](https://github.com/boutproject/BOUT-dev/compare/v5.0.0...v5.1.0) - Update RELEASE_HOWTO.md [\#2741][https://github.com/boutproject/BOUT-dev/pull/2741] ([dschwoerer][https://github.com/dschwoerer]) @@ -44,8 +51,8 @@ - Merge v5 into next - resolve conflicts [\#2658][https://github.com/boutproject/BOUT-dev/pull/2658] ([dschwoerer][https://github.com/dschwoerer]) - Update bundled boututils and boutdata [\#2657][https://github.com/boutproject/BOUT-dev/pull/2657] ([dschwoerer][https://github.com/dschwoerer]) -## [v5.0.0](https://github.com/boutproject/BOUT-dev/tree/next) -[Full Changelog](https://github.com/boutproject/BOUT-dev/compare/v4.3.2...next) +## [v5.0.0](https://github.com/boutproject/BOUT-dev/tree/v5.0.0) +[Full Changelog](https://github.com/boutproject/BOUT-dev/compare/v4.3.2...v5.0.0) ### Breaking changes From 106164fe1089faa176433fab8bdc77ca00a46fe9 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 28 Apr 2023 16:40:25 +0100 Subject: [PATCH 28/69] Fix lots of clang-tidy issues in PETSc interface --- include/bout/petsc_interface.hxx | 112 ++++++++++++++++--------------- 1 file changed, 58 insertions(+), 54 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 8e7d44c67d..34ac641eb4 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -74,43 +74,42 @@ public: /// Default constructor does nothing PetscVector() : vector(new Vec(), VectorDeleter()) {} + ~PetscVector() = default; /// Copy constructor - PetscVector(const PetscVector& v) : vector(new Vec(), VectorDeleter()) { + PetscVector(const PetscVector& v) + : vector(new Vec(), VectorDeleter()), indexConverter(v.indexConverter), + location(v.location), initialised(v.initialised) { VecDuplicate(*v.vector, vector.get()); VecCopy(*v.vector, *vector); - indexConverter = v.indexConverter; - location = v.location; - initialised = v.initialised; } /// Move constrcutor - PetscVector(PetscVector&& v) { + PetscVector(PetscVector&& v) noexcept + : indexConverter(v.indexConverter), location(v.location), + initialised(v.initialised) { std::swap(vector, v.vector); - indexConverter = v.indexConverter; - location = v.location; - initialised = v.initialised; v.initialised = false; } /// Construct from a field, copying over the field values - PetscVector(const T& f, IndexerPtr indConverter) - : vector(new Vec(), VectorDeleter()), indexConverter(indConverter) { - ASSERT1(indConverter->getMesh() == f.getMesh()); - const MPI_Comm comm = - std::is_same::value ? f.getMesh()->getXcomm() : BoutComm::get(); + PetscVector(const T& field, IndexerPtr indConverter) + : vector(new Vec(), VectorDeleter()), indexConverter(indConverter), + location(field.getLocation()), initialised(true)) { + ASSERT1(indConverter->getMesh() == field.getMesh()); + MPI_Comm comm = + std::is_same::value ? field.getMesh()->getXcomm() : BoutComm::get(); const int size = indexConverter->size(); VecCreateMPI(comm, size, PETSC_DECIDE, vector.get()); - location = f.getLocation(); - initialised = true; - *this = f; + *this = field; } /// Construct a vector like v, but using data from a raw PETSc /// Vec. That Vec (not a copy) will then be owned by the new object. PetscVector(const PetscVector& v, Vec* vec) { #if CHECKLEVEL >= 2 - int fsize = v.indexConverter->size(), msize; + int fsize = v.indexConverter->size(); + int msize = 0; VecGetLocalSize(*vec, &msize); ASSERT2(fsize == msize); #endif @@ -122,11 +121,12 @@ public: /// Copy assignment PetscVector& operator=(const PetscVector& rhs) { - return *this = PetscVector(rhs); + *this = PetscVector(rhs); + return *this; } /// Move assignment - PetscVector& operator=(PetscVector&& rhs) { + PetscVector& operator=(PetscVector&& rhs) noexcept { swap(*this, rhs); return *this; } @@ -163,9 +163,12 @@ public: class Element { public: Element() = delete; + ~Element() = default; + Element(Element&&) = delete; + Element& operator=(Element&&) = delete; Element(const Element& other) = default; Element(Vec* vector, int index) : petscVector(vector), petscIndex(index) { - int status; + int status = 0; BOUT_OMP(critical) status = VecGetValues(*petscVector, 1, &petscIndex, &value); if (status != 0) { @@ -179,7 +182,7 @@ public: Element& operator=(BoutReal val) { ASSERT3(finite(val)); value = val; - int status; + int status = 0; BOUT_OMP(critical) status = VecSetValue(*petscVector, petscIndex, val, INSERT_VALUES); if (status != 0) { @@ -191,7 +194,7 @@ public: ASSERT3(finite(val)); value += val; ASSERT3(finite(value)); - int status; + int status = 0; BOUT_OMP(critical) status = VecSetValue(*petscVector, petscIndex, val, ADD_VALUES); if (status != 0) { @@ -234,8 +237,8 @@ public: throw BoutException("Request to return invalid vector element"); } #endif - BoutReal value; - int status; + BoutReal value = BoutNaN; + int status = 0; BOUT_OMP(critical) status = VecGetValues(*get(), 1, &global, &value); if (status != 0) { @@ -265,7 +268,7 @@ public: // Note that this only populates boundaries to a depth of 1 BOUT_FOR_SERIAL(i, indexConverter->getRegionAll()) { PetscInt ind = indexConverter->getGlobal(i); - PetscScalar val; + PetscScalar val = BoutNaN; VecGetValues(*vector, 1, &ind, &val); result[i] = val; } @@ -277,10 +280,10 @@ public: const Vec* get() const { return vector.get(); } private: - PetscLib lib; + PetscLib lib{}; std::unique_ptr vector = nullptr; IndexerPtr indexConverter; - CELL_LOC location; + CELL_LOC location = CELL_LOC::deflt; bool initialised = false; }; @@ -309,32 +312,30 @@ public: /// Default constructor does nothing PetscMatrix() : matrix(new Mat(), MatrixDeleter()) {} + ~PetscMatrix() = default; /// Copy constructor - PetscMatrix(const PetscMatrix& m) : matrix(new Mat(), MatrixDeleter()), pt(m.pt) { + PetscMatrix(const PetscMatrix& m) + : matrix(new Mat(), MatrixDeleter()), indexConverter(m.indexConverter), pt(m.pt), + yoffset(m.yoffset), initialised(m.initialised) { MatDuplicate(*m.matrix, MAT_COPY_VALUES, matrix.get()); - indexConverter = m.indexConverter; - yoffset = m.yoffset; - initialised = m.initialised; } /// Move constrcutor - PetscMatrix(PetscMatrix&& m) : pt(m.pt) { - matrix = m.matrix; - indexConverter = m.indexConverter; - yoffset = m.yoffset; - initialised = m.initialised; + PetscMatrix(PetscMatrix&& m) noexcept + : matrix(m.matrix), indexConverter(m.indexConverter), pt(m.pt), yoffset(m.yoffset), + initialised(m.initialised) { m.initialised = false; } // Construct a matrix capable of operating on the specified field, // preallocating memory if requeted and possible. PetscMatrix(IndexerPtr indConverter, bool preallocate = true) - : matrix(new Mat(), MatrixDeleter()), indexConverter(indConverter) { - const MPI_Comm comm = std::is_same::value - ? indConverter->getMesh()->getXcomm() - : BoutComm::get(); - pt = &indConverter->getMesh()->getCoordinates()->getParallelTransform(); + : matrix(new Mat(), MatrixDeleter()), indexConverter(indConverter), + pt(&indConverter->getMesh()->getCoordinates()->getParallelTransform()) { + MPI_Comm comm = std::is_same::value + ? indConverter->getMesh()->getXcomm() + : BoutComm::get(); const int size = indexConverter->size(); MatCreate(comm, matrix.get()); @@ -358,7 +359,7 @@ public: return *this; } /// Move assignment - PetscMatrix& operator=(PetscMatrix&& rhs) { + PetscMatrix& operator=(PetscMatrix&& rhs) noexcept { matrix = rhs.matrix; indexConverter = rhs.indexConverter; pt = rhs.pt; @@ -384,6 +385,9 @@ public: class Element { public: Element() = delete; + ~Element() = default; + Element(Element&&) = delete; + Element& operator=(Element&&) = delete; Element(const Element& other) = default; Element(Mat* matrix, PetscInt row, PetscInt col, std::vector p = {}, std::vector w = {}) @@ -441,7 +445,7 @@ public: std::transform(weights.begin(), weights.end(), std::back_inserter(values), [&val](BoutReal weight) -> PetscScalar { return weight * val; }); - int status; + int status = 0; BOUT_OMP(critical) status = MatSetValues(*petscMatrix, 1, &petscRow, positions.size(), positions.data(), values.data(), mode); @@ -457,8 +461,8 @@ public: }; Element operator()(const ind_type& index1, const ind_type& index2) { - const int global1 = indexConverter->getGlobal(index1), - global2 = indexConverter->getGlobal(index2); + const int global1 = indexConverter->getGlobal(index1); + const int global2 = indexConverter->getGlobal(index2); #if CHECKLEVEL >= 1 if (!initialised) { throw BoutException("Can not return element of uninitialised matrix"); @@ -475,12 +479,12 @@ public: const auto pw = [this, &index1, &index2]() { if (this->yoffset == -1) { return pt->getWeightsForYDownApproximation(index2.x(), index1.y(), index2.z()); - } else if (this->yoffset == 1) { + } + if (this->yoffset == 1) { return pt->getWeightsForYUpApproximation(index2.x(), index1.y(), index2.z()); - } else { - return pt->getWeightsForYApproximation(index2.x(), index1.y(), index2.z(), - this->yoffset); } + return pt->getWeightsForYApproximation(index2.x(), index1.y(), index2.z(), + this->yoffset); }(); const int ny = @@ -504,8 +508,8 @@ public: BoutReal operator()(const ind_type& index1, const ind_type& index2) const { ASSERT2(yoffset == 0); - const int global1 = indexConverter->getGlobal(index1), - global2 = indexConverter->getGlobal(index2); + const int global1 = indexConverter->getGlobal(index1); + const int global2 = indexConverter->getGlobal(index2); #if CHECKLEVEL >= 1 if (!initialised) { throw BoutException("Can not return element of uninitialised matrix"); @@ -515,8 +519,8 @@ public: throw BoutException("Request to return invalid matrix element"); } #endif - BoutReal value; - int status; + BoutReal value = BoutNaN; + int status = 0; BOUT_OMP(critical) status = MatGetValues(*get(), 1, &global1, 1, &global2, &value); if (status != 0) { @@ -570,7 +574,7 @@ private: PetscLib lib; std::shared_ptr matrix = nullptr; IndexerPtr indexConverter; - ParallelTransform* pt; + ParallelTransform* pt{}; int yoffset = 0; bool initialised = false; }; From 42dfd009a20a98e915e1ba2483596544b37ce662 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 28 Apr 2023 17:58:50 +0100 Subject: [PATCH 29/69] WIP convert petscvector --- include/bout/petsc_interface.hxx | 81 ++---------- .../unit/include/bout/test_petsc_setters.cxx | 124 +++++++++--------- 2 files changed, 76 insertions(+), 129 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 34ac641eb4..0f1e6e6ae9 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -79,7 +80,8 @@ public: /// Copy constructor PetscVector(const PetscVector& v) : vector(new Vec(), VectorDeleter()), indexConverter(v.indexConverter), - location(v.location), initialised(v.initialised) { + location(v.location), initialised(v.initialised), vector_values(v.vector_values), + vector_indices(v.vector_indices) { VecDuplicate(*v.vector, vector.get()); VecCopy(*v.vector, *vector); } @@ -87,7 +89,8 @@ public: /// Move constrcutor PetscVector(PetscVector&& v) noexcept : indexConverter(v.indexConverter), location(v.location), - initialised(v.initialised) { + initialised(v.initialised), vector_values(std::move(v.vector_values)), + vector_indices(std::move(v.vector_indices)) { std::swap(vector, v.vector); v.initialised = false; } @@ -95,7 +98,8 @@ public: /// Construct from a field, copying over the field values PetscVector(const T& field, IndexerPtr indConverter) : vector(new Vec(), VectorDeleter()), indexConverter(indConverter), - location(field.getLocation()), initialised(true)) { + location(field.getLocation()), initialised(true), + vector_values(indexConverter->size()), vector_indices(indexConverter->size()) { ASSERT1(indConverter->getMesh() == field.getMesh()); MPI_Comm comm = std::is_same::value ? field.getMesh()->getXcomm() : BoutComm::get(); @@ -148,69 +152,7 @@ public: friend void swap(PetscVector& first, PetscVector& second); - /*! - * A class which is used to assign to a particular element of a PETSc - * vector. It is meant to be transient and will be destroyed immediately - * after use. In general you should not try to assign an instance to a - * variable. - * - * The Element object will store a copy of the value which has been - * assigned to it. This is because mixing calls to the PETSc - * function VecGetValues() and VecSetValues() without intermediate - * vector assembly will cause errors. Thus, if the user wishes to - * get the value of the vector, it must be stored here. - */ - class Element { - public: - Element() = delete; - ~Element() = default; - Element(Element&&) = delete; - Element& operator=(Element&&) = delete; - Element(const Element& other) = default; - Element(Vec* vector, int index) : petscVector(vector), petscIndex(index) { - int status = 0; - BOUT_OMP(critical) - status = VecGetValues(*petscVector, 1, &petscIndex, &value); - if (status != 0) { - value = 0.; - } - } - Element& operator=(const Element& other) { - ASSERT3(finite(static_cast(other))); - return *this = static_cast(other); - } - Element& operator=(BoutReal val) { - ASSERT3(finite(val)); - value = val; - int status = 0; - BOUT_OMP(critical) - status = VecSetValue(*petscVector, petscIndex, val, INSERT_VALUES); - if (status != 0) { - throw BoutException("Error when setting elements of a PETSc vector."); - } - return *this; - } - Element& operator+=(BoutReal val) { - ASSERT3(finite(val)); - value += val; - ASSERT3(finite(value)); - int status = 0; - BOUT_OMP(critical) - status = VecSetValue(*petscVector, petscIndex, val, ADD_VALUES); - if (status != 0) { - throw BoutException("Error when setting elements of a PETSc vector."); - } - return *this; - } - operator BoutReal() const { return value; } - - private: - Vec* petscVector = nullptr; - PetscInt petscIndex; - PetscScalar value; - }; - - Element operator()(const ind_type& index) { + BoutReal& operator()(const ind_type& index) { #if CHECKLEVEL >= 1 if (!initialised) { throw BoutException("Can not return element of uninitialised vector"); @@ -222,7 +164,9 @@ public: throw BoutException("Request to return invalid vector element"); } #endif - return Element(vector.get(), global); + const auto index_as_int = static_cast(index); + vector_indices[index_as_int] = global; + return vector_values[index_as_int]; } BoutReal operator()(const ind_type& index) const { @@ -248,6 +192,7 @@ public: } void assemble() { + VecSetValues(*vector, vector_indices.size(), vector_indices.begin(), vector_values.begin(), INSERT_VALUES); VecAssemblyBegin(*vector); VecAssemblyEnd(*vector); } @@ -283,6 +228,8 @@ private: PetscLib lib{}; std::unique_ptr vector = nullptr; IndexerPtr indexConverter; + Array vector_values{}; + Array vector_indices{}; CELL_LOC location = CELL_LOC::deflt; bool initialised = false; }; diff --git a/tests/unit/include/bout/test_petsc_setters.cxx b/tests/unit/include/bout/test_petsc_setters.cxx index 3a916f59e0..7ffbad819a 100644 --- a/tests/unit/include/bout/test_petsc_setters.cxx +++ b/tests/unit/include/bout/test_petsc_setters.cxx @@ -30,68 +30,68 @@ class PetscVectorElementTest : public ::testing::Test { virtual ~PetscVectorElementTest() { VecDestroy(&v); } }; -TEST_F(PetscVectorElementTest, AssignInsert) { - PetscVector::Element v1(&v, 1), v2(&v, 2), v3(&v, 3), v3b(&v, 3), v9(&v, 9); - v1 = 1.5; - v2 = 2.5; - v3 = 3.5; - v3b = 4.0; // Should overwrite previous call - v9 = 9.5; - VecAssemblyBegin(v); - VecAssemblyEnd(v); - PetscScalar* vecContents; - VecGetArray(v, &vecContents); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[0]); - EXPECT_DOUBLE_EQ(1.5, vecContents[1]); - EXPECT_DOUBLE_EQ(2.5, vecContents[2]); - EXPECT_DOUBLE_EQ(4.0, vecContents[3]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[4]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[5]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[6]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[7]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[8]); - EXPECT_DOUBLE_EQ(9.5, vecContents[9]); -} - -TEST_F(PetscVectorElementTest, AssignElement) { - PetscVector::Element v1(&v, 1), v2(&v, 2); - v2 = v1 = 1.5; - VecAssemblyBegin(v); - VecAssemblyEnd(v); - PetscScalar* vecContents; - VecGetArray(v, &vecContents); - EXPECT_DOUBLE_EQ(1.5, vecContents[1]); - EXPECT_DOUBLE_EQ(1.5, vecContents[2]); -} - -TEST_F(PetscVectorElementTest, AssignAdd) { - PetscVector::Element v1(&v, 1), v2(&v, 2), v3(&v, 3), v3b(&v, 3), v9(&v, 9); - v1 += 1.5; - v2 += 2.5; - v3 += 3.5; - v3b += 4.0; - v9 += 9.5; - VecAssemblyBegin(v); - VecAssemblyEnd(v); - PetscScalar* vecContents; - VecGetArray(v, &vecContents); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[0]); - EXPECT_DOUBLE_EQ(2.5, vecContents[1]); - EXPECT_DOUBLE_EQ(3.5, vecContents[2]); - EXPECT_DOUBLE_EQ(8.5, vecContents[3]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[4]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[5]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[6]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[7]); - EXPECT_DOUBLE_EQ(defaultVal, vecContents[8]); - EXPECT_DOUBLE_EQ(10.5, vecContents[9]); -} - -TEST_F(PetscVectorElementTest, ConvertToBoutReal) { - PetscVector::Element v1(&v, 1); - BoutReal val = v1; - EXPECT_DOUBLE_EQ(defaultVal, val); -} +// TEST_F(PetscVectorElementTest, AssignInsert) { +// PetscVector::Element v1(&v, 1), v2(&v, 2), v3(&v, 3), v3b(&v, 3), v9(&v, 9); +// v1 = 1.5; +// v2 = 2.5; +// v3 = 3.5; +// v3b = 4.0; // Should overwrite previous call +// v9 = 9.5; +// VecAssemblyBegin(v); +// VecAssemblyEnd(v); +// PetscScalar* vecContents; +// VecGetArray(v, &vecContents); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[0]); +// EXPECT_DOUBLE_EQ(1.5, vecContents[1]); +// EXPECT_DOUBLE_EQ(2.5, vecContents[2]); +// EXPECT_DOUBLE_EQ(4.0, vecContents[3]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[4]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[5]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[6]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[7]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[8]); +// EXPECT_DOUBLE_EQ(9.5, vecContents[9]); +// } + +// TEST_F(PetscVectorElementTest, AssignElement) { +// PetscVector::Element v1(&v, 1), v2(&v, 2); +// v2 = v1 = 1.5; +// VecAssemblyBegin(v); +// VecAssemblyEnd(v); +// PetscScalar* vecContents; +// VecGetArray(v, &vecContents); +// EXPECT_DOUBLE_EQ(1.5, vecContents[1]); +// EXPECT_DOUBLE_EQ(1.5, vecContents[2]); +// } + +// TEST_F(PetscVectorElementTest, AssignAdd) { +// PetscVector::Element v1(&v, 1), v2(&v, 2), v3(&v, 3), v3b(&v, 3), v9(&v, 9); +// v1 += 1.5; +// v2 += 2.5; +// v3 += 3.5; +// v3b += 4.0; +// v9 += 9.5; +// VecAssemblyBegin(v); +// VecAssemblyEnd(v); +// PetscScalar* vecContents; +// VecGetArray(v, &vecContents); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[0]); +// EXPECT_DOUBLE_EQ(2.5, vecContents[1]); +// EXPECT_DOUBLE_EQ(3.5, vecContents[2]); +// EXPECT_DOUBLE_EQ(8.5, vecContents[3]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[4]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[5]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[6]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[7]); +// EXPECT_DOUBLE_EQ(defaultVal, vecContents[8]); +// EXPECT_DOUBLE_EQ(10.5, vecContents[9]); +// } + +// TEST_F(PetscVectorElementTest, ConvertToBoutReal) { +// PetscVector::Element v1(&v, 1); +// BoutReal val = v1; +// EXPECT_DOUBLE_EQ(defaultVal, val); +// } ///////////////// Test PetscMatrixElement ///////////////// From 6510a19a9b8a3237ab8e43beb072078df2968a59 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 3 May 2023 10:20:15 +0100 Subject: [PATCH 30/69] Use default constructor for `Vec/Mat` deleters --- include/bout/petsc_interface.hxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 0f1e6e6ae9..839c1021e3 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -74,12 +74,12 @@ public: }; /// Default constructor does nothing - PetscVector() : vector(new Vec(), VectorDeleter()) {} + PetscVector() : vector(new Vec{}) {} ~PetscVector() = default; /// Copy constructor PetscVector(const PetscVector& v) - : vector(new Vec(), VectorDeleter()), indexConverter(v.indexConverter), + : vector(new Vec()), indexConverter(v.indexConverter), location(v.location), initialised(v.initialised), vector_values(v.vector_values), vector_indices(v.vector_indices) { VecDuplicate(*v.vector, vector.get()); @@ -97,7 +97,7 @@ public: /// Construct from a field, copying over the field values PetscVector(const T& field, IndexerPtr indConverter) - : vector(new Vec(), VectorDeleter()), indexConverter(indConverter), + : vector(new Vec()), indexConverter(indConverter), location(field.getLocation()), initialised(true), vector_values(indexConverter->size()), vector_indices(indexConverter->size()) { ASSERT1(indConverter->getMesh() == field.getMesh()); @@ -258,12 +258,12 @@ public: }; /// Default constructor does nothing - PetscMatrix() : matrix(new Mat(), MatrixDeleter()) {} + PetscMatrix() : matrix(new Mat()) {} ~PetscMatrix() = default; /// Copy constructor PetscMatrix(const PetscMatrix& m) - : matrix(new Mat(), MatrixDeleter()), indexConverter(m.indexConverter), pt(m.pt), + : matrix(new Mat()), indexConverter(m.indexConverter), pt(m.pt), yoffset(m.yoffset), initialised(m.initialised) { MatDuplicate(*m.matrix, MAT_COPY_VALUES, matrix.get()); } @@ -278,7 +278,7 @@ public: // Construct a matrix capable of operating on the specified field, // preallocating memory if requeted and possible. PetscMatrix(IndexerPtr indConverter, bool preallocate = true) - : matrix(new Mat(), MatrixDeleter()), indexConverter(indConverter), + : matrix(new Mat()), indexConverter(indConverter), pt(&indConverter->getMesh()->getCoordinates()->getParallelTransform()) { MPI_Comm comm = std::is_same::value ? indConverter->getMesh()->getXcomm() From 76d912dc9fb50e520f8cdcf8857f227eba388f95 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 3 May 2023 10:43:11 +0100 Subject: [PATCH 31/69] Use `BoutException` formatted message instead of `std::cout` --- include/bout/petsc_interface.hxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 839c1021e3..be89abb5c3 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -413,10 +413,11 @@ public: #if CHECKLEVEL >= 1 if (!initialised) { throw BoutException("Can not return element of uninitialised matrix"); - } else if (global1 == -1 || global2 == -1) { - std::cout << "(" << index1.x() << ", " << index1.y() << ", " << index1.z() << ") "; - std::cout << "(" << index2.x() << ", " << index2.y() << ", " << index2.z() << ")\n"; - throw BoutException("Request to return invalid matrix element"); + } + if (global1 == -1 || global2 == -1) { + throw BoutException( + "Request to return invalid matrix element: (({}, {}, {}), ({}, {}, {}))", + index1.x(), index1.y(), index1.z(), index2.x(), index2.y(), index2.z()); } #endif std::vector positions; @@ -460,10 +461,11 @@ public: #if CHECKLEVEL >= 1 if (!initialised) { throw BoutException("Can not return element of uninitialised matrix"); - } else if (global1 == -1 || global2 == -1) { - std::cout << "(" << index1.x() << ", " << index1.y() << ", " << index1.z() << ") "; - std::cout << "(" << index2.x() << ", " << index2.y() << ", " << index2.z() << ")\n"; - throw BoutException("Request to return invalid matrix element"); + } + if (global1 == -1 || global2 == -1) { + throw BoutException( + "Request to return invalid matrix element: (({}, {}, {}), ({}, {}, {}))", + index1.x(), index1.y(), index1.z(), index2.x(), index2.y(), index2.z()); } #endif BoutReal value = BoutNaN; From 5413c2ab9efe27833670b0fc15c093e96599fbcc Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 3 May 2023 15:21:15 +0100 Subject: [PATCH 32/69] Simplify getting parallel slice interpolation weights We don't need to call the YUp/YDown specific versions, we can just use the general one --- include/bout/petsc_interface.hxx | 13 ++---------- src/mesh/parallel/shiftedmetricinterp.hxx | 9 ++------- tests/unit/include/bout/test_petsc_matrix.cxx | 20 +++++++++++-------- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index be89abb5c3..ce7e0f64d3 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -424,17 +424,8 @@ public: std::vector weights; if (yoffset != 0) { ASSERT1(yoffset == index2.y() - index1.y()); - const auto pw = [this, &index1, &index2]() { - if (this->yoffset == -1) { - return pt->getWeightsForYDownApproximation(index2.x(), index1.y(), index2.z()); - } - if (this->yoffset == 1) { - return pt->getWeightsForYUpApproximation(index2.x(), index1.y(), index2.z()); - } - return pt->getWeightsForYApproximation(index2.x(), index1.y(), index2.z(), - this->yoffset); - }(); - + const auto pw = + pt->getWeightsForYApproximation(index2.x(), index1.y(), index2.z(), yoffset); const int ny = std::is_same::value ? 1 : indexConverter->getMesh()->LocalNy; const int nz = diff --git a/src/mesh/parallel/shiftedmetricinterp.hxx b/src/mesh/parallel/shiftedmetricinterp.hxx index 86ecfac853..928341827a 100644 --- a/src/mesh/parallel/shiftedmetricinterp.hxx +++ b/src/mesh/parallel/shiftedmetricinterp.hxx @@ -78,14 +78,9 @@ public: bool canToFromFieldAligned() const override { return true; } std::vector - getWeightsForYUpApproximation(int i, int j, int k) override { + getWeightsForYApproximation(int i, int j, int k, int y_offset) override { return parallel_slice_interpolators[yup_index]->getWeightsForYApproximation(i, j, k, - 1); - } - std::vector - getWeightsForYDownApproximation(int i, int j, int k) override { - return parallel_slice_interpolators[ydown_index]->getWeightsForYApproximation(i, j, k, - -1); + y_offset); } bool requiresTwistShift(bool twist_shift_enabled, YDirectionType ytype) override { diff --git a/tests/unit/include/bout/test_petsc_matrix.cxx b/tests/unit/include/bout/test_petsc_matrix.cxx index d55f384b9c..d97fff9b52 100644 --- a/tests/unit/include/bout/test_petsc_matrix.cxx +++ b/tests/unit/include/bout/test_petsc_matrix.cxx @@ -31,6 +31,8 @@ using ::testing::Return; class MockTransform : public ParallelTransformIdentity { public: MockTransform(Mesh& mesh_in) : ParallelTransformIdentity(mesh_in){}; + MOCK_METHOD(std::vector, getWeightsForYApproximation, + (int i, int j, int k, int y_offset), (override)); MOCK_METHOD(std::vector, getWeightsForYUpApproximation, (int i, int j, int k), (override)); MOCK_METHOD(std::vector, getWeightsForYDownApproximation, @@ -273,8 +275,9 @@ TYPED_TEST(PetscMatrixTest, TestYUp) { if (std::is_same::value) { expected(this->indexA, this->indexB) = val; } else if (std::is_same::value) { - EXPECT_CALL(*transform, getWeightsForYUpApproximation( - this->indexB.x(), this->indexA.y(), this->indexB.z())) + EXPECT_CALL(*transform, + getWeightsForYApproximation(this->indexB.x(), this->indexA.y(), + this->indexB.z(), 1)) .WillOnce(Return(this->yUpWeights)); expected(this->indexA, this->iWU0) = this->yUpWeights[0].weight * val; expected(this->indexA, this->iWU1) = this->yUpWeights[1].weight * val; @@ -302,8 +305,9 @@ TYPED_TEST(PetscMatrixTest, TestYDown) { if (std::is_same::value) { expected(this->indexB, this->indexA) = val; } else if (std::is_same::value) { - EXPECT_CALL(*transform, getWeightsForYDownApproximation( - this->indexA.x(), this->indexB.y(), this->indexA.z())) + EXPECT_CALL(*transform, + getWeightsForYApproximation(this->indexA.x(), this->indexB.y(), + this->indexA.z(), -1)) .WillOnce(Return(this->yDownWeights)); expected(this->indexB, this->iWD0) = this->yDownWeights[0].weight * val; expected(this->indexB, this->iWD1) = this->yDownWeights[1].weight * val; @@ -344,8 +348,8 @@ TYPED_TEST(PetscMatrixTest, TestYNextPos) { EXPECT_THROW(matrix.ynext(1), BoutException); } else { if (std::is_same::value) { - EXPECT_CALL(*transform, getWeightsForYUpApproximation( - this->indexB.x(), this->indexA.y(), this->indexB.z())) + EXPECT_CALL(*transform, getWeightsForYApproximation( + this->indexB.x(), this->indexA.y(), this->indexB.z(), 1)) .Times(2) .WillRepeatedly(Return(this->yDownWeights)); } @@ -370,8 +374,8 @@ TYPED_TEST(PetscMatrixTest, TestYNextNeg) { EXPECT_THROW(matrix.ynext(-1), BoutException); } else { if (std::is_same::value) { - EXPECT_CALL(*transform, getWeightsForYDownApproximation( - this->indexA.x(), this->indexB.y(), this->indexA.z())) + EXPECT_CALL(*transform, getWeightsForYApproximation( + this->indexA.x(), this->indexB.y(), this->indexA.z(), -1)) .Times(2) .WillRepeatedly(Return(this->yDownWeights)); } From 2c0feeb71aa8d079bf2183ca4457056c8a558f2a Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 3 May 2023 15:22:22 +0100 Subject: [PATCH 33/69] Add `size()` method to Fields to get total number of points --- include/bout/field.hxx | 3 +++ include/bout/field2d.hxx | 1 + include/bout/field3d.hxx | 2 ++ include/bout/fieldperp.hxx | 2 ++ tests/unit/field/test_field.cxx | 1 + 5 files changed, 9 insertions(+) diff --git a/include/bout/field.hxx b/include/bout/field.hxx index be347f60d0..9a425942c1 100644 --- a/include/bout/field.hxx +++ b/include/bout/field.hxx @@ -122,6 +122,9 @@ public: */ virtual int getNz() const; + /// Get the total number of points + virtual int size() const = 0; + friend void swap(Field& first, Field& second) noexcept { using std::swap; swap(static_cast(first), static_cast(second)); diff --git a/include/bout/field2d.hxx b/include/bout/field2d.hxx index 1c1169a175..ec89547925 100644 --- a/include/bout/field2d.hxx +++ b/include/bout/field2d.hxx @@ -277,6 +277,7 @@ public: friend void swap(Field2D& first, Field2D& second) noexcept; + int size() const override { return nx * ny; }; /// Internal data array. Handles allocation/freeing of memory Array data; diff --git a/include/bout/field3d.hxx b/include/bout/field3d.hxx index 8213742248..4e6510f8a6 100644 --- a/include/bout/field3d.hxx +++ b/include/bout/field3d.hxx @@ -489,6 +489,8 @@ public: friend void swap(Field3D& first, Field3D& second) noexcept; + int size() const override { return nx * ny * nz; }; + private: /// Array sizes (from fieldmesh). These are valid only if fieldmesh is not null int nx{-1}, ny{-1}, nz{-1}; diff --git a/include/bout/fieldperp.hxx b/include/bout/fieldperp.hxx index 4433463e8f..3b6e0567d8 100644 --- a/include/bout/fieldperp.hxx +++ b/include/bout/fieldperp.hxx @@ -287,6 +287,8 @@ public: friend void swap(FieldPerp& first, FieldPerp& second) noexcept; + int size() const override { return nx * nz; }; + private: /// The Y index at which this FieldPerp is defined int yindex{-1}; diff --git a/tests/unit/field/test_field.cxx b/tests/unit/field/test_field.cxx index b237ee3006..f458ffd6bc 100644 --- a/tests/unit/field/test_field.cxx +++ b/tests/unit/field/test_field.cxx @@ -33,6 +33,7 @@ class FieldSubClass : public Field { : Field(localmesh, location_in, directions_in) {} bool is3D() const override { return false; } + int size() const override { return 42; } }; } // namespace From 75adac99eeb9e81ccc0d2046c41ffbca88017c9a Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 3 May 2023 15:24:04 +0100 Subject: [PATCH 34/69] Collect all test failures for petsc3d --- tests/integrated/test-laplace-petsc3d/runtest | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/tests/integrated/test-laplace-petsc3d/runtest b/tests/integrated/test-laplace-petsc3d/runtest index 88f9d76c62..7b0d55f357 100755 --- a/tests/integrated/test-laplace-petsc3d/runtest +++ b/tests/integrated/test-laplace-petsc3d/runtest @@ -3,7 +3,7 @@ # requires: petsc from boutdata import collect -from boututils.run_wrapper import launch_safe, build_and_log +from boututils.run_wrapper import launch, build_and_log from sys import exit test_directories = [ @@ -18,21 +18,30 @@ tolerance = 1.0e-6 build_and_log("Laplace 3D with PETSc") success = True +errors = {} + for directory, nproc in test_directories: - command = "./test-laplace3d -d " + directory + command = f"./test-laplace3d -d {directory}" print("running on", nproc, "processors:", command) - launch_safe(command, nproc=nproc) + status, output = launch(command, nproc=nproc, pipe=True) - error_max = collect("error_max", path=directory, info=False) + if status: + print("FAILED") + print(output) + errors[directory] = "" + continue + error_max = collect("error_max", path=directory, info=False) if error_max > tolerance: - print(directory + " failed with maximum error {}".format(error_max)) - success = False - else: - print(directory + " passed with maximum error {}".format(error_max)) - -if success: - print("All passed") - exit(0) -else: + errors[directory] = error_max + +print("**********") + +if errors: + print("Some failures:") + for name, error in errors.items(): + print(f"{name}, max error: {error}") exit(1) + +print("All passed") +exit(0) From d3216ab1ab7659c3b7c6e911d7efd22d96dcd7b5 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 3 May 2023 15:32:50 +0100 Subject: [PATCH 35/69] Make `Field2D::data` private --- include/bout/field2d.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/bout/field2d.hxx b/include/bout/field2d.hxx index ec89547925..a36f899692 100644 --- a/include/bout/field2d.hxx +++ b/include/bout/field2d.hxx @@ -278,10 +278,11 @@ public: friend void swap(Field2D& first, Field2D& second) noexcept; int size() const override { return nx * ny; }; + +private: /// Internal data array. Handles allocation/freeing of memory Array data; -private: /// Array sizes (from fieldmesh). These are valid only if fieldmesh is not null int nx{-1}, ny{-1}; From c85793fc7b61f8d3fc69e1eba95f56b56cc9da36 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 3 May 2023 15:33:42 +0100 Subject: [PATCH 36/69] Replace direct calls to `VecSetValue` with buffered calls Now calls `VecSetValues` with whole vector at once --- include/bout/globalindexer.hxx | 17 ++++- include/bout/petsc_interface.hxx | 68 ++++++++++--------- tests/unit/include/bout/test_petsc_vector.cxx | 52 ++++++++------ 3 files changed, 84 insertions(+), 53 deletions(-) diff --git a/include/bout/globalindexer.hxx b/include/bout/globalindexer.hxx index a061f387dc..bd0a451687 100644 --- a/include/bout/globalindexer.hxx +++ b/include/bout/globalindexer.hxx @@ -45,7 +45,8 @@ public: bool autoInitialise = true) : fieldmesh(localmesh), indices(-1., localmesh), stencils(std::move(stencil)) { - Region allCandidate, bndryCandidate; + Region allCandidate; + Region bndryCandidate; if (stencils.getNumParts() > 0) { std::set allIndices(getRegionNobndry().getIndices().begin(), getRegionNobndry().getIndices().end()); @@ -105,7 +106,13 @@ public: /// Finish setting up the indexer, communicating indices across /// processes and, if possible, calculating the sparsity pattern of /// any matrices. - void initialise() { fieldmesh->communicate(indices); } + void initialise() { + fieldmesh->communicate(indices); + int_indices.reallocate(indices.size()); + BOUT_FOR(index, indices.getRegion("RGN_ALL")) { + int_indices[index.ind] = static_cast(indices[index]); + } + } Mesh* getMesh() const { return fieldmesh; } @@ -157,6 +164,10 @@ public: int size() const { return regionAll.size(); } + const Array& getIntIndices() const { + return int_indices; + } + protected: // Must not be const as the index field needs to be mutable in order // to fake parallel communication in the unit tests. @@ -206,6 +217,8 @@ private: /// Fields containing the indices for each element (as reals) T indices; + /// Indices as integers + Array int_indices; /// The first and last global index on this processor (inclusive in /// both cases) int globalStart, globalEnd; diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index ce7e0f64d3..ab6d775237 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -33,8 +33,10 @@ #include "bout/build_config.hxx" #include +#include #include #include +#include #include #include @@ -60,6 +62,16 @@ class PetscVector; template void swap(PetscVector& first, PetscVector& second); +template +inline MPI_Comm getComm([[maybe_unused]] const T& field) { + return BoutComm::get(); +} + +template <> +inline MPI_Comm getComm([[maybe_unused]] const FieldPerp& field) { + return field.getMesh()->getXcomm(); +} + template class PetscVector { public: @@ -73,24 +85,19 @@ public: } }; - /// Default constructor does nothing PetscVector() : vector(new Vec{}) {} ~PetscVector() = default; - /// Copy constructor PetscVector(const PetscVector& v) : vector(new Vec()), indexConverter(v.indexConverter), - location(v.location), initialised(v.initialised), vector_values(v.vector_values), - vector_indices(v.vector_indices) { + location(v.location), initialised(v.initialised), vector_values(v.vector_values) { VecDuplicate(*v.vector, vector.get()); VecCopy(*v.vector, *vector); } - /// Move constrcutor PetscVector(PetscVector&& v) noexcept : indexConverter(v.indexConverter), location(v.location), - initialised(v.initialised), vector_values(std::move(v.vector_values)), - vector_indices(std::move(v.vector_indices)) { + initialised(v.initialised), vector_values(std::move(v.vector_values)) { std::swap(vector, v.vector); v.initialised = false; } @@ -99,12 +106,14 @@ public: PetscVector(const T& field, IndexerPtr indConverter) : vector(new Vec()), indexConverter(indConverter), location(field.getLocation()), initialised(true), - vector_values(indexConverter->size()), vector_indices(indexConverter->size()) { + vector_values(field.size()) { ASSERT1(indConverter->getMesh() == field.getMesh()); - MPI_Comm comm = - std::is_same::value ? field.getMesh()->getXcomm() : BoutComm::get(); + MPI_Comm comm = getComm(field); + const int size = indexConverter->size(); VecCreateMPI(comm, size, PETSC_DECIDE, vector.get()); + // This allows us to pass negative indices + VecSetOption(*vector, VEC_IGNORE_NEGATIVE_INDICES, PETSC_TRUE); *this = field; } @@ -138,13 +147,7 @@ public: PetscVector& operator=(const T& f) { ASSERT1(indexConverter); // Needs to have index set BOUT_FOR_SERIAL(i, indexConverter->getRegionAll()) { - const PetscInt ind = indexConverter->getGlobal(i); - if (ind != -1) { - // TODO: consider how VecSetValues() could be used where there - // are continuous stretches of field data which should be - // copied into the vector. - VecSetValue(*vector, ind, f[i], INSERT_VALUES); - } + (*this)(i) = f[i]; } assemble(); return *this; @@ -158,15 +161,7 @@ public: throw BoutException("Can not return element of uninitialised vector"); } #endif - const int global = indexConverter->getGlobal(index); -#if CHECKLEVEL >= 1 - if (global == -1) { - throw BoutException("Request to return invalid vector element"); - } -#endif - const auto index_as_int = static_cast(index); - vector_indices[index_as_int] = global; - return vector_values[index_as_int]; + return vector_values[index.ind]; } BoutReal operator()(const ind_type& index) const { @@ -192,9 +187,21 @@ public: } void assemble() { - VecSetValues(*vector, vector_indices.size(), vector_indices.begin(), vector_values.begin(), INSERT_VALUES); - VecAssemblyBegin(*vector); - VecAssemblyEnd(*vector); + auto ierr = VecSetValues(*vector, vector_values.size(), + indexConverter->getIntIndices().begin(), + vector_values.begin(), INSERT_VALUES); + if (ierr < 0) { + throw BoutException("PETSc error"); + } + + ierr = VecAssemblyBegin(*vector); + if (ierr < 0) { + throw BoutException("PETSc error"); + } + ierr = VecAssemblyEnd(*vector); + if (ierr < 0) { + throw BoutException("PETSc error"); + } } void destroy() { @@ -228,10 +235,9 @@ private: PetscLib lib{}; std::unique_ptr vector = nullptr; IndexerPtr indexConverter; - Array vector_values{}; - Array vector_indices{}; CELL_LOC location = CELL_LOC::deflt; bool initialised = false; + Array vector_values{}; }; /*! diff --git a/tests/unit/include/bout/test_petsc_vector.cxx b/tests/unit/include/bout/test_petsc_vector.cxx index 101fb9480d..f031977bb4 100644 --- a/tests/unit/include/bout/test_petsc_vector.cxx +++ b/tests/unit/include/bout/test_petsc_vector.cxx @@ -139,18 +139,39 @@ TYPED_TEST(PetscVectorTest, MoveAssignment) { EXPECT_EQ(vectorPtr, movedPtr); } +TYPED_TEST(PetscVectorTest, SetElement) { + SCOPED_TRACE("FieldAssignment"); + PetscVector vector(this->field, this->indexer); + const TypeParam val(-10.); + + BOUT_FOR(index, val.getRegion("RGN_ALL")) { + vector(index) = val[index]; + } + vector.assemble(); + + Vec* vectorPtr = vector.get(); + PetscScalar* vecContents = nullptr; + PetscInt size = 0; + VecGetArray(*vectorPtr, &vecContents); + VecGetLocalSize(*vectorPtr, &size); + ASSERT_EQ(size, this->field.size()); + TypeParam result = vector.toField(); + BOUT_FOR(i, this->field.getRegion("RGN_NOY")) { EXPECT_EQ(result[i], val[i]); } +} + // Test getting elements TYPED_TEST(PetscVectorTest, TestGetElements) { PetscVector vector(this->field, this->indexer); BOUT_FOR(i, this->field.getRegion("RGN_NOBNDRY")) { vector(i) = (2.5 * this->field[i] - 1.0); } + vector.assemble(); + TypeParam result = vector.toField(); Vec* rawvec = vector.get(); - PetscScalar* vecContents; + PetscScalar* vecContents = nullptr; VecAssemblyBegin(*rawvec); VecAssemblyEnd(*rawvec); VecGetArray(*rawvec, &vecContents); - TypeParam result = vector.toField(); BOUT_FOR(i, this->field.getRegion("RGN_NOBNDRY")) { EXPECT_EQ(result[i], 2.5 * this->field[i] - 1.0); } @@ -165,19 +186,6 @@ TYPED_TEST(PetscVectorTest, TestGetElementsConst) { } } -// Test assemble -TYPED_TEST(PetscVectorTest, TestAssemble) { - PetscVector vector(this->field, this->indexer); - Vec* rawvec = vector.get(); - const PetscInt i = 4; - const PetscScalar r = 3.141592; - VecSetValues(*rawvec, 1, &i, &r, INSERT_VALUES); - vector.assemble(); - PetscScalar* vecContents; - VecGetArray(*rawvec, &vecContents); - ASSERT_EQ(vecContents[i], r); -} - #ifdef PETSC_USE_DEBUG // Test trying to get an element from an uninitialised vector @@ -201,14 +209,18 @@ TYPED_TEST(PetscVectorTest, TestGetOutOfBounds) { } #endif // CHECKLEVEL >= 3 -// Test trying to use both INSERT_VALUES and ADD_VALUES TYPED_TEST(PetscVectorTest, TestMixedSetting) { PetscVector vector(this->field, this->indexer); - typename TypeParam::ind_type i = *(this->field.getRegion("RGN_NOBNDRY").begin()); - typename TypeParam::ind_type j(i.ind + 1); + typename TypeParam::ind_type index1 = *(this->field.getRegion("RGN_NOBNDRY").begin()); + typename TypeParam::ind_type index2(index1.ind + 1); const PetscScalar r = 3.141592; - vector(i) = r; - EXPECT_THROW(vector(j) += r, BoutException); + vector(index1) = r; + vector(index2) += r; + vector.assemble(); + PetscScalar* vecContents = nullptr; + VecGetArray(*(vector.get()), &vecContents); + ASSERT_EQ(vecContents[index1.ind], r); + ASSERT_EQ(vecContents[index2.ind], this->field[index2] + r); } // Test destroy From 713144964cc475b8ad46d8e93fe3935c7bffd7f0 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 3 May 2023 15:34:49 +0100 Subject: [PATCH 37/69] Fix some clang-tidy issues, mostly multiple declarations on one line --- .../laplace/impls/petsc3damg/petsc3damg.cxx | 3 +- tests/unit/include/bout/test_petsc_matrix.cxx | 49 ++++++++++++------- tests/unit/include/bout/test_petsc_vector.cxx | 7 ++- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx index 633e938ccc..29fdd2c937 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx @@ -204,7 +204,8 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { if (updateRequired) { updateMatrix3D(); } - PetscVector rhs(b_in, indexer), guess(x0, indexer); + PetscVector rhs(b_in, indexer); + PetscVector guess(x0, indexer); // Adjust vectors to represent boundary conditions and check that // boundary cells are finite diff --git a/tests/unit/include/bout/test_petsc_matrix.cxx b/tests/unit/include/bout/test_petsc_matrix.cxx index d97fff9b52..8684ed7823 100644 --- a/tests/unit/include/bout/test_petsc_matrix.cxx +++ b/tests/unit/include/bout/test_petsc_matrix.cxx @@ -265,13 +265,14 @@ TYPED_TEST(PetscMatrixTest, TestDestroy) { // Test getting yup TYPED_TEST(PetscMatrixTest, TestYUp) { - PetscMatrix matrix(this->indexer, false), expected(this->indexer, false); + PetscMatrix matrix(this->indexer, false); + PetscMatrix expected(this->indexer, false); MockTransform* transform = this->pt; SCOPED_TRACE("YUp"); if (std::is_same::value) { EXPECT_THROW(matrix.yup(), BoutException); } else { - BoutReal val = 3.141592; + const BoutReal val = 3.141592; if (std::is_same::value) { expected(this->indexA, this->indexB) = val; } else if (std::is_same::value) { @@ -284,7 +285,8 @@ TYPED_TEST(PetscMatrixTest, TestYUp) { expected(this->indexA, this->iWU2) = this->yUpWeights[2].weight * val; } matrix.yup()(this->indexA, this->indexB) = val; - Mat *rawmat = matrix.get(), *rawexp = expected.get(); + Mat* rawmat = matrix.get(); + Mat* rawexp = expected.get(); MatAssemblyBegin(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyEnd(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyBegin(*rawexp, MAT_FINAL_ASSEMBLY); @@ -295,8 +297,9 @@ TYPED_TEST(PetscMatrixTest, TestYUp) { // Test getting ydown TYPED_TEST(PetscMatrixTest, TestYDown) { - PetscMatrix matrix(this->indexer, false), expected(this->indexer, false); - BoutReal val = 3.141592; + PetscMatrix matrix(this->indexer, false); + PetscMatrix expected(this->indexer, false); + const BoutReal val = 3.141592; MockTransform* transform = this->pt; SCOPED_TRACE("YDown"); if (std::is_same::value) { @@ -314,7 +317,8 @@ TYPED_TEST(PetscMatrixTest, TestYDown) { expected(this->indexB, this->iWD2) = this->yDownWeights[2].weight * val; } matrix.ydown()(this->indexB, this->indexA) = val; - Mat *rawmat = matrix.get(), *rawexp = expected.get(); + Mat* rawmat = matrix.get(); + Mat* rawexp = expected.get(); MatAssemblyBegin(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyEnd(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyBegin(*rawexp, MAT_FINAL_ASSEMBLY); @@ -325,12 +329,14 @@ TYPED_TEST(PetscMatrixTest, TestYDown) { // Test getting ynext(0) TYPED_TEST(PetscMatrixTest, TestYNext0) { - PetscMatrix matrix(this->indexer), expected(this->indexer); - BoutReal val = 3.141592; + PetscMatrix matrix(this->indexer); + PetscMatrix expected(this->indexer); + const BoutReal val = 3.141592; SCOPED_TRACE("YNext0"); matrix.ynext(0)(this->indexA, this->indexB) = val; expected(this->indexA, this->indexB) = val; - Mat rawmat = *matrix.get(), rawexp = *expected.get(); + Mat rawmat = *matrix.get(); + Mat rawexp = *expected.get(); MatAssemblyBegin(rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyEnd(rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyBegin(rawexp, MAT_FINAL_ASSEMBLY); @@ -340,8 +346,9 @@ TYPED_TEST(PetscMatrixTest, TestYNext0) { // Test getting ynext(1) TYPED_TEST(PetscMatrixTest, TestYNextPos) { - PetscMatrix matrix(this->indexer, false), expected(this->indexer, false); - BoutReal val = 3.141592; + PetscMatrix matrix(this->indexer, false); + PetscMatrix expected(this->indexer, false); + const BoutReal val = 3.141592; MockTransform* transform = this->pt; SCOPED_TRACE("YNextPos"); if (std::is_same::value) { @@ -355,7 +362,8 @@ TYPED_TEST(PetscMatrixTest, TestYNextPos) { } matrix.ynext(1)(this->indexA, this->indexB) = val; expected.yup()(this->indexA, this->indexB) = val; - Mat *rawmat = matrix.get(), *rawexp = expected.get(); + Mat *rawmat = matrix.get(); + Mat *rawexp = expected.get(); MatAssemblyBegin(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyEnd(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyBegin(*rawexp, MAT_FINAL_ASSEMBLY); @@ -366,8 +374,9 @@ TYPED_TEST(PetscMatrixTest, TestYNextPos) { // Test getting ynext(-1) TYPED_TEST(PetscMatrixTest, TestYNextNeg) { - PetscMatrix matrix(this->indexer, false), expected(this->indexer, false); - BoutReal val = 3.141592; + PetscMatrix matrix(this->indexer, false); + PetscMatrix expected(this->indexer, false); + const BoutReal val = 3.141592; MockTransform* transform = this->pt; SCOPED_TRACE("YNextNeg"); if (std::is_same::value) { @@ -381,7 +390,8 @@ TYPED_TEST(PetscMatrixTest, TestYNextNeg) { } matrix.ynext(-1)(this->indexB, this->indexA) = val; expected.ydown()(this->indexB, this->indexA) = val; - Mat *rawmat = matrix.get(), *rawexp = expected.get(); + Mat *rawmat = matrix.get(); + Mat *rawexp = expected.get(); MatAssemblyBegin(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyEnd(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyBegin(*rawexp, MAT_FINAL_ASSEMBLY); @@ -392,12 +402,15 @@ TYPED_TEST(PetscMatrixTest, TestYNextNeg) { // Test swap TYPED_TEST(PetscMatrixTest, TestSwap) { - PetscMatrix lhs(this->indexer), rhs(this->indexer); - Mat l0 = *lhs.get(), r0 = *rhs.get(); + PetscMatrix lhs(this->indexer); + PetscMatrix rhs(this->indexer); + Mat l0 = *lhs.get(); + Mat r0 = *rhs.get(); EXPECT_NE(l0, nullptr); EXPECT_NE(r0, nullptr); swap(lhs, rhs); - Mat l1 = *lhs.get(), r1 = *rhs.get(); + Mat l1 = *lhs.get(); + Mat r1 = *rhs.get(); EXPECT_NE(l0, l1); EXPECT_NE(r0, r1); EXPECT_EQ(l0, r1); diff --git a/tests/unit/include/bout/test_petsc_vector.cxx b/tests/unit/include/bout/test_petsc_vector.cxx index f031977bb4..8e1cb53731 100644 --- a/tests/unit/include/bout/test_petsc_vector.cxx +++ b/tests/unit/include/bout/test_petsc_vector.cxx @@ -36,11 +36,9 @@ class PetscVectorTest : public FakeMeshFixture { IndexerPtr indexer; PetscVectorTest() - : FakeMeshFixture(), field(bout::globals::mesh), + : FakeMeshFixture(), field(1.5, bout::globals::mesh), stencil(squareStencil(bout::globals::mesh)), indexer(std::make_shared>(bout::globals::mesh, stencil)) { - field.allocate(); - field = 1.5; PetscErrorPrintf = PetscErrorPrintfNone; } @@ -124,7 +122,8 @@ TYPED_TEST(PetscVectorTest, CopyAssignment) { SCOPED_TRACE("CopyAssignment"); PetscVector vector(this->field, this->indexer); PetscVector copy = vector; - Vec *vectorPtr = vector.get(), *copyPtr = copy.get(); + Vec *vectorPtr = vector.get(); + Vec *copyPtr = copy.get(); EXPECT_NE(vectorPtr, copyPtr); testVectorsEqual(vectorPtr, copyPtr); } From 390be68359406f9d17a4cdb4710a00ba478e1131 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 4 May 2023 11:07:25 +0100 Subject: [PATCH 38/69] Make sure guard cells in PetscVector buffer are -1 --- include/bout/globalindexer.hxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/bout/globalindexer.hxx b/include/bout/globalindexer.hxx index bd0a451687..cacafa298f 100644 --- a/include/bout/globalindexer.hxx +++ b/include/bout/globalindexer.hxx @@ -107,11 +107,19 @@ public: /// processes and, if possible, calculating the sparsity pattern of /// any matrices. void initialise() { - fieldmesh->communicate(indices); + // We need to ensure any _guard_ cells are -1 so we don't include them int_indices.reallocate(indices.size()); - BOUT_FOR(index, indices.getRegion("RGN_ALL")) { + BOUT_FOR(index, indices.getRegion("RGN_GUARDS")) { + int_indices[index.ind] = -1; + } + // Now we can communicate to get global indices from neighbouring processes + fieldmesh->communicate(indices); + // Finally, we fill in the global indices including in the + // _boundaries_ (*not* guards) + BOUT_FOR(index, regionAll) { int_indices[index.ind] = static_cast(indices[index]); } + } Mesh* getMesh() const { return fieldmesh; } From c60bf2e2088045648b63531a86f9583e1a3a8174 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 4 May 2023 17:10:11 +0100 Subject: [PATCH 39/69] Add a utility function for checking flags in bitsets --- include/bout/utils.hxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/bout/utils.hxx b/include/bout/utils.hxx index 450d3eaf87..834c269f23 100644 --- a/include/bout/utils.hxx +++ b/include/bout/utils.hxx @@ -690,4 +690,11 @@ T* pointer(T& val) { #define BOUT_CONCAT(A, B) BOUT_CONCAT_(A, B) #endif +namespace bout { +namespace utils { +/// Check that \p flag is set in \p bitset +inline bool flagSet(int bitset, int flag) { return (bitset & flag) != 0; } +} +} + #endif // __UTILS_H__ From 28ec7395ae336450154b38f6fe6fc2e68376e6d5 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 4 May 2023 17:11:47 +0100 Subject: [PATCH 40/69] Print error in laplace-petsc3d test --- tests/integrated/test-laplace-petsc3d/test-laplace3d.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integrated/test-laplace-petsc3d/test-laplace3d.cxx b/tests/integrated/test-laplace-petsc3d/test-laplace3d.cxx index a1231a6cdf..a865f04e2f 100644 --- a/tests/integrated/test-laplace-petsc3d/test-laplace3d.cxx +++ b/tests/integrated/test-laplace-petsc3d/test-laplace3d.cxx @@ -126,6 +126,7 @@ int main(int argc, char** argv) { Field3D rhs_check = D * Laplace_perp(f) + Grad_perp(C2) * Grad_perp(f) / C1 + A * f; Field3D error = rhs_check - rhs; BoutReal error_max = max(abs(error), true); + output.write("error_max = {}\n", error_max); Options dump; dump["f"] = f; From b18e1b044a90692286305bf34eb2516ed945e4ad Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 4 May 2023 17:21:16 +0100 Subject: [PATCH 41/69] Set LaplacePetsc3damg options in initialiser list --- .../laplace/impls/petsc3damg/petsc3damg.cxx | 64 +++++++------------ .../laplace/impls/petsc3damg/petsc3damg.hxx | 6 +- 2 files changed, 27 insertions(+), 43 deletions(-) diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx index 29fdd2c937..cd5347f66d 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx @@ -39,14 +39,35 @@ #include #include +#ifdef PETSC_HAVE_HYPRE +static constexpr auto DEFAULT_PC_TYPE = PCHYPRE; +#else +static constexpr auto DEFAULT_PC_TYPE = PCGAMG; +#endif // PETSC_HAVE_HYPRE + LaplacePetsc3dAmg::LaplacePetsc3dAmg(Options* opt, const CELL_LOC loc, Mesh* mesh_in, Solver* UNUSED(solver)) : Laplacian(opt, loc, mesh_in), A(0.0), C1(1.0), C2(1.0), D(1.0), Ex(0.0), Ez(0.0), + opts(opt == nullptr ? &(Options::root()["laplace"]) : opt), + lower_boundary_flags((*opts)["lower_boundary_flags"].withDefault(0)), + upper_boundary_flags((*opts)["upper_boundary_flags"].withDefault(0)), + ksptype((*opts)["ksptype"].doc("KSP solver type").withDefault(KSPGMRES)), + pctype((*opts)["pctype"].doc("PC type").withDefault(DEFAULT_PC_TYPE)), + richardson_damping_factor((*opts)["richardson_damping_factor"].withDefault(1.0)), + chebyshev_max((*opts)["chebyshev_max"].withDefault(100.0)), + chebyshev_min((*opts)["chebyshev_min"].withDefault(0.01)), + gmres_max_steps((*opts)["gmres_max_steps"].withDefault(30)), + rtol((*opts)["rtol"].doc("Relative tolerance for KSP solver").withDefault(1e-5)), + atol((*opts)["atol"].doc("Absolute tolerance for KSP solver").withDefault(1e-5)), + dtol((*opts)["dtol"].doc("Divergence tolerance for KSP solver").withDefault(1e6)), + maxits( + (*opts)["maxits"].doc("Maximum number of KSP iterations").withDefault(100000)), + direct((*opts)["direct"].doc("Use direct (LU) solver?").withDefault(false)), lowerY(localmesh->iterateBndryLowerY()), upperY(localmesh->iterateBndryUpperY()), indexer(std::make_shared>( localmesh, getStencil(localmesh, lowerY, upperY))), - operator3D(indexer), kspInitialised(false), - lib(opt == nullptr ? &(Options::root()["laplace"]) : opt) { + operator3D(indexer), lib(opts) { + // Provide basic initialisation of field coefficients, etc. // Get relevent options from user input // Initialise PETSc objects @@ -57,16 +78,7 @@ LaplacePetsc3dAmg::LaplacePetsc3dAmg(Options* opt, const CELL_LOC loc, Mesh* mes Ex.setLocation(location); Ez.setLocation(location); - // Get Options in Laplace Section - if (!opt) { - opts = Options::getRoot()->getSection("laplace"); - } else { - opts = opt; - } - // Get y boundary flags - lower_boundary_flags = (*opts)["lower_boundary_flags"].withDefault(0); - upper_boundary_flags = (*opts)["upper_boundary_flags"].withDefault(0); #if CHECK > 0 // Checking flags are set to something which is not implemented @@ -103,36 +115,8 @@ LaplacePetsc3dAmg::LaplacePetsc3dAmg(Options* opt, const CELL_LOC loc, Mesh* mes } #endif - // Get Tolerances for KSP solver - rtol = (*opts)["rtol"].doc("Relative tolerance for KSP solver").withDefault(1e-5); - atol = (*opts)["atol"].doc("Absolute tolerance for KSP solver").withDefault(1e-5); - dtol = (*opts)["dtol"].doc("Divergence tolerance for KSP solver").withDefault(1e6); - maxits = (*opts)["maxits"].doc("Maximum number of KSP iterations").withDefault(100000); - - richardson_damping_factor = (*opts)["richardson_damping_factor"].withDefault(1.0); - chebyshev_max = (*opts)["chebyshev_max"].withDefault(100.0); - chebyshev_min = (*opts)["chebyshev_min"].withDefault(0.01); - gmres_max_steps = (*opts)["gmres_max_steps"].withDefault(30); - - // Get KSP Solver Type (Generalizes Minimal RESidual is the default) - ksptype = (*opts)["ksptype"].doc("KSP solver type").withDefault(KSPGMRES); - - // Get preconditioner type -#ifdef PETSC_HAVE_HYPRE - // PETSc was compiled with Hypre - pctype = (*opts)["pctype"].doc("PC type").withDefault(PCHYPRE); -#else - // Hypre not available - pctype = (*opts)["pctype"].doc("PC type").withDefault(PCGAMG); -#endif // PETSC_HAVE_HYPRE - - // Get direct solver switch - direct = (*opts)["direct"].doc("Use direct (LU) solver?").withDefault(false); if (direct) { - output << "\n" - << "Using LU decompostion for direct solution of system" - << "\n" - << "\n"; + output.write("\nUsing LU decompostion for direct solution of system\n\n"); } // Set up boundary conditions in operator diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.hxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.hxx index 93dc88d768..60d767aa24 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.hxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.hxx @@ -194,10 +194,10 @@ private: bool issetC = false; bool issetE = false; bool updateRequired = true; - int lower_boundary_flags; - int upper_boundary_flags; Options* opts; // Laplace Section Options Object + int lower_boundary_flags; + int upper_boundary_flags; std::string ksptype; ///< KSP solver type std::string pctype; ///< Preconditioner type @@ -217,7 +217,7 @@ private: IndexerPtr indexer; PetscMatrix operator3D; KSP ksp; - bool kspInitialised; + bool kspInitialised = false; PetscLib lib; // These are the implemented flags From 335a83763c21e575d2f43ac3bd58f3151662f177 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 4 May 2023 17:38:08 +0100 Subject: [PATCH 42/69] Refactor setting boundary conditions in LaplacePetsc3dAmg --- .../laplace/impls/petsc3damg/petsc3damg.cxx | 160 +++++++----------- 1 file changed, 61 insertions(+), 99 deletions(-) diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx index cd5347f66d..3cf0f3d3ef 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx @@ -39,6 +39,8 @@ #include #include +using bout::utils::flagSet; + #ifdef PETSC_HAVE_HYPRE static constexpr auto DEFAULT_PC_TYPE = PCHYPRE; #else @@ -78,36 +80,32 @@ LaplacePetsc3dAmg::LaplacePetsc3dAmg(Options* opt, const CELL_LOC loc, Mesh* mes Ex.setLocation(location); Ez.setLocation(location); - // Get y boundary flags - #if CHECK > 0 // Checking flags are set to something which is not implemented // This is done binary (which is possible as each flag is a power of 2) - if ((global_flags & ~implemented_flags) != 0) { - if ((global_flags & INVERT_4TH_ORDER) != 0) { - output << "For PETSc based Laplacian inverter, use 'fourth_order=true' instead of " - "setting INVERT_4TH_ORDER flag" - << "\n"; - } - throw BoutException("Attempted to set Laplacian inversion flag that is not " - "implemented in petsc_laplace.cxx"); - } - if ((inner_boundary_flags & ~implemented_boundary_flags) != 0) { - throw BoutException("Attempted to set Laplacian inversion boundary flag that is not " - "implemented in petsc_laplace.cxx"); + if (flagSet(global_flags, INVERT_4TH_ORDER)) { + output.write("For PETSc based Laplacian inverter, use 'fourth_order=true' instead of " + "setting INVERT_4TH_ORDER flag\n"); } - if ((outer_boundary_flags & ~implemented_boundary_flags) != 0) { - throw BoutException("Attempted to set Laplacian inversion boundary flag that is not " - "implemented in petsc_laplace.cxx"); - } - if ((lower_boundary_flags & ~implemented_boundary_flags) != 0) { - throw BoutException("Attempted to set Laplacian inversion boundary flag that is not " - "implemented in petsc_laplace.cxx"); - } - if ((upper_boundary_flags & ~implemented_boundary_flags) != 0) { - throw BoutException("Attempted to set Laplacian inversion boundary flag that is not " + + if (flagSet(global_flags, ~implemented_flags)) { + throw BoutException("Attempted to set global Laplacian inversion flag that is not " "implemented in petsc_laplace.cxx"); } + + auto unimplementedBoundaryFlag = [](int boundary_flag, + const std::string& name) -> void { + if (flagSet(boundary_flag, ~implemented_boundary_flags)) { + throw BoutException("Attempted to set Laplacian inversion {} boundary flag " + "that is not implemented in petsc3damg.cxx", + name); + } + }; + unimplementedBoundaryFlag(inner_boundary_flags, "inner"); + unimplementedBoundaryFlag(outer_boundary_flags, "outer"); + unimplementedBoundaryFlag(lower_boundary_flags, "lower"); + unimplementedBoundaryFlag(upper_boundary_flags, "upper"); + if (localmesh->periodicX) { throw BoutException("LaplacePetsc3dAmg does not work with periodicity in the x " "direction (localmesh->PeriodicX == true). Change boundary " @@ -120,52 +118,40 @@ LaplacePetsc3dAmg::LaplacePetsc3dAmg(Options* opt, const CELL_LOC loc, Mesh* mes } // Set up boundary conditions in operator + const bool inner_X_neumann = flagSet(inner_boundary_flags, INVERT_AC_GRAD); + const auto inner_X_BC = inner_X_neumann ? -1. / coords->dx / sqrt(coords->g_11) : 0.5; + const auto inner_X_BC_plus = inner_X_neumann ? -inner_X_BC : 0.5; + BOUT_FOR_SERIAL(i, indexer->getRegionInnerX()) { - if ((inner_boundary_flags & INVERT_AC_GRAD) != 0) { - // Neumann on inner X boundary - operator3D(i, i) = -1. / coords->dx[i] / sqrt(coords->g_11[i]); - operator3D(i, i.xp()) = 1. / coords->dx[i] / sqrt(coords->g_11[i]); - } else { - // Dirichlet on inner X boundary - operator3D(i, i) = 0.5; - operator3D(i, i.xp()) = 0.5; - } + operator3D(i, i) = inner_X_BC[i]; + operator3D(i, i.xp()) = inner_X_BC_plus[i]; } + const bool outer_X_neumann = flagSet(outer_boundary_flags, INVERT_AC_GRAD); + const auto outer_X_BC = outer_X_neumann ? 1. / coords->dx / sqrt(coords->g_11) : 0.5; + const auto outer_X_BC_minus = outer_X_neumann ? -outer_X_BC : 0.5; + BOUT_FOR_SERIAL(i, indexer->getRegionOuterX()) { - if ((outer_boundary_flags & INVERT_AC_GRAD) != 0) { - // Neumann on outer X boundary - operator3D(i, i) = 1. / coords->dx[i] / sqrt(coords->g_11[i]); - operator3D(i, i.xm()) = -1. / coords->dx[i] / sqrt(coords->g_11[i]); - } else { - // Dirichlet on outer X boundary - operator3D(i, i) = 0.5; - operator3D(i, i.xm()) = 0.5; - } + operator3D(i, i) = outer_X_BC[i]; + operator3D(i, i.xm()) = outer_X_BC_minus[i]; } + const bool lower_Y_neumann = flagSet(lower_boundary_flags, INVERT_AC_GRAD); + const auto lower_Y_BC = lower_Y_neumann ? -1. / coords->dy / sqrt(coords->g_22) : 0.5; + const auto lower_Y_BC_plus = lower_Y_neumann ? -lower_Y_BC : 0.5; + BOUT_FOR_SERIAL(i, indexer->getRegionLowerY()) { - if ((lower_boundary_flags & INVERT_AC_GRAD) != 0) { - // Neumann on lower Y boundary - operator3D(i, i) = -1. / coords->dy[i] / sqrt(coords->g_22[i]); - operator3D(i, i.yp()) = 1. / coords->dy[i] / sqrt(coords->g_22[i]); - } else { - // Dirichlet on lower Y boundary - operator3D(i, i) = 0.5; - operator3D(i, i.yp()) = 0.5; - } + operator3D(i, i) = lower_Y_BC[i]; + operator3D(i, i.yp()) = lower_Y_BC_plus[i]; } + const bool upper_Y_neumann = flagSet(upper_boundary_flags, INVERT_AC_GRAD); + const auto upper_Y_BC = upper_Y_neumann ? 1. / coords->dy / sqrt(coords->g_22) : 0.5; + const auto upper_Y_BC_minus = upper_Y_neumann ? -upper_Y_BC : 0.5; + BOUT_FOR_SERIAL(i, indexer->getRegionUpperY()) { - if ((upper_boundary_flags & INVERT_AC_GRAD) != 0) { - // Neumann on upper Y boundary - operator3D(i, i) = 1. / coords->dy[i] / sqrt(coords->g_22[i]); - operator3D(i, i.ym()) = -1. / coords->dy[i] / sqrt(coords->g_22[i]); - } else { - // Dirichlet on upper Y boundary - operator3D(i, i) = 0.5; - operator3D(i, i.ym()) = 0.5; - } + operator3D(i, i) = upper_Y_BC[i]; + operator3D(i, i.ym()) = upper_Y_BC_minus[i]; } } @@ -175,6 +161,17 @@ LaplacePetsc3dAmg::~LaplacePetsc3dAmg() { } } +void setBC(PetscVector& rhs, const Field3D& b_in, + const Region& region, int boundary_flags, + const Field3D& x0) { + if (flagSet(boundary_flags, INVERT_RHS)) { + BOUT_FOR(index, region) { ASSERT1(std::isfinite(b_in[index])); } + } else { + const auto& outer_X_BC = (flagSet(boundary_flags, INVERT_SET)) ? x0 : 0.0; + BOUT_FOR_SERIAL(index, region) { rhs(index) = outer_X_BC[index]; } + } +} + Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { AUTO_TRACE(); @@ -193,45 +190,10 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { // Adjust vectors to represent boundary conditions and check that // boundary cells are finite - BOUT_FOR_SERIAL(i, indexer->getRegionInnerX()) { - const BoutReal val = (inner_boundary_flags & INVERT_SET) ? x0[i] : 0.; - ASSERT1(std::isfinite(x0[i])); - if (!(inner_boundary_flags & INVERT_RHS)) { - rhs(i) = val; - } else { - ASSERT1(std::isfinite(b_in[i])); - } - } - - BOUT_FOR_SERIAL(i, indexer->getRegionOuterX()) { - const BoutReal val = (outer_boundary_flags & INVERT_SET) ? x0[i] : 0.; - ASSERT1(std::isfinite(x0[i])); - if (!(outer_boundary_flags & INVERT_RHS)) { - rhs(i) = val; - } else { - ASSERT1(std::isfinite(b_in[i])); - } - } - - BOUT_FOR_SERIAL(i, indexer->getRegionLowerY()) { - const BoutReal val = (lower_boundary_flags & INVERT_SET) ? x0[i] : 0.; - ASSERT1(std::isfinite(x0[i])); - if (!(lower_boundary_flags & INVERT_RHS)) { - rhs(i) = val; - } else { - ASSERT1(std::isfinite(b_in[i])); - } - } - - BOUT_FOR_SERIAL(i, indexer->getRegionUpperY()) { - const BoutReal val = (upper_boundary_flags & INVERT_SET) ? x0[i] : 0.; - ASSERT1(std::isfinite(x0[i])); - if (!(upper_boundary_flags & INVERT_RHS)) { - rhs(i) = val; - } else { - ASSERT1(std::isfinite(b_in[i])); - } - } + setBC(rhs, b_in, indexer->getRegionInnerX(), inner_boundary_flags, x0); + setBC(rhs, b_in, indexer->getRegionOuterX(), outer_boundary_flags, x0); + setBC(rhs, b_in, indexer->getRegionLowerY(), lower_boundary_flags, x0); + setBC(rhs, b_in, indexer->getRegionUpperY(), upper_boundary_flags, x0); rhs.assemble(); guess.assemble(); From acbb92af2e4cce358661d8e4fb22314cfdce378d Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 4 May 2023 17:46:05 +0100 Subject: [PATCH 43/69] Delete unneeded PetscVectorElement test --- .../unit/include/bout/test_petsc_setters.cxx | 83 ------------------- 1 file changed, 83 deletions(-) diff --git a/tests/unit/include/bout/test_petsc_setters.cxx b/tests/unit/include/bout/test_petsc_setters.cxx index 7ffbad819a..d3d95280c0 100644 --- a/tests/unit/include/bout/test_petsc_setters.cxx +++ b/tests/unit/include/bout/test_petsc_setters.cxx @@ -10,89 +10,6 @@ #if BOUT_HAS_PETSC -///////////////// Test PetscVector::Element ///////////////// - -class PetscVectorElementTest : public ::testing::Test { -public: - WithQuietOutput all{output}; - Vec v; - PetscInt n = 10; - PetscScalar defaultVal = 1.; - PetscLib lib; - - PetscVectorElementTest() { - VecCreateMPI(MPI_COMM_WORLD, n, PETSC_DETERMINE, &v); - VecSet(v, defaultVal); - VecAssemblyBegin(v); - VecAssemblyEnd(v); - } - - virtual ~PetscVectorElementTest() { VecDestroy(&v); } -}; - -// TEST_F(PetscVectorElementTest, AssignInsert) { -// PetscVector::Element v1(&v, 1), v2(&v, 2), v3(&v, 3), v3b(&v, 3), v9(&v, 9); -// v1 = 1.5; -// v2 = 2.5; -// v3 = 3.5; -// v3b = 4.0; // Should overwrite previous call -// v9 = 9.5; -// VecAssemblyBegin(v); -// VecAssemblyEnd(v); -// PetscScalar* vecContents; -// VecGetArray(v, &vecContents); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[0]); -// EXPECT_DOUBLE_EQ(1.5, vecContents[1]); -// EXPECT_DOUBLE_EQ(2.5, vecContents[2]); -// EXPECT_DOUBLE_EQ(4.0, vecContents[3]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[4]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[5]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[6]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[7]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[8]); -// EXPECT_DOUBLE_EQ(9.5, vecContents[9]); -// } - -// TEST_F(PetscVectorElementTest, AssignElement) { -// PetscVector::Element v1(&v, 1), v2(&v, 2); -// v2 = v1 = 1.5; -// VecAssemblyBegin(v); -// VecAssemblyEnd(v); -// PetscScalar* vecContents; -// VecGetArray(v, &vecContents); -// EXPECT_DOUBLE_EQ(1.5, vecContents[1]); -// EXPECT_DOUBLE_EQ(1.5, vecContents[2]); -// } - -// TEST_F(PetscVectorElementTest, AssignAdd) { -// PetscVector::Element v1(&v, 1), v2(&v, 2), v3(&v, 3), v3b(&v, 3), v9(&v, 9); -// v1 += 1.5; -// v2 += 2.5; -// v3 += 3.5; -// v3b += 4.0; -// v9 += 9.5; -// VecAssemblyBegin(v); -// VecAssemblyEnd(v); -// PetscScalar* vecContents; -// VecGetArray(v, &vecContents); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[0]); -// EXPECT_DOUBLE_EQ(2.5, vecContents[1]); -// EXPECT_DOUBLE_EQ(3.5, vecContents[2]); -// EXPECT_DOUBLE_EQ(8.5, vecContents[3]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[4]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[5]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[6]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[7]); -// EXPECT_DOUBLE_EQ(defaultVal, vecContents[8]); -// EXPECT_DOUBLE_EQ(10.5, vecContents[9]); -// } - -// TEST_F(PetscVectorElementTest, ConvertToBoutReal) { -// PetscVector::Element v1(&v, 1); -// BoutReal val = v1; -// EXPECT_DOUBLE_EQ(defaultVal, val); -// } - ///////////////// Test PetscMatrixElement ///////////////// class PetscMatrixElementTest : public ::testing::Test { From b1af791bf4f19b961c30bdcfb10732cedaa5f405 Mon Sep 17 00:00:00 2001 From: ZedThree Date: Thu, 4 May 2023 16:53:14 +0000 Subject: [PATCH 44/69] Apply clang-format changes --- include/bout/globalindexer.hxx | 9 ++------ include/bout/petsc_interface.hxx | 21 ++++++++----------- include/bout/utils.hxx | 4 ++-- tests/unit/include/bout/test_petsc_matrix.cxx | 18 +++++++++------- tests/unit/include/bout/test_petsc_vector.cxx | 10 ++++----- 5 files changed, 27 insertions(+), 35 deletions(-) diff --git a/include/bout/globalindexer.hxx b/include/bout/globalindexer.hxx index cacafa298f..3d0ef21cea 100644 --- a/include/bout/globalindexer.hxx +++ b/include/bout/globalindexer.hxx @@ -109,9 +109,7 @@ public: void initialise() { // We need to ensure any _guard_ cells are -1 so we don't include them int_indices.reallocate(indices.size()); - BOUT_FOR(index, indices.getRegion("RGN_GUARDS")) { - int_indices[index.ind] = -1; - } + BOUT_FOR(index, indices.getRegion("RGN_GUARDS")) { int_indices[index.ind] = -1; } // Now we can communicate to get global indices from neighbouring processes fieldmesh->communicate(indices); // Finally, we fill in the global indices including in the @@ -119,7 +117,6 @@ public: BOUT_FOR(index, regionAll) { int_indices[index.ind] = static_cast(indices[index]); } - } Mesh* getMesh() const { return fieldmesh; } @@ -172,9 +169,7 @@ public: int size() const { return regionAll.size(); } - const Array& getIntIndices() const { - return int_indices; - } + const Array& getIntIndices() const { return int_indices; } protected: // Must not be const as the index field needs to be mutable in order diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index ab6d775237..f6113ecdc3 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -89,8 +89,8 @@ public: ~PetscVector() = default; PetscVector(const PetscVector& v) - : vector(new Vec()), indexConverter(v.indexConverter), - location(v.location), initialised(v.initialised), vector_values(v.vector_values) { + : vector(new Vec()), indexConverter(v.indexConverter), location(v.location), + initialised(v.initialised), vector_values(v.vector_values) { VecDuplicate(*v.vector, vector.get()); VecCopy(*v.vector, *vector); } @@ -104,9 +104,8 @@ public: /// Construct from a field, copying over the field values PetscVector(const T& field, IndexerPtr indConverter) - : vector(new Vec()), indexConverter(indConverter), - location(field.getLocation()), initialised(true), - vector_values(field.size()) { + : vector(new Vec()), indexConverter(indConverter), location(field.getLocation()), + initialised(true), vector_values(field.size()) { ASSERT1(indConverter->getMesh() == field.getMesh()); MPI_Comm comm = getComm(field); @@ -139,16 +138,14 @@ public: } /// Move assignment - PetscVector& operator=(PetscVector&& rhs) noexcept { + PetscVector& operator=(PetscVector&& rhs) noexcept { swap(*this, rhs); return *this; } PetscVector& operator=(const T& f) { ASSERT1(indexConverter); // Needs to have index set - BOUT_FOR_SERIAL(i, indexConverter->getRegionAll()) { - (*this)(i) = f[i]; - } + BOUT_FOR_SERIAL(i, indexConverter->getRegionAll()) { (*this)(i) = f[i]; } assemble(); return *this; } @@ -269,8 +266,8 @@ public: /// Copy constructor PetscMatrix(const PetscMatrix& m) - : matrix(new Mat()), indexConverter(m.indexConverter), pt(m.pt), - yoffset(m.yoffset), initialised(m.initialised) { + : matrix(new Mat()), indexConverter(m.indexConverter), pt(m.pt), yoffset(m.yoffset), + initialised(m.initialised) { MatDuplicate(*m.matrix, MAT_COPY_VALUES, matrix.get()); } @@ -312,7 +309,7 @@ public: return *this; } /// Move assignment - PetscMatrix& operator=(PetscMatrix&& rhs) noexcept { + PetscMatrix& operator=(PetscMatrix&& rhs) noexcept { matrix = rhs.matrix; indexConverter = rhs.indexConverter; pt = rhs.pt; diff --git a/include/bout/utils.hxx b/include/bout/utils.hxx index 834c269f23..126fd15d37 100644 --- a/include/bout/utils.hxx +++ b/include/bout/utils.hxx @@ -694,7 +694,7 @@ namespace bout { namespace utils { /// Check that \p flag is set in \p bitset inline bool flagSet(int bitset, int flag) { return (bitset & flag) != 0; } -} -} +} // namespace utils +} // namespace bout #endif // __UTILS_H__ diff --git a/tests/unit/include/bout/test_petsc_matrix.cxx b/tests/unit/include/bout/test_petsc_matrix.cxx index 8684ed7823..1fabd93a51 100644 --- a/tests/unit/include/bout/test_petsc_matrix.cxx +++ b/tests/unit/include/bout/test_petsc_matrix.cxx @@ -355,15 +355,16 @@ TYPED_TEST(PetscMatrixTest, TestYNextPos) { EXPECT_THROW(matrix.ynext(1), BoutException); } else { if (std::is_same::value) { - EXPECT_CALL(*transform, getWeightsForYApproximation( - this->indexB.x(), this->indexA.y(), this->indexB.z(), 1)) + EXPECT_CALL(*transform, + getWeightsForYApproximation(this->indexB.x(), this->indexA.y(), + this->indexB.z(), 1)) .Times(2) .WillRepeatedly(Return(this->yDownWeights)); } matrix.ynext(1)(this->indexA, this->indexB) = val; expected.yup()(this->indexA, this->indexB) = val; - Mat *rawmat = matrix.get(); - Mat *rawexp = expected.get(); + Mat* rawmat = matrix.get(); + Mat* rawexp = expected.get(); MatAssemblyBegin(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyEnd(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyBegin(*rawexp, MAT_FINAL_ASSEMBLY); @@ -383,15 +384,16 @@ TYPED_TEST(PetscMatrixTest, TestYNextNeg) { EXPECT_THROW(matrix.ynext(-1), BoutException); } else { if (std::is_same::value) { - EXPECT_CALL(*transform, getWeightsForYApproximation( - this->indexA.x(), this->indexB.y(), this->indexA.z(), -1)) + EXPECT_CALL(*transform, + getWeightsForYApproximation(this->indexA.x(), this->indexB.y(), + this->indexA.z(), -1)) .Times(2) .WillRepeatedly(Return(this->yDownWeights)); } matrix.ynext(-1)(this->indexB, this->indexA) = val; expected.ydown()(this->indexB, this->indexA) = val; - Mat *rawmat = matrix.get(); - Mat *rawexp = expected.get(); + Mat* rawmat = matrix.get(); + Mat* rawexp = expected.get(); MatAssemblyBegin(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyEnd(*rawmat, MAT_FINAL_ASSEMBLY); MatAssemblyBegin(*rawexp, MAT_FINAL_ASSEMBLY); diff --git a/tests/unit/include/bout/test_petsc_vector.cxx b/tests/unit/include/bout/test_petsc_vector.cxx index 8e1cb53731..c478557ff4 100644 --- a/tests/unit/include/bout/test_petsc_vector.cxx +++ b/tests/unit/include/bout/test_petsc_vector.cxx @@ -36,7 +36,7 @@ class PetscVectorTest : public FakeMeshFixture { IndexerPtr indexer; PetscVectorTest() - : FakeMeshFixture(), field(1.5, bout::globals::mesh), + : FakeMeshFixture(), field(1.5, bout::globals::mesh), stencil(squareStencil(bout::globals::mesh)), indexer(std::make_shared>(bout::globals::mesh, stencil)) { PetscErrorPrintf = PetscErrorPrintfNone; @@ -122,8 +122,8 @@ TYPED_TEST(PetscVectorTest, CopyAssignment) { SCOPED_TRACE("CopyAssignment"); PetscVector vector(this->field, this->indexer); PetscVector copy = vector; - Vec *vectorPtr = vector.get(); - Vec *copyPtr = copy.get(); + Vec* vectorPtr = vector.get(); + Vec* copyPtr = copy.get(); EXPECT_NE(vectorPtr, copyPtr); testVectorsEqual(vectorPtr, copyPtr); } @@ -143,9 +143,7 @@ TYPED_TEST(PetscVectorTest, SetElement) { PetscVector vector(this->field, this->indexer); const TypeParam val(-10.); - BOUT_FOR(index, val.getRegion("RGN_ALL")) { - vector(index) = val[index]; - } + BOUT_FOR(index, val.getRegion("RGN_ALL")) { vector(index) = val[index]; } vector.assemble(); Vec* vectorPtr = vector.get(); From a2de8f29bb3bfc95ab575c88679f65c648c11af5 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 11 Oct 2023 15:38:40 +0100 Subject: [PATCH 45/69] Change some variable names to keep clang-tidy happy --- include/bout/petsc_interface.hxx | 84 ++++++++++++++++---------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index f6113ecdc3..04d97c2acd 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -79,27 +79,27 @@ public: using ind_type = typename T::ind_type; struct VectorDeleter { - void operator()(Vec* v) const { - VecDestroy(v); - delete v; + void operator()(Vec* vec) const { + VecDestroy(vec); + delete vec; } }; PetscVector() : vector(new Vec{}) {} ~PetscVector() = default; - PetscVector(const PetscVector& v) - : vector(new Vec()), indexConverter(v.indexConverter), location(v.location), - initialised(v.initialised), vector_values(v.vector_values) { - VecDuplicate(*v.vector, vector.get()); - VecCopy(*v.vector, *vector); + PetscVector(const PetscVector& vec) + : vector(new Vec()), indexConverter(vec.indexConverter), location(vec.location), + initialised(vec.initialised), vector_values(vec.vector_values) { + VecDuplicate(*vec.vector, vector.get()); + VecCopy(*vec.vector, *vector); } - PetscVector(PetscVector&& v) noexcept - : indexConverter(v.indexConverter), location(v.location), - initialised(v.initialised), vector_values(std::move(v.vector_values)) { - std::swap(vector, v.vector); - v.initialised = false; + PetscVector(PetscVector&& vec) noexcept + : indexConverter(vec.indexConverter), location(vec.location), + initialised(vec.initialised), vector_values(std::move(vec.vector_values)) { + std::swap(vector, vec.vector); + vec.initialised = false; } /// Construct from a field, copying over the field values @@ -118,16 +118,16 @@ public: /// Construct a vector like v, but using data from a raw PETSc /// Vec. That Vec (not a copy) will then be owned by the new object. - PetscVector(const PetscVector& v, Vec* vec) { + PetscVector(const PetscVector& other, Vec* vec) { #if CHECKLEVEL >= 2 - int fsize = v.indexConverter->size(); + int fsize = other.indexConverter->size(); int msize = 0; VecGetLocalSize(*vec, &msize); ASSERT2(fsize == msize); #endif vector.reset(vec); - indexConverter = v.indexConverter; - location = v.location; + indexConverter = other.indexConverter; + location = other.location; initialised = true; } @@ -143,9 +143,9 @@ public: return *this; } - PetscVector& operator=(const T& f) { + PetscVector& operator=(const T& field) { ASSERT1(indexConverter); // Needs to have index set - BOUT_FOR_SERIAL(i, indexConverter->getRegionAll()) { (*this)(i) = f[i]; } + BOUT_FOR_SERIAL(i, indexConverter->getRegionAll()) { (*this)(i) = field[i]; } assemble(); return *this; } @@ -254,9 +254,9 @@ public: using ind_type = typename T::ind_type; struct MatrixDeleter { - void operator()(Mat* m) const { - MatDestroy(m); - delete m; + void operator()(Mat* mat) const { + MatDestroy(mat); + delete mat; } }; @@ -265,17 +265,17 @@ public: ~PetscMatrix() = default; /// Copy constructor - PetscMatrix(const PetscMatrix& m) - : matrix(new Mat()), indexConverter(m.indexConverter), pt(m.pt), yoffset(m.yoffset), - initialised(m.initialised) { - MatDuplicate(*m.matrix, MAT_COPY_VALUES, matrix.get()); + PetscMatrix(const PetscMatrix& mat) + : matrix(new Mat()), indexConverter(mat.indexConverter), pt(mat.pt), yoffset(mat.yoffset), + initialised(mat.initialised) { + MatDuplicate(*mat.matrix, MAT_COPY_VALUES, matrix.get()); } /// Move constrcutor - PetscMatrix(PetscMatrix&& m) noexcept - : matrix(m.matrix), indexConverter(m.indexConverter), pt(m.pt), yoffset(m.yoffset), - initialised(m.initialised) { - m.initialised = false; + PetscMatrix(PetscMatrix&& mat) noexcept + : matrix(mat.matrix), indexConverter(mat.indexConverter), pt(mat.pt), yoffset(mat.yoffset), + initialised(mat.initialised) { + mat.initialised = false; } // Construct a matrix capable of operating on the specified field, @@ -339,9 +339,9 @@ public: Element(Element&&) = delete; Element& operator=(Element&&) = delete; Element(const Element& other) = default; - Element(Mat* matrix, PetscInt row, PetscInt col, std::vector p = {}, - std::vector w = {}) - : petscMatrix(matrix), petscRow(row), petscCol(col), positions(p), weights(w) { + Element(Mat* matrix, PetscInt row, PetscInt col, std::vector position = {}, + std::vector weight = {}) + : petscMatrix(matrix), petscRow(row), petscCol(col), positions(std::move(position)), weights(std::move(weight)) { ASSERT2(positions.size() == weights.size()); #if CHECK > 2 for (const auto val : weights) { @@ -378,8 +378,8 @@ public: ASSERT3(finite(val)); auto columnPosition = std::find(positions.begin(), positions.end(), petscCol); if (columnPosition != positions.end()) { - int i = std::distance(positions.begin(), columnPosition); - value += weights[i] * val; + const int index = std::distance(positions.begin(), columnPosition); + value += weights[index] * val; ASSERT3(finite(value)); } setValues(val, ADD_VALUES); @@ -427,7 +427,7 @@ public: std::vector weights; if (yoffset != 0) { ASSERT1(yoffset == index2.y() - index1.y()); - const auto pw = + const auto pws = pt->getWeightsForYApproximation(index2.x(), index1.y(), index2.z(), yoffset); const int ny = std::is_same::value ? 1 : indexConverter->getMesh()->LocalNy; @@ -435,14 +435,14 @@ public: std::is_same::value ? 1 : indexConverter->getMesh()->LocalNz; std::transform( - pw.begin(), pw.end(), std::back_inserter(positions), - [this, ny, nz](ParallelTransform::PositionsAndWeights p) -> PetscInt { + pws.begin(), pws.end(), std::back_inserter(positions), + [this, ny, nz](ParallelTransform::PositionsAndWeights pos) -> PetscInt { return this->indexConverter->getGlobal( - ind_type(p.i * ny * nz + p.j * nz + p.k, ny, nz)); + ind_type(pos.i * ny * nz + pos.j * nz + pos.k, ny, nz)); }); - std::transform(pw.begin(), pw.end(), std::back_inserter(weights), - [](ParallelTransform::PositionsAndWeights p) -> PetscScalar { - return p.weight; + std::transform(pws.begin(), pws.end(), std::back_inserter(weights), + [](ParallelTransform::PositionsAndWeights pos) -> PetscScalar { + return pos.weight; }); } return Element(matrix.get(), global1, global2, positions, weights); From dfda3c9790baec1b1065aa44d7f6b100f3535e8e Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 11 Oct 2023 15:38:55 +0100 Subject: [PATCH 46/69] Stop clang-tidy complaining about some short names --- .clang-tidy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 7a1c58af80..b52a287a8d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -359,5 +359,11 @@ CheckOptions: value: 'false' - key: readability-simplify-subscript-expr.Types value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array' + - key: readability-identifier-length.IgnoredVariableNames + value: '^n?[xyz]$' + - key: readability-identifier-length.IgnoredParameterNames + value: '^[ijkxyz][01]?$' + - key: readability-identifier-length.IgnoredLoopCounterNames + value: '^[ijkxyz_]$' ... From 5d413e9e66e27f3f02885b6e82ec73fe90eb15d7 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Thu, 12 Oct 2023 16:24:12 +0100 Subject: [PATCH 47/69] Fix getting correct parallel slice for `getWeightsForYApproximation` Previous change to generalise `ShiftedMetricInterp::getWeightsForYApproximation` didn't get correct parallel slice for `y_offset` --- src/mesh/parallel/shiftedmetricinterp.hxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/mesh/parallel/shiftedmetricinterp.hxx b/src/mesh/parallel/shiftedmetricinterp.hxx index 928341827a..93ea2f07be 100644 --- a/src/mesh/parallel/shiftedmetricinterp.hxx +++ b/src/mesh/parallel/shiftedmetricinterp.hxx @@ -29,6 +29,7 @@ #include #include +#include /*! * Shifted metric method @@ -79,8 +80,16 @@ public: std::vector getWeightsForYApproximation(int i, int j, int k, int y_offset) override { - return parallel_slice_interpolators[yup_index]->getWeightsForYApproximation(i, j, k, - y_offset); +#if CHECK > 0 + if (y_offset == 0) { + throw BoutException("Cannot get ShiftedMetricInterp parallel slice at zero offset"); + } +#endif + const auto index = static_cast(std::abs(y_offset) - 1) + + ((y_offset > 0) ? yup_index : ydown_index); + + return parallel_slice_interpolators[index]->getWeightsForYApproximation(i, j, k, + y_offset); } bool requiresTwistShift(bool twist_shift_enabled, YDirectionType ytype) override { From 73be372fe50ed3a94cf394eae8a388bd099f3a4b Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 13 Oct 2023 09:30:52 +0100 Subject: [PATCH 48/69] Add defaulted move ctor/assignment for `PetscMatrix::Element` --- include/bout/petsc_interface.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 04d97c2acd..1c6900acd4 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -336,8 +336,8 @@ public: public: Element() = delete; ~Element() = default; - Element(Element&&) = delete; - Element& operator=(Element&&) = delete; + Element(Element&&) noexcept = default; + Element& operator=(Element&&) noexcept = default; Element(const Element& other) = default; Element(Mat* matrix, PetscInt row, PetscInt col, std::vector position = {}, std::vector weight = {}) From 295966b2b97852f3d6061d5006d00da7e5443aee Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 13 Oct 2023 09:31:19 +0100 Subject: [PATCH 49/69] Apply clang-format --- include/bout/petsc_interface.hxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 1c6900acd4..94a89c6835 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -266,15 +266,15 @@ public: /// Copy constructor PetscMatrix(const PetscMatrix& mat) - : matrix(new Mat()), indexConverter(mat.indexConverter), pt(mat.pt), yoffset(mat.yoffset), - initialised(mat.initialised) { + : matrix(new Mat()), indexConverter(mat.indexConverter), pt(mat.pt), + yoffset(mat.yoffset), initialised(mat.initialised) { MatDuplicate(*mat.matrix, MAT_COPY_VALUES, matrix.get()); } /// Move constrcutor PetscMatrix(PetscMatrix&& mat) noexcept - : matrix(mat.matrix), indexConverter(mat.indexConverter), pt(mat.pt), yoffset(mat.yoffset), - initialised(mat.initialised) { + : matrix(mat.matrix), indexConverter(mat.indexConverter), pt(mat.pt), + yoffset(mat.yoffset), initialised(mat.initialised) { mat.initialised = false; } @@ -341,7 +341,8 @@ public: Element(const Element& other) = default; Element(Mat* matrix, PetscInt row, PetscInt col, std::vector position = {}, std::vector weight = {}) - : petscMatrix(matrix), petscRow(row), petscCol(col), positions(std::move(position)), weights(std::move(weight)) { + : petscMatrix(matrix), petscRow(row), petscCol(col), + positions(std::move(position)), weights(std::move(weight)) { ASSERT2(positions.size() == weights.size()); #if CHECK > 2 for (const auto val : weights) { From 7cd0d766c6d2bdf2f46c7ee688ead0590b9c3336 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 13 Oct 2023 09:45:09 +0100 Subject: [PATCH 50/69] Fix a whole bunch of clang-tidy issues in petsc interface/AMG solver --- include/bout/petsc_interface.hxx | 26 +++--- .../laplace/impls/petsc3damg/petsc3damg.cxx | 88 ++++++++++--------- .../laplace/impls/petsc3damg/petsc3damg.hxx | 2 +- 3 files changed, 61 insertions(+), 55 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 94a89c6835..3d3035f577 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -27,8 +27,8 @@ * **************************************************************************/ -#ifndef __PETSC_INTERFACE_H__ -#define __PETSC_INTERFACE_H__ +#ifndef BOUT_PETSC_INTERFACE_H +#define BOUT_PETSC_INTERFACE_H #include "bout/build_config.hxx" @@ -216,7 +216,7 @@ public: result.setLocation(location); // Note that this only populates boundaries to a depth of 1 BOUT_FOR_SERIAL(i, indexConverter->getRegionAll()) { - PetscInt ind = indexConverter->getGlobal(i); + const PetscInt ind = indexConverter->getGlobal(i); PetscScalar val = BoutNaN; VecGetValues(*vector, 1, &ind, &val); result[i] = val; @@ -231,7 +231,7 @@ public: private: PetscLib lib{}; std::unique_ptr vector = nullptr; - IndexerPtr indexConverter; + IndexerPtr indexConverter{}; CELL_LOC location = CELL_LOC::deflt; bool initialised = false; Array vector_values{}; @@ -273,7 +273,7 @@ public: /// Move constrcutor PetscMatrix(PetscMatrix&& mat) noexcept - : matrix(mat.matrix), indexConverter(mat.indexConverter), pt(mat.pt), + : matrix(std::move(mat.matrix)), indexConverter(std::move(mat.indexConverter)), pt(mat.pt), yoffset(mat.yoffset), initialised(mat.initialised) { mat.initialised = false; } @@ -349,11 +349,11 @@ public: ASSERT3(finite(val)); } #endif - if (positions.size() == 0) { + if (positions.empty()) { positions = {col}; weights = {1.0}; } - PetscBool assembled; + PetscBool assembled = PETSC_FALSE; MatAssembled(*petscMatrix, &assembled); if (assembled == PETSC_TRUE) { BOUT_OMP(critical) @@ -364,8 +364,12 @@ public: } Element& operator=(const Element& other) { AUTO_TRACE(); + if (this == &other) { + return *this; + } ASSERT3(finite(static_cast(other))); - return *this = static_cast(other); + *this = static_cast(other); + return *this; } Element& operator=(BoutReal val) { AUTO_TRACE(); @@ -517,7 +521,7 @@ public: private: PetscLib lib; std::shared_ptr matrix = nullptr; - IndexerPtr indexConverter; + IndexerPtr indexConverter{}; ParallelTransform* pt{}; int yoffset = 0; bool initialised = false; @@ -553,7 +557,7 @@ void swap(PetscMatrix& first, PetscMatrix& second) { */ template PetscVector operator*(const PetscMatrix& mat, const PetscVector& vec) { - const Vec rhs = *vec.get(); + Vec rhs = *vec.get(); Vec* result = new Vec(); VecDuplicate(rhs, result); VecAssemblyBegin(*result); @@ -565,4 +569,4 @@ PetscVector operator*(const PetscMatrix& mat, const PetscVector& vec) { #endif // BOUT_HAS_PETSC -#endif // __PETSC_INTERFACE_H__ +#endif // BOUT_PETSC_INTERFACE_H diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx index 3cf0f3d3ef..6ec5c21c22 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx @@ -24,6 +24,7 @@ * along with BOUT++. If not, see . * **************************************************************************/ +#include "bout/bout_types.hxx" #include "bout/build_config.hxx" #if BOUT_HAS_PETSC @@ -178,7 +179,7 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { // Timing reported in the log files. Includes any matrix construction. // The timing for just the solve phase can be retrieved from the "petscsolve" // timer if desired. - Timer timer("invert"); + const Timer timer("invert"); // If necessary, update the values in the matrix operator and initialise // the Krylov solver @@ -200,7 +201,7 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { // Invoke solver { - Timer timer("petscsolve"); + const Timer timer("petscsolve"); KSPSolve(ksp, *rhs.get(), *guess.get()); } @@ -223,11 +224,11 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { if (solution.hasParallelSlices()) { BOUT_FOR(i, indexer->getRegionLowerY()) { solution.ydown()[i] = solution[i]; } BOUT_FOR(i, indexer->getRegionUpperY()) { solution.yup()[i] = solution[i]; } - for (int b = 1; b < localmesh->ystart; b++) { + for (int boundary = 1; boundary < localmesh->ystart; boundary++) { BOUT_FOR(i, indexer->getRegionLowerY()) { - solution.ydown(b)[i.ym(b)] = solution[i]; + solution.ydown(boundary)[i.ym(boundary)] = solution[i]; } - BOUT_FOR(i, indexer->getRegionUpperY()) { solution.yup(b)[i.yp(b)] = solution[i]; } + BOUT_FOR(i, indexer->getRegionUpperY()) { solution.yup(boundary)[i.yp(boundary)] = solution[i]; } } } @@ -236,9 +237,9 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { // Note: RegionInnerX is the set of points just outside the domain // (in the first boundary cell) so one boundary cell is already set BOUT_FOR(i, indexer->getRegionInnerX()) { - for (int b = 1; b < localmesh->xstart; b++) { - solution[i.xm(b)] = - 3. * solution[i.xm(b - 1)] - 3. * solution[i.xm(b - 2)] + solution[i.xm(b - 3)]; + for (int boundary = 1; boundary < localmesh->xstart; boundary++) { + solution[i.xm(boundary)] = + 3. * solution[i.xm(boundary - 1)] - 3. * solution[i.xm(boundary - 2)] + solution[i.xm(boundary - 3)]; } } @@ -246,9 +247,9 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { // Note: RegionOuterX is the set of points just outside the domain // (in the first boundary cell) so one boundary cell is already set BOUT_FOR(i, indexer->getRegionOuterX()) { - for (int b = 1; b < localmesh->xstart; b++) { - solution[i.xp(b)] = - 3. * solution[i.xp(b - 1)] - 3. * solution[i.xp(b - 2)] + solution[i.xp(b - 3)]; + for (int boundary = 1; boundary < localmesh->xstart; boundary++) { + solution[i.xp(boundary)] = + 3. * solution[i.xp(boundary - 1)] - 3. * solution[i.xp(boundary - 2)] + solution[i.xp(boundary - 3)]; } } @@ -279,7 +280,8 @@ void LaplacePetsc3dAmg::updateMatrix3D() { // avoid confusing it with the x-index. // Calculate coefficients for the terms in the differential operator - BoutReal C_df_dx = coords->G1[l], C_df_dz = coords->G3[l]; + BoutReal C_df_dx = coords->G1[l]; + BoutReal C_df_dz = coords->G3[l]; if (issetD) { C_df_dx *= D[l]; C_df_dz *= D[l]; @@ -297,9 +299,9 @@ void LaplacePetsc3dAmg::updateMatrix3D() { C_df_dz += Ez[l]; } - BoutReal C_d2f_dx2 = coords->g11[l], - C_d2f_dy2 = (coords->g22[l] - 1.0 / coords->g_22[l]), - C_d2f_dz2 = coords->g33[l]; + BoutReal C_d2f_dx2 = coords->g11[l]; + BoutReal C_d2f_dy2 = (coords->g22[l] - 1.0 / coords->g_22[l]); + BoutReal C_d2f_dz2 = coords->g33[l]; if (issetD) { C_d2f_dx2 *= D[l]; C_d2f_dy2 *= D[l]; @@ -336,8 +338,8 @@ void LaplacePetsc3dAmg::updateMatrix3D() { // The values stored in the y-boundary are already interpolated // up/down, so we don't want the matrix to do any such // interpolation there. - const int yup = (l.y() == localmesh->yend && upperY.intersects(l.x())) ? -1 : 0, - ydown = (l.y() == localmesh->ystart && lowerY.intersects(l.x())) ? -1 : 0; + const int yup = (l.y() == localmesh->yend && upperY.intersects(l.x())) ? -1 : 0; + const int ydown = (l.y() == localmesh->ystart && lowerY.intersects(l.x())) ? -1 : 0; operator3D.yup(yup)(l, l.yp()) = 0.0; operator3D.ydown(ydown)(l, l.ym()) = 0.0; operator3D.yup(yup)(l, l.xp().yp()) = 0.0; @@ -370,7 +372,8 @@ void LaplacePetsc3dAmg::updateMatrix3D() { C_d2f_dy2 *= D[l]; } - BoutReal C_d2f_dxdy = 2 * coords->g12[l], C_d2f_dydz = 2 * coords->g23[l]; + BoutReal C_d2f_dxdy = 2 * coords->g12[l]; + BoutReal C_d2f_dydz = 2 * coords->g23[l]; if (issetD) { C_d2f_dxdy *= D[l]; C_d2f_dydz *= D[l]; @@ -391,8 +394,8 @@ void LaplacePetsc3dAmg::updateMatrix3D() { // The values stored in the y-boundary are already interpolated // up/down, so we don't want the matrix to do any such // interpolation there. - const int yup = (l.y() == localmesh->yend && upperY.intersects(l.x())) ? -1 : 0, - ydown = (l.y() == localmesh->ystart && lowerY.intersects(l.x())) ? -1 : 0; + const int yup = (l.y() == localmesh->yend && upperY.intersects(l.x())) ? -1 : 0; + const int ydown = (l.y() == localmesh->ystart && lowerY.intersects(l.x())) ? -1 : 0; operator3D.yup(yup)(l, l.yp()) += C_df_dy + C_d2f_dy2; operator3D.ydown(ydown)(l, l.ym()) += -C_df_dy + C_d2f_dy2; @@ -420,7 +423,7 @@ void LaplacePetsc3dAmg::updateMatrix3D() { KSPSetOperators(ksp, *operator3D.get(), *operator3D.get(), DIFFERENT_NONZERO_PATTERN); #endif - PC pc; + PC pc = nullptr; KSPGetPC(ksp, &pc); if (direct) { @@ -475,33 +478,32 @@ OperatorStencil LaplacePetsc3dAmg::getStencil(Mesh* localmesh, // Get the pattern used for interpolation. This is assumed to be the // same across the whole grid. - const auto pw = + const auto positions_weights = localmesh->getCoordinates()->getParallelTransform().getWeightsForYDownApproximation( localmesh->xstart, localmesh->ystart + 1, localmesh->zstart); std::vector interpPattern; - std::transform(pw.begin(), pw.end(), std::back_inserter(interpPattern), - [localmesh](ParallelTransform::PositionsAndWeights p) -> OffsetInd3D { - return {localmesh->xstart - p.i, localmesh->ystart - p.j, - localmesh->LocalNz - p.k < p.k ? p.k - localmesh->LocalNz - : p.k}; - }); - - OffsetInd3D zero; + std::transform( + positions_weights.begin(), positions_weights.end(), + std::back_inserter(interpPattern), + [localmesh](ParallelTransform::PositionsAndWeights position) -> OffsetInd3D { + return {localmesh->xstart - position.i, localmesh->ystart - position.j, + ((localmesh->LocalNz - position.k) < position.k) + ? position.k - localmesh->LocalNz + : position.k}; + }); + + const OffsetInd3D zero; // Add interior cells - const std::vector interpolatedUpElements = {zero.yp(), zero.xp().yp(), - zero.xm().yp(), zero.yp().zp(), - zero.yp().zm()}, - interpolatedDownElements = { - zero.ym(), zero.xp().ym(), zero.xm().ym(), - zero.ym().zp(), zero.ym().zm()}; - std::set interiorStencil = {zero, zero.xp(), - zero.xm(), zero.zp(), - zero.zm(), zero.xp().zp(), - zero.xp().zm(), zero.xm().zp(), - zero.xm().zm()}, - lowerEdgeStencil = interiorStencil, - upperEdgeStencil = interiorStencil; + const std::vector interpolatedUpElements = { + zero.yp(), zero.xp().yp(), zero.xm().yp(), zero.yp().zp(), zero.yp().zm()}; + const std::vector interpolatedDownElements = { + zero.ym(), zero.xp().ym(), zero.xm().ym(), zero.ym().zp(), zero.ym().zm()}; + std::set interiorStencil = { + zero, zero.xp(), zero.xm(), zero.zp(), zero.zm(), + zero.xp().zp(), zero.xp().zm(), zero.xm().zp(), zero.xm().zm()}; + std::set lowerEdgeStencil = interiorStencil; + std::set upperEdgeStencil = interiorStencil; for (const auto& i : interpolatedDownElements) { for (auto& j : interpPattern) { diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.hxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.hxx index 60d767aa24..99a04bd2dd 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.hxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.hxx @@ -216,7 +216,7 @@ private: IndexerPtr indexer; PetscMatrix operator3D; - KSP ksp; + KSP ksp = nullptr; bool kspInitialised = false; PetscLib lib; From 5c201339f38f4d140b459be14a59f3619e51e307 Mon Sep 17 00:00:00 2001 From: ZedThree Date: Fri, 13 Oct 2023 08:46:28 +0000 Subject: [PATCH 51/69] Apply clang-format changes --- include/bout/petsc_interface.hxx | 4 ++-- src/invert/laplace/impls/petsc3damg/petsc3damg.cxx | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 3d3035f577..450cf456f9 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -273,8 +273,8 @@ public: /// Move constrcutor PetscMatrix(PetscMatrix&& mat) noexcept - : matrix(std::move(mat.matrix)), indexConverter(std::move(mat.indexConverter)), pt(mat.pt), - yoffset(mat.yoffset), initialised(mat.initialised) { + : matrix(std::move(mat.matrix)), indexConverter(std::move(mat.indexConverter)), + pt(mat.pt), yoffset(mat.yoffset), initialised(mat.initialised) { mat.initialised = false; } diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx index 6ec5c21c22..d1e2207725 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx @@ -228,7 +228,9 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { BOUT_FOR(i, indexer->getRegionLowerY()) { solution.ydown(boundary)[i.ym(boundary)] = solution[i]; } - BOUT_FOR(i, indexer->getRegionUpperY()) { solution.yup(boundary)[i.yp(boundary)] = solution[i]; } + BOUT_FOR(i, indexer->getRegionUpperY()) { + solution.yup(boundary)[i.yp(boundary)] = solution[i]; + } } } @@ -238,8 +240,9 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { // (in the first boundary cell) so one boundary cell is already set BOUT_FOR(i, indexer->getRegionInnerX()) { for (int boundary = 1; boundary < localmesh->xstart; boundary++) { - solution[i.xm(boundary)] = - 3. * solution[i.xm(boundary - 1)] - 3. * solution[i.xm(boundary - 2)] + solution[i.xm(boundary - 3)]; + solution[i.xm(boundary)] = 3. * solution[i.xm(boundary - 1)] + - 3. * solution[i.xm(boundary - 2)] + + solution[i.xm(boundary - 3)]; } } @@ -248,8 +251,9 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { // (in the first boundary cell) so one boundary cell is already set BOUT_FOR(i, indexer->getRegionOuterX()) { for (int boundary = 1; boundary < localmesh->xstart; boundary++) { - solution[i.xp(boundary)] = - 3. * solution[i.xp(boundary - 1)] - 3. * solution[i.xp(boundary - 2)] + solution[i.xp(boundary - 3)]; + solution[i.xp(boundary)] = 3. * solution[i.xp(boundary - 1)] + - 3. * solution[i.xp(boundary - 2)] + + solution[i.xp(boundary - 3)]; } } From 8e3f75b9b35f998c58e0e5b65737126a6054736e Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 13 Oct 2023 10:21:09 +0100 Subject: [PATCH 52/69] Don't include headers for petsc interface if we're not building it --- include/bout/petsc_interface.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 450cf456f9..0698b2ec11 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -32,6 +32,8 @@ #include "bout/build_config.hxx" +#if BOUT_HAS_PETSC + #include #include #include @@ -50,8 +52,6 @@ #include #include -#if BOUT_HAS_PETSC - /*! * A class which wraps PETSc vector objects, allowing them to be * indexed using the BOUT++ scheme. Note that boundaries are only From 694c245be5474fc65448369ed8896092d79ca218 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 13 Oct 2023 10:22:38 +0100 Subject: [PATCH 53/69] Increase MG levels for Petsc3DAMG test Change in PETSc 3.20 default options caused diverged dtol, this counteracts that. Fixes #2755 --- .../test-laplace-petsc3d/data_circular_core-sol/BOUT.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integrated/test-laplace-petsc3d/data_circular_core-sol/BOUT.inp b/tests/integrated/test-laplace-petsc3d/data_circular_core-sol/BOUT.inp index d69cb51166..da1918dcc7 100644 --- a/tests/integrated/test-laplace-petsc3d/data_circular_core-sol/BOUT.inp +++ b/tests/integrated/test-laplace-petsc3d/data_circular_core-sol/BOUT.inp @@ -77,7 +77,7 @@ rtol = 1e-10 atol = 1e-13 [laplace:petsc] -mg_levels_ksp_max_it = 3 +mg_levels_ksp_max_it = 5 [input] transform_from_field_aligned = false From f4b96e1378aab3cff0fae19ad3ba9dc168ef1140 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:34:40 +0000 Subject: [PATCH 54/69] Bump actions/setup-python from 1 to 4 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 1 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v1...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/python-package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b6b01bf77c..8057b094f8 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 submodules: true - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 - name: Install dependencies run: python -m pip install --upgrade pip && pip install --upgrade build && @@ -62,7 +62,7 @@ jobs: fetch-depth: 0 submodules: true - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 - name: Install dependencies run: python -m pip install --upgrade pip && pip install --upgrade build && @@ -111,7 +111,7 @@ jobs: fetch-depth: 0 submodules: true - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 - name: Install dependencies run: python -m pip install --upgrade pip && pip install --upgrade build && From b3f797b8cd271279c8978f7d578e62e012b10b90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:34:48 +0000 Subject: [PATCH 55/69] Bump stefanzweifel/git-auto-commit-action from 4 to 5 Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4...v5) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/black-fix.yml | 2 +- .github/workflows/clang-format.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/black-fix.yml b/.github/workflows/black-fix.yml index 4cbd3d7f5d..92866dfcc2 100644 --- a/.github/workflows/black-fix.yml +++ b/.github/workflows/black-fix.yml @@ -41,6 +41,6 @@ jobs: ls $HOME/.local/bin/black tests/ tools/ $(grep -EIlr '^#!.*python.*$' bin/ tests/ tools/ src/ | grep -v _boutpp_build) - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Apply black changes" diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index fce127e262..87f1947802 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -25,6 +25,6 @@ jobs: run: git clang-format origin/${{ github.base_ref }} - name: Commit to the PR branch - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Apply clang-format changes" From 25edf8832d098ff30870e7471c12735106eef107 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:34:53 +0000 Subject: [PATCH 56/69] Bump ZedThree/clang-tidy-review from 0.13.1 to 0.14.0 Bumps [ZedThree/clang-tidy-review](https://github.com/zedthree/clang-tidy-review) from 0.13.1 to 0.14.0. - [Release notes](https://github.com/zedthree/clang-tidy-review/releases) - [Changelog](https://github.com/ZedThree/clang-tidy-review/blob/master/CHANGELOG.md) - [Commits](https://github.com/zedthree/clang-tidy-review/compare/v0.13.1...v0.14.0) --- updated-dependencies: - dependency-name: ZedThree/clang-tidy-review dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/clang-tidy-review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-tidy-review.yml b/.github/workflows/clang-tidy-review.yml index 8ab3e2f68d..d546ce3af2 100644 --- a/.github/workflows/clang-tidy-review.yml +++ b/.github/workflows/clang-tidy-review.yml @@ -22,7 +22,7 @@ jobs: submodules: true - name: Run clang-tidy - uses: ZedThree/clang-tidy-review@v0.13.1 + uses: ZedThree/clang-tidy-review@v0.14.0 id: review with: build_dir: build @@ -46,4 +46,4 @@ jobs: -DBOUT_UPDATE_GIT_SUBMODULE=OFF - name: Upload clang-tidy fixes - uses: ZedThree/clang-tidy-review/upload@v0.13.1 + uses: ZedThree/clang-tidy-review/upload@v0.14.0 From 1265537ebe58155bddcabb0bfe43c34e7ad5657b Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 17 Oct 2023 10:16:10 +0200 Subject: [PATCH 57/69] [RTD] add os too read the docs config Seems to be required now --- .readthedocs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 9c06fca07a..ab73ba2a6b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -21,6 +21,7 @@ python: build: + os: ubuntu-22.04 apt_packages: - mpich - libmpich-dev From c50e07c9d980a2c3fff1edca852f82d25f9d75b2 Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 17 Oct 2023 10:19:09 +0200 Subject: [PATCH 58/69] [RTD] specify tool --- .readthedocs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ab73ba2a6b..5df6e844bf 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -15,13 +15,14 @@ sphinx: # Optionally set the version of Python and requirements required to build your docs python: - version: 3.8 install: - requirements: manual/sphinx/requirements.txt build: os: ubuntu-22.04 + tools: + python: "3.8" apt_packages: - mpich - libmpich-dev From dd1804922264a1851acfddfd3ba8503d197f0590 Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 17 Oct 2023 11:53:41 +0200 Subject: [PATCH 59/69] CI: user master branch for OCI workflow --- .github/workflows/docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2b2e092a61..a1dac41a6b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -55,7 +55,7 @@ jobs: uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + uses: docker/login-action@master with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -63,14 +63,14 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@879dcbb708d40f8b8679d4f7941b938a086e23a7 + uses: docker/metadata-action@master with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} flavor: | prefix=${{ matrix.mpi }}-${{matrix.metric3d.tag_prefix}}${{ matrix.config.tag_postfix }}- - name: Build and push Docker image - uses: docker/build-push-action@0f847266c302569530c95bfa228489494c43b002 + uses: docker/build-push-action@master with: build-args: | BASE=${{ matrix.mpi }}-${{ matrix.metric3d.base_prefix }}${{ matrix.config.base_postfix }}-main From dd5fd15da7c6026a38880415b24e031645e1063e Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 17 Oct 2023 13:59:06 +0200 Subject: [PATCH 60/69] Fix test-laplace-petsc3d --- .../test-laplace-petsc3d/data_circular_core-sol/BOUT.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integrated/test-laplace-petsc3d/data_circular_core-sol/BOUT.inp b/tests/integrated/test-laplace-petsc3d/data_circular_core-sol/BOUT.inp index d69cb51166..da1918dcc7 100644 --- a/tests/integrated/test-laplace-petsc3d/data_circular_core-sol/BOUT.inp +++ b/tests/integrated/test-laplace-petsc3d/data_circular_core-sol/BOUT.inp @@ -77,7 +77,7 @@ rtol = 1e-10 atol = 1e-13 [laplace:petsc] -mg_levels_ksp_max_it = 3 +mg_levels_ksp_max_it = 5 [input] transform_from_field_aligned = false From b81b75e594978523ec1169db357b56f6db4a194a Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 10 Oct 2023 17:38:18 +0200 Subject: [PATCH 61/69] CI: Run on PETSc developement branch --- .build_petsc_for_ci.sh | 2 +- .github/workflows/tests.yml | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.build_petsc_for_ci.sh b/.build_petsc_for_ci.sh index ce69944c9c..49ec3d97c8 100755 --- a/.build_petsc_for_ci.sh +++ b/.build_petsc_for_ci.sh @@ -8,7 +8,7 @@ if test $BUILD_PETSC ; then echo "Building PETSc" echo "****************************************" - git clone -b release https://gitlab.com/petsc/petsc.git petsc --depth=1 + git clone -b ${1:-release} https://gitlab.com/petsc/petsc.git petsc --depth=1 unset PETSC_DIR unset PETSC_ARCH diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e3b94d0cd8..9bc815644d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,5 +1,9 @@ name: Tests -on: [push, pull_request] +on: + push: + pull_request: + schedule: + - cron: '30 6 * * *' defaults: run: @@ -30,10 +34,29 @@ jobs: # Need this to be able to exclude the coverage job is_master_or_next: - ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next' || github.base_ref == 'master' || github.base_ref == 'next' }} + is_cron: + - ${{ github.event_name == 'cron' }} config: + - name: "CMake, PETSc unreleased" + os: ubuntu-20.04 + cmake_options: "-DBUILD_SHARED_LIBS=ON + -DBOUT_ENABLE_METRIC_3D=ON + -DBOUT_ENABLE_OPENMP=ON + -DBOUT_USE_PETSC=ON + -DBOUT_USE_SLEPC=ON + -DBOUT_USE_SUNDIALS=ON + -DBOUT_ENABLE_PYTHON=ON + -DSUNDIALS_ROOT=/home/runner/local + -DPETSC_DIR=/home/runner/local/petsc + -DSLEPC_DIR=/home/runner/local/slepc" + build_petsc: -petsc-main + build_petsc_branch: main + on_cron: true + - name: "Default options, Ubuntu 20.04" os: ubuntu-20.04 cmake_options: "" + on_cron: false - name: "Optimised, static" os: ubuntu-20.04 @@ -47,6 +70,7 @@ jobs: -DBOUT_USE_SLEPC=ON -DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=/home/runner/local" + on_cron: false - name: "Debug, shared" os: ubuntu-20.04 @@ -58,6 +82,7 @@ jobs: -DBOUT_USE_SLEPC=ON -DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=/home/runner/local" + on_cron: false - name: "Shared, release, Ubuntu 20.04" os: ubuntu-20.04 @@ -70,6 +95,7 @@ jobs: -DBOUT_BUILD_DOCS=OFF -DSUNDIALS_ROOT=/home/runner/local" omp_num_threads: 2 + on_cron: false - name: "Shared, OpenMP, 3D metrics" os: ubuntu-latest @@ -82,6 +108,7 @@ jobs: -DBOUT_ENABLE_PYTHON=ON -DSUNDIALS_ROOT=/home/runner/local" omp_num_threads: 2 + on_cron: false - name: "CMake, new PETSc" os: ubuntu-20.04 @@ -95,8 +122,8 @@ jobs: -DSUNDIALS_ROOT=/home/runner/local -DPETSC_DIR=/home/runner/local/petsc -DSLEPC_DIR=/home/runner/local/slepc" - build_petsc: -petsc + on_cron: false - name: "Coverage" os: ubuntu-20.04 @@ -111,11 +138,15 @@ jobs: -DBOUT_ENABLE_PYTHON=ON -DSUNDIALS_ROOT=/home/runner/local" unit_only: YES + on_cron: false exclude: # Don't run the coverage tests if the branch isn't master or next - is_master_or_next: false config: name: "Coverage" + - is_cron: true + config: + on_cron: false steps: - name: Job information @@ -163,7 +194,7 @@ jobs: run: ./.build_sundials_for_ci.sh - name: Build PETSc - run: BUILD_PETSC=${{ matrix.config.build_petsc }} ./.build_petsc_for_ci.sh + run: BUILD_PETSC=${{ matrix.config.build_petsc }} ./.build_petsc_for_ci.sh ${{ matrix.config.build_petsc_branch }} - name: Build BOUT++ run: UNIT_ONLY=${{ matrix.config.unit_only }} ./.ci_with_cmake.sh ${{ matrix.config.cmake_options }} From 541c6b280a9999a686f5794317f39b7165f9f605 Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 11 Oct 2023 10:49:49 +0200 Subject: [PATCH 62/69] CI: Also build slepc from devel branch --- .build_petsc_for_ci.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.build_petsc_for_ci.sh b/.build_petsc_for_ci.sh index 49ec3d97c8..481bb79e14 100755 --- a/.build_petsc_for_ci.sh +++ b/.build_petsc_for_ci.sh @@ -3,12 +3,13 @@ set -e if test $BUILD_PETSC ; then - if [[ ! -d $HOME/local/petsc/include/petsc ]]; then + if [[ ! -d $HOME/local/petsc/include/petsc ]] || test $1 ; then echo "****************************************" echo "Building PETSc" echo "****************************************" - git clone -b ${1:-release} https://gitlab.com/petsc/petsc.git petsc --depth=1 + branch=${1:-release} + git clone -b $branch https://gitlab.com/petsc/petsc.git petsc --depth=1 unset PETSC_DIR unset PETSC_ARCH @@ -34,7 +35,7 @@ if test $BUILD_PETSC ; then echo "Building SLEPc" echo "****************************************" - git clone -b release https://gitlab.com/slepc/slepc.git slepc --depth=1 + git clone -b $branch https://gitlab.com/slepc/slepc.git slepc --depth=1 pushd slepc unset SLEPC_DIR From d8db52ef0e84ca71ce2b488369eb8dc3ee6d8d15 Mon Sep 17 00:00:00 2001 From: David Bold Date: Mon, 16 Oct 2023 16:47:00 +0200 Subject: [PATCH 63/69] Increase shm size in container It seems new libfabric requires more memory. This should resolve the issue. --- .ci_fedora.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci_fedora.sh b/.ci_fedora.sh index 5b62228092..0774000b9c 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -24,6 +24,7 @@ then test . != ".$3" && version="$3" || version=rawhide time $cmd pull registry.fedoraproject.org/fedora:$version time $cmd create --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \ + --shm-size 256M \ --name mobydick registry.fedoraproject.org/fedora:$version \ /tmp/BOUT-dev/.ci_fedora.sh $mpi time $cmd cp ${TRAVIS_BUILD_DIR:-$(pwd)} mobydick:/tmp/BOUT-dev From 6c134125d1c1150a79c41af597263e89a1be7b1e Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 17 Oct 2023 16:54:25 +0200 Subject: [PATCH 64/69] CI: run only once per week --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9bc815644d..c7077d880c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,8 @@ on: push: pull_request: schedule: - - cron: '30 6 * * *' + # run sunday moring + - cron: '30 6 * * 0' defaults: run: From 536b9702129a1614ecb3dcc2118011b5573b1d4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:47:26 +0000 Subject: [PATCH 65/69] Bump externalpackages/mpark.variant from `3c7fc82` to `23cb94f` Bumps [externalpackages/mpark.variant](https://github.com/mpark/variant) from `3c7fc82` to `23cb94f`. - [Release notes](https://github.com/mpark/variant/releases) - [Commits](https://github.com/mpark/variant/compare/3c7fc8266bb46046b42c2dc2663f9f505f0cec28...23cb94f027d4ef33bf48133acc2695c7e5c6f1e7) --- updated-dependencies: - dependency-name: externalpackages/mpark.variant dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- externalpackages/mpark.variant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externalpackages/mpark.variant b/externalpackages/mpark.variant index 3c7fc8266b..23cb94f027 160000 --- a/externalpackages/mpark.variant +++ b/externalpackages/mpark.variant @@ -1 +1 @@ -Subproject commit 3c7fc8266bb46046b42c2dc2663f9f505f0cec28 +Subproject commit 23cb94f027d4ef33bf48133acc2695c7e5c6f1e7 From 939b239cc3c13485ffaaa992a41b0179ac5e279e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:48:10 +0000 Subject: [PATCH 66/69] Bump externalpackages/fmt from `f0903ad` to `2ac6c5c` Bumps [externalpackages/fmt](https://github.com/fmtlib/fmt) from `f0903ad` to `2ac6c5c`. - [Release notes](https://github.com/fmtlib/fmt/releases) - [Commits](https://github.com/fmtlib/fmt/compare/f0903ad9df429f3a610da45de5161c076cf2d268...2ac6c5ca8b3dfbcb1cc5cf49a8cc121e3984559c) --- updated-dependencies: - dependency-name: externalpackages/fmt dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- externalpackages/fmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externalpackages/fmt b/externalpackages/fmt index f0903ad9df..2ac6c5ca8b 160000 --- a/externalpackages/fmt +++ b/externalpackages/fmt @@ -1 +1 @@ -Subproject commit f0903ad9df429f3a610da45de5161c076cf2d268 +Subproject commit 2ac6c5ca8b3dfbcb1cc5cf49a8cc121e3984559c From 2b9d53ce3be0c6e705aae3b9d9311b59294ab8d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 19:52:02 +0000 Subject: [PATCH 67/69] Bump externalpackages/googletest from `2dd1c13` to `829c199` Bumps [externalpackages/googletest](https://github.com/google/googletest) from `2dd1c13` to `829c199`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/2dd1c131950043a8ad5ab0d2dda0e0970596586a...829c19901dac454ced475fec6a11e8e1b8a61549) --- updated-dependencies: - dependency-name: externalpackages/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- externalpackages/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externalpackages/googletest b/externalpackages/googletest index 2dd1c13195..829c19901d 160000 --- a/externalpackages/googletest +++ b/externalpackages/googletest @@ -1 +1 @@ -Subproject commit 2dd1c131950043a8ad5ab0d2dda0e0970596586a +Subproject commit 829c19901dac454ced475fec6a11e8e1b8a61549 From 62938fe27800bfcad0503c95b2492db908d55e2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:00:35 +0000 Subject: [PATCH 68/69] Bump externalpackages/boutdata from `ab59ef9` to `908a4c2` Bumps [externalpackages/boutdata](https://github.com/boutproject/boutdata) from `ab59ef9` to `908a4c2`. - [Release notes](https://github.com/boutproject/boutdata/releases) - [Commits](https://github.com/boutproject/boutdata/compare/ab59ef913884918a5bc5ee84101e6d6b833dcd6c...908a4c2a80a07d887f78667bb574f9c072c3c2fd) --- updated-dependencies: - dependency-name: externalpackages/boutdata dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- externalpackages/boutdata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externalpackages/boutdata b/externalpackages/boutdata index ab59ef9138..908a4c2a80 160000 --- a/externalpackages/boutdata +++ b/externalpackages/boutdata @@ -1 +1 @@ -Subproject commit ab59ef913884918a5bc5ee84101e6d6b833dcd6c +Subproject commit 908a4c2a80a07d887f78667bb574f9c072c3c2fd From 675ae7a2697e29fb71c9a1d2820445cd890aef69 Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 18 Oct 2023 10:46:31 +0200 Subject: [PATCH 69/69] Use latest python in CI --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c7077d880c..6aaedb5804 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -179,6 +179,10 @@ jobs: with: submodules: true + - uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install pip packages run: | ./.pip_install_for_ci.sh 'cython~=0.29' 'netcdf4~=1.5' 'sympy~=1.5' 'gcovr' 'cmake' zoidberg fastcov