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

Mojca Miklavec mojca at
Sun May 3 22:44:01 PDT 2015


We have five different wxWidgets ports. Usually it's enough if a port
that depends on wxWidgets sets something like
in configure flags, but when a development version of a port has to
bootstrap first, autoconf has to find wxwin.m4 which lives in


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

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

I also submitted a feature request to keep a copy of wxwin.m4 in the
sources (which is what many other projects do), but the developers
seem happier not to do it, judging from:

Here's the current version of the port for a reference:

What would you suggest to do?

Thank you,

More information about the macports-dev mailing list