Commit graph

214 commits

Author SHA1 Message Date
William S Fulton
cf3ff89433 Fix doxygen testing for jdk < 9 2018-06-11 23:40:58 +01:00
William S Fulton
33921666a1 Merge branch 'vadz-doxygen'
This is the Doxygen work begun in Google Summer of Code projects 2008
and 2012 and subsequently improved by numerous contributors.

* vadz-doxygen: (314 commits)
  Add changes entry for Doxygen support
  Add some missing doctype tyemaps
  Doxygen warnings cleanup
  Move doxygen warning numbers
  Add Python doxygen example
  Doxygen example
  Add Doxygen to include paths
  Doxygen source rename
  More merge fixes from doxygen branches
  Correct python example headers
  Correct source code headers
  Another merge fix from doxygen branches
  Java enums output format fixes
  Add omitted doxygen_parsing_enums testcase
  PEP8 conformance for comment verifier module
  Clean up merge problem
  Doxygen html tweaks
  Update html chapter numbering for added Doxygen chapter
  Fixes to makechap.py to detect ill-formed headers
  html fixes for Doxygen
  Add missing CPlusPlus17.html file
  Format files to unix format
  Doxygen testcase tweak to match that in the html docs
  Doxygen html documentation updates and corrections
  Remove doxygen Examples subdirectory
  Beautify doxygen source code
  Code formatting fixes in doxygen code
  Remove unused doxygen code
  new_node refactor
  Various merge fixes in doxygen branches
  Unused variable warning fix
  Fix wrongly resetting indent after formulae in Doxygen comments
  Add support for doxygen:alias feature
  Get rid of meaningless return type of DoxygenParser methods
  Return enum, not untyped int, when classifying Doxygen commands
  Get rid of unnecessary "typedef enum" in C++ code
  Use slash, not backslash, in "C/C++" in the documentation
  Replace literal "<" with "&lt;" in HTML documentation
  Fix broken link to java.sun.com in Doxygen documentation
  Fix using com.sun.tools.javadoc package under macOS
  Fix error reporting for special characters in Doxygen parsing code
  Switch Python Doxygen unit tests to use inspect.getdoc()
  Use correct separator in Java class path under Windows.
  Remove executable permission from appveyor.yml.
  Use JAVA_HOME value in configure to detect Java.
  Display JAVA_HOME value in "make java_version".
  Fix harmless MSVC warning in DoxygenTranslator code.
  Reset "_last" for all but first enum elements.
  Don't duplicate Javadoc from global enum Doxygen comments twice.
  Move Doxygen comments concatenation from the parser to the lexer.
  Fix shift/reduce conflicts in Doxygen pre/post comment parsing.
  Rewrote part of the grammar dealing with Doxygen comments for enums.
  No changes, just remove spurious white space only differences.
  Move Doxygen comment mangling from the parser to the lexer.
  Merge "-builtin" autodoc bugs workarounds from master into test.
  Quote JAVA_HOME variable value in Java test suite makefile.
  Remove unused C_COMMENT_STRING terminal from the grammar.
  Fix missing returns in the Doxygen test suite code.
  Fix trimming whitespace from Doxygen comments.
  Remove code not doing anything from PyDocConverter.
  Remove unused <sstream> header.
  Remove unreferenced struct declaration.
  Remove unused Swig_warn() function.
  Remove any whitespace before ignored Doxygen commands.
  Remove trailing space from one of Doxygen tests.
  Fix autodoc strings generated in Python builtin case and the test.
  Fix Doxygen unit test in Python "-builtin" case.
  Use class docstrings in "-builtin" Python case.
  Don't indent Doxygen doc strings in generated Python code.
  Add a possibility to flexibly ignore custom Doxygen tags.
  Stop completely ignoring many Doxygen comments.
  Fix structural Doxygen comment recognition in the parser.
  No changes, just make checking for Doxygen structural tags more sane.
  Use "//", not "#", for comments in SWIG input.
  Allow upper case letters and digits in Doxygen words.
  Pass the node the Doxygen comment is attached to to DoxygenParser.
  Get rid of findCommand() which duplicaed commandBelongs().
  Recognize unknown Doxygen tags correctly.
  No real changes, just pass original command to commandBelongs().
  Describe Doxygen-specific %features in a single place.
  Give warnings for unknown Doxygen commands in Doxygen parser.
  Document the return type when translating Doxygen @return to Python.
  Fix translated Doxygen comments for overloaded functions in Python.
  Also merge Doxygen comments for overloaded constructors in Python.
  Allow using enum elements as default values for Python functions.
  Don't always use "*args" for all Python wrapper functions.
  No real changes, just make PYTHON::check_kwargs() const.
  Refactor: move makeParameterName() to common Language base class.
  Remove long line wrapping from Python parameter list generation code.
  Simplify and make more efficient building Python docstrings.
  Translate Doxygen code blocks to Sphinx code blocks.
  Add a simple test of multiple parameters to Doxygen test suite.
  Make Python parameters types hyperlinks in the doc strings.
  Make Language::classLookup() and enumLookup() static.
  Fix arguments of @param, @return etc translations to Python.
  Remove unused method from PyDocConverter.
  No real changes, just remove an unnecessary variable.
  Preserve relative indentation when parsing Doxygen comments.
  Use Sphinx-friendly formatting for overloaded functions documentation.
  Add poor man trailing white space detection to Doxygen Python tests.
  ...
