Re: apr-1-config --includedir returns invalid output

Ruediger Pluem <[email protected]> Thu, 22 May 2025 19:16:04 +0200
Newsgroups gmane.comp.apache.apr.devel
Message-ID <[email protected]>

On 5/22/25 6:57 PM, Rafał Lalik wrote:
> Hi,
> 
> I just subscribed, my first e-mail here. I am not a daily apr user, I
> just spotted an issue in my gentoo while compiling kdevelop, which
> uses apr as dependency.
> 
> So, in my apr:
> $apr-1-config --version
> 1.7.5
> $ apr-1-config --includedir
> /bin/apr-1-config//usr/include/apr-1
> 
> The includedir output contains also path to config script itself.
> 
> I was trying to inspect the code and I see that apr-config.in has in line 66:
> 
> APR_TARGET_DIR=${normalized_command%${normalized_bindir}/apr-${APR_MAJOR_VERSION}-config};
> 
> which is a path to the config script, and the same time
> $APR_TARGET_DIR is used as a prefix to paths, e.g.:
> 
> line 151: flags="$APR_TARGET_DIR/$includedir"

On my various systems the output is correct (be it installed or in the source directory).
The above line only triggers in the case of cross compilation. I currently have no cross compiled setup at hand.
Opinions by others?

Regards

Rüdiger