From 6db16915951af61d28f62f4de7c14c76e4303f18 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Fri, 17 Jan 2014 19:07:59 +0000 Subject: [PATCH] edje: use luajit by default, if you want lua use --enable-lua-old --- configure.ac | 43 ++++++++++++++++++++++++++++++--------- m4/{efl_lua.m4 => efl_lua_old.m4} | 5 +++-- 2 files changed, 36 insertions(+), 12 deletions(-) rename m4/{efl_lua.m4 => efl_lua_old.m4} (90%) diff --git a/configure.ac b/configure.ac index 62ed2c5..045af73 100644 --- a/configure.ac +++ b/configure.ac @@ -576,8 +576,8 @@ AC_ARG_ENABLE([systemd], if test "x${have_systemd_pkg}" = "xauto" -o "x${have_systemd_pkg}" = "xyes"; then PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon >= 192 libsystemd-journal >= 192], - [have_systemd_pkg="yes"], - [have_systemd_pkg="no"]) + [have_systemd_pkg="yes"], + [have_systemd_pkg="no"]) fi # check for systemd library if requested @@ -3170,20 +3170,20 @@ EFL_OPTIONAL_DEPEND_PKG([EEZE], [${want_libmount}], EFL_ADD_FEATURE([EEZE], [libmount], [${have_eeze_mount}]) PKG_CHECK_EXISTS([mount < 2.19.0], - [have_libmount_old="yes"], - [have_libmount_old="no"]) + [have_libmount_old="yes"], + [have_libmount_old="no"]) AC_MSG_CHECKING([Use old libmount API (before 2.19.0)]) AC_MSG_RESULT([${have_libmount_old}]) PKG_CHECK_EXISTS([mount == 2.19.0], - [have_libmount_219="yes"], - [have_libmount_219="no"]) + [have_libmount_219="yes"], + [have_libmount_219="no"]) AC_MSG_CHECKING([Use libmount 2.19.0 API]) AC_MSG_RESULT([${have_libmount_219}]) PKG_CHECK_EXISTS([mount > 2.19.0], - [have_libmount_new="yes"], - [have_libmount_new="no"]) + [have_libmount_new="yes"], + [have_libmount_new="no"]) AC_MSG_CHECKING([Use new libmount API (older than 2.19.0)]) AC_MSG_RESULT([${have_libmount_new}]) @@ -3230,7 +3230,7 @@ AC_DEFINE_UNQUOTED([EEZE_EJECT_BIN], ["$with_eeze_eject"], [eject bin to use]) EFL_LIB_END_OPTIONAL([Eeze]) AM_CONDITIONAL([EEZE_LIBMOUNT_AFTER_219], - [test "x${have_libmount_new}" = "xyes"]) + [test "x${have_libmount_new}" = "xyes"]) AM_CONDITIONAL([EEZE_LIBMOUNT_BEFORE_219], [test "x${have_libmount_old}" = "xyes"]) AM_CONDITIONAL([HAVE_EEZE_MOUNT], [test "x${have_eeze_mount}" = "xyes"]) @@ -3584,6 +3584,19 @@ AC_ARG_ENABLE([multisense], ], [want_multisense="no"]) +want_lua_old="no" +AC_ARG_ENABLE([lua-old], + [AC_HELP_STRING([--enable-lua-old], + [Enable interpreted Lua support (5.1 or 5.2). @<:@default=disabled@:>@])], + [ + if test "x${enableval}" = "xyes" ; then + want_lua_old="yes" + else + want_lua_old="no" + fi + ], + [want_lua_old="no"]) + # TODO: should we keep or remove these? want_edje_program_cache="no" want_edje_calc_cache="yes" @@ -3612,8 +3625,14 @@ EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_multisense}], [ecore-audio]) EFL_ADD_FEATURE([EDJE], [physics]) EFL_ADD_FEATURE([EDJE], [multisense]) +EFL_ADD_FEATURE([EDJE], [lua-old]) + +if test "${want_lua_old}" = "yes"; then + EFL_CHECK_LUA_OLD([EDJE]) +else + EFL_DEPEND_PKG([EDJE], [LUAJIT], [luajit >= 2.0.0]) +fi -EFL_CHECK_LUA([EDJE]) EFL_ADD_LIBS([EDJE], [-lm]) EFL_EVAL_PKGS([EDJE]) @@ -3629,6 +3648,10 @@ AM_CONDITIONAL([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"]) AC_DEFINE_IF([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"], [1], [Use Multisense]) AC_SUBST([want_multisense]) +AM_CONDITIONAL([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"]) +AC_DEFINE_IF([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"], + [1], [Use interpreted Lua (5.1 or 5.2)]) +AC_SUBST([want_lua_old]) AC_SUBST([want_physics]) ### Checks for header files diff --git a/m4/efl_lua.m4 b/m4/efl_lua_old.m4 similarity index 90% rename from m4/efl_lua.m4 rename to m4/efl_lua_old.m4 index b66ad0c..ff8a33a 100644 --- a/m4/efl_lua.m4 +++ b/m4/efl_lua_old.m4 @@ -1,8 +1,9 @@ -dnl EFL_CHECK_LUA(EFL) +dnl EFL_CHECK_LUA_OLD(EFL) dnl checks for lua 5.1 or 5.2 in pkg-config (multiple names) and -llua directly dnl will call EFL_ADD_LIBS() or EFL_DEPEND_PKG() as required. dnl this is a strict call and will abort if lua is not found -AC_DEFUN([EFL_CHECK_LUA], +dnl keep in mind that this is only executed if --enable-lua-old is set +AC_DEFUN([EFL_CHECK_LUA_OLD], [dnl requirement_lua="" PKG_CHECK_EXISTS([lua >= 5.1.0], [requirement_lua="lua >= 5.1.0"], -- 2.7.4