[RFC 3/3] a68: build system changes for Algol 68 code in libga68

Jose E. Marchesi jemarch@gnu.org
Wed Dec 10 16:42:22 GMT 2025


This commit changes the build system to make it possible to use Algol
68 code in libga68, using the built ga68 compiler.  The changes are:

- The GA68, GA68FLAGS, GA68_FOR_TARGET, GA68FLAGS_FOR_TARGET and
  GA68_FOR_BUILD variables have been renamed to A68, A68FLAGS,
  A68_FOR_TARGET, A68FLAGS_FOR_TARGET and A68_FOR_BUILD respectively.
  This is to homologate them to the variable names used in upstream
  autoconf and automake for Algol 68.

- The upstream autoconf Algol 68 support has been backported to
  libga68/m4/autoconf.m4 so we can use AC_PROG_A68 and friends with
  autoconf 2.69.

- Rules for building Algol 68 code are added to libga68/Makefile.am,
  as well as changes to build and use standard.lo.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

config/ChangeLog

	* acx.m4: Rename ACX_PROG_GA68 to ACX_PROG_A68.
	Set A68 instead of GA68.

ChangeLog

	* Makefile.def: Rename GA68 to A68.
	Rename GA68FLAGS to A68FLAGS.
	Rename GA68_FOR_TARGET to A68_FOR_TARGET.
	Rename GA68FLAGS_FOR_TARGET to A68FLAGS_FOR_TARGET.
	* Makefile.tpl: Likewise.
	* configure.ac: Likewise.
	* Makefile.in: Regenerate.
	* configure: Likewise.

libga68/ChangeLog

	* configure.ac: Do not set GA68FLAGS.
	Call AC_PROG_A68.
	* Makefile.am: Add standard.lo.
	Add rules to build Algol 68 code.
	* acinclude.m4: New file.
	* m4/autoconf.m4: Likewise.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* aclocal.m4: Likewise.
---
 Makefile.def           |   8 +-
 Makefile.in            |  42 ++++----
 Makefile.tpl           |  34 +++---
 config/acx.m4          |   4 +-
 configure              | 152 +++++++++++++--------------
 configure.ac           |  18 ++--
 libga68/Makefile.am    |  23 +++-
 libga68/Makefile.in    |  40 +++++--
 libga68/acinclude.m4   |  11 ++
 libga68/aclocal.m4     |   1 +
 libga68/configure      | 232 ++++++++++++++++++++++++++++++++++++++++-
 libga68/configure.ac   |   1 +
 libga68/m4/autoconf.m4 | 131 +++++++++++++++++++++++
 13 files changed, 552 insertions(+), 145 deletions(-)
 create mode 100644 libga68/acinclude.m4
 create mode 100644 libga68/m4/autoconf.m4

diff --git a/Makefile.def b/Makefile.def
index 627121e87bc..cde69c9c9f7 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -314,8 +314,8 @@ flags_to_pass = { flag= GNATBIND ; };
 flags_to_pass = { flag= GNATMAKE ; };
 flags_to_pass = { flag= GDC ; };
 flags_to_pass = { flag= GDCFLAGS ; };
-flags_to_pass = { flag= GA68 ; };
-flags_to_pass = { flag= GA68FLAGS ; };
+flags_to_pass = { flag= A68 ; };
+flags_to_pass = { flag= A68FLAGS ; };
 
 // Target tools
 flags_to_pass = { flag= AR_FOR_TARGET ; };
@@ -332,8 +332,8 @@ flags_to_pass = { flag= GOC_FOR_TARGET ; };
 flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= GDC_FOR_TARGET ; };
 flags_to_pass = { flag= GDCFLAGS_FOR_TARGET ; };
-flags_to_pass = { flag= GA68_FOR_TARGET ; };
-flags_to_pass = { flag= GA68FLAGS_FOR_TARGET ; };
+flags_to_pass = { flag= A68_FOR_TARGET ; };
+flags_to_pass = { flag= A68FLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= GM2_FOR_TARGET ; };
 flags_to_pass = { flag= GM2FLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= LD_FOR_TARGET ; };
diff --git a/Makefile.in b/Makefile.in
index ef49d3a4c03..ae0892e7933 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -160,8 +160,8 @@ BUILD_EXPORTS = \
 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
 	GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
-	GA68="$(GA68_FOR_BUILD)"; export GA68; \
-	GA68FLAGS="$(GA68FLAGS_FOR_BUILD)"; export GA68FLAGS; \
+	A68="$(A68_FOR_BUILD)"; export A68; \
+	A68FLAGS="$(A68FLAGS_FOR_BUILD)"; export A68FLAGS; \
 	GOC="$(GOC_FOR_BUILD)"; export GOC; \
 	GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
 	GDC="$(GDC_FOR_BUILD)"; export GDC; \
@@ -205,7 +205,7 @@ HOST_EXPORTS = \
 	CXX="$(CXX)"; export CXX; \
 	CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
 	GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
-	GA68="$(GA68)"; export GA68; \
+	A68="$(A68)"; export A68; \
 	GOC="$(GOC)"; export GOC; \
 	GDC="$(GDC)"; export GDC; \
 	GM2="$(GM2)"; export GM2; \
@@ -281,11 +281,11 @@ POSTSTAGE1_HOST_EXPORTS = \
 	CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \
 	$(POSTSTAGE1_CXX_EXPORT) \
 	$(LTO_EXPORTS) \
-	GA68="$$r/$(HOST_SUBDIR)/prev-gcc/ga68$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
-	  -B$(build_tooldir)/bin/ $(GA68FLAGS_FOR_TARGET) \
+	A68="$$r/$(HOST_SUBDIR)/prev-gcc/ga68$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
+	  -B$(build_tooldir)/bin/ $(A68FLAGS_FOR_TARGET) \
 	  -B$$r/prev-$(TARGET_SUBDIR)/libga68/.libs"; \
-	export GA68; \
-	GA68_FOR_BUILD="$$GA68"; export GA68_FOR_BUILD; \
+	export A68; \
+	A68_FOR_BUILD="$$A68"; export A68_FOR_BUILD; \
 	GDC="$$r/$(HOST_SUBDIR)/prev-gcc/gdc$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
 	  -B$(build_tooldir)/bin/ $(GDCFLAGS_FOR_TARGET) \
 	  -B$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/gcc \
