Patchwork [3/7] Sort together all options that take arguments

login
register
mail settings
Submitter Juan Quintela
Date Jan. 20, 2010, 5:41 p.m.
Message ID <ca762ab591bf71fe78f45820eb3752780a38b8d2.1264008700.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/43335/
State New
Headers show

Comments

Juan Quintela - Jan. 20, 2010, 5:41 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |  103 +++++++++++++++++++++++++++++++-----------------------------
 1 files changed, 53 insertions(+), 50 deletions(-)

Patch

diff --git a/configure b/configure
index 6175b75..1e6088c 100755
--- a/configure
+++ b/configure
@@ -60,12 +60,12 @@  audio_win_int=""
 for opt do
   optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
   case "$opt" in
-  --cross-prefix=*) cross_prefix="$optarg"
-  ;;
   --cc=*) cc="$optarg"
   ;;
   --cpu=*) cpu="$optarg"
   ;;
+  --cross-prefix=*) cross_prefix="$optarg"
+  ;;
   --extra-cflags=*) QEMU_CFLAGS="$optarg $QEMU_CFLAGS"
   ;;
   --extra-ldflags=*) LDFLAGS="$optarg $LDFLAGS"
@@ -427,56 +427,67 @@  werror=""
 for opt do
   optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
   case "$opt" in
+# Standard options
   --help|-h) show_help=yes
   ;;
+  --interp-prefix=*) interp_prefix="$optarg"
+  ;;
   --prefix=*) prefix="$optarg"
   ;;
-  --interp-prefix=*) interp_prefix="$optarg"
+  --target-list=*) target_list="$optarg"
   ;;
-  --source-path=*) source_path="$optarg"
-  source_path_used="yes"
+# Advanced options
+  --audio-card-list=*) audio_card_list=`echo "$optarg" | sed -e 's/,/ /g'`
   ;;
-  --cross-prefix=*)
+  --audio-drv-list=*) audio_drv_list="$optarg"
   ;;
-  --cc=*)
+  --block-drv-whitelist=*) block_drv_whitelist=`echo "$optarg" | sed -e 's/,/ /g'`
   ;;
-  --host-cc=*) host_cc="$optarg"
+  --cc=*)
   ;;
-  --make=*) make="$optarg"
+  --cpu=*)
   ;;
-  --install=*) install="$optarg"
+  --cross-prefix=*)
   ;;
   --extra-cflags=*)
   ;;
   --extra-ldflags=*)
   ;;
-  --cpu=*)
+  --fmod-inc=*) fmod_inc="$optarg"
   ;;
-  --target-list=*) target_list="$optarg"
+  --fmod-lib=*) fmod_lib="$optarg"
   ;;
-  --enable-gprof) gprof="yes"
+  --host-cc=*) host_cc="$optarg"
   ;;
-  --disable-gprof) gprof="no"
+  --install=*) install="$optarg"
   ;;
-  --static)
-    static="yes"
-    LDFLAGS="-static $LDFLAGS"
+  --kerneldir=*) kerneldir="$optarg"
   ;;
-  --disable-sdl) sdl="no"
+  --make=*) make="$optarg"
   ;;
-  --enable-sdl) sdl="yes"
+  --oss-lib=*) oss_lib="$optarg"
   ;;
-  --fmod-lib=*) fmod_lib="$optarg"
+  --set-uname-release=*) uname_release="$optarg"
   ;;
-  --fmod-inc=*) fmod_inc="$optarg"
+  --source-path=*)
+    source_path="$optarg"
+    source_path_used="yes"
   ;;
-  --oss-lib=*) oss_lib="$optarg"
+  --sparc_cpu=*)
   ;;
-  --audio-card-list=*) audio_card_list=`echo "$optarg" | sed -e 's/,/ /g'`
+  --with-pkgversion=*) pkgversion=" ($optarg)"
   ;;
-  --audio-drv-list=*) audio_drv_list="$optarg"
+  --static)
+    static="yes"
+    LDFLAGS="-static $LDFLAGS"
   ;;
-  --block-drv-whitelist=*) block_drv_whitelist=`echo "$optarg" | sed -e 's/,/ /g'`
+  --enable-gprof) gprof="yes"
+  ;;
+  --disable-gprof) gprof="no"
+  ;;
+  --disable-sdl) sdl="no"
+  ;;
+  --enable-sdl) sdl="yes"
   ;;
   --enable-debug-tcg) debug_tcg="yes"
   ;;
@@ -578,10 +589,6 @@  for opt do
   ;;
   --disable-user-pie) user_pie="no"
   ;;
-  --set-uname-release=*) uname_release="$optarg"
-  ;;
-  --sparc_cpu=*)
-  ;;
   --enable-werror) werror="yes"
   ;;
   --disable-werror) werror="no"
