[SerialICE] New patch to review for serialice: 1f311ff Require lua>=5.2 version for SerialICE build

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Mon Nov 19 08:56:01 CET 2012


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1882

-gerrit

commit 1f311ff1e65d5f7abba2bd8a1470c8c482e1d51d
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Mon Nov 19 09:44:10 2012 +0200

    Require lua>=5.2 version for SerialICE build
    
    New simba filters require the LUA "bit32" module available
    beginning with lua version 5.2.
    
    Change-Id: I30026ef66bf08487eacba02d884bcd377527df18
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 qemu-0.15.x/configure | 42 +++++++++++++++++++++++++++---------------
 1 file changed, 27 insertions(+), 15 deletions(-)

diff --git a/qemu-0.15.x/configure b/qemu-0.15.x/configure
index 2eec0fb..8e085f8 100755
--- a/qemu-0.15.x/configure
+++ b/qemu-0.15.x/configure
@@ -1725,6 +1725,7 @@ done
 
 if test "$serialice" != "no" ; then
   serialice=no
+  got_lua=no
   cat > $TMPC << EOF
 #include <stdint.h>
 #include <lua.h>
@@ -1735,24 +1736,35 @@ static lua_State *L;
 int main(void) { L=luaL_newstate(); return 0; }
 EOF
 
-  lua_cflags="-I/usr/local/include"
-  lua_ldflags="-L/usr/local/lib -llua -lm"
-  if compile_prog "$lua_cflags" "$lua_ldflags" > /dev/null 2> /dev/null ; then
-    serialice=yes
-    libs_softmmu="$lua_ldflags $libs_softmmu"
-  else
-    lua_cflags=`$pkg_config --cflags lua 2> /dev/null || $pkg_config --cflags lua5.2 2> /dev/null || $pkg_config --cflags lua5.1 2> /dev/null`
-    lua_ldflags=`$pkg_config --libs lua 2> /dev/null || $pkg_config --libs lua5.2 2> /dev/null || $pkg_config --libs lua5.1 2> /dev/null`
+  if test "$got_lua" != "yes" ; then
+    lua_cflags="-I/usr/local/include"
+    lua_ldflags="-L/usr/local/lib -llua -lm"
     if compile_prog "$lua_cflags" "$lua_ldflags" > /dev/null 2> /dev/null ; then
-      serialice=yes
-      libs_softmmu="$lua_ldflags $libs_softmmu"
-    else
-      echo
-      echo "Error LUA not found, can't build with SerialICE support."
-      echo 
-      exit 1
+      got_lua=yes
     fi
   fi
+  if test "$got_lua" != "yes" && ! $pkg_config --atleast-version=5.2 lua ; then
+    lua_cflags=`$pkg_config --cflags lua 2> /dev/null`
+    lua_ldflags=`$pkg_config --libs lua 2> /dev/null`
+    if compile_prog "$lua_cflags" "$lua_ldflags" > /dev/null 2> /dev/null ; then
+      got_lua=yes
+    fi
+  fi
+  if test "$got_lua" != "yes" && ! $pkg_config --exists lua5.2 ; then
+    lua_cflags=`$pkg_config --cflags lua5.2 2> /dev/null`
+    lua_ldflags=`$pkg_config --libs lua5.2 2> /dev/null`
+    if compile_prog "$lua_cflags" "$lua_ldflags" > /dev/null 2> /dev/null ; then
+      got_lua=yes
+    fi
+  fi
+  if test "$got_lua" != "yes" ; then
+    echo
+    echo "Error LUA version >= 5.2 not found, can't build with SerialICE support."
+    echo
+    exit 1
+  fi
+  serialice=yes
+  libs_softmmu="$lua_ldflags $libs_softmmu"
 fi # test "$serialice"
 
 ##########################################



More information about the SerialICE mailing list