--- ./SConstruct.orig	Tue Aug 22 23:20:52 2006
+++ ./SConstruct	Sun Apr 29 18:13:40 2007
@@ -53,9 +53,6 @@
 options.Add('with_log4cpp', 'Root directory of Log4cpp installation')
 options.Add('with_log4cpp_include', 'Specify exact include dir for Log4cpp headers')
 options.Add('with_log4cpp_libdir', 'Specify exact library dir for Log4cpp library')
-options.Add('with_fmod', 'Root directory of FMOD installation')
-options.Add('with_fmod_include', 'Specify exact include dir for FMOD headers')
-options.Add('with_fmod_libdir', 'Specify exact library dir for FMOD library')
 options.Add('with_graphviz', 'Root directory of GraphViz installation')
 options.Add('with_graphviz_include', 'Specify exact include dir for GraphViz headers')
 options.Add('with_graphviz_libdir', 'Specify exact library dir for GraphViz library')
@@ -66,6 +63,10 @@
     options.Add('with_zlib', 'Root directory of zlib installation')
     options.Add('with_zlib_include', 'Specify exact include dir for zlib headers')
     options.Add('with_zlib_libdir', 'Specify exact library dir for zlib library')
+options.Add('CXX', 'C++ compiler')
+options.Add('CCFLAGS', 'C compiler flags', Split(''))
+options.Add('CPPPATH', 'Compiler include path', Split(''))
+options.Add('LIBPATH', 'Linker library path', Split(''))
 
 ##################################################
 # build vars                                     #
@@ -105,6 +106,10 @@
 
 options.Update(env)
 
+env['CCFLAGS'] = Split(env['CCFLAGS'])
+env['CPPPATH'] = Split(env['CPPPATH'])
+env['LIBPATH'] = Split(env['LIBPATH'])
+
 if env.has_key('use_distcc') and env['use_distcc']:
     env['CC'] = 'distcc %s' % env['CC']
     env['CXX'] = 'distcc %s' % env['CXX']
@@ -219,8 +224,8 @@
             if str(Platform()) == 'posix':
                 if env['multithreaded']:
                     if conf.CheckCHeader('pthread.h') and conf.CheckLib('pthread', 'pthread_create', autoadd = 0):
-                        env.AppendUnique(CCFLAGS = ' -pthread')
-                        env.AppendUnique(LINKFLAGS = ' -pthread')
+                        env.AppendUnique(CCFLAGS = Split('-pthread'))
+                        env.AppendUnique(LINKFLAGS = '-pthread')
                     else:
                         Exit(1)
 
@@ -308,25 +313,6 @@
         # End of GG requirements #
         ##########################
 
-        # FMOD
-        AppendPackagePaths('fmod', env)
-        found_it_with_pkg_config = False
-        if pkg_config:
-            if conf.CheckPkg('fmod', fmod_version):
-                env.ParseConfig('pkg-config --cflags --libs fmod')
-                found_it_with_pkg_config = True
-        if not found_it_with_pkg_config:
-            version_regex = re.compile(r'FMOD_VERSION\s*(\d+\.\d+)', re.DOTALL)
-            if not conf.CheckVersionHeader('fmod', 'fmod.h', version_regex, fmod_version, True):
-                Exit(1)
-        if not conf.CheckCHeader('fmod.h'):
-            Exit(1)
-        if str(Platform()) != 'win32':
-            if not conf.CheckLib('fmod-' + fmod_version, 'FSOUND_GetVersion', header = '#include <fmod.h>'):
-                Exit(1)
-        else:
-            env.AppendUnique(LIBS = [fmod_win32_lib_name])
-
         # GraphViz
         AppendPackagePaths('graphviz', env)
         if pkg_config:
@@ -507,6 +493,7 @@
 # define human objects
 env['target_define'] = 'FREEORION_BUILD_HUMAN'
 human_objects = SConscript(os.path.normpath('SConscript'))
+env.Append(LIBS = ['vorbisfile', 'alut'])
 if str(Platform()) == 'win32':
     rc_file = open('win32_resources.rc', 'w')
     rc_file.write('IDI_ICON ICON "client/human/HumanClient.ico"')
