autogen.sh is quite often just a wrapper around autoreconf -i. If you run 'autoreconf --install' (which is what 'use_autoreconf yes' runs), in many/most cases it's equivalent to running autogen.sh.
https://stackoverflow.com/questions/50044091/what-is-the-job-of-autogen-sh-when-building-a-c-package-on-linux -- Jason Liu On Wed, Feb 16, 2022 at 11:15 PM Jim DeLaHunt <list+macports-...@jdlh.com> wrote: > On 2022-02-15 01:08, Joshua Root wrote: > > > > On 2022-2-15 19:28 , Jim DeLaHunt wrote: > >> I am working on a port[1], where I want to patch a couple of autoconf > >> macros[2] and configure.ac .... > >> 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.... > >> > >> 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.... > > > > ...We have a shortcut for option a) by the way: 'use_autoreconf yes'. > That > > adds the needed deps for you and usually works fine on its own (plus > > 'autoreconf.args -fi' if you want to regenerate absolutely everything > > from scratch), but if special options are needed, you can also set > > 'autoreconf.cmd ./autogen.sh'.... > > Thank you for the reply, Joshua. > > You mention autoreconf. I just learned something new! I did not know > about autoreconf[1], a tool included in autoconf. > > It looks like upstream does not use autoreconf. They have a shell script > `autogen.sh`. For all I know it is something they created themselves. > Like autoreconf, it runs autoconf, automake, libtoolize, etc. etc. I > have no assurance that I can replace it with autoreconf. > > Thus I think I will try running ./autogen.sh in place of ./configure, > and see how far that gets me. It is good to know that patching > ./configure is not out of the question. > > Best regards, > --Jim DeLaHunt > > [1] > < > https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/autoreconf-Invocation.html > > >