httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1605276 - /httpd/httpd/branches/2.4.x/modules/lua/config.m4
Date Wed, 25 Jun 2014 06:41:09 GMT
Author: humbedooh
Date: Wed Jun 25 06:41:09 2014
New Revision: 1605276

URL: http://svn.apache.org/r1605276
Log:
mod_lua backport: Make httpd find lua 5.2 headers/lib during configure if present on the system
(mod_lua is fully compatible with 5.2).

Modified:
    httpd/httpd/branches/2.4.x/modules/lua/config.m4

Modified: httpd/httpd/branches/2.4.x/modules/lua/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/config.m4?rev=1605276&r1=1605275&r2=1605276&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/config.m4 (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/config.m4 Wed Jun 25 06:41:09 2014
@@ -11,7 +11,7 @@ AC_DEFUN([CHECK_LUA],
 
 AC_ARG_WITH(
     lua,
-    [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua 5.1 prefix])],
+    [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua 5.1/5.2 prefix])],
     lua_path="$withval",
     :)
 
@@ -88,6 +88,46 @@ for x in $test_paths ; do
     else
         AC_MSG_RESULT([no])
     fi
+    AC_MSG_CHECKING([for lua.h in ${x}/include/lua5.2])
+    if test -f ${x}/include/lua5.2/lua.h; then
+        AC_MSG_RESULT([yes])
+        save_CFLAGS=$CFLAGS
+        save_LDFLAGS=$LDFLAGS
+        CFLAGS="$CFLAGS"
+        LDFLAGS="-L$x/lib $LDFLAGS $lib_m"
+        AC_CHECK_LIB(lua5.2, luaL_newstate, [
+            LUA_LIBS="-L$x/lib -llua5.2 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
+               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib])
+            fi
+            LUA_CFLAGS="-I$x/include/lua5.2"
+            ])
+        CFLAGS=$save_CFLAGS
+        LDFLAGS=$save_LDFLAGS
+        break
+    else
+        AC_MSG_RESULT([no])
+    fi
+    AC_MSG_CHECKING([for lua.h in ${x}/include/lua52])
+    if test -f ${x}/include/lua52/lua.h; then
+        AC_MSG_RESULT([yes])
+        save_CFLAGS=$CFLAGS
+        save_LDFLAGS=$LDFLAGS
+        CFLAGS="$CFLAGS"
+        LDFLAGS="-L$x/lib/lua52 $LDFLAGS $lib_m"
+        AC_CHECK_LIB(lua, luaL_newstate, [
+            LUA_LIBS="-L$x/lib/lua52 -llua $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
+               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua52])
+            fi
+            LUA_CFLAGS="-I$x/include/lua52"
+            ])
+        CFLAGS=$save_CFLAGS
+        LDFLAGS=$save_LDFLAGS
+        break
+    else
+        AC_MSG_RESULT([no])
+    fi
     AC_MSG_CHECKING([for lua.h in ${x}/include])
     if test -f ${x}/include/lua.h; then
         AC_MSG_RESULT([yes])



Mime
View raw message