|
[Rivet-svn] rivet: require hepmc >= 2.06.09Rivet Mercurial rivet at projects.hepforge.orgFri Oct 27 14:15:02 BST 2017
details: https://rivet.hepforge.org/hg/rivet/rev/334bc7a119fa branches: multiweight changeset: 6118:334bc7a119fa user: Chris Pollard <cspollard at gmail.com> date: Fri Oct 27 15:13:12 2017 +0200 description: require hepmc >= 2.06.09 diffs (truncated from 200 to 50 lines): --- a/configure.ac Fri Oct 27 14:38:28 2017 +0200 +++ b/configure.ac Fri Oct 27 15:13:12 2017 +0200 @@ -95,12 +95,15 @@ fi if test -f conftest.cc; then $CXX $CPPFLAGS conftest.cc -o conftest 2>&1 1>&5 -elif test -f conftest.C; then - $CXX $CPPFLAGS conftest.C -o conftest 2>&1 1>&5 else $CXX $CPPFLAGS conftest.cpp -o conftest 2>&1 1>&5 fi hepmc_version=`./conftest` +AC_MSG_CHECKING([HepMC version]) +AX_COMPARE_VERSION([$hepmc_version], [lt], [2.06.09], + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Need HepMC 2.06.09 or later]), + AC_MSG_RESULT([ok])) if test x$hepmc_version != x; then let hepmc_major=`echo "$hepmc_version" | cut -d. -f1` let hepmc_minor=`echo "$hepmc_version" | cut -d. -f2` --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/ax_compare_version.m4 Fri Oct 27 15:13:12 2017 +0200 @@ -0,0 +1,177 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# +# DESCRIPTION +# +# This macro compares two version strings. Due to the various number of +# minor-version numbers that can exist, and the fact that string +# comparisons are not compatible with numeric comparisons, this is not +# necessarily trivial to do in a autoconf script. This macro makes doing +# these comparisons easy. +# +# The six basic comparisons are available, as well as checking equality +# limited to a certain number of minor-version levels. +# +# The operator OP determines what type of comparison to do, and can be one +# of: +# +# eq - equal (test A == B) +# ne - not equal (test A != B) +# le - less than or equal (test A <= B) +# ge - greater than or equal (test A >= B) +# lt - less than (test A < B)
More information about the Rivet-svn mailing list |