@@ -318,7 +318,7 @@ BASE_TARGET_EXPORTS = \
 	CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
 	CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
 	GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
-	GA68="$(GA68_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GA68; \
+	A68="$(A68_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export A68; \
 	GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
 	GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \
 	GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
@@ -389,7 +389,7 @@ CXX_FOR_BUILD = @CXX_FOR_BUILD@
 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
 DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@
 GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
-GA68_FOR_BUILD = @GA68_FOR_BUILD@
+A68_FOR_BUILD = @A68_FOR_BUILD@
 GOC_FOR_BUILD = @GOC_FOR_BUILD@
 GDC_FOR_BUILD = @GDC_FOR_BUILD@
 GM2_FOR_BUILD = @GM2_FOR_BUILD@
@@ -453,7 +453,7 @@ STRIP = @STRIP@
 WINDRES = @WINDRES@
 WINDMC = @WINDMC@
 
-GA68 = @GA68@
+A68 = @A68@
 GDC = @GDC@
 GNATBIND = @GNATBIND@
 GNATMAKE = @GNATMAKE@
@@ -464,7 +464,7 @@ LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
 GOCFLAGS = $(CFLAGS)
-GA68FLAGS = @GA68FLAGS@
+A68FLAGS = @A68FLAGS@
 GDCFLAGS = @GDCFLAGS@
 GM2FLAGS = $(CFLAGS)
 
@@ -690,7 +690,7 @@ CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@
 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
 GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
 GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-GA68_FOR_TARGET=$(STAGE_CC_WRAPPER) @GA68_FOR_TARGET@
+A68_FOR_TARGET=$(STAGE_CC_WRAPPER) @A68_FOR_TARGET@
 GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
 GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
@@ -720,7 +720,7 @@ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
 LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
 GM2FLAGS_FOR_TARGET = -O2 -g
 GOCFLAGS_FOR_TARGET = -O2 -g
-GA68FLAGS_FOR_TARGET = -O2 -g
+A68FLAGS_FOR_TARGET = -O2 -g
 GDCFLAGS_FOR_TARGET = -O2 -g
 
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
@@ -907,8 +907,8 @@ BASE_FLAGS_TO_PASS = \
 	"GNATMAKE=$(GNATMAKE)" \
 	"GDC=$(GDC)" \
 	"GDCFLAGS=$(GDCFLAGS)" \
-	"GA68=$(GA68)" \
-	"GA68FLAGS=$(GA68FLAGS)" \
+	"A68=$(A68)" \
+	"A68FLAGS=$(A68FLAGS)" \
 	"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
 	"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
 	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
@@ -923,8 +923,8 @@ BASE_FLAGS_TO_PASS = \
 	"GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
 	"GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \
 	"GDCFLAGS_FOR_TARGET=$(GDCFLAGS_FOR_TARGET)" \
-	"GA68_FOR_TARGET=$(GA68_FOR_TARGET)" \
-	"GA68FLAGS_FOR_TARGET=$(GA68FLAGS_FOR_TARGET)" \
+	"A68_FOR_TARGET=$(A68_FOR_TARGET)" \
+	"A68FLAGS_FOR_TARGET=$(A68FLAGS_FOR_TARGET)" \
 	"GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
 	"GM2FLAGS_FOR_TARGET=$(GM2FLAGS_FOR_TARGET)" \
 	"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
@@ -999,7 +999,7 @@ EXTRA_HOST_FLAGS = \
 	'DSYMUTIL=$(DSYMUTIL)' \
 	'GFORTRAN=$(GFORTRAN)' \
 	'GOC=$(GOC)' \
-	'GA68=$(GA68)' \
+	'A68=$(A68)' \
 	'GDC=$(GDC)' \
 	'GM2=$(GM2)' \
 	'LD=$(LD)' \
@@ -1028,7 +1028,7 @@ STAGE1_FLAGS_TO_PASS = \
 POSTSTAGE1_FLAGS_TO_PASS = \
 	CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
 	CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
-	GA68="$${GA68}" GA68_FOR_BUILD="$${GA68_FOR_BUILD}" \
+	A68="$${A68}" A68_FOR_BUILD="$${A68_FOR_BUILD}" \
 	GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
 	GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
 	GNATBIND="$${GNATBIND}" \
@@ -1064,8 +1064,8 @@ EXTRA_TARGET_FLAGS = \
 	'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
 	'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
 	'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-	'GA68=$$(GA68_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
-	'GA68FLAGS=$$(GA68FLAGS_FOR_TARGET)' \
+	'A68=$$(A68_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+	'A68FLAGS=$$(A68FLAGS_FOR_TARGET)' \
 	'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
 	'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
 	'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
diff --git a/Makefile.tpl b/Makefile.tpl
index 362a21b2aff..7e801641661 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -163,8 +163,8 @@ BUILD_EXPORTS = \
 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
 	GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
-	GA68="$(GA68_FOR_BUILD)"; export GA68; \
-	GA68FLAGS="$(GA68FLAGS_FOR_BUILD)"; export GA68FLAGS; \
+	A68="$(A68_FOR_BUILD)"; export A68; \
+	A68FLAGS="$(A68FLAGS_FOR_BUILD)"; export A68FLAGS; \
 	GOC="$(GOC_FOR_BUILD)"; export GOC; \
 	GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
 	GDC="$(GDC_FOR_BUILD)"; export GDC; \
@@ -208,7 +208,7 @@ HOST_EXPORTS = \
 	CXX="$(CXX)"; export CXX; \
 	CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
 	GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
-	GA68="$(GA68)"; export GA68; \
+	A68="$(A68)"; export A68; \
 	GOC="$(GOC)"; export GOC; \
 	GDC="$(GDC)"; export GDC; \
 	GM2="$(GM2)"; export GM2; \
@@ -284,11 +284,11 @@ POSTSTAGE1_HOST_EXPORTS = \
 	CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \
 	$(POSTSTAGE1_CXX_EXPORT) \
 	$(LTO_EXPORTS) \
-	GA68="$$r/$(HOST_SUBDIR)/prev-gcc/ga68$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
-	  -B$(build_tooldir)/bin/ $(GA68FLAGS_FOR_TARGET) \
+	A68="$$r/$(HOST_SUBDIR)/prev-gcc/ga68$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
+	  -B$(build_tooldir)/bin/ $(A68FLAGS_FOR_TARGET) \
 	  -B$$r/prev-$(TARGET_SUBDIR)/libga68/.libs"; \
-	export GA68; \
-	GA68_FOR_BUILD="$$GA68"; export GA68_FOR_BUILD; \
+	export A68; \
+	A68_FOR_BUILD="$$A68"; export A68_FOR_BUILD; \
 	GDC="$$r/$(HOST_SUBDIR)/prev-gcc/gdc$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
 	  -B$(build_tooldir)/bin/ $(GDCFLAGS_FOR_TARGET) \
 	  -B$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/gcc \
@@ -321,7 +321,7 @@ BASE_TARGET_EXPORTS = \
 	CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
 	CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
 	GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
-	GA68="$(GA68_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GA68; \
+	A68="$(A68_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export A68; \
 	GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
 	GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \
 	GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
@@ -392,7 +392,7 @@ CXX_FOR_BUILD = @CXX_FOR_BUILD@
 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
 DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@
 GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
-GA68_FOR_BUILD = @GA68_FOR_BUILD@
+A68_FOR_BUILD = @A68_FOR_BUILD@
 GOC_FOR_BUILD = @GOC_FOR_BUILD@
 GDC_FOR_BUILD = @GDC_FOR_BUILD@
 GM2_FOR_BUILD = @GM2_FOR_BUILD@
@@ -456,7 +456,7 @@ STRIP = @STRIP@
 WINDRES = @WINDRES@
 WINDMC = @WINDMC@
 
-GA68 = @GA68@
+A68 = @A68@
 GDC = @GDC@
 GNATBIND = @GNATBIND@
 GNATMAKE = @GNATMAKE@
@@ -467,7 +467,7 @@ LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
 GOCFLAGS = $(CFLAGS)
-GA68FLAGS = @GA68FLAGS@
+A68FLAGS = @A68FLAGS@
 GDCFLAGS = @GDCFLAGS@
 GM2FLAGS = $(CFLAGS)
 
@@ -613,7 +613,7 @@ CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@
 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
 GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
 GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
-GA68_FOR_TARGET=$(STAGE_CC_WRAPPER) @GA68_FOR_TARGET@
+A68_FOR_TARGET=$(STAGE_CC_WRAPPER) @A68_FOR_TARGET@
 GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
 GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
@@ -643,7 +643,7 @@ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
 LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
 GM2FLAGS_FOR_TARGET = -O2 -g
 GOCFLAGS_FOR_TARGET = -O2 -g
-GA68FLAGS_FOR_TARGET = -O2 -g
+A68FLAGS_FOR_TARGET = -O2 -g
 GDCFLAGS_FOR_TARGET = -O2 -g
 
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
@@ -748,7 +748,7 @@ EXTRA_HOST_FLAGS = \
 	'DSYMUTIL=$(DSYMUTIL)' \
 	'GFORTRAN=$(GFORTRAN)' \
 	'GOC=$(GOC)' \
-	'GA68=$(GA68)' \
+	'A68=$(A68)' \
 	'GDC=$(GDC)' \
 	'GM2=$(GM2)' \
 	'LD=$(LD)' \
@@ -777,7 +777,7 @@ STAGE1_FLAGS_TO_PASS = \
 POSTSTAGE1_FLAGS_TO_PASS = \
 	CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
 	CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
-	GA68="$${GA68}" GA68_FOR_BUILD="$${GA68_FOR_BUILD}" \
+	A68="$${A68}" A68_FOR_BUILD="$${A68_FOR_BUILD}" \
 	GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
 	GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
 	GNATBIND="$${GNATBIND}" \
@@ -813,8 +813,8 @@ EXTRA_TARGET_FLAGS = \
 	'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
 	'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
 	'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
-	'GA68=$$(GA68_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
-	'GA68FLAGS=$$(GA68FLAGS_FOR_TARGET)' \
+	'A68=$$(A68_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+	'A68FLAGS=$$(A68FLAGS_FOR_TARGET)' \
 	'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
 	'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
 	'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
diff --git a/config/acx.m4 b/config/acx.m4
index 4e0c64172e6..7304d7b82ad 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -435,10 +435,10 @@ else
 fi])
 
 # Test for Algol 68
-AC_DEFUN([ACX_PROG_GA68],
+AC_DEFUN([ACX_PROG_A68],
 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
 AC_REQUIRE([AC_PROG_CC])
-AC_CHECK_TOOL(GA68, ga68, no)])
+AC_CHECK_TOOL(A68, ga68, no)])
 
 # Test for D.
 AC_DEFUN([ACX_PROG_GDC],
diff --git a/configure b/configure
index e59746f3d00..234eda49ad5 100755
--- a/configure
+++ b/configure
@@ -620,7 +620,7 @@ AR_FOR_TARGET
 GM2_FOR_TARGET
 GDC_FOR_TARGET
 GOC_FOR_TARGET
-GA68_FOR_TARGET
+A68_FOR_TARGET
 GFORTRAN_FOR_TARGET
 GCC_FOR_TARGET
 CXX_FOR_TARGET
@@ -634,7 +634,7 @@ GREP
 CPP
 PKG_CONFIG_PATH
 GDCFLAGS
-GA68FLAGS
+A68FLAGS
 READELF
 OTOOL
 OBJDUMP
@@ -667,7 +667,7 @@ LDFLAGS_FOR_BUILD
 GNATMAKE_FOR_BUILD
 GDC_FOR_BUILD
 GOC_FOR_BUILD
-GA68_FOR_BUILD
+A68_FOR_BUILD
 GFORTRAN_FOR_BUILD
 DSYMUTIL_FOR_BUILD
 DLLTOOL_FOR_BUILD
@@ -731,7 +731,7 @@ HAVE_CXX14
 do_compare
 CARGO
 GDC
-GA68
+A68
 GNATMAKE
 GNATBIND
 ac_ct_CXX
@@ -913,7 +913,7 @@ CC_FOR_TARGET
 CXX_FOR_TARGET
 GCC_FOR_TARGET
 GFORTRAN_FOR_TARGET
-GA68_FOR_TARGET
+A68_FOR_TARGET
 GOC_FOR_TARGET
 GDC_FOR_TARGET
 GM2_FOR_TARGET
@@ -1722,8 +1722,8 @@ Some influential environment variables:
               GCC for the target
   GFORTRAN_FOR_TARGET
               GFORTRAN for the target
-  GA68_FOR_TARGET
-              GA68 for the target
+  A68_FOR_TARGET
+              A68 for the target
   GOC_FOR_TARGET
               GOC for the target
   GDC_FOR_TARGET
@@ -4322,7 +4322,7 @@ if test "${build}" != "${host}" ; then
   DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
   DSYMUTIL_FOR_BUILD=${DSYMUTIL_FOR_BUILD-dsymutil}
   GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
-  GA68_FOR_BUILD=${GA68_FOR_BUILD-ga68}
+  A68_FOR_BUILD=${A68_FOR_BUILD-ga68}
   GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
   GDC_FOR_BUILD=${GDC_FOR_BUILD-gdc}
   GNATMAKE_FOR_BUILD=${GNATMAKE_FOR_BUILD-gnatmake}
@@ -4339,7 +4339,7 @@ else
   DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
   DSYMUTIL_FOR_BUILD="\$(DSYMUTIL)"
   GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
-  GA68_FOR_BUILD="\$(GA68)"
+  A68_FOR_BUILD="\$(A68)"
   GOC_FOR_BUILD="\$(GOC)"
   GDC_FOR_BUILD="\$(GDC)"
   GNATMAKE_FOR_BUILD="\$(GNATMAKE)"
@@ -5865,11 +5865,11 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ga68; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_GA68+:} false; then :
+if ${ac_cv_prog_A68+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$GA68"; then
-  ac_cv_prog_GA68="$GA68" # Let the user override the test.
+  if test -n "$A68"; then
+  ac_cv_prog_A68="$A68" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5878,7 +5878,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_GA68="${ac_tool_prefix}ga68"
+    ac_cv_prog_A68="${ac_tool_prefix}ga68"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5888,10 +5888,10 @@ IFS=$as_save_IFS
 
 fi
 fi
-GA68=$ac_cv_prog_GA68
-if test -n "$GA68"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GA68" >&5
-$as_echo "$GA68" >&6; }
+A68=$ac_cv_prog_A68
+if test -n "$A68"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A68" >&5
+$as_echo "$A68" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -5899,17 +5899,17 @@ fi
 
 
 fi
