]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
support: minor addition to the configure.inc script for cc lib checking.
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 28 Nov 2012 11:19:05 +0000 (11:19 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 28 Nov 2012 11:20:19 +0000 (11:20 +0000)
support/configure.inc

index db5ad178eb675e0ff6c075b0a45f247d8d645a75..0130880caac381aeda72f5d1dcc3d1294e571011 100644 (file)
@@ -255,7 +255,7 @@ int main() {
  return 0;
 }
 EOF
-  $CC $TMPDIR/$$.c -o $TMPDIR/$$.bin $opt &> /dev/null
+  $CC $CFLAGS $LDFLAGS $TMPDIR/$$.c -o $TMPDIR/$$.bin $opt &> /dev/null
   RET=$?
   rm -f $TMPDIR/$$.{c,bin}
   return $RET
@@ -318,6 +318,25 @@ function check_cc_option
   fi
 }
 
+# Check compiler library
+function check_cc_lib
+{
+  local opt=$1
+  local nam=$2
+  [ -z "$nam" ] && nam=$opt
+  
+  echo -ne "checking for cc -l$opt ...${TAB}"
+
+  # Enable if supported
+  if check_cc "" -l${opt}; then
+    echo "ok"
+    enable $nam
+  else
+    echo "fail"
+    return 1
+  fi
+}
+
 # ###########################################################################
 # Python tests
 # ###########################################################################