fixed compile if lua is not enabled
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1300 152afb58-edef-0310-8abb-c4023f1b3aa9svn/tags/lighttpd-1.4.12
parent
63ec609a56
commit
e931d4f27f
|
@ -375,7 +375,7 @@ if test "$WITH_MEMCACHE" != "no"; then
|
|||
fi
|
||||
|
||||
dnl Check for lua
|
||||
AC_MSG_CHECKING(for lua)
|
||||
AC_MSG_CHECKING(if lua-support is requested)
|
||||
AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua engine for mod_cml]),
|
||||
[WITH_LUA=$withval],[WITH_LUA=no])
|
||||
|
||||
|
@ -400,7 +400,7 @@ if test "$WITH_LUA" != "no"; then
|
|||
|
||||
if test x"$LUA_LIBS" = x; then
|
||||
# try pkgconfig
|
||||
PKG_CHECK_MODULES(LUA, lua, [
|
||||
PKG_CHECK_MODULES(LUA, lua >= 5.1, [
|
||||
AC_DEFINE([HAVE_LUA], [1], [liblua])
|
||||
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
|
||||
])
|
||||
|
@ -557,7 +557,7 @@ else
|
|||
no_build="$no_build $plugins"
|
||||
fi
|
||||
|
||||
plugins="mod_cml"
|
||||
plugins="mod_cml mod_magnet"
|
||||
if test ! "x$LUA_LIBS" = x; then
|
||||
do_build="$do_build $plugins"
|
||||
else
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
#include <assert.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <lua.h>
|
||||
#include <lauxlib.h>
|
||||
|
||||
#include "base.h"
|
||||
#include "log.h"
|
||||
#include "buffer.h"
|
||||
|
@ -18,6 +15,9 @@
|
|||
#include "stat_cache.h"
|
||||
#include "status_counter.h"
|
||||
|
||||
#ifdef HAVE_LUA_H
|
||||
#include <lua.h>
|
||||
#include <lauxlib.h>
|
||||
|
||||
#define MAGNET_CONFIG_RAW_URL "magnet.attract-raw-url-to"
|
||||
#define MAGNET_CONFIG_PHYSICAL_PATH "magnet.attract-physical-path-to"
|
||||
|
@ -723,3 +723,9 @@ int mod_magnet_plugin_init(plugin *p) {
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
int mod_magnet_plugin_init(plugin *p) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue