1
dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
dnl pandora-build: A pedantic build system
5
dnl Copyright (C) 2009 Sun Microsystems, Inc.
6
dnl This file is free software; Sun Microsystems
7
dnl gives unlimited permission to copy and/or distribute it,
8
dnl with or without modifications, as long as this notice is preserved.
12
AC_DEFUN([PANDORA_WITH_LUA],[
15
[AS_HELP_STRING([--with-lua],
16
[Build Lua Bindings @<:@default=yes@:>@])],
20
AS_IF([test "x$with_lua" != "xno"],[
21
AS_IF([test "x$with_lua" = "xyes"],
25
PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [
26
AC_DEFINE([HAVE_LUA], [1], [liblua])
27
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
31
PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [
32
AC_DEFINE([HAVE_LUA], [1], [liblua])
33
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
36
AC_DEFINE([HAVE_LUA],["x"],["x"])
41
AC_CACHE_CHECK([for LUA installation location],[pandora_cv_lua_archdir],[
42
AS_IF([test "$prefix" = "NONE"],[
43
pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${ac_default_prefix} --variable=INSTALL_CMOD ${LUAPC}`
45
pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${prefix} --variable=INSTALL_CMOD ${LUAPC}`
48
LUA_ARCHDIR="${pandora_cv_lua_archdir}"
53
AM_CONDITIONAL(BUILD_LUA, test "$with_lua" = "yes")