Fix issues with previous commit

This commit is contained in:
jacobkeeler 2020-03-03 10:52:40 -05:00
parent 6a1af0006f
commit c3c6ded576
4 changed files with 545 additions and 6 deletions

View File

@ -279,6 +279,13 @@ LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
LUA = @LUA@
LUA_EXEC_PREFIX = @LUA_EXEC_PREFIX@
LUA_INCLUDE = @LUA_INCLUDE@
LUA_PLATFORM = @LUA_PLATFORM@
LUA_PREFIX = @LUA_PREFIX@
LUA_SHORT_VERSION = @LUA_SHORT_VERSION@
LUA_VERSION = @LUA_VERSION@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@ -342,10 +349,14 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
luadir = @luadir@
luaexecdir = @luaexecdir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgluadir = @pkgluadir@
pkgluaexecdir = @pkgluaexecdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@

View File

@ -7,18 +7,30 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <lauxlib.h> header file. */
/* #undef HAVE_LAUXLIB_H */
/* Define to 1 if you have the <luaconf.h> header file. */
/* #undef HAVE_LUACONF_H */
/* Define to 1 if you have the <lualib.h> header file. */
/* #undef HAVE_LUALIB_H */
/* Define to 1 if you have the <lua.h> header file. */
/* #undef HAVE_LUA_H */
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
/* #undef HAVE_MALLOC */
#define HAVE_MALLOC 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
/* #undef HAVE_MEMSET */
#define HAVE_MEMSET 1
/* Define to 1 if you have the <stddef.h> header file. */
/* #undef HAVE_STDDEF_H */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
@ -42,7 +54,7 @@
#define HAVE_UNISTD_H 1
/* Define to 1 if the system has the type `_Bool'. */
/* #undef HAVE__BOOL */
#define HAVE__BOOL 1
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"

View File

@ -6,6 +6,18 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <lauxlib.h> header file. */
#undef HAVE_LAUXLIB_H
/* Define to 1 if you have the <luaconf.h> header file. */
#undef HAVE_LUACONF_H
/* Define to 1 if you have the <lualib.h> header file. */
#undef HAVE_LUALIB_H
/* Define to 1 if you have the <lua.h> header file. */
#undef HAVE_LUA_H
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC

508
configure vendored
View File

