summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-10-08 01:55:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-10-08 01:55:21 (GMT)
commit3c470c9db63424d8a07c1fb789ee8e8c513dd2a6 (patch)
tree8ce7ec40f5c5e04898281cefa0f72c3e91cf9d66 /fortran
parent6747ebd9858374ae912b6182024861b1710518c8 (diff)
downloadhdf5-3c470c9db63424d8a07c1fb789ee8e8c513dd2a6.zip
hdf5-3c470c9db63424d8a07c1fb789ee8e8c513dd2a6.tar.gz
hdf5-3c470c9db63424d8a07c1fb789ee8e8c513dd2a6.tar.bz2
[svn-r19543] Description:
Bring r19411:19542 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.4 (amazon) in debug mode Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'fortran')
-rw-r--r--fortran/Makefile.in20
-rw-r--r--fortran/examples/CMakeLists.txt8
-rw-r--r--fortran/examples/Makefile.am3
-rw-r--r--fortran/examples/Makefile.in26
-rwxr-xr-xfortran/examples/run-fortran-ex.sh.in3
-rw-r--r--fortran/src/CMakeLists.txt54
-rw-r--r--fortran/src/Makefile.in22
-rwxr-xr-xfortran/src/h5fc.in64
-rw-r--r--fortran/test/CMakeLists.txt36
-rw-r--r--fortran/test/Makefile.in20
-rw-r--r--fortran/testpar/CMakeLists.txt8
-rw-r--r--fortran/testpar/Makefile.in20
12 files changed, 187 insertions, 97 deletions
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 715dbab..4e7f208 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -352,14 +352,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 04e6303..6fe6cc7 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -39,12 +39,12 @@ FOREACH (example ${examples})
ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
H5_NAMING (f90_ex_${example})
TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example})
- IF (WIN32)
+ IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f90_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- ENDIF (WIN32)
+ ENDIF (WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -56,12 +56,12 @@ IF (H5_HAVE_PARALLEL)
ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
H5_NAMING (f90_ex_ph5example)
TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example)
- IF (WIN32)
+ IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f90_ex_ph5example
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- ENDIF (WIN32)
+ ENDIF (WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index f27f7ff..57a8f94 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -65,7 +65,8 @@ $(EXTRA_PROG): $(H5FC)
endif
# Tell automake how to install examples
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/fortran
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
# List dependencies for each example. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 1862e2f..5d76c0b 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -315,14 +315,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -360,7 +370,8 @@ INSTALL_SCRIPT_FILES = run-fortran-ex.sh
FORTRAN_API = yes
# Tell automake how to install examples
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/fortran
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -645,7 +656,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in
index 1564537..b29eaaf 100755
--- a/fortran/examples/run-fortran-ex.sh.in
+++ b/fortran/examples/run-fortran-ex.sh.in
@@ -33,7 +33,8 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-prefix="${prefix:-${DESTDIR}/@prefix@}"
+# Note: no '/' after DESTDIR. Explanation in commence.am
+prefix="${prefix:-${DESTDIR}@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index c2ca1e6..2af57c1 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -25,20 +25,18 @@ ELSE (FORTRAN_HAVE_SIZEOF)
${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90
)
ENDIF (FORTRAN_HAVE_SIZEOF)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (H5test_FortranHavekind
- PROPERTIES
- COMPILE_FLAGS "/MT"
- )
- ENDIF (BUILD_SHARED_LIBS)
+IF (WIN32 AND MSVC)
+ IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5test_FortranHavekind
PROPERTIES
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ COMPILE_FLAGS "/MT"
)
- ENDIF (MSVC)
-ENDIF (WIN32)
+ ENDIF (BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (H5test_FortranHavekind
+ PROPERTIES
+ LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ )
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5test_FortranHavekind${EXE_EXT})
@@ -53,20 +51,18 @@ ADD_CUSTOM_COMMAND (
ADD_EXECUTABLE (H5fortran_detect
${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (H5fortran_detect
- PROPERTIES
- COMPILE_FLAGS "/MT"
- )
- ENDIF (BUILD_SHARED_LIBS)
+IF (WIN32 AND MSVC)
+ IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5fortran_detect
PROPERTIES
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ COMPILE_FLAGS "/MT"
)
- ENDIF (MSVC)
-ENDIF (WIN32)
+ ENDIF (BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (H5fortran_detect
+ PROPERTIES
+ LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ )
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5fortran_detect${EXE_EXT})
@@ -188,7 +184,7 @@ ENDIF (H5_HAVE_PARALLEL)
# Add Main fortran library
#-----------------------------------------------------------------------------
ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS})
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
@@ -206,7 +202,7 @@ IF (WIN32)
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
@@ -223,7 +219,7 @@ INSTALL (
${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/H5fortran_types.f90
DESTINATION
- include/fortran
+ ${HDF5_INSTALL_INCLUDE_DIR}/fortran
COMPONENT
fortheaders
)
@@ -232,7 +228,7 @@ INSTALL (
DIRECTORY
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/
DESTINATION
- include/fortran
+ ${HDF5_INSTALL_INCLUDE_DIR}/fortran
COMPONENT
fortheaders
)
@@ -247,8 +243,8 @@ IF (HDF5_EXPORTED_TARGETS)
${HDF5_F90_LIB_TARGET}
EXPORT
${HDF5_EXPORTED_TARGETS}
- LIBRARY DESTINATION lib COMPONENT fortlibraries
- ARCHIVE DESTINATION lib COMPONENT fortlibraries
- RUNTIME DESTINATION bin COMPONENT fortlibraries
+ LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT fortlibraries
+ ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT fortlibraries
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT fortlibraries
)
ENDIF (HDF5_EXPORTED_TARGETS)
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index b240a7a..cbb002b 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -404,14 +404,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -426,7 +436,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 65
+LT_VERS_REVISION = 66
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index db44600..9e9409d 100755
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -32,6 +32,24 @@ HL="@HL@"
############################################################################
## ##
+## Things You Can Modify to Override HDF5 Library Build Components: ##
+## ##
+## (Advanced usage - know what you're doing - you're on your own here.) ##
+## The three variables below can be used to insert paths and flags in ##
+## FFLAGS, LDFLAGS, or LIBS in the h5fc compile line: ##
+## $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS ##
+## $fmodules $link_objs $link_args $shared_link ##
+## ##
+## These settings can be overriden by setting HDF5_FFLAGS, ##
+## HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
+## ##
+############################################################################
+FFLAGSBASE=""
+LDFLAGSBASE=""
+LIBSBASE=""
+
+############################################################################
+## ##
## You shouldn't have to modify anything below this line. ##
## ##
############################################################################
@@ -58,14 +76,27 @@ get_output_file="no"
SHOW="eval"
FCBASE="@FC@"
FLINKERBASE="@FC@"
-FFLAGS="@AM_FCFLAGS@ @FCFLAGS@"
+
+# FFLAGS and LDFLAGS are reserved for use by the script user.
+# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
+
+# User's FFLAGS come after their H5BLD counterparts to override
+# them. User's LDFLAGS come just before clibpath, user's LIBS come after
+# $link_objs and before the hdf5 libraries in $link_args, followed by any
+# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+# or LIBS carried in from the hdf5 build.
+
+H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@"
F9XMODFLAG="@F9XMODFLAG@"
F9XSUFFIXFLAG="@F9XSUFFIXFLAG@"
-LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
-LIBS="@LIBS@"
+H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
+H5BLD_LIBS="@LIBS@"
FC="${HDF5_FC:-$FCBASE}"
FLINKER="${HDF5_FLINKER:-$FLINKERBASE}"
+FFLAGS="${HDF5_FFLAGS:-$FFLAGSBASE}"
+LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
+LIBS="${HDF5_LIBS:-$LIBSBASE}"
USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
@@ -92,6 +123,20 @@ usage() {
echo " "
echo " HDF5_FC - use a different Fortran 90 or 95 compiler"
echo " HDF5_FLINKER - use a different linker"
+ echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library"
+ echo " [default: no]"
+ echo " "
+ echo " You can also add or change paths and flags to the compile line using"
+ echo " the following environment varibles or by assigning them to their counterparts"
+ echo " in the 'Things You Can Modify to Override...'" section of $prog_name
+ echo " "
+ echo " Variable Current value to be replaced"
+ echo " HDF5_FFLAGS \"$CFLAGSBASE\""
+ echo " HDF5_LDFLAGS \"$LDFLAGSBASE\""
+ echo " HDF5_LIBS \"$LIBSBASE\""
+ echo " "
+ echo " Note that adding library paths to HDF5_LDFLAGS where another hdf5 version"
+ echo " is located may link your program with that other hdf5 library version."
echo " "
exit $EXIT_FAILURE
}
@@ -228,7 +273,7 @@ if test "x$do_compile" = "xyes"; then
fi
- $SHOW $FC $FFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args
+ $SHOW $FC $H5BLD_FFLAGS $FFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args
status=$?
if test "$status" != "0"; then
@@ -297,9 +342,14 @@ if test "x$do_link" = "xyes"; then
# The LIBS are just a bunch of -l* libraries necessary for the HDF5
# module. It's okay if they're included twice in the compile line.
- link_args="$link_args $LIBS"
-
- $SHOW $FLINKER $FFLAGS $F9XSUFFIXFLAG $fmodules $link_objs $link_args $shared_link $LDFLAGS
+ link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
+
+ # User's FFLAGS come after their H5BLD counterparts to override
+ # them. User's LDFLAGS come just before clibpath, user's LIBS come after
+ # $link_objs and before the hdf5 libraries in $link_args, followed by any
+ # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+ # or LIBS carried in from the hdf5 build.
+ $SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 7c8c407..a536c2e 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -30,7 +30,7 @@ ADD_LIBRARY (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
ADD_DEPENDENCIES(${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_C_TEST_LIB_TARGET}
)
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
@@ -48,7 +48,7 @@ IF (WIN32)
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE})
@@ -81,11 +81,9 @@ TARGET_LINK_LIBRARIES (testhdf5_fortran
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (testhdf5_fortran "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (testhdf5_fortran "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
@@ -105,11 +103,9 @@ TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
@@ -123,11 +119,9 @@ TARGET_LINK_LIBRARIES (fflush1
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (fflush1 "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (fflush1 "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
@@ -141,11 +135,9 @@ TARGET_LINK_LIBRARIES (fflush2
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (fflush2 "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (fflush2 "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 7b8369b..4c0b03f 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -385,14 +385,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 7f702da..edabb35 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -28,11 +28,9 @@ TARGET_LINK_LIBRARIES (parallel_test
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (parallel_test "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (parallel_test "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index 7bef605..f2e70b4 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -338,14 +338,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to