diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2022-02-15 09:58:31 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2022-02-15 10:22:31 +1000 |
commit | 5eb768c3a6eb0f6543e68d0cc0a6fc8cbc1060c4 (patch) | |
tree | 4b0ceed937588b89380f305f939133dedd8f1b1e /configure.ac | |
parent | 15bb122bc2474e9eefe681bfbbadbaeb848061c1 (diff) | |
download | xf86-input-wacom-5eb768c3a6eb0f6543e68d0cc0a6fc8cbc1060c4.tar.gz |
configure.ac: fix the check for unittests
Leftover from ad8de30. Because we now only have one thing to check,
let's always check for dl and handle the special "auto" case based on
the outcome of the dl check.
Fixes #248
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index 6f36465..fc892ce 100644 --- a/configure.ac +++ b/configure.ac @@ -134,26 +134,18 @@ AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], [UNITTESTS=$enableval], [UNITTESTS=auto]) -# If unittests aren't explicitly disabled, check for required support -if test "x$UNITTESTS" != xno ; then - # Check for the availability of dlsym and friends - AC_CHECK_LIB([dl], [dlsym], - [libdl_available="yes"], - [libdl_available="no"] - ) -fi +# Check for the availability of dlsym and friends +AC_CHECK_LIB([dl], [dlsym], + [libdl_available="yes"], + [libdl_available="no"] +) +# If unittests aren't explicitly enabled, check for required support if test "x$UNITTESTS" = xauto; then - if test "x$linker_can_wrap" = xyes; then - UNITTESTS=yes - else - UNITTESTS=no - fi + UNITTESTS=$libdl_available fi + if test "x$UNITTESTS" = xyes; then - if test "x$linker_can_wrap" = xno; then - AC_MSG_ERROR([ld -wrap support required to build unit tests]) - fi if test "x$libdl_available" = xno; then AC_MSG_ERROR([dlsym required to build unit tests]) fi |