Index: unix/detect_generic.py
===================================================================
--- unix/detect_generic.py	(révision 495869)
+++ unix/detect_generic.py	(copie de travail)
@@ -4,18 +4,24 @@
 	import os, sys
 	import SCons.Util
 
-	env['BKS_DEBUG']=0
+	#specific parsing of the command line
 	if env['ARGS'].get('debug', 0):
 		env['BKS_DEBUG'] = env['ARGS'].get('debug', 0)
 		env.pprint('CYAN','** Enabling debug for the project **')
-		env['GENCXXFLAGS'] = ['-g']
 		env['GENCCFLAGS'] = ['-g']
 		env['GENLINKFLAGS'] = ['-g']
 	else:
-		env['GENCXXFLAGS'] = ['-O2', '-DNDEBUG', '-DNO_DEBUG']
-		env['GENCCFLAGS'] = ['-O2', '-DNDEBUG', '-DNO_DEBUG']
+		#env['GENCCFLAGS'] = ['-O2', '-DNDEBUG', '-DNO_DEBUG']
+		env['GENCCFLAGS'] = ['-O2', '-DNDEBUG']
 		env['GENLINKFLAGS'] = []
 	
+	#default prefix for the installation
+	if not env.has_key('PREFIX'):
+		env['PREFIX'] = '/usr'
+	
+	#add gcc flags found in the environment to the generic module.
+	#if os.environ.has_key('LIBRARY_PATH'): env['GENLINKFLAGS'] + SCons.Utils.CLVar( os.environ['LIBRARY_PATH'] )
+	
 	if os.environ.has_key('CXXFLAGS'):  env['GENCXXFLAGS']  += SCons.Util.CLVar( os.environ['CXXFLAGS'] )
 	if os.environ.has_key('CFLAGS'): env['GENCCFLAGS'] = SCons.Util.CLVar( os.environ['CFLAGS'] )
 	if os.environ.has_key('LINKFLAGS'): env['GENLINKFLAGS'] += SCons.Util.CLVar( os.environ['LINKFLAGS'] )
@@ -34,8 +40,9 @@
 
 	## Linux settings
 	if sys.platform == 'linux2':
-		env['GENCXXFLAGS'] += ['-D_XOPEN_SOURCE=500', '-D_BSD_SOURCE', '-D_GNU_SOURCE']
+		env['GENCCFLAGS'] += ['-D_GNU_SOURCE']
 
+
 	## FreeBSD settings (contributed by will at freebsd dot org)
 	if os.uname()[0] == "FreeBSD":
 		if os.environ.has_key('PTHREAD_LIBS'):
@@ -60,24 +67,6 @@
 			env.AppendUnique( GENLINKFLAGS = ['-L/usr/local/lib', '-L/usr/X11R6/lib'] )
 			env.AppendUnique( GENCXXFLAGS = ['-I/usr/local/include', '-I/usr/X11R6/include'] )
 
-	# User-specified prefix
-	env['PREFIX']='/usr'
-	if env['ARGS'].has_key('prefix'):
-		env['PREFIX'] = os.path.abspath( env['ARGS'].get('prefix', '') )
-		env.pprint('CYAN','** installation prefix for the project set to:',env['PREFIX'])
-
-	# User-specified include paths
-	env['EXTRAINCLUDES'] = env['ARGS'].get('extraincludes', None)
-	if env['EXTRAINCLUDES']:
-		env['EXTRAINCLUDES'] = env['EXTRAINCLUDES'].split(':')
-		env.pprint('CYAN','** extra include paths for the project set to:',env['EXTRAINCLUDES'])
-
-	# User-specified library search paths
-	env['EXTRALIBS'] = env['ARGS'].get('extralibs', None)
-	if env['EXTRALIBS']:
-		env['EXTRALIBS'] = env['EXTRALIBS'].split(':')
-		env.pprint('CYAN','** extra library search paths for the project set to:',env['EXTRALIBS'])
-
 	libsuffix	= ''
 	if env.has_key('ARGS'): libsuffix=env['ARGS'].get('libsuffix', '')
 	if not libsuffix:
Index: win32/detect_generic.py
===================================================================
--- win32/detect_generic.py	(révision 495869)
+++ win32/detect_generic.py	(copie de travail)
@@ -17,6 +17,8 @@
 	env['BKS_DEBUG']=0
 	env['INCLUDES_LAST'] = []
 	
+	#specific parsing of the command line
+	
 	# (rh) The flags from GENCCFLAGS seems to be added to GENCXXFLAGS, 
 	# so there is no need to duplicate settings in GENCXXGLAGS
 	if env['ARGS'].has_key('debug'):
@@ -26,7 +28,6 @@
 			env['GENCCFLAGS'] = ['-g']
 			env['GENLINKFLAGS'] = ['-g']
 		elif env['CC'] == 'cl':
-#			env['GENCCFLAGS'] = ['-Od','-ZI','-MDd','-GX','-GR']
 			env['GENCCFLAGS'] = ['-Od','-ZI','-MDd']
 			env['GENLINKFLAGS'] = ['/INCREMENTAL:YES', '/DEBUG']
 	else:
