Title: [139327] trunk
Revision
139327
Author
zandober...@gmail.com
Date
2013-01-10 09:51:57 -0800 (Thu, 10 Jan 2013)

Log Message

[Autotools] Add the AM_WEBKIT_FEATURE_CONDITIONAL macro
https://bugs.webkit.org/show_bug.cgi?id=106576

Reviewed by Martin Robinson.

Replace the AC_CHECK_WEBKIT_FEATURE_ENABLED with the new macro.
The former was executing actions based on the passed-in feature being
enabled in the (possibly overridden) GNUmakefile.features.am, the actions
usually affecting the Automake conditional value that was set up afterwards.
The new macro does this directly, setting up an Automake conditional of the
same name as the feature that was checked.

* Source/autotools/webkitfeature.m4:

Modified Paths

Diff

Modified: trunk/ChangeLog (139326 => 139327)


--- trunk/ChangeLog	2013-01-10 17:45:41 UTC (rev 139326)
+++ trunk/ChangeLog	2013-01-10 17:51:57 UTC (rev 139327)
@@ -1,5 +1,21 @@
 2013-01-10  Zan Dobersek  <zandober...@gmail.com>
 
+        [Autotools] Add the AM_WEBKIT_FEATURE_CONDITIONAL macro
+        https://bugs.webkit.org/show_bug.cgi?id=106576
+
+        Reviewed by Martin Robinson.
+
+        Replace the AC_CHECK_WEBKIT_FEATURE_ENABLED with the new macro.
+        The former was executing actions based on the passed-in feature being
+        enabled in the (possibly overridden) GNUmakefile.features.am, the actions
+        usually affecting the Automake conditional value that was set up afterwards.
+        The new macro does this directly, setting up an Automake conditional of the
+        same name as the feature that was checked.
+
+        * Source/autotools/webkitfeature.m4:
+
+2013-01-10  Zan Dobersek  <zandober...@gmail.com>
+
         Remove the ENABLE_ANIMATION_API feature define occurences
         https://bugs.webkit.org/show_bug.cgi?id=106544
 

Modified: trunk/Source/autotools/webkitfeature.m4 (139326 => 139327)


--- trunk/Source/autotools/webkitfeature.m4	2013-01-10 17:45:41 UTC (rev 139326)
+++ trunk/Source/autotools/webkitfeature.m4	2013-01-10 17:51:57 UTC (rev 139327)
@@ -1,25 +1,23 @@
-dnl AC_CHECK_WEBKIT_FEATURE_ENABLED
+dnl AM_WEBKIT_FEATURE_CONDITIONAL
 dnl Checks whether the given feature is enabled in the
-dnl build that is being configured.
+dnl build that is being configured and sets up equally-named
+dnl Automake conditional reflecting the feature status.
 dnl
 dnl Usage:
-dnl AC_CHECK_WEBKIT_FEATURE_ENABLED([FEATURE], [ACTION_IF_ENABLED], [ACTION_IF_DISABLED])
+dnl AM_WEBKIT_FEATURE_CONDITIONAL([FEATURE])
 
-AC_DEFUN([AC_CHECK_WEBKIT_FEATURE_ENABLED], [
+AC_DEFUN([AM_WEBKIT_FEATURE_CONDITIONAL], [
   AC_PROG_AWK
 
   dnl Grep the generated GNUmakefile.features.am
   dnl to determine if the specified feature is enabled.
-  grep -qE "($1=1)" Source/WebCore/GNUmakefile.features.am
+  grep -qE "($1=1)" $srcdir/Source/WebCore/GNUmakefile.features.am
   if test $? -eq 0; then
-    feature_enabled="true";
+    feature_enabled="yes";
   else
-    feature_enabled="false";
+    feature_enabled="no";
   fi
 
-  dnl Execute ACTION_IF_ENABLED / ACTION_IF_DISABLED.
-  if test "$feature_enabled" = "true" ; then
-    m4_ifvaln([$2],[$2],[:])
-    m4_ifvaln([$3],[else $3])
-  fi
-]) dnl AC_CHECK_WEBKIT_FEATURE_ENABLED
+  AM_CONDITIONAL([$1],[test "$feature_enabled" = "yes"])
+
+]) dnl AM_WEBKIT_FEATURE_CONDITIONAL
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to