--- config_office/configure.in.orig	2006-03-27 20:19:35.000000000 +0200
+++ config_office/configure.in	2006-03-27 21:32:04.000000000 +0200
@@ -375,15 +375,15 @@
                           components cannot be built against a contemporary
                           mozilla
 ],,)
-AC_ARG_WITH(stlport4,
-[  --with-stlport4         The location that STLport4 is installed in. The STL
+AC_ARG_WITH(stlport,
+[  --with-stlport         The location that STLport is installed in. The STL
                           header files are assumed to be in
-                          stlport4-home/stlport and the STLPort4 library in
-                          stlport4-home/lib.
+                          stlport-home/stlport and the STLPort library in
+                          stlport-home/lib.
 
-                          Usage: --with-stlport4=<absolute path to stlport4 home>
+                          Usage: --with-stlport=<absolute path to stlport home>
 
-                          Warning!!, --without-stlport4 is possible with
+                          Warning!!, --without-stlport is possible with
                           gcc >= 3.3.3, but will break ABI compatability
 ], WITH_STLPORT=$withval , WITH_STLPORT=yes)
 AC_ARG_WITH(jdk-home,
@@ -1885,9 +1885,9 @@
 else
 
 dnl ===================================================================
-dnl Checks for STLPORT4
+dnl Checks for STLPORT
 dnl ===================================================================
-   AC_MSG_CHECKING([for STLport4 headers])
+   AC_MSG_CHECKING([for STLport headers])
    STLPORT4=""
    USE_SYSTEM_STL=""
    if test "$WITH_STLPORT" = "yes"; then
@@ -1898,28 +1898,34 @@
    else
       STLPORT4=$WITH_STLPORT
       if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
-         AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport4 headers not found.]))
+         AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
       else
          dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
          if test -f "$STLPORT4/stlport/hash_map"; then
             AC_MSG_RESULT([checked.])
          else
-            AC_MSG_ERROR([STLport4 headers not found.])
+            AC_MSG_ERROR([STLport headers not found.])
          fi
       fi
       if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
-         AC_MSG_CHECKING([for STLport4 libraries])
+         AC_MSG_CHECKING([for STLport libraries])
          if test "$_os" = "SunOS"; then
 		      if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
 			      AC_MSG_RESULT([checked])
+		      elif test -f "$STLPORT4/lib/libstlport.so"; then
+			      AC_MSG_RESULT([checked])
+			      STLPORT_VER=500
 		      else
-			      AC_MSG_ERROR([STLport4 libraries not found])
+			      AC_MSG_ERROR([STLport libraries not found])
 		      fi
 	      elif test "$_os" = "Darwin"; then
 		      if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
 			      AC_MSG_RESULT([checked])
+		      elif test -f "$STLPORT4/lib/libstlport.dylib"; then
+			      AC_MSG_RESULT([checked])
+			      STLPORT_VER=500
 		      else
-			      AC_MSG_ERROR([STLport4 libraries not found])
+			      AC_MSG_ERROR([STLport libraries not found])
 		      fi
 	      elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
 		      if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then
@@ -1927,15 +1933,21 @@
 			   else
 				   if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
 					   AC_MSG_RESULT([checked])
+				   elif test -f "$STLPORT4/lib/libstlport.so"; then
+					   AC_MSG_RESULT([checked])
+					   STLPORT_VER=500
 				   else
-					   AC_MSG_ERROR([STLport4 libraries not found])
+					   AC_MSG_ERROR([STLport libraries not found])
 				   fi
 			   fi
 		   else
 			   if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
 				   AC_MSG_RESULT([checked])
+			   elif test -f "$STLPORT4/lib/libstlport.so"; then
+				   AC_MSG_RESULT([checked])
+				   STLPORT_VER=500
 			   else
-				   AC_MSG_ERROR([STLport4 libraries not found])
+				   AC_MSG_ERROR([STLport libraries not found])
 			   fi
 		   fi
 	   fi
@@ -1945,7 +1957,11 @@
 if test -z "$STLPORT4"; then
   STLPORT4="NO_STLPORT4"
 fi
+if test -z "$STLPORT_VER"; then
+  STLPORT_VER=400
+fi
 AC_SUBST(STLPORT4)
+AC_SUBST(STLPORT_VER)
 AC_SUBST(USE_SYSTEM_STL)
 
 dnl ===================================================================
