]> git.sesse.net Git - vlc/blobdiff - extras/analyser/zsh_completion.sh
Avformat demuxing: use bit_rate value
[vlc] / extras / analyser / zsh_completion.sh
index aecb55e07455bfd6ebefdd653f433ca230123a22..37de947a2e85b72f008042e0cfff303e9ecc270b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/usr/bin/env zsh
 # Helper script to install zsh completion for VLC media player
 # © 2008 Rafaël Carré <funman@videolanorg>
 
@@ -38,6 +38,13 @@ function find_libvlc {
     return 1
 }
 
+function find_libvlccore {
+    for i in $BUILDDIR/src/.libs/libvlccore.$SUFFIX $BUILDDIR/src/libvlccore.$SUFFIX; do
+        test -e $i && LIBVLCCORE=$i && return 0
+    done
+    return 1
+}
+
 while test -z "$LIBVLC"; do
     if ! find_libvlc; then
         /bin/echo -n "Please enter the directory where you built vlc: "
@@ -47,6 +54,10 @@ done
 
 echo "libvlc found !"
 
+if ! find_libvlccore; then
+    /bin/echo -n "libvlccore not found ! Linking will fail !"
+fi
+
 LD_LIBRARY_PATH=$BUILDDIR/src/.libs
 
 if test -e ../../extras/contrib/config.mak -a ! "`grep HOST ../../extras/contrib/config.mak 2>/dev/null|awk '{print $3}'`" != "$HOST"; then
@@ -58,7 +69,7 @@ if test -z "$CXX"; then
     CXX=g++
 fi
 
-ZSH_BUILD="$CXX $CPPFLAGS $CXXFLAGS -D__LIBVLC__ -DHAVE_CONFIG_H -I$BUILDDIR -I$BUILDDIR/include -I../../include zsh.cpp $LIBVLC -o zsh_gen"
+ZSH_BUILD="$CXX $CPPFLAGS $CXXFLAGS -D__LIBVLC__ -DHAVE_CONFIG_H -I$BUILDDIR -I$BUILDDIR/include -I../../include zsh.cpp $LIBVLC $LIBVLCCORE -o zsh_gen"
 
 echo "Building zsh completion generator ...  "
 echo $ZSH_BUILD