Fix typo(s), also fix the conditionals that enabled/disabled auto3/4 supported

based on the --with* flags being supplied.  Not sure what I was thinking
originally, or if I was at all.

Originally committed to SVN as r2038.
This commit is contained in:
Amar Takhar 2008-03-13 07:16:53 +00:00
parent 433997b43e
commit dff23e8cd3

View file

@ -339,10 +339,10 @@ AM_CONDITIONAL([HAVE_UNIVCHARDET], [test "$with_univchardet" != "no"])
## Auto4 LUA ## Auto4 LUA
############ ############
AC_ARG_WITH(lua, AC_ARG_WITH(lua,
[ --without-lua build without lua 5.1 (auto3)], [lua_disabled="(disabled)"]) [ --without-lua build without lua 5.1 (auto4)], [lua_disabled="(disabled)"])
AC_ARG_WITH(lua-lib, AC_ARG_WITH(lua-lib,
[ --with-lua-lib=PREFIX PATH location of lua 5.1 library], [lua_lib_dir="-L$withval"]) [ --with-lua-lib=PREFIX PATH location of lua 5.1 library (auto4)], [lua_lib_dir="-L$withval"])
AC_ARG_WITH(lua-include, AC_ARG_WITH(lua-include,
[ --with-lua-include=PREFIX [ --with-lua-include=PREFIX
@ -352,17 +352,16 @@ if test "$with_lua" != no; then
aegisub_save_LDFLAGS="$LDFLAGS" aegisub_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lua_lib_dir" LDFLAGS="$LDFLAGS $lua_lib_dir"
AC_CHECK_LIB([lua], [lua_call], LUA_LDFLAGS="$lua_lib_dir -llua", with_lua_lib="no") AC_CHECK_LIB([lua], [lua_call], [LUA_LDFLAGS="$lua_lib_dir -llua"; with_lua_lib="yes"])
LDFLAGS="$aegisub_save_LDFLAGS" LDFLAGS="$aegisub_save_LDFLAGS"
aegisub_save_CPPFLAGS="$CPPFLAGS" aegisub_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $lua_include_dir" CPPFLAGS="$CPPFLAGS $lua_include_dir"
AC_CHECK_HEADER([lua.h],[LUA_CPPFLAGS="$lua_include_dir"], with_lua_include="no") AC_CHECK_HEADER([lua.h],[LUA_CPPFLAGS="$lua_include_dir"; with_lua_include="yes"])
CPPFLAGS="$aegisub_save_CPPFLAGS" CPPFLAGS="$aegisub_save_CPPFLAGS"
fi fi
if (test "$with_lua_lib" != "no" || ! test "$have_lua_include" != "no") && test "$with_lua" != "no"; then if test "$with_lua_lib" = "yes" && ! test "$have_lua_include" = "yes" && test "$with_lua" != "no"; then
with_auto4="yes" with_auto4="yes"
with_automation="yes" with_automation="yes"
AC_DEFINE(WITH_AUTO4_LUA, 1, [Enable Automation (auto4), requires lua]) AC_DEFINE(WITH_AUTO4_LUA, 1, [Enable Automation (auto4), requires lua])
@ -407,6 +406,7 @@ else
with_auto3="no" with_auto3="no"
fi fi
AM_CONDITIONAL([HAVE_AUTO3_LUA], [test "$with_auto3" != "no"]) AM_CONDITIONAL([HAVE_AUTO3_LUA], [test "$with_auto3" != "no"])
AC_SUBST(LUA50_CPPFLAGS) AC_SUBST(LUA50_CPPFLAGS)
AC_SUBST(LUA50_LDFLAGS) AC_SUBST(LUA50_LDFLAGS)
@ -625,7 +625,7 @@ fi
AC_MSG_RESULT([ AC_MSG_RESULT([
Scripting Engines: Scripting Engines:
auto4 Perl: $with_perl $perl_disabled auto4 Perl: $with_perl $perl_disabled
auto3: $with_auto3 auto3: $with_auto3 $lua50_disabled
auto4: $with_auto4 $lua_disabled auto4: $with_auto4 $lua_disabled
auto4 Ruby: $with_ruby $ruby_disabled auto4 Ruby: $with_ruby $ruby_disabled