2018-06-07 08:13:10 +01:00
Olly Betts
d6d5db122b Remove support for PHP5
PHP5 is no longer actively supported by the PHP developers and security
support for it ends completely at the end of 2018, so it doesn't make
sense to include support for it in the upcoming SWIG 4.0.0 release.

See #701.
2018-06-07 18:09:03 +12:00
Olly Betts
85c094a325 Clean up Lua probes for headers and libs
Use the version reported by LUABIN to look for headers and libs.
Previously you could get mismatched binary and headers (e.g.
if you install packages lua5.3 and liblua5.2-dev on Debian you
would get LUABIN from 5.3 but headers and libraries from 5.2
- now configure will fail to find the matching headers and not
try to run Lua tests), and do a versioned search in /usr/local/include
which fixes the CI failure for Lua on macOS (presumably homebrew
recently started to version this path).
2018-06-06 10:13:05 +12:00
William S Fulton
0cfd53cff7 Merge branch 'master' into vadz-doxygen
* master:
  Add Octave 4.4 to Travis allow_failures
  Fixes for appveyor image changes
  Javascript test-suite Makefile parallel jobs
  Add changes entry for csconstruct, dconstruct and javaconstruct fix
  Fix lookup of csconstruct, dconstructor and javaconstruct typemaps
  Javascript %nspace fix in generated C++ code
  Add C++17 documentation chapter
  Add changes notes for C++17 nested namespaces support
  Test for invalid C++17 nested namespace aliases
  Test c++17 nested namespaces and %nspace
  Add c++17 nested namespaces runtime test for C#
  Add c++17 nested namespaces runtime test for Python
  Add support for c++17 nested namespaces
  Update CHANGES.current
  .travis.yml: test against Octave 4.4
  Examples/test-suite/register_par.i: rename 'tree' to 'swig_tree'
  Examples/octave/module_load/runme.m: update 'exist()' statements for Octave >= 4.4
  Examples/octave/module_load/runme.m: do not use duplicate function names
  Examples/Makefile.in: unset OCTAVE_PATH when running Octave for tests
  Lib/octave: fix getting/setting global variables for Octave >= 4.4
  Lib/octave: use new class for function member dereference with Octave >= 4.4
  Lib/octave: fix operator installation for Octave >= 4.4
  Lib/Octave: in Octave >= 4.4, assign reference to base class in subclass
  Lib/octave: fix call to mlock() for Octave >= 4.4
  Lib/octave: fix call to octave::call_stack::current() for Octave >= 4.4
  Lib/octave: 'octave_exit' not longer exists in Octave >= 4.4
  Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4
  Lib/octave: replace is_numeric_type() with isnumeric() for Octave >= 4.4
  Lib/octave: replace is_cell() with iscell() for Octave >= 4.4
  Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4
  Lib/octave: fix function name passed to unwind_protect::begin_frame()
  C#, D, Java methodmodifiers on destructors
  Javascript assert.h - move to header section
  Appveyor cl compiler warning fixes during configure
  Java vector wrappers cast correction
  test-suite fixes (Java directors) for compilers that don't support varargs
  Go - use director.swg like other languages
  test-suite fixes (2) for compilers that don't support varargs
  Consistent spacing in generated exception specifications
  test-suite fixes for compilers that don't support vararg macros
  Enhance Travis testing to use gcc 8 and test C++17 and C17
  Enhance SWIG_isfinite for older standards: C++03/C++98/C89
  test-suite support for gcc-8 targeting C++11 and C++14
  Scilab portability fixes - remove use of strdup
  Scilab array overbounds fix handling char type exceptions
  test-suite fix for c++17 and throw macro
  Remove use of 'register' in C source
  test-suite support for C++17: switch testing of the deprecated C++17 'register' keyword from C++ to C
  Examples update to support C++17: exception specification throw removal
  Cosmetic syntax tweak using throw in Octave directors
  test-suite support for C++17 (Java): exception specification throw removal
  test-suite support for C++17: exception specification throw removal
  __cplusplus macro usage tweak
  Improve detection of Python's 2to3 tool
  Correct C shared library creation when specifing CC to configure
  Remove superfluous parens in generated Python scripts.
  [ci] guile 2.2 build no longer expected to fail
  guile - resstructure some configure tests
  Disable guile configuration if guile-config and guile report a different version
  Fix guile executable detection on early 2.0.x guile versions
  guile - drop GDB_INTERFACE related stuff
  guile - replace obsolete scm_listify with scm_list_n
  guile - use more reliable method of finding guile executable based on guile-config
  Fix go version matching in configure for go1.10
  [Python] Suppress new pycodestyle warning
  Add if-no-present action for jsv8inc arg
  Fix typo in help --with-jscoreinc and --with-jscorelib
  Fix off-by-one error
  * Makefile.in (configfiles): Update URLs for latest configfiles.
  Add changes entry for Ruby %alias fix for global functions
  [Ruby] Pass Qnil instead of NULL to rb_funcall()
  Fix typo
  Fix ruby %alias directive for native c functions
  Stop testing Python on Appveyor msys/mingw
  Fix -Wimplicit-fallthrough gcc-7.3 warning