@@ -622,10 +629,6 @@  for opt do
   ;;
   --enable-blobs) blobs="yes"
   ;;
-  --kerneldir=*) kerneldir="$optarg"
-  ;;
-  --with-pkgversion=*) pkgversion=" ($optarg)"
-  ;;
   --disable-docs) docs="no"
   ;;
   --enable-docs) docs="yes"
@@ -699,20 +702,32 @@  Options: [defaults in brackets after descriptions]
 EOF
 echo "Standard options:"
 echo "  --help                   print this message"
-echo "  --prefix=PREFIX          install in PREFIX [$prefix]"
 echo "  --interp-prefix=PREFIX   where to find shared libraries, etc."
 echo "                           use %M for cpu name [$interp_prefix]"
+echo "  --prefix=PREFIX          install in PREFIX [$prefix]"
 echo "  --target-list=LIST       set target list [$target_list]"
 echo ""
 echo "Advanced options (experts only):"
-echo "  --source-path=PATH       path of source code [$source_path]"
-echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"
+echo "  --audio-drv-list=LIST    set audio drivers list:"
+echo "                           Available drivers: $audio_possible_drivers"
+echo "  --audio-card-list=LIST   set list of emulated audio cards [$audio_card_list]"
+echo "                           Available cards: $audio_possible_cards"
+echo "  --block-drv-whitelist=L  set block driver whitelist"
+echo "                           (affects only QEMU, not qemu-img)"
 echo "  --cc=CC                  use C compiler CC [$cc]"
-echo "  --host-cc=CC             use C compiler CC [$host_cc] for dyngen etc."
+echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"
 echo "  --extra-cflags=CFLAGS    append extra C compiler flags QEMU_CFLAGS"
 echo "  --extra-ldflags=LDFLAGS  append extra linker flags LDFLAGS"
-echo "  --make=MAKE              use specified make [$make]"
+echo "  --fmod-inc=PATH          path to FMOD includes"
+echo "  --fmod-lib=PATH          path to FMOD library"
+echo "  --host-cc=CC             use C compiler CC [$host_cc] for dyngen etc."
 echo "  --install=INSTALL        use specified install [$install]"
+echo "  --kerneldir=PATH         look for kernel includes in PATH"
+echo "  --make=MAKE              use specified make [$make]"
+echo "  --oss-lib=PATH           path to OSS library"
+echo "  --set-uname-release=R Return R for uname -r in usermode emulation"
+echo "  --source-path=PATH       path of source code [$source_path]"
+echo "  --sparc_cpu=V            Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
 echo "  --static                 enable static build [$static]"
 echo "  --disable-gprof          disable gprof profiling"
 echo "  --enable-gprof           enable gprof profiling"
@@ -734,12 +749,6 @@  echo "  --disable-sdl            disable SDL"
 echo "  --enable-sdl             enable SDL"
 echo "  --disable-cocoa          disable COCOA (Mac OS X only)"
 echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
-echo "  --audio-drv-list=LIST    set audio drivers list:"
-echo "                           Available drivers: $audio_possible_drivers"
-echo "  --audio-card-list=LIST   set list of emulated audio cards [$audio_card_list]"
-echo "                           Available cards: $audio_possible_cards"
-echo "  --block-drv-whitelist=L  set block driver whitelist"
-echo "                           (affects only QEMU, not qemu-img)"
 echo "  --disable-mixemu         disable mixer emulation"
 echo "  --enable-mixemu          enable mixer emulation"
 echo "  --disable-xen            disable xen backend driver support"
@@ -779,11 +788,6 @@  echo "                           emulation targets"
 echo "  --disable-guest-base     disable GUEST_BASE support"
 echo "  --enable-user-pie        build usermode emulation targets as PIE"
 echo "  --disable-user-pie       do not build usermode emulation targets as PIE"
-echo "  --fmod-lib=PATH          path to FMOD library"
-echo "  --fmod-inc=PATH          path to FMOD includes"
-echo "  --oss-lib=PATH           path to OSS library"
-echo "  --set-uname-release=R Return R for uname -r in usermode emulation"
-echo "  --sparc_cpu=V            Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
 echo "  --disable-uuid           disable uuid support"
 echo "  --enable-uuid            enable uuid support"
 echo "  --disable-vde            disable support for vde network"
@@ -794,7 +798,6 @@  echo "  --disable-io-thread      disable IO thread"
 echo "  --enable-io-thread       enable IO thread"
 echo "  --disable-blobs          disable installing provided firmware blobs"
 echo "  --enable-blobs           enable installing provided firmware blobs"
-echo "  --kerneldir=PATH         look for kernel includes in PATH"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1