I am trying to build emacs 24.5 with gtk+ 2.0
<p>while trying to build emacs 24.5 with gtk+ 2.0 I get the following error</p>

<pre><code>checking whether GTK compiles... no
configure: error: Gtk+ wanted, but it does not compile, see config.log.  
Maybe some x11-devel files missing?
</code></pre>

<p>I am using the following command </p>

<pre><code>./configure --prefix=/some_path/ --with-x-toolkit=gtk2 --enable-link-time-optimization
</code></pre>

<p>I have searched everywhere over the net but still not able to resolve this error</p>