diff --git a/SConscript b/SConscript
index fcb438d653bee1cebc23c379ea7fe6fede383779..4c3b86e710caa7eba39ffc7a7b425640a81f1aea 100644
--- a/SConscript
+++ b/SConscript
@@ -58,17 +58,21 @@ else:
 
 
 
-# setup libraries needed for linking
-env['BASE_IRDB_LIBS']="IRDB-core", "pqxx", "pq", "BeaEngine_s_d", "EXEIO", "pebliss"
+env['BASE_IRDB_LIBS']="IRDB-core", "pqxx", "pq", "BeaEngine_s_d", "EXEIO"
+
+if sysname != "SunOS":
+	libPEBLISS=SConscript("pebliss/trunk/pe_lib/SConscript", variant_dir='scons_build/libPEBLISS')
+	# setup libraries needed for linking
+	env['BASE_IRDB_LIBS']="IRDB-core", "pqxx", "pq", "BeaEngine_s_d", "EXEIO", "pebliss"
 
 # pebliss requires iconv, which needs to be explicit on cygwin.
 if "CYGWIN" in sysname:
 	# add tuple of 1 item!
 	env['BASE_IRDB_LIBS']=env['BASE_IRDB_LIBS']+("iconv",)
 
-
 Export('env')
-libPEBLISS=SConscript("pebliss/trunk/pe_lib/SConscript", variant_dir='scons_build/libPEBLISS')
+
+
 libEXEIO=SConscript("libEXEIO/SConscript", variant_dir='scons_build/libEXEIO')
 libbea=SConscript("beaengine/SConscript", variant_dir='scons_build/beaengine')
 libMEDSannotation=SConscript("libMEDSannotation/SConscript", variant_dir='scons_build/libMEDSannotation')
diff --git a/SConstruct b/SConstruct
index 01a1765f7585327e4377b9fbe5e872b899e82a62..3aed6cd6ba3fc769c966a980b8e8b68cabd02e10 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2,8 +2,12 @@ import os
 import sys
 
 
+
+(sysname, nodename, release, version, machine)=os.uname()
+
 env=Environment()
 
+
 # default build options
 env.Replace(CFLAGS="-fPIC -w ")
 env.Replace(CXXFLAGS="-fPIC -w ")
@@ -60,11 +64,10 @@ else:
 
 
 # add extra flag for solaris.
-(sysname, nodename, release, version, machine)=os.uname()
 if sysname == "SunOS":
-        env.Append(LINKFLAGS=" -L/opt/csw/lib ")
-        env.Append(CFLAGS=" -I/opt/csw/include ")
-        env.Append(CXXFLAGS=" -I/opt/csw/include ")
+        env.Append(LINKFLAGS=" -L/opt/csw/lib -DSOLARIS  ")
+        env.Append(CFLAGS=" -I/opt/csw/include -DSOLARIS ")
+        env.Append(CXXFLAGS=" -I/opt/csw/include -DSOLARIS  ")
 
 
 Export('env')
diff --git a/libEXEIO/include/exeio_pe.h b/libEXEIO/include/exeio_pe.h
index cc496d6ec10401ee394caa0732d1177f30e649e4..d67967df0c04c82d041db30e6545b03099159789 100644
--- a/libEXEIO/include/exeio_pe.h
+++ b/libEXEIO/include/exeio_pe.h
@@ -1,6 +1,7 @@
 #ifndef EXEIO_PE_H
 #define EXEIO_PE_H
 
+#ifndef SOLARIS
 #include <iostream>
 #include <vector>
 #include <assert.h>
@@ -17,7 +18,8 @@ namespace EXEIO
 	class exeio_pe_section_t : public exeio_section_t
 	{
 		public:
-			exeio_pe_section_t(const pe_bliss::section *the_s, const pe_bliss::pe_base *the_b) : s(the_s),b(the_b) { assert(s); assert(b);}
+			exeio_pe_section_t(const pe_bliss::section *the_s, const pe_bliss::pe_base *the_b) 
+				: s(the_s),b(the_b) { assert(s); assert(b);}
 
 			bool isLoadable() const { return s->readable(); }
 			bool isExecutable() const { return s->executable(); }
@@ -144,5 +146,5 @@ namespace EXEIO
 	
 
 }
-
-#endif
+#endif // solaris
+#endif // exeio_pe_h
diff --git a/libEXEIO/src/exeio_src.cpp b/libEXEIO/src/exeio_src.cpp
index c5a2f5bde2457d2ec747405c6fea1f9debbec493..605c59edf61e8f3b21e8aeb58ec0344becc67d47 100644
--- a/libEXEIO/src/exeio_src.cpp
+++ b/libEXEIO/src/exeio_src.cpp
@@ -8,8 +8,10 @@
 
 
 using namespace EXEIO;
-using namespace pe_bliss;
 using namespace std;
+#ifndef SOLARIS
+using namespace pe_bliss;
+#endif
 
 void exeio::load(char* filename)
 {
@@ -34,10 +36,14 @@ void exeio::load(char* filename)
 	{
 		backend=new exeio_elf_backend_t;
 	}
-	// we assume it's ELF or PE.
-	// we assume it's ELF or PE.
 	else
+#ifndef SOLARIS
+		// we assume it's PE.
 		backend=new exeio_pe_backend_t;
+#else
+		// don't build win support on solaris.
+		assert(0);
+#endif
 
 	backend->load(this, filename);