Index: /trunk/config/sys/Darwin-g++.gmk
===================================================================
--- /trunk/config/sys/Darwin-g++.gmk	(revision 1016)
+++ /trunk/config/sys/Darwin-g++.gmk	(revision 1017)
@@ -13,4 +13,5 @@
   CXX       := g++
   CXXFLAGS  := -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
+# CXXFLAGS  += -Wunused-parameter -Winline -Wunreachable-code
   CXXFLAGS  += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
   ifdef G4OPTIMISE
@@ -90,5 +91,5 @@
       QTFLAGS   := -I $(QTHOME)/QtCore.framework/Headers 
       QTFLAGS   += -I $(QTHOME)/QtGui.framework/Headers 
-      QTFLAGS   += -I $(QTHOME)/QtOpenGL.framework/Headers 
+      QTFLAGS   += -I $(QTHOME)/QtOpenGL.framework/Headers
     else
       QTFLAGS   := -I $(QTHOME)/include/Qt -I$(QTHOME)/include
@@ -97,5 +98,5 @@
   ifndef QTLIBPATH
     ifeq ($(QT_VERSION),3)
-      QTLIBPATH   := $(shell test -d $(QTHOME)/lib/qt3/lib && echo "/lib/qt3/lib" || echo "/lib" )
+      QTLIBPATH   := $(shell test -d $(QTHOME)/lib/qt3/lib && echo "$(QTHOME)/lib/qt3/lib" || echo "$(QTHOME)/lib" )
     else
       QTLIBPATH  := -F$(QTHOME)
@@ -104,6 +105,6 @@
   ifndef QTLIBS
     ifeq ($(QT_VERSION),3)
-      QTLIBS   := -L$(QTHOME)$(QTLIBPATH)
-      QT3_MT  := $(shell ls  $(QTHOME)$(QTLIBPATH)/libqt-mt.* 2>/dev/null | wc -l )
+      QTLIBS   := -L$(QTLIBPATH)
+      QT3_MT  := $(shell ls  $(QTLIBPATH)/libqt-mt.* 2>/dev/null | wc -l )
       ifneq ($(QT3_MT),0)
         QTLIBS  += -lqt-mt
@@ -113,5 +114,5 @@
       QTLIBS   += -lqui
     else
-      QTLIBS    :=  -framework QtCore -framework QtGui
+      QTLIBS    := $(QTLIBPATH) -framework QtCore -framework QtGui
     endif
   endif
@@ -121,5 +122,5 @@
         #      GLQTLIBS    := $(QTLIBS)
     else
-      GLQTLIBS    := -F$(QTHOME) -framework QtCore -framework QtGui
+      GLQTLIBS    := $(QTLIBPATH) -framework QtCore -framework QtGui
       GLQTLIBS    += -framework QtOpenGL
     endif
@@ -128,5 +129,5 @@
 
   define build-granular-shared-lib
-    libdir=`(cd $(@D);/bin/pwd)`; \
+    @libdir=`(cd $(@D);/bin/pwd)`; \
      cd $(G4TMPDIR); \
      $(CXX)  -dynamiclib -single_module  -lgcov -undefined dynamic_lookup \
Index: /trunk/config/sys/Linux-g++.gmk
===================================================================
--- /trunk/config/sys/Linux-g++.gmk	(revision 1016)
+++ /trunk/config/sys/Linux-g++.gmk	(revision 1017)
@@ -88,8 +88,22 @@
   ifndef QTFLAGS
     ifeq ($(QT_VERSION),4)
-      QTFLAGS   += -I$(QTHOME)/include
-      QTFLAGS   += -I $(QTHOME)/include/QtCore 
-      QTFLAGS   += -I $(QTHOME)/include/QtGui 
-      QTFLAGS   += -I $(QTHOME)/include/QtOpenGL 
+      QTINCPATH = $(QTHOME)/include
+
+      # If Qt is not located in the STANDARD path, try to find it in some
+      # other places.(Ex: for ubuntu 8.10)
+      QT_ALT1 := $(shell ls  $(QTINCPATH)/qt$(QT_VERSION)/*.h 2>/dev/null | wc -l )
+      QT_ALT2 := $(shell ls  $(QTINCPATH)/qt$(QT_VERSION)/Qt/*.h 2>/dev/null | wc -l )
+      ifneq ($(QT_ALT1),0)
+        QTINCPATH := $(QTINCPATH)/qt$(QT_VERSION)
+      endif
+      ifneq ($(QT_ALT2),0)
+        QTINCPATH := $(QTINCPATH)/qt$(QT_VERSION)/Qt
+      endif
+
+      QTFLAGS   += -I$(QTINCPATH)/include
+      QTFLAGS   += -I$(QTINCPATH)/QtCore 
+      QTFLAGS   += -I$(QTINCPATH)/QtGui 
+      QTFLAGS   += -I$(QTINCPATH)/QtOpenGL 
+
     else
       QTFLAGS := -I$(QTHOME)/include/Qt -I$(QTHOME)/include
Index: /trunk/config/sys/Linux-icc.gmk
===================================================================
--- /trunk/config/sys/Linux-icc.gmk	(revision 1016)
+++ /trunk/config/sys/Linux-icc.gmk	(revision 1017)
@@ -1,4 +1,4 @@
 #
-# ------ GNU/LINUX ------         Intel icc 10.1
+# ------ GNU/LINUX ------         Intel icc 11.0
 #
 ifeq ($(G4SYSTEM),Linux-icc)
@@ -38,5 +38,5 @@
   endif
   ifndef X11LIBS
-    X11LIBS   := -L/usr/X11R6/lib  -lXmu -lXt -lXext -lX11 -lSM -lICE
+    X11LIBS   := -L/usr/X11R6/lib  -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE
   endif
   ifndef XMFLAGS
Index: /trunk/config/sys/WIN32-VC.gmk
===================================================================
--- /trunk/config/sys/WIN32-VC.gmk	(revision 1016)
+++ /trunk/config/sys/WIN32-VC.gmk	(revision 1017)
@@ -14,5 +14,5 @@
   CXXFLAGS += -D_CONSOLE -D_WIN32 -DOS
   CPPFLAGS += -DWIN32 -DXPNET -D_CRT_SECURE_NO_DEPRECATE
-  LDFLAGS  += -FORCE /NODEFAULTLIB:MSVCRT.dll /VERBOSE:lib
+  LDFLAGS  += -FORCE /NODEFAULTLIB:MSVCRT.dll
 
   SHEXT := dll
Index: /trunk/config/sys/WIN32-g++.gmk
===================================================================
--- /trunk/config/sys/WIN32-g++.gmk	(revision 1016)
+++ /trunk/config/sys/WIN32-g++.gmk	(revision 1017)
@@ -42,5 +42,5 @@
   endif
   ifndef X11LIBS
-    X11LIBS   := -L/usr/X11R6/lib  -lXmu -lXt -lXext -lX11 -lSM -lICE
+    X11LIBS   := -L/usr/X11R6/lib  -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE
   endif
   ifndef XMFLAGS
