Patch ./configure, or use autogen.sh instead?
list+macports-dev at jdlh.com
Tue Feb 15 08:28:24 UTC 2022
[resend, sent to old domain name at first, sorry]
I am working on a port, where I want to patch a couple of autoconf
macros and configure.ac . The unpatched macros give
-Wimplicit-function-declaration errors, but they are easy to fix via
patches. However, I discovered that the ./configure script incorporates
the unpatched behaviour of the macros, so `port configure` still causes
the -Wimplicit-function-declaration errors.
The codebase supplies a script, ./autogen.sh . It runs autoconf,
libtool, etc. etc. and regenerates the ./configure script, incorporating
the fixes from the patched macros. It accepts the same options as
./configure, and passes them on when it calls ./configure .
I see two ways to solve this:
a) tell the Portfile to use ./autogen.sh as the configure command. Let
every user rebuild the ./configure script
b) patch the ./configure script with the same fixes as the autoconf macros.
Doing a) means the port will have build dependencies on autoconf,
automake, etc. etc., and will take longer to run. But will it fail?
Doing b) means I have to patch something which I think perhaps I should
not be patching. I don't see guidance about this, but it feels like a
I think that telling the Portfile to use ./autogen.sh is simply a matter
of these directives:
depends_build port:pkgconfig \
 Major rewrite of freeciv port, https://trac.macports.org/ticket/62984
. --Jim DeLaHunt, Vancouver, Canada
More information about the macports-dev