diff -Naur apache-log4cxx-0.10.0.orig/aclocal.m4 apache-log4cxx-0.10.0/aclocal.m4
--- apache-log4cxx-0.10.0.orig/aclocal.m4	2009-06-02 17:25:05.000000000 +0200
+++ apache-log4cxx-0.10.0/aclocal.m4	2009-06-02 19:03:03.000000000 +0200
@@ -3885,10 +3885,22 @@
 solaris*)
   case $cc_basename in
   CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
     # Adding this requires a known-good setup of shared libraries for
     # Sun compiler versions before 5.6, else PIC objects from an old
     # archive will be linked into the output, leading to subtle bugs.
-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
     ;;
   esac
   ;;
diff -Naur apache-log4cxx-0.10.0.orig/configure apache-log4cxx-0.10.0/configure
--- apache-log4cxx-0.10.0.orig/configure	2009-06-02 17:25:05.000000000 +0200
+++ apache-log4cxx-0.10.0/configure	2009-06-02 19:03:55.000000000 +0200
@@ -11240,10 +11240,22 @@
 solaris*)
   case $cc_basename in
   CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
     # Adding this requires a known-good setup of shared libraries for
     # Sun compiler versions before 5.6, else PIC objects from an old
     # archive will be linked into the output, leading to subtle bugs.
-    postdeps_CXX='-lCstd -lCrun'
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
     ;;
   esac
   ;;
