summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-11-05 21:36:09 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-11-05 21:36:09 (GMT)
commit2dd5bbfe167e3e9b6b6ee657a882e24072de4aeb (patch)
treeb4605ad55c3c2b82218a915fc2322d0f75a4f880 /config
parentafd4b291315e39e3966eadaf8ae9894b30e9504e (diff)
parent0b721858e46a317c370a24115032d5be41688f67 (diff)
downloadhdf5-2dd5bbfe167e3e9b6b6ee657a882e24072de4aeb.zip
hdf5-2dd5bbfe167e3e9b6b6ee657a882e24072de4aeb.tar.gz
hdf5-2dd5bbfe167e3e9b6b6ee657a882e24072de4aeb.tar.bz2
Merge pull request #1984 in HDFFV/hdf5 from ~DYOUNG/netbsd:develop to develop
* commit '0b721858e46a317c370a24115032d5be41688f67': Make these scripts relocatable again: derive a relative path for the original installation prefix from the examples prefix. Use that relative path to locate the current installation prefix, always. Fall back to an absolute installation prefix if the relative path cannot be derived. Get the path to prefix right: needs a ../ to back out of subdirectory c/. Make this script relocatable again: derive a relative path for the original installation prefix from the examples prefix. Use that relative path to locate the current installation prefix, always. Fall back to an absolute installation prefix if the relative path cannot be derived. Let us override the examples directory using --with-examplesdir=DIR. This is handy for NetBSD where HDF5 examples are installed by convention in $prefix/share/examples/hdf5/ rather than in ${prefix}/share/hdf5_examples/, which is the HDF5 default. Follow longstanding execv convention for compatibility with NetBSD. Under the examples directories, always find the installed HDF5 executables and scripts using @prefix@ instead of a relative path, because the number of ../ in the relative path will be different on NetBSD than on other systems. Make the HDF5 configure script grok NetBSD. For portability, insulate the HDF5 library from some system macros. Not every system has perl installed in /usr/bin/, so change the shebang (#!) line to `/usr/bin/env perl` to locate perl on the PATH. For portability, use the POSIX sh(1) string-comparison operator `=` instead of `==`.
Diffstat (limited to 'config')
-rw-r--r--config/netbsd56
1 files changed, 56 insertions, 0 deletions
diff --git a/config/netbsd b/config/netbsd
new file mode 100644
index 0000000..9a9348b
--- /dev/null
+++ b/config/netbsd
@@ -0,0 +1,56 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+
+# This file is part of the HDF5 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compile modes.
+#
+# See BlankForm in this directory for details.
+
+# The default compiler is `gcc'
+if test "X-" = "X-$CC"; then
+ CC=gcc
+ CC_BASENAME=gcc
+fi
+
+# Figure out C compiler flags
+. $srcdir/config/gnu-flags
+
+# Figure out Intel C compiler flags
+. $srcdir/config/intel-flags
+
+# The default Fortran 90 compiler
+if test "X-" = "X-$FC"; then
+ case $CC_BASENAME in
+ gcc*|pgcc*)
+ FC=gfortran
+ FC_BASENAME=gfortran
+ ;;
+ icc*)
+ FC=ifort
+ FC_BASENAME=ifort
+ ;;
+ mpicc*)
+ FC=mpif90
+ FC_BASENAME=mpif90
+ ;;
+ esac
+fi
+
+# Figure out FORTRAN compiler flags
+. $srcdir/config/gnu-fflags
+
+# Figure out Intel F90 compiler flags
+. $srcdir/config/intel-fflags
+