PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.14 TIMESTAMP="(1.1220.2.195 2005/02/12 12:12:33)" Xsed=sed echo=echo function dumpargs { for dd in "$@"; do eval echo "$dd = \\\"\$$dd\\\"" done } # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in version-info) version_info="$arg" ;; version-number) version_number="$arg" ;; o) outputname="$arg" ;; l) dlname="$arg" ;; rpath) install_libdir="$arg" ;; esac fi case $arg in -version-info) prev=version-info ;; -version-number) prev=version-number ;; -o) prev=o ;; -l) prev=l ;; -rpath) prev=rpath ;; *) prev= ;; esac done function splitversion { version_number=$1 sep=$5 major=${version_number%%${sep}*} ltversbuildminor=${version_number#*${sep}} if [ "$ltversbuildminor" != "$version_number" ]; then minor=${ltversbuildminor%%${sep}*} else minor=0 fi ltversbuild=${ltversbuildminor#*${sep}} if [ "$ltversbuildminor" != "$ltversbuild" ]; then build=${ltversbuild%%${sep}*} else build=0 fi eval $2=$major eval $3=$minor eval $4=$build } if [ "$version_number" != "" ]; then if echo $version_number | grep -sq ':' ; then sep=':' else sep='.' fi splitversion $version_number major minor build $sep dumpargs sep version_number major minor build current=$((major+minor)) revision=$build age=$minor version_info=$current:$revision:$age fi if [ "${dlname}" = "" ]; then dlname=${outputname#lib} dlname=${dlname%.la} fi dumpargs version_info current=${version_info%%:*} rev_age=${version_info#*:} revision=${rev_age%%:*} age=${version_info##*:} ca=$((current-age)) libname=${outputname%.la} dlname=${dlname%.dll} outputname=${libname}.la if [ "$ca" != "0" ]; then tdlname=${dlname}$ca.dll else tdlname=${dlname}.dll fi library_names=${libname}.dll.a old_library=${libname}.dll.a installed=no module=no cat < "$outputname" # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir' EOF if [ ! -d .libs ]; then mkdir .libs fi cp -fp $outputname .libs