diff options
Diffstat (limited to 'c++')
-rw-r--r-- | c++/Makefile.in | 20 | ||||
-rw-r--r-- | c++/examples/Makefile.am | 3 | ||||
-rw-r--r-- | c++/examples/Makefile.in | 23 | ||||
-rwxr-xr-x | c++/examples/run-c++-ex.sh.in | 3 | ||||
-rw-r--r-- | c++/src/Makefile.in | 20 | ||||
-rwxr-xr-x | c++/src/h5c++.in | 64 | ||||
-rw-r--r-- | c++/test/Makefile.in | 20 |
7 files changed, 123 insertions, 30 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..30326d2 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. 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/Makefile.in b/c++/src/Makefile.in index eadd598..7c0f6aa 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 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 |