From: Bruno Haible Date: Thu, 24 Apr 2025 22:56:09 +0000 (+0200) Subject: modula2comp-script: New module. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c0e56f571eca7b84b629fce2b9b05be5c4c26137;p=gnulib.git modula2comp-script: New module. * m4/modula2comp.m4: New file. * modules/modula2comp-script: New file. --- diff --git a/ChangeLog b/ChangeLog index 05044ceb78..e01f874537 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-04-24 Bruno Haible + + modula2comp-script: New module. + * m4/modula2comp.m4: New file. + * modules/modula2comp-script: New file. + 2025-04-24 Bruno Haible fbufmode: Don't require peeking into the FILE structure on recent Haiku. diff --git a/m4/modula2comp.m4 b/m4/modula2comp.m4 new file mode 100644 index 0000000000..1a25ca9587 --- /dev/null +++ b/m4/modula2comp.m4 @@ -0,0 +1,34 @@ +# modula2comp.m4 +# serial 1 +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 file is offered as-is, without any warranty. + +# Checks for a Modula-2 implementation. +# Sets M2C and M2FLAGS (options that can be used with "$M2C"). +AC_DEFUN([gt_MODULA2COMP], +[ + AC_MSG_CHECKING([for GNU Modula-2 compiler]) + pushdef([AC_MSG_CHECKING],[:])dnl + pushdef([AC_CHECKING],[:])dnl + pushdef([AC_MSG_RESULT],[:])dnl + AC_ARG_VAR([M2C], [Modula-2 compiler command]) + AC_ARG_VAR([M2FLAGS], [Modula-2 compiler options]) + AC_CHECK_TOOLS([M2C], [gm2]) + popdef([AC_MSG_RESULT])dnl + popdef([AC_CHECKING])dnl + popdef([AC_MSG_CHECKING])dnl + if test -n "$M2C"; then + ac_result="$M2C" + else + ac_result="no" + fi + AC_MSG_RESULT([$ac_result]) + AC_SUBST([M2C]) + if test -z "$M2FLAGS" && test -n "$M2C"; then + M2FLAGS="-g -O2" + fi + AC_SUBST([M2FLAGS]) +]) diff --git a/modules/modula2comp-script b/modules/modula2comp-script new file mode 100644 index 0000000000..59cbcd027f --- /dev/null +++ b/modules/modula2comp-script @@ -0,0 +1,18 @@ +Description: +Support for compiling Modula-2 programs. + +Files: +m4/modula2comp.m4 + +Depends-on: + +configure.ac: +AC_REQUIRE([gt_MODULA2COMP]) + +Makefile.am: + +License: +GPLed build tool + +Maintainer: +all