Index: src/CMakeLists.txt
--- src/CMakeLists.txt.orig
+++ src/CMakeLists.txt
@@ -184,7 +184,7 @@ else(WIN32)
   endif()
 
   # Check for LUA
-  pkg_search_module( LUA lua5.1 lua-5.1 )
+  pkg_search_module( LUA lua51 lua-5.1 )
 
   add_definitions( -DHAVE_ASPRINTF ) # What system wouldn't have this?
   add_definitions( -DLUA_USE_LINUX ) # This needs to be set when link LUA internally for linux and macosx
