--- ./SConstruct.orig 2010-07-22 01:11:47.000000000 -0400 +++ ./SConstruct 2010-07-22 01:26:30.000000000 -0400 @@ -36,7 +36,7 @@ ('PROGRAM_NAME', 'Set program name (default is "Ardour")', 'Ardour'), ('DIST_LIBDIR', 'Explicitly set library dir. If not set, Fedora-style defaults are used (typically lib or lib64)', ''), PathVariable('DESTDIR', 'Set the intermediate install "prefix"', '/'), - PathVariable('PREFIX', 'Set the install "prefix"', '/usr/local'), + PathVariable('PREFIX', 'Set the install "prefix"', '/usr/local', PathOption.PathIsDirCreate), EnumVariable('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'panther', 'leopard', 'none' ), ignorecase=2), BoolVariable('AUDIOUNITS', 'Compile with Apple\'s AudioUnit library. (experimental)', 0), BoolVariable('COREAUDIO', 'Compile with Apple\'s CoreAudio library', 0), @@ -678,9 +678,9 @@ # opt_flags.extend ([ "-mcpu=7450", "-mcpu=7450" ]) -elif ((re.search ("i[0-9]86", config[config_cpu]) != None) or (re.search ("x86_64", config[config_cpu]) != None)) and env['DIST_TARGET'] != 'none': - - build_host_supports_sse = 0 +elif ((re.search ("i[0-9]86", env['DIST_TARGET']) != None) or (re.search ("x86_64", env['DIST_TARGET']) != None)): + + build_host_supports_sse = 1 # # ARCH_X86 means anything in the x86 family from i386 to x86_64 @@ -739,15 +739,7 @@ print "\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be anerror, especially if you are a package maintainer)" # end optimization section -# handle x86/x86_64 libdir properly - -if env['DIST_LIBDIR'] == '': - if env['DIST_TARGET'] == 'x86_64': - env['LIBDIR']='lib64' - else: - env['LIBDIR']='lib' -else: - env['LIBDIR'] = env['DIST_LIBDIR'] +env['LIBDIR'] = 'lib' # # no VST on x86_64 @@ -796,13 +788,7 @@ # prepend boiler plate optimization flags # -opt_flags[:0] = [ - "-O3", - "-fomit-frame-pointer", - "-ffast-math", - "-fstrength-reduce", - "-pipe" - ] +opt_flags[:0] = [ "%%CFLAGS%%" ]; if env['DEBUG'] == 1: env.Append(CCFLAGS=" ".join (debug_flags)) @@ -902,6 +888,7 @@ libraries['usb'] = LibraryInfo () prep_libcheck(env, libraries['usb']) +libraries['usb'].Append(CCFLAGS="-I/usr/local/include", LINKFLAGS="-L/usr/local/lib") conf = Configure (libraries['usb']) if conf.CheckLib ('usb', 'usb_interrupt_write'): @@ -954,6 +941,8 @@ if env['LIBLO']: libraries['lo'] = LibraryInfo () prep_libcheck(env, libraries['lo']) + libraries['lo'].Append(CCFLAGS="-I/usr/local/include", LINKFLAGS="-L/usr/local/lib") + conf = Configure (libraries['lo']) if conf.CheckLib ('lo', 'lo_server_new') == False: @@ -967,6 +956,7 @@ libraries['dmalloc'] = LibraryInfo () prep_libcheck(env, libraries['dmalloc']) +libraries['dmalloc'].Append(CCFLAGS="-I/usr/local/include", LINKFLAGS="-L/usr/local/lib") # # look for the threaded version @@ -1024,8 +1014,10 @@ subst_dict['%MIDITAG%'] = "ardour" subst_dict['%MIDITYPE%'] = "coremidi" else: - print "It appears you don't have the required MIDI libraries installed. For Linux this means you are missing the development package for ALSA libraries." - sys.exit (1) + libraries['sysmidi'] = LibraryInfo () + env['SYSMIDI'] = 'none' + subst_dict['%MIDITAG%'] = "none" + subst_dict['%MIDITYPE%'] = "none" env = conf.Finish() @@ -1076,7 +1068,7 @@ # libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas') libraries['soundtouch'] = LibraryInfo() - libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0') + libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.4') # Comment the previous line and uncomment this for old versions of Debian: #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch') @@ -1301,8 +1293,8 @@ subst_dict['%JACK_INPUT%'] = "coreaudio:Built-in Audio:in" subst_dict['%JACK_OUTPUT%'] = "coreaudio:Built-in Audio:out" else: - subst_dict['%JACK_INPUT%'] = "alsa_pcm:playback_" - subst_dict['%JACK_OUTPUT%'] = "alsa_pcm:capture_" + subst_dict['%JACK_INPUT%'] = "oss:playback_" + subst_dict['%JACK_OUTPUT%'] = "oss:capture_" # posix_memalign available if not conf.CheckFunc('posix_memalign'):