--- config_office/set_soenv.in.orig	2006-03-27 21:35:18.000000000 +0200
+++ config_office/set_soenv.in	2006-03-27 21:36:43.000000000 +0200
@@ -1421,6 +1421,7 @@
 ToFile( "ANT",               "@ANT@",            "e" );
 ToFile( "JDKLIB",            $JAVA_LIB,          "e" );
 ToFile( "STLPORT4",          $STLPORT4,          "e" );
+ToFile( "STLPORT_VER",       "@STLPORT_VER@",    "e" );
 ToFile( "ASM_PATH",          $ASM_PATH,          "e" );
 ToFile( "BUILD_SOSL",        $BUILD_SOSL,        "e" );
 ToFile( "LOCAL_SOLENV",      $LOCAL_SOLENV,      "e" );
--- odk/settings/settings.mk.orig	2006-03-25 15:52:16.000000000 +0100
+++ odk/settings/settings.mk	2006-03-25 15:52:30.000000000 +0100
@@ -269,7 +269,11 @@
 SALHELPERLIB=-luno_salhelper$(COMID)
 REGLIB=-lreg
 STORELIB=-lstore
+ifeq "$(STLPORT_VER)" "500"
+STLPORTLIB=-lstlport
+else
 STLPORTLIB=-lstlport_gcc
+endif
 
 EMPTYSTRING=
 PATH_SEPARATOR=:
@@ -367,7 +371,11 @@
 SALHELPERLIB=-luno_salhelper$(COMID)
 REGLIB=-lreg
 STORELIB=-lstore
+ifeq "$(STLPORT_VER)" "500"
+STLPORTLIB=-lstlport -lstdc++
+else
 STLPORTLIB=-lstlport_gcc -lstdc++
+endif
 
 EMPTYSTRING=
 PATH_SEPARATOR=:
@@ -463,7 +471,11 @@
 SALHELPERLIB=-luno_salhelper$(COMID)
 REGLIB=-lreg
 STORELIB=-lstore
+ifeq "$(STLPORT_VER)" "500"
+STLPORTLIB=-lstlport
+else
 STLPORTLIB=-lstlport_gcc
+endif
 
 EMPTYSTRING=
 PATH_SEPARATOR=:
diff -Nur solenv.orig/inc/unxbsdi2.mk solenv/inc/unxbsdi2.mk
--- solenv.orig/inc/unxbsdi2.mk	2005-10-05 13:32:11.000000000 +0200
+++ solenv/inc/unxbsdi2.mk	2006-03-25 16:05:10.000000000 +0100
@@ -171,8 +171,13 @@
 
 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
 
diff -Nur solenv.orig/inc/unxbsdi.mk solenv/inc/unxbsdi.mk
--- solenv.orig/inc/unxbsdi.mk	2005-10-05 13:31:35.000000000 +0200
+++ solenv/inc/unxbsdi.mk	2006-03-25 16:05:10.000000000 +0100
@@ -158,8 +158,13 @@
 STDSHLGUIMT=-lX11 -lXext -lpthread -lm
 STDSHLCUIMT=-lpthread -lm
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 
 # name of library manager
diff -Nur solenv.orig/inc/unxbsds.mk solenv/inc/unxbsds.mk
--- solenv.orig/inc/unxbsds.mk	2005-10-05 13:32:40.000000000 +0200
+++ solenv/inc/unxbsds.mk	2006-03-25 16:05:11.000000000 +0100
@@ -154,8 +154,13 @@
 
 # STLport always needs pthread. This may yield some redundant -lpthread
 # but that doesn't matter. 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport -lpthread
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -lpthread
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lpthread
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -lpthread
+.ENDIF
 
 
 # name of library manager
diff -Nur solenv.orig/inc/unxfbsdi.mk solenv/inc/unxfbsdi.mk
--- solenv.orig/inc/unxfbsd.mk	2006-01-31 19:24:38.000000000 +0100
+++ solenv/inc/unxfbsd.mk	2006-03-25 16:05:10.000000000 +0100
@@ -191,11 +191,21 @@
 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
 
 .IF "$(USE_STLP_DEBUG)" != ""
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlportstlg
+LIBSTLPORTST=$(STATIC) -lstlportstlg $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
 LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
+.ENDIF
 .ELSE # "$(USE_STLP_DEBUG)" != ""
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 .ENDIF # "$(USE_STLP_DEBUG)" != ""
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
diff -Nur solenv.orig/inc/unxirgm.mk solenv/inc/unxirgm.mk
--- solenv.orig/inc/unxirgm.mk	2005-09-08 11:54:01.000000000 +0200
+++ solenv/inc/unxirgm.mk	2006-03-25 16:05:11.000000000 +0100
@@ -142,8 +142,13 @@
 STDSHLCUIMT=	-L/usr/lib32 $(THREADLIB) $(DYNAMIC) -lm -lgcc -lc
 THREADLIB=		-lpthread
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST= -lstlport
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST= -lstlport_gcc
+.ENDIF
 
 LIBMGR=			ar
 LIBFLAGS=		-r
