Discussion:
[patch #9644] AX_JNI_INCLUDE_DIR incorrect without host_os defined
Carnë Draug
2018-05-27 21:42:59 UTC
Permalink
URL:
<http://savannah.gnu.org/patch/?9644>

Summary: AX_JNI_INCLUDE_DIR incorrect without host_os defined
Project: GNU Autoconf Archive
Submitted by: carandraug
Submitted on: Sun 27 May 2018 09:42:57 PM UTC
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

The macro AX_JNI_INCLUDE_DIR makes use of the variable host_os. This variable
is only set after calling AC_CANONICAL_HOST. However, AX_JNI_INCLUDE_DIR does
not call AC_CANONICAL_HOST and does not document that AC_CANONICAL_HOST should
be called first.

At the moment, what happens is that host_os is empty, there's no check for it,
and so the returned list of directories is incomplete.

I have patched it by calling AC_CANONICAL_HOST and documenting the
implications mentioned on the autoconf manual.



_______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 27 May 2018 09:42:57 PM UTC Name:
0001-ax_jni_include_dir.m4-call-AC_CANONICAL_HOST-to-make.patch Size: 1KiB
By: carandraug

<http://savannah.gnu.org/patch/download.php?file_id=44234>

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/patch/?9644>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
Peter Simons
2018-05-29 10:03:14 UTC
Permalink
Update of patch #9644 (project autoconf-archive):

Status: None => In Progress
Assigned to: None => simons

_______________________________________________________

Follow-up Comment #1:

I believe the proper way to express that dependency is to add

AC_REQUIRE(AC_CANONICAL_HOST)

to the source code. Autoconf actually implements dependencies between macros
and it's important to use that mechanism because it matters where the body of
that macro is expanded and AC_REQUIRE makes sure this is done correctly.

The section "10.4.1 Prerequisite Macros" in the manual has further details.

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/patch/?9644>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
Carnë Draug
2018-05-29 12:02:02 UTC
Permalink
Follow-up Comment #2, patch #9644 (project autoconf-archive):

You're right. I have attached a modified patch.

(file #44239)
_______________________________________________________

Additional Item Attachment:

File name: 0001-ax_jni_include_dir.m4-require-AC_CANONICAL_HOST-to-m.patch
Size:1 KB


_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/patch/?9644>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
Peter Simons
2018-05-29 12:29:05 UTC
Permalink
Update of patch #9644 (project autoconf-archive):

Status: In Progress => Done
Open/Closed: Open => Closed

_______________________________________________________

Follow-up Comment #3:

Applied in a67f384249afcacd78137f274685cfc6d25078f9. Thank you very much.

_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/patch/?9644>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Loading...