Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial JNI configuration #157
base: java-interop
Are you sure you want to change the base?
Initial JNI configuration #157
Changes from 11 commits
7dbe688
8ac6f69
70f22e1
b7b8b42
1493f2f
0c1eb53
ea840e3
3cfe83d
bb76d66
c1944d1
85be0ef
694669b
86b62c3
708c0e4
9e9c908
8b142f5
56aac26
35e8c3b
caf9f31
78262a1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file and most others in cobc miss a ChangeLog entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please tab-indent and move down to after the variable definitions (C89 compat)
this feature itself is part of a different PR, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do an exception check afterwards, as done for normal calls; also add the
ON EXCEPTION
/NOT ON EXCEPTION
codegen; possibly by moving those parts out ofoutput_call()
and executing them also in the 'CB_CONV_JAVA` part.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure that there are multiple issues with this...
I did sent a mail to the original author of those macros to possibly sort some out...
For now I suggest to replace the first three lines with manual code using
AC_CHECK_PROG[JAVA]
, then set JAVAC (also allow to override that) and finally call ab adjustedAX_PROG_JAVA_WORKS
+AX_PROG_JAVAC_WORKS
. Those need to be adjusted to not abort (noAC_MSG_ERROR
) if they don't work, allowing to, depending on user-request, either a) error in configure.ac or b) warn and not enable jni depending.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only do this if
JNI_CFLAGS
are not set externally (and rename toJNI_CFLAGS
, not because it is right but because all other [mostly pkgconfig] definitions use that)after this part check for jni.h and skip/abort if it isn't found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part should be separate and only set
JNI_LIBS
if they aren't set alreadyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this define should be outside (in the "else" part of the code below, when all checks worked)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part should be outside and only run if all of the above works (java, javac, jni.h)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those should not be directly set to
AC_SUBST
but useAC_ARG_VAR
instead (see BDB_LIBS for an example);drop
JNI_LDFLAGS
here and above, useJNI_LIBS
(and renamedJNI_CFLAGS
in the Makefile)