Bug 56866 - [PATCH] build: Correctly use AC_(PATH|CHECK)_TOOL
Summary: [PATCH] build: Correctly use AC_(PATH|CHECK)_TOOL
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: HEAD
Hardware: PC Linux
: P2 minor (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
Keywords: PatchAvailable
Depends on:
Reported: 2014-08-17 23:59 UTC by Timothy Gu
Modified: 2015-04-04 21:04 UTC (History)
0 users

Patch fixing the issue (3.43 KB, patch)
2014-08-17 23:59 UTC, Timothy Gu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Gu 2014-08-17 23:59:36 UTC
Created attachment 31924 [details]
Patch fixing the issue

AC_*_PROG is used for system programs like `sed` and `rm`; however it is not for programs that are part of a toolchain, like `cpp`, `as`, and `mysql_config`. When cross compiling the tools have the host triplet prefixed.

Right now, when cross-compiling to i686-w64-mingw32 configure shows:

checking for rm... rm
checking for as... as
checking for cpp... cpp
checking for i686-w64-mingw32-ar... i686-w64-mingw32-ar

Notice how the `ar` check is correct, while the as and cpp ones are not.

With the patch, it shows:

checking for rm... rm
checking for i686-w64-mingw32-as... i686-w64-mingw32-as
checking for i686-w64-mingw32-cpp... i686-w64-mingw32-cpp
checking for i686-w64-mingw32-ar... i686-w64-mingw32-ar
Comment 1 Jeff Trawick 2015-04-04 19:24:20 UTC
Committed to trunk with a typo fix that broke it for me; I'll attempt to get someone else to review and then (if I remember) I'll backport to the currently maintained apr and apr-util 1.x branches.

Comment 2 Timothy Gu 2015-04-04 21:04:22 UTC
Thank you!

Sorry about the TOOl typo BTW. Didn't notice it until now (8 months after I submitted the patch).