From 6fd74f90dda33660f18bc32b278060c48d93c585 Mon Sep 17 00:00:00 2001 From: coldpeace Date: Fri, 30 Jul 2010 10:33:16 +0000 Subject: [PATCH] isolate lua code when if lua is enabled git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8072 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/msg/environment.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/msg/environment.c b/src/msg/environment.c index 9335a5d628..cabbc9dbe9 100644 --- a/src/msg/environment.c +++ b/src/msg/environment.c @@ -8,10 +8,12 @@ #include "xbt/sysdep.h" #include "xbt/log.h" #include "xbt/dict.h" -#include "lua.h" -#include "lauxlib.h" -#include "lualib.h" - +#ifdef HAVE_LUA +#include +#include +#include +#endif +//#endif /** \defgroup msg_easier_life Platform and Application management * \brief This section describes functions to manage the platform creation * and the application deployment. You should also have a look at @@ -82,7 +84,7 @@ void MSG_create_environment(const char *file) */ void MSG_load_platform_script(const char *script_file) { - +#ifdef HAVE_LUA lua_State *L = lua_open(); luaL_openlibs(L); @@ -90,6 +92,6 @@ void MSG_load_platform_script(const char *script_file) { printf("error: %s\n", lua_tostring(L, -1)); return; } - +#endif return; } -- 2.20.1