View | Details | Raw Unified | Return to ticket 2131 | Differences between
and this patch

Collapse All | Expand All

(-)a/auxdir/x_ac_lua.m4 (+7 lines)
Lines 50-53 AC_DEFUN([X_AC_LUA], Link Here
50
	fi
50
	fi
51
51
52
	AM_CONDITIONAL(HAVE_LUA, test "x$x_ac_have_lua" = "xyes")
52
	AM_CONDITIONAL(HAVE_LUA, test "x$x_ac_have_lua" = "xyes")
53
	if test "x$x_ac_have_lua" = "xyes" ; then
54
		if test "x$x_ac_lua_pkg_name" = "xlua5.2" ; then
55
			AC_DEFINE(HAVE_LUA_5_2, 1, [Compile with Lua 5.2])
56
		elif test "x$x_ac_lua_pkg_name" = "xlua5.1"; then
57
			AC_DEFINE(HAVE_LUA_5_1, 1, [Compile with Lua 5.1])
58
		fi
59
	fi
53
])
60
])
(-)a/config.h.in (+6 lines)
Lines 187-192 Link Here
187
/* Define to 1 if you have the <linux/sched.h> header file. */
187
/* Define to 1 if you have the <linux/sched.h> header file. */
188
#undef HAVE_LINUX_SCHED_H
188
#undef HAVE_LINUX_SCHED_H
189
189
190
/* Compile with Lua 5.1 */
191
#undef HAVE_LUA_5_1
192
193
/* Compile with Lua 5.2 */
194
#undef HAVE_LUA_5_2
195
190
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
196
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
191
   to 0 otherwise. */
197
   to 0 otherwise. */
192
#undef HAVE_MALLOC
198
#undef HAVE_MALLOC
(-)a/configure (+11 lines)
Lines 23526-23531 else Link Here
23526
  HAVE_LUA_FALSE=
23526
  HAVE_LUA_FALSE=
23527
fi
23527
fi
23528
23528
23529
	if test "x$x_ac_have_lua" = "xyes" ; then
23530
		if test "x$x_ac_lua_pkg_name" = "xlua5.2" ; then
23531
23532
$as_echo "#define HAVE_LUA_5_2 1" >>confdefs.h
23533
23534
		elif test "x$x_ac_lua_pkg_name" = "xlua5.1"; then
23535
23536
$as_echo "#define HAVE_LUA_5_1 1" >>confdefs.h
23537
23538
		fi
23539
	fi
23529
23540
23530
23541
23531
23542
(-)a/src/common/xlua.c (-4 / +7 lines)
Lines 47-59 int xlua_dlopen(void) Link Here
47
	 *   ensure symbols from liblua are available to libs opened
47
	 *   ensure symbols from liblua are available to libs opened
48
	 *   by any lua scripts.
48
	 *   by any lua scripts.
49
	 */
49
	 */
50
	if (!dlopen("liblua.so",       RTLD_NOW | RTLD_GLOBAL) &&
50
	if (
51
#ifdef HAVE_LUA_5_2
51
	    !dlopen("liblua-5.2.so",   RTLD_NOW | RTLD_GLOBAL) &&
52
	    !dlopen("liblua-5.2.so",   RTLD_NOW | RTLD_GLOBAL) &&
52
	    !dlopen("liblua5.2.so",    RTLD_NOW | RTLD_GLOBAL) &&
53
	    !dlopen("liblua5.2.so",    RTLD_NOW | RTLD_GLOBAL) &&
53
	    !dlopen("liblua5.2.so.0",  RTLD_NOW | RTLD_GLOBAL) &&
54
	    !dlopen("liblua5.2.so.0",  RTLD_NOW | RTLD_GLOBAL)
55
#elif HAVE_LUA_5_1
54
	    !dlopen("liblua-5.1.so",   RTLD_NOW | RTLD_GLOBAL) &&
56
	    !dlopen("liblua-5.1.so",   RTLD_NOW | RTLD_GLOBAL) &&
55
	    !dlopen("liblua5.1.so",    RTLD_NOW | RTLD_GLOBAL) &&
57
	    !dlopen("liblua5.1.so",    RTLD_NOW | RTLD_GLOBAL) &&
56
	    !dlopen("liblua5.1.so.0",  RTLD_NOW | RTLD_GLOBAL)) {
58
	    !dlopen("liblua5.1.so.0",  RTLD_NOW | RTLD_GLOBAL)
59
#endif
60
	   ) {
57
		error("Failed to open liblua.so: %s", dlerror());
61
		error("Failed to open liblua.so: %s", dlerror());
58
		return SLURM_ERROR;
62
		return SLURM_ERROR;
59
	}
63
	}
60
- 

Return to ticket 2131