gcc -o inex-glinfo glinfo.c -O2  -lX11    -O2

/tmp/ccXNE0wK.o: In function `main':
glinfo.c:(.text.startup+0x3c): undefined reference to
`glXChooseFBConfig'
glinfo.c:(.text.startup+0x4a): undefined reference to
`glXGetVisualFromFBConfig'
glinfo.c:(.text.startup+0x86): undefined reference to `glXCreatePixmap'
glinfo.c:(.text.startup+0xa2): undefined reference to
`glXCreateNewContext'
glinfo.c:(.text.startup+0xb0): undefined reference to `glXMakeCurrent'
glinfo.c:(.text.startup+0xc4): undefined reference to `glGetString'
glinfo.c:(.text.startup+0xe2): undefined reference to `glGetString'
glinfo.c:(.text.startup+0x100): undefined reference to `glGetString'
collect2: error: ld returned 1 exit status
make[1]: *** [make] Error 1
make[1]: Leaving directory `/build/buildd/i-nex-0.6.2'
dh_auto_build: make -j1 returned exit code 2
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2