diff -Nur solenv.orig/inc/unxlngi4.mk solenv/inc/unxlngi4.mk
--- solenv.orig/inc/unxlngi4.mk	2006-03-25 15:18:24.000000000 +0100
+++ solenv/inc/unxlngi4.mk	2006-03-25 16:05:10.000000000 +0100
@@ -192,8 +192,13 @@
 
 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
 
diff -Nur solenv.orig/inc/unxlngi5.mk solenv/inc/unxlngi5.mk
--- solenv.orig/inc/unxlngi5.mk	2006-01-31 19:27:45.000000000 +0100
+++ solenv/inc/unxlngi5.mk	2006-03-25 16:05:11.000000000 +0100
@@ -199,8 +199,13 @@
 
 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
 
diff -Nur solenv.orig/inc/unxlngi6.mk solenv/inc/unxlngi6.mk
--- solenv.orig/inc/unxlngi6.mk	2006-03-25 15:18:24.000000000 +0100
+++ solenv/inc/unxlngi6.mk	2006-03-25 16:05:10.000000000 +0100
@@ -206,11 +206,21 @@
 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
 
 .IF "$(USE_STLP_DEBUG)" != ""
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlportstlg
+LIBSTLPORTST=$(STATIC) -lstlportstlg $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
 LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
+.ENDIF
 .ELSE # "$(USE_STLP_DEBUG)" != ""
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 .ENDIF # "$(USE_STLP_DEBUG)" != ""
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
diff -Nur solenv.orig/inc/unxlngppc4.mk solenv/inc/unxlngppc4.mk
--- solenv.orig/inc/unxlngppc4.mk	2006-03-25 15:18:24.000000000 +0100
+++ solenv/inc/unxlngppc4.mk	2006-03-25 16:05:10.000000000 +0100
@@ -180,8 +180,13 @@
 STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm
 STDSHLCUIMT=-ldl -lpthread -lm
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
 
diff -Nur solenv.orig/inc/unxlngppc.mk solenv/inc/unxlngppc.mk
--- solenv.orig/inc/unxlngppc.mk	2006-03-25 15:18:24.000000000 +0100
+++ solenv/inc/unxlngppc.mk	2006-03-25 16:05:10.000000000 +0100
@@ -171,8 +171,13 @@
 STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm
 STDSHLCUIMT=-ldl -lpthread -lm
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 # name of library manager
 LIBMGR=ar 
diff -Nur solenv.orig/inc/unxlngr.mk solenv/inc/unxlngr.mk
--- solenv.orig/inc/unxlngr.mk	2006-03-25 15:16:45.000000000 +0100
+++ solenv/inc/unxlngr.mk	2006-03-25 16:05:10.000000000 +0100
@@ -150,13 +150,24 @@
 STDSLOCUI=
 
 # libraries for linking applications
+.IF "$(STLPORT_VER)" >= "500"
+STDLIBCUIST=-ldl -lm -lstlport
+STDLIBGUIMT=-ldl -lpthread -lm -lstlport
+STDLIBCUIMT=-ldl -lpthread -lm -lstlport
+.ELSE
 STDLIBCUIST=-ldl -lm -lstlport_gcc
 STDLIBGUIMT=-ldl -lpthread -lm -lstlport_gcc
 STDLIBCUIMT=-ldl -lpthread -lm -lstlport_gcc
+.ENDIF
 STDLIBGUIST=-lX11 -ldl -lm
 # libraries for linking shared libraries
+.IF "$(STLPORT_VER)" >= "500"
+STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -lstlport
+STDSHLCUIMT=-ldl -lpthread -lm -lstlport
+.ELSE
 STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -lstlport_gcc
 STDSHLCUIMT=-ldl -lpthread -lm -lstlport_gcc
+.ENDIF
 
 # name of library manager
 LIBMGR=ar
diff -Nur solenv.orig/inc/unxlngs3904.mk solenv/inc/unxlngs3904.mk
--- solenv.orig/inc/unxlngs3904.mk	2006-03-25 15:16:45.000000000 +0100
+++ solenv/inc/unxlngs3904.mk	2006-03-25 16:05:10.000000000 +0100
@@ -171,8 +171,13 @@
 STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm
 STDSHLCUIMT=-ldl -lpthread -lm
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
 
