Skip to contentSkip to conversation

configure: avoid screening of --{en, dis}able-usb-redir options

PATCH Superseded Max Filippov 2 participants 3 messages Nov 24, 2011

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 configure: avoid screening of --{en, dis}able-usb-redir options

--*dir) option pattern precede --{en,dis}able-usb-redir) patterns in the option analysis switch, making the latter options have no effect.

There were some --*dir that are supported by Autoconf and not by QEMU configure. The aim was to let QEMU packagers use the rpm (or similar) macro that overrides directories for their distribution.

Replace --*dir with exact option names.

---
 configure |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)
configure +22 -2
index f033438..3154307 100755
@@ -569,6 +569,28 @@ for opt do
   ;;
   --sysconfdir=*) sysconfdir="$optarg"
   ;;
+  --sbindir=*)
+  ;;
+  --libexecdir=*)
+  ;;
+  --sharedstatedir=*)
+  ;;
+  --localstatedir=*)
+  ;;
+  --oldincludedir=*)
+  ;;
+  --datarootdir=*)
+  ;;
+  --infodir=*)
+  ;;
+  --localedir=*)
+  ;;
+  --dvidir=*)
+  ;;
+  --pdfdir=*)
+  ;;
+  --psdir=*)
+  ;;
   --disable-sdl) sdl="no"
   ;;
   --enable-sdl) sdl="yes"
@@ -759,8 +781,6 @@ for opt do
   ;;
   --enable-opengl) opengl="yes"
   ;;
-  --*dir)
-  ;;
   --disable-rbd) rbd="no"
   ;;
   --enable-rbd) rbd="yes"
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH v3 1/1 configure: avoid screening of --{en, dis}able-usb-redir options

--*dir) option pattern precede --{en,dis}able-usb-redir) patterns in the option analysis switch, making the latter options have no effect.

There were some --*dir that are supported by Autoconf and not by QEMU configure. The aim was to let QEMU packagers use the rpm (or similar) macro that overrides directories for their distribution.

Replace --*dir with exact option names.

---
v2 -> v3 changes: add --htmldir

---
 configure |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)
configure +24 -2
index f033438..3a23795 100755
@@ -569,6 +569,30 @@ for opt do
   ;;
   --sysconfdir=*) sysconfdir="$optarg"
   ;;
+  --sbindir=*)
+  ;;
+  --libexecdir=*)
+  ;;
+  --sharedstatedir=*)
+  ;;
+  --localstatedir=*)
+  ;;
+  --oldincludedir=*)
+  ;;
+  --datarootdir=*)
+  ;;
+  --infodir=*)
+  ;;
+  --localedir=*)
+  ;;
+  --htmldir=*)
+  ;;
+  --dvidir=*)
+  ;;
+  --pdfdir=*)
+  ;;
+  --psdir=*)
+  ;;
   --disable-sdl) sdl="no"
   ;;
   --enable-sdl) sdl="yes"
@@ -759,8 +783,6 @@ for opt do
   ;;
   --enable-opengl) opengl="yes"
   ;;
-  --*dir)
-  ;;
   --disable-rbd) rbd="no"
   ;;
   --enable-rbd) rbd="yes"
Signature · 1 line
1.7.2.5
#2 lore raw
Quoted 6 lines · Max Filippov

+  --sbindir=*)
+  ;;
+  --libexecdir=*)
+  ;;
+  --sharedstatedir=*)
+  ;;

You can combine these all into one case, like this:

--sbindir=*|--libexecdir=*|--sharedstatedir=*|--localstatedir=*|\
--oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
--htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
# These switches are silently ignored, for compatibility with # autoconf-generated configure scripts. This allows QEMU's # configure to be used by RPM and similar macros that set # lots of directory switches by default.
;;

(also please include the comment as rationale in the configure script).

-- PMM