+ELM_WEB_DEF="#undef"
+have_elementary_web="no"
+want_elementary_web="auto"
+AC_ARG_ENABLE([web],
+ [AC_HELP_STRING([--disable-web], [disable web (WebKit) support. @<:@default=detect@:>@])],
+ [want_elementary_web=$enableval], [])
+
+if test "x$want_elementary_web" != "xno"; then
+ PKG_CHECK_MODULES([ELEMENTARY_WEB],
+ [
+ ewebkit
+ ],
+ [
+ AC_DEFINE(HAVE_ELEMENTARY_WEB, 1, [Web support for Elementary])
+ webkit_datadir=$($PKG_CONFIG ewebkit --variable=datadir)
+ AC_DEFINE_UNQUOTED(WEBKIT_DATADIR,
+ "$webkit_datadir",
+ "WebKit's data dir")
+ have_elementary_web="yes"
+ ELM_WEB_DEF="#define"
+ requirement_elm="web_client ${requirement_elm}"
+ ],
+ [have_elementary_web="no"]
+ )
+else
+ have_elementary_web="no"
+fi
+if test "x$want_elementary_web" = "xyes" -a "x$have_elementary_web" = "xno"; then
+ AC_MSG_ERROR([Web support requested, but no ewebkit found by pkg-config.])
+fi
+AC_SUBST(ELM_WEB_DEF)
+