-if test -z "$ac_cv_prog_GA68"; then
-  ac_ct_GA68=$GA68
+if test -z "$ac_cv_prog_A68"; then
+  ac_ct_A68=$A68
   # Extract the first word of "ga68", so it can be a program name with args.
 set dummy ga68; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_GA68+:} false; then :
+if ${ac_cv_prog_ac_ct_A68+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_GA68"; then
-  ac_cv_prog_ac_ct_GA68="$ac_ct_GA68" # Let the user override the test.
+  if test -n "$ac_ct_A68"; then
+  ac_cv_prog_ac_ct_A68="$ac_ct_A68" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5918,7 +5918,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_GA68="ga68"
+    ac_cv_prog_ac_ct_A68="ga68"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5928,17 +5928,17 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_GA68=$ac_cv_prog_ac_ct_GA68
-if test -n "$ac_ct_GA68"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GA68" >&5
-$as_echo "$ac_ct_GA68" >&6; }
+ac_ct_A68=$ac_cv_prog_ac_ct_A68
+if test -n "$ac_ct_A68"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_A68" >&5
+$as_echo "$ac_ct_A68" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_GA68" = x; then
-    GA68="no"
+  if test "x$ac_ct_A68" = x; then
+    A68="no"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -5946,10 +5946,10 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    GA68=$ac_ct_GA68
+    A68=$ac_ct_A68
   fi
 else
