X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=m4%2Fax_pkg_swig.m4;h=7a4196ff5dffdac5f47af65351efd5042c06a439;hb=HEAD;hp=e112f3d3fa5d1a2c34315249270863a9fdd0c7f9;hpb=24a3136a3837ee43162b1393827faa938f0789eb;p=babeltrace.git diff --git a/m4/ax_pkg_swig.m4 b/m4/ax_pkg_swig.m4 index e112f3d3..7a4196ff 100644 --- a/m4/ax_pkg_swig.m4 +++ b/m4/ax_pkg_swig.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html +# https://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html # =========================================================================== # # SYNOPSIS @@ -32,10 +32,12 @@ # LICENSE # # Copyright (c) 2008 Sebastian Huber -# Copyright (c) 2008 Alan W. Irwin +# Copyright (c) 2008 Alan W. Irwin # Copyright (c) 2008 Rafael Laboissiere -# Copyright (c) 2008 Andrew Collier +# Copyright (c) 2008 Andrew Collier # Copyright (c) 2011 Murray Cumming +# Copyright (c) 2018 Reini Urban +# Copyright (c) 2021 Vincent Danjean # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -48,7 +50,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -63,14 +65,16 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 8 +#serial 15 AC_DEFUN([AX_PKG_SWIG],[ - # Ubuntu has swig 2.0 as /usr/bin/swig2.0 - AC_PATH_PROGS([SWIG],[swig swig2.0]) + # Find path to the "swig" executable. + AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0]) if test -z "$SWIG" ; then m4_ifval([$3],[$3],[:]) - elif test -n "$1" ; then + elif test -z "$1" ; then + m4_ifval([$2],[$2],[:]) + else AC_MSG_CHECKING([SWIG version]) [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] AC_MSG_RESULT([$swig_version]) @@ -81,12 +85,12 @@ AC_DEFUN([AX_PKG_SWIG],[ if test -z "$required_major" ; then [required_major=0] fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`] [required_minor=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_minor" ; then [required_minor=0] fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`] [required_patch=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_patch" ; then [required_patch=0] @@ -121,7 +125,7 @@ AC_DEFUN([AX_PKG_SWIG],[ m4_ifval([$3],[$3],[]) else AC_MSG_CHECKING([for SWIG library]) - SWIG_LIB=`$SWIG -swiglib` + SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '` AC_MSG_RESULT([$SWIG_LIB]) m4_ifval([$2],[$2],[]) fi