From 7a9aba912ff6e2f8f6fcab1f1736bedf5abbf401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 28 Apr 2011 10:07:04 +0200 Subject: [PATCH] decklink: Check for pthread.h and link with -lpthread --- configure.ac | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 3c9a938aa0..425f1d58f6 100644 --- a/configure.ac +++ b/configure.ac @@ -710,16 +710,23 @@ AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [ dnl *** decklink *** translit(dnm, m, l) AM_CONDITIONAL(USE_DECKLINK, true) AG_GST_CHECK_FEATURE(DECKLINK, [decklink], decklink, [ + HAVE_DECKLINK=no case "$host" in *-*linux*) - HAVE_DECKLINK=yes + if test "x$HAVE_PTHREAD_H" = "xyes"; then + AC_CHECK_LIB(dl, dlopen, + [ + HAVE_DECKLINK=yes + DECKLINK_CXXFLAGS= + DECKLINK_LIBS="-lpthread -ldl" + ]) + fi ;; *) HAVE_DECKLINK=no ;; esac - DECKLINK_CXXFLAGS= - DECKLINK_LIBS= + AC_SUBST(DECKLINK_CXXFLAGS) AC_SUBST(DECKLINK_LIBS) ])