httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r723618 - in /httpd/httpd/branches/wombat-integration/modules/wombat: ./ Makefile.in config.m4
Date Fri, 05 Dec 2008 07:03:41 GMT
Author: pquerna
Date: Thu Dec  4 23:03:41 2008
New Revision: 723618

URL: http://svn.apache.org/viewvc?rev=723618&view=rev
Log:
Add wombat to build system.

Added:
    httpd/httpd/branches/wombat-integration/modules/wombat/Makefile.in   (with props)
    httpd/httpd/branches/wombat-integration/modules/wombat/config.m4
Modified:
    httpd/httpd/branches/wombat-integration/modules/wombat/   (props changed)

Propchange: httpd/httpd/branches/wombat-integration/modules/wombat/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Dec  4 23:03:41 2008
@@ -0,0 +1,3 @@
+.deps
+Makefile
+modules.mk

Added: httpd/httpd/branches/wombat-integration/modules/wombat/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/wombat-integration/modules/wombat/Makefile.in?rev=723618&view=auto
==============================================================================
--- httpd/httpd/branches/wombat-integration/modules/wombat/Makefile.in (added)
+++ httpd/httpd/branches/wombat-integration/modules/wombat/Makefile.in Thu Dec  4 23:03:41
2008
@@ -0,0 +1,3 @@
+# a modules Makefile has no explicit targets -- they will be defined by
+# whatever modules are enabled. just grab special.mk to deal with this.
+include $(top_srcdir)/build/special.mk

Propchange: httpd/httpd/branches/wombat-integration/modules/wombat/Makefile.in
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpd/httpd/branches/wombat-integration/modules/wombat/Makefile.in
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Added: httpd/httpd/branches/wombat-integration/modules/wombat/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/wombat-integration/modules/wombat/config.m4?rev=723618&view=auto
==============================================================================
--- httpd/httpd/branches/wombat-integration/modules/wombat/config.m4 (added)
+++ httpd/httpd/branches/wombat-integration/modules/wombat/config.m4 Thu Dec  4 23:03:41 2008
@@ -0,0 +1,104 @@
+
+APACHE_MODPATH_INIT(wombat)
+
+dnl Check for Lua 5.1 Libraries
+dnl CHECK_LUA(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+dnl Sets:
+dnl  LUA_CFLAGS
+dnl  LUA_LIBS
+AC_DEFUN([CHECK_LUA],
+[dnl
+
+AC_ARG_WITH(
+    lua,
+    [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua 5.1 prefix])],
+    lua_path="$withval",
+    :)
+
+dnl # Determine lua lib directory
+if test -z $lua_path; then
+    test_paths="/usr/local /usr"
+else
+    test_paths="${lua_path}"
+fi
+
+AC_CHECK_LIB([m], [pow], lib_m=" -lm")
+for x in $test_paths ; do
+    AC_MSG_CHECKING([for lua.h in ${x}/include/lua5.1])
+    if test -f ${x}/include/lua5.1/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.1, luaL_newstate,
+            [
+            LUA_LIBS="-L$x/lib -llua5.1"
+            LUA_CFLAGS="-I$x/include/lua5.1"
+            ])
+        CFLAGS=$save_CFLAGS
+        LDFLAGS=$save_LDFLAGS
+        break
+    else
+        AC_MSG_RESULT([no])
+    fi
+    AC_MSG_CHECKING([for lua.h in ${x}/include/lua51])
+    if test -f ${x}/include/lua51/lua.h; then
+        AC_MSG_RESULT([yes])
+        save_CFLAGS=$CFLAGS
+        save_LDFLAGS=$LDFLAGS
+        CFLAGS="$CFLAGS"
+        LDFLAGS="-L$x/lib/lua51 $LDFLAGS $lib_m"
+        AC_CHECK_LIB(lua, luaL_newstate,
+            [
+            LUA_LIBS="-L$x/lib/lua51 -llua"
+            LUA_CFLAGS="-I$x/include/lua51"
+            ])
+        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])
+        save_CFLAGS=$CFLAGS
+        save_LDFLAGS=$LDFLAGS
+        CFLAGS="$CFLAGS"
+        LDFLAGS="-L$x/lib $LDFLAGS $lib_m"
+        AC_CHECK_LIB(lua, luaL_newstate,
+            [
+            LUA_LIBS="-L$x/lib -llua"
+            LUA_CFLAGS="-I$x/include"
+            ])
+        CFLAGS=$save_CFLAGS
+        LDFLAGS=$save_LDFLAGS
+        break
+    else
+        AC_MSG_RESULT([no])
+    fi
+done
+
+AC_SUBST(LUA_LIBS)
+AC_SUBST(LUA_CFLAGS)
+
+if test -z "${LUA_LIBS}"; then
+  AC_MSG_NOTICE([*** Lua 5.1 library not found.])
+  ifelse([$2], , AC_MSG_ERROR([Lua 5.1 library is required]), $2)
+else
+  AC_MSG_NOTICE([using '${LUA_LIBS}' for Lua Library])
+  ifelse([$1], , , $1) 
+fi 
+])
+
+wombat_objects="apr_lua.lo config.lo mod_wombat.lo request.lo vmprep.lo"
+
+APACHE_MODULE(wombat, Apache Lua Framework, , , yes,
+[
+CHECK_LUA()
+APR_ADDTO(LIBS, ["$LUA_LIBS"])
+APR_ADDTO(INCLUDES, ["$LUA_CFLAGS"])
+])
+
+APACHE_MODPATH_FINISH



Mime
View raw message