Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
isolate lua code when if lua is enabled
authorcoldpeace <coldpeace@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 30 Jul 2010 10:33:16 +0000 (10:33 +0000)
committercoldpeace <coldpeace@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 30 Jul 2010 10:33:16 +0000 (10:33 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8072 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/environment.c

index 9335a5d..cabbc9d 100644 (file)
@@ -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 <lua.h>
+#include <lauxlib.h>
+#include <lualib.h>
+#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;
 }