[Qt][Mac] Build fails after adding ICU support (r105997).
[WebKit-https.git] / Tools / qmake / mkspecs / features / features.prf
1 # -------------------------------------------------------------------
2 # This file does basic 'configure' style checks to determine the
3 # set of ENABLE_FOO defines and their values.
4 #
5 # See 'Tools/qmake/README' for an overview of the build system
6 # -------------------------------------------------------------------
7
8 # Load results of config tests (only supported in Qt 5)
9 haveQt(5): include($${ROOT_BUILD_DIR}/Tools/qmake/.qmake.cache, , true)
10
11 CONFIG(minimal) {
12     DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
13 }
14
15 CONFIG(production) {
16     DEFINES += ENABLE_XSLT=0
17     DEFINES += ENABLE_WEB_TIMING=0
18 }
19
20 meegotouch {
21     DEFINES += WTF_USE_MEEGOTOUCH=1
22 }
23
24 ## load mobilityconfig if mobility is available
25 load(mobilityconfig, true)
26
27 # Try to locate sqlite3 source
28 SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
29 isEmpty(SQLITE3SRCDIR) {
30     SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
31 }
32
33 # For Mac we do not rely on QT_CONFIG, because icu is not officially supported for all of qt.
34 haveQt(5):if(contains(QT_CONFIG,icu)|mac) {
35     DEFINES += WTF_USE_ICU_UNICODE=1
36     DEFINES -= WTF_USE_QT4_UNICODE
37 } else {
38     DEFINES += WTF_USE_QT4_UNICODE=1
39     DEFINES -= WTF_USE_ICU_UNICODE
40 }
41
42 isEmpty(HAVE_QRAWFONT) {
43     # We have to disable SVG Fonts, which rely on the fast path.
44     DEFINES -= ENABLE_SVG_FONTS=1
45     DEFINES += ENABLE_SVG_FONTS=0
46 }
47
48 # We need fontconfig to set up the test fonts for DumpRenderTree and WebKitTestRunner.
49 haveQt(5):contains(config_test_fontconfig, yes):!mac {
50     DEFINES += HAVE_FONTCONFIG=1
51 }
52 haveQt(4):unix:!mac:!embedded {
53     DEFINES += HAVE_FONTCONFIG=1
54 }
55
56
57 !contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=.): DEFINES += ENABLE_JAVASCRIPT_DEBUGGER=1
58 !contains(DEFINES, ENABLE_GAMEPAD=.): DEFINES += ENABLE_GAMEPAD=0
59 !contains(DEFINES, ENABLE_SQL_DATABASE=.): DEFINES += ENABLE_SQL_DATABASE=1
60 !contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
61 !contains(DEFINES, ENABLE_CHANNEL_MESSAGING=.): DEFINES += ENABLE_CHANNEL_MESSAGING=1
62 !contains(DEFINES, ENABLE_DIRECTORY_UPLOAD=.): DEFINES += ENABLE_DIRECTORY_UPLOAD=0
63 !contains(DEFINES, ENABLE_FILE_SYSTEM=.): DEFINES += ENABLE_FILE_SYSTEM=0
64 !contains(DEFINES, ENABLE_QUOTA=.): DEFINES += ENABLE_QUOTA=0
65 !contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=.): DEFINES += ENABLE_DASHBOARD_SUPPORT=0
66 !contains(DEFINES, ENABLE_FILTERS=.): DEFINES += ENABLE_FILTERS=1
67 !contains(DEFINES, ENABLE_CSS_FILTERS=.): DEFINES += ENABLE_CSS_FILTERS=1
68 !contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=1
69 !contains(DEFINES, ENABLE_SHADOW_DOM=.): DEFINES += ENABLE_SHADOW_DOM=0
70 !contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
71 !contains(DEFINES, ENABLE_DETAILS=.): DEFINES += ENABLE_DETAILS=1
72 !contains(DEFINES, ENABLE_METER_TAG=.): DEFINES += ENABLE_METER_TAG=1
73 !contains(DEFINES, ENABLE_MHTML=.): DEFINES += ENABLE_MHTML=0
74 !contains(DEFINES, ENABLE_MICRODATA=.): DEFINES += ENABLE_MICRODATA=0
75 !contains(DEFINES, ENABLE_PROGRESS_TAG=.): DEFINES += ENABLE_PROGRESS_TAG=1
76 !contains(DEFINES, ENABLE_BLOB=.): DEFINES += ENABLE_BLOB=1
77 !contains(DEFINES, ENABLE_NOTIFICATIONS=.): DEFINES += ENABLE_NOTIFICATIONS=1
78 !contains(DEFINES, ENABLE_INPUT_COLOR=.): DEFINES += ENABLE_INPUT_COLOR=0
79 !contains(DEFINES, ENABLE_INPUT_SPEECH=.): DEFINES += ENABLE_INPUT_SPEECH=0
80 !contains(DEFINES, ENABLE_INSPECTOR=.): DEFINES += ENABLE_INSPECTOR=1
81 !contains(DEFINES, ENABLE_3D_RENDERING=.): DEFINES += ENABLE_3D_RENDERING=1
82 !contains(DEFINES, ENABLE_WEB_AUDIO=.): DEFINES += ENABLE_WEB_AUDIO=0
83 !contains(DEFINES, ENABLE_MEDIA_SOURCE=.): DEFINES += ENABLE_MEDIA_SOURCE=0
84 !contains(DEFINES, ENABLE_MEDIA_STATISTICS=.): DEFINES += ENABLE_MEDIA_STATISTICS=0
85 !contains(DEFINES, ENABLE_MEDIA_STREAM=.): DEFINES += ENABLE_MEDIA_STREAM=0
86 !contains(DEFINES, ENABLE_VIDEO_TRACK=.): DEFINES += ENABLE_VIDEO_TRACK=0
87 !contains(DEFINES, ENABLE_TOUCH_ICON_LOADING=.): DEFINES += ENABLE_TOUCH_ICON_LOADING=0
88 !contains(DEFINES, ENABLE_ANIMATION_API=.): DEFINES += ENABLE_ANIMATION_API=0
89
90 # SVG support
91 !contains(DEFINES, ENABLE_SVG=0) {
92     !contains(DEFINES, ENABLE_SVG=.): DEFINES += ENABLE_SVG=1
93     !contains(DEFINES, ENABLE_SVG_FONTS=.): DEFINES += ENABLE_SVG_FONTS=1
94 } else {
95     DEFINES += ENABLE_SVG_FONTS=0
96 }
97
98 # HTML5 datalist support
99 !contains(DEFINES, ENABLE_DATALIST=.): DEFINES += ENABLE_DATALIST=1
100
101 # Tiled Backing Store support
102 !contains(DEFINES, WTF_USE_TILED_BACKING_STORE=.): DEFINES += WTF_USE_TILED_BACKING_STORE=1
103
104 # Nescape plugins support (NPAPI)
105 !contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
106     unix:haveQt(4)|win32-*:!embedded:!wince*: {
107         DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
108     } else {
109         DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
110     }
111 }
112
113 # Netscape plugins support for WebKit2
114 !no_webkit2:!contains(DEFINES, PLUGIN_ARCHITECTURE_UNSUPPORTED): {
115     # Disable xlib plugins while they're in-process, because they crash
116     # as soon as an installed npapi plugin uses Qt 4.
117     false:contains(QT_CONFIG, xcb-xlib) {
118         CONFIG += plugin_backend_xlib
119         DEFINES += PLUGIN_ARCHITECTURE_X11=1 \
120                    PLUGIN_ARCHITECTURE_UNSUPPORTED=0
121     } else {
122         DEFINES += PLUGIN_ARCHITECTURE_UNSUPPORTED=1
123     }
124 }
125
126 # QStyle detection
127 haveQt(4)|!isEmpty(QT.widgets.name): DEFINES += HAVE_QSTYLE=1
128
129 # WebGL support
130 contains(QT_CONFIG, opengl):!win32-* {
131     !contains(DEFINES, ENABLE_WEBGL=.): DEFINES += ENABLE_WEBGL=1
132 } else {
133     DEFINES += ENABLE_WEBGL=0
134 }
135
136 # Web Socket support.
137 !contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
138
139 # Web Timing support.
140 !contains(DEFINES, ENABLE_WEB_TIMING=.): DEFINES += ENABLE_WEB_TIMING=1
141
142 !contains(DEFINES, ENABLE_REQUEST_ANIMATION_FRAME=.): DEFINES += ENABLE_REQUEST_ANIMATION_FRAME=1
143
144 # XSLT support with QtXmlPatterns
145 !contains(DEFINES, ENABLE_XSLT=.) {
146     contains(QT_CONFIG, xmlpatterns):DEFINES += ENABLE_XSLT=1
147     else:DEFINES += ENABLE_XSLT=0
148 }
149
150 # This is experimental and only works on Linux so far.
151 contains(DEFINES, WTF_USE_LIBXML2=1) {
152     DEFINES += ENABLE_XSLT=1
153 }
154
155 # geolocation support if QtMobility exists
156 !contains(DEFINES, ENABLE_GEOLOCATION=.) {
157     contains(MOBILITY_CONFIG, location)|contains(QT_CONFIG, location) {
158        DEFINES += ENABLE_GEOLOCATION=1
159        DEFINES += ENABLE_CLIENT_BASED_GEOLOCATION=1
160     }
161 }
162
163 # orientation support if QtMobility exists
164 contains(MOBILITY_CONFIG, sensors) {
165    !contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=1
166    !contains(DEFINES, ENABLE_DEVICE_ORIENTATION=.): DEFINES += ENABLE_DEVICE_ORIENTATION=1
167    CONFIG *= mobility
168    MOBILITY *= sensors
169 }
170
171 !contains(DEFINES, ENABLE_TOUCH_EVENTS=.): DEFINES += ENABLE_TOUCH_EVENTS=1
172 !contains(DEFINES, ENABLE_GESTURE_EVENTS=.): DEFINES += ENABLE_GESTURE_EVENTS=1
173
174 # HTML5 Media Support
175 # We require QtMultimedia
176 !contains(DEFINES, ENABLE_VIDEO=.) {
177     DEFINES -= ENABLE_VIDEO=1
178     DEFINES += ENABLE_VIDEO=0
179
180     mac:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
181         DEFINES -= ENABLE_VIDEO=0
182         DEFINES += ENABLE_VIDEO=1
183         DEFINES += WTF_USE_QTKIT=1
184         DEFINES -= WTF_USE_QTKIT=0
185     } else: linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
186         !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10): {
187             DEFINES -= ENABLE_VIDEO=0
188             DEFINES += ENABLE_VIDEO=1
189             DEFINES += WTF_USE_GSTREAMER=1
190             DEFINES -= WTF_USE_GSTREAMER=0
191         } else {
192             message("Disabling video due the lack of GLib/Gio/GStreamer.")
193             DEFINES -= ENABLE_VIDEO=1
194             DEFINES += ENABLE_VIDEO=0
195         }
196     } else: contains(MOBILITY_CONFIG, multimedia) {
197         DEFINES -= ENABLE_VIDEO=0
198         DEFINES += ENABLE_VIDEO=1
199         DEFINES -= WTF_USE_QT_MULTIMEDIA=0
200         DEFINES += WTF_USE_QT_MULTIMEDIA=1
201     }
202 }
203
204 !contains(DEFINES, ENABLE_FULLSCREEN_API=.): DEFINES += ENABLE_FULLSCREEN_API=0
205
206 ## Forward enabled feature macros to JavaScript enabled features macros
207 FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1
208 v8: FEATURE_DEFINES_JAVASCRIPT += V8_BINDING=1
209 contains(DEFINES, ENABLE_CHANNEL_MESSAGING=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
210 contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_ORIENTATION_EVENTS=1
211 contains(DEFINES, ENABLE_SQL_DATABASE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SQL_DATABASE=1
212 contains(DEFINES, ENABLE_DATALIST=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATALIST=1
213 contains(DEFINES, ENABLE_SHARED_SCRIPT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_SCRIPT=1
214 contains(DEFINES, ENABLE_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WORKERS=1
215 contains(DEFINES, ENABLE_SHARED_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1
216 contains(DEFINES, ENABLE_SHADOW_DOM=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHADOW_DOM=1
217 contains(DEFINES, ENABLE_VIDEO=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
218 contains(DEFINES, ENABLE_XSLT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
219 contains(DEFINES, ENABLE_FILTERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
220 contains(DEFINES, ENABLE_CSS_FILTERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_CSS_FILTERS=1
221 contains(DEFINES, ENABLE_SVG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
222 contains(DEFINES, ENABLE_SVG_FONTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_FONTS=1
223 contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
224 contains(DEFINES, ENABLE_GAMEPAD=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_GAMEPAD=1
225 contains(DEFINES, ENABLE_WEB_SOCKETS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_SOCKETS=1
226 contains(DEFINES, ENABLE_WEB_TIMING=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_TIMING=1
227 contains(DEFINES, ENABLE_TOUCH_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_TOUCH_EVENTS=1
228 contains(DEFINES, ENABLE_GESTURE_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_GESTURE_EVENTS=1
229 contains(DEFINES, WTF_USE_TILED_BACKING_STORE=1): FEATURE_DEFINES_JAVASCRIPT += WTF_USE_TILED_BACKING_STORE=1
230 contains(DEFINES, ENABLE_NOTIFICATIONS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_NOTIFICATIONS=1
231 contains(DEFINES, ENABLE_DETAILS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DETAILS=1
232 contains(DEFINES, ENABLE_METER_TAG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_METER_TAG=1
233 contains(DEFINES, ENABLE_PROGRESS_TAG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_PROGRESS_TAG=1
234 contains(DEFINES, ENABLE_GEOLOCATION=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_GEOLOCATION=1
235 contains(DEFINES, ENABLE_BLOB=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_BLOB=1
236 contains(DEFINES, ENABLE_MEDIA_SOURCE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_MEDIA_SOURCE=1
237 contains(DEFINES, ENABLE_MEDIA_STATISTICS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_MEDIA_STATISTICS=1
238 contains(DEFINES, ENABLE_MEDIA_STREAM=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_MEDIA_STREAM=1
239 contains(DEFINES, ENABLE_VIDEO_TRACK=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO_TRACK=1
240 contains(DEFINES, ENABLE_DATA_TRANSFER_ITEMS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATA_TRANSFER_ITEMS=1
241 contains(DEFINES, ENABLE_FULLSCREEN_API=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_FULLSCREEN_API=1
242 contains(DEFINES, ENABLE_REQUEST_ANIMATION_FRAME=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_REQUEST_ANIMATION_FRAME=1
243
244 # Used to compute defaults for the build-webkit script
245 # Don't place anything after this!
246 CONFIG(compute_defaults) {
247     message($$DEFINES)
248     error("Done computing defaults")
249 }