- fixed build issue on Solaris (wrong compilation flags for multi-threading)
- fixed build issue on Linux redhat 3: python does not has tarfile module
diff --git a/doc/sconscript b/doc/sconscript
index 62b481e..7b78a21 100644
--- a/doc/sconscript
+++ b/doc/sconscript
@@ -31,11 +31,12 @@
                              target = os.path.join( html_doc_path, 'index.html' ) )
     alias_doc_cmd = env.Alias('doc', doc_nodes )
     env.Alias('doc', env.Install( html_doc_path, '#README.txt' ) )
-    targz_path = os.path.join( env['DIST_DIR'], '%s.tar.gz' % html_dir )
-    zip_doc_cmd = env.TarGz( targz_path, [env.Dir(html_doc_path)],
-                             TARGZ_BASEDIR = env['ROOTBUILD_DIR'] )
-    env.Depends( zip_doc_cmd, alias_doc_cmd )
-    env.Alias( 'doc-dist', zip_doc_cmd )
+    if 'TarGz' in env['BUILDERS']:
+		targz_path = os.path.join( env['DIST_DIR'], '%s.tar.gz' % html_dir )
+		zip_doc_cmd = env.TarGz( targz_path, [env.Dir(html_doc_path)],
+								 TARGZ_BASEDIR = env['ROOTBUILD_DIR'] )
+		env.Depends( zip_doc_cmd, alias_doc_cmd )
+		env.Alias( 'doc-dist', zip_doc_cmd )
 ##    
 ##    doxyfile = env.SubstInFile( '#doc/doxyfile', 'doxyfile.in',
 ##                                SUBST_DICT = {