2018-05-17 19:57:02 +01:00
William S Fulton
44f599bb6f Improve detection of Python's 2to3 tool
Distributions seem to install it as 2to3-X.Y where the interpreter is
installed as pythonX.Y
2018-05-04 20:02:13 +01:00
William S Fulton
7774cdf71f Correct C shared library creation when specifing CC to configure 2018-05-04 20:02:13 +01:00
Olly Betts
e57d845312
Merge pull request #1235 from Rasie1/master
Fix go version matching in configure for go1.10
2018-04-21 15:01:19 +12:00
Geert Janssens
f8adc3e613 guile - resstructure some configure tests
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.
2018-04-20 08:54:37 +02:00
Geert Janssens
7e798c1862 Disable guile configuration if guile-config and guile report a different version
In addition
- inform the user when guile gets disabled while it was requested
- skip unecessary configuration work if guile gets disabled
2018-04-20 08:41:15 +02:00
Geert Janssens
b02cb7e0bc Fix guile executable detection on early 2.0.x guile versions
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.
2018-04-20 08:36:50 +02:00
Geert Janssens
0d2a646654 guile - use more reliable method of finding guile executable based on guile-config
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.
2018-04-20 08:36:47 +02:00
Vsevolod Kvachev
5f6012039a Fix go version matching in configure for go1.10 2018-04-19 23:04:37 +03:00
Ivan Leonov
34ee191769 Add if-no-present action for jsv8inc arg 2018-04-18 13:08:15 +12:00
Ivan Leonov
209586c991 Fix typo in help --with-jscoreinc and --with-jscorelib 2018-04-18 13:08:15 +12:00
Vadim Zeitlin
b7f78dd5a7 Merge branch 'master' into doxygen 2018-03-19 21:54:46 +01:00
William S Fulton
b5796019e0 Remove deprecated autoconf macros
AC_EXEEXT AC_OBJEXT are deprecated in the minimum autoconf version we use:
2.58. The compiler checking macros do the equivalent now.
2018-03-14 18:03:52 +00:00
William S Fulton
aff36823df Complete switch from pep8 to pycodestyle for Python testing 2017-12-31 16:19:39 +00:00
William S Fulton
d1e5f1e0c8 Switch to using pycodestyle instead of pep8 2017-12-31 16:17:59 +00:00
Olly Betts
5a9422d980 Remove GCJ support
GCC7 dropped GCJ.

