Files
i2p.android.base/core/c
dream 8b372ad306 Fixed build.sh
jbigi's build.sh had a number of failed assumptions as per where I2P and JAVA_HOME were which needed to be removed and a warning put in their place. A better solution would be to have some way to search for JAVA_HOME and I2P in common locations, but at least this solution works if you do it manually:

I2P=~i2p JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.20 sh build.sh dynamic

thank zzz for prodding me to do this
2010-06-03 03:35:46 +00:00
..
2010-06-03 03:35:46 +00:00
2008-02-21 14:53:50 +00:00
2009-03-30 05:31:40 +00:00
2008-05-12 13:47:15 +00:00

If you have a libgmp.so installed on your system already
(check in /usr/lib), you can build a dynamically linked libjbigi.so as follows:
	cd jbigi
	build.sh dynamic
The built library is jbigi/lib/libjbigi.so .
	
Otherwise, prior to building the jbigi library, you will need to fetch the GMP source
from http://www.swox.com/gmp/, saving it to jbigi/gmp-4.2.2.tar.bz2 (it will
be unpacked and built as necessary).

Version 4.2.2 has not been extensively tested with I2P. If you would like
to use a well-tested version, get gmp-4.1.4.tar.bz2, and edit jbigi/build.sh
to change the version number.

To build the native jbigi and jcpuid libraries for the current host CPU,
simply run sh build.sh and the results will be packaged up into jbigi.jar
and the libjbigi.so library. To test, copy jbigi/lib/libjbigi.so
and jcpuid/lib/freenet/support/CPUInformation/libjcpuid-*.so
to your i2p/ directory. You can also copy jbigi.jar to the i2p/lib/ directory;
it will be used only if the router fails to load the native library.

To build the native jbigi libraries for all supported CPUs (on the current OS),
go into jbigi/ and run build-all.sh (the results will be under jbigi/lib/)

The build.sh script runs two speed tests, one with your existing
I2P installation and one with the new libjbigi.

Alternatively, after copying the files to the i2p/ directory,
to run a speed test comparing the native library to the java library,
run the shell script below. Adjust the I2P= line as necessary.

-----------------

#!/bin/sh
export I2P=~/i2p
java -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger