diff --git a/gstlal-burst/gnuscripts/ax_python_glue.m4 b/gstlal-burst/gnuscripts/ax_python_glue.m4 index b15aa2194a80a14793e2a9c29090cffbc4d20bd7..b3b6e28c31f3cd56d4b90d569d4860e82572ea25 100644 --- a/gstlal-burst/gnuscripts/ax_python_glue.m4 +++ b/gstlal-burst/gnuscripts/ax_python_glue.m4 @@ -1,25 +1,43 @@ +# +# AX_PYTHON_GLUE([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_GLUE],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([glue]) - if test "x$HAVE_PYMOD_GLUE" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_GLUE" == "xyes"], [ AC_MSG_CHECKING(glue version) GLUE_VERSION=`$PYTHON -c "from glue import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($GLUE_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$GLUE_VERSION]) + ], [ + AC_MSG_WARN([found $GLUE_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) +# +# AX_PYTHON_LIGO_SEGMENTS([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_LIGO_SEGMENTS],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([ligo.segments]) - if test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes"], [ AC_MSG_CHECKING(ligo.segments version) LIGO_SEGMENTS_VERSION=`$PYTHON -c "from ligo.segments import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($LIGO_SEGMENTS_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$LIGO_SEGMENTS_VERSION]) + ], [ + AC_MSG_WARN([found $LIGO_SEGMENTS_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) diff --git a/gstlal-calibration/gnuscripts/ax_python_glue.m4 b/gstlal-calibration/gnuscripts/ax_python_glue.m4 index b15aa2194a80a14793e2a9c29090cffbc4d20bd7..b3b6e28c31f3cd56d4b90d569d4860e82572ea25 100644 --- a/gstlal-calibration/gnuscripts/ax_python_glue.m4 +++ b/gstlal-calibration/gnuscripts/ax_python_glue.m4 @@ -1,25 +1,43 @@ +# +# AX_PYTHON_GLUE([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_GLUE],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([glue]) - if test "x$HAVE_PYMOD_GLUE" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_GLUE" == "xyes"], [ AC_MSG_CHECKING(glue version) GLUE_VERSION=`$PYTHON -c "from glue import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($GLUE_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$GLUE_VERSION]) + ], [ + AC_MSG_WARN([found $GLUE_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) +# +# AX_PYTHON_LIGO_SEGMENTS([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_LIGO_SEGMENTS],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([ligo.segments]) - if test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes"], [ AC_MSG_CHECKING(ligo.segments version) LIGO_SEGMENTS_VERSION=`$PYTHON -c "from ligo.segments import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($LIGO_SEGMENTS_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$LIGO_SEGMENTS_VERSION]) + ], [ + AC_MSG_WARN([found $LIGO_SEGMENTS_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) diff --git a/gstlal-inspiral/gnuscripts/ax_python_glue.m4 b/gstlal-inspiral/gnuscripts/ax_python_glue.m4 index b15aa2194a80a14793e2a9c29090cffbc4d20bd7..b3b6e28c31f3cd56d4b90d569d4860e82572ea25 100644 --- a/gstlal-inspiral/gnuscripts/ax_python_glue.m4 +++ b/gstlal-inspiral/gnuscripts/ax_python_glue.m4 @@ -1,25 +1,43 @@ +# +# AX_PYTHON_GLUE([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_GLUE],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([glue]) - if test "x$HAVE_PYMOD_GLUE" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_GLUE" == "xyes"], [ AC_MSG_CHECKING(glue version) GLUE_VERSION=`$PYTHON -c "from glue import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($GLUE_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$GLUE_VERSION]) + ], [ + AC_MSG_WARN([found $GLUE_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) +# +# AX_PYTHON_LIGO_SEGMENTS([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_LIGO_SEGMENTS],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([ligo.segments]) - if test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes"], [ AC_MSG_CHECKING(ligo.segments version) LIGO_SEGMENTS_VERSION=`$PYTHON -c "from ligo.segments import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($LIGO_SEGMENTS_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$LIGO_SEGMENTS_VERSION]) + ], [ + AC_MSG_WARN([found $LIGO_SEGMENTS_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) diff --git a/gstlal-ugly/gnuscripts/ax_python_glue.m4 b/gstlal-ugly/gnuscripts/ax_python_glue.m4 index b15aa2194a80a14793e2a9c29090cffbc4d20bd7..b3b6e28c31f3cd56d4b90d569d4860e82572ea25 100644 --- a/gstlal-ugly/gnuscripts/ax_python_glue.m4 +++ b/gstlal-ugly/gnuscripts/ax_python_glue.m4 @@ -1,25 +1,43 @@ +# +# AX_PYTHON_GLUE([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_GLUE],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([glue]) - if test "x$HAVE_PYMOD_GLUE" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_GLUE" == "xyes"], [ AC_MSG_CHECKING(glue version) GLUE_VERSION=`$PYTHON -c "from glue import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($GLUE_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$GLUE_VERSION]) + ], [ + AC_MSG_WARN([found $GLUE_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) +# +# AX_PYTHON_LIGO_SEGMENTS([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_LIGO_SEGMENTS],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([ligo.segments]) - if test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes"], [ AC_MSG_CHECKING(ligo.segments version) LIGO_SEGMENTS_VERSION=`$PYTHON -c "from ligo.segments import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($LIGO_SEGMENTS_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$LIGO_SEGMENTS_VERSION]) + ], [ + AC_MSG_WARN([found $LIGO_SEGMENTS_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) diff --git a/gstlal/gnuscripts/ax_python_glue.m4 b/gstlal/gnuscripts/ax_python_glue.m4 index b15aa2194a80a14793e2a9c29090cffbc4d20bd7..b3b6e28c31f3cd56d4b90d569d4860e82572ea25 100644 --- a/gstlal/gnuscripts/ax_python_glue.m4 +++ b/gstlal/gnuscripts/ax_python_glue.m4 @@ -1,25 +1,43 @@ +# +# AX_PYTHON_GLUE([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_GLUE],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([glue]) - if test "x$HAVE_PYMOD_GLUE" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_GLUE" == "xyes"], [ AC_MSG_CHECKING(glue version) GLUE_VERSION=`$PYTHON -c "from glue import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($GLUE_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$GLUE_VERSION]) + ], [ + AC_MSG_WARN([found $GLUE_VERSION, require at least $1]) + ]) + unset minversion + ]) ]) +# +# AX_PYTHON_LIGO_SEGMENTS([MINVERSION = 0]) +# AC_DEFUN([AX_PYTHON_LIGO_SEGMENTS],[ - if test -z $PYTHON ; then - PYTHON="python" - fi - PYTHON_NAME=`basename $PYTHON` + AC_REQUIRE([AM_PATH_PYTHON]) AX_PYTHON_MODULE([ligo.segments]) - if test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes" ; then + AS_IF([test "x$HAVE_PYMOD_LIGO_SEGMENTS" == "xyes"], [ AC_MSG_CHECKING(ligo.segments version) LIGO_SEGMENTS_VERSION=`$PYTHON -c "from ligo.segments import __version__ ; print '.'.join(__version__.strip().split('.'))"` - AC_MSG_RESULT($LIGO_SEGMENTS_VERSION) - fi + AS_IF([test $? != "0"], [ + AC_MSG_ERROR(["cannot determine version"]) + ]) + minversion=$1 + AX_COMPARE_VERSION([$LIGO_SEGMENTS_VERSION], [ge], [${minversion:-0}], [ + AC_MSG_RESULT([$LIGO_SEGMENTS_VERSION]) + ], [ + AC_MSG_WARN([found $LIGO_SEGMENTS_VERSION, require at least $1]) + ]) + unset minversion + ]) ])