Hi, Reply to this mail thread: https://lists.gnu.org/archive/html/autoconf-patches/2025-01/msg00014.html https://lists.gnu.org/archive/html/autoconf-patches/2025-01/msg00015.html https://lists.gnu.org/archive/html/autoconf-patches/2025-01/msg00016.html https://lists.gnu.org/archive/html/autoconf-patches/2025-02/msg00000.html https://lists.gnu.org/archive/html/autoconf-patches/2025-02/msg00004.html https://lists.gnu.org/archive/html/autoconf-patches/2025-03/msg00000.html https://lists.gnu.org/archive/html/autoconf-patches/2025-04/msg00000.html https://lists.gnu.org/archive/html/autoconf-patches/2025-04/msg00001.html https://lists.gnu.org/archive/html/autoconf-patches/2025-05/msg00000.html https://lists.gnu.org/archive/html/autoconf-patches/2025-05/msg00004.html
In <https://lists.gnu.org/archive/html/autoconf-patches/2025-04/msg00000.html> Paul Eggert renamed the variable A68 → A68C, with the rationale: "Use the shell variable A68C, not A68, for the compiler. This is for consistency of names compared to support for other languages like Go." In <https://lists.gnu.org/archive/html/autoconf-patches/2025-05/msg00000.html> José Marchesi renamed the variable A68FLAGS → A68CFLAGS, with the rationale: "as mandated by the GCS" The result of these renamings makes no sense to me: 1) The GNU Algol 68 compiler is meant to be named 'ga68', not 'ga68c'. [1] The prefix 'g' is specific for the GNU implementation; it's normal to ignore it here, when we talk about conventions that should encompass non-GNU implementations as well. 2) The GCS [2] has examples where the variable name is the program name, uppercased. 3) As a result, users would be looking for a command 'a68c', but there is no such command. I'm bringing this up because a similar case will be with the GNU Modula-2 compiler, when we want to support it in Autoconf and Automake. * The GNU Modula-2 compiler is called 'gm2'. Therefore it will be natural (per GCS [2]) to call the variables M2 and M2FLAGS. * Calling the variable M2C would be very very confusing, because there is a Modula-2 to C translator called 'm2c' [3][4][5] and, unlike gm2, it produces C code, not an executable. And the big picture should also consider the GNU D compiler, when we want to support it in Autoconf and Automake. * The GNU D compiler is called 'gdc'. Therefore, and because a 1-letter variable 'D' would be really odd, it makes sense to called the program variable 'DC'. * Whether the flags variable is then called DFLAGS (for consistency with CFLAGS) or DCFLAGS (per GCS [2]), can be debated. I think part of the problem comes from looking at the Go support. * Go is different than Algol 68 and Modula-2. The reference implementation ('go') and the GNU implementation ('gccgo') are multi-purpose programs. To compile a program, one uses $ go build foo.go or $ gccgo build foo.go To compile and run a program, one uses $ go run foo.go or $ gccgo run foo.go * The AC_PROG_GO macro [6] sets variables GOC and GOFLAGS. Which already violates the letter of the GCS [2]. Since the AC_PROG_GO macro already violates the letter of the GCS [2] and is instead following the rule "The compiler options for programming language X is in variable XFLAGS", it is hard to reach both goals at the same time: (I) Following the letter of the GCS [2], (II) Consistency with the existing language support in Autoconf. I can see two reasonable ways of naming the variables; the current proposal from José is, unfortunately, not among them: Proposal A: Define (I) as the more important goal. GO GOFLAGS A68 A68FLAGS M2 M2FLAGS DC DCFLAGS This implies changing AC_PROG_GO so that it defines the GO variable, and deprecating the GOC variable. Proposal B: Define (II) as the more important goal. GOC GOFLAGS A68 or A68C A68FLAGS M2 M2FLAGS DC DFLAGS Here (II) is nearly fulfilled, except that we cannot use M2C as variable, as explained above. So, goal (II) is not entirely reached. Instead, the *FLAGS variable depends on the programming language, not on the compiler command. Goal (I) cannot be reached either, but it's a reasonable compromise nevertheless. Bruno [1] https://gitweb.git.savannah.gnu.org/gitweb/?p=automake.git;a=blob;f=t/a68-demo.sh;h=a69d2328bbe7d74c65bdfd19be2e49e7b30a038f;hb=HEAD#l19 [2] https://www.gnu.org/prep/standards/html_node/Command-Variables.html [3] https://www.mathematik.uni-ulm.de/modula/man/man1/m2c.html [4] https://www.nongnu.org/m2c/ [5] https://github.com/m2sf/m2c [6] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Go-Compiler.html