diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-03 15:54:25 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-07 14:50:02 -0800 |
commit | 0295ee03ab45c55771581664d6c903c6d2f87e53 (patch) | |
tree | 37df0bdc93180d3029b7986f6f85ee2cfc6584b9 /xorg-macros.m4.in | |
parent | b8a13e531db208a7c4c9a43b74b196104e7c66ed (diff) |
Add an optional argument to XORG_LD_WRAP
Allows specifying if ld -wrap support is 'required' or 'optional' for
unit tests, so that builds like the xserver which only need ld -wrap
for some tests can allow users to enable the others when ld -wrap is
not available.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'xorg-macros.m4.in')
-rw-r--r-- | xorg-macros.m4.in | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index d23688b..bc5fcc1 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -1116,8 +1116,8 @@ fi AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) ]) # XORG_WITH_GLIB -# XORG_LD_WRAP -# ------------ +# XORG_LD_WRAP([required|optional]) +# --------------------------------- # Minimum version: 1.13.0 # # Check if linker supports -wrap, passed via compiler flags @@ -1125,10 +1125,15 @@ AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. # Otherwise the value of $enable_unit_tests is blank. # +# Argument added in 1.16.0 - default is "required", to match existing behavior +# of returning an error if enable_unit_tests is yes, and ld -wrap is not +# available, an argument of "optional" allows use when some unit tests require +# ld -wrap and others do not. +# AC_DEFUN([XORG_LD_WRAP],[ XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no]) # Not having ld wrap when unit testing has been explicitly requested is an error -if test "x$enable_unit_tests" = x"yes"; then +if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then if test "x$have_ld_wrap" = x"no"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) fi |