Ok, so it's your first time compiling? Maybe ufoai isn't the right thing to practise on. I gennerally know how to compile, but I still didn't manage to do it properly for ufo.
You might want to consider using the premade packages you can in this forum, which distro do you have?
For your compile problem, it's pretty standart you are missing some package ufo needs to be compiled. (that's pretty much always the case if you want to compile a programm for the first time.)
In this case you need to install gtkglext, it might also be libgtkglext, not sure. And for compiling, but not for playing you also might need gtkglext-dev (depends on your distro)
Then call ./configure again and see if it complains about another package.