removed unnecessary libX11 dependency
search for gthread pkgconfig package: libgthread is no longer included in the glib pkgconfig libs
commented out unused variables to avoid compiler warnings