#! /bin/sh -e

# DP: change libstdc++'s soname.

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

--- libstdc++-v3/configure.ac~	2004-07-17 10:57:12.000000000 +0200
+++ libstdc++-v3/configure.ac	2004-07-17 14:00:41.000000000 +0200
@@ -13,7 +13,7 @@
 ### am handles this now?  ORIGINAL_LD_FOR_MULTILIBS=$LD
 
 # For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:3:0
+libtool_VERSION=60:3:0
 AC_SUBST(libtool_VERSION)
 
 # Find the rest of the source tree framework.
--- libstdc++-v3/configure~	2004-07-17 10:57:12.000000000 +0200
+++ libstdc++-v3/configure	2004-07-17 14:01:13.000000000 +0200
@@ -1340,7 +1340,7 @@
 ### am handles this now?  ORIGINAL_LD_FOR_MULTILIBS=$LD
 
 # For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:3:0
+libtool_VERSION=60:3:0
 
 
 # Find the rest of the source tree framework.
