XInput version 2 is a dependency starting with gtk+-3.4.0. So I'll assume your trying to install at least gtk+-3.4.0.
The file called: "INSTALL" contains the list of dependencies. For instance gtk+-3.4.3 (newest stable version) has:
Quote:
Prerequisites
=============
GTK+ requires the following packages:
- The GLib, Pango, GdkPixbuf, ATK and cairo libraries, available at
the same location as GTK+. GTK+ 3.4.3 requires at least
GLib 2.32.0, Pango 1.30.0,
GdkPixbuf 2.26.0, ATK 2.2.0
and cairo 1.10.0.
- Each GDK backend has its own backend-specific requirements. For
the X11 backend, X11 R6 and XInput version 2 (as well as a number
of other extensions) are required.
- gobject-introspection 1.32.0 or newer.
You can download the source to check the "INSTALL" file from here and just change the 3.4 to whatever series you're using:
http://ftp.gnome.org/pub/gnome/sources/gtk+/3.4/I could advise you better if you listed what your O.S. and revision is but I just posted a rather extensive step-by-step for installation here:
http://www.gtkforums.com/viewtopic.php?f=3&t=177997