diff mbox

[04/81] move cpu command line setting to the beggining

Message ID 52febf4985251969e8283fb4abf2b1dc93324476.1249301360.git.quintela@redhat.com
State Superseded
Headers show

Commit Message

Juan Quintela Aug. 3, 2009, 12:45 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/configure b/configure
index efd8c96..ebec8d6 100755
--- a/configure
+++ b/configure
@@ -21,6 +21,7 @@  TMPSDLLOG="${TMPDIR1}/qemu-conf-sdl-$$-${RANDOM}.log"
 trap "rm -f $TMPC $TMPO $TMPE $TMPS $TMPI $TMPSDLLOG; exit" 0 2 3 15

 # default parameters
+cpu=""
 prefix=""
 interp_prefix="/usr/gnemul/qemu-%M"
 static="no"
@@ -44,6 +45,8 @@  for opt do
   ;;
   --cc=*) cc="$optarg"
   ;;
+  --cpu=*) cpu="$optarg"
+  ;;
   esac
 done

@@ -78,7 +81,10 @@  EOF
   $cc $CFLAGS -c -o $TMPO $TMPC > /dev/null 2> /dev/null
 }

-if check_define __i386__ ; then
+if test ! -z "$cpu" ; then
+  # command line argument
+  :
+elif check_define __i386__ ; then
   cpu="i386"
 elif check_define __x86_64__ ; then
   cpu="x86_64"
@@ -386,7 +392,7 @@  for opt do
   ;;
   --extra-ldflags=*) EXTRA_LDFLAGS="$optarg"
   ;;
-  --cpu=*) cpu="$optarg"
+  --cpu=*)
   ;;
   --target-list=*) target_list="$optarg"
   ;;