logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

db-4.6-jni-check-prefix-first.patch (1104B)


  1. --- a/dist/aclocal_java/ac_jni_include_dirs.m4
  2. +++ b/dist/aclocal_java/ac_jni_include_dirs.m4
  3. @@ -43,14 +43,19 @@
  4. *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
  5. esac
  6. -_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
  7. -_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
  8. -case "$host_os" in
  9. - darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
  10. - _JINC="$_JTOPDIR/Headers";;
  11. - *) _JINC="$_JTOPDIR/include";;
  12. -esac
  13. -
  14. +# If JAVAPREFIX is defined, look there first
  15. +if test -r "$JAVAPREFIX/include/jni.h"; then
  16. + _JTOPDIR="$JAVAPREFIX"
  17. + _JINC="$JAVAPREFIX/include"
  18. +else
  19. + _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
  20. + _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
  21. + case "$host_os" in
  22. + darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
  23. + _JINC="$_JTOPDIR/Headers";;
  24. + *) _JINC="$_JTOPDIR/include";;
  25. + esac
  26. +fi
  27. # If we find jni.h in /usr/include, then it's not a java-only tree, so
  28. # don't add /usr/include or subdirectories to the list of includes.
  29. # An extra -I/usr/include can foul things up with newer gcc's.