-  GA68="$ac_cv_prog_GA68"
+  A68="$ac_cv_prog_A68"
 fi
 
 
@@ -14390,7 +14390,7 @@ fi
 
 
 
-GA68FLAGS=${GA68FLAGS-${CFLAGS}}
+A68FLAGS=${A68FLAGS-${CFLAGS}}
 
 
 GDCFLAGS=${GDCFLAGS-${CFLAGS}}
@@ -15721,23 +15721,23 @@ fi
 
 
 
-if test -n "$GA68_FOR_TARGET"; then
-  ac_cv_prog_GA68_FOR_TARGET=$GA68_FOR_TARGET
-elif test -n "$ac_cv_prog_GA68_FOR_TARGET"; then
-  GA68_FOR_TARGET=$ac_cv_prog_GA68_FOR_TARGET
+if test -n "$A68_FOR_TARGET"; then
+  ac_cv_prog_A68_FOR_TARGET=$A68_FOR_TARGET
+elif test -n "$ac_cv_prog_A68_FOR_TARGET"; then
+  A68_FOR_TARGET=$ac_cv_prog_A68_FOR_TARGET
 fi
 
-if test -n "$ac_cv_prog_GA68_FOR_TARGET"; then
+if test -n "$ac_cv_prog_A68_FOR_TARGET"; then
   for ncn_progname in ga68; do
     # Extract the first word of "${ncn_progname}", so it can be a program name with args.
 set dummy ${ncn_progname}; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_GA68_FOR_TARGET+:} false; then :
