* configure.ac: New.
* configure.gnu: New.
* Makefile.am (ACLOCAL_AMFLAGS): New.
(EXTRA_DIST): Add configure.gnu and img/lena.pgm.
* AUTHORS: New.
* README: New.
* NEWS: New (imported from Olena and updated).
* COPYING: New (imported from Olena).
* INSTALL: New (generated by Automake).
* run.mk: Adjust paths.
* m4/pypath.m4, m4/swig.m4: New (imported from Olena).
* img/lena.pgm: New (imported from Milena).
* python/Makefile.am: Adjust paths.
(%-wrap.cc %.py): Likewise.
(MILENA_CPPFLAGS): New. Use it...
(AM_CPPFLAGS, AM_SWIGFLAGS): ...here.
(TOOLS_CXXFLAGS): Remove. Superseded by
(SWILENA_CXXFLAGS): ...this (new) variable.
(AM_CXXFLAGS): Adjust.
* python/data.py: Adjust path.
---
swilena/.gitignore | 18 ++
swilena/AUTHORS | 32 ++++
swilena/COPYING | 1 +
swilena/ChangeLog | 25 +++
INSTALL => swilena/INSTALL | 0
swilena/Makefile.am | 13 ++-
swilena/NEWS | 376 ++++++++++++++++++++++++++++++++++++++++++++
swilena/README | 277 ++++++++++++++++++++++++++++++++
swilena/configure.ac | 168 ++++++++++++++++++++
swilena/configure.gnu | 39 +++++
swilena/img/lena.pgm | 1 +
swilena/m4/pypath.m4 | 6 +
{m4 => swilena/m4}/swig.m4 | 0
swilena/python/Makefile.am | 13 +-
swilena/python/data.py | 4 +-
swilena/run.mk | 9 +-
16 files changed, 968 insertions(+), 14 deletions(-)
create mode 100644 swilena/.gitignore
create mode 100644 swilena/AUTHORS
create mode 120000 swilena/COPYING
copy INSTALL => swilena/INSTALL (100%)
create mode 100644 swilena/NEWS
create mode 100644 swilena/README
create mode 100644 swilena/configure.ac
create mode 100755 swilena/configure.gnu
create mode 120000 swilena/img/lena.pgm
create mode 100644 swilena/m4/pypath.m4
copy {m4 => swilena/m4}/swig.m4 (100%)
diff --git a/swilena/.gitignore b/swilena/.gitignore
new file mode 100644
index 0000000..994b291
--- /dev/null
+++ b/swilena/.gitignore
@@ -0,0 +1,18 @@
+/build-aux/config.guess
+/build-aux/config.sub
+/build-aux/depcomp
+/build-aux/install-sh
+/build-aux/ltmain.sh
+/build-aux/missing
+/build-aux/py-compile
+
+/m4/libtool.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
+/m4/lt~obsolete.m4
+
+/*aclocal.m4
+/autom4te.cache*
+/configure
+/configure.scan
diff --git a/swilena/AUTHORS b/swilena/AUTHORS
new file mode 100644
index 0000000..2e82a7e
--- /dev/null
+++ b/swilena/AUTHORS
@@ -0,0 +1,32 @@
+This package was written by and with the assistance of
+
+==================
+Active LRDE Staff.
+==================
+
+* Guillaume Lazzara z(a)lrde.epita.fr
+* Roland Levillain roland(a)lrde.epita.fr
+
+================================
+Past contributors of LRDE Staff.
+================================
+
+* Akim Demaille akim(a)lrde.epita.fr
+
+=========
+Students.
+=========
+
+* Nicolas Burrus
+* David Lesage
+* Giovanni Palma
+* Raphaël Poss
+* Damien Thivolle
+* Niels Van Vliet
+* Astrid Wang
+
+
+.. Local Variables:
+.. mode: rst
+.. ispell-local-dictionary: "american"
+.. End:
diff --git a/swilena/COPYING b/swilena/COPYING
new file mode 120000
index 0000000..012065c
--- /dev/null
+++ b/swilena/COPYING
@@ -0,0 +1 @@
+../COPYING
\ No newline at end of file
diff --git a/swilena/ChangeLog b/swilena/ChangeLog
index 6d31d60..37c591f 100644
--- a/swilena/ChangeLog
+++ b/swilena/ChangeLog
@@ -1,5 +1,30 @@
2010-10-25 Roland Levillain <roland(a)lrde.epita.fr>
+ Autoconfiscate Swilena.
+
+ * configure.ac: New.
+ * configure.gnu: New.
+ * Makefile.am (ACLOCAL_AMFLAGS): New.
+ (EXTRA_DIST): Add configure.gnu and img/lena.pgm.
+ * AUTHORS: New.
+ * README: New.
+ * NEWS: New (imported from Olena and updated).
+ * COPYING: New (imported from Olena).
+ * INSTALL: New (generated by Automake).
+ * run.mk: Adjust paths.
+ * m4/pypath.m4, m4/swig.m4: New (imported from Olena).
+ * img/lena.pgm: New (imported from Milena).
+ * python/Makefile.am: Adjust paths.
+ (%-wrap.cc %.py): Likewise.
+ (MILENA_CPPFLAGS): New. Use it...
+ (AM_CPPFLAGS, AM_SWIGFLAGS): ...here.
+ (TOOLS_CXXFLAGS): Remove. Superseded by
+ (SWILENA_CXXFLAGS): ...this (new) variable.
+ (AM_CXXFLAGS): Adjust.
+ * python/data.py: Adjust path.
+
+2010-10-25 Roland Levillain <roland(a)lrde.epita.fr>
+
Fix Swilena's dependency tracking.
* python/Makefile.am (%-wrap.cc %.py): Honor Automake's `AMDEP'
diff --git a/INSTALL b/swilena/INSTALL
similarity index 100%
copy from INSTALL
copy to swilena/INSTALL
diff --git a/swilena/Makefile.am b/swilena/Makefile.am
index 109fb2e..f696032 100644
--- a/swilena/Makefile.am
+++ b/swilena/Makefile.am
@@ -1,4 +1,5 @@
-# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -14,8 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
+ACLOCAL_AMFLAGS = -I m4
+
SUBDIRS = python
+# `configure' wrapper used in recursive configuration.
+EXTRA_DIST = configure.gnu
+
# Meta-wrappers (templates), not generating a module, but factoring
# common parts.
meta_wrappers = \
@@ -50,6 +56,9 @@ wrappers = \
\
dynamic_image2d.i
-EXTRA_DIST = $(meta_wrappers) $(wrappers)
+EXTRA_DIST += $(meta_wrappers) $(wrappers)
+
+# Images used in tests.
+EXTRA_DIST += img/lena.pgm
check_SCRIPTS = run
diff --git a/swilena/NEWS b/swilena/NEWS
new file mode 100644
index 0000000..2054481
--- /dev/null
+++ b/swilena/NEWS
@@ -0,0 +1,376 @@
+* Swilena 1.0a
+
+ * Starting with Olena 1.1, Swilena is an independent component
+ of the project, distributed both together with the Olena
+ package and as a standalone package.
+
+ * Misc fixes and improvements.
+
+
+* Olena 1.0 July 14, 2009
+
+ * The core C++ library, renamed to Milena, has been rewritten from
+ scratch and features numerous additions over the past releases.
+ Some features have also been dropped or disabled, and some of them
+ will be reintegrated in future releases. The programming
+ interface has changed from previous versions, but most programs
+ using Olena 0.11 can be adapted to the Olena 1.0 API.
+
+ * Milena uses a simplified version of the SCOOP 2 paradigm
+ (informally called SCOOP 1.5), to improve the speed of compilation
+ and make developing easier while still providing very good
+ run-time performances.
+
+ * A first (re)implementation of Swilena featuring Python wrappers
+ for a very small subset of Milena is available. The bundled
+ Swilena Python Shell (sps) allows interactive Olena sessions.
+
+ * A reference documentation including a tutorial and a quick
+ reference guide have been started. They do not cover the whole
+ Milena library yet.
+
+ * Olena includes some demos and applications using Milena.
+
+
+* Olena 0.11 February 21, 2007
+
+ * The whole Olena distribution compiles with the GNU C++
+ Compiler (G++) 4.0 and 4.1. The compatibility with previous
+ versions of the compiler has been broken.
+
+ * Revamp of Swilena.
+ The Swilena wrappers have been repaired, as they had become
+ incompatible with recent versions of SWIG, G++, Python and Ruby.
+ Moreover, a lot of small bugs have been fixed in Swilena.
+ The test suite of Rblena, the Ruby wrappers for Olena, has
+ been completed and is comparable to Pylena's (the Python
+ wrappers for Olena).
+
+ * Libtool.
+ The whole package uses GNU Libtool to handle libraries.
+ Swilena benefits this, and uses Libtool to create shared
+ libraries upon which SWIG wrappers are built.
+
+ * Miscellaneous corrections in Olena and Integre, as well as in
+ their test suites.
+
+
+* Olena 0.10 April 15, 2004
+
+ * New documentation system.
+ Now any comment should use Doxygen style (i.e. /*! ... */).
+ You can also write some programs inside the comments. They are
+ compiled at documentation generation time. It is useful to
+ illustrate some algorithms with concrete input and output. To
+ use this feature the program has to be between \code and \endcode
+ tags. If you produce an image, you can include it in the comments
+ with the \image command, using the same name you used to produce
+ it, but with the png extension. To make sure your image will not
+ overwrite another existing one, you should name it taking care of
+ the namespace you are using: e.g. if you comment the function
+ oln::boo::bar::fun, the image should be named oln_foo_bar_fun.ppm.
+ The macros IMG_IN and IMG_OUT correspond to the path of the images.
+
+ * Border behavior can be controlled with the behavior hierarchy.
+ If an algorithm support it, you can choose the way the image
+ border will be seen. Three behaviors are available: mirror,
+ replicate or user defined value.
+
+ * Attribute opening/closing enhancement
+ - Make the algorithm more generic.
+ - Add a lot of attributes (area, disk, square, dist,
+ rectangle, volume, height, maxvalue, minvalue).
+
+ * Change the color conversion system
+ - CIE RGB is the main color system i.e. it can be converted
+ directly into any other color system.
+ - Conversion between 2 color systems should pass by the RGB one.
+
+ * Generic and concrete morphers are now implemented in Olena.
+ - Five morphers are included in this release:
+ Color morpher
+ Sub quantifying morpher
+ Piece morpher
+ Iter morpher
+ Slicing morpher
+ - These morphers can be manipulated as if they were normal images.
+
+
+* Olena 0.9 August 8, 2003
+
+ * New static hierarchy paradigm
+ - Complete rewrite of the image hierarchy.
+ - The new hierarchy benefits from multiple inheritance and
+ diamond constructs.
+ - Objects' abstract interfaces made available, leading to
+ safer and easier algorithm writing.
+ - Label images such as binary_image or vectorial_image added.
+
+ * Partial rewrite of images I/O
+ - Support for 1d, 3d images and windows.
+ - Better handling of built-in types.
+
+ * Color conversions fixed and improved.
+
+ * Cleanup and coding style conformance.
+
+ * Many bug fixes.
+ * Improved test-suite.
+
+
+* Olena 0.8 April 10, 2003
+
+ IMPORTANT NOTE: This version is not compatible with older
+ versions of Olena. The project has been split into three part,
+ so many header files have moved and new namespaces have been
+ created. Please read the UPGRADING file for more information.
+
+ * Many source code cleanups.
+ * The source code has been split into 3 parts: image
+ processing (olena/), data types (integre/) and meta-programming
+ tools (metalic/).
+ * First part of the new static hierarchy paradigm implementation.
+ * Support for combinatorial maps.
+ * Many bug fixes.
+
+
+* Olena 0.7 February 10, 2003
+
+ * Manual pages for the command-line utilities.
+ * New, saner, source tree layout.
+ * Each `part' of the source tree can be excluded from the
+ build process with configuration flags.
+ * New `oln.m4' file for use by autoconf'ed user projects.
+ * Major documentation updates.
+ * New `oln-config.sh' scripts for user Makefiles.
+ * Olena now works on Mac OS X, NetBSD, FreeBSD and Cygwin.
+
+
+* Olena 0.6 January 15, 2003
+
+ * Complete rewriting of data types.
+ * Command line utilities.
+ * Fully implementation of convolutions
+ * Fast Fourier Transform (FFT)
+ * Discrete Wavelet Transform (Daubechie's wavelet) (DWT)
+ * Many bug fixes.
+
+
+* Olena 0.5 July 25, 2002
+
+ * Documentation in LaTeX (instead of Texinfo).
+ * Support reading/writing gziped images
+ (include <oln/io/gz.hh> and link with libz).
+ * Complete rewrite of the static arrays
+ (meta::array1d, meta::array2d, meta::array3d).
+ * Preliminary implementation of convolutions
+ (oln::convol::convolve)
+ * All headers should now be referenced with the `oln/' prefix,
+ as in `#include <oln/basics2d.hh>'.
+ * New conversion operator: convert::stretch.
+ * Many bug fixes.
+
+
+* Olena 0.4.1 April 25, 2002
+
+ * Buglet in the 0.4 Makefiles.
+
+
+* Olena 0.4 April 24, 2002
+
+ * New morpho:: operators:
+ - thinning
+ - thickening
+ * New convert:: operators:
+ - ng_to_se
+ - ng_to_cse
+ * First sketch of a test suite.
+ * Many bug fixes.
+
+
+* Olena 0.3 January 14, 2002
+
+ * fast_morpho() speeded-up.
+ * Minor bug fixes.
+ * "Documentation" updates.
+
+
+* Olena 0.2b December 13, 2001
+
+ * Value:
+ - Support for HSL and HSV color systems.
+ - Define internal::default_less<vec<N,T>>.
+
+ * Core:
+ - New window generator: mk_win_ellipse, mk_win_disc,
+ mk_win_ellipsoid, and mk_win_ball.
+
+ * Various #include fixes.
+
+
+* Olena 0.2 November 28, 2001
+
+ * Color:
+ - nrgb_8, nrgb_16, nrgb_32: new types for NTSC RGB. The
+ conversion from and to YIQ and HSI which assumed NTSC RGB
+ has been adjusted to actually use nrgb_* (instead of rgb_*)
+ and renamed accordingly.
+ - yuv_8, yuv_16, yuv_32: New types.
+
+ The currently available conversions are
+
+ hsi yuv
+ \ /
+ rgb -- nrgb
+ \ / \
+ xyz yiq
+
+ * Various cleanups and bug fixes. Especially:
+ - border handling (mirroring, copying) simplified and fixed.
+ - ++k, --k: return a value with the same type as k.
+
+ * I/O:
+ - pnm/P1, pnm/P3, and pnm/P6 support for image_3d.
+
+
+* Olena 0.1f November 22, 2001
+
+ * Core:
+ - Several bug fixes in memory handling.
+
+ * Types:
+ - New color types: HSI, YIQ; with conversions to and from RGB.
+ - `min()' and `max()' are now defined with the types (i.e.
+ not in math/macros.hh), along with the other operators.
+ Also, these procedures will two arguments of different
+ types.
+
+ * Casts:
+ - `cast::round': similar to C's round()
+ - `cast::rbound': ditto, but constrained to fit the
+ output type's range.
+
+ * I/O:
+ - Support for `image_3d<int_u<N> >' (as PNM P2 & P5).
+
+ * Processings
+ - `level::is_greater_or_equal', `level::is_greater',
+ `level::is_lower_or_equal', `level::is_lower',
+ `level::is_equal': Comparisons between images.
+ - `level::connected_component': Number connected components.
+ - `morpho::geodesic_dilation', `morpho::simple_geodesic_dilation'.
+ - `morpho::geodesic_erosion', `morpho::simple_geodesic_erosion'.
+ - `morpho::get_plus_se_only', `morpho::get_plus_se_p',
+ `morpho::get_minus_se_only', `morpho::get_minus_se_p': Split
+ a structural element in a `plus' (lexically before than the center)
+ and `minus' (after).
+
+ * Misc:
+ - `utils::timer': for benchmarking
+ - `level::lut', `level::hlut': Lookup tables.
+
+
+* Olena 0.1d November 15, 2001
+
+ * Core:
+ - `point's, `dpoint's, and `image_size's feature a `nth()' method,
+ that returns the value of the nth coordinate.
+ - `fold': new high order operator.
+
+ * Types:
+ - `vec<N,T>' uses an array to store its elements
+ and accepts builtin types.
+ - `rgb<T>' has been replaced by `rgb_8', `rgb_16', `rgb_32'
+ - `xyz_8', `xyz_16', `xyz_32' are new types.
+ - the latter six types are instances of the `color' type.
+
+ * Processings:
+ - All basic morphological processings (`opening',
+ `hit_or_miss', `beucher_gradient', etc.) from namespace
+ `morpho::' have their fast equivalent in namespace
+ `morpho::fast::'.
+ - `convert::apply' is similar to `apply' but will work
+ for all types of conversions while `apply' can only work
+ on `conversion_to_type' conversions.
+
+ * Tools:
+ - `utils::fill': fill an image
+ - `utils::f_moments', `utils::f_minmax': statistical functors.
+
+ * Casts:
+ - `cast::bound': similar to `convert::bound'.
+
+ * I/O:
+ - It's possible to load and save as PPM any kind of image2d
+ whose color has 3 components on 8 bits.
+
+
+* Olena 0.1b November 8, 2001
+
+ * New type: rgb<T>
+
+ * New processings:
+ - morpho::watershed_con
+ - convol::fast::gaussian
+ - convol::fast::gaussian_derivative
+ - convol::fast::gaussian_second_derivative
+
+ * Conversion are organized in the following hierarchy
+
+ conversion<Inferior>
+ ^
+ |
+ conversion_to_type<To,Inferior>
+ ^
+ |
+ conversion_from_type_to_type<From,To,Inferior>
+
+ All children of conversion_from_type_to_type are models of
+ Adaptable Unary Function. See conversion.hh for more comments.
+
+ * The only two functions that perform file i/o are `load' and
+ `save'. The other functions (`read', `write', `read_pnm',
+ `write_pnm') have been removed.
+
+ * image2d<rgb<int_u8> > can be loaded and saved as ppm.
+
+ * All iterators support a new method, cur(), that returns
+ the current point (or dpoint). It is meant to be used
+ at places where the compiler is unable to implicitly convert
+ an iterator into a point (or dpoint).
+
+ * Bug fixes:
+ - Olena now compiles successfully with -pedantic.
+ - `image2d<int_u8> lena = load("lena.pgm");' works.
+ - Multiplications and subtractions on 'vec' no longer
+ perform additions.
+
+
+* Olena 0.1 November 1, 2001
+
+ * Initial public release.
+
+
+Local Variables:
+mode: outline
+ispell-local-dictionary: "american"
+End:
+
+----
+
+Copyright (C) 2001, 2002, 2003, 2004, 2007, 2009, 2010 EPITA Research and
+Development Laboratory (LRDE)
+
+This file is part of Olena.
+
+Olena is free software: you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation, version 2 of the License.
+
+Olena is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Olena. If not, see <http://www.gnu.org/licenses/>.
diff --git a/swilena/README b/swilena/README
new file mode 100644
index 0000000..69c7f3e
--- /dev/null
+++ b/swilena/README
@@ -0,0 +1,277 @@
+Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+Laboratory (LRDE)
+
+This file is part of Olena.
+
+Olena is free software: you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation, version 2 of the License.
+
+Olena is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Olena. If not, see <http://www.gnu.org/licenses/>.
+
+The complete GNU General Public License Notice can also be found in
+the 'COPYING' file in the root directory.
+
+
+=======================
+Introduction to Swilena
+=======================
+
+Swilena is a part of Olena_, a generic and efficient platform
+dedicated to image processing.
+
+.. _Olena:
http://olena.lrde.epita.fr
+
+Swilena provides bindings of the Milena C++ library (also a part of
+Olena) to other languages (currently Python).
+
+Swilena is distributed in two ways:
+
+ * as a component of the Olena package
+
+ * and a standalone package.
+
+If you obtained Swilena as an project embedded an Olena package, we
+advise you to read Olena's README, at the top-level directory of the
+package, and not to configure nor compile Swilena separately (i.e., do
+not use `swilena/configure', use the top-level `configure' instead
+and run `make' from the top-level directory).
+
+Otherwise, you are in the case of a standalone package, and you might
+want to read the rest of this file.
+
+
+==========================================
+Detailed Instructions (Standalone Package)
+==========================================
+
+-----------------
+Required Software
+-----------------
+
+Here is a non-exhaustive list of required software required to build
+Swilena successfully.
+
+ * to compile the user examples:
+
+ - a POSIX shell, like Bash
+
+ - a decent C++ compiler, like GNU C++
+
+ - a `make' utility, like GNU `make'
+
+ - the Simplified Wrapper and Interface Generator (SWIG_).
+
+ - Python_
+
+.. _SWIG:
http://www.swig.org
+
+.. _Python:
http://www.python.org
+
+
+If you are using a standalone version of Swilena, you also need a
+working Milena_ install (Milena is shipped with Olena).
+
+.. _Milena:
http://olena.lrde.epita.fr
+
+
+-------------
+Configuration
+-------------
+
+In order to prepare the build process, you need to configure the source
+tree.
+
+ Assuming your Swilena distribution is uncompressed in directory
+`swilena-1.1', follow these steps:
+
+ % cd swilena-1.1
+ % mkdir _build
+ % cd _build
+ % ../configure
+
+ The build process can be altered by a number of options you can pass
+to the `configure' script. The following sections describe them.
+
+
+Milena path
+===========
+
+Swilena requires the Milena library. If Swilena's `configure' is
+unable to find your installation of Milena, or if you want to use a
+specific installation, you must help `configure' find it using the
+`--with-milena' flag. For instance, if you have installed Milena in
+`$HOME/local', replace the call to `configure' from the previous
+section by this command:
+
+ % ../configure --with-milena=$HOME/local
+
+
+Installation Path
+=================
+
+By default, Swilena is installed in the standard "local" directory of
+your system. This is usually `/usr/local' under Unix.
+
+ You can change this path with the following flag:
+
+ --prefix=<installation prefix>
+
+
+Compiler Selection and Compilation Flags
+========================================
+
+By default, `configure' will try to use the first C++ compiler it
+encounters on your system. If `CXX' is not set, it will look, in order,
+for:
+
+ - the value of the `CXX' environment variable,
+
+ - the GNU C++ compiler (`g++'),
+
+ - the `c++' or `gpp' commands on your system,
+
+ - `aCC', the HP-UX standard C++ compiler,
+
+ - the `CC', `cxx', `cc++' or `cl' commands on your system,
+
+ - KAI's C++ compiler (`KCC'),
+
+ - `RCC', `xlC_r' or `xlC'.
+
+ You can override the detection system by passing your favorite
+compiler name to `configure', as follows:
+
+ % ../configure CXX=<your-favorite-C++-compiler>
+
+ As an alternative, you can also set the environment variable `CXX'.
+
+
+ For some compilers (GNU g++ and Intel's icpc to some extent) ,
+`configure' will use default CXXFLAGS. You can override the default
+C++ flags by giving `configure' your selection of flags:
+
+ % ../configure CXXFLAGS="<your-favorite-flags>"
+
+
+--------
+Building
+--------
+
+Once your build directory is `configure'd, you can run
+
+ % make
+
+to build Swilena.
+
+
+ Additionally, you can build and run the test suite with:
+
+ % make check
+
+However, this process is time- and memory- consuming, and you probably
+do not need it except if you are developing/debugging Swilena.
+
+
+----------
+Installing
+----------
+
+To install Swilena on your system, run:
+
+ % make install
+
+from the build directory.
+
+ If not overridden with `--prefix', this will install:
+
+ * the Swilena Python Shell (`sps' script) in `/usr/local/bin',
+
+ * Python bindings in `/usr/local/lib/python2.x/site-packages/'.
+
+
+ You can later remove Swilena from your system by running
+
+ % make uninstall
+
+from the build directory (if you have kept it). We recommend the use
+of GNU Stow (or any similar program) during the installation of Swilena,
+to make the uninstallation of Swilena easier.
+
+
+=====================
+Layout of the Tarball
+=====================
+
+The Swilena project directory layout is as follows:
+
+build-aux
+ Auxiliary tools used by the GNU Build System during ``configure``
+ and ``make`` stages.
+
+img
+ Some (2D) images, mostly used for test purpose.
+
+m4
+ Extra Autoconf macros.
+
+python
+ Some Python bindings for Milena.
+
+
+===================
+Supported Platforms
+===================
+
+Swilena has been tested on the following configurations:
+
+=========================== =============================================
+System Compiler
+=========================== =============================================
+GNU/Linux on IA-32 g++ (GNU GCC) 3.3, 4.1, 4.2 and 4.4
+GNU/Linux on IA-32 icpc (Intel C/C++ Compiler) 10.1 and 11.0
+GNU/Linux on AMD64/Intel 64 g++ (GNU GCC) 4.1
+Mac OS X (10.6) on IA-32 g++ (GNU GCC) 4.2.1
+=========================== =============================================
+
+
+See Also
+========
+
+There are other sources of interest in the distribution.
+
+- Headline news about the project can be found in the file ``NEWS`` at
+ the root of the source tree.
+
+
+License
+=======
+
+Swilena is released under the GNU General Public Licence. See the file
+``COPYING`` (at the root of the source tree) for details.
+
+
+Contacts
+========
+
+The team can be reached by mail at olena(a)lrde.epita.fr. The snail
+mail address follows.
+
+* Olena - LRDE
+
+ | Laboratoire de Recherche et Développement de l'EPITA (LRDE)
+ | 14-16 rue Voltaire
+ | FR-94276 Le Kremlin-Bicêtre CEDEX
+ | France
+
+
+
+.. Local Variables:
+.. mode: rst
+.. End:
diff --git a/swilena/configure.ac b/swilena/configure.ac
new file mode 100644
index 0000000..a0c90f3
--- /dev/null
+++ b/swilena/configure.ac
@@ -0,0 +1,168 @@
+# Copyright (C) 2006, 2007, 2008, 2009, 2010 EPITA Research and
+# Development Laboratory (LRDE).
+#
+# This file is part of Olena.
+#
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
+#
+# Olena is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Olena. If not, see <http://www.gnu.org/licenses/>.
+
+m4_pattern_forbid([^OLN_])
+
+AC_PREREQ([2.61])
+
+
+## ---------------- ##
+## Package set up. ##
+## ---------------- ##
+
+AC_INIT([Swilena], [1.0a], [olena(a)lrde.epita.fr], [swilena])
+
+# M4 macros.
+AC_CONFIG_MACRO_DIR([m4])
+
+# Auxiliary files.
+AC_CONFIG_AUX_DIR([build-aux])
+
+# Automake.
+AM_INIT_AUTOMAKE([1.10 subdir-objects check-news dist-bzip2 nostdinc -Wall])
+
+## --------------------- ##
+## C++ compiler set up. ##
+## --------------------- ##
+
+# If the user doesn't provide any CXXFLAGS, prevent Autoconf from
+# settings its own default ones (e.g., `-g -O2' for g++).
+if test ! ${CXXFLAGS+set}; then
+ CXXFLAGS=""
+fi
+
+# Look for a C++ compiler.
+AC_LANG([C++])
+AC_PROG_CXX
+
+# Set `ICPC' to `yes' if the Intel C++ compiler is used.
+test $CXX --version 2>/dev/null | grep '\bICC\b' >/dev/null 2>&1
&& ICPC=yes
+
+# GNU C++ compiler setup.
+if test "$GXX" = yes; then
+ # Speed up compiling times.
+ CXXFLAGS="$CXXFLAGS -pipe"
+
+ # The code generated for mln::data::impl::memcpy__() by g++ 4.2 with
+ # a high optimization level (`-O3') and without
+ # `-fno-strict-aliasing' might be wrong, at least with Debian's g++
+ # 4.2 on IA-32 (see also milena/mln/memcpy_.hh). We observed this
+ # behavior with e.g. milena/apps/graph-morpho/samples-image2d.cc.
+ # Note that Debian's g++ 4.0, 4.1, 4.3 and 4.4 are fine.
+ #
+ # So, when the C++ compiler is g++ 4.2, set STRICT_ALIASING_CXXFLAGS
+ # to `-fno-strict-aliasing'.
+ if $CXX --version | head -n 1 | grep '\b4\.2' >/dev/null 2>&1; then
+ STRICT_ALIASING_CXXFLAGS=-fno-strict-aliasing
+ fi
+fi
+AC_SUBST([STRICT_ALIASING_CXXFLAGS])
+
+
+# Adjusting warning options according to compilers.
+AC_ARG_VAR([WARNINGS_CXXFLAGS], [C++ compiler warning flags])
+case "$CXX" in
+ # Intel compiler
+ *icpc*)
+ WARNINGS_CXXFLAGS="-Wall -wd111,193,279,383,444,522,654,810,981,1418"
+ ;;
+ *)
+ WARNINGS_CXXFLAGS="-Wall -W"
+ ;;
+esac
+
+
+## -------- ##
+## Milena. ##
+## -------- ##
+
+# The current approach to providing Swilena a path to Milena's headers
+# is naive: for instance, we cannot provide two paths (source and
+# build dirs) in the case of an Olena build using a parallel build
+# (where srcdir != builddir). Improve if needed.
+
+AC_ARG_WITH([milena],
+ [AC_HELP_STRING([--with-milena=DIR], [path to Milena headers])],
+ [if test x"$with_milena" = xno; then
+ AC_MSG_ERROR([Milena is required for Swilena. Try to invoke configure
+without `--with-milena=no' nor `--without-milena.'])
+ fi])
+if test -n "$with_milena" && test x"$with_milena" != xyes;
then
+ MILENA_CPPFLAGS="-I$with_milena"
+fi
+swl_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$MILENA_CPPFLAGS $CPPFLAGS"
+AC_CHECK_HEADER([mln/core/essential.hh], [],
+ AC_MSG_ERROR([Cannot find Milena's headers. Try to invoke configure with
+`--with-milena=DIR'.]))
+CPPFLAGS=$swl_save_CPPFLAGS
+AC_SUBST([MILENA_CPPFLAGS])
+
+
+## --------- ##
+## Swilena. ##
+## --------- ##
+
+# Use Libtool.
+# To be replaced by a call to LT_INIT as soon as Libtool 2.2 is used.
+AC_PROG_LIBTOOL
+
+# Ensure dynamic libraries are enabled.
+if test "x$enable_shared" = xno; then
+ AC_MSG_ERROR([Dynamic libraries are disabled. Try to invoke
+configure with `--enable-shared'.])
+fi
+# Check for SWIG.
+AC_PROG_SWIG([1.3.35])
+if (eval "$SWIG -version") >/dev/null 2>&1; then :; else
+ AC_MSG_ERROR([SWIG 1.3.35 is required for Swilena])
+fi
+# Check for Python.
+AM_PATH_PYTHON([2.4], [],
+ [AC_MSG_ERROR([Python 2.4 is required for Swilena.])])
+AS_VERSION_COMPARE([2.5], [$am_cv_python_version],
+ [AC_MSG_WARN([Python 2.6 and greater may not work with Swilena.])])
+adl_CHECK_PYTHON
+# Check for Python headers.
+save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS -I$PYTHONINC"
+AC_CHECK_HEADERS([Python.h], [],
+ [AC_MSG_ERROR([`Python.h' is required for Swilena.
+Try adding `-I <Python include path>' to `CPPFLAGS'.])])
+CPPFLAGS=$save_CPPFLAGS
+
+AC_ARG_VAR([SWILENA_CXXFLAGS], [C++ compiler flags for tools])
+# We want fast binaries for tools.
+if test -z "$SWILENA_CXXFLAGS"; then
+ if test "$GXX" = yes; then
+ SWILENA_CXXFLAGS="-O3 -DNDEBUG -ggdb $WARNINGS_CXXFLAGS"
+ elif test "$ICPC" = yes; then
+ SWILENA_CXXFLAGS="-O3 -DNDEBUG -g $WARNINGS_CXXFLAGS"
+ fi
+fi
+
+AC_CONFIG_FILES([Makefile
+ python/Makefile])
+
+AC_CONFIG_FILES([run], [chmod +x run])
+
+AC_CONFIG_FILES([python/sps:python/sps-common.in:python/sps.in],
+ [chmod +x python/sps])
+AC_CONFIG_FILES([python/sps-local:python/sps-common.in:python/sps-local.in],
+ [chmod +x python/sps-local])
+
+AC_OUTPUT
diff --git a/swilena/configure.gnu b/swilena/configure.gnu
new file mode 100755
index 0000000..09a9463
--- /dev/null
+++ b/swilena/configure.gnu
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+# This `configure.gnu' script is invoked by the parent `configure'
+# instead of `configure' in recursive configurations (see
+# ``Configuring Other Packages in Subdirectories'' in Autoconf's
+# manual). This is convenient to pass extra options, like the path to
+# Milena's source directory.
+#
+# This idea was taken and adapted from this message:
+#
http://lists.gnu.org/archive/html/autoconf/2002-12/msg00116.html
+
+# Is option checking disabled?
+no_option_checking_p=false
+# Is ``--with-milena' not provided?
+no_milena_p=true
+
+for i; do
+ case "$i" in
+ # First try to get SRCDIR from a possible `--srcdir' argument.
+ --srcdir=*) srcdir=`echo "$i" | sed 's/^--srcdir=//'`;;
+ --disable-option-checking) no_option_checking_p=true;;
+ --with-milena*) no_milena_p=false;;
+ esac
+done
+
+# Then try to guess it from this script's path.
+test x"${srcdir+set}" != xset && srcdir=`dirname $0`
+
+# Disabled option checking is a hint that this `configure.gnu' was
+# called from a parent `configure'. If so, and if no `--with-milena'
+# option was provided, pass our own `--with-milena' option to the
+# recursive call to the actual `configure', carrying the path to
+# Milena's source directory.
+if $no_option_checking_p && $no_milena_p; then
+ milena_dir=`cd "$srcdir/../milena" && pwd`
+ exec "$srcdir/configure" ${1+"$@"}
"--with-milena=$milena_dir"
+else
+ exec "$srcdir/configure" ${1+"$@"}
+fi
diff --git a/swilena/img/lena.pgm b/swilena/img/lena.pgm
new file mode 120000
index 0000000..5a1f6d9
--- /dev/null
+++ b/swilena/img/lena.pgm
@@ -0,0 +1 @@
+../../milena/img/lena.pgm
\ No newline at end of file
diff --git a/swilena/m4/pypath.m4 b/swilena/m4/pypath.m4
new file mode 100644
index 0000000..a4e62d1
--- /dev/null
+++ b/swilena/m4/pypath.m4
@@ -0,0 +1,6 @@
+AC_DEFUN([adl_CHECK_PYTHON],
+ [AM_PATH_PYTHON([2.0])
+ AC_CACHE_CHECK([for $am_display_PYTHON includes directory],
+ [adl_cv_python_inc],
+ [adl_cv_python_inc=`$PYTHON -c "from distutils import sysconfig; print
sysconfig.get_python_inc()" 2>/dev/null`])
+ AC_SUBST([PYTHONINC], [$adl_cv_python_inc])])
diff --git a/m4/swig.m4 b/swilena/m4/swig.m4
similarity index 100%
copy from m4/swig.m4
copy to swilena/m4/swig.m4
diff --git a/swilena/python/Makefile.am b/swilena/python/Makefile.am
index 531880f..6a9991f 100644
--- a/swilena/python/Makefile.am
+++ b/swilena/python/Makefile.am
@@ -22,16 +22,17 @@
## FIXME: Factor as much as possible. See how we handled this in TC.
CLEANFILES =
-AM_CPPFLAGS = -I$(PYTHONINC) -I$(top_srcdir)/milena
-TOOLS_CXXFLAGS = @TOOLS_CXXFLAGS@
-AM_CXXFLAGS = $(TOOLS_CXXFLAGS)
-AM_SWIGFLAGS = -Wall -c++ -python -I$(top_srcdir)/milena
+MILENA_CPPFLAGS = @MILENA_CPPFLAGS@
+AM_CPPFLAGS = -I$(PYTHONINC) $(MILENA_CPPFLAGS)
+SWILENA_CXXFLAGS = @SWILENA_CXXFLAGS@
+AM_CXXFLAGS = $(SWILENA_CXXFLAGS)
+AM_SWIGFLAGS = -Wall -c++ -python $(MILENA_CPPFLAGS)
## We build modules, not plain libs.
AM_LDFLAGS = -avoid-version -module -shared
## Run Swig to create the C++ wrapper files, the Python interface
## files, and the dependency Makefile snippets.
-%-wrap.cc %.py: $(top_srcdir)/swilena/%.i
+%-wrap.cc %.py: $(top_srcdir)/%.i
@AMDEP_TRUE@ if $(SWIG) $(AM_SWIGFLAGS) $(SWIGFLAGS) -MD -MF
"$(DEPDIR)/$*-wrap.Tcc" -o $@ $<; then \
@AMDEP_TRUE@ mv -f "$(DEPDIR)/$*-wrap.Tcc"
"$(DEPDIR)/$*-wrap.Pcc";\
@AMDEP_TRUE@ else \
@@ -207,7 +208,7 @@ CLEANFILES += $(bin_SCRIPTS) $(noinst_SCRIPTS)
## Tests. ##
## ------- ##
-include $(top_srcdir)/swilena/run.mk
+include $(top_srcdir)/run.mk
## FIXME: Do we really need to pass top_srcdir and top_builddir to run?
TESTS_ENVIRONMENT = \
diff --git a/swilena/python/data.py b/swilena/python/data.py
index 4a162d9..0d715de 100644
--- a/swilena/python/data.py
+++ b/swilena/python/data.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python
-# Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+# Copyright (C) 2008, 2010 EPITA Research and Development Laboratory (LRDE)
#
# This file is part of Olena.
#
@@ -22,5 +22,5 @@
import os
top_srcdir = os.environ["top_srcdir"]
-img_dir = os.path.join(top_srcdir, "milena", "img")
+img_dir = os.path.join(top_srcdir, "img")
lena = os.path.join (img_dir, "lena.pgm")
diff --git a/swilena/run.mk b/swilena/run.mk
index 993b5d4..e962c2e 100644
--- a/swilena/run.mk
+++ b/swilena/run.mk
@@ -1,4 +1,5 @@
-# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -16,7 +17,7 @@
# A test/script wrapper.
-RUN = $(top_builddir)/swilena/run
-RUN_IN = $(top_srcdir)/swilena/run.in
+RUN = $(top_builddir)/run
+RUN_IN = $(top_srcdir)/run.in
$(RUN): $(RUN_IN)
- cd $(top_builddir)/swilena && $(MAKE) $(AM_MAKEFLAGS) run
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) run
--
1.5.6.5