Please provide a portable way to let software detect if gnuplot was compiled with Cairo support or not.
According to the wxMaxima manual (https://htmlpreview.github.io/?https%3A%2F%2Fgithub.com%2FwxMaxima-developers%2Fwxmaxima%2Fblob%2Fmain%2Finfo%2Fwxmaxima.html=#better-quality-plots), that would be a desirable feature...
That is a rather vague request. What do you mean be "portable" in this case? Does asking gnuplot itself count? Type "set term" and look to see if the cairo terminals are included in the list.
Various options from a unix-like shell command line, or could be used via call to popen in a program:
I assume there are equivalent Windows shell commands but I can't help you there.