diff -Nur solenv.orig/inc/unxlngs.mk solenv/inc/unxlngs.mk
--- solenv.orig/inc/unxlngs.mk	2006-03-25 15:18:24.000000000 +0100
+++ solenv/inc/unxlngs.mk	2006-03-25 16:05:11.000000000 +0100
@@ -183,8 +183,13 @@
 
 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport $(STDLIBCPP)
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc $(STDLIBCPP)
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
 
diff -Nur solenv.orig/inc/unxlngx6.mk solenv/inc/unxlngx6.mk
--- solenv.orig/inc/unxlngx6.mk	2006-03-25 15:18:24.000000000 +0100
+++ solenv/inc/unxlngx6.mk	2006-03-25 16:05:10.000000000 +0100
@@ -192,11 +192,21 @@
 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
 
 .IF "$(USE_STLP_DEBUG)" != ""
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlportstlg
+LIBSTLPORTST=$(STATIC) -lstlportstlg $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
 LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
+.ENDIF
 .ELSE # "$(USE_STLP_DEBUG)" != ""
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 .ENDIF # "$(USE_STLP_DEBUG)" != ""
 
 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
diff -Nur solenv.orig/inc/unxmacx.mk solenv/inc/unxmacx.mk
--- solenv.orig/inc/unxmacx.mk	2006-03-08 15:13:02.000000000 +0100
+++ solenv/inc/unxmacx.mk	2006-03-25 16:05:10.000000000 +0100
@@ -139,8 +139,13 @@
 # ---------------------------------
 #  STLport library names
 # ---------------------------------
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=-lstlport
+LIBSTLPORTST=$(SOLARVERSION)$/$(INPATH)$/lib/libstlport.a
+.ELSE
 LIBSTLPORT=-lstlport_gcc
 LIBSTLPORTST=$(SOLARVERSION)$/$(INPATH)$/lib/libstlport_gcc.a
+.ENDIF
 
 # ---------------------------------
 #  Link stage flags
diff -Nur solenv.orig/inc/unxsogi.mk solenv/inc/unxsogi.mk
--- solenv.orig/inc/unxsogi.mk	2005-09-08 12:00:17.000000000 +0200
+++ solenv/inc/unxsogi.mk	2006-03-25 16:05:10.000000000 +0100
@@ -127,8 +127,13 @@
 STDLIBGUIST+=-lX11
 STDLIBGUIMT+=-lX11
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 LIBMGR=ar
 LIBFLAGS=-r
diff -Nur solenv.orig/inc/unxsogs.mk solenv/inc/unxsogs.mk
--- solenv.orig/inc/unxsogs.mk	2005-09-08 12:00:37.000000000 +0200
+++ solenv/inc/unxsogs.mk	2006-03-25 16:05:10.000000000 +0100
@@ -126,8 +126,13 @@
 STDLIBGUIST+=-lX11
 STDLIBGUIMT+=-lX11
 
+.IF "$(STLPORT_VER)" >= "500"
+LIBSTLPORT=$(DYNAMIC) -lstlport
+LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+.ELSE
 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+.ENDIF
 
 LIBMGR=ar
 LIBFLAGS=-r
--- sal/util/makefile.mk.orig	2006-03-27 20:03:38.000000000 +0200
+++ sal/util/makefile.mk	2006-03-27 20:08:23.000000000 +0200
@@ -137,7 +137,9 @@
 
 # If we compile sal with STLport checking iterators
 # we need to link against the STLport
-.IF "$(USE_STLP_DEBUG)" != ""
+# ---
+# system STLport5 needs it
+.IF "$(USE_STLP_DEBUG)" != "" || "$(STLPORT_VER)" >= "500"
 SHL1STDLIBS+=$(LIBSTLPORT)
 .ENDIF
 
--- store/util/makefile.mk.orig	2006-03-25 17:22:23.000000000 +0100
+++ store/util/makefile.mk	2006-03-25 17:22:34.000000000 +0100
@@ -73,7 +73,8 @@
 
 SHL1STDLIBS=	$(SALLIB)
 
-.IF "$(USE_STLP_DEBUG)" != ""
+# system STLport5 needs it
+.IF "$(USE_STLP_DEBUG)" != "" || "$(STLPORT_VER)" >= "500"
 SHL1STDLIBS+=$(LIBSTLPORT)
 .ENDIF
 
