Make --enable-foo a requirement
cover Make --enable-foo a requirement
Hi
--enable-foo in current qemu just means to enable foo if it founds it, otherwise just not enable it silently. This patches changed everything to use the convention:
* foo="no", feature will only be used if --enable-foo arg is given
* foo="", feature will be searched for, and if found, will be used
* foo="yes", this value vill only be set by --enable-foo flag.
feature will searched for, if not found, configure exits with error
It is important for distributions. Otherwise, if something is not installed, things don't fail to compile, just are disabled.
Once there, add --enable-foo for all things that already have --disable-foo and make sense. There are still a few bits that donot' have both --enable-foo/--disable-foo, but they are the minimal things.
kvm: the extra error message is only given if you do a --enable-kvm, by default, if kvm is not found, it just fails, as everything else.
Questions:
- sdl: anyone really uses sdl + static? I am not sure that they compile correctly, and they are just complicated.
- Do we want to sort things on the file? I.e. libraries detection toguether, features detection together, .... Just new they are a completely mess, completely unsorted as far as I can see.
Later, Juan.
Juan Quintela (20):
Make vnc configure options less verbose.
Use the same structure for list of libs in curses and pthread Add feature configure help
Add error message for feature not found
Add brlapi to new feature convencion
Add vde to new feature convencion
Add vnc_tls to new feature convencion
Add vnc_sasl to new feature convencion
Add curses to new feature convencion
Add curl to new feature convencion
Add pthread to new feature convencion
Add nptl to new feature convencion
Add bluez to new feature convencion
Add build_docs to new feature convention
Rename build_docs to docs
Add sdl to new feature convention
Add fdt to new feature convention
Add xen to new feature convention
Add kvm to new feature convention
Add sparse to new feature convention
configure | 319 +++++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 228 insertions(+), 91 deletions(-)
PATCH 1/20 Make vnc configure options less verbose.
Rest of libraries don't print themselves
--- configure | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-)
configure +0 -8
@@ -1516,15 +1516,7 @@ echo "Audio drivers $audio_drv_list" echo "Extra audio cards $audio_card_list" echo "Mixer emulation $mixemu" echo "VNC TLS support $vnc_tls" -if test "$vnc_tls" = "yes" ; then - echo " TLS CFLAGS $vnc_tls_cflags" - echo " TLS LIBS $vnc_tls_libs" -fi echo "VNC SASL support $vnc_sasl" -if test "$vnc_sasl" = "yes" ; then - echo " SASL CFLAGS $vnc_sasl_cflags" - echo " SASL LIBS $vnc_sasl_libs" -fi if test -n "$sparc_cpu"; then echo "Target Sparc Arch $sparc_cpu" fi
Signature · 1 line
1.6.2.5
PATCH 2/20 Use the same structure for list of libs in curses and pthread
In reply to Juan Quintela--- configure | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-)
configure +10 -8
@@ -1078,8 +1078,10 @@ fi ########################################## # curses probe +curses_list="-lncurses -lcurses" if test "$curses" = "yes" ; then + curses=no cat > $TMPC << EOF #include <curses.h> #ifdef __OpenBSD__
@@ -1087,14 +1089,14 @@ if test "$curses" = "yes" ; then #endif int main(void) { resize_term(0, 0); return curses_version(); } EOF - if compile_prog "" "-lncurses" ; then - libs_softmmu="-lncurses $libs_softmmu" - elif compile_prog "" "-lcurses" ; then - libs_softmmu="-lcurses $libs_softmmu" - else - curses=no - fi -fi # test "$curses" + for curses_lib in $curses_list; do + if compile_prog "" "$curses_lib" ; then + curses=yes + libs_softmmu="$curses_lib $libs_softmmu" + break + fi + done +fi ########################################## # curl probe
Signature · 1 line
1.6.2.5
PATCH 3/20 Add feature configure help
In reply to Juan Quintela--- configure | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
configure +11 -0
@@ -168,6 +168,17 @@ case "$cpu" in cpu="unknown" ;; esac + +# Default value for a variable defining feature "foo" +# * foo="no", feature will only be used if --enable-foo arg is given +# * foo="", feature will be searched for, and if found, will be used +# * foo="yes", this value vill only be set by --enable-foo flag. +# feature will searched for, if not found, configure exits with error +# +# Always add --enable-foo and --disable-foo command line args. Distributions want +# to ensure that several features are compiled in, and it is impossible without a +# --enable-foo that exits if feature is not found + brlapi="yes" gprof="no" debug_tcg="no"
Signature · 1 line
1.6.2.5
PATCH 4/20 Add error message for feature not found
In reply to Juan Quintela--- configure | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
configure +10 -0
@@ -766,6 +766,16 @@ if test -z "$target_list" ; then exit 1 fi +feature_not_found() { + feature=$1 + + echo "ERROR" + echo "ERROR: User requested feature $feature" + echo "ERROR: configure was not able to found it" + echo "ERROR" + exit 1; +} + if test -z "$cross_prefix" ; then # ---
Signature · 1 line
1.6.2.5
PATCH 5/20 Add brlapi to new feature convencion
In reply to Juan Quintela--- configure | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
configure +10 -3
@@ -179,7 +179,7 @@ esac # to ensure that several features are compiled in, and it is impossible without a # --enable-foo that exits if feature is not found -brlapi="yes" +brlapi="" gprof="no" debug_tcg="no" debug="no"
@@ -469,6 +469,8 @@ for opt do ;; --disable-brlapi) brlapi="no" ;; + --enable-brlapi) brlapi="yes" + ;; --disable-bluez) bluez="no" ;; --disable-kvm) kvm="no"
@@ -633,6 +635,7 @@ echo " Available cards: $audio_possible_cards" echo " --enable-mixemu enable mixer emulation" echo " --disable-xen disable xen backend driver support" echo " --disable-brlapi disable BrlAPI" +echo " --enable-brlapi enable BrlAPI" echo " --disable-vnc-tls disable TLS encryption for VNC server" echo " --disable-vnc-sasl disable SASL encryption for VNC server" echo " --disable-curses disable curses output"
@@ -1084,8 +1087,7 @@ done ########################################## # BrlAPI probe -if test "$brlapi" = "yes" ; then - brlapi=no +if test "$brlapi" != "no" ; then brlapi_libs="-lbrlapi" cat > $TMPC << EOF #include <brlapi.h>
@@ -1094,6 +1096,11 @@ EOF if compile_prog "" "$brlapi_libs" ; then brlapi=yes libs_softmmu="$brlapi_libs $libs_softmmu" + else + if test "$brlapi" = "yes" ; then + feature_not_found "brlapi" + fi + brlapi=no fi fi
Signature · 1 line
1.6.2.5
PATCH 6/20 Add vde to new feature convencion
In reply to Juan Quintela--- configure | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-)
configure +11 -3
@@ -180,6 +180,8 @@ esac # --enable-foo that exits if feature is not found brlapi="" +vde="" + gprof="no" debug_tcg="no" debug="no"
@@ -189,7 +191,6 @@ bigendian="no" mingw32="no" EXESUF="" slirp="yes" -vde="yes" fmod_lib="" fmod_inc="" oss_lib=""
@@ -463,6 +464,8 @@ for opt do ;; --disable-vde) vde="no" ;; + --enable-vde) vde="yes" + ;; --disable-kqemu) kqemu="no" ;; --disable-xen) xen="no"
@@ -660,6 +663,7 @@ echo " --oss-lib path to OSS library" echo " --enable-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-vde disable support for vde network" +echo " --enable-vde enable support for vde network" echo " --disable-pthread disable pthread support" echo " --disable-aio disable AIO support" echo " --enable-io-thread enable IO thread"
@@ -978,8 +982,7 @@ fi ########################################## # vde libraries probe -if test "$vde" = "yes" ; then - vde=no +if test "$vde" != "no" ; then vde_libs="-lvdeplug" cat > $TMPC << EOF #include <libvdeplug.h>
@@ -994,6 +997,11 @@ EOF vde=yes libs_softmmu="$vde_libs $libs_softmmu" libs_tools="$vde_libs $libs_tools" + else + if test "$vde" = "yes" ; then + feature_not_found "vde" + fi + vde=no fi fi
Signature · 1 line
1.6.2.5
PATCH 7/20 Add vnc_tls to new feature convencion
In reply to Juan Quintela--- configure | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-)
configure +16 -9
@@ -181,6 +181,7 @@ esac brlapi="" vde="" +vnc_tls="" gprof="no" debug_tcg="no"
@@ -194,7 +195,6 @@ slirp="yes" fmod_lib="" fmod_inc="" oss_lib="" -vnc_tls="yes" vnc_sasl="yes" bsd="no" linux="no"
@@ -458,6 +458,8 @@ for opt do ;; --disable-vnc-tls) vnc_tls="no" ;; + --enable-vnc-tls) vnc_tls="yes" + ;; --disable-vnc-sasl) vnc_sasl="no" ;; --disable-slirp) slirp="no"
@@ -640,6 +642,7 @@ echo " --disable-xen disable xen backend driver support" echo " --disable-brlapi disable BrlAPI" echo " --enable-brlapi enable BrlAPI" echo " --disable-vnc-tls disable TLS encryption for VNC server" +echo " --enable-vnc-tls enable TLS encryption for VNC server" echo " --disable-vnc-sasl disable SASL encryption for VNC server" echo " --disable-curses disable curses output" echo " --disable-curl disable curl connectivity"
@@ -933,18 +936,22 @@ fi ########################################## # VNC TLS detection -if test "$vnc_tls" = "yes" ; then -cat > $TMPC <<EOF +if test "$vnc_tls" != "no" ; then + cat > $TMPC <<EOF #include <gnutls/gnutls.h> int main(void) { gnutls_session_t s; gnutls_init(&s, GNUTLS_SERVER); return 0; } EOF - vnc_tls_cflags=`pkg-config --cflags gnutls 2> /dev/null` - vnc_tls_libs=`pkg-config --libs gnutls 2> /dev/null` - if compile_prog "$vnc_tls_cflags" "$vnc_tls_libs" ; then - libs_softmmu="$vnc_tls_libs $libs_softmmu" - else - vnc_tls="no" + vnc_tls_cflags=`pkg-config --cflags gnutls 2> /dev/null` + vnc_tls_libs=`pkg-config --libs gnutls 2> /dev/null` + if compile_prog "$vnc_tls_cflags" "$vnc_tls_libs" ; then + vnc_tls=yes + libs_softmmu="$vnc_tls_libs $libs_softmmu" + else + if test "$vnc_tls" = "yes" ; then + feature_not_found "vnc-tls" fi + vnc_tls=no + fi fi ##########################################
Signature · 1 line
1.6.2.5
PATCH 8/20 Add vnc_sasl to new feature convencion
In reply to Juan Quintela--- configure | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-)
configure +16 -9
@@ -182,6 +182,7 @@ esac brlapi="" vde="" vnc_tls="" +vnc_sasl="" gprof="no" debug_tcg="no"
@@ -195,7 +196,6 @@ slirp="yes" fmod_lib="" fmod_inc="" oss_lib="" -vnc_sasl="yes" bsd="no" linux="no" solaris="no"
@@ -462,6 +462,8 @@ for opt do ;; --disable-vnc-sasl) vnc_sasl="no" ;; + --enable-vnc-sasl) vnc_sasl="yes" + ;; --disable-slirp) slirp="no" ;; --disable-vde) vde="no"
@@ -644,6 +646,7 @@ echo " --enable-brlapi enable BrlAPI" echo " --disable-vnc-tls disable TLS encryption for VNC server" echo " --enable-vnc-tls enable TLS encryption for VNC server" echo " --disable-vnc-sasl disable SASL encryption for VNC server" +echo " --enable-vnc-sasl enable SASL encryption for VNC server" echo " --disable-curses disable curses output" echo " --disable-curl disable curl connectivity" echo " --disable-bluez disable bluez stack connectivity"
@@ -957,19 +960,23 @@ fi ########################################## # VNC SASL detection if test "$vnc_sasl" = "yes" ; then -cat > $TMPC <<EOF + cat > $TMPC <<EOF #include <sasl/sasl.h> #include <stdio.h> int main(void) { sasl_server_init(NULL, "qemu"); return 0; } EOF - # Assuming Cyrus-SASL installed in /usr prefix - vnc_sasl_cflags="" - vnc_sasl_libs="-lsasl2" - if compile_prog "$vnc_sasl_cflags" "$vnc_sasl_libs" ; then - libs_softmmu="$vnc_sasl_libs $libs_softmmu" - else - vnc_sasl="no" + # Assuming Cyrus-SASL installed in /usr prefix + vnc_sasl_cflags="" + vnc_sasl_libs="-lsasl2" + if compile_prog "$vnc_sasl_cflags" "$vnc_sasl_libs" ; then + vnc_sasl=yes + libs_softmmu="$vnc_sasl_libs $libs_softmmu" + else + if test "$vnc_sasl" = "yes" ; then + feature_not_found "vnc-sasl" fi + vnc_sasl=no + fi fi ##########################################
Signature · 1 line
1.6.2.5
PATCH 9/20 Add curses to new feature convencion
In reply to Juan Quintela--- configure | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-)
configure +15 -4
@@ -180,6 +180,7 @@ esac # --enable-foo that exits if feature is not found brlapi="" +curses="" vde="" vnc_tls="" vnc_sasl=""
@@ -209,7 +210,6 @@ bsd_user="no" guest_base="" build_docs="yes" uname_release="" -curses="yes" curl="yes" pthread="yes" aio="yes"
@@ -519,6 +519,8 @@ for opt do ;; --disable-curses) curses="no" ;; + --enable-curses) curses="yes" + ;; --disable-curl) curl="no" ;; --disable-nptl) nptl="no"
@@ -648,6 +650,7 @@ echo " --enable-vnc-tls enable TLS encryption for VNC server" echo " --disable-vnc-sasl disable SASL encryption for VNC server" echo " --enable-vnc-sasl enable SASL encryption for VNC server" echo " --disable-curses disable curses output" +echo " --enable-curses enable curses output" echo " --disable-curl disable curl connectivity" echo " --disable-bluez disable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support"
@@ -1130,8 +1133,8 @@ fi # curses probe curses_list="-lncurses -lcurses" -if test "$curses" = "yes" ; then - curses=no +if test "$curses" != "no" ; then + curses_found=no cat > $TMPC << EOF #include <curses.h> #ifdef __OpenBSD__
@@ -1141,11 +1144,19 @@ int main(void) { resize_term(0, 0); return curses_version(); } EOF for curses_lib in $curses_list; do if compile_prog "" "$curses_lib" ; then - curses=yes + curses_found=yes libs_softmmu="$curses_lib $libs_softmmu" break fi done + if test "$curses_found" = "yes" ; then + curses=yes + else + if test "$curses" = "yes" ; then + feature_not_found "curses" + fi + curses=no + fi fi ##########################################
Signature · 1 line
1.6.2.5
PATCH 10/20 Add curl to new feature convencion
In reply to Juan Quintela--- configure | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
configure +10 -3
@@ -180,6 +180,7 @@ esac # --enable-foo that exits if feature is not found brlapi="" +curl="" curses="" vde="" vnc_tls=""
@@ -210,7 +211,6 @@ bsd_user="no" guest_base="" build_docs="yes" uname_release="" -curl="yes" pthread="yes" aio="yes" io_thread="no"
@@ -523,6 +523,8 @@ for opt do ;; --disable-curl) curl="no" ;; + --enable-curl) curl="yes" + ;; --disable-nptl) nptl="no" ;; --enable-mixemu) mixemu="yes"
@@ -652,6 +654,7 @@ echo " --enable-vnc-sasl enable SASL encryption for VNC server" echo " --disable-curses disable curses output" echo " --enable-curses enable curses output" echo " --disable-curl disable curl connectivity" +echo " --enable-curl enable curl connectivity" echo " --disable-bluez disable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support"
@@ -1162,8 +1165,7 @@ fi ########################################## # curl probe -if test "$curl" = "yes" ; then - curl=no +if test "$curl" != "no" ; then cat > $TMPC << EOF #include <curl/curl.h> int main(void) { return curl_easy_init(); }
@@ -1174,6 +1176,11 @@ EOF curl=yes libs_tools="$curl_libs $libs_tools" libs_softmmu="$curl_libs $libs_softmmu" + else + if test "$curl" = "yes" ; then + feature_not_found "curl" + fi + curl=no fi fi # test "$curl"
Signature · 1 line
1.6.2.5
PATCH 11/20 Add pthread to new feature convencion
--- configure | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-)
configure +15 -4
@@ -182,6 +182,7 @@ esac brlapi="" curl="" curses="" +pthread="" vde="" vnc_tls="" vnc_sasl=""
@@ -211,7 +212,6 @@ bsd_user="no" guest_base="" build_docs="yes" uname_release="" -pthread="yes" aio="yes" io_thread="no" nptl="yes"
@@ -531,6 +531,8 @@ for opt do ;; --disable-pthread) pthread="no" ;; + --enable-pthread) pthread="yes" + ;; --disable-aio) aio="no" ;; --enable-io-thread) io_thread="yes"
@@ -677,6 +679,7 @@ echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plu echo " --disable-vde disable support for vde network" echo " --enable-vde enable support for vde network" echo " --disable-pthread disable pthread support" +echo " --enable-pthread enable pthread support" echo " --disable-aio disable AIO support" echo " --enable-io-thread enable IO thread" echo " --disable-blobs disable installing provided firmware blobs"
@@ -1257,19 +1260,27 @@ fi # pthread probe PTHREADLIBS_LIST="-lpthread -lpthreadGC2" -if test "$pthread" = yes; then - pthread=no +if test "$pthread" != "no" ; then + pthread_found=no cat > $TMPC << EOF #include <pthread.h> int main(void) { pthread_create(0,0,0,0); return 0; } EOF for pthread_lib in $PTHREADLIBS_LIST; do if compile_prog "" "$pthread_lib" ; then - pthread=yes + pthread_found=yes LIBS="$pthread_lib $LIBS" break fi done + if test "$pthread_found" = "yes" ; then + pthread=yes + else + if test "$pthread" = "yes" ; then + feature_not_found "pthread" + fi + pthread=no + fi fi if test "$pthread" = no; then
Signature · 1 line
1.6.2.5
PATCH 12/20 Add nptl to new feature convencion
In reply to Juan Quintela--- configure | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-)
configure +18 -7
@@ -182,6 +182,7 @@ esac brlapi="" curl="" curses="" +nptl="" pthread="" vde="" vnc_tls=""
@@ -214,7 +215,6 @@ build_docs="yes" uname_release="" aio="yes" io_thread="no" -nptl="yes" mixemu="no" bluez="yes" kvm="no"
@@ -527,6 +527,8 @@ for opt do ;; --disable-nptl) nptl="no" ;; + --enable-nptl) nptl="yes" + ;; --enable-mixemu) mixemu="yes" ;; --disable-pthread) pthread="no"
@@ -660,6 +662,7 @@ echo " --enable-curl enable curl connectivity" echo " --disable-bluez disable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support" +echo " --enable-nptl disable usermode NPTL support" echo " --enable-system enable all system emulation targets" echo " --disable-system disable all system emulation targets" echo " --enable-linux-user enable all linux usermode emulation targets"
@@ -835,8 +838,12 @@ case "$cpu" in ;; esac -# Check host NPTL support -cat > $TMPC <<EOF + +########################################## +# NPTL probe + +if test "$nptl" != "no" ; then + cat > $TMPC <<EOF #include <sched.h> #include <linux/futex.h> void foo()
@@ -847,10 +854,14 @@ void foo() } EOF -if compile_object ; then - : -else - nptl="no" + if compile_object ; then + nptl=yes + else + if test "$nptl" = "yes" ; then + feature_not_found "nptl" + fi + nptl=no + fi fi ##########################################
Signature · 1 line
1.6.2.5
Re: [Qemu-devel] [PATCH 12/20] Add nptl to new feature convencion
configure echo " --enable-curl enable curl connectivity" · line 665
Quoted 5 lines · Juan Quintela
configure +1
-0@@ -660,6 +662,7 @@ echo " --enable-curl enable curl connectivity" echo " --disable-bluez disable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support" +echo " --enable-nptl disable usermode NPTL support"
This looks like a bad case of cut-and-paste.
-Nathan
[Qemu-devel] Re: [PATCH 12/20] Add nptl to new feature convencion
Quoted 8 lines · Nathan Froyd
configure echo " --enable-curl enable curl connectivity" · line 665
Quoted 5 lines · Juan Quintela
configure +1
-0@@ -660,6 +662,7 @@ echo " --enable-curl enable curl connectivity" echo " --disable-bluez disable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support" +echo " --enable-nptl disable usermode NPTL support"This looks like a bad case of cut-and-paste.
Well spoted, thanks.
PATCH 13/20 Add bluez to new feature convencion
In reply to Juan QuintelaOnce there, remove extra check for package and output if bluez was found or not as the other features
--- configure | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-)
configure +10 -5
@@ -179,6 +179,7 @@ esac # to ensure that several features are compiled in, and it is impossible without a # --enable-foo that exits if feature is not found +bluez="" brlapi="" curl="" curses=""
@@ -216,7 +217,6 @@ uname_release="" aio="yes" io_thread="no" mixemu="no" -bluez="yes" kvm="no" kerneldir="" aix="no"
@@ -480,6 +480,8 @@ for opt do ;; --disable-bluez) bluez="no" ;; + --enable-bluez) bluez="yes" + ;; --disable-kvm) kvm="no" ;; --enable-profiler) profiler="yes"
@@ -660,6 +662,7 @@ echo " --enable-curses enable curses output" echo " --disable-curl disable curl connectivity" echo " --enable-curl enable curl connectivity" echo " --disable-bluez disable bluez stack connectivity" +echo " --enable-bluez enable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support" echo " --enable-nptl disable usermode NPTL support"
@@ -1200,10 +1203,7 @@ fi # test "$curl" ########################################## # bluez support probe -if test "$bluez" = "yes" ; then - `pkg-config bluez 2> /dev/null` || bluez="no" -fi -if test "$bluez" = "yes" ; then +if test "$bluez" != "no" ; then cat > $TMPC << EOF #include <bluetooth/bluetooth.h> int main(void) { return bt_error(0); }
@@ -1211,8 +1211,12 @@ EOF bluez_cflags=`pkg-config --cflags bluez 2> /dev/null` bluez_libs=`pkg-config --libs bluez 2> /dev/null` if compile_prog "$bluez_cflags" "$bluez_libs" ; then + bluez=yes libs_softmmu="$bluez_libs $libs_softmmu" else + if test "$bluez" = "yes" ; then + feature_not_found "bluez" + fi bluez="no" fi fi
@@ -1615,6 +1619,7 @@ fi echo "kqemu support $kqemu" echo "xen support $xen" echo "brlapi support $brlapi" +echo "bluez support $bluez" echo "Documentation $build_docs" [ ! -z "$uname_release" ] && \ echo "uname -r $uname_release"
Signature · 1 line
1.6.2.5
PATCH 14/20 Add build_docs to new feature convention
In reply to Juan Quintela--- configure | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-)
configure +13 -3
@@ -183,6 +183,7 @@ bluez="" brlapi="" curl="" curses="" +build_docs="" nptl="" pthread="" vde=""
@@ -212,7 +213,6 @@ linux_user="no" darwin_user="no" bsd_user="no" guest_base="" -build_docs="yes" uname_release="" aio="yes" io_thread="no"
@@ -549,6 +549,8 @@ for opt do ;; --disable-docs) build_docs="no" ;; + --enable-docs) build_docs="yes" + ;; *) echo "ERROR: unknown option $opt"; show_help="yes" ;; esac
@@ -1444,8 +1446,16 @@ if compile_prog "" "" ; then fi # Check if tools are available to build documentation. -if test "$build_docs" = "yes" -a \( ! -x "`which texi2html 2>/dev/null`" -o ! -x "`which pod2man 2>/dev/null`" \) ; then - build_docs="no" +if test "$build_docs" != "no" ; then + if test -x "`which texi2html 2>/dev/null`" -a \ + -x "`which pod2man 2>/dev/null`" ; then + build_docs=yes + else + if test "$build_docs" = "yes" ; then + feature_not_found "build_docs" + fi + build_docs=no + fi fi # Search for bsawp_32 function
Signature · 1 line
1.6.2.5
PATCH 15/20 Rename build_docs to docs
In reply to Juan QuintelaAll other features are named foo and enabled with --enable-foo.
--- configure | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
configure +10 -10
@@ -183,7 +183,7 @@ bluez="" brlapi="" curl="" curses="" -build_docs="" +docs="" nptl="" pthread="" vde=""
@@ -547,9 +547,9 @@ for opt do ;; --with-pkgversion=*) pkgversion=" ($optarg)" ;; - --disable-docs) build_docs="no" + --disable-docs) docs="no" ;; - --enable-docs) build_docs="yes" + --enable-docs) docs="yes" ;; *) echo "ERROR: unknown option $opt"; show_help="yes" ;;
@@ -1446,15 +1446,15 @@ if compile_prog "" "" ; then fi # Check if tools are available to build documentation. -if test "$build_docs" != "no" ; then +if test "$docs" != "no" ; then if test -x "`which texi2html 2>/dev/null`" -a \ -x "`which pod2man 2>/dev/null`" ; then - build_docs=yes + docs=yes else - if test "$build_docs" = "yes" ; then - feature_not_found "build_docs" + if test "$docs" = "yes" ; then + feature_not_found "docs" fi - build_docs=no + docs=no fi fi
@@ -1630,7 +1630,7 @@ echo "kqemu support $kqemu" echo "xen support $xen" echo "brlapi support $brlapi" echo "bluez support $bluez" -echo "Documentation $build_docs" +echo "Documentation $docs" [ ! -z "$uname_release" ] && \ echo "uname -r $uname_release" echo "NPTL support $nptl"
@@ -1760,7 +1760,7 @@ if [ "$source_path_used" = "yes" ]; then echo "VPATH=$source_path" >> $config_host_mak fi echo "TARGET_DIRS=$target_list" >> $config_host_mak -if [ "$build_docs" = "yes" ] ; then +if [ "$docs" = "yes" ] ; then echo "BUILD_DOCS=yes" >> $config_host_mak fi if test "$sdl" = "yes" ; then
Signature · 1 line
1.6.2.5
PATCH 16/20 Add sdl to new feature convention
In reply to Juan Quintela--- configure | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
configure +10 -3
@@ -186,6 +186,7 @@ curses="" docs="" nptl="" pthread="" +sdl="" vde="" vnc_tls="" vnc_sasl=""
@@ -222,7 +223,6 @@ kerneldir="" aix="no" blobs="yes" fdt="yes" -sdl="yes" xen="yes" pkgversion=""
@@ -430,6 +430,8 @@ for opt do ;; --disable-sdl) sdl="no" ;; + --enable-sdl) sdl="yes" + ;; --fmod-lib=*) fmod_lib="$optarg" ;; --fmod-inc=*) fmod_inc="$optarg"
@@ -646,6 +648,7 @@ echo " --disable-sparse disable sparse checker (default)" echo " --disable-strip disable stripping binaries" echo " --disable-werror disable compilation abort on warning" echo " --disable-sdl disable SDL" +echo " --enable-sdl enable SDL" echo " --enable-cocoa enable COCOA (Mac OS X only)" echo " --audio-drv-list=LIST set audio drivers list:" echo " Available drivers: $audio_possible_drivers"
@@ -908,8 +911,7 @@ fi sdl_too_old=no -if test "$sdl" = "yes" ; then - sdl=no +if test "$sdl" != "no" ; then cat > $TMPC << EOF #include <SDL.h> #undef main /* We don't want SDL to override our main() */
@@ -940,6 +942,11 @@ EOF sdl=no fi fi # static link + else # sdl not found + if test "$sdl" = "yes" ; then + feature_not_found "sdl" + fi + sdl=no fi # sdl compile test fi
Signature · 1 line
1.6.2.5
PATCH 17/20 Add fdt to new feature convention
In reply to Juan Quintela--- configure | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-)
configure +13 -3
@@ -184,6 +184,7 @@ brlapi="" curl="" curses="" docs="" +fdt="" nptl="" pthread="" sdl=""
@@ -222,7 +223,6 @@ kvm="no" kerneldir="" aix="no" blobs="yes" -fdt="yes" xen="yes" pkgversion=""
@@ -529,6 +529,10 @@ for opt do ;; --enable-curl) curl="yes" ;; + --disable-fdt) fdt="no" + ;; + --enable-fdt) fdt="yes" + ;; --disable-nptl) nptl="no" ;; --enable-nptl) nptl="yes"
@@ -666,6 +670,8 @@ echo " --disable-curses disable curses output" echo " --enable-curses enable curses output" echo " --disable-curl disable curl connectivity" echo " --enable-curl enable curl connectivity" +echo " --disable-fdt disable fdt device tree" +echo " --enable-fdt enable fdt device tree" echo " --disable-bluez disable bluez stack connectivity" echo " --enable-bluez enable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support"
@@ -1340,8 +1346,7 @@ fi ########################################## # fdt probe -if test "$fdt" = "yes" ; then - fdt=no +if test "$fdt" != "no" ; then fdt_libs="-lfdt" cat > $TMPC << EOF int main(void) { return 0; }
@@ -1349,6 +1354,11 @@ EOF if compile_prog "" "$fdt_libs" ; then fdt=yes libs_softmmu="$fdt_libs $libs_softmmu" + else + if test "$fdt" = "yes" ; then + feature_not_found "fdt" + fi + fdt=no fi fi
Signature · 1 line
1.6.2.5
PATCH 18/20 Add xen to new feature convention
In reply to Juan Quintela--- configure | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
configure +10 -3
@@ -191,6 +191,7 @@ sdl="" vde="" vnc_tls="" vnc_sasl="" +xen="" gprof="no" debug_tcg="no"
@@ -223,7 +224,6 @@ kvm="no" kerneldir="" aix="no" blobs="yes" -xen="yes" pkgversion="" # OS specific
@@ -476,6 +476,8 @@ for opt do ;; --disable-xen) xen="no" ;; + --enable-xen) xen="yes" + ;; --disable-brlapi) brlapi="no" ;; --enable-brlapi) brlapi="yes"
@@ -660,6 +662,7 @@ echo " --audio-card-list=LIST set list of emulated audio cards [$audio_card_l echo " Available cards: $audio_possible_cards" echo " --enable-mixemu enable mixer emulation" echo " --disable-xen disable xen backend driver support" +echo " --enable-xen enable xen backend driver support" echo " --disable-brlapi disable BrlAPI" echo " --enable-brlapi enable BrlAPI" echo " --disable-vnc-tls disable TLS encryption for VNC server"
@@ -898,7 +901,7 @@ fi ########################################## # xen probe -if test "$xen" = "yes" ; then +if test "$xen" != "no" ; then xen_libs="-lxenstore -lxenctrl -lxenguest" cat > $TMPC <<EOF #include <xenctrl.h>
@@ -906,9 +909,13 @@ if test "$xen" = "yes" ; then int main(void) { xs_daemon_open(); xc_interface_open(); return 0; } EOF if compile_prog "" "$xen_libs" ; then + xen=yes libs_softmmu="$xen_libs $libs_softmmu" else - xen="no" + if test "$xen" = "yes" ; then + feature_not_found "xen" + fi + xen=no fi fi
Signature · 1 line
1.6.2.5
PATCH 19/20 Add kvm to new feature convention
In reply to Juan QuintelaExtra error message is only given if --enable-kvm was given
--- configure | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-)
configure +18 -13
@@ -185,6 +185,7 @@ curl="" curses="" docs="" fdt="" +kvm="" nptl="" pthread="" sdl=""
@@ -220,7 +221,6 @@ uname_release="" aio="yes" io_thread="no" mixemu="no" -kvm="no" kerneldir="" aix="no" blobs="yes"
@@ -355,7 +355,6 @@ AIX) linux="yes" linux_user="yes" usb="linux" - kvm="yes" if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes" audio_possible_drivers="$audio_possible_drivers fmod"
@@ -488,6 +487,8 @@ for opt do ;; --disable-kvm) kvm="no" ;; + --enable-kvm) kvm="yes" + ;; --enable-profiler) profiler="yes" ;; --enable-cocoa)
@@ -678,6 +679,7 @@ echo " --enable-fdt enable fdt device tree" echo " --disable-bluez disable bluez stack connectivity" echo " --enable-bluez enable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support" +echo " --enable-kvm enable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support" echo " --enable-nptl disable usermode NPTL support" echo " --enable-system enable all system emulation targets"
@@ -1245,7 +1247,7 @@ fi ########################################## # kvm probe -if test "$kvm" = "yes" ; then +if test "$kvm" != "no" ; then cat > $TMPC <<EOF #include <linux/kvm.h> #if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
@@ -1276,20 +1278,23 @@ EOF kvm_cflags="" fi if compile_prog "$kvm_cflags" "" ; then - : + kvm=yes else - kvm="no"; - if [ -x "`which awk 2>/dev/null`" ] && \ - [ -x "`which grep 2>/dev/null`" ]; then - kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \ + if test "$kvm" = "yes" ; then + if [ -x "`which awk 2>/dev/null`" ] && \ + [ -x "`which grep 2>/dev/null`" ]; then + kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \ | grep "error: " \ | awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'` - if test "$kvmerr" != "" ; then - kvm="no - (${kvmerr})\n\ - NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \ -recent kvm-kmod from http://sourceforge.net/projects/kvm." + if test "$kvmerr" != "" ; then + echo -e "${kvmerr}\n\ + NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \ + recent kvm-kmod from http://sourceforge.net/projects/kvm." + fi fi + feature_not_found "kvm" fi + kvm=no fi fi
@@ -1663,7 +1668,7 @@ echo "vde support $vde" echo "AIO support $aio" echo "IO thread $io_thread" echo "Install blobs $blobs" -echo -e "KVM support $kvm" +echo "KVM support $kvm" echo "fdt support $fdt" echo "preadv support $preadv"
Signature · 1 line
1.6.2.5
PATCH 20/20 Add sparse to new feature convention
In reply to Juan QuintelaOnce there, move to a proper test to see if we are going to use it or not
--- configure | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-)
configure +14 -5
@@ -189,6 +189,7 @@ kvm="" nptl="" pthread="" sdl="" +sparse="no" vde="" vnc_tls="" vnc_sasl=""
@@ -197,7 +198,6 @@ xen="" gprof="no" debug_tcg="no" debug="no" -sparse="no" strip_opt="yes" bigendian="no" mingw32="no"
@@ -711,10 +711,6 @@ echo "NOTE: The object files are built at the place where configure is launched" exit 1 fi -if test ! -x "$(which cgcc 2>/dev/null)"; then - sparse="no" -fi - # # Solaris specific configure tool chain decisions #
@@ -922,6 +918,19 @@ EOF fi ########################################## +# Sparse probe +if test "$sparse" != "no" ; then + if test -x "$(which cgcc 2>/dev/null)"; then + sparse=yes + else + if test "$sparse" = "yes" ; then + feature_not_found "sparse" + fi + sparse=no + fi +fi + +########################################## # SDL probe sdl_too_old=no
Signature · 1 line
1.6.2.5