Always enable ENABLE(XPATH)
[WebKit-https.git] / Source / WebCore / features.pri
1 # Setting up features (enabled/disabled)
2
3 CONFIG(minimal) {
4     DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
5 }
6
7 CONFIG(production) {
8     DEFINES += ENABLE_XSLT=0
9     DEFINES += ENABLE_WEB_TIMING=0
10 }
11
12 meegotouch {
13     DEFINES += WTF_USE_MEEGOTOUCH=1
14 }
15
16 # SQLite is required to build WebKit
17 DEFINES += ENABLE_SQLITE=1
18
19 ## load mobilityconfig if mobility is available
20 load(mobilityconfig, true)
21
22 # Try to locate sqlite3 source
23 SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
24 isEmpty(SQLITE3SRCDIR) {
25     SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
26 }
27
28 contains(CONFIG, use_system_icu) {
29     DEFINES += WTF_USE_ICU_UNICODE=1
30     DEFINES -= WTF_USE_QT4_UNICODE
31     LIBS += -licuuc -licui18n
32 } else {
33     DEFINES += WTF_USE_QT4_UNICODE=1
34     DEFINES -= WTF_USE_ICU_UNICODE
35 }
36
37 isEmpty(HAVE_QRAWFONT) {
38     # We have to disable SVG Fonts, which rely on the fast path.
39     DEFINES -= ENABLE_SVG_FONTS=1
40     DEFINES += ENABLE_SVG_FONTS=0
41 }
42
43 !contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=.): DEFINES += ENABLE_JAVASCRIPT_DEBUGGER=1
44 !contains(DEFINES, ENABLE_GAMEPAD=.): DEFINES += ENABLE_GAMEPAD=0
45 !contains(DEFINES, ENABLE_SQL_DATABASE=.): DEFINES += ENABLE_SQL_DATABASE=1
46 !contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
47 !contains(DEFINES, ENABLE_CHANNEL_MESSAGING=.): DEFINES += ENABLE_CHANNEL_MESSAGING=1
48 !contains(DEFINES, ENABLE_DIRECTORY_UPLOAD=.): DEFINES += ENABLE_DIRECTORY_UPLOAD=0
49 !contains(DEFINES, ENABLE_FILE_SYSTEM=.): DEFINES += ENABLE_FILE_SYSTEM=0
50 !contains(DEFINES, ENABLE_QUOTA=.): DEFINES += ENABLE_QUOTA=0 
51 !contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=.): DEFINES += ENABLE_DASHBOARD_SUPPORT=0
52 !contains(DEFINES, ENABLE_FILTERS=.): DEFINES += ENABLE_FILTERS=1
53 !contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=1
54 !contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
55 !contains(DEFINES, ENABLE_DETAILS=.): DEFINES += ENABLE_DETAILS=1
56 !contains(DEFINES, ENABLE_METER_TAG=.): DEFINES += ENABLE_METER_TAG=1
57 !contains(DEFINES, ENABLE_MHTML=.): DEFINES += ENABLE_MHTML=0
58 !contains(DEFINES, ENABLE_MICRODATA=.): DEFINES += ENABLE_MICRODATA=0
59 !contains(DEFINES, ENABLE_PROGRESS_TAG=.): DEFINES += ENABLE_PROGRESS_TAG=1
60 !contains(DEFINES, ENABLE_BLOB=.): DEFINES += ENABLE_BLOB=1
61 !contains(DEFINES, ENABLE_NOTIFICATIONS=.): DEFINES += ENABLE_NOTIFICATIONS=1
62 !contains(DEFINES, ENABLE_INPUT_COLOR=.): DEFINES += ENABLE_INPUT_COLOR=0
63 !contains(DEFINES, ENABLE_INPUT_SPEECH=.): DEFINES += ENABLE_INPUT_SPEECH=0
64 !contains(DEFINES, ENABLE_INSPECTOR=.): DEFINES += ENABLE_INSPECTOR=1
65 !contains(DEFINES, ENABLE_3D_RENDERING=.): DEFINES += ENABLE_3D_RENDERING=1
66 !contains(DEFINES, ENABLE_WEB_AUDIO=.): DEFINES += ENABLE_WEB_AUDIO=0
67 !contains(DEFINES, ENABLE_MEDIA_SOURCE=.): DEFINES += ENABLE_MEDIA_SOURCE=0
68 !contains(DEFINES, ENABLE_MEDIA_STATISTICS=.): DEFINES += ENABLE_MEDIA_STATISTICS=0
69 !contains(DEFINES, ENABLE_MEDIA_STREAM=.): DEFINES += ENABLE_MEDIA_STREAM=0
70 !contains(DEFINES, ENABLE_VIDEO_TRACK=.): DEFINES += ENABLE_VIDEO_TRACK=0
71 !contains(DEFINES, ENABLE_TOUCH_ICON_LOADING=.): DEFINES += ENABLE_TOUCH_ICON_LOADING=0
72 !contains(DEFINES, ENABLE_ANIMATION_API=.): DEFINES += ENABLE_ANIMATION_API=0
73
74 # SVG support
75 !contains(DEFINES, ENABLE_SVG=0) {
76     !contains(DEFINES, ENABLE_SVG=.): DEFINES += ENABLE_SVG=1
77     !contains(DEFINES, ENABLE_SVG_FONTS=.): DEFINES += ENABLE_SVG_FONTS=1
78 } else {
79     DEFINES += ENABLE_SVG_FONTS=0
80 }
81
82 # HTML5 datalist support
83 !contains(DEFINES, ENABLE_DATALIST=.): DEFINES += ENABLE_DATALIST=1
84
85 # Tiled Backing Store support
86 !contains(DEFINES, WTF_USE_TILED_BACKING_STORE=.): DEFINES += WTF_USE_TILED_BACKING_STORE=1
87
88 # Nescape plugins support (NPAPI)
89 !contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
90     unix|win32-*:!embedded:!wince*: {
91         DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
92     } else {
93         DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
94     }
95 }
96
97 # WebGL support
98 contains(QT_CONFIG, opengl):!win32-* {
99     !contains(DEFINES, ENABLE_WEBGL=.): DEFINES += ENABLE_WEBGL=1
100 } else {
101     DEFINES += ENABLE_WEBGL=0
102 }
103
104 # Web Socket support.
105 !contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
106
107 # Web Timing support.
108 !contains(DEFINES, ENABLE_WEB_TIMING=.): DEFINES += ENABLE_WEB_TIMING=1
109
110 # XSLT support with QtXmlPatterns
111 !contains(DEFINES, ENABLE_XSLT=.) {
112     contains(QT_CONFIG, xmlpatterns):DEFINES += ENABLE_XSLT=1
113     else:DEFINES += ENABLE_XSLT=0
114 }
115
116 # This is experimental and only works on Linux so far.
117 contains(DEFINES, WTF_USE_LIBXML2=1) {
118     DEFINES += ENABLE_XSLT=1
119 }
120
121 # geolocation support if QtMobility exists
122 !contains(DEFINES, ENABLE_GEOLOCATION=.) {
123     contains(MOBILITY_CONFIG, location) {
124        DEFINES += ENABLE_GEOLOCATION=1
125        DEFINES += ENABLE_CLIENT_BASED_GEOLOCATION=1
126     }
127 }
128
129 # orientation support if QtMobility exists
130 contains(MOBILITY_CONFIG, sensors) {
131    !contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=1
132    !contains(DEFINES, ENABLE_DEVICE_ORIENTATION=.): DEFINES += ENABLE_DEVICE_ORIENTATION=1
133    CONFIG *= mobility
134    MOBILITY *= sensors
135 }
136
137 # systeminfo support if QtMobility systeminfo module exists, but only for maemo and meego
138 maemo5|maemo6 {
139     !contains(DEFINES, WTF_USE_QT_MOBILITY_SYSTEMINFO=.) {
140         contains(MOBILITY_CONFIG, systeminfo) {
141             DEFINES += WTF_USE_QT_MOBILITY_SYSTEMINFO=1
142         }
143     }
144 }
145
146 !contains(DEFINES, ENABLE_TOUCH_EVENTS=.): DEFINES += ENABLE_TOUCH_EVENTS=1
147
148 # HTML5 Media Support
149 # We require QtMultimedia
150 !contains(DEFINES, ENABLE_VIDEO=.) {
151     DEFINES -= ENABLE_VIDEO=1
152     DEFINES += ENABLE_VIDEO=0
153
154     mac:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
155         DEFINES -= ENABLE_VIDEO=0
156         DEFINES += ENABLE_VIDEO=1
157         DEFINES += WTF_USE_QTKIT=1
158         DEFINES -= WTF_USE_QTKIT=0
159     } else: linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
160         !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10): {
161             DEFINES -= ENABLE_VIDEO=0
162             DEFINES += ENABLE_VIDEO=1
163             DEFINES += WTF_USE_GSTREAMER=1
164             DEFINES -= WTF_USE_GSTREAMER=0
165         } else {
166             message("Disabling video due the lack of GLib/Gio/GStreamer.")
167             DEFINES -= ENABLE_VIDEO=1
168             DEFINES += ENABLE_VIDEO=0
169         }
170     } else: contains(MOBILITY_CONFIG, multimedia) {
171         DEFINES -= ENABLE_VIDEO=0
172         DEFINES += ENABLE_VIDEO=1
173         DEFINES -= WTF_USE_QT_MULTIMEDIA=0
174         DEFINES += WTF_USE_QT_MULTIMEDIA=1
175     }
176 }
177
178 !contains(DEFINES, ENABLE_FULLSCREEN_API=.): DEFINES += ENABLE_FULLSCREEN_API=1
179
180 ## Forward enabled feature macros to JavaScript enabled features macros
181 FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1
182 v8: FEATURE_DEFINES_JAVASCRIPT += V8_BINDING=1
183 contains(DEFINES, ENABLE_CHANNEL_MESSAGING=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
184 contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_ORIENTATION_EVENTS=1
185 contains(DEFINES, ENABLE_SQL_DATABASE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SQL_DATABASE=1
186 contains(DEFINES, ENABLE_DATALIST=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATALIST=1
187 contains(DEFINES, ENABLE_SHARED_SCRIPT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_SCRIPT=1
188 contains(DEFINES, ENABLE_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WORKERS=1
189 contains(DEFINES, ENABLE_SHARED_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1
190 contains(DEFINES, ENABLE_VIDEO=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
191 contains(DEFINES, ENABLE_XSLT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
192 contains(DEFINES, ENABLE_FILTERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
193 contains(DEFINES, ENABLE_SVG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
194 contains(DEFINES, ENABLE_SVG_FONTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_FONTS=1
195 contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
196 contains(DEFINES, ENABLE_GAMEPAD=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_GAMEPAD=1
197 contains(DEFINES, ENABLE_WEB_SOCKETS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_SOCKETS=1
198 contains(DEFINES, ENABLE_WEB_TIMING=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_TIMING=1
199 contains(DEFINES, ENABLE_TOUCH_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_TOUCH_EVENTS=1
200 contains(DEFINES, WTF_USE_TILED_BACKING_STORE=1): FEATURE_DEFINES_JAVASCRIPT += WTF_USE_TILED_BACKING_STORE=1
201 contains(DEFINES, ENABLE_NOTIFICATIONS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_NOTIFICATIONS=1
202 contains(DEFINES, ENABLE_DETAILS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DETAILS=1
203 contains(DEFINES, ENABLE_METER_TAG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_METER_TAG=1
204 contains(DEFINES, ENABLE_PROGRESS_TAG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_PROGRESS_TAG=1
205 contains(DEFINES, ENABLE_GEOLOCATION=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_GEOLOCATION=1
206 contains(DEFINES, ENABLE_BLOB=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_BLOB=1
207 contains(DEFINES, ENABLE_MEDIA_SOURCE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_MEDIA_SOURCE=1
208 contains(DEFINES, ENABLE_MEDIA_STATISTICS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_MEDIA_STATISTICS=1
209 contains(DEFINES, ENABLE_MEDIA_STREAM=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_MEDIA_STREAM=1
210 contains(DEFINES, ENABLE_VIDEO_TRACK=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO_TRACK=1
211 contains(DEFINES, ENABLE_DATA_TRANSFER_ITEMS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATA_TRANSFER_ITEMS=1
212 contains(DEFINES, ENABLE_FULLSCREEN_API=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_FULLSCREEN_API=1
213
214 # Used to compute defaults for the build-webkit script
215 # Don't place anything after this!
216 CONFIG(compute_defaults) {
217     message($$DEFINES)
218     error("Done computing defaults")
219 }