I'm trying to configure Eclipse CDT 2019-12 to build an old project that uses autotools. There is an autogen.sh script, but it is not included in the directory which holds configure.ac and the other source files. Looking at the Eclipse Autotools user guide, that might be the reason why running 'Reconfigure project' does not use autogen.sh. but runs autoreconf.
I redefined Autotools > Configure Settings > autogen > Command to use a relative path, but that didn't help. Redefining Autotools > General > Tools Settings > autoreconf leads to an internal error (NullPointerException).
What can I do to help Eclipse find and execute the off source directory autogen.sh?
The directory containing configure.ac
, and therefore where the configure
script also resides and / or is created, is the root of the project's source tree by definition. In a well-formed Autotools project, there should not be any build system artifacts outside the source tree because the contents of the source tree define what gets packaged and distributed.
Moreover, it is my understanding and recollection that Eclipse relies on that in defining its logical view of an Autotools project. Eclipse goes to some trouble to try to prevent project building from accessing files outside the spaces specified in the project configuration. It does not particularly surprise me that it does not recognize an autogen.sh
file outside the source tree, no matter how you try to specify its location.
First off, it would be worthwhile examining the autogen script to determine whether it's actually doing anything needful that autoreconf
does not do, or if it may be intentionally omitting anything that autoreconf
does. It may be that letting Eclipse use autoreconf
instead of autogen.sh
will work just fine.
If in fact you need Eclipse to use autogen.sh
, then your best bet is probably to copy it into the source directory and update the copy appropriately for its new location.