Originally m4/introspection.m4 was copied from gobject-introspection
repository. We however modified it in commit f6272144e9.
Reimport the file with latest changes, but still preserving our
workaround.
The autoconf macro for GIR passes $CFLAGS to g-ir-scanner.
g-ir-scanner extends those flags with the system-default which
includes -D_FORTIFY_SOURCE=2. Probably it should not do that,
but if you disable optimization, this results in a compler warning
in "/usr/include/features.h" [1]
export CFLAGS='-O0'
# Happens both with clang or gcc.
#export CC=clang
git clean -fdx
./autogen.sh
make
Work around that by injecting -Wno-error to $CFLAGS when invoking
g-ir-scanner.
[1] Related: https://sourceware.org/bugzilla/show_bug.cgi?id=13979
Add the necessary annotations (the mininum required, that is those
on return values. NULL parameters or container types may require
more), and the Autotools stuff to get a NetworkManager GIR for
libnm-util and a NMClient for libnm-glib.