configure.ac: honour --disable-libunwind if the .pc file is present
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 13 Apr 2017 18:47:17 +0000 (19:47 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 17 Apr 2017 11:05:10 +0000 (12:05 +0100)
We should check the presence in order to determine if we should
[implicitly] set the CFLAGS/LIBS

v2: Drop spurious OMX hunk (Eric)

Cc: Eric Anholt <eric@anholt.net>
Reported-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
configure.ac

index ef19733423e45297c0919d14d917ec1e000a6bab..ab33ca03805637825f483a83a8a8692aa9c8fce9 100644 (file)
@@ -1074,12 +1074,13 @@ AC_ARG_ENABLE([libunwind],
         [LIBUNWIND="$enableval"],
         [LIBUNWIND="auto"])
 
-PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
+PKG_CHECK_EXISTS(libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
 if test "x$LIBUNWIND" = "xauto"; then
     LIBUNWIND="$HAVE_LIBUNWIND"
 fi
 
 if test "x$LIBUNWIND" = "xyes"; then
+    PKG_CHECK_MODULES(LIBUNWIND, libunwind)
     if test "x$HAVE_LIBUNWIND" != "xyes"; then
         AC_MSG_ERROR([libunwind requested but not installed.])
     fi