Merge branch 'master' into gsoc2012-scilab
This commit is contained in:
commit
013b9f9769
36 changed files with 285 additions and 303 deletions
8
ANNOUNCE
8
ANNOUNCE
|
|
@ -1,8 +1,8 @@
|
||||||
*** ANNOUNCE: SWIG 2.0.10 (in progress) ***
|
*** ANNOUNCE: SWIG 3.0.0 (in progress) ***
|
||||||
|
|
||||||
http://www.swig.org
|
http://www.swig.org
|
||||||
|
|
||||||
We're pleased to announce SWIG-2.0.10, the latest SWIG release.
|
We're pleased to announce SWIG-3.0.0, the latest SWIG release.
|
||||||
|
|
||||||
What is SWIG?
|
What is SWIG?
|
||||||
=============
|
=============
|
||||||
|
|
@ -21,11 +21,11 @@ Availability
|
||||||
============
|
============
|
||||||
The release is available for download on Sourceforge at
|
The release is available for download on Sourceforge at
|
||||||
|
|
||||||
http://prdownloads.sourceforge.net/swig/swig-2.0.10.tar.gz
|
http://prdownloads.sourceforge.net/swig/swig-3.0.0.tar.gz
|
||||||
|
|
||||||
A Windows version is also available at
|
A Windows version is also available at
|
||||||
|
|
||||||
http://prdownloads.sourceforge.net/swig/swigwin-2.0.10.zip
|
http://prdownloads.sourceforge.net/swig/swigwin-3.0.0.zip
|
||||||
|
|
||||||
Please report problems with this release to the swig-devel mailing list,
|
Please report problems with this release to the swig-devel mailing list,
|
||||||
details at http://www.swig.org/mail.html.
|
details at http://www.swig.org/mail.html.
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,8 @@ typedef int (*COMPAR_FN_T)(const void *, const void *);
|
||||||
|
|
||||||
/* mkstemp() on some versions of cygwin don't handle binary files, so
|
/* mkstemp() on some versions of cygwin don't handle binary files, so
|
||||||
override */
|
override */
|
||||||
|
/* Seems okay in Cygwin 1.7.0
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
#undef HAVE_MKSTEMP
|
#undef HAVE_MKSTEMP
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ void copy_fd(int fd_in, int fd_out)
|
||||||
|
|
||||||
#ifndef HAVE_MKSTEMP
|
#ifndef HAVE_MKSTEMP
|
||||||
/* cheap and nasty mkstemp replacement */
|
/* cheap and nasty mkstemp replacement */
|
||||||
static int mkstemp(char *template)
|
int mkstemp(char *template)
|
||||||
{
|
{
|
||||||
mktemp(template);
|
mktemp(template);
|
||||||
return open(template, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600);
|
return open(template, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600);
|
||||||
|
|
|
||||||
142
CHANGES
142
CHANGES
|
|
@ -3,6 +3,144 @@ SWIG (Simplified Wrapper and Interface Generator)
|
||||||
See the CHANGES.current file for changes in the current version.
|
See the CHANGES.current file for changes in the current version.
|
||||||
See the RELEASENOTES file for a summary of changes in each release.
|
See the RELEASENOTES file for a summary of changes in each release.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.0.11 (15 Sep 2013)
|
||||||
|
============================
|
||||||
|
|
||||||
|
2013-09-15: wsfulton
|
||||||
|
[R] Fix attempt to free a non-heap object in OUTPUT typemaps for:
|
||||||
|
unsigned short *OUTPUT
|
||||||
|
unsigned long *OUTPUT
|
||||||
|
signed long long *OUTPUT
|
||||||
|
char *OUTPUT
|
||||||
|
signed char*OUTPUT
|
||||||
|
unsigned char*OUTPUT
|
||||||
|
|
||||||
|
2013-09-12: wsfulton
|
||||||
|
[Lua] Pull Git patch #62.
|
||||||
|
1) Static members and static functions inside class can be accessed as
|
||||||
|
ModuleName.ClassName.FunctionName (MemberName respectively). Old way such as
|
||||||
|
ModuleName.ClassName_FunctionName still works.
|
||||||
|
2) Same goes for enums inside classes: ModuleName.ClassName.EnumValue1 etc.
|
||||||
|
|
||||||
|
2013-09-12: wsfulton
|
||||||
|
[UTL] Infinity is now by default an acceptable value for type 'float'. This fix makes
|
||||||
|
the handling of type 'float' and 'double' the same. The implementation requires the
|
||||||
|
C99 isfinite() macro, or otherwise some platform dependent equivalents, to be available.
|
||||||
|
|
||||||
|
Users requiring the old behaviour of not accepting infinity, can define a 'check' typemap
|
||||||
|
wherever a float is used, such as:
|
||||||
|
|
||||||
|
%typemap(check,fragment="<float.h>") float, const float & %{
|
||||||
|
if ($1 < -FLT_MAX || $1 > FLT_MAX) {
|
||||||
|
SWIG_exception_fail(SWIG_TypeError, "Overflow in type float");
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
|
*** POTENTIAL INCOMPATIBILITY ***
|
||||||
|
|
||||||
|
2013-08-30: wsfulton
|
||||||
|
[Lua] Pull Git patch #81: Include Lua error locus in SWIG error messages.
|
||||||
|
This is standard information in Lua error messages, and makes it much
|
||||||
|
easier to find bugs.
|
||||||
|
|
||||||
|
2013-08-29: wsfulton
|
||||||
|
Pull Git patch #75: Handle UTF-8 files with BOM at beginning of file. Was giving an
|
||||||
|
'Illegal token' syntax error.
|
||||||
|
|
||||||
|
2013-08-29: wsfulton
|
||||||
|
[C#] Pull Git patch #77: Allow exporting std::map using non-default comparison function.
|
||||||
|
|
||||||
|
2013-08-28: wsfulton
|
||||||
|
[Python] %implicitconv is improved for overloaded functions. Like in C++, the methods
|
||||||
|
with the actual types are considered before trying implicit conversions. Example:
|
||||||
|
|
||||||
|
%implicitconv A;
|
||||||
|
struct A {
|
||||||
|
A(int i);
|
||||||
|
};
|
||||||
|
class CCC {
|
||||||
|
public:
|
||||||
|
int xx(int i) { return 11; }
|
||||||
|
int xx(const A& i) { return 22; }
|
||||||
|
};
|
||||||
|
|
||||||
|
The following python code:
|
||||||
|
|
||||||
|
CCC().xx(-1)
|
||||||
|
|
||||||
|
will now return 11 instead of 22 - the implicit conversion is not done.
|
||||||
|
|
||||||
|
2013-08-23: olly
|
||||||
|
[Python] Fix clang++ warning in generated wrapper code.
|
||||||
|
|
||||||
|
2013-08-16: wsfulton
|
||||||
|
[Python] %implicitconv will now accept None where the implicit conversion takes a C/C++ pointer.
|
||||||
|
Problem highlighted by Bo Peng. Closes SF patch #230.
|
||||||
|
|
||||||
|
2013-08-07: wsfulton
|
||||||
|
[Python] SF Patch #326 from Kris Thielemans - Remove SwigPyObject_print and SwigPyObject_str and
|
||||||
|
make the generated wrapper use the default python implementations, which will fall back to repr
|
||||||
|
(for -builtin option).
|
||||||
|
|
||||||
|
Advantages:
|
||||||
|
- it avoids the swig user having to jump through hoops to get print to work as expected when
|
||||||
|
redefining repr/str slots.
|
||||||
|
- typing the name of a variable on the python prompt now prints the result of a (possibly redefined)
|
||||||
|
repr, without the swig user having to do any extra work.
|
||||||
|
- when redefining repr, the swig user doesn't necessarily have to redefine str as it will call the
|
||||||
|
redefined repr
|
||||||
|
- the behaviour is exactly the same as without the -builtin option while requiring no extra work
|
||||||
|
by the user (aside from adding the %feature("python:slot...) statements of course)
|
||||||
|
|
||||||
|
Disadvantage:
|
||||||
|
- default str() will give different (but clearer?) output on swigged classes
|
||||||
|
|
||||||
|
2013-07-30: wsfulton
|
||||||
|
[Python, Ruby] Fix #64 #65: Missing code in std::multimap wrappers. Previously an instantiation
|
||||||
|
of a std::map was erroneously required in addition to an instantiation of std::multimap with the
|
||||||
|
same template parameters to prevent compilation errors for the wrappers of a std::multimap.
|
||||||
|
|
||||||
|
2013-07-14: joequant
|
||||||
|
[R] Change types file to allow for SEXP return values
|
||||||
|
|
||||||
|
2013-07-05: wsfulton
|
||||||
|
[Python] Add %pythonbegin directive which works like %pythoncode, except the specified code is
|
||||||
|
added at the beginning of the generated .py file. This is primarily needed for importing from
|
||||||
|
__future__ statements required to be at the very beginning of the file. Example:
|
||||||
|
|
||||||
|
%pythonbegin %{
|
||||||
|
from __future__ import print_function
|
||||||
|
print("Loading", "Whizz", "Bang", sep=' ... ')
|
||||||
|
%}
|
||||||
|
|
||||||
|
2013-07-01: wsfulton
|
||||||
|
[Python] Apply SF patch #340 - Uninitialized variable fix in SWIG_Python_NonDynamicSetAttr
|
||||||
|
when using -builtin.
|
||||||
|
|
||||||
|
2013-07-01: wsfulton
|
||||||
|
[Python, Ruby, Ocaml] Apply SF patch #341 - fix a const_cast in generated code that was generating
|
||||||
|
a <:: digraph when using the unary scope operator (::) (global scope) in a template type.
|
||||||
|
|
||||||
|
2013-07-01: wsfulton
|
||||||
|
[Python] Add SF patch #342 from Christian Delbaere to fix some director classes crashing on
|
||||||
|
object deletion when using -builtin. Fixes SF bug #1301.
|
||||||
|
|
||||||
|
2013-06-11: wsfulton
|
||||||
|
[Python] Add SWIG_PYTHON_INTERPRETER_NO_DEBUG macro which can be defined to use the Release version
|
||||||
|
of the Python interpreter in Debug builds of the wrappers. The Visual Studio .dsp example
|
||||||
|
files have been modified to use this so that Debug builds will now work without having
|
||||||
|
to install or build a Debug build of the interpreter.
|
||||||
|
|
||||||
|
2013-06-07: wsfulton
|
||||||
|
[Ruby] Git issue #52. Fix regression with missing rb_complex_new function for Ruby
|
||||||
|
versions prior to 1.9 using std::complex wrappers if just using std::complex as an output type.
|
||||||
|
Also fix the Complex helper functions external visibility (to static by default).
|
||||||
|
|
||||||
|
2013-06-04: olly
|
||||||
|
[PHP] Fix SWIG_ZTS_ConvertResourcePtr() not to dereference NULL
|
||||||
|
if the type lookup fails.
|
||||||
|
|
||||||
Version 2.0.10 (27 May 2013)
|
Version 2.0.10 (27 May 2013)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
|
@ -3165,8 +3303,8 @@ Version 1.3.36 (24 June 2008)
|
||||||
Makefile target being generated when generating makefiles with the -M family
|
Makefile target being generated when generating makefiles with the -M family
|
||||||
of options. For example:
|
of options. For example:
|
||||||
|
|
||||||
$ swig -java -MM -MT overiddenname -c++ example.i
|
$ swig -java -MM -MT overriddenname -c++ example.i
|
||||||
overiddenname: \
|
overriddenname: \
|
||||||
example.i \
|
example.i \
|
||||||
example.h
|
example.h
|
||||||
|
|
||||||
|
|
|
||||||
130
CHANGES.current
130
CHANGES.current
|
|
@ -2,131 +2,13 @@ Below are the changes for the current release.
|
||||||
See the CHANGES file for changes in older releases.
|
See the CHANGES file for changes in older releases.
|
||||||
See the RELEASENOTES file for a summary of changes in each release.
|
See the RELEASENOTES file for a summary of changes in each release.
|
||||||
|
|
||||||
Version 2.0.11 (in progress)
|
Version 3.0.0 (in progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
2013-09-12: wsfulton
|
2013-10-04: wsfulton
|
||||||
[Lua] Pull Git patch #62.
|
Fix %naturalvar not having any affect on templated classes instantiated with an
|
||||||
1) Static members and static functions inside class can be accessed as
|
enum as the template parameter type. Problem reported by Vadim Zeitlin.
|
||||||
ModuleName.ClassName.FunctionName (MemberName respectively). Old way such as
|
|
||||||
ModuleName.ClassName_FunctionName still works.
|
|
||||||
2) Same goes for enums inside classes: ModuleName.ClassName.EnumValue1 etc.
|
|
||||||
|
|
||||||
2013-09-12: wsfulton
|
2013-09-20: wsfulton
|
||||||
[UTL] Infinity is now by default an acceptable value for type 'float'. This fix makes
|
[Java] Fix a memory leak for the java char **STRING_ARRAY typemaps.
|
||||||
the handling of type 'float' and 'double' the same. The implementation requires the
|
|
||||||
C99 isfinite() macro, or otherwise some platform dependent equivalents, to be available.
|
|
||||||
|
|
||||||
Users requiring the old behaviour of not accepting infinity, can define a 'check' typemap
|
|
||||||
wherever a float is used, such as:
|
|
||||||
|
|
||||||
%typemap(check,fragment="<float.h>") float, const float & %{
|
|
||||||
if ($1 < -FLT_MAX || $1 > FLT_MAX) {
|
|
||||||
SWIG_exception_fail(SWIG_TypeError, "Overflow in type float");
|
|
||||||
}
|
|
||||||
%}
|
|
||||||
|
|
||||||
*** POTENTIAL INCOMPATIBILITY ***
|
|
||||||
|
|
||||||
2013-08-30: wsfulton
|
|
||||||
[Lua] Pull Git patch #81: Include Lua error locus in SWIG error messages.
|
|
||||||
This is standard information in Lua error messages, and makes it much
|
|
||||||
easier to find bugs.
|
|
||||||
|
|
||||||
2013-08-29: wsfulton
|
|
||||||
Pull Git patch #75: Handle UTF-8 files with BOM at beginning of file. Was giving an
|
|
||||||
'Illegal token' syntax error.
|
|
||||||
|
|
||||||
2013-08-29: wsfulton
|
|
||||||
[C#] Pull Git patch #77: Allow exporting std::map using non-default comparison function.
|
|
||||||
|
|
||||||
2013-08-28: wsfulton
|
|
||||||
[Python] %implicitconv is improved for overloaded functions. Like in C++, the methods
|
|
||||||
with the actual types are considered before trying implicit conversions. Example:
|
|
||||||
|
|
||||||
%implicitconv A;
|
|
||||||
struct A {
|
|
||||||
A(int i);
|
|
||||||
};
|
|
||||||
class CCC {
|
|
||||||
public:
|
|
||||||
int xx(int i) { return 11; }
|
|
||||||
int xx(const A& i) { return 22; }
|
|
||||||
};
|
|
||||||
|
|
||||||
The following python code:
|
|
||||||
|
|
||||||
CCC().xx(-1)
|
|
||||||
|
|
||||||
will now return 11 instead of 22 - the implicit conversion is not done.
|
|
||||||
|
|
||||||
2013-08-23: olly
|
|
||||||
[Python] Fix clang++ warning in generated wrapper code.
|
|
||||||
|
|
||||||
2013-08-16: wsfulton
|
|
||||||
[Python] %implicitconv will now accept None where the implicit conversion takes a C/C++ pointer.
|
|
||||||
Problem highlighted by Bo Peng. Closes SF patch #230.
|
|
||||||
|
|
||||||
2013-08-07: wsfulton
|
|
||||||
[Python] SF Patch #326 from Kris Thielemans - Remove SwigPyObject_print and SwigPyObject_str and
|
|
||||||
make the generated wrapper use the default python implementations, which will fall back to repr
|
|
||||||
(for -builtin option).
|
|
||||||
|
|
||||||
Advantages:
|
|
||||||
- it avoids the swig user having to jump through hoops to get print to work as expected when
|
|
||||||
redefining repr/str slots.
|
|
||||||
- typing the name of a variable on the python prompt now prints the result of a (possibly redefined)
|
|
||||||
repr, without the swig user having to do any extra work.
|
|
||||||
- when redefining repr, the swig user doesn't necessarily have to redefine str as it will call the
|
|
||||||
redefined repr
|
|
||||||
- the behaviour is exactly the same as without the -builtin option while requiring no extra work
|
|
||||||
by the user (aside from adding the %feature("python:slot...) statements of course)
|
|
||||||
|
|
||||||
Disadvantage:
|
|
||||||
- default str() will give different (but clearer?) output on swigged classes
|
|
||||||
|
|
||||||
2013-07-30: wsfulton
|
|
||||||
[Python, Ruby] Fix #64 #65: Missing code in std::multimap wrappers. Previously an instantiation
|
|
||||||
of a std::map was erroneously required in addition to an instantiation of std::multimap with the
|
|
||||||
same template parameters to prevent compilation errors for the wrappers of a std::multimap.
|
|
||||||
|
|
||||||
2013-07-14: joequant
|
|
||||||
[R] Change types file to allow for SEXP return values
|
|
||||||
|
|
||||||
2013-07-05: wsfulton
|
|
||||||
[Python] Add %pythonbegin directive which works like %pythoncode, except the specified code is
|
|
||||||
added at the beginning of the generated .py file. This is primarily needed for importing from
|
|
||||||
__future__ statements required to be at the very beginning of the file. Example:
|
|
||||||
|
|
||||||
%pythonbegin %{
|
|
||||||
from __future__ import print_function
|
|
||||||
print("Loading", "Whizz", "Bang", sep=' ... ')
|
|
||||||
%}
|
|
||||||
|
|
||||||
2013-07-01: wsfulton
|
|
||||||
[Python] Apply SF patch #340 - Uninitialized variable fix in SWIG_Python_NonDynamicSetAttr
|
|
||||||
when using -builtin.
|
|
||||||
|
|
||||||
2013-07-01: wsfulton
|
|
||||||
[Python, Ruby, Ocaml] Apply SF patch #341 - fix a const_cast in generated code that was generating
|
|
||||||
a <:: digraph when using the unary scope operator (::) (global scope) in a template type.
|
|
||||||
|
|
||||||
2013-07-01: wsfulton
|
|
||||||
[Python] Add SF patch #342 from Christian Delbaere to fix some director classes crashing on
|
|
||||||
object deletion when using -builtin. Fixes SF bug #1301.
|
|
||||||
|
|
||||||
2013-06-11: wsfulton
|
|
||||||
[Python] Add SWIG_PYTHON_INTERPRETER_NO_DEBUG macro which can be defined to use the Release version
|
|
||||||
of the Python interpreter in Debug builds of the wrappers. The Visual Studio .dsp example
|
|
||||||
files have been modified to use this so that Debug builds will now work without having
|
|
||||||
to install or build a Debug build of the interpreter.
|
|
||||||
|
|
||||||
2013-06-07: wsfulton
|
|
||||||
[Ruby] Git issue #52. Fix regression with missing rb_complex_new function for Ruby
|
|
||||||
versions prior to 1.9 using std::complex wrappers if just using std::complex as an output type.
|
|
||||||
Also fix the Complex helper functions external visibility (to static by default).
|
|
||||||
|
|
||||||
2013-06-04: olly
|
|
||||||
[PHP] Fix SWIG_ZTS_ConvertResourcePtr() not to dereference NULL
|
|
||||||
if the type lookup fails.
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7886,7 +7886,7 @@ where it is possible to step from Java code into a JNI method within one environ
|
||||||
<p>
|
<p>
|
||||||
Alternatively, debugging can involve placing debug printout statements in the JNI layer using the <tt>%exception</tt> directive.
|
Alternatively, debugging can involve placing debug printout statements in the JNI layer using the <tt>%exception</tt> directive.
|
||||||
See the <a href="Customization.html#Customization_exception_special_variables">special variables for %exception</a> section.
|
See the <a href="Customization.html#Customization_exception_special_variables">special variables for %exception</a> section.
|
||||||
Many of the default typemaps can also be overidden and modified for adding in extra logging/debug display information.
|
Many of the default typemaps can also be overridden and modified for adding in extra logging/debug display information.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ this option the default output directory is the path to the input file.
|
||||||
If <tt>-o</tt> and
|
If <tt>-o</tt> and
|
||||||
<tt>-outcurrentdir</tt> are used together, <tt>-outcurrentdir</tt> is effectively ignored
|
<tt>-outcurrentdir</tt> are used together, <tt>-outcurrentdir</tt> is effectively ignored
|
||||||
as the output directory for the language files is the same directory as the
|
as the output directory for the language files is the same directory as the
|
||||||
generated C/C++ file if not overidden with <tt>-outdir</tt>.
|
generated C/C++ file if not overridden with <tt>-outdir</tt>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3><a name="SWIG_nn5"></a>5.1.3 Comments</H3>
|
<H3><a name="SWIG_nn5"></a>5.1.3 Comments</H3>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>SWIG-2.0 Documentation</title>
|
<title>SWIG-3.0 Documentation</title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="#ffffff">
|
<body bgcolor="#ffffff">
|
||||||
<H1><a name="Sections"></a>SWIG-2.0 Documentation</H1>
|
<H1><a name="Sections"></a>SWIG-3.0 Documentation</H1>
|
||||||
|
|
||||||
Last update : SWIG-2.0.10 (in progress)
|
Last update : SWIG-3.0.0 (in progress)
|
||||||
|
|
||||||
<H2>Sections</H2>
|
<H2>Sections</H2>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,11 +51,6 @@ RUNPIPE=
|
||||||
|
|
||||||
RUNME = runme
|
RUNME = runme
|
||||||
|
|
||||||
# X11 options
|
|
||||||
|
|
||||||
XLIB = @XLIBSW@
|
|
||||||
XINCLUDE = @XINCLUDES@
|
|
||||||
|
|
||||||
IWRAP = $(INTERFACE:.i=_wrap.i)
|
IWRAP = $(INTERFACE:.i=_wrap.i)
|
||||||
ISRCS = $(IWRAP:.i=.c)
|
ISRCS = $(IWRAP:.i=.c)
|
||||||
ICXXSRCS = $(IWRAP:.i=.cxx)
|
ICXXSRCS = $(IWRAP:.i=.cxx)
|
||||||
|
|
@ -136,7 +131,6 @@ TCL_SCRIPT = $(RUNME).tcl
|
||||||
# Build a new version of the tclsh shell
|
# Build a new version of the tclsh shell
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
tclsh: $(SRCS)
|
tclsh: $(SRCS)
|
||||||
$(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACEPATH)
|
$(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACEPATH)
|
||||||
$(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
|
$(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
|
||||||
|
|
@ -147,21 +141,6 @@ tclsh_cpp: $(SRCS)
|
||||||
$(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
|
$(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
|
||||||
$(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
|
$(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
|
||||||
# Build a new copy of wish
|
|
||||||
# -----------------------------------------------------------
|
|
||||||
|
|
||||||
wish: $(SRCS)
|
|
||||||
$(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -lwish.i $(INTERFACEPATH)
|
|
||||||
$(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
|
|
||||||
$(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET)
|
|
||||||
|
|
||||||
|
|
||||||
wish_cpp: $(SRCS)
|
|
||||||
$(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -lwish.i $(INTERFACEPATH)
|
|
||||||
$(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
|
|
||||||
$(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET)
|
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# Build a Tcl dynamic loadable module (you might need to tweak this)
|
# Build a Tcl dynamic loadable module (you might need to tweak this)
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
|
|
@ -913,6 +892,7 @@ RUBY_INCLUDE= @RUBYINCLUDE@
|
||||||
RUBY_LIB = @RUBYLIB@
|
RUBY_LIB = @RUBYLIB@
|
||||||
RUBY_DLNK = @RUBYDYNAMICLINKING@
|
RUBY_DLNK = @RUBYDYNAMICLINKING@
|
||||||
RUBY_LIBOPTS = @RUBYLINK@ @LIBS@ $(SYSLIBS)
|
RUBY_LIBOPTS = @RUBYLINK@ @LIBS@ $(SYSLIBS)
|
||||||
|
RUBY_SO = @RUBYSO@
|
||||||
RUBY = @RUBY@
|
RUBY = @RUBY@
|
||||||
RUBY_SCRIPT = $(RUNME).rb
|
RUBY_SCRIPT = $(RUNME).rb
|
||||||
|
|
||||||
|
|
@ -924,7 +904,7 @@ RUBY_SCRIPT = $(RUNME).rb
|
||||||
ruby: $(SRCS)
|
ruby: $(SRCS)
|
||||||
$(SWIG) -ruby $(SWIGOPT) $(INTERFACEPATH)
|
$(SWIG) -ruby $(SWIGOPT) $(INTERFACEPATH)
|
||||||
$(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(RUBY_INCLUDE)
|
$(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(RUBY_INCLUDE)
|
||||||
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
|
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(RUBY_SO)
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Build a C++ dynamically loadable module
|
# Build a C++ dynamically loadable module
|
||||||
|
|
@ -933,7 +913,7 @@ ruby: $(SRCS)
|
||||||
ruby_cpp: $(SRCS)
|
ruby_cpp: $(SRCS)
|
||||||
$(SWIG) -c++ -ruby $(SWIGOPT) $(INTERFACEPATH)
|
$(SWIG) -c++ -ruby $(SWIGOPT) $(INTERFACEPATH)
|
||||||
$(CXX) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(RUBY_INCLUDE)
|
$(CXX) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(RUBY_INCLUDE)
|
||||||
$(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
|
$(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(RUBY_SO)
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Build statically linked Ruby interpreter
|
# Build statically linked Ruby interpreter
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ public class SwigExtend extends Activity
|
||||||
// methods of all these instances are treated the same. For items 0, 1, and
|
// methods of all these instances are treated the same. For items 0, 1, and
|
||||||
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
||||||
// getPosition which resolves in Java. The call to getPosition is
|
// getPosition which resolves in Java. The call to getPosition is
|
||||||
// slightly different, however, because of the overidden getPosition() call, since
|
// slightly different, however, because of the overridden getPosition() call, since
|
||||||
// now the object reference has been "laundered" by passing through
|
// now the object reference has been "laundered" by passing through
|
||||||
// EmployeeList as an Employee*. Previously, Java resolved the call
|
// EmployeeList as an Employee*. Previously, Java resolved the call
|
||||||
// immediately in CEO, but now Java thinks the object is an instance of
|
// immediately in CEO, but now Java thinks the object is an instance of
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class runme
|
||||||
// methods of all these instances are treated the same. For items 0, 1, and
|
// methods of all these instances are treated the same. For items 0, 1, and
|
||||||
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
||||||
// getPosition which resolves in C#. The call to getPosition is
|
// getPosition which resolves in C#. The call to getPosition is
|
||||||
// slightly different, however, because of the overidden getPosition() call, since
|
// slightly different, however, because of the overridden getPosition() call, since
|
||||||
// now the object reference has been "laundered" by passing through
|
// now the object reference has been "laundered" by passing through
|
||||||
// EmployeeList as an Employee*. Previously, C# resolved the call
|
// EmployeeList as an Employee*. Previously, C# resolved the call
|
||||||
// immediately in CEO, but now C# thinks the object is an instance of
|
// immediately in CEO, but now C# thinks the object is an instance of
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ void main() {
|
||||||
// methods of all these instances are treated the same. For items 0, 1, and
|
// methods of all these instances are treated the same. For items 0, 1, and
|
||||||
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
||||||
// getPosition which resolves in D. The call to getPosition is
|
// getPosition which resolves in D. The call to getPosition is
|
||||||
// slightly different, however, because of the overidden getPosition() call, since
|
// slightly different, however, because of the overridden getPosition() call, since
|
||||||
// now the object reference has been "laundered" by passing through
|
// now the object reference has been "laundered" by passing through
|
||||||
// EmployeeList as an Employee*. Previously, D resolved the call
|
// EmployeeList as an Employee*. Previously, D resolved the call
|
||||||
// immediately in CEO, but now D thinks the object is an instance of
|
// immediately in CEO, but now D thinks the object is an instance of
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ void main() {
|
||||||
// methods of all these instances are treated the same. For items 0, 1, and
|
// methods of all these instances are treated the same. For items 0, 1, and
|
||||||
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
||||||
// getPosition which resolves in D. The call to getPosition is
|
// getPosition which resolves in D. The call to getPosition is
|
||||||
// slightly different, however, because of the overidden getPosition() call, since
|
// slightly different, however, because of the overridden getPosition() call, since
|
||||||
// now the object reference has been "laundered" by passing through
|
// now the object reference has been "laundered" by passing through
|
||||||
// EmployeeList as an Employee*. Previously, D resolved the call
|
// EmployeeList as an Employee*. Previously, D resolved the call
|
||||||
// immediately in CEO, but now D thinks the object is an instance of
|
// immediately in CEO, but now D thinks the object is an instance of
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ func main() {
|
||||||
// treated the same. For items 0, 1, and 2, all methods
|
// treated the same. For items 0, 1, and 2, all methods
|
||||||
// resolve in C++. For item 3, our CEO, GetTitle calls
|
// resolve in C++. For item 3, our CEO, GetTitle calls
|
||||||
// GetPosition which resolves in Go. The call to GetPosition
|
// GetPosition which resolves in Go. The call to GetPosition
|
||||||
// is slightly different, however, because of the overidden
|
// is slightly different, however, because of the overridden
|
||||||
// GetPosition() call, since now the object reference has been
|
// GetPosition() call, since now the object reference has been
|
||||||
// "laundered" by passing through EmployeeList as an
|
// "laundered" by passing through EmployeeList as an
|
||||||
// Employee*. Previously, Go resolved the call immediately in
|
// Employee*. Previously, Go resolved the call immediately in
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public class runme {
|
||||||
// methods of all these instances are treated the same. For items 0, 1, and
|
// methods of all these instances are treated the same. For items 0, 1, and
|
||||||
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
// 2, all methods resolve in C++. For item 3, our CEO, getTitle calls
|
||||||
// getPosition which resolves in Java. The call to getPosition is
|
// getPosition which resolves in Java. The call to getPosition is
|
||||||
// slightly different, however, because of the overidden getPosition() call, since
|
// slightly different, however, because of the overridden getPosition() call, since
|
||||||
// now the object reference has been "laundered" by passing through
|
// now the object reference has been "laundered" by passing through
|
||||||
// EmployeeList as an Employee*. Previously, Java resolved the call
|
// EmployeeList as an Employee*. Previously, Java resolved the call
|
||||||
// immediately in CEO, but now Java thinks the object is an instance of
|
// immediately in CEO, but now Java thinks the object is an instance of
|
||||||
|
|
|
||||||
|
|
@ -274,6 +274,7 @@ CPP_TEST_CASES += \
|
||||||
nspace \
|
nspace \
|
||||||
nspace_extend \
|
nspace_extend \
|
||||||
naturalvar \
|
naturalvar \
|
||||||
|
naturalvar_more \
|
||||||
nested_class \
|
nested_class \
|
||||||
nested_comment \
|
nested_comment \
|
||||||
nested_workaround \
|
nested_workaround \
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,12 @@
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||||
|
// Fix Tcl.h and Windows.h cat and mouse over definition of VOID
|
||||||
|
#if defined(_TCL) && defined(__CYGWIN__)
|
||||||
|
#ifdef VOID
|
||||||
|
#undef VOID
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
// Use equivalent types for non-windows systems
|
// Use equivalent types for non-windows systems
|
||||||
|
|
|
||||||
53
Examples/test-suite/naturalvar_more.i
Normal file
53
Examples/test-suite/naturalvar_more.i
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
%module naturalvar_more
|
||||||
|
|
||||||
|
// The instantiation of a template using an enum in the template parameter was not picking up %naturalvar.
|
||||||
|
|
||||||
|
// These typemaps will be used if %naturalvar is not working
|
||||||
|
%typemap(out) T<Space::E> *te, T<Space::E> *const_te "_should_not_use_this_out_typemap_"
|
||||||
|
%typemap(varout) T<Space::E> *te, T<Space::E> *const_te "_should_not_use_this_varout_typemap_"
|
||||||
|
%typemap(out) Hidden *hidden "_should_not_use_this_out_typemap_"
|
||||||
|
%typemap(varout) Hidden *hidden "_should_not_use_this_varout_typemap_"
|
||||||
|
|
||||||
|
%naturalvar T<Space::E>;
|
||||||
|
%naturalvar Hidden;
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
template <typename X> struct T {};
|
||||||
|
struct K {};
|
||||||
|
struct Hidden;
|
||||||
|
namespace Ace {
|
||||||
|
int glob;
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
%{
|
||||||
|
struct Hidden {};
|
||||||
|
namespace Ace {
|
||||||
|
template<typename> struct NoIdea {};
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
namespace Space {
|
||||||
|
enum E { E1, E2, E3 };
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
|
%template(TE) T<Space::E>;
|
||||||
|
|
||||||
|
%include <std_string.i>
|
||||||
|
%include <std_vector.i>
|
||||||
|
%template(VectorString) std::vector<std::string>;
|
||||||
|
|
||||||
|
%inline {
|
||||||
|
using namespace Space;
|
||||||
|
struct S {
|
||||||
|
T<E> te;
|
||||||
|
const T<E> const_te;
|
||||||
|
const std::vector<std::string>::value_type const_string_member; // check this resolves to std::string which has a naturalvar
|
||||||
|
std::vector<std::string>::value_type string_member; // check this resolves to std::string which has a naturalvar
|
||||||
|
Hidden hidden;
|
||||||
|
Ace::NoIdea<Hidden> noidea;
|
||||||
|
S() : const_te(), const_string_member("initial string value") {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
%module typemap_qualifier_strip
|
%module typemap_qualifier_strip
|
||||||
|
|
||||||
|
%typemap(freearg) int *ptr ""
|
||||||
|
%typemap(freearg) int *const ptrConst ""
|
||||||
|
%typemap(freearg) int const* constPtr ""
|
||||||
|
|
||||||
%typemap(in) int *ptr {
|
%typemap(in) int *ptr {
|
||||||
int temp = 1234;
|
int temp = 1234;
|
||||||
$1 = &temp;
|
$1 = &temp;
|
||||||
|
|
|
||||||
|
|
@ -431,7 +431,7 @@
|
||||||
%}
|
%}
|
||||||
|
|
||||||
/* Typecheck typemaps. The purpose of these is merely to issue a
|
/* Typecheck typemaps. The purpose of these is merely to issue a
|
||||||
warning for overloaded C++ functions * that cannot be overloaded in
|
warning for overloaded C++ functions that cannot be overloaded in
|
||||||
Go as more than one C++ type maps to a single Go type. */
|
Go as more than one C++ type maps to a single Go type. */
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_BOOL) /* Go bool */
|
%typecheck(SWIG_TYPECHECK_BOOL) /* Go bool */
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
%typemap(freearg) char **STRING_ARRAY {
|
%typemap(freearg) char **STRING_ARRAY {
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<size$argnum-1; i++)
|
for (i=0; i<size$argnum; i++)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
delete[] $1[i];
|
delete[] $1[i];
|
||||||
delete[] $1;
|
delete[] $1;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ SWIGOPT = -perl5
|
||||||
SWIGCC = $(CC)
|
SWIGCC = $(CC)
|
||||||
|
|
||||||
# SWIG Library files. Uncomment this to staticly rebuild Perl
|
# SWIG Library files. Uncomment this to staticly rebuild Perl
|
||||||
#SWIGLIB = -static -lperlmain.i
|
#SWIGLIBS = -static -lperlmain.i
|
||||||
|
|
||||||
# Rules for creating .o files from source.
|
# Rules for creating .o files from source.
|
||||||
|
|
||||||
|
|
@ -69,33 +69,21 @@ BUILD = @LDSHARED@
|
||||||
#DLL_LIBS = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
|
#DLL_LIBS = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
|
||||||
-L/usr/local/lib -lg++ -lstdc++ -lgcc
|
-L/usr/local/lib -lg++ -lstdc++ -lgcc
|
||||||
|
|
||||||
# X11 installation (possibly needed if using Perl-Tk)
|
|
||||||
|
|
||||||
XLIB = @XLIBSW@
|
|
||||||
XINCLUDE = @XINCLUDES@
|
|
||||||
|
|
||||||
# Perl installation
|
# Perl installation
|
||||||
|
|
||||||
PERL_INCLUDE = -I@PERL5EXT@
|
PERL_INCLUDE = -I@PERL5EXT@
|
||||||
PERL_LIB = -L@PERL5EXT@ -lperl
|
PERL_LIB = -L@PERL5EXT@ -lperl
|
||||||
PERL_FLAGS = -Dbool=char -Dexplicit=
|
PERL_FLAGS = -Dbool=char -Dexplicit=
|
||||||
|
|
||||||
# Tcl installation. If using Tk you might need this
|
|
||||||
|
|
||||||
TCL_INCLUDE = @TCLINCLUDE@
|
|
||||||
TCL_LIB = @TCLLIB@
|
|
||||||
|
|
||||||
# Build libraries (needed for static builds)
|
# Build libraries (needed for static builds)
|
||||||
|
|
||||||
LIBM = @LIBM@
|
LIBM = @LIBM@
|
||||||
LIBC = @LIBC@
|
LIBC = @LIBC@
|
||||||
SYSLIBS = $(LIBM) $(LIBC) @LIBS@
|
SYSLIBS = $(LIBM) $(LIBC) @LIBS@
|
||||||
|
|
||||||
# Build options (uncomment only one these)
|
# Build options
|
||||||
|
|
||||||
#TK_LIB = $(TCL_LIB) -ltcl -ltk $(XLIB)
|
|
||||||
BUILD_LIBS = $(LIBS) # Dynamic loading
|
BUILD_LIBS = $(LIBS) # Dynamic loading
|
||||||
#BUILD_LIBS = $(PERL_LIB) $(TK_LIB) $(LIBS) $(SYSLIBS) # Static linking
|
|
||||||
|
|
||||||
# Compilation rules for non-SWIG components
|
# Compilation rules for non-SWIG components
|
||||||
|
|
||||||
|
|
@ -123,7 +111,7 @@ $(WRAPOBJ) : $(WRAPFILE)
|
||||||
$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(PERL_INCLUDE) $(PERL_FLAGS) $(WRAPFILE)
|
$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(PERL_INCLUDE) $(PERL_FLAGS) $(WRAPFILE)
|
||||||
|
|
||||||
$(WRAPFILE) : $(INTERFACE)
|
$(WRAPFILE) : $(INTERFACE)
|
||||||
$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE)
|
$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIBS) $(INTERFACE)
|
||||||
|
|
||||||
$(TARGET): $(WRAPOBJ) $(ALLOBJS)
|
$(TARGET): $(WRAPOBJ) $(ALLOBJS)
|
||||||
$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
|
$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ SWIGOPT = -python
|
||||||
SWIGCC = $(CC)
|
SWIGCC = $(CC)
|
||||||
|
|
||||||
# SWIG Library files. Uncomment if rebuilding the Python interpreter
|
# SWIG Library files. Uncomment if rebuilding the Python interpreter
|
||||||
#SWIGLIB = -lembed.i
|
#SWIGLIBS = -lembed.i
|
||||||
|
|
||||||
# Rules for creating .o files from source.
|
# Rules for creating .o files from source.
|
||||||
|
|
||||||
|
|
@ -69,32 +69,20 @@ BUILD = @LDSHARED@
|
||||||
#DLL_LIBS = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
|
#DLL_LIBS = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
|
||||||
-L/usr/local/lib -lg++ -lstdc++ -lgcc
|
-L/usr/local/lib -lg++ -lstdc++ -lgcc
|
||||||
|
|
||||||
# X11 installation (needed if rebuilding Python + tkinter)
|
|
||||||
|
|
||||||
XLIB = @XLIBSW@
|
|
||||||
XINCLUDE = @XINCLUDES@
|
|
||||||
|
|
||||||
# Python installation
|
# Python installation
|
||||||
|
|
||||||
PY_INCLUDE = -DHAVE_CONFIG_H @PYINCLUDE@
|
PY_INCLUDE = -DHAVE_CONFIG_H @PYINCLUDE@
|
||||||
PY_LIB = @PYLIB@
|
PY_LIB = @PYLIB@
|
||||||
|
|
||||||
# Tcl installation. Needed if rebuilding Python with tkinter.
|
|
||||||
|
|
||||||
TCL_INCLUDE = @TCLINCLUDE@
|
|
||||||
TCL_LIB = @TCLLIB@
|
|
||||||
|
|
||||||
# Build libraries (needed for static builds)
|
# Build libraries (needed for static builds)
|
||||||
|
|
||||||
LIBM = @LIBM@
|
LIBM = @LIBM@
|
||||||
LIBC = @LIBC@
|
LIBC = @LIBC@
|
||||||
SYSLIBS = $(LIBM) $(LIBC) @LIBS@
|
SYSLIBS = $(LIBM) $(LIBC) @LIBS@
|
||||||
|
|
||||||
# Build options (uncomment only one these)
|
# Build options
|
||||||
|
|
||||||
#TKINTER = $(TCL_LIB) -ltk -ltcl $(XLIB)
|
|
||||||
BUILD_LIBS = $(LIBS) # Dynamic loading
|
BUILD_LIBS = $(LIBS) # Dynamic loading
|
||||||
#BUILD_LIBS = $(PY_LIB) @PYLINK@ $(TKINTER) $(LIBS) $(SYSLIBS)
|
|
||||||
|
|
||||||
# Compilation rules for non-SWIG components
|
# Compilation rules for non-SWIG components
|
||||||
|
|
||||||
|
|
@ -122,7 +110,7 @@ $(WRAPOBJ) : $(WRAPFILE)
|
||||||
$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDES) $(PY_INCLUDE)
|
$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDES) $(PY_INCLUDE)
|
||||||
|
|
||||||
$(WRAPFILE) : $(INTERFACE)
|
$(WRAPFILE) : $(INTERFACE)
|
||||||
$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE)
|
$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIBS) $(INTERFACE)
|
||||||
|
|
||||||
$(TARGET): $(WRAPOBJ) $(ALLOBJS)
|
$(TARGET): $(WRAPOBJ) $(ALLOBJS)
|
||||||
$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
|
$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
|
||||||
|
|
|
||||||
|
|
@ -114,12 +114,19 @@ signed int *OUTPUT,
|
||||||
unsigned int *OUTPUT,
|
unsigned int *OUTPUT,
|
||||||
short *OUTPUT,
|
short *OUTPUT,
|
||||||
signed short *OUTPUT,
|
signed short *OUTPUT,
|
||||||
|
unsigned short *OUTPUT,
|
||||||
long *OUTPUT,
|
long *OUTPUT,
|
||||||
signed long *OUTPUT,
|
signed long *OUTPUT,
|
||||||
|
unsigned long *OUTPUT,
|
||||||
long long *OUTPUT,
|
long long *OUTPUT,
|
||||||
|
signed long long *OUTPUT,
|
||||||
unsigned long long *OUTPUT,
|
unsigned long long *OUTPUT,
|
||||||
float *OUTPUT,
|
float *OUTPUT,
|
||||||
double *OUTPUT {}
|
double *OUTPUT,
|
||||||
|
char *OUTPUT,
|
||||||
|
signed char *OUTPUT,
|
||||||
|
unsigned char *OUTPUT
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# SWIG Tcl/Tk Makefile
|
# SWIG Tcl Makefile
|
||||||
#
|
#
|
||||||
# This file can be used to build various Tcl extensions with SWIG.
|
# This file can be used to build various Tcl extensions with SWIG.
|
||||||
# By default this file is set up for dynamic loading, but it can
|
# By default this file is set up for dynamic loading, but it can
|
||||||
|
|
@ -48,9 +48,8 @@ SWIG = $(exec_prefix)/bin/swig
|
||||||
SWIGOPT = -tcl # use -tcl8 for Tcl 8.0
|
SWIGOPT = -tcl # use -tcl8 for Tcl 8.0
|
||||||
SWIGCC = $(CC)
|
SWIGCC = $(CC)
|
||||||
|
|
||||||
# SWIG Library files. Uncomment one of these for rebuilding tclsh or wish
|
# SWIG Library files. Uncomment if rebuilding tclsh
|
||||||
#SWIGLIB = -ltclsh.i
|
#SWIGLIBS = -ltclsh.i
|
||||||
#SWIGLIB = -lwish.i
|
|
||||||
|
|
||||||
# Rules for creating .o files from source.
|
# Rules for creating .o files from source.
|
||||||
|
|
||||||
|
|
@ -72,12 +71,7 @@ BUILD = @LDSHARED@
|
||||||
#DLL_LIBS = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
|
#DLL_LIBS = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
|
||||||
-L/usr/local/lib -lg++ -lstdc++ -lgcc
|
-L/usr/local/lib -lg++ -lstdc++ -lgcc
|
||||||
|
|
||||||
# X11 installation (needed to rebuild Tk extensions)
|
# Tcl installation (where is Tcl located)
|
||||||
|
|
||||||
XLIB = @XLIBSW@
|
|
||||||
XINCLUDE = @XINCLUDES@
|
|
||||||
|
|
||||||
# Tcl installation (where is Tcl/Tk located)
|
|
||||||
|
|
||||||
TCL_INCLUDE = @TCLINCLUDE@
|
TCL_INCLUDE = @TCLINCLUDE@
|
||||||
TCL_LIB = @TCLLIB@
|
TCL_LIB = @TCLLIB@
|
||||||
|
|
@ -88,11 +82,10 @@ LIBM = @LIBM@
|
||||||
LIBC = @LIBC@
|
LIBC = @LIBC@
|
||||||
SYSLIBS = $(LIBM) $(LIBC) @LIBS@
|
SYSLIBS = $(LIBM) $(LIBC) @LIBS@
|
||||||
|
|
||||||
# Build options (uncomment only one these)
|
# Build options (uncomment only one of these)
|
||||||
|
|
||||||
BUILD_LIBS = $(LIBS) # Dynamic loading
|
BUILD_LIBS = $(LIBS) # Dynamic loading
|
||||||
#BUILD_LIBS = $(TCL_LIB) -ltcl $(LIBS) $(SYSLIBS) # tclsh
|
#BUILD_LIBS = $(TCL_LIB) -ltcl $(LIBS) $(SYSLIBS) # tclsh
|
||||||
#BUILD_LIBS = $(TCL_LIB) -ltk -ltcl $(XLIB) $(LIBS) $(SYSLIBS) # wish
|
|
||||||
|
|
||||||
# Compilation rules for non-SWIG components
|
# Compilation rules for non-SWIG components
|
||||||
|
|
||||||
|
|
@ -120,7 +113,7 @@ $(WRAPOBJ) : $(WRAPFILE)
|
||||||
$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDES) $(TCL_INCLUDE)
|
$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDES) $(TCL_INCLUDE)
|
||||||
|
|
||||||
$(WRAPFILE) : $(INTERFACE)
|
$(WRAPFILE) : $(INTERFACE)
|
||||||
$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE)
|
$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIBS) $(INTERFACE)
|
||||||
|
|
||||||
$(TARGET): $(WRAPOBJ) $(ALLOBJS)
|
$(TARGET): $(WRAPOBJ) $(ALLOBJS)
|
||||||
$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
|
$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
|
||||||
|
|
|
||||||
|
|
@ -441,7 +441,7 @@ maintainer-clean:
|
||||||
$(srcdir)/Lib/swigwarn.swg: $(srcdir)/Source/Include/swigwarn.h
|
$(srcdir)/Lib/swigwarn.swg: $(srcdir)/Source/Include/swigwarn.h
|
||||||
mkdir -p Lib
|
mkdir -p Lib
|
||||||
echo "/* SWIG warning codes */" > $@
|
echo "/* SWIG warning codes */" > $@
|
||||||
cat $? | grep "^#define WARN\|/\*.*\*/\|^[ \t]*$$" | sed 's/^#define \(WARN.*[0-9]\+\)\(.*\)$$/%define SWIG\1 %enddef\2/' >> $@
|
cat $? | grep "^#define WARN\|/\*.*\*/\|^[ \t]*$$" | sed 's/^#define \(WARN.*[0-9][0-9]*\)\(.*\)$$/%define SWIG\1 %enddef\2/' >> $@
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# TARGETS: install & friends
|
# TARGETS: install & friends
|
||||||
|
|
|
||||||
2
README
2
README
|
|
@ -1,6 +1,6 @@
|
||||||
SWIG (Simplified Wrapper and Interface Generator)
|
SWIG (Simplified Wrapper and Interface Generator)
|
||||||
|
|
||||||
Version: 2.0.10 (in progress)
|
Version: 3.0.0 (in progress)
|
||||||
|
|
||||||
Tagline: SWIG is a compiler that integrates C and C++ with languages
|
Tagline: SWIG is a compiler that integrates C and C++ with languages
|
||||||
including Perl, Python, Tcl, Ruby, PHP, Java, C#, D, Go, Lua,
|
including Perl, Python, Tcl, Ruby, PHP, Java, C#, D, Go, Lua,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,10 @@ and CHANGES files.
|
||||||
|
|
||||||
Release Notes
|
Release Notes
|
||||||
=============
|
=============
|
||||||
|
SWIG-2.0.11 summary:
|
||||||
|
- Minor bug fixes and enhancements mostly in Python, but also
|
||||||
|
C#, Lua, Ocaml, Octave, Perl, PHP, Python, R, Ruby, Tcl.
|
||||||
|
|
||||||
SWIG-2.0.10 summary:
|
SWIG-2.0.10 summary:
|
||||||
- Ruby 1.9 support is now complete.
|
- Ruby 1.9 support is now complete.
|
||||||
- Add support for Guile 2.0 and Guile 1.6 support (GH interface) has
|
- Add support for Guile 2.0 and Guile 1.6 support (GH interface) has
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,6 @@ beautify-file:
|
||||||
test -n "$(INDENTFILE)" || (echo INDENTFILE not defined && exit 1;)
|
test -n "$(INDENTFILE)" || (echo INDENTFILE not defined && exit 1;)
|
||||||
test -e $(INDENTFILE) || (echo File does not exist: $(INDENTFILE) && exit 1;)
|
test -e $(INDENTFILE) || (echo File does not exist: $(INDENTFILE) && exit 1;)
|
||||||
cp $(INDENTFILE) $(INDENTBAKSDIR)/$(INDENTFILE);
|
cp $(INDENTFILE) $(INDENTBAKSDIR)/$(INDENTFILE);
|
||||||
unix2dos $(INDENTFILE)
|
|
||||||
dos2unix $(INDENTFILE)
|
|
||||||
indent -kr --honour-newlines --line-length160 --indent-level2 --braces-on-func-def-line --leave-optional-blank-lines $(SWIGTYPEDEFS) $(INDENTFILE) -o $(INDENTFILE).tmp;
|
indent -kr --honour-newlines --line-length160 --indent-level2 --braces-on-func-def-line --leave-optional-blank-lines $(SWIGTYPEDEFS) $(INDENTFILE) -o $(INDENTFILE).tmp;
|
||||||
cat $(INDENTFILE).tmp | sed -e 's/const const /const /' > $(INDENTFILE);
|
cat $(INDENTFILE).tmp | sed -e 's/const const /const /' > $(INDENTFILE);
|
||||||
rm $(INDENTFILE).tmp;
|
rm $(INDENTFILE).tmp;
|
||||||
|
|
|
||||||
|
|
@ -467,9 +467,9 @@ void swig_pragma(char *lang, char *name, char *value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------
|
||||||
* use_naturalvar_mode()
|
* Language::use_naturalvar_mode()
|
||||||
* -------------------------------------------------------------------------- */
|
* -------------------------------------------------------------------------- */
|
||||||
int use_naturalvar_mode(Node *n) {
|
int Language::use_naturalvar_mode(Node *n) const {
|
||||||
if (Getattr(n, "unnamed"))
|
if (Getattr(n, "unnamed"))
|
||||||
return 0;
|
return 0;
|
||||||
int nvar = naturalvar_mode || GetFlag(n, "feature:naturalvar");
|
int nvar = naturalvar_mode || GetFlag(n, "feature:naturalvar");
|
||||||
|
|
@ -478,12 +478,16 @@ int use_naturalvar_mode(Node *n) {
|
||||||
SwigType *ty = Getattr(n, "type");
|
SwigType *ty = Getattr(n, "type");
|
||||||
SwigType *fullty = SwigType_typedef_resolve_all(ty);
|
SwigType *fullty = SwigType_typedef_resolve_all(ty);
|
||||||
if (SwigType_isclass(fullty)) {
|
if (SwigType_isclass(fullty)) {
|
||||||
Node *m = Copy(n);
|
|
||||||
SwigType *tys = SwigType_strip_qualifiers(fullty);
|
SwigType *tys = SwigType_strip_qualifiers(fullty);
|
||||||
Swig_features_get(Swig_cparse_features(), 0, tys, 0, m);
|
if (!CPlusPlus) {
|
||||||
nvar = GetFlag(m, "feature:naturalvar");
|
Replaceall(tys, "struct ", "");
|
||||||
|
Replaceall(tys, "union ", "");
|
||||||
|
Replaceall(tys, "class ", "");
|
||||||
|
}
|
||||||
|
Node *typenode = Swig_symbol_clookup(tys, 0);
|
||||||
|
if (typenode)
|
||||||
|
nvar = GetFlag(typenode, "feature:naturalvar");
|
||||||
Delete(tys);
|
Delete(tys);
|
||||||
Delete(m);
|
|
||||||
}
|
}
|
||||||
Delete(fullty);
|
Delete(fullty);
|
||||||
}
|
}
|
||||||
|
|
@ -1441,6 +1445,7 @@ int Language::membervariableHandler(Node *n) {
|
||||||
tm = Swig_typemap_lookup("memberin", nin, target, 0);
|
tm = Swig_typemap_lookup("memberin", nin, target, 0);
|
||||||
Delete(nin);
|
Delete(nin);
|
||||||
}
|
}
|
||||||
|
|
||||||
int flags = Extend | SmartPointer | use_naturalvar_mode(n);
|
int flags = Extend | SmartPointer | use_naturalvar_mode(n);
|
||||||
if (isNonVirtualProtectedAccess(n))
|
if (isNonVirtualProtectedAccess(n))
|
||||||
flags = flags | CWRAP_ALL_PROTECTED_ACCESS;
|
flags = flags | CWRAP_ALL_PROTECTED_ACCESS;
|
||||||
|
|
@ -2513,7 +2518,7 @@ int Language::classHandler(Node *n) {
|
||||||
Setattr(m, "parentNode", n);
|
Setattr(m, "parentNode", n);
|
||||||
/*
|
/*
|
||||||
* There is a bug that needs fixing still...
|
* There is a bug that needs fixing still...
|
||||||
* This area of code is creating methods which have not been overidden in a derived class (director methods that are protected in the base)
|
* This area of code is creating methods which have not been overridden in a derived class (director methods that are protected in the base)
|
||||||
* If the method is overloaded, then Swig_overload_dispatch() incorrectly generates a call to the base wrapper, _wrap_xxx method
|
* If the method is overloaded, then Swig_overload_dispatch() incorrectly generates a call to the base wrapper, _wrap_xxx method
|
||||||
* See director_protected_overloaded.i - Possibly sym:overname needs correcting here.
|
* See director_protected_overloaded.i - Possibly sym:overname needs correcting here.
|
||||||
Printf(stdout, "new method: %s::%s(%s)\n", Getattr(parentNode(m), "name"), Getattr(m, "name"), ParmList_str_defaultargs(Getattr(m, "parms")));
|
Printf(stdout, "new method: %s::%s(%s)\n", Getattr(parentNode(m), "name"), Getattr(m, "name"), ParmList_str_defaultargs(Getattr(m, "parms")));
|
||||||
|
|
@ -3091,7 +3096,7 @@ Node *Language::symbolLookup(String *s, const_String_or_char_ptr scope) {
|
||||||
* Tries to locate a class from a type definition
|
* Tries to locate a class from a type definition
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
Node *Language::classLookup(const SwigType *s) {
|
Node *Language::classLookup(const SwigType *s) const {
|
||||||
Node *n = 0;
|
Node *n = 0;
|
||||||
|
|
||||||
/* Look in hash of cached values */
|
/* Look in hash of cached values */
|
||||||
|
|
|
||||||
|
|
@ -2606,8 +2606,8 @@ done:
|
||||||
/* wrap complex arguments to zvals */
|
/* wrap complex arguments to zvals */
|
||||||
Printv(w->code, wrap_args, NIL);
|
Printv(w->code, wrap_args, NIL);
|
||||||
|
|
||||||
Append(w->code, "call_user_function(EG(function_table), (zval**)&swig_self, &funcname,\n");
|
Append(w->code, "call_user_function(EG(function_table), (zval**)&swig_self, &funcname,");
|
||||||
Printf(w->code, " %s, %d, args TSRMLS_CC);\n", Swig_cresult_name(), idx);
|
Printf(w->code, " %s, %d, args TSRMLS_CC);\n", Swig_cresult_name(), idx);
|
||||||
|
|
||||||
if (tm) {
|
if (tm) {
|
||||||
Printv(w->code, Str(tm), "\n", NIL);
|
Printv(w->code, Str(tm), "\n", NIL);
|
||||||
|
|
|
||||||
|
|
@ -3728,7 +3728,7 @@ public:
|
||||||
if (builtin)
|
if (builtin)
|
||||||
builtin_pre_decl(n);
|
builtin_pre_decl(n);
|
||||||
|
|
||||||
/* Overide the shadow file so we can capture its methods */
|
/* Override the shadow file so we can capture its methods */
|
||||||
f_shadow = NewString("");
|
f_shadow = NewString("");
|
||||||
|
|
||||||
// Set up type check for director class constructor
|
// Set up type check for director class constructor
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ public:
|
||||||
virtual int addSymbol(const String *s, const Node *n, const_String_or_char_ptr scope = ""); /* Add symbol */
|
virtual int addSymbol(const String *s, const Node *n, const_String_or_char_ptr scope = ""); /* Add symbol */
|
||||||
virtual void dumpSymbols();
|
virtual void dumpSymbols();
|
||||||
virtual Node *symbolLookup(String *s, const_String_or_char_ptr scope = ""); /* Symbol lookup */
|
virtual Node *symbolLookup(String *s, const_String_or_char_ptr scope = ""); /* Symbol lookup */
|
||||||
virtual Node *classLookup(const SwigType *s); /* Class lookup */
|
virtual Node *classLookup(const SwigType *s) const; /* Class lookup */
|
||||||
virtual Node *enumLookup(SwigType *s); /* Enum lookup */
|
virtual Node *enumLookup(SwigType *s); /* Enum lookup */
|
||||||
virtual int abstractClassTest(Node *n); /* Is class really abstract? */
|
virtual int abstractClassTest(Node *n); /* Is class really abstract? */
|
||||||
virtual int is_assignable(Node *n); /* Is variable assignable? */
|
virtual int is_assignable(Node *n); /* Is variable assignable? */
|
||||||
|
|
@ -300,6 +300,9 @@ protected:
|
||||||
This does not include protected virtual methods as they are turned on with the dirprot option. */
|
This does not include protected virtual methods as they are turned on with the dirprot option. */
|
||||||
bool isNonVirtualProtectedAccess(Node *n) const;
|
bool isNonVirtualProtectedAccess(Node *n) const;
|
||||||
|
|
||||||
|
/* Identify if a wrapped global or member variable n should use the naturalvar feature */
|
||||||
|
int use_naturalvar_mode(Node *n) const;
|
||||||
|
|
||||||
/* Director subclass comparison test */
|
/* Director subclass comparison test */
|
||||||
String *none_comparison;
|
String *none_comparison;
|
||||||
|
|
||||||
|
|
@ -380,7 +383,6 @@ int is_protected(Node *n);
|
||||||
int is_member_director(Node *parentnode, Node *member);
|
int is_member_director(Node *parentnode, Node *member);
|
||||||
int is_member_director(Node *member);
|
int is_member_director(Node *member);
|
||||||
int is_non_virtual_protected_access(Node *n); /* Check if the non-virtual protected members are required (for directors) */
|
int is_non_virtual_protected_access(Node *n); /* Check if the non-virtual protected members are required (for directors) */
|
||||||
int use_naturalvar_mode(Node *n);
|
|
||||||
|
|
||||||
void Wrapper_virtual_elimination_mode_set(int);
|
void Wrapper_virtual_elimination_mode_set(int);
|
||||||
void Wrapper_fast_dispatch_mode_set(int);
|
void Wrapper_fast_dispatch_mode_set(int);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ dnl Set the maximum warning verbosity according to C and C++ compiler used.
|
||||||
dnl Currently supports g++ and gcc.
|
dnl Currently supports g++ and gcc.
|
||||||
dnl
|
dnl
|
||||||
dnl The compiler options are always added CFLAGS and CXXFLAGS even if
|
dnl The compiler options are always added CFLAGS and CXXFLAGS even if
|
||||||
dnl these are overidden at configure time. Removing the maximum warning
|
dnl these are overridden at configure time. Removing the maximum warning
|
||||||
dnl flags can be removed with --without-maximum-compile-warnings. For example:
|
dnl flags can be removed with --without-maximum-compile-warnings. For example:
|
||||||
dnl
|
dnl
|
||||||
dnl ./configure --without-maximum-compile-warnings CFLAGS= CXXFLAGS=
|
dnl ./configure --without-maximum-compile-warnings CFLAGS= CXXFLAGS=
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,4 @@ os.system("rsync --archive --verbose -P --times -e ssh " + "swigwin-" + version
|
||||||
|
|
||||||
print "Finished"
|
print "Finished"
|
||||||
|
|
||||||
print "Now log in to SourceForge and set the operating systems applicable to the newly uploaded tarball and zip file. Also remember to do a 'git push'."
|
print "Now log in to SourceForge and set the operating systems applicable to the newly uploaded tarball and zip file. Also remember to do a 'git push --tags'."
|
||||||
|
|
|
||||||
77
configure.ac
77
configure.ac
|
|
@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl The macros which aren't shipped with the autotools are stored in the
|
dnl The macros which aren't shipped with the autotools are stored in the
|
||||||
dnl Tools/config directory in .m4 files.
|
dnl Tools/config directory in .m4 files.
|
||||||
|
|
||||||
AC_INIT([swig],[2.0.11],[http://www.swig.org])
|
AC_INIT([swig],[3.0.0],[http://www.swig.org])
|
||||||
|
|
||||||
dnl NB: When this requirement is increased to 2.60 or later, AC_PROG_SED
|
dnl NB: When this requirement is increased to 2.60 or later, AC_PROG_SED
|
||||||
dnl definition below can be removed
|
dnl definition below can be removed
|
||||||
|
|
@ -418,80 +418,9 @@ else AC_MSG_ERROR([proper usage is --with-libc=STRING])
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Locate the X11 header files and the X11 library archive. Try
|
# Target languages
|
||||||
# the ac_path_x macro first, but if it doesn't find the X stuff
|
|
||||||
# (e.g. because there's no xmkmf program) then check through
|
|
||||||
# a list of possible directories. Under some conditions the
|
|
||||||
# autoconf macro will return an include directory that contains
|
|
||||||
# no include files, so double-check its result just to be safe.
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
AC_PATH_X
|
|
||||||
not_really_there=""
|
|
||||||
if test "$no_x" = ""; then
|
|
||||||
if test "$x_includes" = ""; then
|
|
||||||
AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
|
|
||||||
else
|
|
||||||
if test ! -r $x_includes/X11/Intrinsic.h; then
|
|
||||||
not_really_there="yes"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
|
|
||||||
AC_MSG_CHECKING(for X11 header files)
|
|
||||||
XINCLUDES="# no special path needed"
|
|
||||||
AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="")
|
|
||||||
if test -z "$XINCLUDES"; then
|
|
||||||
dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 /usr/openwin/include /usr/X11/include /usr/sww/include /usr/X11R6/include /usr/include/X11R6"
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/X11/Intrinsic.h; then
|
|
||||||
XINCLUDES=" -I$i"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($XINCLUDES)
|
|
||||||
else
|
|
||||||
if test "$x_includes" != ""; then
|
|
||||||
XINCLUDES=-I$x_includes
|
|
||||||
else
|
|
||||||
XINCLUDES="# no special path needed"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test -z "$XINCLUDES"; then
|
|
||||||
AC_MSG_RESULT(couldn't find any!)
|
|
||||||
XINCLUDES="# no include files found"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$no_x" = yes; then
|
|
||||||
AC_MSG_CHECKING(for X11 libraries)
|
|
||||||
XLIBSW=
|
|
||||||
dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/X11R6/lib /usr/lib/X11R6 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
|
|
||||||
AC_MSG_RESULT($i)
|
|
||||||
XLIBSW="-L$i -lX11"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
|
||||||
if test "$x_libraries" = ""; then
|
|
||||||
XLIBSW=-lX11
|
|
||||||
else
|
|
||||||
XLIBSW="-L$x_libraries -lX11"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test -z "$XLIBSW" ; then
|
|
||||||
AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
|
|
||||||
fi
|
|
||||||
if test -z "$XLIBSW" ; then
|
|
||||||
AC_MSG_RESULT(couldn't find any! Using -lX11.)
|
|
||||||
XLIBSW=-lX11
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST(XINCLUDES)
|
|
||||||
AC_SUBST(XLIBSW)
|
|
||||||
|
|
||||||
AC_ARG_WITH(alllang, AS_HELP_STRING([--without-alllang], [Disable all languages]), with_alllang="$withval")
|
AC_ARG_WITH(alllang, AS_HELP_STRING([--without-alllang], [Disable all languages]), with_alllang="$withval")
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
@ -1476,6 +1405,7 @@ if test -n "$RUBY"; then
|
||||||
esac
|
esac
|
||||||
|
|
||||||
RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print Config::CONFIG[["CCDLFLAGS"]]') 2>/dev/null`
|
RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print Config::CONFIG[["CCDLFLAGS"]]') 2>/dev/null`
|
||||||
|
RUBYSO=.`($RUBY -rrbconfig -e 'print Config::CONFIG[["DLEXT"]]') 2>/dev/null`
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(could not figure out how to run ruby)
|
AC_MSG_RESULT(could not figure out how to run ruby)
|
||||||
RUBYINCLUDE="-I/usr/local/lib/ruby/1.4/arch"
|
RUBYINCLUDE="-I/usr/local/lib/ruby/1.4/arch"
|
||||||
|
|
@ -1493,6 +1423,7 @@ AC_SUBST(RUBYINCLUDE)
|
||||||
AC_SUBST(RUBYLIB)
|
AC_SUBST(RUBYLIB)
|
||||||
AC_SUBST(RUBYLINK)
|
AC_SUBST(RUBYLINK)
|
||||||
AC_SUBST(RUBYCCDLFLAGS)
|
AC_SUBST(RUBYCCDLFLAGS)
|
||||||
|
AC_SUBST(RUBYSO)
|
||||||
AC_SUBST(RUBYDYNAMICLINKING)
|
AC_SUBST(RUBYDYNAMICLINKING)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue