aboutsummaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-04-28 15:55:51 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-04-28 15:55:51 +0000
commitcf686a01526fc762b49aae5ab07171a14f15f89e (patch)
treeaf71e0eb7d66a63d0e0b1096bed4125d3572ba5b /astro
parent6b12352ba2ceb63c4c99d9d8775a8edf1a79b5e0 (diff)
downloadports-cf686a01526fc762b49aae5ab07171a14f15f89e.tar.gz
ports-cf686a01526fc762b49aae5ab07171a14f15f89e.zip
Notes
Diffstat (limited to 'astro')
-rw-r--r--astro/celestia-gnome/Makefile1
-rw-r--r--astro/celestia-gtk/Makefile1
-rw-r--r--astro/celestia/Makefile31
-rw-r--r--astro/celestia/files/celestia-1.6.1-gcc47.patch22
-rw-r--r--astro/celestia/files/celestia-1.6.1-gcc48.patch36
-rw-r--r--astro/celestia/files/celestia-1.6.1-lua-5.2.patch3612
6 files changed, 3683 insertions, 20 deletions
diff --git a/astro/celestia-gnome/Makefile b/astro/celestia-gnome/Makefile
index 8d9dda1056b2..cc3b82f4a1fd 100644
--- a/astro/celestia-gnome/Makefile
+++ b/astro/celestia-gnome/Makefile
@@ -3,6 +3,5 @@
CELESTIA_UI= gnome
MASTERDIR= ${.CURDIR}/../celestia
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/astro/celestia-gtk/Makefile b/astro/celestia-gtk/Makefile
index d7285fa4ba29..c56657d974a2 100644
--- a/astro/celestia-gtk/Makefile
+++ b/astro/celestia-gtk/Makefile
@@ -3,6 +3,5 @@
CELESTIA_UI= gtk
MASTERDIR= ${.CURDIR}/../celestia
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/astro/celestia/Makefile b/astro/celestia/Makefile
index a706be549ce7..7fd2b1325da9 100644
--- a/astro/celestia/Makefile
+++ b/astro/celestia/Makefile
@@ -3,7 +3,7 @@
PORTNAME= celestia
PORTVERSION= 1.6.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= astro
MASTER_SITES= SF/${PORTNAME}/Celestia-source/${PORTVERSION}
PKGNAMESUFFIX= -${CELESTIA_UI}
@@ -16,12 +16,12 @@ LICENSE= GPLv2
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
libpng15.so:${PORTSDIR}/graphics/png
-NO_STAGE= yes
-USES= gettext gmake pkgconfig
-USE_AUTOTOOLS= libtool
+USES= gettext gmake libtool lua pkgconfig
USE_GL= gl
-USE_LUA= 5.0+ # should be optional, but the build fails without it
-WANT_GNOME= yes
+GNU_CONFIGURE= yes
+EXTRA_PATCHES= ${FILESDIR}/celestia-1.6.1-lua-5.2.patch:-p1 \
+ ${FILESDIR}/celestia-1.6.1-gcc47.patch:-p1 \
+ ${FILESDIR}/celestia-1.6.1-gcc48.patch:-p1
CXXFLAGS+= -fsigned-char # fix text rendering (see Gentoo bug 316573)
CPPFLAGS+= -I${LOCALBASE}/include
@@ -45,20 +45,23 @@ CONFLICTS= ${UI_LIST:S|${CELESTIA_UI}||:S|^|celestia-|:S|$|-[0-9]*|}
.if ${CELESTIA_UI} == "glut"
CONFIGURE_ARGS+= --with-glut
USE_GL+= glut
+LDFLAGS+= -lGL
.elif ${CELESTIA_UI} == "gtk"
CONFIGURE_ARGS+= --with-gtk
USE_GNOME+= gtk20
.elif ${CELESTIA_UI} == "gnome"
CATEGORIES+= gnome
CONFIGURE_ARGS+= --with-gnome
+PLIST_FILES= share/applications/celestia.desktop
USE_GNOME+= libgnomeui
GCONF_SCHEMAS= celestia.schemas
+PLIST_FILES= share/applications/celestia.desktop
.else
IGNORE= requires one of the <${UI_LIST}> values for CELESTIA_UI
.endif
.if ${CELESTIA_UI} == "gtk" || ${CELESTIA_UI} == "gnome"
-USE_GNOME+= gnomehack
+USES+= pathfix
LIB_DEPENDS+= libgtkglext-x11-1.0.so:${PORTSDIR}/x11-toolkits/gtkglext \
libtheora.so:${PORTSDIR}/multimedia/libtheora
STARTUP_NOTIFY= true
@@ -69,14 +72,8 @@ STARTUP_NOTIFY= false
PORTDOCS= AUTHORS ChangeLog README
-DESKTOP_ENTRIES="Celestia" "Explore the space" \
- "${PREFIX}/share/pixmaps/celestia.png" "celestia" \
- "Astronomy;Education;Science;" ${STARTUP_NOTIFY}
-
OPTIONS_DEFINE= DOCS
-.include <bsd.port.options.mk>
-
post-patch:
# Fix Lua discovery pkg-config(1) calls
@${REINPLACE_CMD} -E 's|lua5\.?|lua-5.|' ${WRKSRC}/configure
@@ -100,10 +97,8 @@ post-install:
# correct icons are properly installed for other cases, but doing it here
# does not hurt and simplifies PLIST handling
${INSTALL_DATA} ${WRKSRC}/src/celestia/gtk/data/celestia.png \
- ${PREFIX}/share/pixmaps
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
-.endif
+ ${STAGEDIR}${PREFIX}/share/pixmaps
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/astro/celestia/files/celestia-1.6.1-gcc47.patch b/astro/celestia/files/celestia-1.6.1-gcc47.patch
new file mode 100644
index 000000000000..385f39a20511
--- /dev/null
+++ b/astro/celestia/files/celestia-1.6.1-gcc47.patch
@@ -0,0 +1,22 @@
+diff -up celestia-1.6.1/src/celengine/frametree.h.gcc47 celestia-1.6.1/src/celengine/frametree.h
+--- celestia-1.6.1/src/celengine/frametree.h.gcc47 2012-03-22 12:56:56.096087430 -0400
++++ celestia-1.6.1/src/celengine/frametree.h 2012-03-22 12:57:04.333022427 -0400
+@@ -13,6 +13,7 @@
+ #ifndef _CELENGINE_FRAMETREE_H_
+ #define _CELENGINE_FRAMETREE_H_
+
++#include <unistd.h>
+ #include <vector>
+
+ class Star;
+diff -up celestia-1.6.1/src/celengine/planetgrid.cpp.gcc47 celestia-1.6.1/src/celengine/planetgrid.cpp
+--- celestia-1.6.1/src/celengine/planetgrid.cpp.gcc47 2012-03-22 12:53:01.496950513 -0400
++++ celestia-1.6.1/src/celengine/planetgrid.cpp 2012-03-22 12:53:08.812891865 -0400
+@@ -12,6 +12,7 @@
+
+ #include <cstdio>
+ #include <cmath>
++#include <celmath/mathlib.h>
+ #include <celmath/intersect.h>
+ #include "planetgrid.h"
+ #include "body.h"
diff --git a/astro/celestia/files/celestia-1.6.1-gcc48.patch b/astro/celestia/files/celestia-1.6.1-gcc48.patch
new file mode 100644
index 000000000000..a100fc8070e6
--- /dev/null
+++ b/astro/celestia/files/celestia-1.6.1-gcc48.patch
@@ -0,0 +1,36 @@
+diff -Naur celestia-1.6.1.orig/src/celengine/image.cpp celestia-1.6.1/src/celengine/image.cpp
+--- celestia-1.6.1.orig/src/celengine/image.cpp 2011-06-05 18:11:09.000000000 +0200
++++ celestia-1.6.1/src/celengine/image.cpp 2013-08-22 06:34:16.238358718 +0200
+@@ -33,6 +33,8 @@
+
+ #ifdef JPEG_SUPPORT
+
++#include <cstring> /* for memcpy */
++
+ #ifndef PNG_SUPPORT
+ #include "setjmp.h"
+ #endif // PNG_SUPPORT
+diff -Naur celestia-1.6.1.orig/src/celengine/texture.cpp celestia-1.6.1/src/celengine/texture.cpp
+--- celestia-1.6.1.orig/src/celengine/texture.cpp 2011-06-05 18:11:09.000000000 +0200
++++ celestia-1.6.1/src/celengine/texture.cpp 2013-08-22 06:34:16.239358735 +0200
+@@ -27,6 +27,7 @@
+ #include <fstream>
+ #include <cstdlib>
+ #include <cstdio>
++#include <cstring>
+ #include <cassert>
+
+ #ifndef _WIN32
+diff -Naur celestia-1.6.1.orig/src/celutil/basictypes.h celestia-1.6.1/src/celutil/basictypes.h
+--- celestia-1.6.1.orig/src/celutil/basictypes.h 2011-06-05 18:11:15.000000000 +0200
++++ celestia-1.6.1/src/celutil/basictypes.h 2013-08-22 06:34:16.239358735 +0200
+@@ -31,7 +31,9 @@
+ #include <limits>
+ typedef int64_t int64;
+ typedef uint64_t uint64;
++#ifndef INT64_MAX
+ #define INT64_MAX 9223372036854775807LL
++#endif
+ #ifndef UINT64_MAX
+ #define UINT64_MAX 0xffffffffffffffffULL
+ #endif
diff --git a/astro/celestia/files/celestia-1.6.1-lua-5.2.patch b/astro/celestia/files/celestia-1.6.1-lua-5.2.patch
new file mode 100644
index 000000000000..53b6a28521cf
--- /dev/null
+++ b/astro/celestia/files/celestia-1.6.1-lua-5.2.patch
@@ -0,0 +1,3612 @@
+diff -Naur celestia-1.6.1.orig/configure celestia-1.6.1/configure
+--- celestia-1.6.1.orig/configure 2011-06-05 20:33:27.000000000 +0200
++++ celestia-1.6.1/configure 2013-08-22 06:31:25.124482730 +0200
+@@ -28444,6 +28444,3350 @@
+ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.2 >= 5.2.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua5.2 >= 5.2.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.2 >= 5.2.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.2 >= 5.2.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua5.2 >= 5.2.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.2 >= 5.2.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.2 >= 5.2.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.2 >= 5.2.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.2.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.2.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.2.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.2.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.2.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.2.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.2.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.2.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1 >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1 >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1 >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1 >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050200
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.2.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.2.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.2.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.2.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.2.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.2.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.2.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.2.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1 >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1 >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua50 >= 5.0.0 lua50 < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua50 >= 5.0.0 lua50 < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua50 >= 5.0.0 lua50 < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LUA_LIBS"; then
++ pkg_cv_LUA_LIBS="$LUA_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.0.0 lua < 5.1.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "lua >= 5.0.0 lua < 5.1.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.0.0 lua < 5.1.0" 2>/dev/null`
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ else
++ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.0.0 lua < 5.1.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LUA_PKG_ERRORS" >&5
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050000
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050100
++fi
++
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
++$as_echo_n "checking for LUA... " >&6; }
++
++if test -n "$LUA_CFLAGS"; then
++ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5
+ ac_status=$?
+@@ -29486,6 +32830,22 @@
+ $as_echo "yes" >&6; }
+ LUA_VER=0x050100
+ fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050200
++fi
++
++else
++ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
++ LUA_LIBS=$pkg_cv_LUA_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ LUA_VER=0x050200
++fi
+ if (test "$LUA_VER" = "0x050000"); then
+
+ pkg_failed=no
+diff -Naur celestia-1.6.1.orig/src/celengine/scriptorbit.cpp celestia-1.6.1/src/celengine/scriptorbit.cpp
+--- celestia-1.6.1.orig/src/celengine/scriptorbit.cpp 2011-06-05 18:11:09.000000000 +0200
++++ celestia-1.6.1/src/celengine/scriptorbit.cpp 2013-08-22 06:31:25.112482528 +0200
+@@ -73,8 +73,7 @@
+
+ if (!moduleName.empty())
+ {
+- lua_pushstring(luaState, "require");
+- lua_gettable(luaState, LUA_GLOBALSINDEX);
++ lua_getglobal(luaState, "require");
+ if (!lua_isfunction(luaState, -1))
+ {
+ clog << "Cannot load ScriptedOrbit package: 'require' function is unavailable\n";
+@@ -92,8 +91,7 @@
+ }
+
+ // Get the orbit generator function
+- lua_pushstring(luaState, funcName.c_str());
+- lua_gettable(luaState, LUA_GLOBALSINDEX);
++ lua_getglobal(luaState, funcName.c_str());
+
+ if (lua_isfunction(luaState, -1) == 0)
+ {
+@@ -157,9 +155,8 @@
+ luaOrbitObjectName = GenerateScriptObjectName();
+
+ // Attach the name to the script orbit
+- lua_pushstring(luaState, luaOrbitObjectName.c_str());
+ lua_pushvalue(luaState, -2); // dup the orbit object on top of stack
+- lua_settable(luaState, LUA_GLOBALSINDEX);
++ lua_setglobal(luaState, luaOrbitObjectName.c_str());
+
+ // Now, call orbit object methods to get the bounding radius
+ // and valid time range.
+@@ -206,8 +203,7 @@
+ {
+ Point3d pos(0.0, 0.0, 0.0);
+
+- lua_pushstring(luaState, luaOrbitObjectName.c_str());
+- lua_gettable(luaState, LUA_GLOBALSINDEX);
++ lua_getglobal(luaState, luaOrbitObjectName.c_str());
+ if (lua_istable(luaState, -1))
+ {
+ lua_pushstring(luaState, "position");
+diff -Naur celestia-1.6.1.orig/src/celengine/scriptrotation.cpp celestia-1.6.1/src/celengine/scriptrotation.cpp
+--- celestia-1.6.1.orig/src/celengine/scriptrotation.cpp 2011-06-05 18:11:09.000000000 +0200
++++ celestia-1.6.1/src/celengine/scriptrotation.cpp 2013-08-22 06:31:25.112482528 +0200
+@@ -74,8 +74,7 @@
+
+ if (!moduleName.empty())
+ {
+- lua_pushstring(luaState, "require");
+- lua_gettable(luaState, LUA_GLOBALSINDEX);
++ lua_getglobal(luaState, "require");
+ if (!lua_isfunction(luaState, -1))
+ {
+ clog << "Cannot load ScriptedRotation package: 'require' function is unavailable\n";
+@@ -93,8 +92,7 @@
+ }
+
+ // Get the rotation generator function
+- lua_pushstring(luaState, funcName.c_str());
+- lua_gettable(luaState, LUA_GLOBALSINDEX);
++ lua_getglobal(luaState, funcName.c_str());
+
+ if (lua_isfunction(luaState, -1) == 0)
+ {
+@@ -131,9 +129,8 @@
+ luaRotationObjectName = GenerateScriptObjectName();
+
+ // Attach the name to the script rotation
+- lua_pushstring(luaState, luaRotationObjectName.c_str());
+ lua_pushvalue(luaState, -2); // dup the rotation object on top of stack
+- lua_settable(luaState, LUA_GLOBALSINDEX);
++ lua_setglobal(luaState, luaRotationObjectName.c_str());
+
+ // Get the rest of the rotation parameters; they are all optional.
+ period = SafeGetLuaNumber(luaState, -1, "period", 0.0);
+@@ -160,8 +157,7 @@
+ {
+ if (tjd != lastTime || !cacheable)
+ {
+- lua_pushstring(luaState, luaRotationObjectName.c_str());
+- lua_gettable(luaState, LUA_GLOBALSINDEX);
++ lua_getglobal(luaState, luaRotationObjectName.c_str());
+ if (lua_istable(luaState, -1))
+ {
+ lua_pushstring(luaState, "orientation");
+diff -Naur celestia-1.6.1.orig/src/celestia/celx.cpp celestia-1.6.1/src/celestia/celx.cpp
+--- celestia-1.6.1.orig/src/celestia/celx.cpp 2011-06-05 18:11:13.000000000 +0200
++++ celestia-1.6.1/src/celestia/celx.cpp 2013-08-22 06:31:25.114482561 +0200
+@@ -51,6 +51,10 @@
+ #include "celx.h"
+ #include "celestiacore.h"
+
++#ifndef lua_open
++#define lua_open() luaL_newstate()
++#endif
++
+ using namespace std;
+
+ const char* CelxLua::ClassNames[] =
+@@ -294,14 +298,7 @@
+
+ static void getField(lua_State* l, int index, const char* key)
+ {
+- // When we move to Lua 5.1, this will be replaced by:
+- // lua_getfield(l, index, key);
+- lua_pushstring(l, key);
+-
+- if (index != LUA_GLOBALSINDEX && index != LUA_REGISTRYINDEX)
+- lua_gettable(l, index - 1);
+- else
+- lua_gettable(l, index);
++ lua_getfield(l, index, key);
+ }
+
+
+@@ -583,8 +580,7 @@
+ lua_pop(state,1);
+ }
+ }
+- lua_pushstring(costate, CleanupCallback);
+- lua_gettable(costate, LUA_GLOBALSINDEX);
++ lua_getglobal(costate, CleanupCallback);
+ if (lua_isnil(costate, -1))
+ {
+ return;
+@@ -654,7 +650,11 @@
+ // luaL_error(L, "too many arguments to resume");
+ lua_xmove(L, co, narg);
+
++#if LUA_VER >= 0x050200
++ status = lua_resume(co, NULL, narg);
++#else
+ status = lua_resume(co, narg);
++#endif
+ #if LUA_VER >= 0x050100
+ if (status == 0 || status == LUA_YIELD)
+ #else
+@@ -768,8 +768,7 @@
+ int stack_top = lua_gettop(costate);
+ #endif
+ bool result = true;
+- lua_pushstring(costate, KbdCallback);
+- lua_gettable(costate, LUA_GLOBALSINDEX);
++ lua_getglobal(costate, KbdCallback);
+ lua_pushstring(costate, c_p);
+ timeout = getTime() + 1.0;
+ if (lua_pcall(costate, 1, 1, 0) != 0)
+@@ -961,8 +960,11 @@
+ lua_pushstring(state, streamname.c_str());
+ lua_settable(state, LUA_REGISTRYINDEX);
+ }
+-
++#if LUA_VER >= 0x050200
++ int status = lua_load(state, readStreamChunk, &info, streamname.c_str(), NULL);
++#else
+ int status = lua_load(state, readStreamChunk, &info, streamname.c_str());
++#endif
+ if (status != 0)
+ cout << "Error loading script: " << lua_tostring(state, -1) << '\n';
+
+@@ -3157,8 +3159,7 @@
+ if (lua_toboolean(l, 2))
+ {
+ // Check for existence of charEntered:
+- lua_pushstring(l, KbdCallback);
+- lua_gettable(l, LUA_GLOBALSINDEX);
++ lua_getglobal(l, KbdCallback);
+ if (lua_isnil(l, -1))
+ {
+ Celx_DoError(l, "script requested keyboard, but did not provide callback");
+@@ -3559,16 +3560,14 @@
+ return false;
+ }
+
+- lua_pushstring(state, "KM_PER_MICROLY");
+ lua_pushnumber(state, (lua_Number)KM_PER_LY/1e6);
+- lua_settable(state, LUA_GLOBALSINDEX);
++ lua_setglobal(state, "KM_PER_MICROLY");
+
+ loadLuaLibs(state);
+
+ // Create the celestia object
+- lua_pushstring(state, "celestia");
+ celestia_new(state, appCore);
+- lua_settable(state, LUA_GLOBALSINDEX);
++ lua_setglobal(state, "celestia");
+ // add reference to appCore in the registry
+ lua_pushstring(state, "celestia-appcore");
+ lua_pushlightuserdata(state, static_cast<void*>(appCore));
+@@ -3604,7 +3603,7 @@
+ void LuaState::setLuaPath(const string& s)
+ {
+ #if LUA_VER >= 0x050100
+- lua_getfield(state, LUA_GLOBALSINDEX, "package");
++ lua_getglobal(state, "package");
+ lua_pushstring(state, s.c_str());
+ lua_setfield(state, -2, "path");
+ lua_pop(state, 1);
+@@ -4118,7 +4117,7 @@
+ openLuaLibrary(state, LUA_LOADLIBNAME, luaopen_package);
+
+ // Disallow loadlib
+- lua_getfield(state, LUA_GLOBALSINDEX, "package");
++ lua_getglobal(state, "package");
+ lua_pushnil(state);
+ lua_setfield(state, -2, "loadlib");
+ lua_pop(state, 1);
+diff -Naur celestia-1.6.1.orig/src/celestia/celx_gl.cpp celestia-1.6.1/src/celestia/celx_gl.cpp
+--- celestia-1.6.1.orig/src/celestia/celx_gl.cpp 2011-06-05 18:11:13.000000000 +0200
++++ celestia-1.6.1/src/celestia/celx_gl.cpp 2013-08-22 06:31:25.114482561 +0200
+@@ -221,7 +221,6 @@
+ void LoadLuaGraphicsLibrary(lua_State* l)
+ {
+ CelxLua celx(l);
+- lua_pushstring(l, "gl");
+ lua_newtable(l);
+
+ celx.registerMethod("Frustum", gl_Frustum);
+@@ -259,11 +258,10 @@
+ celx.registerValue("NEAREST", GL_NEAREST);
+ celx.registerValue("SRC_ALPHA", GL_SRC_ALPHA);
+ celx.registerValue("ONE_MINUS_SRC_ALPHA", GL_ONE_MINUS_SRC_ALPHA);
+- lua_settable(l, LUA_GLOBALSINDEX);
++ lua_setglobal(l, "gl");
+
+- lua_pushstring(l, "glu");
+ lua_newtable(l);
+ celx.registerMethod("LookAt", glu_LookAt);
+ celx.registerMethod("Ortho2D", glu_Ortho2D);
+- lua_settable(l, LUA_GLOBALSINDEX);
++ lua_setglobal(l, "glu");
+ }