## This was causing problems compiling KDE for unknown reasons.
## So, we'll symlink the libraries into /opt/kde3 again...
# Add QT library directory to /etc/ld.so.conf:
if ! grep /opt/kde3/lib etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
  echo "/opt/kde3/lib" >> etc/ld.so.conf
fi
if [ -x /sbin/ldconfig ]; then
  /sbin/ldconfig 2> /dev/null
fi
( cd opt/kde3/lib ; rm -rf libqt-mt.so.3 )
( cd opt/kde3/lib ; ln -sf qt3/lib/libqt-mt.so.3 libqt-mt.so.3 )
( cd opt/kde3/lib ; rm -rf libqui.so.1.0.0 )
( cd opt/kde3/lib ; ln -sf qt3/lib/libqui.so.1.0.0 libqui.so.1.0.0 )
( cd opt/kde3/lib/pkgconfig ; rm -rf qt-mt.pc )
( cd opt/kde3/lib/pkgconfig ; ln -sf /opt/kde3/lib/qt3/lib/pkgconfig/qt-mt.pc qt-mt.pc )
( cd opt/kde3/lib ; rm -rf libqt-mt.so )
( cd opt/kde3/lib ; ln -sf qt3/lib/libqt-mt.so libqt-mt.so )
( cd opt/kde3/lib ; rm -rf libqui.so )
( cd opt/kde3/lib ; ln -sf qt3/lib/libqui.so libqui.so )
( cd opt/kde3/lib ; rm -rf libqt-mt.so.3.3 )
( cd opt/kde3/lib ; ln -sf qt3/lib/libqt-mt.so.3.3 libqt-mt.so.3.3 )
( cd opt/kde3/lib ; rm -rf libqui.so.1 )
( cd opt/kde3/lib ; ln -sf qt3/lib/libqui.so.1 libqui.so.1 )
( cd opt/kde3/lib ; rm -rf libqui.so.1.0 )
( cd opt/kde3/lib ; ln -sf qt3/lib/libqui.so.1.0 libqui.so.1.0 )
( cd opt/kde3/lib/qt3/lib ; rm -rf libqt-mt.so.3 )
( cd opt/kde3/lib/qt3/lib ; ln -sf libqt-mt.so.3.3.8 libqt-mt.so.3 )
( cd opt/kde3/lib/qt3/lib ; rm -rf libqt-mt.so )
( cd opt/kde3/lib/qt3/lib ; ln -sf libqt-mt.so.3.3.8 libqt-mt.so )
( cd opt/kde3/lib/qt3/lib ; rm -rf libqui.so )
( cd opt/kde3/lib/qt3/lib ; ln -sf libqui.so.1.0.0 libqui.so )
( cd opt/kde3/lib/qt3/lib ; rm -rf libqt-mt.so.3.3 )
( cd opt/kde3/lib/qt3/lib ; ln -sf libqt-mt.so.3.3.8 libqt-mt.so.3.3 )
( cd opt/kde3/lib/qt3/lib ; rm -rf libqui.so.1 )
( cd opt/kde3/lib/qt3/lib ; ln -sf libqui.so.1.0.0 libqui.so.1 )
( cd opt/kde3/lib/qt3/lib ; rm -rf libqui.so.1.0 )
( cd opt/kde3/lib/qt3/lib ; ln -sf libqui.so.1.0.0 libqui.so.1.0 )
( cd opt/kde3/lib/qt3/mkspecs ; rm -rf default )
( cd opt/kde3/lib/qt3/mkspecs ; ln -sf linux-g++ default )
( cd opt/kde3/lib/qt3/mkspecs/linux-g++ ; rm -rf linux-g++ )
( cd opt/kde3/lib/qt3/mkspecs/linux-g++ ; ln -sf /opt/kde3/lib/qt3/mkspecs/linux-g++ linux-g++ )
( cd opt/kde3/lib ; rm -rf qt3-3.3.8b )
( cd opt/kde3/lib ; ln -sf qt3 qt3-3.3.8b )
( cd opt/kde3/lib ; rm -rf libqt-mt.so.3.3.8 )
( cd opt/kde3/lib ; ln -sf qt3/lib/libqt-mt.so.3.3.8 libqt-mt.so.3.3.8 )
( cd opt/kde3/bin ; rm -rf assistant )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/assistant assistant )
( cd opt/kde3/bin ; rm -rf uic )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/uic uic )
( cd opt/kde3/bin ; rm -rf lupdate )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/lupdate lupdate )
( cd opt/kde3/bin ; rm -rf qm2ts )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/qm2ts qm2ts )
( cd opt/kde3/bin ; rm -rf linguist )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/linguist linguist )
( cd opt/kde3/bin ; rm -rf qmake )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/qmake qmake )
( cd opt/kde3/bin ; rm -rf moc )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/moc moc )
( cd opt/kde3/bin ; rm -rf lrelease )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/lrelease lrelease )
( cd opt/kde3/bin ; rm -rf qtconfig )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/qtconfig qtconfig )
( cd opt/kde3/bin ; rm -rf designer )
( cd opt/kde3/bin ; ln -sf /opt/kde3/lib/qt3/bin/designer designer )
