diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-05-10 15:34:09 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-05-10 15:45:56 +1000 |
commit | a683b62781dd55320479f7139c28e05fd52f15ba (patch) | |
tree | d1fcc516d4cd9ddb41947c7089bdfba96eea1dcd /configure.ac | |
parent | dfd9517f5a17001ed4e13c41d16fe935d2b190db (diff) |
configure.ac: move libunwind/addr2line test to inside the test conditions
If we're not building the tests, we don't care about libinwind/addr2line.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index a44d84c0..8ddc3b6e 100644 --- a/configure.ac +++ b/configure.ac @@ -65,28 +65,6 @@ PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0]) PKG_CHECK_MODULES(LIBUDEV, [libudev]) PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4]) -AC_ARG_WITH(libunwind, - AS_HELP_STRING([--without-libunwind],[Do not use libunwind])) - -AS_IF([test "x$with_libunwind" != "xno"], - [PKG_CHECK_MODULES(LIBUNWIND, - [libunwind], - [HAVE_LIBUNWIND=yes], - [HAVE_LIBUNWIND=no])], - [HAVE_LIBUNWIND=no]) - -AS_IF([test "x$HAVE_LIBUNWIND" = "xyes"], - [AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])], - [AS_IF([test "x$with_libunwind" = "xyes"], - [AC_MSG_ERROR([libunwind requested but not found])])]) - -AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes]) -AC_PATH_PROG(ADDR2LINE, [addr2line]) -if test "x$ADDR2LINE" != "x"; then - AC_DEFINE_UNQUOTED(HAVE_ADDR2LINE, 1, [addr2line found]) - AC_DEFINE_UNQUOTED(ADDR2LINE, ["$ADDR2LINE"], [Path to addr2line]) -fi - AC_CHECK_LIB([m], [atan2]) AC_CHECK_LIB([rt], [clock_gettime]) @@ -191,7 +169,29 @@ if test "x$build_tests" = "xyes"; then fi AC_PATH_PROG(VALGRIND, [valgrind]) + + AC_ARG_WITH(libunwind, + AS_HELP_STRING([--without-libunwind],[Do not use libunwind])) + + AS_IF([test "x$with_libunwind" != "xno"], + [PKG_CHECK_MODULES(LIBUNWIND, + [libunwind], + [HAVE_LIBUNWIND=yes], + [HAVE_LIBUNWIND=no])], + [HAVE_LIBUNWIND=no]) + + AS_IF([test "x$HAVE_LIBUNWIND" = "xyes"], + [AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])], + [AS_IF([test "x$with_libunwind" = "xyes"], + [AC_MSG_ERROR([libunwind requested but not found])])]) + + AC_PATH_PROG(ADDR2LINE, [addr2line]) + if test "x$ADDR2LINE" != "x"; then + AC_DEFINE_UNQUOTED(HAVE_ADDR2LINE, 1, [addr2line found]) + AC_DEFINE_UNQUOTED(ADDR2LINE, ["$ADDR2LINE"], [Path to addr2line]) + fi fi +AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes]) AC_ARG_ENABLE(libwacom, AS_HELP_STRING([--enable-libwacom], |