Bug 56866

Summary: [PATCH] build: Correctly use AC_(PATH|CHECK)_TOOL
Product: APR Reporter: Timothy Gu <timothygu99>
Component: APRAssignee: Apache Portable Runtime bugs mailinglist <bugs>
Status: NEW ---    
Severity: minor Keywords: PatchAvailable
Priority: P2    
Version: HEAD   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch fixing the issue

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.

Thanks!
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).