summaryrefslogtreecommitdiffstats
path: root/c++
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 /c++
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 'c++')
-rw-r--r--c++/Makefile.in20
-rw-r--r--c++/examples/Makefile.am3
-rw-r--r--c++/examples/Makefile.in26
-rwxr-xr-xc++/examples/run-c++-ex.sh.in3
-rw-r--r--c++/src/CMakeLists.txt8
-rw-r--r--c++/src/Makefile.in22
-rwxr-xr-xc++/src/h5c++.in64
-rw-r--r--c++/test/Makefile.in20
8 files changed, 130 insertions, 36 deletions
diff --git a/c++/Makefile.in b/c++/Makefile.in
index c4af5a4..728a487 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -348,14 +348,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/c++/examples/Makefile.am b/c++/examples/Makefile.am
index 8a6a1d6..dc2bc7c 100644
--- a/c++/examples/Makefile.am
+++ b/c++/examples/Makefile.am
@@ -39,7 +39,8 @@ chunks.chkexe_: extend_ds.chkexe_
CXX_API=yes
# Where to install examples
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/c++
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
# How to build programs using h5c++
$(EXTRA_PROG): $(H5CPP)
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index 886a82a..6f56fde 100644
--- a/c++/examples/Makefile.in
+++ b/c++/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
@@ -349,7 +359,8 @@ INSTALL_SCRIPT_FILES = run-c++-ex.sh
CXX_API = yes
# Where to install examples
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/c++
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -617,7 +628,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/c++/examples/run-c++-ex.sh.in b/c++/examples/run-c++-ex.sh.in
index 79a4ccf..bd7106e 100755
--- a/c++/examples/run-c++-ex.sh.in
+++ b/c++/examples/run-c++-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@}"
AR="@AR@"
RANLIB="@RANLIB@"
H5TOOL="h5c++" # The tool name
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 4c6dd5f..ffc2da3 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -93,7 +93,7 @@ INSTALL (
FILES
${CPP_HDRS}
DESTINATION
- include/cpp
+ ${HDF5_INSTALL_INCLUDE_DIR}/cpp
COMPONENT
cppheaders
)
@@ -107,9 +107,9 @@ IF (HDF5_EXPORTED_TARGETS)
${HDF5_CPP_LIB_TARGET}
EXPORT
${HDF5_EXPORTED_TARGETS}
- LIBRARY DESTINATION lib COMPONENT cpplibraries
- ARCHIVE DESTINATION lib COMPONENT cpplibraries
- RUNTIME DESTINATION bin COMPONENT cpplibraries
+ LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
+ ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries
)
ENDIF (HDF5_EXPORTED_TARGETS)
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index eadd598..27505d5 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -370,14 +370,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
@@ -392,7 +402,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
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index 4e51c94..39d3d2a 100755
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -32,6 +32,25 @@ HL="@HL@"
############################################################################
## ##
+## Things You Can Modify to Override HDF5 Library Build Components: ##
+## ##
+## (Advanced usage - know what you're doing - you're on your own here.) ##
+## The four variables below can be used to insert paths and flags in ##
+## CPPFLAGS, CXXFLAGS, LDFLAGS, or LIBS in the h5cc compile line: ##
+## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS ##
+## $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link ##
+## ##
+## These settings can be overriden by setting HDF5_CXXFLAGS, ##
+## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
+## ##
+############################################################################
+CXXFLAGSBASE=""
+CPPFLAGSBASE=""
+LDFLAGSBASE=""
+LIBSBASE=""
+
+############################################################################
+## ##
## You shouldn't have to modify anything below this line. ##
## ##
############################################################################
@@ -60,13 +79,26 @@ get_output_file="no"
SHOW="eval"
CXXBASE="@CXX@"
CXXLINKERBASE="@CXX@"
-CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
-CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
-LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
-LIBS="@LIBS@"
+
+# CXXFLAGS, CPPFLAGS and LDFLAGS are reserved for use by the script user.
+# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
+
+# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts 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_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
+H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
+H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
+H5BLD_LIBS="@LIBS@"
CXX="${HDF5_CXX:-$CXXBASE}"
CXXLINKER="${HDF5_CLINKER:-$CXXLINKERBASE}"
+CXXFLAGS="${HDF5_CXXFLAGS:-$CXXFLAGSBASE}"
+CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}"
+LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
+LIBS="${HDF5_LIBS:-$LIBSBASE}"
USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
@@ -94,6 +126,18 @@ usage() {
echo " "
echo " HDF5_CXX - use a different C++ compiler"
echo " HDF5_CXXLINKER - use a different linker"
+ 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_CPPFLAGS \"$CPPFLAGSBASE\""
+ echo " HDF5_CXXFLAGS \"$CXXFLAGSBASE\""
+ echo " HDF5_LDFLAGS \"$LDFLAGSBASE\""
+ echo " HDF5_LIBS \"$LIBSBASE\""
+ echo " "
+ echo " Note that adding library paths to HDF5_LDFLAGS where another hdf5 version"
+ echo " is located may link your program with that other hdf5 library version."
echo " "
exit $EXIT_FAILURE
}
@@ -244,7 +288,7 @@ if test "x$do_compile" = "xyes"; then
compile_args="-c $compile_args"
fi
- $SHOW $CXX -I$includedir $CPPFLAGS $CXXFLAGS $compile_args
+ $SHOW $CXX -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $compile_args
status=$?
if test "$status" != "0"; then
@@ -319,9 +363,15 @@ 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"
+ link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
+
+ # User's CPPFLAGS and CXXFLAGS 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 $CXXLINKER $CPPFLAGS $CXXFLAGS $clibpath $link_objs $link_args $shared_link $LDFLAGS
+ $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index b41f44a..5a3f52c 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -337,14 +337,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