I don't really know anything about the LinuxCNC / xenomai / Beaglebone combination.
But I think by searching the configure file foe the word "xenomai" you should be able to work out what the script is looking for, and where it is looking.
One hint I will offer, is to check through the generated file (config.h ? I think? (I am not at a LinuxCNC machine at the moment) and check that the kernel version string is properly " delimited.