Skip to content

Commit

Permalink
Sync with svn
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Apr 8, 2012
1 parent 5534b32 commit 7e3623a
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 79 deletions.
10 changes: 5 additions & 5 deletions config.m4
@@ -1,4 +1,4 @@
dnl $Id: config.m4 315592 2011-08-27 00:58:41Z johannes $
dnl $Id: config.m4 321796 2012-01-05 17:23:48Z laruence $
PHP_ARG_WITH(lua, for lua support,
[ --with-lua=[DIR] Include php lua support])

Expand All @@ -8,7 +8,7 @@ if test "$PHP_LUA" != "no"; then
else
AC_MSG_CHECKING(for lua in default path)
for i in /usr/local /usr; do
if test -r $i/include/lua/include.h; then
if test -r $i/include/lua/lua.h; then
LUA_DIR=$i
AC_MSG_RESULT(found in $i)
break
Expand All @@ -21,14 +21,14 @@ if test "$PHP_LUA" != "no"; then
AC_MSG_ERROR(Please reinstall the lua distribution - lua.h should be in <lua-dir>/include/)
fi

LUA_LIB_NAME=lua
LUA_LIB_NAME=liblua.a

if test -r $PHP_LUA/$PHP_LIBDIR/lib${LUA_LIB_NAME}.a; then
if test -r $PHP_LUA/$PHP_LIBDIR/${LUA_LIB_NAME}; then
LUA_LIB_DIR=$PHP_LUA/$PHP_LIBDIR
else
AC_MSG_CHECKING(for lua library in default path)
for i in /usr/lib /usr/lib64; do
if test -r $i/$PHP_LIBDIR/${LUA_LIB_DIR}.a; then
if test -r $i/${LUA_LIB_NAME}; then
LUA_LIB_DIR=$i
AC_MSG_RESULT(found in $i)
break
Expand Down
6 changes: 3 additions & 3 deletions config.w32
@@ -1,13 +1,13 @@
// $Id: config.w32 314169 2011-08-03 14:05:16Z laruence $
// $Id: config.w32 322119 2012-01-12 05:47:50Z laruence $
// vim:ft=javascript

ARG_WITH("lua", "lua support", "no");

if (PHP_LUA != "no") {
if (CHECK_LIB("liblua.lib", "lua", PHP_LUA) &&
if (CHECK_LIB("liblua.lib;lua.lib;lua51.lib", "lua", PHP_LUA) &&
CHECK_HEADER_ADD_INCLUDE("lua.h", "CFLAGS_LUA",
PHP_LUA + "\\include;" + PHP_PHP_BUILD + "\\include\\lua;" + PHP_LUA)) {
EXTENSION("lua", "lua.c");
EXTENSION("lua", "lua.c lua_closure.c");
AC_DEFINE('HAVE_LUA', 1, 'Have LUA library');
} else {
WARNING("lua not enabled; libraries and headers not found");
Expand Down

0 comments on commit 7e3623a

Please sign in to comment.