[PATCH] a68: add --enable-algol68-posix-prelude
Mohammad-Reza Nabipoor
mnabipoor@gnu.org
Wed Nov 5 23:25:12 GMT 2025
Hi Jose.
On Wed, Nov 05, 2025 at 10:36:42PM +0100, Jose E. Marchesi wrote:
>
> I thought the idea was to:
>
> > (BTW I can integrate `configure.tgt' in my earlier patch if you don't mind).
>
> i.e. to set the posix build flag by filtering targets/hosts in configure.tgt?
>
Yes. I started from there. And realized that integration of `configure.tgt' works
better when one is dealing with disabling/enabling libFOO.
For that scenario, we have to have `libFOO/configure.tgt' file, and source that
file once in top-level `configure.ac' and once in `libFOO/configure.ac'.
But what we're doing here is not disabling `libga68' (as we consider it necessary
for ga68), but we want to disable a subset of `libga68' and subset of `gcc/algol68'
features (namely POSIX prelude support in the language and in the runtime).
So the check should be happen in `libga68/configure.ac' and
`gcc/algol68/configure.ac' files, and I couldn't figure out where to put
`configure.tgt' to be accessible to both `libga68' and `gcc/algol68'.
Instead I just copied the logic of `configure.tgt' after defining the
`AC_ARG_ENABLE', like this:
```
case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu | \
*-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* | \
*-*-solaris2* | *-*-hpux11* | *-*-darwin* | *-*-aix*)
enable_algol68_posix_prelude=yes
;;
*)
enable_algol68_posix_prelude=no
;;
esac
```
And I think a little bit of dupplication is easier than finding a place
for hiding a few lines of shell code.
Sorry for not being explicit when sending the patch!
Regards,
Mohammad-Reza
More information about the Algol68
mailing list