I have added to the cfwrapper -l (--library) and -m (--module) options to respectively add the directories containing the header files and the corresponding Fortran modules names:
$ ./cfwrapper.py -l /usr/include/libsoup-3.0 /usr/include/json-glib-1.0 -m libsoup json
Pass 1: looking for enumerators, funptr and derived types...
Pass 2: looking for C functions...
/usr/include/libsoup-3.0 => libsoup-auto.f90 125042 bytes
/usr/include/json-glib-1.0 => json-auto.f90 66359 bytes
Extracting GDK events for gtk-0-fortran
Failed to open /usr/include/gtk-0.0/gdk/gdktypes.h:No such file or directory
=== Statistics (ready to paste in the Status wiki page) ===
## gtk-fortran 0.0.0, GTK not_GTK, GLib 2.74.3, Ubuntu 22.10 x86_64, Python 3.10.7
vmagnin, Sun, 09 Apr 2023 09:50:07 +0000
* nb_files scanned = 55
* nb_generated_interfaces = 590
* nb_deprecated_functions = 5
* nb_type_errors = 50
* nb_errors (others) = 38
* nb_lines treated = 1884
* nb_variadic functions = 6
* nb_enumerators = 27
* nb_win32_utf8 = 0
* Number of types = 65
* Number of funptr types = 13
* Computing time: 0.34 s
* SHA1: 60dfe48b11ea511bb3b85197181994117f71d5e0
>>>>>> SHA 1 HAS BEEN MODIFIED ! It was 10067b0d918677d31b4c9bc9c70a7a3ca27bc29a <<<<<<
Used types: ['c_ptr', 'c_int', 'c_char', 'c_funptr', '?', 'c_size_t', 'c_long', 'c_int64_t', 'c_double']
You can also use the new -s (--suffix) option to add a suffix to the functions names.
I am thinking about the license that could apply to a module with interfaces automatically generated by the cfwrapper (except the GLib/GTK libraries, gtk-fortran being under GPL3).
The modules generated for other libraries could be automatically put under the MIT license:
It implies acknowledgements, warranty disclaimer, and no limitations on use.