Changeset 139327 in webkit
- Timestamp:
- Jan 10, 2013, 9:51:57 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r139324 r139327 1 2013-01-10 Zan Dobersek <zandobersek@gmail.com> 2 3 [Autotools] Add the AM_WEBKIT_FEATURE_CONDITIONAL macro 4 https://bugs.webkit.org/show_bug.cgi?id=106576 5 6 Reviewed by Martin Robinson. 7 8 Replace the AC_CHECK_WEBKIT_FEATURE_ENABLED with the new macro. 9 The former was executing actions based on the passed-in feature being 10 enabled in the (possibly overridden) GNUmakefile.features.am, the actions 11 usually affecting the Automake conditional value that was set up afterwards. 12 The new macro does this directly, setting up an Automake conditional of the 13 same name as the feature that was checked. 14 15 * Source/autotools/webkitfeature.m4: 16 1 17 2013-01-10 Zan Dobersek <zandobersek@gmail.com> 2 18 -
trunk/Source/autotools/webkitfeature.m4
r139130 r139327 1 dnl A C_CHECK_WEBKIT_FEATURE_ENABLED1 dnl AM_WEBKIT_FEATURE_CONDITIONAL 2 2 dnl Checks whether the given feature is enabled in the 3 dnl build that is being configured. 3 dnl build that is being configured and sets up equally-named 4 dnl Automake conditional reflecting the feature status. 4 5 dnl 5 6 dnl Usage: 6 dnl A C_CHECK_WEBKIT_FEATURE_ENABLED([FEATURE], [ACTION_IF_ENABLED], [ACTION_IF_DISABLED])7 dnl AM_WEBKIT_FEATURE_CONDITIONAL([FEATURE]) 7 8 8 AC_DEFUN([A C_CHECK_WEBKIT_FEATURE_ENABLED], [9 AC_DEFUN([AM_WEBKIT_FEATURE_CONDITIONAL], [ 9 10 AC_PROG_AWK 10 11 11 12 dnl Grep the generated GNUmakefile.features.am 12 13 dnl to determine if the specified feature is enabled. 13 grep -qE "($1=1)" Source/WebCore/GNUmakefile.features.am14 grep -qE "($1=1)" $srcdir/Source/WebCore/GNUmakefile.features.am 14 15 if test $? -eq 0; then 15 feature_enabled=" true";16 feature_enabled="yes"; 16 17 else 17 feature_enabled=" false";18 feature_enabled="no"; 18 19 fi 19 20 20 dnl Execute ACTION_IF_ENABLED / ACTION_IF_DISABLED. 21 if test "$feature_enabled" = "true" ; then 22 m4_ifvaln([$2],[$2],[:]) 23 m4_ifvaln([$3],[else $3]) 24 fi 25 ]) dnl AC_CHECK_WEBKIT_FEATURE_ENABLED 21 AM_CONDITIONAL([$1],[test "$feature_enabled" = "yes"]) 22 23 ]) dnl AM_WEBKIT_FEATURE_CONDITIONAL
Note:
See TracChangeset
for help on using the changeset viewer.