From ab3c863fc6611c7149232f93b755ac3cba9e038e Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 23 Feb 2023 22:13:59 -0500 Subject: [PATCH] m4: bump ax_pkg_swig to 15 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If you happen to install the mingw-w64-x86_64-swig package on mingw64, instead of just swig (the msys package), the swig lib is: $ /mingw64/bin/swig -swiglib C:\msys64\mingw64\bin\Lib C:/msys64/mingw64/share/swig/4.1.1 rather than: $ /usr/bin/swig -swiglib /usr/share/swig/4.0.2 The two lines are printed with a \r\n between them, which is not handled well by the current AX_PKG_SWIG macro. This results in this in Makefiles: SWIG_LIB = C:\msys64\mingw64\bin\Lib C:/msys64/mingw64/share/swig/4.1.1 and these errors at the end of configure: config.status:1764: $? = 2 config.status:1759: cd tests/param-validation && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles /tmp/GmbY8tiu:351: *** missing separator. Stop. config.status:1764: $? = 2 config.status:1759: cd tests/plugins/src.ctf.fs/succeed && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles /tmp/Gmg5rHoG:346: *** missing separator. Stop. config.status:1764: $? = 2 config.status:1759: cd tests/plugins/sink.ctf.fs/succeed && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles /tmp/GmxjJjqn:350: *** missing separator. Stop. config.status:1764: $? = 2 config.status:1759: cd tests/plugins/flt.lttng-utils.debug-info && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles /tmp/GmA652OJ:370: *** missing separator. Stop. config.status:1764: $? = 2 config.status:1759: cd tests/utils && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles /tmp/GmzIx4FT:388: *** missing separator. Stop. config.status:1764: $? = 2 config.status:1759: cd tests/utils/tap && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles /tmp/GmtBtVgx:347: *** missing separator. Stop. config.status:1764: $? = 2 config.status:1768: error: in `/c/cygwin64/home/Baube/src/babeltrace': config.status:1770: error: Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See `config.log' for more details It was fixed here: https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commit;h=1168996c4cbf6d529d90f66bbf6b06e412bc4452 Import the latest version of the file as of today. Change-Id: I19cdbdcca4fb3bd5a4ba3b54fbf3a29c2f4fc53f Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/9583 Reviewed-by: Michael Jeanson Tested-by: jenkins Reviewed-by: Jérémie Galarneau --- m4/ax_pkg_swig.m4 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/m4/ax_pkg_swig.m4 b/m4/ax_pkg_swig.m4 index 1d467de3..7a4196ff 100644 --- a/m4/ax_pkg_swig.m4 +++ b/m4/ax_pkg_swig.m4 @@ -36,6 +36,8 @@ # Copyright (c) 2008 Rafael Laboissiere # 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 @@ -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 13 +#serial 15 AC_DEFUN([AX_PKG_SWIG],[ # 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 -- 2.34.1