[Qt] Add a configure step to the Qt build system

This allows building the Qt port using just 'qmake WebKit.pro'. Using
the build-webkit script is still supported, and will add slightly more
logic to the build, such as detecting the need for clean or incremental
builds.

Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
all things related to configuring the build, such as use/have/enable flags,
and these are translated to defines in default_post. Project files should
no longer check contains(DEFINES,...) to detect features, but use the new
enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
options have been translated into WEBKIT_CONFIG options as well, and can
be checked using build?().

Reviewed by Simon Hausmann.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit.pro b/WebKit.pro
index a0a1e5f..0816e3c 100644
--- a/WebKit.pro
+++ b/WebKit.pro
@@ -5,39 +5,6 @@
 # See 'Tools/qmake/README' for an overview of the build system
 # -------------------------------------------------------------------
 
-!webkit_configured {
-    CONFIG += production_build
-    include(Tools/qmake/configure.pri)
-    the_config = $$CONFIG
-    the_config -= $$BASE_CONFIG $$find(CONFIG, "^(done_)?config_")
-    cache(CONFIG, add, the_config)
-    the_defines = $$DEFINES
-    the_defines -= $$BASE_DEFINES
-    cache(DEFINES, add, the_defines)
-
-    # We inherit the build type from Qt, unless it was specified on the qmake command
-    # line. Note that the perl build script defaults to forcing a release build.
-    contains(the_config, debug|release) {
-        contains(the_config, debug) {
-            contains(the_config, release) {
-                !debug_and_release:cache(CONFIG, add, $$list(debug_and_release))
-            } else {
-                release:cache(CONFIG, del, $$list(release))
-                debug_and_release:cache(CONFIG, del, $$list(debug_and_release))
-            }
-        } else { # release
-            debug:cache(CONFIG, del, $$list(debug))
-            debug_and_release:cache(CONFIG, del, $$list(debug_and_release))
-        }
-    } else {
-        contains(QT_CONFIG, release, debug|release): \
-            cache(CONFIG, add, $$list(release))
-        else: \
-            cache(CONFIG, add, $$list(debug))
-        macx:!debug_and_release:cache(CONFIG, add, $$list(debug_and_release))
-    }
-}
-
 TEMPLATE = subdirs
 CONFIG += ordered
 
@@ -49,7 +16,7 @@
 JavaScriptCore.makefile = Makefile.JavaScriptCore
 SUBDIRS += JavaScriptCore
 
-contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
+use?(3D_GRAPHICS) {
     ANGLE.file = Source/ThirdParty/ANGLE/ANGLE.pro
     ANGLE.makefile = Makefile.ANGLE
     SUBDIRS += ANGLE
@@ -59,13 +26,13 @@
 WebCore.makefile = Makefile.WebCore
 SUBDIRS += WebCore
 
-!no_webkit1 {
+build?(webkit1) {
     webkit1.file = Source/WebKit/WebKit1.pro
     webkit1.makefile = Makefile.WebKit1
     SUBDIRS += webkit1
 }
 
-!no_webkit2 {
+build?(webkit2) {
     webkit2.file = Source/WebKit2/WebKit2.pro
     webkit2.makefile = Makefile.WebKit2
     SUBDIRS += webkit2