How can I determine if a function is available?
ryandesign at macports.org
Sun Apr 8 22:30:06 PDT 2007
I would like to improve the php5 port so that both an Apache 1 or 2
module and the FastCGI binary can be installed at the same time. The
php build system does not accommodate targeting multiple SAPIs at
once. Therefore it will be necessary to have port build once for the
Apache module of choice, and then build again for the FastCGI module.
I would like to make use of the strategy that was briefly employed by
the zlib port to re-run the configure and build phases, but I need
some advice, because of the following two commits:
In r23238, the command "command" was removed, and a new command
"command_exec" was introduced, but this change did not make it into
In r23409, it was shown how this change will affect portfiles: a
wrapper which called 'system "[command $cmd]"' was replaced with just
So as I understand it, in MacPorts 1.4.0, I must use a wrapper which
calls 'system "[command $cmd]"'. But whenever r23238 is merged into a
released version of MacPorts (be that 1.4.1 or 1.5.0), this code will
break, and it will then be necessary to use "command_exec $cmd".
Is there a way that I can code my portfile today that will work with
both current and future MacPorts versions? Is there a way that I can
detect which of "command" or "command_exec" are available in the
installed version of MacPorts?
More information about the macports-dev