On 12/12/23 06:36, Sergey Kosukhin wrote:
1. Some of my macros are written from scratch (they use the Autoconf macros, of course, including the internal ones like _AC_COMPILER_EXEEXT_CROSS). This case looks like the easiest one to me and I guess, I can add my own license (preferably, BSD-3c) and copyright header there.
Yes, that's correct.
2. Some of the macros are refactored versions of the Autoconf macros (NOT the Autoconf Archive macros). For example, I copied AC_FC_LINE_LENGTH from fortran.m4 to a separate file, renamed the macro to ACX_FC_LINE_LENGTH, fixed a couple of issues and refactored it. As far as I understand, I must copy the whole license header from fortran.m4 to my file. There are three things that I am not sure about: a) may I omit the first two lines saying that "This file is part of Autoconf..." because they look a bit misleading in this context? b) may I add an extra copyright line? c) do I have to provide any extra information in the file?
The answers to (a) and (b) are "yes". For (c) it's "no". However, you must redistribute a copy of the GPL itself (the "COPYING" file in Autoconf) though of course this is not in the .m4 file itself.
3. I have macros that monkey-patch macros fortran.m4 with m4_bpatsubst and I have no idea what to do with those. Should they be treated like files from the case 1. or the case 2. above?
It depends on what "monkey-patch" means, but in general these sound like they would be derivative works and so are case 2.
Hope this helps.