From 9a4db2b46667ae102806efdd3a4eb148a598d7f3 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Tue, 17 Nov 2009 04:47:26 +0000 Subject: [PATCH] Use the two new macros to supply auto-detection for lua. updates #989. Originally committed to SVN as r3802. --- aegisub/configure.in | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/aegisub/configure.in b/aegisub/configure.in index b54c75998..7321e6085 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -39,6 +39,7 @@ AC_CONFIG_HEADER([acconf.h]) AC_GNU_SOURCE AC_CANONICAL_HOST + ########################### # Check target architecture ########################### @@ -814,11 +815,16 @@ AM_CONDITIONAL([HAVE_UNIVCHARDET], [test "$with_univchardet" != "no"]) AC_ARG_WITH(lua, [ --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_LDFLAGS], [LDFLAGS to use for LUA 5.1 (default: -llua)]) +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: 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 - LUA_LDFLAGS="-llua"; + AGI_FIND_LIB([LUA], [lua51 lua-5.1 lua5.1 lua], [$LUA_LIBDIR]) fi aegisub_save_LIBS="$LIBS"