Re: [PATCH] Algol68: do not clobber A68FLAGS in AC_PROG_A68
Arsen Arsenović <[email protected]> Thu, 05 Feb 2026 12:55:43 +0100
| Newsgroups | gmane.comp.sysutils.autoconf.patches |
|---|---|
| Message-ID | <[email protected]> |
--=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Jose E. Marchesi" <[email protected]> writes: > [Sam James found this issue while packaging godcc for Gentoo: > https://packages.gentoo.org/packages/dev-util/godcc. Would be nice if > we could have this fixed in autoconf 2.73.] > > The AC_PROG_A68 macro should honor the A68FLAGS set by the user at > configure time. > > Note that a similar fix may be needed in AC_PROG_GO. I have not fixed > that one because it may be intentional there? (unlikely, but just in > case.) > > Signed-off-by: Jose E. Marchesi <[email protected]> > > * lib/autoconf/a68.m4: Do not clobber A68FLAGS in AC_PROG_A68. > --- > lib/autoconf/a68.m4 | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/lib/autoconf/a68.m4 b/lib/autoconf/a68.m4 > index 96aee3fc..462199a3 100644 > --- a/lib/autoconf/a68.m4 > +++ b/lib/autoconf/a68.m4 > @@ -124,7 +124,9 @@ AC_DEFUN([AC_LANG_COMPILER(Algol 68)], > AN_MAKEVAR([A68], [AC_PROG_A68]) > AN_PROGRAM([ga68], [AC_PROG_A68]) > AC_DEFUN([AC_PROG_A68], > -[AC_LANG_PUSH(Algol 68)dnl > +[ac_test_A68FLAGS=3D${A68FLAGS+y} > +ac_save_A68FLAGS=3D$A68FLAGS > +AC_LANG_PUSH(Algol 68)dnl > AC_ARG_VAR([A68], [Algol 68 compiler command])dnl > AC_ARG_VAR([A68FLAGS], [Algol 68 compiler flags])dnl > _AC_ARG_VAR_LDFLAGS()dnl > @@ -148,6 +150,10 @@ ac_compiler=3D$[2] > _AC_DO_LIMIT([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) > m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl > m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl > -A68FLAGS=3D"-g -O2" > +if test $ac_test_A68FLAGS; then Note that this may fail wrongly: ~$ ac_test_A68FLAGS=3D'-e 123' ~$ test $ac_test_A68FLAGS || echo fail fail Probably, what you want is: test x"$ac_test_A68FLAGS" !=3D x See (autoconf)Limitations of Builtins > + A68FLAGS=3D$ac_save_A68FLAGS > +else > + A68FLAGS=3D"-g -O2" > +fi > AC_LANG_POP(Algol 68)dnl > ])# AC_PROG_A68 =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQECBAEWCgCqFiEE/uKz0RP8AKMWLWBhUsKUMB6ixJMFAmmEhT8bFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGRUUyQjNEMTEzRkMwMEEzMTYyRDYw NjE1MkMyOTQzMDFFQTJDNDkzEBxhcnNlbkBhYXJzZW4ubWUACgkQUsKUMB6ixJNX qgD/bm+LxfFtpJkzPgEhYZGMo55cjQoGg3otAIsX6jkuEdoA+wZiEn20iYNuMYFE 2joc+ccymGzN2xf9iQtZUIOLFlEE =r4Ez -----END PGP SIGNATURE----- --=-=-=--