11 # Variables for 'waf dist'
30 'libs/clearlooks-newer',
43 def fetch_svn_revision (path
):
44 cmd
= "LANG= svn info " + path
+ " | awk '/^Revision:/ { print $2}'"
45 return commands
.getoutput(cmd
)
47 def fetch_gcc_version ():
48 cmd
= "LANG= gcc --version"
49 output
= commands
.getoutput(cmd
).splitlines()
50 version
= output
[0].split(' ')[2].split('.')
53 def fetch_git_revision (path
):
54 cmd
= "LANG= git log --abbrev HEAD^..HEAD " + path
55 output
= commands
.getoutput(cmd
).splitlines()
56 rev
= output
[0].replace ("commit", "git")[0:10]
59 if "git-svn-id" in line
:
60 line
= line
.split('@')[1].split(' ')
66 def fetch_bzr_revision (path
):
67 cmd
= subprocess
.Popen("LANG= bzr log -l 1 " + path
, stdout
=subprocess
.PIPE
, shell
=True)
68 out
= cmd
.communicate()[0]
69 svn
= re
.search('^svn revno: [0-9]*', out
, re
.MULTILINE
)
72 return string
.lstrip(str, chars
)
74 def create_stored_revision():
76 if os
.path
.exists('.svn'):
77 rev
= fetch_svn_revision('.');
78 elif os
.path
.exists('.git'):
79 rev
= fetch_git_revision('.');
80 elif os
.path
.exists('.bzr'):
81 rev
= fetch_bzr_revision('.');
82 print "Revision: " + rev
;
83 elif os
.path
.exists('libs/ardour/svn_revision.cc'):
84 print "Using packaged svn revision"
87 print "Missing libs/ardour/svn_revision.cc. Blame the packager."
91 text
= '#include "ardour/svn_revision.h"\n'
92 text
+= 'namespace ARDOUR { const char* svn_revision = \"' + rev
+ '\"; }\n'
93 print 'Writing svn revision info to libs/ardour/svn_revision.cc'
94 o
= file('libs/ardour/svn_revision.cc', 'w')
98 print 'Could not open libs/ardour/svn_revision.cc for writing\n'
101 def set_compiler_flags (conf
,opt
):
103 # Compiler flags and other system-dependent stuff
106 build_host_supports_sse
= False
107 optimization_flags
= []
109 debug_flags
= [ '-pg' ]
111 debug_flags
= [ ] # waf adds -O0 -g itself. thanks waf!
113 # guess at the platform, used to define compiler flags
115 config_guess
= os
.popen("tools/config.guess").read()[:-1]
121 config
= config_guess
.split ("-")
123 print "system triple: " + config_guess
126 if opt
.dist_target
== 'auto':
127 if config
[config_arch
] == 'apple':
128 # The [.] matches to the dot after the major version, "." would match any character
129 if re
.search ("darwin[0-7][.]", config
[config_kernel
]) != None:
130 conf
.define ('build_target', 'panther')
131 elif re
.search ("darwin8[.]", config
[config_kernel
]) != None:
132 conf
.define ('build_target', 'tiger')
134 conf
.define ('build_target', 'leopard')
136 if re
.search ("x86_64", config
[config_cpu
]) != None:
137 conf
.define ('build_target', 'x86_64')
138 elif re
.search("i[0-5]86", config
[config_cpu
]) != None:
139 conf
.define ('build_target', 'i386')
140 elif re
.search("powerpc", config
[config_cpu
]) != None:
141 conf
.define ('build_target', 'powerpc')
143 conf
.define ('build_target', 'i686')
145 conf
.define ('build_target', opt
.dist_target
)
147 if config
[config_cpu
] == 'powerpc' and conf
.env
['build_target'] != 'none':
149 # Apple/PowerPC optimization options
151 # -mcpu=7450 does not reliably work with gcc 3.*
153 if opt
.dist_target
== 'panther' or opt
.dist_target
== 'tiger':
154 if config
[config_arch
] == 'apple':
155 # optimization_flags.extend ([ "-mcpu=7450", "-faltivec"])
156 # to support g3s but still have some optimization for above
157 optimization_flags
.extend ([ "-mcpu=G3", "-mtune=7450"])
159 optimization_flags
.extend ([ "-mcpu=7400", "-maltivec", "-mabi=altivec"])
161 optimization_flags
.extend([ "-mcpu=750", "-mmultiple" ])
162 optimization_flags
.extend (["-mhard-float", "-mpowerpc-gfxopt"])
163 optimization_flags
.extend (["-Os"])
165 elif ((re
.search ("i[0-9]86", config
[config_cpu
]) != None) or (re
.search ("x86_64", config
[config_cpu
]) != None)) and conf
.env
['build_target'] != 'none':
169 # ARCH_X86 means anything in the x86 family from i386 to x86_64
170 # USE_X86_64_ASM is used to distingush 32 and 64 bit assembler
173 if (re
.search ("(i[0-9]86|x86_64)", config
[config_cpu
]) != None):
174 debug_flags
.append ("-DARCH_X86")
175 optimization_flags
.append ("-DARCH_X86")
177 if config
[config_kernel
] == 'linux' :
180 # determine processor flags via /proc/cpuinfo
183 if conf
.env
['build_target'] != 'i386':
185 flag_line
= os
.popen ("cat /proc/cpuinfo | grep '^flags'").read()[:-1]
186 x86_flags
= flag_line
.split (": ")[1:][0].split ()
188 if "mmx" in x86_flags
:
189 optimization_flags
.append ("-mmmx")
190 if "sse" in x86_flags
:
191 build_host_supports_sse
= True
192 if "3dnow" in x86_flags
:
193 optimization_flags
.append ("-m3dnow")
195 if config
[config_cpu
] == "i586":
196 optimization_flags
.append ("-march=i586")
197 elif config
[config_cpu
] == "i686":
198 optimization_flags
.append ("-march=i686")
200 if ((conf
.env
['build_target'] == 'i686') or (conf
.env
['build_target'] == 'x86_64')) and build_host_supports_sse
:
201 optimization_flags
.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"])
202 debug_flags
.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"])
204 # end of processor-specific section
206 # optimization section
207 if conf
.env
['FPU_OPTIMIZATION']:
208 if conf
.env
['build_target'] == 'tiger' or conf
.env
['build_target'] == 'leopard':
209 optimization_flags
.append ("-DBUILD_VECLIB_OPTIMIZATIONS");
210 debug_flags
.append ("-DBUILD_VECLIB_OPTIMIZATIONS");
211 conf
.env
.append_value('LINKFLAGS', "-framework Accelerate")
212 elif conf
.env
['build_target'] == 'i686' or conf
.env
['build_target'] == 'x86_64':
213 optimization_flags
.append ("-DBUILD_SSE_OPTIMIZATIONS")
214 debug_flags
.append ("-DBUILD_SSE_OPTIMIZATIONS")
215 elif conf
.env
['build_target'] == 'x86_64':
216 optimization_flags
.append ("-DUSE_X86_64_ASM")
217 debug_flags
.append ("-DUSE_X86_64_ASM")
218 if not build_host_supports_sse
:
219 print "\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)"
221 # check this even if we aren't using FPU optimization
222 if conf
.check_cc(function_name
='posix_memalign', header_name
='stdlib.h', ccflags
='-D_XOPEN_SOURCE=600') == False:
223 optimization_flags
.append("-DNO_POSIX_MEMALIGN")
225 # end optimization section
231 if conf
.env
['build_target'] == 'x86_64' and opt
.vst
:
232 print "\n\n=================================================="
233 print "You cannot use VST plugins with a 64 bit host. Please run waf with --vst=0"
234 print "\nIt is theoretically possible to build a 32 bit host on a 64 bit system."
235 print "However, this is tricky and not recommended for beginners."
239 # a single way to test if we're on OS X
242 if conf
.env
['build_target'] in ['panther', 'tiger', 'leopard' ]:
243 conf
.define ('IS_OSX', 1)
244 # force tiger or later, to avoid issues on PPC which defaults
245 # back to 10.1 if we don't tell it otherwise.
246 conf
.env
.append_value('CCFLAGS', "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040")
249 conf
.define ('IS_OSX', 0)
252 # save off guessed arch element in an env
254 conf
.define ('CONFIG_ARCH', config
[config_arch
])
257 # ARCH="..." overrides all
261 optimization_flags
= opt
.arch
.split()
264 # prepend boiler plate optimization flags that work on all architectures
267 optimization_flags
[:0] = [
269 "-fomit-frame-pointer",
276 conf
.env
.append_value('CCFLAGS', debug_flags
)
277 conf
.env
.append_value('CXXFLAGS', debug_flags
)
278 conf
.env
.append_value('LINKFLAGS', debug_flags
)
280 conf
.env
.append_value('CCFLAGS', optimization_flags
)
281 conf
.env
.append_value('CXXFLAGS', optimization_flags
)
282 conf
.env
.append_value('LINKFLAGS', optimization_flags
)
285 conf
.env
.append_value('CXXFLAGS', "-D_GLIBCXX_DEBUG")
288 conf
.env
.append_value('CCFLAGS', "-arch i386 -arch ppc")
289 conf
.env
.append_value('CXXFLAGS', "-arch i386 -arch ppc")
290 conf
.env
.append_value('LINKFLAGS', "-arch i386 -arch ppc")
296 conf
.env
.append_value('CCFLAGS', "-Wall")
297 conf
.env
.append_value('CXXFLAGS', [ '-Wall', '-Woverloaded-virtual'])
300 flags
= [ '-Wextra' ]
301 conf
.env
.append_value('CCFLAGS', flags
)
302 conf
.env
.append_value('CXXFLAGS', flags
)
309 conf
.env
.append_value('CCFLAGS', [ '-D_LARGEFILE64_SOURCE', '-D_LARGEFILE_SOURCE' ])
310 conf
.env
.append_value('CCFLAGS', [ '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64' ])
311 conf
.env
.append_value('CXXFLAGS', [ '-D_LARGEFILE64_SOURCE', '-D_LARGEFILE_SOURCE' ])
312 conf
.env
.append_value('CXXFLAGS', [ '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64' ])
314 conf
.env
.append_value('CXXFLAGS', '-DENABLE_NLS')
315 conf
.env
.append_value('CCFLAGS', '-DENABLE_NLS')
318 #----------------------------------------------------------------
322 def set_options(opt
):
323 autowaf
.set_options(opt
)
324 opt
.add_option('--program-name', type='string', action
='store', default
='Ardour', dest
='program_name',
325 help='The user-visible name of the program being built')
326 opt
.add_option('--arch', type='string', action
='store', dest
='arch',
327 help='Architecture-specific compiler flags')
328 opt
.add_option('--boost-sp-debug', action
='store_true', default
=False, dest
='boost_sp_debug',
329 help='Compile with Boost shared pointer debugging')
330 opt
.add_option('--audiounits', action
='store_true', default
=False, dest
='audiounits',
331 help='Compile with Apple\'s AudioUnit library')
332 opt
.add_option('--coreaudio', action
='store_true', default
=False, dest
='coreaudio',
333 help='Compile with Apple\'s CoreAudio library')
334 opt
.add_option('--dist-target', type='string', default
='auto', dest
='dist_target',
335 help='Specify the target for cross-compiling [auto,none,x86,i386,i686,x86_64,powerpc,tiger,leopard]')
336 opt
.add_option('--extra-warn', action
='store_true', default
=False, dest
='extra_warn',
337 help='Build with even more compiler warning flags')
338 opt
.add_option('--fpu-optimization', action
='store_true', default
=True, dest
='fpu_optimization',
339 help='Build runtime checked assembler code (default)')
340 opt
.add_option('--no-fpu-optimization', action
='store_false', dest
='fpu_optimization')
341 opt
.add_option('--freedesktop', action
='store_true', default
=False, dest
='freedesktop',
342 help='Install MIME type, icons and .desktop file as per freedesktop.org standards')
343 opt
.add_option('--freesound', action
='store_true', default
=False, dest
='freesound',
344 help='Include Freesound database lookup')
345 opt
.add_option('--gprofile', action
='store_true', default
=False, dest
='gprofile',
346 help='Compile for use with gprofile')
347 opt
.add_option('--gtkosx', action
='store_true', default
=False, dest
='gtkosx',
348 help='Compile for use with GTK-OSX, not GTK-X11')
349 opt
.add_option('--lv2', action
='store_true', default
=False, dest
='lv2',
350 help='Compile with support for LV2 (if slv2 is available)')
351 opt
.add_option('--nls', action
='store_true', default
=True, dest
='nls',
352 help='Enable i18n (native language support) (default)')
353 opt
.add_option('--no-nls', action
='store_false', dest
='nls')
354 opt
.add_option('--phone-home', action
='store_false', default
=True, dest
='phone_home')
355 opt
.add_option('--stl-debug', action
='store_true', default
=False, dest
='stl_debug',
356 help='Build with debugging for the STL')
357 opt
.add_option('--test', action
='store_true', default
=False, dest
='build_tests',
358 help="Build unit tests")
359 opt
.add_option('--tranzport', action
='store_true', default
=False, dest
='tranzport',
360 help='Compile with support for Frontier Designs Tranzport (if libusb is available)')
361 opt
.add_option('--universal', action
='store_true', default
=False, dest
='universal',
362 help='Compile as universal binary (requires that external libraries are universal)')
363 opt
.add_option('--versioned', action
='store_true', default
=False, dest
='versioned',
364 help='Add revision information to executable name inside the build directory')
365 opt
.add_option('--vst', action
='store_true', default
=False, dest
='vst',
366 help='Compile with support for VST')
367 opt
.add_option('--wiimote', action
='store_true', default
=False, dest
='wiimote',
368 help='Build the wiimote control surface')
369 opt
.add_option('--windows-key', type='string', action
='store', dest
='windows_key', default
='Mod4><Super',
370 help='X Modifier(s) (Mod1,Mod2, etc) for the Windows key (X11 builds only). ' +
371 'Multiple modifiers must be separated by \'><\'')
376 def sub_config_and_use(conf
, name
, has_objects
= True):
377 conf
.sub_config(name
)
378 autowaf
.set_local_lib(conf
, name
, has_objects
)
381 create_stored_revision()
382 conf
.env
['VERSION'] = VERSION
383 autowaf
.set_recursive()
384 autowaf
.configure(conf
)
386 gcc_versions
= fetch_gcc_version()
387 if Options
.options
.debug
and gcc_versions
[0] == '4' and gcc_versions
[1] > '4':
388 print 'Version 4.5 of gcc is not ready for use when compiling Ardour with optimization.'
389 print 'Please use a different version or re-configure with --debug'
392 if sys
.platform
== 'darwin':
394 # Define OSX as a uselib to use when compiling
395 # on Darwin to add all applicable flags at once
397 conf
.env
.append_value('CXXFLAGS_OSX', "-mmacosx-version-min=10.4")
398 conf
.env
.append_value('CCFLAGS_OSX', "-mmacosx-version-min=10.4")
399 conf
.env
.append_value('CXXFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
400 conf
.env
.append_value('CCFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
401 conf
.env
.append_value('LINKFLAGS_OSX', "-mmacosx-version-min=10.4")
402 conf
.env
.append_value('LINKFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
404 conf
.env
.append_value('LINKFLAGS_OSX', "-sysroot /Developer/SDKs/MacOSX10.4u.sdk")
405 conf
.env
.append_value('LINKFLAGS_OSX', "-F/System/Library/Frameworks")
407 conf
.env
.append_value('CXXFLAGS_OSX', "-msse")
408 conf
.env
.append_value('CCFLAGS_OSX', "-msse")
409 conf
.env
.append_value('CXXFLAGS_OSX', "-msse2")
410 conf
.env
.append_value('CCFLAGS_OSX', "-msse2")
412 # TODO: The previous sse flags NEED to be based
413 # off processor type. Need to add in a check
417 conf
.env
.append_value('CPPPATH_OSX', "/System/Library/Frameworks/")
418 conf
.env
.append_value('CPPPATH_OSX', "/usr/include/")
419 conf
.env
.append_value('CPPPATH_OSX', "/usr/include/c++/4.0.0")
420 conf
.env
.append_value('CPPPATH_OSX', "/usr/include/c++/4.0.0/i686-apple-darwin8/")
422 # TODO: Fix the above include path, it needs to be
423 # defined based off what is read in the configuration
424 # stage about the machine(PPC, X86, X86_64, etc.)
426 conf
.env
.append_value('CPPPATH_OSX', "/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/")
428 # TODO: Likewise this needs to be defined not only
429 # based off the machine characteristics, but also
430 # based off the version of GCC being used.
433 conf
.env
.append_value('FRAMEWORK_OSX', ['CoreFoundation'])
435 conf
.env
.append_value('LINKFLAGS_OSX', ['-undefined', 'suppress'])
436 conf
.env
.append_value('LINKFLAGS_OSX', "-flat_namespace")
438 # The previous 2 flags avoid circular dependencies
439 # between libardour and libardour_cp on OS X.
440 # ld reported -undefined suppress as an unknown option
441 # in one of the tests ran, removing it for the moment
443 conf
.env
.append_value('CXXFLAGS_OSX', "-F/System/Library/Frameworks")
444 conf
.env
.append_value('CCFLAGS_OSX', "-F/System/Library/Frameworks")
446 # GTKOSX only builds on darwin anyways
447 if Options
.options
.gtkosx
:
449 # Define Include Paths for GTKOSX
451 conf
.env
.append_value('CXXFLAGS_GTKOSX', '-DTOP_MENUBAR')
452 conf
.env
.append_value('CXXFLAGS_GTKOSX', '-DGTKOSX')
453 conf
.env
.append_value('LINKFLAGS_GTKOSX', "-framework AppKit")
454 conf
.env
.append_value('LINKFLAGS_GTKOSX', "-Xlinker -headerpad")
455 conf
.env
.append_value('LINKFLAGS_GTKOSX', "-Xlinker 2048")
456 conf
.env
.append_value('CPPPATH_GTKOSX', "/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/")
458 if Options
.options
.coreaudio
:
459 conf
.check_cc (header_name
= '/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h',
460 define_name
= 'HAVE_COREAUDIO', linkflags
= ['-framework CoreAudio'],
461 uselib_store
="COREAUDIO")
462 conf
.check_cxx (header_name
= '/System/Library/Frameworks/AudioToolbox.framework/Headers/ExtendedAudioFile.h',
463 linkflags
= [ '-framework AudioToolbox' ], uselib_store
="COREAUDIO")
464 conf
.check_cc (header_name
= '/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h',
465 linkflags
= ['-framework CoreServices'], uselib_store
="COREAUDIO")
467 if Options
.options
.audiounits
:
468 #conf.env.append_value('CXXFLAGS_AUDIOUNIT', "-DHAVE_AUDIOUNITS")
469 conf
.env
.append_value('FRAMEWORK_AUDIOUNIT', ['AudioToolbox'])
470 conf
.env
.append_value('FRAMEWORK_AUDIOUNIT', ['CoreServices'])
471 conf
.check_cc (header_name
= '/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.h',
472 define_name
= 'HAVE_AUDIOUNITS', linkflags
= [ '-framework AudioUnit' ],
473 uselib_store
="AUDIOUNIT")
475 if Options
.options
.boost_sp_debug
:
476 conf
.env
.append_value('CXXFLAGS', '-DBOOST_SP_ENABLE_DEBUG_HOOKS')
478 autowaf
.check_header(conf
, 'boost/signals2.hpp', mandatory
= True)
480 autowaf
.check_header(conf
, 'jack/session.h', define
="JACK_SESSION")
482 conf
.check_cc(fragment
= "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
485 msg
= 'Checking for boost library >= 1.39',
487 errmsg
= 'too old\nPlease install boost version 1.39 or higher.')
489 autowaf
.check_pkg(conf
, 'cppunit', uselib_store
='CPPUNIT', atleast_version
='1.12.0', mandatory
=False)
490 autowaf
.check_pkg(conf
, 'glib-2.0', uselib_store
='GLIB', atleast_version
='2.2')
491 autowaf
.check_pkg(conf
, 'gthread-2.0', uselib_store
='GTHREAD', atleast_version
='2.2')
492 autowaf
.check_pkg(conf
, 'glibmm-2.4', uselib_store
='GLIBMM', atleast_version
='2.14.0')
493 if sys
.platform
== 'darwin':
494 sub_config_and_use(conf
, 'libs/appleutility')
496 sub_config_and_use(conf
, i
)
498 # Fix utterly braindead FLAC include path to not smash assert.h
499 conf
.env
['CPPPATH_FLAC'] = []
501 conf
.check_cc(function_name
='dlopen', header_name
='dlfcn.h', linkflags
='-ldl', uselib_store
='DL')
502 conf
.check_cc(function_name
='curl_global_init', header_name
='curl/curl.h', linkflags
='-lcurl', uselib_store
='CURL')
504 # Tell everyone that this is a waf build
506 conf
.env
.append_value('CCFLAGS', '-DWAF_BUILD')
507 conf
.env
.append_value('CXXFLAGS', '-DWAF_BUILD')
509 autowaf
.print_summary(conf
)
511 # debug builds should not call home
513 opts
= Options
.options
515 opts
.phone_home
= False;
517 autowaf
.display_header('Ardour Configuration')
518 autowaf
.display_msg(conf
, 'Build Target', conf
.env
['build_target'])
519 autowaf
.display_msg(conf
, 'Architecture flags', opts
.arch
)
520 autowaf
.display_msg(conf
, 'Aubio', bool(conf
.env
['HAVE_AUBIO']))
521 autowaf
.display_msg(conf
, 'AudioUnits', opts
.audiounits
)
522 autowaf
.display_msg(conf
, 'CoreAudio', bool(conf
.env
['HAVE_COREAUDIO']))
523 if bool(conf
.env
['HAVE_COREAUDIO']):
524 conf
.define ('COREAUDIO', 1)
526 conf
.define('AUDIOUNITS',1)
527 autowaf
.display_msg(conf
, 'Phone Home', opts
.phone_home
)
529 conf
.env
['PHONE_HOME'] = opts
.phone_home
530 autowaf
.display_msg(conf
, 'FPU Optimization', opts
.fpu_optimization
)
531 if opts
.fpu_optimization
:
532 conf
.define('FPU_OPTIMIZATION', 1)
533 autowaf
.display_msg(conf
, 'Freedesktop Files', opts
.freedesktop
)
534 autowaf
.display_msg(conf
, 'Freesound', opts
.freesound
)
536 conf
.define('FREESOUND',1)
537 autowaf
.display_msg(conf
, 'GtkOSX', opts
.gtkosx
)
539 conf
.define ('GTKOSX', 1)
540 autowaf
.display_msg(conf
, 'LV2 Support', bool(conf
.env
['HAVE_SLV2']))
541 autowaf
.display_msg(conf
, 'Rubberband', bool(conf
.env
['HAVE_RUBBERBAND']))
542 autowaf
.display_msg(conf
, 'Samplerate', bool(conf
.env
['HAVE_SAMPLERATE']))
543 autowaf
.display_msg(conf
, 'Soundtouch', bool(conf
.env
['HAVE_SOUNDTOUCH']))
544 autowaf
.display_msg(conf
, 'Translation', opts
.nls
)
546 conf
.define ('ENABLE_NLS', 1)
547 autowaf
.display_msg(conf
, 'Tranzport', opts
.tranzport
)
549 conf
.env
['BUILD_TESTS'] = opts
.build_tests
550 autowaf
.display_msg(conf
, 'Unit Tests', bool(conf
.env
['BUILD_TESTS']) and bool (conf
.env
['HAVE_CPPUNIT']))
552 conf
.define('TRANZPORT', 1)
553 autowaf
.display_msg(conf
, 'Universal Binary', opts
.universal
)
554 autowaf
.display_msg(conf
, 'VST Support', opts
.vst
)
556 conf
.define('VST_SUPPORT', 1)
557 if bool(conf
.env
['JACK_SESSION']):
558 conf
.define ('HAVE_JACK_SESSION', 1)
559 autowaf
.display_msg(conf
, 'Wiimote Support', opts
.wiimote
)
561 conf
.define('WIIMOTE',1)
563 conf
.define('WINDOWS_KEY', opts
.windows_key
)
564 autowaf
.display_msg(conf
, 'Windows Key', opts
.windows_key
)
565 conf
.env
['PROGRAM_NAME'] = opts
.program_name
566 autowaf
.display_msg(conf
, 'Program Name', opts
.program_name
)
568 set_compiler_flags (conf
, Options
.options
)
570 autowaf
.display_msg(conf
, 'C Compiler flags', conf
.env
['CCFLAGS'])
571 autowaf
.display_msg(conf
, 'C++ Compiler flags', conf
.env
['CXXFLAGS'])
573 # and dump the same stuff to a file for use in the build
575 config_text
= open ('libs/ardour/config_text.cc',"w")
576 config_text
.write ('#include "ardour/ardour.h"\n\nnamespace ARDOUR {\nconst char* const ardour_config_info = "\\n\\\n')
577 config_text
.write ("Install prefix "); config_text
.write (str (conf
.env
['PREFIX'])); config_text
.write ("\\n\\\n")
578 config_text
.write ("Debuggable build "); config_text
.write (str (str(conf
.env
['DEBUG']))); config_text
.write ("\\n\\\n")
579 config_text
.write ("Strict compiler flags "); config_text
.write (str (str(conf
.env
['STRICT']))); config_text
.write ("\\n\\\n")
580 config_text
.write ("Build documentation "); config_text
.write (str (str(conf
.env
['BUILD_DOCS']))); config_text
.write ("\\n\\\n")
581 config_text
.write ('Build Target '); config_text
.write (str (conf
.env
['build_target'])); config_text
.write ("\\n\\\n")
582 config_text
.write ('Architecture flags '); config_text
.write (str (opts
.arch
)); config_text
.write ("\\n\\\n")
583 config_text
.write ('Aubio '); config_text
.write (str (bool(conf
.env
['HAVE_AUBIO']))); config_text
.write ("\\n\\\n")
584 config_text
.write ('AudioUnits '); config_text
.write (str (opts
.audiounits
)); config_text
.write ("\\n\\\n")
585 config_text
.write ('CoreAudio '); config_text
.write (str (bool(conf
.env
['HAVE_COREAUDIO']))); config_text
.write ("\\n\\\n")
586 config_text
.write ('FPU Optimization '); config_text
.write (str (opts
.fpu_optimization
)); config_text
.write ("\\n\\\n")
587 config_text
.write ('Freedesktop Files '); config_text
.write (str (opts
.freedesktop
)); config_text
.write ("\\n\\\n")
588 config_text
.write ('Freesound '); config_text
.write (str (opts
.freesound
)); config_text
.write ("\\n\\\n")
589 config_text
.write ('GtkOSX '); config_text
.write (str (opts
.gtkosx
)); config_text
.write ("\\n\\\n")
590 config_text
.write ('LV2 Support '); config_text
.write (str (bool(conf
.env
['HAVE_SLV2']))); config_text
.write ("\\n\\\n")
591 config_text
.write ('Rubberband '); config_text
.write (str (bool(conf
.env
['HAVE_RUBBERBAND']))); config_text
.write ("\\n\\\n")
592 config_text
.write ('Samplerate '); config_text
.write (str (bool(conf
.env
['HAVE_SAMPLERATE']))); config_text
.write ("\\n\\\n")
593 config_text
.write ('Soundtouch '); config_text
.write (str (bool(conf
.env
['HAVE_SOUNDTOUCH']))); config_text
.write ("\\n\\\n")
594 config_text
.write ('Translation '); config_text
.write (str (opts
.nls
)); config_text
.write ("\\n\\\n")
595 config_text
.write ('Tranzport '); config_text
.write (str (opts
.tranzport
)); config_text
.write ("\\n\\\n")
596 config_text
.write ('Universal Binary '); config_text
.write (str (opts
.universal
)); config_text
.write ("\\n\\\n")
597 config_text
.write ('VST Support '); config_text
.write (str (opts
.vst
)); config_text
.write ("\\n\\\n")
598 config_text
.write ('Wiimote Support '); config_text
.write (str (opts
.wiimote
)); config_text
.write ("\\n\\\n")
599 config_text
.write ('Windows Key '); config_text
.write (str (opts
.windows_key
)); config_text
.write ("\\n\\\n")
600 config_text
.write ('C Compiler flags '); config_text
.write (str (conf
.env
['CCFLAGS'])); config_text
.write ("\\n\\\n")
601 config_text
.write ('C++ Compiler flags '); config_text
.write (str (conf
.env
['CXXFLAGS'])); config_text
.write ("\\n\\\n")
602 config_text
.write ('";}\n')
606 autowaf
.set_recursive()
607 if sys
.platform
== 'darwin':
608 bld
.add_subdirs('libs/appleutility')
612 # ideally, we'd like to use the OS-provided MIDI API
613 # for default ports. that doesn't work on at least
614 # Fedora (Nov 9th, 2009) so use JACK MIDI on linux.
616 if sys
.platform
== 'darwin':
618 'MIDITAG' : 'control',
619 'MIDITYPE' : 'coremidi',
620 'JACK_INPUT' : 'auditioner'
624 'MIDITAG' : 'control',
626 'JACK_INPUT' : 'auditioner'
629 obj
= bld
.new_task_gen('subst')
630 obj
.source
= 'ardour.rc.in'
631 obj
.target
= 'ardour_system.rc'
632 obj
.dict = rc_subst_dict
633 obj
.install_path
= '${CONFIGDIR}/ardour3'
636 bld
.recurse (i18n_children
)