The Redland Bindings require a previously built and installed Redland package with the same version number. In particular, the header files, shared libraries and SWIG interface files that Redland provides are required for most language bindings. An alternative to installation is to extract the Redland sources in a parent directory or a sibling directory called 'librdf'.
There are several ways to get the sources. The most stable and tested versions are the sources shipped with each release and these are recommended as the first place to start. For the latest developent sources, anonymous Subversion access is available but this may require some configuring of developer tools that are not needed for the snapshot releases.
The source bundle and package files contain all the HTML files and documentation provided on the web site.
The released sources and available from http://download.librdf.org/source/ master site as well as the SourceForge site.
NOTE: Redland Bindings switched to use Subversion for version control after the 1.0.3.1 release. If you were using CVS, you will need to re-check out the sources.
svn checkout http://svn.librdf.org/repository/bindings/trunk/ mv trunk bindings cd bindings
At this stage, or after a svn update
you will
need to create the automake and autoconf derived files, as described
below in Create the configure program
by using the autogen.sh
script.
Building the Redland bindings in this way requires some particular
development tools not needed when building from snapshot releases -
automake, autoconf and swig.
The autogen.sh
script looks for the newest versions
of the auto* tools and checks that they meet the minimum versions.
Redland bindings uses the GNU automake and autoconf to handle
system dependency checking. configure
tries very hard
to find several programs and libraries that the Redland bindings
need. These include the binding binaries: perl, python, etc.,
headers for the bindings such as the JDK, Python etc. and various
others. A summary of the parts found is given at the end of the
configure run. Several options to configure given below can be used
to point to locations or names of dependencies that cannot be
automatically determined.
Redland Bindings is developed and built on x86 GNU/Linux (Redhat Fedora Core 4, Debian unstable) but is also regularly tested on sparc Sun Solaris, x86 FreeBSD, ppc Apple OSX and as part of Redland on several other systems via the SourceForge compile farm (typically AMD64, Alpha, Solaris x86, OpenBSD, NetBSD).
configure
programIf there is no configure
program, you can create it
by running the autogen.sh
script, as long as you have the
automake and
autoconf
tools. This is done by:
./autogen.sh
and you can also pass along arguments intended for configure (see below for what these are):
./autogen.sh --prefix=/usr/local/somewhere
Alternatively you can run the automake and autoconf programs by hand with:
aclocal; autoheader; automake --add-missing; autoconf
The automake and autoconf tools have many different versions and at present development is being done with automake 1.8.3 (minimum version 1.7), autoconf 2.59 (minimum version 2.54) and libtool 1.5.4 (minimum version 1.4). These are only needed when compiling from Subversion sources. autogen.sh enforces the requirements. In future development will move to require automake 1.8, autoconf 2.58 and libtool 1.5.
configure
See also the generic GNU installation instructions in
INSTALL for information about general options
such as --prefix
etc.
--with-perl
(=PERL-COMMAND)--with-php
(=PHP-COMMAND)--with-python
(=PYTHON-COMMAND)--with-ruby
(=RUBY-COMMAND)Enable the given language APIs - the default is to build no language APIs automatically. If the option value is omitted or yes, configure will guess the location of the language command. If the option value is no or no option is given, the language API will be disabled - this is the default, not to build any language API.
If the option is given a value, that is used as the appropriate
language command to use. For example --with-ruby=ruby1.8
will use the 'ruby1.8' binary, whereas --with-ruby
will use
'ruby' as the binary, both of these will be searched for in the PATH.
An absolute path could alternatively be given such as
--with-python=/opt/mypython/bin/python
to use a python installation in a different location.
--with-python-ldflags
(=FLAGS)Set the linker flags for linking Python. This can also be
done by setting the environment variable PYTHON_LDFLAGS
.
If neither is set, configure
will guess an appropriate
set for the current system. Cygwin example:
-with-python-ldflags='-shared -L/usr/lib/python2.5/config -lpython2.5'
--with-python-libext
=.EXTSet the python shared library link extension (default .so
).
Useful on systems where .so does not work as a shared library extension.
Cygwin example:
-with-python-libext=.dll
--with-redland=
system
or internal
This option tells the bindings to use either the system installed version of redland or an internal version, in a parent or sibling directory as described above. If the option is omittted, the system one is prefered, and if none is available, configure will stop.
If everything is in the default place, do:
./configure
More commonly you will be doing something like this, indicating which binding or bindings are wanted:
./configure --with-python
If you are having problems with configuring several times when adding or removing options, you may have to tidy up first with either of these:
make clean rm -f config.cache
make
You can build and run the built-in tests for Redland with:
make check
which will run these tests for the enabled languages. These may fail if the main redland libraries (librdf and raptor, rasqal) are not installed but are used in nearby source trees. So in this case you should install redland, raptor and rasqal first
The language-specific tests can also be built and run with:
cd language make check
To install the bindings, do:
make install
Otherwise, the language-specific installations can be made with:
cd language make install
There are many examples for all of the language interfaces in the
corresponding sub-directories such as perl/example.pl
which may be easier to modify.
See the Redland Perl Interface document for full information on installing and using Redland from Perl.
See the Redland Python Interface document for full information on installing and using Redland from Python.
See the Redland Ruby Interface document for full information on installing and using Redland from Ruby.
See the Redland PHP Interface document for full information on installing and using Redland from PHP.
Copyright (C) 2004-2008 Dave Beckett
Copyright (C) 2004-2005 University of Bristol