~posulliv/drizzle/memcached_applier

« back to all changes in this revision

Viewing changes to m4/pandora_with_lua.m4

  • Committer: Jay Pipes
  • Date: 2009-08-03 14:23:22 UTC
  • mfrom: (1039.2.68 staging)
  • mto: This revision was merged to the branch mainline in revision 1078.
  • Revision ID: jpipes@serialcoder-20090803142322-1g67h7su9mocg9ig
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
dnl   
 
4
dnl pandora-build: A pedantic build system
 
5
dnl Copyright (C) 2009 Sun Microsystems, Inc.
 
6
dnl This file is free software; the Free Software Foundation
 
7
dnl gives unlimited permission to copy and/or distribute it,
 
8
dnl with or without modifications, as long as this notice is preserved.
 
9
dnl
 
10
dnl From Monty Taylor
 
11
 
 
12
AC_DEFUN([PANDORA_WITH_LUA],[
 
13
    dnl Check for lua
 
14
    AC_ARG_WITH([lua], 
 
15
    [AS_HELP_STRING([--with-lua],
 
16
      [Build Lua Bindings @<:@default=yes@:>@])],
 
17
    [with_lua=$withval], 
 
18
    [with_lua=yes])
 
19
 
 
20
  AS_IF([test "x$with_lua" != "xno"],[
 
21
    AS_IF([test "x$with_lua" = "xyes"],
 
22
      [LUAPC=lua],
 
23
      [LUAPC=$with_lua])
 
24
 
 
25
    PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [
 
26
      AC_DEFINE([HAVE_LUA], [1], [liblua])
 
27
      AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
 
28
      with_lua=yes
 
29
    ],[
 
30
      PKG_CHECK_MODULES([LUA], lua5.1 >= 5.1, [
 
31
        AC_DEFINE([HAVE_LUA], [1], [liblua])
 
32
        AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
 
33
        with_lua=yes
 
34
      ],[
 
35
        AC_DEFINE([HAVE_LUA],["x"],["x"])
 
36
        with_lua=no
 
37
      ])
 
38
    ])
 
39
 
 
40
   AC_SUBST(LUA_CFLAGS)
 
41
   AC_SUBST(LUA_LIBS)
 
42
  ])
 
43
  AM_CONDITIONAL(BUILD_LUA, test "$with_lua" = "yes")
 
44
 
 
45
])