--- i2p-0.8.7/core/c/jbigi/build_jbigi.sh.orig	2011-07-29 11:52:43.000000000 +0200
+++ i2p-0.8.7/core/c/jbigi/build_jbigi.sh	2011-07-29 11:53:43.000000000 +0200
@@ -3,8 +3,8 @@
 # When executed in Linux/FreeBSD: Produces an libjbigi.so
 # Darwin produces libjbigi.jnilib, right?
 
-CC="gcc"
+test -z "$CC" && CC="gcc"
 
 case `uname -sr` in
 MINGW*)
 	JAVA_HOME="c:/software/j2sdk1.4.2_05"
@@ -57,5 +55,7 @@
 
 echo "Compiling C code..."
 rm -f jbigi.o $LIBFILE
-$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c
-$CC $LINKFLAGS $INCLUDES $INCLUDELIBS -o $LIBFILE jbigi.o $STATICLIBS
+echo $CC -c $COMPILEFLAGS $CFLAGS $CPPFLAGS $INCLUDES ../../jbigi/src/jbigi.c
+$CC -c $COMPILEFLAGS $CFLAGS $CPPFLAGS $INCLUDES ../../jbigi/src/jbigi.c
+echo $CC $LINKFLAGS $LDFLAGS $INCLUDES -o $LIBFILE jbigi.o $STATICLIBS $INCLUDELIBS
+$CC $LINKFLAGS $LDFLAGS $INCLUDES -o $LIBFILE jbigi.o $STATICLIBS $INCLUDELIBS
