Skip to content

Commit

Permalink
Add support for HDF5 1.10.4
Browse files Browse the repository at this point in the history
- Reason: homebrew already supports it
- Used old 1.10.3 interface
- Let's see what travis spits out ;)
  • Loading branch information
mannau committed Oct 20, 2018
1 parent 27421d3 commit ea38e88
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 13 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -23,6 +23,7 @@ env:
- HDF5_VERSION=1.10.1
- HDF5_VERSION=1.10.2
- HDF5_VERSION=1.10.3
- HDF5_VERSION=1.10.4

matrix:
exclude:
Expand Down
50 changes: 37 additions & 13 deletions configure
Expand Up @@ -673,7 +673,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -745,7 +744,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -998,15 +996,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;

-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;

-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1144,7 +1133,7 @@ fi
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 runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1297,7 +1286,6 @@ Fine tuning of the installation directories:
--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]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -4209,6 +4197,42 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version
HDF5_VERSION_USE="1_10_3"
fi
# Used to indicate true or false condition
ax_compare_version=false
# Convert the two version strings to be compared into a format that
# allows a simple string comparison. The end result is that a version
# string of the form 1.12.5-r617 will be converted to the form
# 0001001200050617. In other words, each number is zero padded to four
# digits, and non digits are removed.
ax_compare_version_A=`echo "$HDF5_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
-e 's/Z\([0-9]\)Z/Z0\1Z/g' \
-e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
-e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
-e 's/[^0-9]//g'`
ax_compare_version_B=`echo "1.10.4" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
-e 's/Z\([0-9]\)Z/Z0\1Z/g' \
-e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
-e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
-e 's/[^0-9]//g'`
ax_compare_version=`echo "x$ax_compare_version_A
x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
if test "$ax_compare_version" = "true" ; then
HDF5_VERSION_USE="1_10_3"
fi
fi
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Expand Up @@ -57,6 +57,12 @@ if test "$hdf5_version_sufficient" = "yes"; then
[ge],
[1.10.3],
[HDF5_VERSION_USE="1_10_3"])

AX_COMPARE_VERSION(
[$HDF5_VERSION],
[ge],
[1.10.4],
[HDF5_VERSION_USE="1_10_3"])
fi

AC_SUBST(HDF5_VERSION_USE)
Expand Down

0 comments on commit ea38e88

Please sign in to comment.