1. move the 'no executable found' message up to be with the executable tests
2. test for an (non-)empty GUILE variable for all other conditions after that
An empty GUILE variable means guile is disabled and consistently using the
same test makes the code more readable.
Querying guile-config for the executable name was only introduced in guile 2.0.12.
If it works it's the most reliable method in environments with more than one guile
executable. If it doesn't work fall back to path detection, assuming the executable
name is just 'guile'. If that's incorrect it's up to the caller to explicitly
specify the path to the right guile executable.
This allows to only specify --with-guile-config=xyz to configure and it will pick up
the correct guile executable in case more versions of guile are installed on the same
system. For example on Fedora 27, I have
/usr/bin/guile1.8
/usr/bin/guile (which is guile 2.0)
/usr/bin/guile2.2
Without this patch the configure script would always pick /usr/bin/guile regardless of which
guile-config I would specify (guile1.8-config, guile-config or guile-config2.2).
With the patch guile2.2 is now correctly picked for guile-config2.2.
Unfortunately it still won't work with guile 1.8 because that version can't provide the
executable name via guile-config yet. In that case configure will fall back to the old
behaviour. On my Fedora 27 system that would mean it would still pick the wrong
executable. However this is not critical because that as well can be overridden by
setting --with-guile=abc. I don't see an easy way to improve on this.
The condition only applies to guile 1.8 and older so it should really
have been '<2' all along. As we already have such a conditional block
earlier up, merge the two together as well.
We haven't uploaded the latest version of these scripts to ftp.gnu.org
in over 10 years. See ftp://ftp.gnu.org/pub/gnu/config/README. The
best place to fetch them from is the Savannah git repository.
Using the %alias directive on native C functions causes swig to segfault due to
a dereference of klass (which is NULL for native C functions) in the
defineAliases function of the Ruby module. This commit adds support for an alias
of native C functions for both separate module as well as global functions, as
well as three test cases for the %alias directive of the Ruby module.
Fixes:
mod.i
%module ruby_alias
%alias get_my_name "nickname,fullname";
%inline %{
const char *get_my_name(){
return "Chester Tester";
}
%}
$ swig -ruby mod.i
Segmentation fault
Signed-off-by: Joel Anderson <joelanderson333@gmail.com>
Fixes segfault when using non-director classes.
Restores a dynamic_cast which was previously removed.
The dynamic_cast is not needed for the swig_connect_director call ...
we'll have to find another solution for #449 for Java.
Closes#1184
Errors were:
../../../../../../Examples/test-suite/scilab/../preproc.i:400: Error: Wrapping functions names for member 'tcxMessageTestSlashSlash.mHeader' will exceed 24 characters, please rename the container of member 'tcxMessageTestSlashSlash'.
../../../../../../Examples/test-suite/scilab/../preproc.i:408: Error: Wrapping functions names for member 'tcxMessageBugSlashSlash.mBid' will exceed 24 characters, please rename the container of member 'tcxMessageBugSlashSlash'.