diff --git a/s/cmake-init b/s/cmake-init index 75e3fd7ac..5b73ebe37 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -47,12 +47,20 @@ DEST=$(dirname $ROOT)/server git submodule update --init LUA_VERSION="5.2" +LUA_INCLUDE=/usr/include LUA_DIR=/usr if [ -d /usr/include/lua5.1 ]; then LUA_VERSION="5.1" + LUA_INCLUDE=/usr/include/lua5.1 elif [ -d /usr/local/include/lua5.1 ]; then export LUA_DIR=/usr/local LUA_VERSION="5.1" + LUA_INCLUDE=/usr/local/include/lua5.1 +fi + +if [ ! -e ${LUA_INCLUDE}/lua.h ]; then + echo "no compatible version of lua is installed." + exit 1 fi cat >| $BUILD/config.cmake <