From 034417c5bbb8320fe0045a1625c479342ae2decc 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 04/15] 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 31b512f..4519ec9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1406,7 +1406,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