]> granicus.if.org Git - graphviz/commitdiff
guess at dll extension when not provided
authorellson <devnull@localhost>
Wed, 7 Dec 2005 22:12:16 +0000 (22:12 +0000)
committerellson <devnull@localhost>
Wed, 7 Dec 2005 22:12:16 +0000 (22:12 +0000)
Bob Lied <lied@lucent.com>

tclpkg/mkpkgindex.sh

index 6c6ef6d51b8eec0541a9172c42bf4520f9cb68db..098b8998287bdd9b19414c74f44763c3a69213bf 100755 (executable)
@@ -4,7 +4,17 @@
 # $2 = Name of extension
 # $3 = Version of extension
 
-lib=`grep library_names $1 | sed -e "s/.*=.//" -e "s/ .*//"`
+lib=`sed -n "/library_names/s/^[^']*'\([^ ']*\).*$/\1/p" $1`
+if [ -z "$lib" ]
+then
+    libBaseName=`basename $1 .la`
+    case `uname` in
+        CYGWIN*) lib="${libBaseName}.dll" ;;
+        HP-UX*)  lib="${libBaseName}.sl" ;;
+        *)       lib="${libBaseName}.so" ;;
+    esac
+fi
+
 echo "package ifneeded $2 $3 \"" >pkgIndex.tcl
 case "$1" in
   *tk* )