I think GMT also needs glib2 for gthread support, right? If yes, we should also add glib2 as an optional dependency. A related question: is pthread used in GMT? `HAVE_PTHREAD` is almost never used in the codes.