Use the two new macros to supply auto-detection for lua. updates #989.

Originally committed to SVN as r3802.
This commit is contained in:
Amar Takhar 2009-11-17 04:47:26 +00:00
parent 932a7777be
commit 9a4db2b466

View file

@ -39,6 +39,7 @@ AC_CONFIG_HEADER([acconf.h])
AC_GNU_SOURCE AC_GNU_SOURCE
AC_CANONICAL_HOST AC_CANONICAL_HOST
########################### ###########################
# Check target architecture # Check target architecture
########################### ###########################
@ -814,11 +815,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"