+if ${ac_cv_prog_A68_FOR_TARGET+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$GA68_FOR_TARGET"; then
-  ac_cv_prog_GA68_FOR_TARGET="$GA68_FOR_TARGET" # Let the user override the test.
+  if test -n "$A68_FOR_TARGET"; then
+  ac_cv_prog_A68_FOR_TARGET="$A68_FOR_TARGET" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -15746,7 +15746,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_GA68_FOR_TARGET="${ncn_progname}"
+    ac_cv_prog_A68_FOR_TARGET="${ncn_progname}"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -15756,10 +15756,10 @@ IFS=$as_save_IFS
 
 fi
 fi
-GA68_FOR_TARGET=$ac_cv_prog_GA68_FOR_TARGET
-if test -n "$GA68_FOR_TARGET"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GA68_FOR_TARGET" >&5
-$as_echo "$GA68_FOR_TARGET" >&6; }
+A68_FOR_TARGET=$ac_cv_prog_A68_FOR_TARGET
+if test -n "$A68_FOR_TARGET"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A68_FOR_TARGET" >&5
+$as_echo "$A68_FOR_TARGET" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -15769,12 +15769,12 @@ fi
   done
 fi
 
-if test -z "$ac_cv_prog_GA68_FOR_TARGET" && test -n "$with_build_time_tools"; then
+if test -z "$ac_cv_prog_A68_FOR_TARGET" && test -n "$with_build_time_tools"; then
   for ncn_progname in ga68; do
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
 $as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
     if test -x $with_build_time_tools/${ncn_progname}; then
-      ac_cv_prog_GA68_FOR_TARGET=$with_build_time_tools/${ncn_progname}
+      ac_cv_prog_A68_FOR_TARGET=$with_build_time_tools/${ncn_progname}
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
       break
@@ -15785,18 +15785,18 @@ $as_echo "no" >&6; }
   done
 fi
 
-if test -z "$ac_cv_prog_GA68_FOR_TARGET"; then
+if test -z "$ac_cv_prog_A68_FOR_TARGET"; then
   for ncn_progname in ga68; do
     if test -n "$ncn_target_tool_prefix"; then
       # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_GA68_FOR_TARGET+:} false; then :
+if ${ac_cv_prog_A68_FOR_TARGET+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$GA68_FOR_TARGET"; then
-  ac_cv_prog_GA68_FOR_TARGET="$GA68_FOR_TARGET" # Let the user override the test.
+  if test -n "$A68_FOR_TARGET"; then
+  ac_cv_prog_A68_FOR_TARGET="$A68_FOR_TARGET" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -15805,7 +15805,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_GA68_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+    ac_cv_prog_A68_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -15815,10 +15815,10 @@ IFS=$as_save_IFS
 
 fi
 fi
-GA68_FOR_TARGET=$ac_cv_prog_GA68_FOR_TARGET
-if test -n "$GA68_FOR_TARGET"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GA68_FOR_TARGET" >&5
-$as_echo "$GA68_FOR_TARGET" >&6; }
+A68_FOR_TARGET=$ac_cv_prog_A68_FOR_TARGET
+if test -n "$A68_FOR_TARGET"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A68_FOR_TARGET" >&5
+$as_echo "$A68_FOR_TARGET" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -15826,16 +15826,16 @@ fi
 
 
     fi
-    if test -z "$ac_cv_prog_GA68_FOR_TARGET" && test $build = $target ; then
+    if test -z "$ac_cv_prog_A68_FOR_TARGET" && test $build = $target ; then
       # Extract the first word of "${ncn_progname}", so it can be a program name with args.
 set dummy ${ncn_progname}; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_GA68_FOR_TARGET+:} false; then :
+if ${ac_cv_prog_A68_FOR_TARGET+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$GA68_FOR_TARGET"; then
-  ac_cv_prog_GA68_FOR_TARGET="$GA68_FOR_TARGET" # Let the user override the test.
+  if test -n "$A68_FOR_TARGET"; then
+  ac_cv_prog_A68_FOR_TARGET="$A68_FOR_TARGET" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -15844,7 +15844,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_GA68_FOR_TARGET="${ncn_progname}"
+    ac_cv_prog_A68_FOR_TARGET="${ncn_progname}"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -15854,10 +15854,10 @@ IFS=$as_save_IFS
 
 fi
 fi
-GA68_FOR_TARGET=$ac_cv_prog_GA68_FOR_TARGET
-if test -n "$GA68_FOR_TARGET"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GA68_FOR_TARGET" >&5
-$as_echo "$GA68_FOR_TARGET" >&6; }
+A68_FOR_TARGET=$ac_cv_prog_A68_FOR_TARGET
+if test -n "$A68_FOR_TARGET"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A68_FOR_TARGET" >&5
+$as_echo "$A68_FOR_TARGET" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -15865,19 +15865,19 @@ fi
 
 
     fi
-    test -n "$ac_cv_prog_GA68_FOR_TARGET" && break
+    test -n "$ac_cv_prog_A68_FOR_TARGET" && break
   done
 fi
 
-if test -z "$ac_cv_prog_GA68_FOR_TARGET" ; then
+if test -z "$ac_cv_prog_A68_FOR_TARGET" ; then
   set dummy ga68
   if test $build = $target ; then
-    GA68_FOR_TARGET="$2"
+    A68_FOR_TARGET="$2"
   else
-    GA68_FOR_TARGET="${ncn_target_tool_prefix}$2"
+    A68_FOR_TARGET="${ncn_target_tool_prefix}$2"
   fi
 else
-  GA68_FOR_TARGET="$ac_cv_prog_GA68_FOR_TARGET"
+  A68_FOR_TARGET="$ac_cv_prog_A68_FOR_TARGET"
 fi
 
 
@@ -20351,9 +20351,9 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ga68" >&5
 $as_echo_n "checking where to find the target ga68... " >&6; }
 if test "x${build}" != "x${host}" ; then
-  if expr "x$GA68_FOR_TARGET" : "x/" > /dev/null; then
+  if expr "x$A68_FOR_TARGET" : "x/" > /dev/null; then
     # We already found the complete path
-    ac_dir=`dirname $GA68_FOR_TARGET`
+    ac_dir=`dirname $A68_FOR_TARGET`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
 $as_echo "pre-installed in $ac_dir" >&6; }
   else
@@ -20373,17 +20373,17 @@ else
   esac
   if test $ok = yes; then
     # An in-tree tool is available and we can use it
-    GA68_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/ga68 -B$$r/$(HOST_SUBDIR)/gcc/'
+    A68_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/ga68 -B$$r/$(HOST_SUBDIR)/gcc/'
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
 $as_echo "just compiled" >&6; }
