diff -r 48b0adfe3059 -r 4866573c6944 configure.ac --- a/configure.ac Thu Jan 22 22:54:45 2009 +0000 +++ b/configure.ac Thu Feb 05 22:43:29 2009 +0000 @@ -202,6 +202,27 @@ AC_DEFINE([HAVE_RPMLIB], [1], [Define if you have librpm])]) AC_SUBST(RPM_LIBS) AM_CONDITIONAL([HAVE_RPMLIB], [test -n "$RPM_LIBS"]) + +AC_ARG_WITH([lua], + [AS_HELP_STRING([--without-lua], [disable support for lua])], + [], + [with_lua=yes]) + +LUA_CFLAGS= +LUA_LIBS= +AS_IF([test "x$with_lua" != xno], + [PKG_CHECK_MODULES(LUA, [lua]) + REQUIREMENTS="$REQUIREMENTS lua" + AC_DEFINE([HAVE_LUA], [1], [Define if you have lua]) + AC_PATH_PROG(LUA, [lua], [no]) + AS_IF([test "x$LUA" = xno], + [AC_MSG_ERROR([Can't find lua program. Please install lua-devel or use --without-lua.])]) + AC_DEFINE_UNQUOTED([LUA_BINARY], ["$LUA"], + [Define to the location of the lua binary])]) +AC_SUBST(LUA_CFLAGS) +AC_SUBST(LUA_LIBS) +AM_CONDITIONAL([HAVE_LUA], [test "x$with_lua" != xno]) + AC_SUBST(REQUIREMENTS) if test "x$GCC" = "xyes"; then