From 464adb9e71b7d06bbc22022cf62fb5211a8d28f3 Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Tue, 5 Aug 2014 23:31:01 +0000
Subject: [PATCH] More non-ABI-specific script

---
 app/src/main/jniLibs/build.sh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/app/src/main/jniLibs/build.sh b/app/src/main/jniLibs/build.sh
index 0b6995369..fbd56d629 100755
--- a/app/src/main/jniLibs/build.sh
+++ b/app/src/main/jniLibs/build.sh
@@ -69,6 +69,17 @@ if [ ! -d "$GMP" ]; then
     exit 1
 fi
 
+if [ `uname -s` = "Darwin" ]; then
+    export JAVA_HOME=$(/usr/libexec/java_home)
+else
+    [ -z $JAVA_HOME ] && . $I2PBASE/core/c/find-java-home
+fi
+if [ ! -f "$JAVA_HOME/include/jni.h" ]; then
+    echo "Cannot find jni.h! Looked in '$JAVA_HOME/include/jni.h'"
+    echo "Please set JAVA_HOME to a java home that has the JNI"
+    exit 1
+fi
+
 #
 # API level, pulled from ../AndroidManifest.xml
 #
@@ -153,17 +164,6 @@ fi
 echo "Building GMP..."
 make || exit 1
 
-if [ `uname -s` = "Darwin" ]; then
-    export JAVA_HOME=$(/usr/libexec/java_home)
-else
-    [ -z $JAVA_HOME ] && . $I2PBASE/core/c/find-java-home
-fi
-if [ ! -f "$JAVA_HOME/include/jni.h" ]; then
-    echo "Cannot find jni.h! Looked in '$JAVA_HOME/include/jni.h'"
-    echo "Please set JAVA_HOME to a java home that has the JNI"
-    exit 1
-fi
-
 COMPILEFLAGS="-fPIC -Wall"
 INCLUDES="-I. -I$JBIGI/jbigi/include -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
 LINKFLAGS="-shared -Wl,-soname,libjbigi.so,--fix-cortex-a8"
-- 
GitLab