-  elif expr "x$GA68_FOR_TARGET" : "x/" > /dev/null; then
+  elif expr "x$A68_FOR_TARGET" : "x/" > /dev/null; then
     # We already found the complete path
-    ac_dir=`dirname $GA68_FOR_TARGET`
+    ac_dir=`dirname $A68_FOR_TARGET`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
 $as_echo "pre-installed in $ac_dir" >&6; }
   elif test "x$target" = "x$host"; then
     # We can use an host tool
-    GA68_FOR_TARGET='$(GA68)'
+    A68_FOR_TARGET='$(A68)'
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
 $as_echo "host tool" >&6; }
   else
diff --git a/configure.ac b/configure.ac
index 2fb385961df..d9142e46867 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1457,7 +1457,7 @@ if test "${build}" != "${host}" ; then
   DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
   DSYMUTIL_FOR_BUILD=${DSYMUTIL_FOR_BUILD-dsymutil}
   GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
-  GA68_FOR_BUILD=${GA68_FOR_BUILD-ga68}
+  A68_FOR_BUILD=${A68_FOR_BUILD-ga68}
   GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
   GDC_FOR_BUILD=${GDC_FOR_BUILD-gdc}
   GNATMAKE_FOR_BUILD=${GNATMAKE_FOR_BUILD-gnatmake}
@@ -1474,7 +1474,7 @@ else
   DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
   DSYMUTIL_FOR_BUILD="\$(DSYMUTIL)"
   GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
-  GA68_FOR_BUILD="\$(GA68)"
+  A68_FOR_BUILD="\$(A68)"
   GOC_FOR_BUILD="\$(GOC)"
   GDC_FOR_BUILD="\$(GDC)"
   GNATMAKE_FOR_BUILD="\$(GNATMAKE)"
@@ -1528,7 +1528,7 @@ int main() {}])],
 fi
 
 ACX_PROG_GNAT
-ACX_PROG_GA68
+ACX_PROG_A68
 ACX_PROG_GDC
 ACX_PROG_CARGO
 ACX_PROG_CMP_IGNORE_INITIAL
@@ -3931,7 +3931,7 @@ AC_SUBST(CXX_FOR_BUILD)
 AC_SUBST(DLLTOOL_FOR_BUILD)
 AC_SUBST(DSYMUTIL_FOR_BUILD)
 AC_SUBST(GFORTRAN_FOR_BUILD)
-AC_SUBST(GA68_FOR_BUILD)
+AC_SUBST(A68_FOR_BUILD)
 AC_SUBST(GOC_FOR_BUILD)
 AC_SUBST(GDC_FOR_BUILD)
 AC_SUBST(GNATMAKE_FOR_BUILD)
@@ -4027,9 +4027,9 @@ AC_SUBST(CC)
 AC_SUBST(CXX)
 AC_SUBST(CFLAGS)
 AC_SUBST(CXXFLAGS)
-AC_SUBST(GA68)
-AC_SUBST(GA68FLAGS)
-GA68FLAGS=${GA68FLAGS-${CFLAGS}}
+AC_SUBST(A68)
+AC_SUBST(A68FLAGS)
+A68FLAGS=${A68FLAGS-${CFLAGS}}
 AC_SUBST(GDC)
 AC_SUBST(GDCFLAGS)
 GDCFLAGS=${GDCFLAGS-${CFLAGS}}
@@ -4078,7 +4078,7 @@ NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc)
 NCN_STRICT_CHECK_TARGET_TOOLS(CXX_FOR_TARGET, c++ g++ cxx gxx)
 NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
 NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
-NCN_STRICT_CHECK_TARGET_TOOLS(GA68_FOR_TARGET, ga68)
+NCN_STRICT_CHECK_TARGET_TOOLS(A68_FOR_TARGET, ga68)
 NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
 NCN_STRICT_CHECK_TARGET_TOOLS(GDC_FOR_TARGET, gdc)
 NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
