openbsd-ports/www/haserl/patches/patch-configure_ac
rpe b6478192d2 add from openbsd-wip git repo
ok sthen@ (Maintainer)
2012-10-26 16:32:10 +00:00

28 lines
803 B
Plaintext

$OpenBSD: patch-configure_ac,v 1.1.1.1 2012/10/26 16:32:10 rpe Exp $
--- configure.ac.orig Tue May 10 17:31:21 2011
+++ configure.ac Tue Aug 21 17:56:43 2012
@@ -64,14 +64,21 @@ AC_ARG_WITH(lua,
# ubuntu has lua5.1 rather than just lua
if pkg-config --exists lua5.1; then
LUALIB=lua5.1
+ LUAPC=lua5.1
+ # openbsd has liblua5.1.so but lua51.pc
+ else if pkg-config --exists lua51; then
+ LUALIB=lua5.1
+ LUAPC=lua51
else
LUALIB=lua
+ LUAPC=lua
fi
+ fi
if test -z "$LUA_HDR_DIR"; then
- CFLAGS="$CFLAGS `pkg-config $LUALIB --cflags`"
+ CFLAGS="$CFLAGS `pkg-config $LUAPC --cflags`"
fi
LIBS="$LIBS -lm"
- LDFLAGS="$LDFLAGS -Wl,-E -L$withval"
+ LDFLAGS="$LDFLAGS -Wl,-E `pkg-config $LUAPC --libs`"
AC_DEFINE(USE_LUA, , [Enable Lua])
AC_CHECK_LIB($LUALIB, luaL_newstate, , [