1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#!/bin/sh
set -e
compiler_check()
{
# Check for a working C compiler
#
# This check needs to be done since C compiler alternatives may not
# be up to date and may point to a bogus C compiler. This would
# cause libtool's ltconfig script to choke during the postinst
# phase of installation.
# Check for an executable file with the name `cc'. If it doesn't
# exist then check for gcc. If gcc exists then update the C
# compiler alternatives to point to gcc.
if test -x /usr/bin/cc; then
: # Success
elif test -x /usr/bin/gcc; then
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 20 \
--slave /usr/man/man1/cc.1.gz cc.1.gz /usr/man/man1/gcc.1.gz
else
echo "ERROR: /usr/bin/cc was not found." 1>&2
echo " Make sure you have a C compiler installed." 1>&2
exit 1; # Failure
fi
}
case "$1" in
configure)
echo Configuring libtool...
compiler_check
# Use links to the config.{guess,sub} scripts found in the
# autotools-dev package instead of using the potentially old
# versions of those scripts shipped with this distribution.
cd /usr/share/libtool
rm -f config.guess config.sub
for p in config.guess config.sub; do
ln -s ../misc/$p $p
done
;;
*)
case "$1" in
abort-upgrade|abort-remove|abort-deconfigure) ;;
*)
echo "ERROR: unrecognized libtool postinst arguments: $@" 1>&2
echo -n "Aborting configuration of libtool package..." 1>&2
;;
esac
rm -f /usr/bin/libtool /usr/share/libtool/libtool \
/usr/share/libtool/config.log
case "$1" in
abort-upgrade|abort-remove|abort-deconfigure) ;;
*)
echo " done." 1>&2
exit 1
;;
esac
;;
esac
#DEBHELPER#
|