mirror of https://github.com/odrling/Aegisub
Merge r3802 which is a verbatium merge, and also includes the glue required to support LUA 5.0.
Originally committed to SVN as r3824.
This commit is contained in:
parent
b5d3a6ec09
commit
8ddfdf89d8
|
@ -44,6 +44,7 @@ AC_GNU_SOURCE
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# Check target architecture
|
# Check target architecture
|
||||||
###########################
|
###########################
|
||||||
|
@ -793,11 +794,16 @@ AM_CONDITIONAL([HAVE_UNIVCHARDET], [test "$with_univchardet" != "no"])
|
||||||
AC_ARG_WITH(lua,
|
AC_ARG_WITH(lua,
|
||||||
[ --without-lua build without lua 5.1 (auto4)], [lua51_disabled="(disabled)"])
|
[ --without-lua build without lua 5.1 (auto4)], [lua51_disabled="(disabled)"])
|
||||||
|
|
||||||
AC_ARG_VAR([LUA_CFLAGS], [CFLAGS to use for LUA 5.1 (default: CPPFLAGS)])
|
AC_ARG_VAR([LUA_CFLAGS], [CFLAGS to use for LUA 5.1 (default: autodetect)])
|
||||||
AC_ARG_VAR([LUA_LDFLAGS], [LDFLAGS to use for LUA 5.1 (default: -llua)])
|
AC_ARG_VAR([LUA_LDFLAGS], [LDFLAGS to use for LUA 5.1 (default: autodetect)])
|
||||||
|
AC_ARG_VAR([LUA_LIBDIR], [Location of LUA 5.1 library. (default: none)])
|
||||||
|
|
||||||
|
if test -z "$LUA_CFLAGS"; then
|
||||||
|
AGI_FIND_HEADER([LUA], [lua.h], [/usr/include/lua5.1 /usr/include/lua51 /usr/local/include/lua51 /usr/local/include/lua5.1 /usr/include /usr/local/include])
|
||||||
|
fi
|
||||||
|
|
||||||
if test -z "$LUA_LDFLAGS"; then
|
if test -z "$LUA_LDFLAGS"; then
|
||||||
LUA_LDFLAGS="-llua";
|
AGI_FIND_LIB([LUA], [lua51 lua-5.1 lua5.1 lua], [$LUA_LIBDIR])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
aegisub_save_LIBS="$LIBS"
|
aegisub_save_LIBS="$LIBS"
|
||||||
|
@ -837,17 +843,24 @@ AC_SUBST(LUA_LDFLAGS)
|
||||||
## Auto3 (LUA 5.0)
|
## Auto3 (LUA 5.0)
|
||||||
##################
|
##################
|
||||||
|
|
||||||
AC_ARG_VAR([LUA50_CFLAGS], [CFLAGS to use for LUA 5.0 (default: CPPFLAGS)])
|
|
||||||
AC_ARG_VAR([LUA50_LDFLAGS], [LDFLAGS to use for LUA 5.1 (default: -llua -llualib)])
|
|
||||||
if test -z "$LUA50_LDFLAGS"; then
|
|
||||||
LUA50_LDFLAGS="-llua -llualib";
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_WITH(lua50,
|
AC_ARG_WITH(lua50,
|
||||||
[ --without-lua50 build without lua 5.0 (auto3)], [lua50_disabled="(disabled)"])
|
[ --without-lua50 build without lua 5.0 (auto3)], [lua50_disabled="(disabled)"])
|
||||||
|
|
||||||
|
AC_ARG_VAR([LUA50_CFLAGS], [CFLAGS to use for LUA 5.1 (default: autodetect)])
|
||||||
|
AC_ARG_VAR([LUA50_LDFLAGS], [LDFLAGS to use for LUA 5.1 (default: autodetect)])
|
||||||
|
AC_ARG_VAR([LUA50_LIBDIR], [Location of LUA 5.1 library. (default: none)])
|
||||||
|
|
||||||
|
if test -z "$LUA50_CFLAGS"; then
|
||||||
|
AGI_FIND_HEADER([LUA50], [lua.h], [/usr/include/lua5.0 /usr/include/lua50 /usr/local/include/lua50 /usr/local/include/lua5.0 /usr/include /usr/local/include])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$LUA50_LDFLAGS"; then
|
||||||
|
AGI_FIND_LIB([LUA50], [lua50 lua-5.0 lua5.0 lua], [$LUA50_LIBDIR])
|
||||||
|
AGI_FIND_LIB([LUALIB50], [lualib50 lualib-5.0 lualib5.0 lualib], [$LUA50_LIBDIR], [$LUA50_LDFLAGS])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$with_lua50" != no; then
|
if test "$with_lua50" != no; then
|
||||||
AC_AGI_COMPILE([Lua 5.0 (auto3)], [lua50], [$LUA50_CFLAGS], [$LUA50_LDFLAGS],[
|
AC_AGI_COMPILE([Lua 5.0 (auto3)], [lua50], [$LUA50_CFLAGS], [$LUA50_LDFLAGS $LUALIB50_LDFLAGS],[
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
#include "lauxlib.h"
|
#include "lauxlib.h"
|
||||||
|
@ -874,6 +887,7 @@ fi
|
||||||
AM_CONDITIONAL([HAVE_AUTO3_LUA], [test "$with_auto3" != "no"])
|
AM_CONDITIONAL([HAVE_AUTO3_LUA], [test "$with_auto3" != "no"])
|
||||||
AC_SUBST(LUA50_CFLAGS)
|
AC_SUBST(LUA50_CFLAGS)
|
||||||
AC_SUBST(LUA50_LDFLAGS)
|
AC_SUBST(LUA50_LDFLAGS)
|
||||||
|
AC_SUBST(LUALIB50_LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ AC_DEFUN([AGI_FIND_LIB],[
|
||||||
|
|
||||||
for lib in $2; do
|
for lib in $2; do
|
||||||
vlib=`echo $lib | $as_tr_sh`
|
vlib=`echo $lib | $as_tr_sh`
|
||||||
LDFLAGS="$LDDIR -l$lib"
|
LDFLAGS="$LDDIR -l$lib $4"
|
||||||
AC_CACHE_CHECK(
|
AC_CACHE_CHECK(
|
||||||
[for -l${lib}],
|
[for -l${lib}],
|
||||||
[agi_cv_lib_${vlib}],
|
[agi_cv_lib_${vlib}],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
if HAVE_AUTO3_LUA
|
if HAVE_AUTO3_LUA
|
||||||
|
|
||||||
AM_CFLAGS = -DAUTO3LIB @LUA50_CFLAGS@
|
AM_CFLAGS = -DAUTO3LIB @LUA50_CFLAGS@
|
||||||
AM_LDFLAGS = @LUA50_LDFLAGS@
|
AM_LDFLAGS = @LUA50_LDFLAGS@ @LUALIB50_LDFLAGS@
|
||||||
|
|
||||||
lib_LTLIBRARIES = libaegisub-auto3-2.1.la
|
lib_LTLIBRARIES = libaegisub-auto3-2.1.la
|
||||||
libaegisub_auto3_2_1_la_SOURCES = auto3.c
|
libaegisub_auto3_2_1_la_SOURCES = auto3.c
|
||||||
|
|
Loading…
Reference in New Issue