Discussion:
Patch for "ax_swig_python.m4"
Christian Ferrari
2018-10-18 21:05:36 UTC
Permalink
Da: Christian Ferrari <***@yahoo.com>A: autoconf-archive-***@gnu.or <autoconf-archive-***@gnu.or>Cc: sebastian-***@web.de <sebastian-***@web.de>; ***@laboissiere.net <***@laboissiere.net>Inviato: giovedì 18 ottobre 2018, 23:02:51 CESTOggetto: Patch for "ax_swig_python.m4"
In the event that "swig" is not available, SWIG variable is blank, but the macro sets it to " -c++".Further checks on SWIG variable, like:    if test "z$SWIG" != "z"
are passed even if "swig" is not available.At some point a build procedure fails because it does not skip the part that requires "swig", and the command " -c++" is issued.
The macro can be fixed with a small patch: just change SWIG variable only if it's not blank.

***@ubuntu1404-64:~/lixa/m4include$ diff /home/tiian/autoconf-archive/m4/ax_swig_enable_cxx.m4 ax_swig_enable_cxx.m4 52c52,54
<         SWIG="$SWIG -c++"
---
         if test "z$SWIG" != "z"; then
                 SWIG="$SWIG -c++"
         fi
Kind RegardsCh.F.

-------------------------------------------------------------
Good design can't stop bad implementation
Peter Simons
2018-10-19 08:01:24 UTC
Permalink
Hi Christian,

I pushed the change you've suggested in this commit:

https://github.com/autoconf-archive/autoconf-archive/commit/bcdf5ad0c5981a3c01da3216fbf42b6d1e1ffab0

Thank you very much,
Peter
Christian Ferrari
2018-10-20 19:58:01 UTC
Permalink
Dear Peter,after some thinking I have realized that without a C++ compiler, adding "-c++" to SWIG command line is probably useless.The macro can be refined a little more replacing the test statement as below:
***@ubuntu1404-64:~/lixa/m4include$ diff /home/tiian/autoconf-archive/m4/ax_swig_enable_cxx.m4 ax_swig_enable_cxx.m4
52c52
<         if test "z$SWIG" != "z"; then
---
         if test "z$SWIG" != "z" -a "z$CXX" != "z" ; then
Kind RegardsChristian Ferrari


-------------------------------------------------------------
Good design can't stop bad implementation


Il venerdì 19 ottobre 2018, 10:01:29 CEST, Peter Simons <***@cryp.to> ha scritto:

Hi Christian,

I pushed the change you've suggested in this commit:

  https://github.com/autoconf-archive/autoconf-archive/commit/bcdf5ad0c5981a3c01da3216fbf42b6d1e1ffab0

Thank you very much,
Peter

Loading...