2009-05-14 20:08:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Discover the version number of libtool on this system.
|
|
|
|
# and set up autogen.sh and configure.ac accordingly.
|
|
|
|
|
|
|
|
# Run this script after downloading source from SVN and before
|
|
|
|
# running autogen.sh to ensure correct libtool operation.
|
|
|
|
|
|
|
|
# Version 1 files
|
|
|
|
V1AUTOGEN='autogen.sh.ltv1'
|
|
|
|
V1CONFIG='configure.ac.ltv1'
|
|
|
|
|
|
|
|
# Version 2 (and later?) files
|
|
|
|
V2AUTOGEN='autogen.sh.ltv2'
|
|
|
|
V2CONFIG='configure.ac.ltv2'
|
|
|
|
|
|
|
|
# Destinations
|
|
|
|
AUTOGEN='autogen.sh'
|
|
|
|
CONFIG='configure.ac'
|
|
|
|
|
|
|
|
if [ ! -e $AUTOGEN ]; then
|
|
|
|
echo File $AUTOGEN not detected.
|
|
|
|
echo This procedure is needed only if you are working with source
|
|
|
|
echo from an SVN checkout, where autogen.sh is provided. Exiting.
|
|
|
|
exit 1
|
|
|
|
fi
|
2009-05-15 18:21:01 +00:00
|
|
|
vers=$( echo $(libtool --version) | \
|
|
|
|
sed '1,1s/ltmain.*tool) //; 1,1s/ .*$//; 2,$d')
|
2009-05-14 20:08:18 +00:00
|
|
|
|
|
|
|
# Test first digit of version. If it's '1', use libtool v1 setup, otherwise
|
|
|
|
# use libtool v2.
|
|
|
|
|
|
|
|
echo Libtool version $vers detected.
|
|
|
|
|
|
|
|
if [ $vers \< "1.99.99" ]; then
|
|
|
|
cp $V1AUTOGEN $AUTOGEN
|
|
|
|
cp $V1CONFIG $CONFIG
|
|
|
|
echo Libtool v1 configured.
|
|
|
|
else
|
|
|
|
cp $V2AUTOGEN $AUTOGEN
|
|
|
|
cp $V2CONFIG $CONFIG
|
2009-05-15 18:21:01 +00:00
|
|
|
echo Libtool v2 configured.
|
2009-05-14 20:08:18 +00:00
|
|
|
fi
|
2009-05-15 18:21:01 +00:00
|
|
|
echo
|
2009-10-28 15:13:36 +00:00
|
|
|
echo "** You may now run sh ./autogen.sh **"
|
2009-05-14 20:08:18 +00:00
|
|
|
|