@@ -37,6 +38,10 @@
 			env['GENCCFLAGS'] = ['-MD']
 			env['GENLINKFLAGS'] = ['']
 
+	#default prefix for the installation
+	if not env.has_key('PREFIX'):
+		env['PREFIX'] = r'C:\'
+		
 	if env['CC'] == 'cl':
 		# avoid some compiler warnings...
 		env.AppendUnique( GENCCFLAGS = ['-wd4619','-wd4820','-DWIN32_LEAN_AND_MEAN'] )
@@ -50,24 +55,9 @@
 	# no colors if user does not want them
 	if os.environ.has_key('NOCOLORS'): env['NOCOLORS']=1
 
-	# User-specified prefix
-	env['PREFIX']='C:\\Qt\\'
-	if env['ARGS'].has_key('prefix'):
-		env['PREFIX'] = os.path.abspath( env['ARGS'].get('prefix', '') )
-		env.pprint('CYAN','** installation prefix for the project set to:',env['PREFIX'])
-
-	# User-specified include paths
-	if env['ARGS'].has_key('extraincludes'):
-		env['EXTRAINCLUDES'] = env['ARGS'].get('extraincludes','').split(';')
-		env.pprint('CYAN','** extra include paths for the project set to:',env['EXTRAINCLUDES'])
-
-	# User-specified library search paths
-	if env['ARGS'].has_key('extralibs'):
-		env['EXTRALIBS'] = env['ARGS'].get('extralibs','').split(';')
-		env.pprint('CYAN','** extra library search paths for the project set to:',env['EXTRALIBS'])
-
 	if env['CC'] == 'cl':
-		env.AppendUnique(CPPPATH = os.environ['INCLUDE'].split(';'))
+		#env.AppendUnique(CPPPATH = os.environ['INCLUDE'].split(';'))
+		env.AppendUnique(CPPPATH = os.environ['INCLUDEVC'].split(';'))
 		env['GENCCFLAGS']   += ['/Iwin\\include','/Iwin\\include\\msvc']
 # TODO (rh) don't know required cl flags, don't know how to set not in win dir 
 #		env['GENLINKFLAGS'] += ['']
Index: generic.py
===================================================================
--- generic.py	(révision 495869)
+++ generic.py	(copie de travail)
@@ -815,7 +815,27 @@
 	# Configure the environment if needed
 	if not env['HELP'] and (env['_CONFIGURE_'] or not env.has_key('GENERIC_ISCONFIGURED')):
 		env['_CONFIGURE_']=1
+	
+		#parsing of the command line
+		
+		#User-specified prefix
+		if env['ARGS'].has_key('prefix'):
+			env['PREFIX'] = os.path.abspath( env['ARGS'].get('prefix', '') )
+			env.pprint('CYAN','** installation prefix for the project set to:',env['PREFIX'])
 
+		# User-specified include paths
+		env['EXTRAINCLUDES'] = env['ARGS'].get('extraincludes', None)
+		if env['EXTRAINCLUDES']:
+			env['EXTRAINCLUDES'] = env['EXTRAINCLUDES'].split(os.pathsep)
+			env.pprint('CYAN','** extra include paths for the project set to:',env['EXTRAINCLUDES'])
+
+		# User-specified library search paths
+		env['EXTRALIBS'] = env['ARGS'].get('extralibs', None)
+		if env['EXTRALIBS']:
+			env['EXTRALIBS'] = env['EXTRALIBS'].split(os.pathsep)
+			env.pprint('CYAN','** extra library search paths for the project set to:',env['EXTRALIBS'])
+		
+		#import the platform specific part
 		import sys
 		if env['WINDOWS']:
 			sys.path.append('bksys'+os.sep+'win32')
@@ -1156,18 +1176,4 @@
 	if env.has_key('EXTRAINCLUDES'): env.AppendUnique( CPPPATH   = env['EXTRAINCLUDES'])
 	if env.has_key('EXTRALIBS'):     env.AppendUnique( LIBPATH   = env['EXTRALIBS'])
 
-	if env.has_key('BKS_DEBUG'):
-		if (env['BKS_DEBUG'] == "full"):
-			env.AppendUnique(CXXFLAGS = ['-DDEBUG'])
-			if env['WINDOWS'] and env['COMPILERTOOL'] == 'msvc':
-				env.AppendUnique(CXXFLAGS = ['-Od','-W3'])
-			else:
-				env.AppendUnique(CXXFLAGS = ['-g3', '-Wall'])
-		elif (env['BKS_DEBUG'] == "trace"): # i cannot remember who wanted this (TODO ita)
-			env.AppendUnique(
-			        LINKFLAGS=env.Split("-lmrwlog4cxxconfiguration -lmrwautofunctiontracelog4cxx -finstrument-functions"),
-			        CXXFLAGS=env.Split("-DDEBUG -Wall -finstrument-functions -g3 -O0"))
-		else:
-			env.AppendUnique(CXXFLAGS = ['-DDEBUG', '-g', '-Wall'])
-
 	env.Export('env')
