How to properly set "variant-dependent" ACLOCAL_PATH (or better proposals)?

Mojca Miklavec mojca at
Mon May 4 00:31:53 PDT 2015

On Mon, May 4, 2015 at 8:45 AM, Ryan Schmidt wrote:
> On May 4, 2015, at 12:44 AM, Mojca Miklavec wrote:
>> We have five different wxWidgets ports. Usually it's enough if a port
>> that depends on wxWidgets sets something like
>>    --with-wxdir=${wxWidgets.wxdir}
>> in configure flags, but when a development version of a port has to
>> bootstrap first, autoconf has to find wxwin.m4 which lives in
>>     "${wxWidgets.prefix}/share/aclocal/wxwin.m4
>> ($prefix/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/share/aclocal/wxwin.m4)
>> The ideal solution would probably be if any of the five wxWidgets
>> ports would install the latest version of wxwin.m4 into
>> $prefix/share/local/wxwin.m4. But I assume that probably means
>> creating a new port just for that single file which seems like a tiny
>> bit of an overkill (unless wxWidgets_select would exceptionally be
>> used to install also that file).
> But files installed by a _select port are for users to use, not for other ports to use.

I was thinking of a single file that would be installed
unconditionally. (But yes, that would be "violating the conventions"
of what a *_select port is meant to be used for.)

>> An alternative solution is to copy wxwin.m4 into "${worksrcpath}/m4/"
>> inside every variant:
>>    post-patch {
>>        file mkdir ${worksrcpath}/m4
>>        file copy  ${wxWidgets.prefix}/share/aclocal/wxwin.m4 ${worksrcpath}/m4
>>    }
>> Or to set ACLOCAL_PATH during the autoconf phase. But I don't know how
>> to do that (which variable has to be set). I tried cornfigure.env, but
>> it doesn't seem that those variables would be set when running
>> autoconf.cmd.
> Did you try autoconf.env?

No, not until now. And it works. Thank you.

Would adding
    autoconf.env-append ACLOCAL_PATH=${wxWidgets.prefix}/share/aclocal
to the wxWidgets PortGroup would be a good or a bad idea?


More information about the macports-dev mailing list