db-4.3-jni-check-prefix-first.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. --- dist/aclocal_java/ac_jni_include_dirs.ac 2003-10-06 20:41:38.000000000 +0200
  2. +++ dist/aclocal_java/ac_jni_include_dirs.ac 2005-09-23 21:31:26.000000000 +0200
  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.