No, I did not mean, to pass this directory as a parameter to configure. The problem is, that lua5.1 is not found. There are two possible reasons:
1. Its not there
2. It has a different name (known to happen)
In case 1 you have to install it from an rpm or from source, because yum seems to be incapable to do this for your system. More probable is case 2: The name is lua5 or just lua on your system.
Try to find out with this command:
pkg-config --modversion lua
Also try lua5 . The pkg-config system uses some .pc files. So have a look into this folder /usr/lib/pkgconfig and search for the .pc file (its likely to be named lua.pc or lua5.pc). Set a symlink to this file name lua5.1.pc. Try again (with just configure, no additional parameters).