Update ax_lua.m4
Updated ax_lua.m4 to current version from GNU Autoconf Archive's git repository with additional patch to support OpenBSD.[1] Regenerated ``configure'' script. DOcumented changes. --- [1] https://savannah.gnu.org/patch/index.php?8355
This commit is contained in:
parent
f50ae8a80f
commit
0783d30362
15
README.md
15
README.md
@ -65,7 +65,20 @@ Install these ports:
|
|||||||
|
|
||||||
Then build:
|
Then build:
|
||||||
|
|
||||||
$ env CC=clang CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LUA=/usr/local/bin/lua52 LUA_INCLUDE=-I/usr/local/include/lua52 LUA_LIB=-llua-5.2 ./configure
|
$ env CC=clang CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure
|
||||||
|
$ make
|
||||||
|
|
||||||
|
#### OpenBSD
|
||||||
|
|
||||||
|
Install these packages (or *ports*):
|
||||||
|
|
||||||
|
* libconfig (*devel/libconfig*)
|
||||||
|
* libexecinfo (*devel/libexecinfo*)
|
||||||
|
* lua >= 5.2 (*lang/lua/5.2*)
|
||||||
|
|
||||||
|
Then build:
|
||||||
|
|
||||||
|
$ CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
#### Other UNIX
|
#### Other UNIX
|
||||||
|
25
ax_lua.m4
25
ax_lua.m4
@ -109,6 +109,7 @@
|
|||||||
# * /usr/include/lua/X.Y
|
# * /usr/include/lua/X.Y
|
||||||
# * /usr/include/luaXY
|
# * /usr/include/luaXY
|
||||||
# * /usr/local/include/luaX.Y
|
# * /usr/local/include/luaX.Y
|
||||||
|
# * /usr/local/include/lua-X.Y
|
||||||
# * /usr/local/include/lua/X.Y
|
# * /usr/local/include/lua/X.Y
|
||||||
# * /usr/local/include/luaXY
|
# * /usr/local/include/luaXY
|
||||||
#
|
#
|
||||||
@ -182,7 +183,7 @@
|
|||||||
# modified version of the Autoconf Macro, you may extend this special
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
# exception to the GPL to apply to your modified version as well.
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
#serial 20
|
#serial 21
|
||||||
|
|
||||||
dnl =========================================================================
|
dnl =========================================================================
|
||||||
dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION],
|
dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION],
|
||||||
@ -195,7 +196,7 @@ AC_DEFUN([AX_PROG_LUA],
|
|||||||
|
|
||||||
dnl Find a Lua interpreter.
|
dnl Find a Lua interpreter.
|
||||||
m4_define_default([_AX_LUA_INTERPRETER_LIST],
|
m4_define_default([_AX_LUA_INTERPRETER_LIST],
|
||||||
[lua lua5.2 lua5.1 lua50])
|
[lua lua5.2 lua52 lua5.1 lua51 lua50])
|
||||||
|
|
||||||
m4_if([$1], [],
|
m4_if([$1], [],
|
||||||
[ dnl No version check is needed. Find any Lua interpreter.
|
[ dnl No version check is needed. Find any Lua interpreter.
|
||||||
@ -259,7 +260,7 @@ AC_DEFUN([AX_PROG_LUA],
|
|||||||
AC_CACHE_CHECK([for $ax_display_LUA version], [ax_cv_lua_version],
|
AC_CACHE_CHECK([for $ax_display_LUA version], [ax_cv_lua_version],
|
||||||
[ ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
|
[ ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
|
||||||
sed "s|^Lua \(.*\)|\1|" | \
|
sed "s|^Lua \(.*\)|\1|" | \
|
||||||
grep -o "^@<:@0-9@:>@\+\\.@<:@0-9@:>@\+"`
|
grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
|
||||||
])
|
])
|
||||||
AS_IF([test "x$ax_cv_lua_version" = 'x'],
|
AS_IF([test "x$ax_cv_lua_version" = 'x'],
|
||||||
[AC_MSG_ERROR([invalid Lua version number])])
|
[AC_MSG_ERROR([invalid Lua version number])])
|
||||||
@ -364,7 +365,7 @@ dnl =========================================================================
|
|||||||
AC_DEFUN([_AX_LUA_CHK_VER],
|
AC_DEFUN([_AX_LUA_CHK_VER],
|
||||||
[
|
[
|
||||||
_ax_test_ver=`$1 -e "print(_VERSION)" 2>/dev/null | \
|
_ax_test_ver=`$1 -e "print(_VERSION)" 2>/dev/null | \
|
||||||
sed "s|^Lua \(.*\)|\1|" | grep -o "^@<:@0-9@:>@\+\\.@<:@0-9@:>@\+"`
|
sed "s|^Lua \(.*\)|\1|" | grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
|
||||||
AS_IF([test "x$_ax_test_ver" = 'x'],
|
AS_IF([test "x$_ax_test_ver" = 'x'],
|
||||||
[_ax_test_ver='0'])
|
[_ax_test_ver='0'])
|
||||||
AX_COMPARE_VERSION([$_ax_test_ver], [ge], [$2])
|
AX_COMPARE_VERSION([$_ax_test_ver], [ge], [$2])
|
||||||
@ -431,6 +432,7 @@ AC_DEFUN([AX_LUA_HEADERS],
|
|||||||
/usr/include/lua/$LUA_VERSION \
|
/usr/include/lua/$LUA_VERSION \
|
||||||
/usr/include/lua$LUA_SHORT_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_VERSION \
|
/usr/local/include/lua/$LUA_VERSION \
|
||||||
/usr/local/include/lua$LUA_SHORT_VERSION \
|
/usr/local/include/lua$LUA_SHORT_VERSION \
|
||||||
])
|
])
|
||||||
@ -490,7 +492,7 @@ int main(int argc, char ** argv)
|
|||||||
],
|
],
|
||||||
[ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
|
[ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
|
||||||
sed "s|^Lua \(.*\)|\1|" | \
|
sed "s|^Lua \(.*\)|\1|" | \
|
||||||
grep -o "^@<:@0-9@:>@\+\\.@<:@0-9@:>@\+"`
|
grep -E -o "^@<:@0-9@:>@+\.@<:@0-9@:>@+"`
|
||||||
],
|
],
|
||||||
[ax_cv_lua_header_version='unknown'])
|
[ax_cv_lua_header_version='unknown'])
|
||||||
CPPFLAGS=$_ax_lua_saved_cppflags
|
CPPFLAGS=$_ax_lua_saved_cppflags
|
||||||
@ -575,10 +577,15 @@ AC_DEFUN([AX_LUA_LIBS],
|
|||||||
dnl Try to find the Lua libs.
|
dnl Try to find the Lua libs.
|
||||||
_ax_lua_saved_libs=$LIBS
|
_ax_lua_saved_libs=$LIBS
|
||||||
LIBS="$LIBS $LUA_LIB"
|
LIBS="$LIBS $LUA_LIB"
|
||||||
AC_SEARCH_LIBS([lua_load], [lua$LUA_VERSION lua$LUA_SHORT_VERSION lua],
|
AC_SEARCH_LIBS([lua_load],
|
||||||
[_ax_found_lua_libs='yes'],
|
[ lua$LUA_VERSION \
|
||||||
[_ax_found_lua_libs='no'],
|
lua$LUA_SHORT_VERSION \
|
||||||
[$_ax_lua_extra_libs])
|
lua-$LUA_VERSION \
|
||||||
|
lua-$LUA_SHORT_VERSION \
|
||||||
|
lua],
|
||||||
|
[_ax_found_lua_libs='yes'],
|
||||||
|
[_ax_found_lua_libs='no'],
|
||||||
|
[$_ax_lua_extra_libs])
|
||||||
LIBS=$_ax_lua_saved_libs
|
LIBS=$_ax_lua_saved_libs
|
||||||
|
|
||||||
AS_IF([test "x$ac_cv_search_lua_load" != 'xno' &&
|
AS_IF([test "x$ac_cv_search_lua_load" != 'xno' &&
|
||||||
|
29
configure
vendored
29
configure
vendored
@ -2279,6 +2279,7 @@ ac_config_headers="$ac_config_headers config.h"
|
|||||||
# * /usr/include/lua/X.Y
|
# * /usr/include/lua/X.Y
|
||||||
# * /usr/include/luaXY
|
# * /usr/include/luaXY
|
||||||
# * /usr/local/include/luaX.Y
|
# * /usr/local/include/luaX.Y
|
||||||
|
# * /usr/local/include/lua-X.Y
|
||||||
# * /usr/local/include/lua/X.Y
|
# * /usr/local/include/lua/X.Y
|
||||||
# * /usr/local/include/luaXY
|
# * /usr/local/include/luaXY
|
||||||
#
|
#
|
||||||
@ -2352,7 +2353,7 @@ ac_config_headers="$ac_config_headers config.h"
|
|||||||
# modified version of the Autoconf Macro, you may extend this special
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
# exception to the GPL to apply to your modified version as well.
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
#serial 20
|
#serial 21
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -4049,7 +4050,7 @@ $as_echo "enabled" >&6; }
|
|||||||
|
|
||||||
|
|
||||||
if test "x$LUA" = 'x'; then :
|
if test "x$LUA" = 'x'; then :
|
||||||
for ac_prog in lua lua5.2 lua5.1 lua50
|
for ac_prog in lua lua5.2 lua52 lua5.1 lua51 lua50
|
||||||
do
|
do
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
@ -4126,7 +4127,7 @@ if ${ax_cv_lua_version+:} false; then :
|
|||||||
else
|
else
|
||||||
ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
|
ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
|
||||||
sed "s|^Lua \(.*\)|\1|" | \
|
sed "s|^Lua \(.*\)|\1|" | \
|
||||||
grep -o "^[0-9]\+\\.[0-9]\+"`
|
grep -E -o "^[0-9]+\.[0-9]+"`
|
||||||
|
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5
|
||||||
@ -4290,6 +4291,7 @@ done
|
|||||||
/usr/include/lua/$LUA_VERSION \
|
/usr/include/lua/$LUA_VERSION \
|
||||||
/usr/include/lua$LUA_SHORT_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_VERSION \
|
/usr/local/include/lua/$LUA_VERSION \
|
||||||
/usr/local/include/lua$LUA_SHORT_VERSION \
|
/usr/local/include/lua$LUA_SHORT_VERSION \
|
||||||
; do
|
; do
|
||||||
@ -4363,7 +4365,7 @@ _ACEOF
|
|||||||
if ac_fn_c_try_run "$LINENO"; then :
|
if ac_fn_c_try_run "$LINENO"; then :
|
||||||
ax_cv_lua_header_version=`./conftest$EXEEXT p | \
|
ax_cv_lua_header_version=`./conftest$EXEEXT p | \
|
||||||
sed "s|^Lua \(.*\)|\1|" | \
|
sed "s|^Lua \(.*\)|\1|" | \
|
||||||
grep -o "^[0-9]\+\\.[0-9]\+"`
|
grep -E -o "^[0-9]+\.[0-9]+"`
|
||||||
|
|
||||||
else
|
else
|
||||||
ax_cv_lua_header_version='unknown'
|
ax_cv_lua_header_version='unknown'
|
||||||
@ -4643,7 +4645,11 @@ return lua_load ();
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
for ac_lib in '' lua$LUA_VERSION lua$LUA_SHORT_VERSION lua; do
|
for ac_lib in '' lua$LUA_VERSION \
|
||||||
|
lua$LUA_SHORT_VERSION \
|
||||||
|
lua-$LUA_VERSION \
|
||||||
|
lua-$LUA_SHORT_VERSION \
|
||||||
|
lua; do
|
||||||
if test -z "$ac_lib"; then
|
if test -z "$ac_lib"; then
|
||||||
ac_res="none required"
|
ac_res="none required"
|
||||||
else
|
else
|
||||||
@ -4713,7 +4719,7 @@ $as_echo "enabled" >&6; }
|
|||||||
|
|
||||||
|
|
||||||
if test "x$LUA" = 'x'; then :
|
if test "x$LUA" = 'x'; then :
|
||||||
for ac_prog in lua lua5.2 lua5.1 lua50
|
for ac_prog in lua lua5.2 lua52 lua5.1 lua51 lua50
|
||||||
do
|
do
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
@ -4790,7 +4796,7 @@ if ${ax_cv_lua_version+:} false; then :
|
|||||||
else
|
else
|
||||||
ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
|
ax_cv_lua_version=`$LUA -e "print(_VERSION)" | \
|
||||||
sed "s|^Lua \(.*\)|\1|" | \
|
sed "s|^Lua \(.*\)|\1|" | \
|
||||||
grep -o "^[0-9]\+\\.[0-9]\+"`
|
grep -E -o "^[0-9]+\.[0-9]+"`
|
||||||
|
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5
|
||||||
@ -4954,6 +4960,7 @@ done
|
|||||||
/usr/include/lua/$LUA_VERSION \
|
/usr/include/lua/$LUA_VERSION \
|
||||||
/usr/include/lua$LUA_SHORT_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_VERSION \
|
/usr/local/include/lua/$LUA_VERSION \
|
||||||
/usr/local/include/lua$LUA_SHORT_VERSION \
|
/usr/local/include/lua$LUA_SHORT_VERSION \
|
||||||
; do
|
; do
|
||||||
@ -5027,7 +5034,7 @@ _ACEOF
|
|||||||
if ac_fn_c_try_run "$LINENO"; then :
|
if ac_fn_c_try_run "$LINENO"; then :
|
||||||
ax_cv_lua_header_version=`./conftest$EXEEXT p | \
|
ax_cv_lua_header_version=`./conftest$EXEEXT p | \
|
||||||
sed "s|^Lua \(.*\)|\1|" | \
|
sed "s|^Lua \(.*\)|\1|" | \
|
||||||
grep -o "^[0-9]\+\\.[0-9]\+"`
|
grep -E -o "^[0-9]+\.[0-9]+"`
|
||||||
|
|
||||||
else
|
else
|
||||||
ax_cv_lua_header_version='unknown'
|
ax_cv_lua_header_version='unknown'
|
||||||
@ -5307,7 +5314,11 @@ return lua_load ();
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
for ac_lib in '' lua$LUA_VERSION lua$LUA_SHORT_VERSION lua; do
|
for ac_lib in '' lua$LUA_VERSION \
|
||||||
|
lua$LUA_SHORT_VERSION \
|
||||||
|
lua-$LUA_VERSION \
|
||||||
|
lua-$LUA_SHORT_VERSION \
|
||||||
|
lua; do
|
||||||
if test -z "$ac_lib"; then
|
if test -z "$ac_lib"; then
|
||||||
ac_res="none required"
|
ac_res="none required"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user