aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Bullock <jamie@postlude.co.uk>2007-09-05 17:44:23 +0000
committerJamie Bullock <jamie@postlude.co.uk>2007-09-05 17:44:23 +0000
commit9146b4aa6c60da029791138a9859b2bde9f83fd9 (patch)
treedeed2461f91858cf9d6985fa138f15ddfdf19007
parent56deb2426bf484eb62d265bbc23f2136d8fcfadd (diff)
downloadLibXtract-9146b4aa6c60da029791138a9859b2bde9f83fd9.tar.gz
LibXtract-9146b4aa6c60da029791138a9859b2bde9f83fd9.tar.bz2
LibXtract-9146b4aa6c60da029791138a9859b2bde9f83fd9.zip
Updated README and minor buld tweaks for OS X (That will probably break the Linux build (sigh)).
-rw-r--r--README48
-rw-r--r--configure.in47
-rw-r--r--swig/java/Makefile.am8
-rw-r--r--swig/java/test.java2
4 files changed, 79 insertions, 26 deletions
diff --git a/README b/README
index cfbba22..5c71263 100644
--- a/README
+++ b/README
@@ -36,6 +36,54 @@ There following configure flags are optional:
--enable-fft (to enable functions that require fftw3)
--enable-simpletest (to build the simpletest example)
+Building the Python bindings
+----------------------------
+
+To build the python bindings, add to your configure flags:
+
+--enable-swig --with-python
+
+This requres additional dependencies to be resolved:
+
+swig >= 1.3
+python (with development files) >= 2.5
+
+It might work with earlier versions of Python, but this has not been tested.
+
+If you do not have the 'standard' version of Python on OS X, you might need to tell the configure script where the python library is e.g.:
+
+./configure --your-flags LDFLAGS="-L/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/"
+
+to find your Python library type:
+
+locate libpython
+
+Building the Java bindings
+--------------------------
+
+To build the java bindings, add to your configure flags:
+
+--enable-swig --with-java
+
+This requres additional dependencies to be resolved:
+
+swig >= 1.3
+java (with development files) >= 2.0
+
+It might work with other versions of Java, but this has not been tested.
+
+On OS X, you will probably need to set your CLASSPATH environment variable before running ./configure
+
+export CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
+
+On OS X, you also probably need to tell the configure script where to find your Java (JNI) headers.
+
+./configure --flags CFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
+
+To find out where your headers are:
+
+locate jni.h
+
Disclaimer
----------
diff --git a/configure.in b/configure.in
index 5518067..61e94d5 100644
--- a/configure.in
+++ b/configure.in
@@ -98,21 +98,6 @@ AC_ARG_WITH(python,
AM_CONDITIONAL(BUILD_PYTHON, test "x${with_python}" = 'xtrue')
-dnl Are we building with fftw?
-if [[ "$fft" = "true" ]] ; then
- LDFLAGS="$LDFLAGS -lfftw3f"
- AC_DEFINE([BUILD_FFT], [1], [Build the fft functions])
- AC_CHECK_HEADER(fftw3.h, [have_fftw3_hdr=yes ], [
- have_pd_hdr=no
- echo
- echo "no fftw3.h header found. try with option --with-fftw3-dir=/path/to/fftw3/header"
- echo
- exit
- ])
-fi
-
-AM_CONDITIONAL(BUILD_FFT, test "x${fft}" = 'xtrue')
-
dnl are we building the simpletest example
if [[ "$simpletest" = "true" ]] ; then
@@ -166,12 +151,16 @@ fi
if [[ "$with_java" = "true" ]] ; then
AC_PROG_JAVAC
- AC_JNI_INCLUDE_DIR
-
- for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
- do
- CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR"
- done
+ if test "$JAVAC" = "javac"
+ then
+ AC_JNI_INCLUDE_DIR
+
+
+ for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
+ do
+ CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR"
+ done
+ fi
dnl AC_PROG_JAVAH
dnl AC_PATH_PROG(JAVAH,javah)
fi
@@ -184,6 +173,22 @@ fi
AM_CONDITIONAL(BUILD_SWIG, test "x${swig}" = 'xtrue')
+dnl Are we building with fftw?
+if [[ "$fft" = "true" ]] ; then
+ LDFLAGS="$LDFLAGS -lfftw3f"
+ AC_DEFINE([BUILD_FFT], [1], [Build the fft functions])
+ AC_CHECK_HEADER(fftw3.h, [have_fftw3_hdr=yes ], [
+ have_pd_hdr=no
+ echo
+ echo "no fftw3.h header found. try with option --with-fftw3-dir=/path/to/fftw3/header"
+ echo
+ exit
+ ])
+fi
+
+AM_CONDITIONAL(BUILD_FFT, test "x${fft}" = 'xtrue')
+
+
dnl ------------------------------------------
dnl ---- do some magic to gues the host opsys
dnl ---- taken from libvorbis configure.in
diff --git a/swig/java/Makefile.am b/swig/java/Makefile.am
index 5ced699..27a4f93 100644
--- a/swig/java/Makefile.am
+++ b/swig/java/Makefile.am
@@ -44,15 +44,15 @@ xtractjavac_wrap_la_LDFLAGS = \
$(libxtract)
.java.class:
- $(JAVAC) $(AM_JAVACFLAGS) $(JAVACFLAGS) $(swigjavafiles) -d . -classpath .
- cp xtract/core/$@ .
+ $(JAVAC) $(AM_JAVACFLAGS) $(JAVACFLAGS) $(swigjavafiles)
noinst_DATA = jar-stamp
#
jar-stamp: $(javaclasses) $(javafiles)
- $(mkdir_p) xtract/core
- $(mkdir_p) xtract/core/src
+ mkdir -p xtract/core
+ mkdir -p xtract/core/src
cp $(javafiles) xtract/core/src
+ cp $(javaclasses) xtract/core
touch jar-stamp
#
execjavawrapper_LTLIBRARIES = xtractjavac_wrap.la
diff --git a/swig/java/test.java b/swig/java/test.java
index d20461a..0ab5353 100644
--- a/swig/java/test.java
+++ b/swig/java/test.java
@@ -1,5 +1,5 @@
-import xtract.core.*;
+import jxtract.core.*;
public class test {
public static void main(String argv[]) {