Menu

#2625 How to detect if compiled with Cairo support

None
closed
nobody
None
2023-08-28
2023-05-29
No

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...

Discussion

  • Ethan Merritt

    Ethan Merritt - 2023-05-29

    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:

    [~] gnuplot -e "set term" | grep -c cairo
    5
    [~] ldd `which gnuplot` | grep cairo
            libpangocairo-1.0.so.0 => /lib64/libpangocairo-1.0.so.0 (0x00007fd58e595000)
            libcairo.so.2 => /lib64/libcairo.so.2 (0x00007fd58d5ae000)
            libcairo-gobject.so.2 => /lib64/libcairo-gobject.so.2 (0x00007fd58e492000)
    [~] gnuplot -e "print strstrt(GPVAL_TERMINALS,'cairo')"
    8
    

    I assume there are equivalent Windows shell commands but I can't help you there.

     
  • Ethan Merritt

    Ethan Merritt - 2023-05-29
    • status: open --> open-not-a-bug
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2023-08-28
    • status: open-not-a-bug --> closed
     

Log in to post a comment.