On 2026-02-09 13:35:08, Peter Barada wrote:
> I'm looking at trying to port an application to Nuttx that configures using
> autoconf, and wondering if there are any examples/application someone can
> point me to that invokes an autoconf generated configure script in its build
> process? Google keeps trying to point me toward tools/configure.sh...

I have added autoconf app to nuttx, but you won't like the answer. Because in
nuttx I did not use autoconf at all ;) I just set CFLAGS based on kconfig
options - this replaces autoconf part and generating config.h. You may need to
touch that config.h if your app has no #ifdef for it.

If you have own ac files like program.h.in, you can generate proper program.h in
makefile using "sed" to replace @CONFIG@ with real values.

This is what I have done to compile out of tree app in nuttx that uses autoconf

https://github.com/apache/nuttx-apps/blob/master/system/psmq/Makefile

This downloads tar.gz, checks hash for validity, generates config.h from
config.h.in, and builds it.

AFAIK there is no automatic way to do autoconf in nuttx like you can do in
buildroot. That's something you would have to very deeply explore. So it's
either that or practically making custom Makefile just for nuttx.

I suppose you could do something like

    app-workdir/config.h:
        app-workdir/configure.sh --options --cflags-for-compiler --etc

    context:: app-workdir/config.h


But it may be tricky to provide all needed info for toolchain to configure.

Attachment: signature.asc
Description: PGP signature

Reply via email to