@ -639,6 +639,17 @@ PKG_CONFIG_PATH
PKG_CONFIG
BUILD_TESTS_FALSE
BUILD_TESTS_TRUE
LUA_INCLUDE
pkgluaexecdir
luaexecdir
pkgluadir
luadir
LUA_EXEC_PREFIX
LUA_PREFIX
LUA_PLATFORM
LUA_SHORT_VERSION
LUA_VERSION
LUA
BUILD_LUA_FALSE
BUILD_LUA_TRUE
am__EXEEXT_FALSE
@ -785,6 +796,8 @@ LIBS
CPPFLAGS
LT_SYS_LIBRARY_PATH
CPP
LUA
LUA_INCLUDE
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
@ -1456,6 +1469,8 @@ Some influential environment variables:
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
CPP C preprocessor
LUA The Lua interpreter, e.g. /usr/bin/lua5.1
LUA_INCLUDE The Lua includes, e.g. -I/usr/include/lua5.1
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
@ -15681,10 +15696,499 @@ fi
if test -z "$BUILD_LUA_TRUE"; then :
AX_PROG_LUA(5.1, 5.4)
if test "x$LUA" != 'x'; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LUA is a Lua interpreter" >&5
$as_echo_n "checking if $LUA is a Lua interpreter... " >&6; }
_ax_lua_factorial=`$LUA 2>/dev/null -e '
-- a simple factorial
function fact (n)
if n == 0 then
return 1
else
return n * fact(n-1)
end
end
print("fact(5) is " .. fact(5))'`
if test "$_ax_lua_factorial" = 'fact(5) is 120'; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "not a Lua interpreter" "$LINENO" 5
fi
_ax_check_text="whether $LUA version >= 5.1, < 5.4"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5
$as_echo_n "checking $_ax_check_text... " >&6; }
_ax_lua_good_version=`$LUA -e '
-- a script to compare versions
function verstr2num(verstr)
local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)")
if majorver and minorver then
return tonumber(majorver) * 100 + tonumber(minorver)
end
end
local minver = verstr2num("5.1")
local _, _, trimver = string.find(_VERSION, "^Lua (.*)")
local ver = verstr2num(trimver)
local maxver = verstr2num("5.4") or 1e9
if minver <= ver and ver < maxver then
print("yes")
else
print("no")
end'`
if test "x$_ax_lua_good_version" = "xyes"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "version is out of range for specified LUA" "$LINENO" 5
fi
ax_display_LUA=$LUA
else
_ax_check_text="for a Lua interpreter with version >= 5.1, < 5.4"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5
$as_echo_n "checking $_ax_check_text... " >&6; }
if ${ax_cv_pathless_LUA+:} false; then :
$as_echo_n "(cached) " >&6
else
for ax_cv_pathless_LUA in lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50 none; do
test "x$ax_cv_pathless_LUA" = 'xnone' && break
_ax_lua_factorial=`$ax_cv_pathless_LUA 2>/dev/null -e '
-- a simple factorial
function fact (n)
if n == 0 then
return 1
else
return n * fact(n-1)
end
end
print("fact(5) is " .. fact(5))'`
if test "$_ax_lua_factorial" = 'fact(5) is 120'; then :
else
continue
fi
_ax_lua_good_version=`$ax_cv_pathless_LUA -e '
-- a script to compare versions
function verstr2num(verstr)
local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)")
if majorver and minorver then
return tonumber(majorver) * 100 + tonumber(minorver)
end
end
local minver = verstr2num("5.1")
local _, _, trimver = string.find(_VERSION, "^Lua (.*)")
local ver = verstr2num(trimver)
local maxver = verstr2num("5.4") or 1e9
if minver <= ver and ver < maxver then
print("yes")
else
print("no")
end'`
if test "x$_ax_lua_good_version" = "xyes"; then :
break
fi
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_pathless_LUA" >&5
$as_echo "$ax_cv_pathless_LUA" >&6; }
if test "x$ax_cv_pathless_LUA" = 'xnone'; then :
LUA=':'
else
# Extract the first word of "$ax_cv_pathless_LUA", so it can be a program name with args.
set dummy $ax_cv_pathless_LUA; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_LUA+:} false; then :
$as_echo_n "(cached) " >&6
else
case $LUA in
[\\/]* | ?:[\\/]*)
ac_cv_path_LUA="$LUA" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LUA="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
LUA=$ac_cv_path_LUA
if test -n "$LUA"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LUA" >&5
$as_echo "$LUA" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
ax_display_LUA=$ax_cv_pathless_LUA
fi
if test "x$LUA" = 'x:'; then :
as_fn_error $? "cannot find suitable Lua interpreter" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA version" >&5
$as_echo_n "checking for $ax_display_LUA version... " >&6; }
if ${ax_cv_lua_version+:} false; then :
$as_echo_n "(cached) " >&6
else
ax_cv_lua_version=`$LUA -e '
-- return a version number in X.Y format
local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)")
print(ver)'`
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5
$as_echo "$ax_cv_lua_version" >&6; }
if test "x$ax_cv_lua_version" = 'x'; then :
as_fn_error $? "invalid Lua version number" "$LINENO" 5
fi
LUA_VERSION=$ax_cv_lua_version
LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA platform" >&5
$as_echo_n "checking for $ax_display_LUA platform... " >&6; }
if ${ax_cv_lua_platform+:} false; then :
$as_echo_n "(cached) " >&6
else
ax_cv_lua_platform=`$LUA -e 'print("unknown")'`
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_platform" >&5
$as_echo "$ax_cv_lua_platform" >&6; }
LUA_PLATFORM=$ax_cv_lua_platform
LUA_PREFIX='${prefix}'
LUA_EXEC_PREFIX='${exec_prefix}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA script directory" >&5
$as_echo_n "checking for $ax_display_LUA script directory... " >&6; }
if ${ax_cv_lua_luadir+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$prefix" = 'xNONE'; then :
ax_lua_prefix=$ac_default_prefix
else
ax_lua_prefix=$prefix
fi
ax_cv_lua_luadir="$LUA_PREFIX/share/lua/$LUA_VERSION"
ax_lua_prefixed_path=`$LUA -e '
-- get the path based on search type
local searchtype = "script"
local paths = ""
if searchtype == "script" then
paths = (package and package.path) or LUA_PATH
elseif searchtype == "module" then
paths = (package and package.cpath) or LUA_CPATH
end
-- search for the prefix
local prefix = "'$ax_lua_prefix'"
local minpath = ""
local mindepth = 1e9
string.gsub(paths, "([^;]+)",
function (path)
path = string.gsub(path, "%?.*$", "")
path = string.gsub(path, "/[^/]*$", "")
if string.find(path, prefix) then
local depth = string.len(string.gsub(path, "[^/]", ""))
if depth < mindepth then
minpath = path
mindepth = depth
end
end
end)
print(minpath)'`
if test "x$ax_lua_prefixed_path" != 'x'; then :
_ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'`
ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
$SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"`
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_luadir" >&5
$as_echo "$ax_cv_lua_luadir" >&6; }
luadir=$ax_cv_lua_luadir
pkgluadir=\${luadir}/$PACKAGE
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA module directory" >&5
$as_echo_n "checking for $ax_display_LUA module directory... " >&6; }
if ${ax_cv_lua_luaexecdir+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$exec_prefix" = 'xNONE'; then :
ax_lua_exec_prefix=$ax_lua_prefix
else
ax_lua_exec_prefix=$exec_prefix
fi
ax_cv_lua_luaexecdir="$LUA_EXEC_PREFIX/lib/lua/$LUA_VERSION"
ax_lua_prefixed_path=`$LUA -e '
-- get the path based on search type
local searchtype = "module"
local paths = ""
if searchtype == "script" then
paths = (package and package.path) or LUA_PATH
elseif searchtype == "module" then
paths = (package and package.cpath) or LUA_CPATH
end
-- search for the prefix
local prefix = "'$ax_lua_exec_prefix'"
local minpath = ""
local mindepth = 1e9
string.gsub(paths, "([^;]+)",
function (path)
path = string.gsub(path, "%?.*$", "")
path = string.gsub(path, "/[^/]*$", "")
if string.find(path, prefix) then
local depth = string.len(string.gsub(path, "[^/]", ""))
if depth < mindepth then
minpath = path
mindepth = depth
end
end
end)
print(minpath)'`
if test "x$ax_lua_prefixed_path" != 'x'; then :
_ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'`
ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
$SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"`
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_luaexecdir" >&5
$as_echo "$ax_cv_lua_luaexecdir" >&6; }
luaexecdir=$ax_cv_lua_luaexecdir
pkgluaexecdir=\${luaexecdir}/$PACKAGE
fi
fi
if test -z "$BUILD_LUA_TRUE"; then :
AX_LUA_HEADERS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if LUA_VERSION is defined" >&5
$as_echo_n "checking if LUA_VERSION is defined... " >&6; }
if test "x$LUA_VERSION" != 'x'; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "cannot check Lua headers without knowing LUA_VERSION" "$LINENO" 5
fi
LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'`
_ax_lua_saved_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
for ac_header in lua.h lualib.h lauxlib.h luaconf.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
CPPFLAGS=$_ax_lua_saved_cppflags
if test "x$LUA_INCLUDE" = 'x' &&
test "x$ac_cv_header_lua_h" != 'xyes'; then :
for _ax_include_path in /usr/include/lua$LUA_VERSION \
/usr/include/lua-$LUA_VERSION \
/usr/include/lua/$LUA_VERSION \
/usr/include/lua$LUA_SHORT_VERSION \
/usr/local/include/lua$LUA_VERSION \
/usr/local/include/lua-$LUA_VERSION \
/usr/local/include/lua/$LUA_VERSION \
/usr/local/include/lua$LUA_SHORT_VERSION \
; do
test ! -d "$_ax_include_path" && continue
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua headers in" >&5
$as_echo_n "checking for Lua headers in... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ax_include_path" >&5
$as_echo "$_ax_include_path" >&6; }
{ ac_cv_header_lua_h=; unset ac_cv_header_lua_h;}
{ ac_cv_header_lualib_h=; unset ac_cv_header_lualib_h;}
{ ac_cv_header_lauxlib_h=; unset ac_cv_header_lauxlib_h;}
{ ac_cv_header_luaconf_h=; unset ac_cv_header_luaconf_h;}
_ax_lua_saved_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$_ax_include_path"
for ac_header in lua.h lualib.h lauxlib.h luaconf.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
CPPFLAGS=$_ax_lua_saved_cppflags
if test "x$ac_cv_header_lua_h" = 'xyes'; then :
LUA_INCLUDE="-I$_ax_include_path"
break
fi
done
fi
if test "x$ac_cv_header_lua_h" = 'xyes'; then :
if test "x$cross_compiling" != 'xyes'; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua header version" >&5
$as_echo_n "checking for Lua header version... " >&6; }
if ${ax_cv_lua_header_version+:} false; then :
$as_echo_n "(cached) " >&6
else
_ax_lua_saved_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <lua.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char ** argv)
{
if(argc > 1) printf("%s", LUA_VERSION);
exit(EXIT_SUCCESS);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ax_cv_lua_header_version=`./conftest$EXEEXT p | \
$SED -n "s|^Lua \([0-9]\{1,\}\.[0-9]\{1,\}\).\{0,\}|\1|p"`
else
ax_cv_lua_header_version='unknown'
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
CPPFLAGS=$_ax_lua_saved_cppflags
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_header_version" >&5
$as_echo "$ax_cv_lua_header_version" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Lua header version matches $LUA_VERSION" >&5
$as_echo_n "checking if Lua header version matches $LUA_VERSION... " >&6; }
if test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
ax_header_version_match='yes'
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
ax_header_version_match='no'
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling so assuming header version number matches" >&5
$as_echo "$as_me: WARNING: cross compiling so assuming header version number matches" >&2;}
ax_header_version_match='yes'
fi
fi
if test "x$ax_header_version_match" != 'xyes' &&
test "x$LUA_INCLUDE" != 'x'; then :
as_fn_error $? "cannot find headers for specified LUA_INCLUDE" "$LINENO" 5
fi
if test "x$ax_header_version_match" = 'xyes'; then :
else
as_fn_error $? "cannot find Lua includes" "$LINENO" 5
fi
fi