#!/bin/sh
#
#	Copyright (c) 2005      by Michel Hermier <hermier@kde.org>
#
#	*************************************************************************
#	*                                                                       *
#	* This program is free software; you can redistribute it and/or modify  *
#	* it under the terms of the GNU General Public License as published by  *
#	* the Free Software Foundation; either version 2 of the License, or     *
#	* (at your option) any later version.                                   *
#	*                                                                       *
#	*************************************************************************
#

BASENAME=`basename $0`

cd $QTDIR/lib

QTLIBS="
	libQt3Support
	libQtCore
	libQtDBus
	libQtDesigner
	libQtDesignerComponents
	libQtGui
	libQtNetwork
	libQtOpenGL
	libQtSql
	libQtSvg
	libQtTest
	libQtXml
	"

function switch_lib()
{
	LIBL=$1.so
	LIBB=$1$2.so.4
	if [ -e "$LIBB" ]
	then
		rm -f $LIBL
		ln -s $LIBB $LIBL
	else
		echo "No such library $QTDIR/lib/$LIBB"
	fi
}

case $1 in
release)
	for QTLIB in $QTLIBS
	do
		switch_lib $QTLIB
	done
	;;
debug)
	for QTLIB in $QTLIBS
	do
		switch_lib $QTLIB _debug
	done
	;;
*)
	echo "Usage: $BASENAME [release|debug]"
	exit
	;;
esac

echo "Done"

