|Sorry for that Jonathan, I can be daft sometimes...|
Ok ".if !empty(CC_VERSION:Mgcc-[5-9]*)” does the job.
Does this means I should use gcc7 insead of gcc5 (provided I get it to compile)?
In a similar line, I had problem building net/php-sockets and managed to compile if I change line:
CFLAGS.SunOS+= -D_XOPEN_SOURCE=500 # msghdr extensions
in the Makefile.