  
          /** construct image of size 0x0
          */
-@@ -569,7 +573,11 @@ class BasicImage
+@@ -569,39 +573,51 @@ class BasicImage
        width_(0),
        height_(0),
        allocator_(alloc),
-+#if !defined(SOLARIS) || !defined(SUN) 
++#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
        pallocator_(alloc)
 +#else
 +      pallocator_()

 class GaborFilterFamily 
 : public ImageArray<ImageType, Alloc>
 {
--- misc/build/vigra1.4.0/include/vigra/imagecontainer.hxx	2005-12-21 05:53:36.000000000 +0100
+++ misc/vigra1.4.0/include/vigra/imagecontainer.hxx	2006-05-30 11:42:36.000000000 +0200
@@ -70,7 +70,11 @@ namespace vigra {
     Namespace: vigra
 */
 template <class ImageType, 
+#if !defined(SOLARIS) || !defined(SUN) 
       class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other >
+#else
+      class Alloc = std::allocator<ImageType> >

diff -uprN misc/vigra1.4.0/include/vigra/array_vector.hxx misc/build/vigra1.4.0/include/vigra/array_vector.hxx
--- misc/vigra1.4.0/include/vigra/array_vector.hxx	2005-12-21 05:53:30.000000000 +0100
+++ misc/build/vigra1.4.0/include/vigra/array_vector.hxx	2006-08-31 12:08:15.172679000 +0200
@@ -196,7 +196,38 @@ public:
     iterator insert(iterator p, size_type n, value_type const & v);
 
     template <class InputIterator>
-    iterator insert(iterator p, InputIterator i, InputIterator iend);
+    iterator insert(iterator p, InputIterator i, InputIterator iend)
+    {
+        difference_type n = iend - i;
+        difference_type pos = p - begin();
+        size_type new_size = size() + n;
+        if(new_size >= capacity_)
+        {
+            pointer new_data = reserve_raw(new_size);
+            std::uninitialized_copy(begin(), p, new_data);
+            std::uninitialized_copy(i, iend, new_data + pos);
+            std::uninitialized_copy(p, end(), new_data + pos + n);
+            deallocate(data_, size_);
+            capacity_ = new_size;
+            data_ = new_data;
+        }
+        else if(pos + n >= size_)
+        {
+            size_type diff = pos + n - size_;
+            std::uninitialized_copy(p, end(), end() + diff);
+            std::uninitialized_copy(iend - diff, iend, end());
+            std::copy(i, iend - diff, p);
+        }
+        else
+        {
+            size_type diff = size_ - (pos + n);
+            std::uninitialized_copy(end() - n, end(), end());
+            std::copy_backward(p, p + diff, end());
+            std::copy(i, iend, p);
+        }
+        size_ = new_size;
+        return begin() + pos;
+    }
 
     iterator erase(iterator p);
 
@@ -260,23 +291,23 @@ ArrayVector<T, Alloc>::ArrayVector(Alloc
 {}
 
 template <class T, class Alloc>
-ArrayVector<T, Alloc>::ArrayVector( size_type size, Alloc const & alloc)
+ArrayVector<T, Alloc>::ArrayVector( size_type sz, Alloc const & alloc)
 : alloc_(alloc),
-  size_(size),
-  capacity_(size),
-  data_(reserve_raw(size))
+  size_(sz),
+  capacity_(sz),
+  data_(reserve_raw(sz))
 {
     if(size_ > 0)
         std::uninitialized_fill(data_, data_+size_, value_type());
 }
 
 template <class T, class Alloc>
-ArrayVector<T, Alloc>::ArrayVector( size_type size, 
+ArrayVector<T, Alloc>::ArrayVector( size_type sz, 
                          value_type const & initial, Alloc const & alloc)
 : alloc_(alloc),
-  size_(size),
-  capacity_(size),
-  data_(reserve_raw(size))
+  size_(sz),
+  capacity_(sz),
+  data_(reserve_raw(sz))
 {
     if(size_ > 0)
         std::uninitialized_fill(data_, data_+size_, initial);
@@ -295,24 +326,24 @@ ArrayVector<T, Alloc>::ArrayVector( this
 
 template <class T, class Alloc>
 template <class InputIterator>
-ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator end)
+ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator iend)
 : alloc_(),
-  size_(std::distance(i, end)),
+  size_(std::distance(i, iend)),
   capacity_(size_),
   data_(reserve_raw(size_))
 {
-    std::uninitialized_copy(i, end, data_);
+    std::uninitialized_copy(i, iend, data_);
 }
 
 template <class T, class Alloc>
 template <class InputIterator>
-ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator end, Alloc const & alloc)
+ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator iend, Alloc const & alloc)
 : alloc_(alloc),
-  size_(std::distance(i, end)),
+  size_(std::distance(i, iend)),
   capacity_(size_),
   data_(reserve_raw(size_))
 {
-    std::uninitialized_copy(i, end, data_);
+    std::uninitialized_copy(i, iend, data_);
 }
 
 
@@ -409,42 +440,6 @@ ArrayVector<T, Alloc>::insert(iterator p
 }
 
 template <class T, class Alloc>
-template <class InputIterator>
-typename ArrayVector<T, Alloc>::iterator
-ArrayVector<T, Alloc>::insert(iterator p, InputIterator i, InputIterator iend)
-{
-    difference_type n = iend - i;
-    difference_type pos = p - begin();
-    size_type new_size = size() + n;
-    if(new_size >= capacity_)
-    {
-        pointer new_data = reserve_raw(new_size);
-        std::uninitialized_copy(begin(), p, new_data);
-        std::uninitialized_copy(i, iend, new_data + pos);
-        std::uninitialized_copy(p, end(), new_data + pos + n);
-        deallocate(data_, size_);
-        capacity_ = new_size;
-        data_ = new_data;
-    }
-    else if(pos + n >= size_)
-    {
-        size_type diff = pos + n - size_;
-        std::uninitialized_copy(p, end(), end() + diff);
-        std::uninitialized_copy(iend - diff, iend, end());
-        std::copy(i, iend - diff, p);
-    }
-    else
-    {
-        size_type diff = size_ - (pos + n);
-        std::uninitialized_copy(end() - n, end(), end());
-        std::copy_backward(p, p + diff, end());
-        std::copy(i, iend, p);
-    }
-    size_ = new_size;
-    return begin() + pos;
-}
-
-template <class T, class Alloc>
 typename ArrayVector<T, Alloc>::iterator
 ArrayVector<T, Alloc>::erase(iterator p)
 {
@@ -504,25 +499,25 @@ void ArrayVector<T, Alloc>::swap(this_ty
 }
 
 template <class T, class Alloc>
-void ArrayVector<T, Alloc>::deallocate(pointer data, size_type size)
+void ArrayVector<T, Alloc>::deallocate(pointer target_data, size_type sz)
 {
     if(data)
     {
-        detail::destroy_n(data, size);
-        alloc_.deallocate(data, size);
+        detail::destroy_n(target_data, sz);
+        alloc_.deallocate(target_data, sz);
     }
 }
 
 template <class T, class Alloc>
 typename ArrayVector<T, Alloc>::pointer
-ArrayVector<T, Alloc>::reserve_raw(size_type capacity)
+ArrayVector<T, Alloc>::reserve_raw(size_type cap)
 {
-    pointer data = 0;
-    if(capacity)
+    pointer new_data = 0;
+    if(cap)
     {
-        data = alloc_.allocate(capacity);
+        new_data = alloc_.allocate(cap);
     }
-    return data;
+    return new_data;
 }
 
 } // namespace vigra
diff -uprN misc/vigra1.4.0/include/vigra/basicimage.hxx misc/build/vigra1.4.0/include/vigra/basicimage.hxx
--- misc/vigra1.4.0/include/vigra/basicimage.hxx	2005-12-21 05:53:30.000000000 +0100
+++ misc/build/vigra1.4.0/include/vigra/basicimage.hxx	2006-08-31 12:08:15.194050000 +0200
@@ -552,7 +552,11 @@ class BasicImage
     typedef Alloc allocator_type;
 
     typedef Alloc Allocator;
+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
     typedef typename Alloc::template rebind<PIXELTYPE *>::other LineAllocator;
+#else
+    typedef std::allocator<PIXELTYPE*> LineAllocator;