@@ -4130,7 +4130,7 @@ GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN,
 		[gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
 GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
 		[gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
-GCC_TARGET_TOOL(ga68, GA68_FOR_TARGET, GA68,
+GCC_TARGET_TOOL(ga68, A68_FOR_TARGET, A68,
                 [gcc/ga68 -B$$r/$(HOST_SUBDIR)/gcc/], algol68)
 GCC_TARGET_TOOL(gdc, GDC_FOR_TARGET, GDC,
 		[gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/], d)
diff --git a/libga68/Makefile.am b/libga68/Makefile.am
index accdd910d8d..183fd7bda19 100644
--- a/libga68/Makefile.am
+++ b/libga68/Makefile.am
@@ -107,14 +107,29 @@ libga68_la_SOURCES = libga68.c \
                      ga68-posix.c \
                      ga68-alloc.c \
                      ga68-error.c \
-                     ga68-standenv.c \
-                     ga68.h
+                     ga68-standenv.c
 libga68_la_LIBTOOLFLAGS =
 libga68_la_CFLAGS = $(LIBGA68_GCFLAGS) $(LIBGA68_BOEHM_GC_INCLUDES)
 libga68_la_LDFLAGS = -version-info $(libga68_VERSION) \
     $(extra_darwin_ldflags_libga68)
-libga68_la_DEPENDENCIES = libga68.spec
-libga68_la_LIBADD = $(LIBGA68_BOEHM_GC_LIBS)
+libga68_la_DEPENDENCIES = libga68.spec standard.lo
+libga68_la_LIBADD = $(LIBGA68_BOEHM_GC_LIBS) standard.lo
+
+# Rules to build the Algol 68 code in the library.
+
+LTA68COMPILE = $(LIBTOOL) --tag=A68 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(A68) $(AM_A68FLAGS)
+
+.a68.o:
+	$(A68) -o $@ $(A68FLAGS) -c $<
+
+.a68.lo:
+	$(LTA68COMPILE) $(A68FLAGS) $(MULTIFLAGS) -c -o $@ $<
+
+standard.a68 : standard.a68.in
+	$(AWK) -f $(srcdir)/sppp.awk $< > $@
+
+BUILT_SOURCES = standard.a68
 
 # target overrides
 -include $(tmake_file)
diff --git a/libga68/Makefile.in b/libga68/Makefile.in
index efba8b8ee11..033a237af44 100644
--- a/libga68/Makefile.in
+++ b/libga68/Makefile.in
@@ -126,7 +126,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/override.m4 \
 	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
 	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/m4/autoconf.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -244,6 +245,8 @@ ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
 AM_RECURSIVE_TARGETS = cscope
+A68 = @A68@
+A68FLAGS = @A68FLAGS@
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
@@ -457,27 +460,32 @@ libga68_la_SOURCES = libga68.c \
                      ga68-posix.c \
                      ga68-alloc.c \
                      ga68-error.c \
-                     ga68-standenv.c \
-                     ga68.h
+                     ga68-standenv.c
 
 libga68_la_LIBTOOLFLAGS = 
 libga68_la_CFLAGS = $(LIBGA68_GCFLAGS) $(LIBGA68_BOEHM_GC_INCLUDES)
 libga68_la_LDFLAGS = -version-info $(libga68_VERSION) \
     $(extra_darwin_ldflags_libga68)
 
-libga68_la_DEPENDENCIES = libga68.spec
-libga68_la_LIBADD = $(LIBGA68_BOEHM_GC_LIBS)
+libga68_la_DEPENDENCIES = libga68.spec standard.lo
+libga68_la_LIBADD = $(LIBGA68_BOEHM_GC_LIBS) standard.lo
+
+# Rules to build the Algol 68 code in the library.
+LTA68COMPILE = $(LIBTOOL) --tag=A68 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(A68) $(AM_A68FLAGS)
+
+BUILT_SOURCES = standard.a68
 MULTISRCTOP = 
 MULTIBUILDTOP = 
 MULTIDIRS = 
 MULTISUBDIR = 
 MULTIDO = true
 MULTICLEAN = true
-all: config.h
+all: $(BUILT_SOURCES) config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .a68 .c .lo .o .obj
 am--refresh: Makefile
 	@:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../multilib.am $(am__configure_deps)
@@ -733,13 +741,15 @@ distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 check-am: all-am
-check: check-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
 all-am: Makefile $(LTLIBRARIES) $(DATA) config.h all-local
 installdirs:
 	for dir in "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(toolexeclibdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
-install: install-am
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -769,6 +779,7 @@ distclean-generic:
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 clean: clean-am
 
 clean-am: clean-generic clean-libtool clean-local \
@@ -846,7 +857,7 @@ ps-am:
 uninstall-am: uninstall-toolexeclibDATA \
 	uninstall-toolexeclibLTLIBRARIES
 
-.MAKE: all install-am install-strip
+.MAKE: all check install install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am all-local am--refresh check \
 	check-am clean clean-cscope clean-generic clean-libtool \
@@ -869,6 +880,15 @@ uninstall-am: uninstall-toolexeclibDATA \
 .PRECIOUS: Makefile
 
 
+.a68.o:
+	$(A68) -o $@ $(A68FLAGS) -c $<
+
+.a68.lo:
+	$(LTA68COMPILE) $(A68FLAGS) $(MULTIFLAGS) -c -o $@ $<
+
+standard.a68 : standard.a68.in
+	$(AWK) -f $(srcdir)/sppp.awk $< > $@
+
 # target overrides
 -include $(tmake_file)
 
diff --git a/libga68/acinclude.m4 b/libga68/acinclude.m4
new file mode 100644
index 00000000000..554e7ebbdd6
--- /dev/null
+++ b/libga68/acinclude.m4
@@ -0,0 +1,11 @@
+dnl Copyright (C) 2025 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+m4_include([m4/autoconf.m4])
diff --git a/libga68/aclocal.m4 b/libga68/aclocal.m4
index 1d3f9eceae1..80a7ff96196 100644
--- a/libga68/aclocal.m4
+++ b/libga68/aclocal.m4
@@ -1200,3 +1200,4 @@ m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
 m4_include([../ltversion.m4])
 m4_include([../lt~obsolete.m4])
+m4_include([acinclude.m4])
diff --git a/libga68/configure b/libga68/configure
index b0a1302c881..60a3c3609f1 100755
--- a/libga68/configure
+++ b/libga68/configure
@@ -663,6 +663,8 @@ LIBTOOL
 RANLIB
 NM
 AR
+A68FLAGS
+A68
 am__fastdepCCAS_FALSE
 am__fastdepCCAS_TRUE
 CCASDEPMODE
@@ -1487,6 +1489,8 @@ Some influential environment variables:
   CPP         C preprocessor
   CCAS        assembler compiler command (defaults to CC)
   CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
+  A68         Algol 68 compiler command
+  A68FLAGS    Algol 68 compiler flags
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -5673,6 +5677,230 @@ else
 fi
 
 
+ac_ext=a68
+ac_compile='$A68 -c $A68FLAGS conftest.$ac_ext >&5'
+ac_link='$A68 -o conftest$ac_exeext $A68FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=yes
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ga68", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ga68; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_A68+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$A68"; then
+  ac_cv_prog_A68="$A68" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_A68="${ac_tool_prefix}ga68"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+A68=$ac_cv_prog_A68
+if test -n "$A68"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A68" >&5
+$as_echo "$A68" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_A68"; then
+  ac_ct_A68=$A68
+  # Extract the first word of "ga68", so it can be a program name with args.
+set dummy ga68; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_A68+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_A68"; then
+  ac_cv_prog_ac_ct_A68="$ac_ct_A68" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_A68="ga68"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_A68=$ac_cv_prog_ac_ct_A68
+if test -n "$ac_ct_A68"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_A68" >&5
+$as_echo "$ac_ct_A68" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_A68" = x; then
+    A68=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    A68=$ac_ct_A68
+  fi
+else
+  A68="$ac_cv_prog_A68"
+fi
+
+if test -z "$A68"; then
+  if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}ga68", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ga68; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_A68+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$A68"; then
+  ac_cv_prog_A68="$A68" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_A68="$ac_tool_prefix}ga68"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+A68=$ac_cv_prog_A68
+if test -n "$A68"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A68" >&5
+$as_echo "$A68" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$A68"; then
+  # Extract the first word of "ga68", so it can be a program name with args.
+set dummy ga68; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_A68+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$A68"; then
+  ac_cv_prog_A68="$A68" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "false"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_A68="ga68"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_A68
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set A68 to just the basename; use the full file name.
+    shift
+    ac_cv_prog_A68="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+A68=$ac_cv_prog_A68
+if test -n "$A68"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A68" >&5
+$as_echo "$A68" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Algol 68 compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ { ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler --version >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+A68FLAGS="-g -O2"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 
 
 
@@ -12578,7 +12806,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12581 "configure"
+#line 12809 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12684,7 +12912,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12687 "configure"
+#line 12915 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libga68/configure.ac b/libga68/configure.ac
index 56ef197e5f4..68ddc91136d 100644
--- a/libga68/configure.ac
+++ b/libga68/configure.ac
@@ -138,6 +138,7 @@ m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
 m4_define([_AC_ARG_VAR_PRECIOUS],[])
 AC_PROG_CC
 AM_PROG_AS
+AC_PROG_A68
 m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
 AC_SUBST(CFLAGS)
 
diff --git a/libga68/m4/autoconf.m4 b/libga68/m4/autoconf.m4
new file mode 100644
index 00000000000..7b85996265c
--- /dev/null
+++ b/libga68/m4/autoconf.m4
@@ -0,0 +1,131 @@
+#
+# Minimal autoconf support for the Algol 68 language.
+# Adapted from the Algol 68 language support files.
+#
+
+# ------------------- #
+# Language selection.
+# ------------------- #
+
+# AC_LANG(A68)
+# ------------
+AC_LANG_DEFINE([Algol 68], [a68], [A68], [A68], [],
+[ac_ext=a68
+ac_compile='$A68 -c $A68FLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
+ac_link='$A68 -o conftest$ac_exeext $A68FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
+ac_compiler_gnu=yes
+])
+
+# AC_LANG_A68
+# -----------
+AU_DEFUN([AC_LANG_A68], [AC_LANG(Algol 68)])
+
+# ------------------- #
+# Producing programs.
+# ------------------- #
+
+# AC_LANG_PROGRAM(Algol 68)([PROLOGUE], [BODY])
+# ---------------------------------------------
+m4_define([AC_LANG_PROGRAM(Algol 68)],
+[$1
+begin $2 m4_ifnblank([$2],[;])
+      skip
+end])
+
+# _AC_LANG_IO_PROGRAM(Algol 68)
+# -----------------------------
+# Produce source that performs I/O.
+m4_define([_AC_LANG_IO_PROGRAM(Algol 68)],
+[AC_LANG_PROGRAM([],
+[if int fd = fcreate ("conftest.out", 8r0777); fd = -1
+ then perror ("error creating conftest.out")
+ elif fclose (fd) = -1 then perror ("error closing conftest.out")
+ fi
+])])
+
+# AC_LANG_CALL(Algol 68)(PROLOGUE, FUNCTION)
+# ------------------------------------------
+# Avoid conflicting decl of main.
+m4_define([AC_LANG_CALL(Algol 68)],
+[AC_LANG_PROGRAM([],[])])
+
+# AC_LANG_FUNC_LINK_TRY(Algol 68)(FUNCTION)
+# -----------------------------------------
+# Try to link a program which calls FUNCTION.
+m4_define([AC_LANG_FUNC_LINK_TRY(Algol 68)],
+[AC_LANG_PROGRAM([],[])])
+
+# AC_LANG_BOOL_COMPILE_TRY(Algol 68)(PROLOGUE, EXPRESSION)
+# --------------------------------------------------------
+# Return a program which is valid if EXPRESSION is nonzero.
+m4_define([AC_LANG_BOOL_COMPILE_TRY(Algol 68)],
+[AC_LANG_PROGRAM([], [@<:@$2@:>@INT test multiple;
+		      0])])
+
+# AC_LANG_INT_SAVE(Algol 68)(PROLOGUE, EXPRESSION)
+# ------------------------------------------------
+m4_define([AC_LANG_INT_SAVE(Algol 68)],
+[AC_LANG_PROGRAM([
+proc itoa = (int i) string:
+      begin if i = 0
+	    then "0"
+	    else int n := ABS i;
+		 string res;
+		 while n /= 0
+		 do int rem = n %* 10;
+		    res := (REPR (rem > 9 | (rem - 10) + ABS "a"
+				  | rem + ABS "0")
+			    + res);
+		    n %:= 10
+		 od;
+		 (i < 0 | "-" + res | res)
+	    fi
+      end;
+
+int ret := 0;
+int fd = fopen ("conftest.val", file o wronly)/
+(fd = -1 | ret := 1; stop);
+(fputs (fd, itoa ($2)) = 0 | ret := 1; stop)
+])])
+
+# ---------------------- #
+# Looking for compilers. #
+# ---------------------- #
+
+# AC_LANG_COMPILER(Algol 68)
+# --------------------------
+AC_DEFUN([AC_LANG_COMPILER(Algol 68)],
+[AC_REQUIRE([AC_PROG_A68])])
+
+# AC_PROG_A68
+# ------------
+AN_MAKEVAR([A68], [AC_PROG_A68])
+AN_PROGRAM([ga68], [AC_PROG_A68])
+AC_DEFUN([AC_PROG_A68],
+[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
+m4_ifval([$1],
+      [AC_CHECK_TOOLS(A68, [$1])],
+[AC_CHECK_TOOL(A68, ga68)
+if test -z "$A68"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(A68, [${ac_tool_prefix}ga68], [$ac_tool_prefix}ga68])
+  fi
+fi
+if test -z "$A68"; then
+  AC_CHECK_PROG(A68, ga68, ga68, , , false)
+fi
+])
+
+# Provide some information about the compiler.
+_AS_ECHO_LOG([checking for _AC_LANG compiler version])
+set X $ac_compile
+ac_compiler=$[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="-g -O2"
+AC_LANG_POP(Algol 68)dnl
+])# AC_PROG_A68
-- 
2.30.2



More information about the Algol68 mailing list