Closes https://sourceforge.net/p/swig/bugs/823/
2017-10-09 08:32:01 +13:00
William S Fulton
836a57190e Fix --with-2to3 configure option 2017-09-19 18:48:34 +01:00
Vadim Zeitlin
db65ae5aea Merge branch 'master' into doxygen
Fix the usual conflicts in autodoc unit test due to fixing the
divergences in autodoc generation between builtin and default cases in
this branch.
2017-09-19 14:02:53 +02:00
William S Fulton
057e1e44c3 Merge branch 'futatuki-configure-with-2to3-as-different-name'
* futatuki-configure-with-2to3-as-different-name:
  Apply patch to configure with 2to3 rename for 3.0.12
2017-09-19 08:10:27 +01:00
Olly Betts
90f9117e10 Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
FUTATSUKI Yasuhito
9d9acba737 Apply patch to configure with 2to3 rename for 3.0.12 2017-06-19 15:42:31 +09:00
William S Fulton
2ec156fb7f Merge branch 'vadz-csharp-complex'
* vadz-csharp-complex:
  Add header to std_complex.i
  Fix linkage problems in C# std::complex wrappers
  C# std::complex wrappers marshalling by value
  C# std::complex wrappers SwigValueWrapper fix
  Use %naturalvar for C# std::complex wrappers
  Allow avoiding generation of unwanted std::complex<T> typemaps
  Also apply csvar{in,out} typemaps to std::complex references
  Add std_complex.i for C# too
  Extend C# complex support to member variables of this type
  Add support for std::complex<> to C#
  Use new unified Mono mcs compiler if available under Unix
2017-05-20 15:21:48 +01:00
William S Fulton
28f7d61986 Bump version to 4.0.0 2017-04-21 19:36:09 +01:00
Vadim Zeitlin
07d81cc1e9 Use new unified Mono mcs compiler if available under Unix
Do not prefer the old .NET 2 gmcs compiler, which was used even if the newer
.NET 4 mcs was available. This is recommended by Mono project, see
http://www.mono-project.com/docs/about-mono/languages/csharp/, and the .NET 1
original mcs is nowhere to be found nowadays.
2017-04-01 23:51:17 +02:00
William S Fulton
be22dd94d1 configure fixes for Python under MinGW / msys
MinGW's python is a normal posix Python distribution, so handle
detection differently to vanilla Windows Python.
2017-02-04 19:18:54 +00:00
Vadim Zeitlin
294ab27b90 Merge branch 'master' into doxygen
Merge 3.0.12 release changes from master.
2017-02-01 02:21:35 +01:00
William S Fulton
2ab08e493f Bump version to 3.0.13
[skip ci]
2017-01-28 00:23:59 +00:00
William S Fulton
c766bf334a Tidier output in configure when php is not found 2017-01-27 08:36:03 +00:00
Karl Wette
f3029dda7d configure.ac: check $OCTAVE is nonempty before testing functionality 2017-01-23 17:18:34 +13:00
Karl Wette
1d370ca4ed configure.ac: check functionality of octave and mkoctfile binaries
- Run with --version and check first line of output is sensible
- Also restore functionality of #462 that was inadvertently lost
  in #875; see commit 5ab9563c2a
2017-01-23 16:30:18 +13:00
Karl Wette
e24ec40895 Octave: add support for version 4.2
- .travis.yml:
  - ppa:kwwette/octaves has Octave version 4.2, also run C++11 tests
- configure.ac:
  - prefer Octave program "octave-cli" to "octave"
  - extract any -std=* flags from CXX, add to OCTAVE_CXXFLAGS
- Lib/typemaps/fragments.swg:
  - SWIG_isfinite_func(): extern "C++" is required as this fragment can
    end up inside an extern "C" { } block
- Lib/octave:
  - add std_wstring.i (copied from std_string.i) for C++11 tests
- Lib/octave/octrun.swg:
  - move Octave version-checking macros to octruntime.swg
  - Octave single()/double() functions now call .as_single()/.as_double()
    methods; redirect calls to __float__() method as per .scalar_value()
  - << and >> operators are no longer supported by Octave
