diff --git a/acinclude.m4 b/acinclude.m4 index be6fc2e..9dd948a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -10,6 +10,8 @@ AC_DEFUN([FIND_FILE], [ IFS=: for ac__path in $3 do + # IFS doesn't consolidate consecutive delimiters + ac__path=$(echo "$ac__path" | sed 's/:*$//') if test -r "$ac__path/$2" ; then IFS="$ac__save_ifs" AC_MSG_RESULT([$ac__path]) diff --git a/configure.ac b/configure.ac index 7426e3b..7ae4df3 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,7 @@ if test z$with_jni_headers != zcross ; then # Find jni_md.h JOIN_EACH([platform_include_paths], [$include_paths], [$with_jni_headers]) FIND_FILE([jni_md_h_dir], [jni_md.h], - [$platform_include_paths $include_paths]) + [$platform_include_paths:$include_paths]) JNI_CFLAGS="\"-I$jni_h_dir\" \"-I$jni_md_h_dir\"" else # For cross builds, we don't have the OpenJDK jni_md.h for the target