When I edit make.conf and add the use flag 'lua' so I can emerge elinks with lua support, then type emerge elinks, lua is compiled as expected before elinks is, however, lua is not detected and compiled into elinks as the version of lua compiled is 5.0, and not the 4.0 that is expected.
fixed in portage.