Skip to content

Commit 6e55fdf

Browse files
author
Lawrence Nahum
committed
Re-apply unmerged secp-zkp patch
commit 14be601 Author: Jon Griffiths <jon_p_griffiths@yahoo.com> Date: Sun Jul 9 18:13:00 2017 +1200 secp: Don't fail JNI dependency checks if we can build a JNI program Not all setups will result in JNI_INCLUDE_DIRS having a value, in particular android builds from installed toolchain directories have the JNI headers installed in the standard include directories. Instead of failing if the configure macro didn't to find a directory based on the installed java runtime, only fail if we cannot build a JNI-using program. This works better for cross compiling and setups where the the user wants to compile with one Java and build against another. This will be submitted upstream in due course.
1 parent 773ff90 commit 6e55fdf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/secp256k1/configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ if test x"$use_jni" != x"no"; then
483483
if test "x$JNI_INCLUDE_DIRS" = "x"; then
484484
have_jni_dependencies=no
485485
fi
486+
if test "x$have_jni_dependencies" = "xno"; then
487+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jni.h>]])], [have_jni_dependencies=yes])
488+
fi
486489
if test "x$have_jni_dependencies" = "xno"; then
487490
if test x"$use_jni" = x"yes"; then
488491
AC_MSG_ERROR([jni support explicitly requested but headers/dependencies were not found. Enable ECDH and try again.])

0 commit comments

Comments
 (0)