]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
libdvben50221 - fix detection
authorJaroslav Kysela <perex@perex.cz>
Thu, 16 Apr 2015 06:49:47 +0000 (08:49 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 16 Apr 2015 06:49:47 +0000 (08:49 +0200)
configure

index 0b84fec067ea361525b16a9a6c3d360400de0763..ecd5ed8adc72325ea3dc729201ec355f6b5fa9ff 100755 (executable)
--- a/configure
+++ b/configure
@@ -43,7 +43,7 @@ OPTIONS=(
   "tvhcsa:auto"
   "bundle:no"
   "dvbcsa:no"
-  "libdvben50221:auto"
+  "dvben50221:auto"
   "kqueue:no"
   "dbus_1:auto"
   "android:no"
@@ -197,15 +197,22 @@ int test(void)
 }
 ' -liconv
 
-check_cc_snippet libdvben50221 '
-#include <libdvben50221/en50221_session.h>
-#define TEST test
-int test(void)
-{
-  struct en50221_transport_layer *tl = en50221_tl_create(5, 32);
-  return 0;
-}
-' '-ldvben50221 -ldvbapi -lucsi'
+if enabled_or_auto dvben50221; then
+  check_cc_snippet libdvben50221 '
+  #include <libdvben50221/en50221_session.h>
+  #define TEST test
+  int test(void)
+  {
+    struct en50221_transport_layer *tl = en50221_tl_create(5, 32);
+    return 0;
+  }
+  ' '-ldvben50221 -ldvbapi -lucsi'
+  if enabled libdvben50221; then
+    enable dvben50221
+  else
+    disable dvben50221
+  fi
+fi
 
 #
 # Python
@@ -446,7 +453,7 @@ fi
 #
 # libdvben50221
 #
-if enabled_or_auto libdvben50221; then
+if enabled libdvben50221; then
   LDFLAGS="$LDFLAGS -ldvben50221 -ldvbapi -lucsi"
   enable linuxdvb_ca
 fi