- Lib/octave/octruntime.swg:
  - move Octave version-checking macros here for conditional #includes
  - #include interpreter.h instead of #toplev.h
  - #include call-stack.h (now needed for octave_call_stack)
  - unwind_protect is now in octave:: namespace
  - error_state and warning_state are deprecated; use try/catch to catch
    errors in feval() instead
  - always set octave_exit = ::_Exit, to try to prevent segfault on exit
- Lib/octave/octopers.swg:
  - << and >> operators are no longer supported by Octave
- Lib/octave/exception.i:
  - Add macro SWIG_RETHROW_OCTAVE_EXCEPTIONS which rethrows any
    exceptions raised by Octave >= 4.2
- Examples/test-suite/exception_order.i:
  - Use macro SWIG_RETHROW_OCTAVE_EXCEPTIONS to rethrow exceptions
    raised by error() function in Octave >= 4.2
- Update Doc/Manual/Octave.html and CHANGES.current
2017-01-22 11:53:12 +13:00
William S Fulton
12e1ab0e93 Bump version to 3.0.12 2016-12-30 23:49:46 +00:00
Vadim Zeitlin
04a5215665 Fix using com.sun.tools.javadoc package under macOS
Export JAVA_HOME found by configure, so that the Java test suite makefile
could find this package under this directory.
2016-12-13 16:08:17 +01:00
Vadim Zeitlin
e668c47b70 Merge branch 'master' into doxygen
The way Python docstrings are indented has changed on master, so use the
standard inspect module in Python autodoc unit test to ignore the differences
in their indentation level between -builtin and non-builtin cases to make the
test still pass with the branch version, which avoids the use of different
(but almost identical) values in the test itself.
2016-12-12 01:24:17 +01:00
William S Fulton
bdad87a242 Detect pep8 for both python 2 and python 3 and show version 2016-12-11 22:27:15 +00:00
William S Fulton
3546d096a7 Test php 7.0 and 7.1 on Travis
- php-7.1 set as failing for now due to one broken example (references)
- Look for php 7.1 in configure.ac.
2016-12-04 22:48:09 +00:00
Olly Betts
1169874f59 [PHP] Add support for PHP7.
PHP5's C extension API has changed substantially so you need to use
-php7 to specify you want PHP7 compatible wrappers.
Fixes https://github.com/swig/swig/issues/571
2016-11-30 13:05:59 +13:00
William S Fulton
84b06fa21b Bump version to 3.0.11 2016-06-12 10:14:11 +01:00
William S Fulton
8aea57c704 Bump version to 3.0.10 2016-05-29 15:46:46 +01:00
William S Fulton
2fdd4e10ad configure to only test Go 1.2 and later
Go 1.1 does not seem to work with the -cgo option which is turned on during testing
and 'make check'
2016-05-28 19:01:11 +01:00
William S Fulton
eaf74df22f Fix failure to detect lua.h on some systems
Fixes "present but cannot be compiled" autoconf failure looking for lua.h
2016-05-28 10:37:19 +01:00
Olly Betts
1e718c2ad0 Fix php-config name in error message 2016-05-27 22:50:18 +12:00
William S Fulton
b062d998e9 Improve missing php-config error message during configure 2016-05-14 21:32:24 +01:00
William S Fulton
57f1c378b2 Remove JNI checks due to numerous spurious warnings in some versions of jdk-1.8
Was happening with openjdk-1.9 on Ubuntu 16.04 Xenial Xerus and also seen in jdk-1.8 on Fedora 23 (jdk-1.8.0_65-b17)
2016-05-01 17:35:55 +01:00
William S Fulton
07b2f5ac09 Detect newer versions of Lua during configure 2016-05-01 11:53:29 +01:00
William S Fulton
8dcbbe8b6c Merge branch 'travis-ruby2.3'
* travis-ruby2.3:
  Disable tests broken in python 2.4 and 2.5
  Remove Travis 'gem pristine --all'
  Fix Travis Ruby gem pristine warnings
  Improve Ruby configure detection when multiple versions installed
  Use set -e in Travis scripts to ensure the scripts fail on error
  Travis: ensure the requested language version is being tested
  Add ruby-2.3 testing to Travis
2016-02-04 18:58:14 +00:00