Prefix of other ports from my_port/Makefile?

Aron Stansvik elvstone at
Wed Mar 5 22:39:25 UTC 2008

Hello freebsd-ports@

This is my first post.

My question is if it's possible to get the prefix under which another
port was installed from within the Makefile of my own port?

My port depends on security/cyrus-sasl2, hence I have:

LIB_DEPENDS+=           sasl2.2:${PORTSDIR}/security/cyrus-sasl2

But what I would also need to do is set the following variables in the
configure environment of my port:


Or otherwise the configure script will not find the libsasl2 includes
or libraries. From what I can tell from other ports that require this,
people just use:

${LOCALBASE}/include and

for this. But what if cyrus-sasl2 was installed in another prefix, say
/var/tmp/foobar ?

Can I somehow get the prefix under which cyrus-sasl2 was installed,
and use that as a base instead of ${LOCALBASE}, which may or may not
be correct?

I ran into this issue when I tried to install my port along with its
dependencies into a prefix other than ${LOCALBASE}.

Thanks for any answers.

Aron Stansvik

More information about the freebsd-ports mailing list