httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "josh rotenberg" <joshrotenb...@gmail.com>
Subject Re: mod_wombat build help
Date Fri, 11 Jan 2008 06:09:54 GMT
On linux, the check for lua needs to include libm:

(from config.log ..)
configure:2689: checking for luaL_newstate in -llua
configure:2719: gcc -o conftest -g -O2  -L/home/jrotenberg/src/lua-5.1.2//lib
conftest.c -llua   >&5
/home/jrotenberg/src/lua-5.1.2//lib/liblua.a(lvm.o): In function `Arith':
lvm.c:(.text+0xbeb): undefined reference to `pow'
/home/jrotenberg/src/lua-5.1.2//lib/liblua.a(lvm.o): In function `luaV_execute':
lvm.c:(.text+0x20c9): undefined reference to `pow'
/home/jrotenberg/src/lua-5.1.2//lib/liblua.a(lcode.o): In function `codearith':
lcode.c:(.text+0x11ec): undefined reference to `pow'
collect2: ld returned 1 exit status
configure:2725: $? = 1


the following patch seems to do the trick:

Index: build/ac-macros/lua.m4===================================================================
--- build/ac-macros/lua.m4	(revision 610998)
+++ build/ac-macros/lua.m4	(working copy)
@@ -19,6 +19,7 @@
     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
@@ -26,7 +27,7 @@
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
         CFLAGS="$CFLAGS"
-        LDFLAGS="-L$x/lib $LDFLAGS"
+        LDFLAGS="-L$x/lib $LDFLAGS $lib_m"
         AC_CHECK_LIB(lua5.1, luaL_newstate,
             [
             LUA_LIBS="-L$x/lib -llua5.1"
@@ -44,7 +45,7 @@
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
         CFLAGS="$CFLAGS"
-        LDFLAGS="-L$x/lib $LDFLAGS"
+        LDFLAGS="-L$x/lib $LDFLAGS $lib_m"
         AC_CHECK_LIB(lua, luaL_newstate,
             [
             LUA_LIBS="-L$x/lib -llua"




On Jan 3, 2008 6:42 AM, Brian McCallister <brianm@apache.org> wrote:
>
> On Jan 1, 2008, at 10:15 PM, Justin Erenkrantz wrote:
>
> > On Dec 31, 2007 5:12 PM, Brian McCallister <brianm@apache.org> wrote:
> >> If anyone is familiar with autconf and modules, I would *love* if
> >> that
> >> person could take a look at helping me clean up mod_wombat's build,
> >> which is presently a mess.
> >>
> >> I, to be honest, don't understand enough automake/autoconf + apxs to
> >> know what needs doing, so will just say... please help?
> >
> > See below.  If you'd like, I can just commit it.  (It's not perfect,
> > but it'll build out-of-the-box on Leopard.)
>
> Please go ahead and apply it.
>
> THANKS!
>
> -Brian
>
>

Mime
View raw message