From d633181f75ea7dc879e8ac9d014cf1fc0fe364ef Mon Sep 17 00:00:00 2001
From: Jeffrey C. Ollie <jeff@ocjtech.us>
Date: Mon, 25 Feb 2008 13:14:23 -0600
Subject: [PATCH 06/14] Use pkgconfig to check for Lua.
---
configure.ac | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index b8ebbf5..d3e4054 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1382,7 +1382,14 @@ if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
[${PWLIB_INCLUDE}], [${PWLIB_LIB}])
fi
-AST_EXT_LIB_CHECK([LUA], [lua5.1], [luaL_newstate], [lua5.1/lua.h])
+PBX_LUA=0
+AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
+if test ! "x${PKGCONFIG}" = xNo; then
+ LUA_INCLUDE=$(${PKGCONFIG} lua --cflags 2>/dev/null)
+ LUA_LIB=$(${PKGCONFIG} lua --libs 2>/dev/null)
+ PBX_LUA=1
+ AC_DEFINE([HAVE_LUA], 1, [Define if your system has the LUA libraries.])
+fi
AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
--
1.6.1