Unreviewed. Rolling out an unindented change from r143580.
[WebKit-https.git] / Source / autotools / webkitfeature.m4
1 dnl AM_WEBKIT_FEATURE_CONDITIONAL
2 dnl Checks whether the given feature is enabled in the
3 dnl build that is being configured and sets up equally-named
4 dnl Automake conditional reflecting the feature status.
5 dnl
6 dnl Usage:
7 dnl AM_WEBKIT_FEATURE_CONDITIONAL([FEATURE])
8
9 AC_DEFUN([AM_WEBKIT_FEATURE_CONDITIONAL], [
10   AC_PROG_AWK
11
12   dnl Grep the generated GNUmakefile.features.am
13   dnl to determine if the specified feature is enabled.
14   grep -qE "($1=1)" $srcdir/Source/WebCore/GNUmakefile.features.am
15   if test $? -eq 0; then
16     feature_enabled="yes";
17   else
18     feature_enabled="no";
19   fi
20
21   AM_CONDITIONAL([$1],[test "$feature_enabled" = "yes"])
22
23 ]) dnl AM_WEBKIT_FEATURE_CONDITIONAL