From bbeb295782f9a86febcf0619b25937d0d396d35b Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 5 Sep 2011 12:47:17 +0200 Subject: configure should detect whether v8 can be built First of all, the -v8 option was missing from the set of "Qt style yes options", so it wasn't even recognized. Second, when the value is "auto" (the default), v8 should only be enabled if we are building for a supported architecture. Currently that's i386, x86_64, and arm. (When cross-compiling, CFG_ARCH will contain the target architecture, which is what we want to check.) Third, if -v8 is passed but the architecture isn't supported, configure should issue an error. Change-Id: I579597bc0d81c3097ee96a29493f5f8112be7edd Reviewed-on: http://codereview.qt.nokia.com/4193 Reviewed-by: Qt Sanity Bot Reviewed-by: Oswald Buddenhagen --- configure | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 0344057730..c47e03be87 100755 --- a/configure +++ b/configure @@ -1042,7 +1042,7 @@ while [ "$#" -gt 0 ]; do VAL=no ;; #Qt style yes options - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu) + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -7400,6 +7400,7 @@ fi canBuildQtXmlPatterns="yes" canBuildWebKit="$HAVE_STL" canBuildQtConcurrent="yes" +canBuildV8="yes" # WebKit requires stdint.h "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS @@ -7623,8 +7624,18 @@ fi #fi +case "$CFG_ARCH" in +i386|x86_64|arm) ;; +*) canBuildV8="no";; +esac + +if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then + echo "Error: V8 was requested, but is not supported on this platform." + exit 1 +fi + if [ "$CFG_V8" = "auto" ]; then - CFG_V8=yes + CFG_V8="$canBuildV8" fi if [ "$CFG_V8" = "no" ]; then -- cgit v1.2.3