[GTK] Add accelerated 2D canvas support using cairo-gl
[WebKit-https.git] / Source / autotools / SetupWebKitFeatures.m4
1 AH_TOP([
2 #ifndef __AUTOTOOLSCONFIG_H__
3 #define __AUTOTOOLSCONFIG_H__ 1
4 ])
5
6 # This adds the include line to the bottom of the autoconfig header.
7 AH_BOTTOM([
8 #include "WebKitFeatures.h"
9 #endif // __AUTOTOOLSCONFIG_H__
10 ])
11
12 CONFIGURABLE_FEATURE_DEFINES=
13
14 if test "$enable_spellcheck" = "yes"; then
15     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_SPELLCHECK=1"
16 else
17     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_SPELLCHECK=0"
18 fi
19
20 if test "$enable_gamepad" = "yes"; then
21     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_GAMEPAD=1"
22 else
23     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_GAMEPAD=0"
24 fi
25
26 if test "$enable_video" = "yes"; then
27     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_VIDEO=1"
28 else
29     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_VIDEO=0"
30 fi
31
32 if test "$enable_css_shaders" = "yes"; then
33     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_CSS_SHADERS=1"
34 else
35     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_CSS_SHADERS=0"
36 fi
37
38 if test "$enable_css_filters" = "yes"; then
39     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_CSS_FILTERS=1"
40 else
41     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_CSS_FILTERS=0"
42 fi
43
44 if test "$enable_geolocation" = "yes"; then
45     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_GEOLOCATION=1"
46 else
47     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_GEOLOCATION=0"
48 fi
49
50 if test "$enable_svg" = "yes"; then
51     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_SVG=1"
52 else
53     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_SVG=0"
54 fi
55
56 if test "$enable_svg_fonts" = "yes"; then
57     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_SVG_FONTS=1"
58 else
59     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_SVG_FONTS=0"
60 fi
61
62 if test "$enable_webgl" = "yes"; then
63     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_WEBGL=1"
64 else
65     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_WEBGL=0"
66 fi
67
68 if test "$enable_accelerated_compositing" = "yes"; then
69     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_3D_RENDERING=1"
70 else
71     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_3D_RENDERING=0"
72 fi
73
74 if test "$enable_accelerated_canvas" = "yes"; then
75     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_ACCELERATED_2D_CANVAS=1"
76 else
77     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_ACCELERATED_2D_CANVAS=0"
78 fi
79
80 if test "$enable_web_audio" = "yes"; then
81     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_WEB_AUDIO=1"
82 else
83     CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_WEB_AUDIO=0"
84 fi
85
86 # This list of features represents those selected for release builds.  If you are
87 # adding a new or unstable feature, you should mark it disabled here. We need to run
88 # this command now rather than use AC_CONFIG_COMMANDS because automake rules depend
89 # on the output file (WebKitFeatures.txt).
90 $srcdir/Tools/gtk/generate-feature-defines-files $CONFIGURABLE_FEATURE_DEFINES \
91     ENABLE_BATTERY_STATUS=0 \
92     ENABLE_BLOB=1 \
93     ENABLE_CANVAS_PATH=0 \
94     ENABLE_CANVAS_PROXY=0 \
95     ENABLE_CHANNEL_MESSAGING=1 \
96     ENABLE_CSP_NEXT=0 \
97     ENABLE_CSS3_TEXT=0 \
98     ENABLE_CSS_BOX_DECORATION_BREAK=1 \
99     ENABLE_CSS_COMPOSITING=0 \
100     ENABLE_CSS_DEVICE_ADAPTATION=0 \
101     ENABLE_CSS_EXCLUSIONS=1 \
102     ENABLE_CSS_IMAGE_ORIENTATION=0 \
103     ENABLE_CSS_IMAGE_RESOLUTION=0 \
104     ENABLE_CSS_IMAGE_SET=0 \
105     ENABLE_CSS_REGIONS=0 \
106     ENABLE_CSS_STICKY_POSITION=0 \
107     ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=0 \
108     ENABLE_CSS_VARIABLES=0 \
109     ENABLE_CSS3_CONDITIONAL_RULES=0 \
110     ENABLE_CUSTOM_SCHEME_HANDLER=0 \
111     ENABLE_DASHBOARD_SUPPORT=0 \
112     ENABLE_DATALIST_ELEMENT=0 \
113     ENABLE_DATA_TRANSFER_ITEMS=0 \
114     ENABLE_DETAILS_ELEMENT=1 \
115     ENABLE_DEVICE_ORIENTATION=0 \
116     ENABLE_DIALOG_ELEMENT=0 \
117     ENABLE_DIRECTORY_UPLOAD=0 \
118     ENABLE_DOM4_EVENTS_CONSTRUCTOR=0 \
119     ENABLE_DOWNLOAD_ATTRIBUTE=0 \
120     ENABLE_FILE_SYSTEM=0 \
121     ENABLE_FILTERS=1 \
122     ENABLE_FTPDIR=0 \
123     ENABLE_FONT_LOAD_EVENTS=0 \
124     ENABLE_FULLSCREEN_API=1 \
125     ENABLE_HIGH_DPI_CANVAS=0 \
126     ENABLE_ICONDATABASE=1 \
127     ENABLE_IFRAME_SEAMLESS=1 \
128     ENABLE_INDEXED_DATABASE=0 \
129     ENABLE_INPUT_SPEECH=0 \
130     ENABLE_INPUT_TYPE_COLOR=0 \
131     ENABLE_INPUT_TYPE_DATE=0 \
132     ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=0 \
133     ENABLE_INPUT_TYPE_DATETIMELOCAL=0 \
134     ENABLE_INPUT_TYPE_MONTH=0 \
135     ENABLE_INPUT_TYPE_TIME=0 \
136     ENABLE_INPUT_TYPE_WEEK=0 \
137     ENABLE_INSPECTOR=1 \
138     ENABLE_JAVASCRIPT_DEBUGGER=1 \
139     ENABLE_LEGACY_CSS_VENDOR_PREFIXES=0 \
140     ENABLE_LEGACY_NOTIFICATIONS=0 \
141     ENABLE_LEGACY_VENDOR_PREFIXES=1 \
142     ENABLE_LEGACY_WEB_AUDIO=0 \
143     ENABLE_LINK_PREFETCH=0 \
144     ENABLE_LINK_PRERENDER=0 \
145     ENABLE_MATHML=0 \
146     ENABLE_MEDIA_CAPTURE=0 \
147     ENABLE_MEDIA_SOURCE=0 \
148     ENABLE_MEDIA_STATISTICS=0 \
149     ENABLE_MEDIA_STREAM=0 \
150     ENABLE_METER_ELEMENT=1 \
151     ENABLE_MHTML=1 \
152     ENABLE_MICRODATA=0 \
153     ENABLE_MOUSE_CURSOR_SCALE=0 \
154     ENABLE_NAVIGATOR_CONTENT_UTILS=0 \
155     ENABLE_NETSCAPE_PLUGIN_API=1 \
156     ENABLE_NETWORK_INFO=0 \
157     ENABLE_NOTIFICATIONS=0 \
158     ENABLE_ORIENTATION_EVENTS=0 \
159     ENABLE_PAGE_VISIBILITY_API=1 \
160     ENABLE_PERFORMANCE_TIMELINE=0 \
161     ENABLE_PROGRESS_ELEMENT=1 \
162     ENABLE_PROXIMITY_EVENTS=0 \
163     ENABLE_QUOTA=0 \
164     ENABLE_RESOURCE_TIMING=0 \
165     ENABLE_REQUEST_ANIMATION_FRAME=1 \
166     ENABLE_SCRIPTED_SPEECH=0 \
167     ENABLE_SHADOW_DOM=1 \
168     ENABLE_SHARED_WORKERS=1 \
169     ENABLE_SMOOTH_SCROLLING=1 \
170     ENABLE_SQL_DATABASE=1 \
171     ENABLE_STYLE_SCOPED=0 \
172     ENABLE_TEMPLATE_ELEMENT=0 \
173     ENABLE_TEXT_AUTOSIZING=0 \
174     ENABLE_THREADED_HTML_PARSER=0 \
175     ENABLE_TOUCH_EVENTS=0 \
176     ENABLE_TOUCH_ICON_LOADING=0 \
177     ENABLE_USER_TIMING=0 \
178     ENABLE_VIBRATION=0 \
179     ENABLE_VIDEO_TRACK=0 \
180     ENABLE_VIEW_MODE_CSS_MEDIA=1 \
181     ENABLE_WEB_SOCKETS=1 \
182     ENABLE_WEB_TIMING=1 \
183     ENABLE_WORKERS=1 \
184     ENABLE_XHR_TIMEOUT=1
185
186 dnl AM_WEBKIT_FEATURE_CONDITIONAL
187 dnl Checks whether the given feature is enabled in the
188 dnl build that is being configured and sets up equally-named
189 dnl Automake conditional reflecting the feature status.
190 dnl
191 dnl Usage:
192 dnl AM_WEBKIT_FEATURE_CONDITIONAL([FEATURE])
193 AC_DEFUN([AM_WEBKIT_FEATURE_CONDITIONAL], [
194   AC_PROG_AWK
195
196   grep -qE "($1=1)" WebKitFeatures.txt
197   if test $? -eq 0; then
198     feature_enabled="yes";
199   else
200     feature_enabled="no";
201   fi
202
203   AM_CONDITIONAL([$1], [test "$feature_enabled" = "yes"])
204
205 ]) dnl AM_WEBKIT_FEATURE_CONDITIONAL