Added the session resampler which now should work for 2.0 sessions and
[ardour.git] / SConstruct
index 78de60206bbb9e4839c751e87e56c068919db332..9f7e915b3dc35c20a0d2fc8de1ef144964861da3 100644 (file)
@@ -16,7 +16,7 @@ import SCons.Node.FS
 SConsignFile()
 EnsureSConsVersion(0, 96)
 
-ardour_version = '2.0beta11.1'
+ardour_version = '2.0rc1'
 
 subst_dict = { }
 
@@ -44,6 +44,7 @@ opts.AddOptions(
     BoolOption('UNIVERSAL', 'Compile as universal binary.  Requires that external libraries are already universal.', 0),
     BoolOption('VERSIONED', 'Add revision information to ardour/gtk executable name inside the build directory', 0),
     BoolOption('VST', 'Compile with support for VST', 0),
+    BoolOption('GPROFILE', 'Compile with support for gprofile (Developers only)', 0),
     BoolOption('TRANZPORT', 'Compile with support for Frontier Designs (if libusb is available)', 1)
 )
 
@@ -531,7 +532,10 @@ env = conf.Finish()
 #
 
 opt_flags = []
-debug_flags = [ '-g' ]
+if env['GPROFILE'] == 1:
+    debug_flags = [ '-g', '-pg' ]
+else:
+    debug_flags = [ '-g' ]
 
 # guess at the platform, used to define compiler flags
 
@@ -597,7 +601,7 @@ elif ((re.search ("i[0-9]86", config[config_cpu]) != None) or (re.search ("x86_6
         if env['DIST_TARGET'] != 'i386':
             
             flag_line = os.popen ("cat /proc/cpuinfo | grep '^flags'").read()[:-1]
-            x86_flags = flag_line.split (": ")[1:][0].split (' ')
+            x86_flags = flag_line.split (": ")[1:][0].split ()
             
             if "mmx" in x86_flags:
                 opt_flags.append ("-mmmx")
@@ -661,14 +665,15 @@ opt_flags[:0] = [
     "-fomit-frame-pointer",
     "-ffast-math",
     "-fstrength-reduce",
-    "-fno-strict-aliasing",
     "-pipe"
     ]
 
 if env['DEBUG'] == 1:
     env.Append(CCFLAGS=" ".join (debug_flags))
+    env.Append(LINKFLAGS=" ".join (debug_flags))
 else:
     env.Append(CCFLAGS=" ".join (opt_flags))
+    env.Append(LINKFLAGS=" ".join (opt_flags))
 
 if env['UNIVERSAL'] == 1:
     env.Append(CCFLAGS="-arch i386 -arch ppc")
@@ -723,7 +728,8 @@ prep_libcheck(env, libraries['flac'])
 libraries['flac'].Append(CCFLAGS="-I/usr/local/include", LINKFLAGS="-L/usr/local/lib")
 
 conf = Configure (libraries['flac'])
-conf.CheckLib ('FLAC', 'FLAC__stream_decoder_new', language='CXX')
+if conf.CheckLib ('FLAC', 'FLAC__stream_decoder_new', language='CXX'):
+    conf.env.Append(CCFLAGS='-DHAVE_FLAC')
 libraries['flac'] = conf.Finish ()
 
 # or if that fails...
@@ -1077,7 +1083,7 @@ subst_dict['%REVISION_STRING%'] = ''
 if os.path.exists('.svn'):
     subst_dict['%REVISION_STRING%'] = '.' + fetch_svn_revision ('.') + 'svn'
 
-specbuild = env.SubstInFile ('ardour.spec','ardour.spec.in', SUBST_DICT = subst_dict)
+specbuild = env.SubstInFile ('ardour.spec','ardour.spec.in', SUBST_DICT = subst_dict)
 
 the_revision = env.Command ('frobnicatory_decoy', [], create_stored_revision)
 
@@ -1095,7 +1101,6 @@ env.Distribute (env['DISTTREE'],
                [ 'SConstruct', 'svn_revision.h',
                   'COPYING', 'PACKAGER_README', 'README',
                   'ardour.rc.in',
-                  'ardour.spec',
                   'ardour_system.rc',
                   'tools/config.guess',
                   'icons/icon/ardour_icon_mac_mask.png',