diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-19 15:21:26 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-19 15:21:26 +0000 |
commit | 78564e2470a12706a97516bc8eb00ae7ca0b08df (patch) | |
tree | f0ab151820012551aca6f45e1c14ecbcc248bf0e | |
parent | 775b2ba810205b812d04a476e17d5aca80de9cf7 (diff) |
remove soundtouch, fixes for Snow Leopard build, use libintl explicitly on non-glibc systems, fix for new glib include rules
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@12031 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | SConstruct | 83 | ||||
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/keyboard.cc | 3 | ||||
-rw-r--r-- | libs/appleutility/CAComponent.cpp | 4 | ||||
-rw-r--r-- | libs/ardour/SConscript | 3 | ||||
-rw-r--r-- | libs/ardour/audio_unit.cc | 3 | ||||
-rw-r--r-- | libs/ardour/coreaudiosource.cc | 2 | ||||
-rw-r--r-- | libs/ardour/globals.cc | 2 | ||||
-rw-r--r-- | libs/clearlooks-newer/animation.c | 2 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/application.h | 2 | ||||
-rwxr-xr-x | tools/config.guess | 9 | ||||
-rw-r--r-- | vst/SConscript | 1 |
12 files changed, 61 insertions, 59 deletions
diff --git a/SConstruct b/SConstruct index 8a15a0bb1b..f60f68171d 100644 --- a/SConstruct +++ b/SConstruct @@ -37,7 +37,7 @@ opts.AddVariables( ('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'), - EnumVariable('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'panther', 'leopard', 'none' ), ignorecase=2), + EnumVariable('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'osx', 'none' ), ignorecase=2), BoolVariable('AUDIOUNITS', 'Compile with Apple\'s AudioUnit library. (experimental)', 0), BoolVariable('COREAUDIO', 'Compile with Apple\'s CoreAudio library', 0), BoolVariable('GTKOSX', 'Compile for use with GTK-OSX, not GTK-X11', 0), @@ -238,7 +238,14 @@ env.Append(BUILDERS = {'PotBuild' : pot_bld}) def i18n (buildenv, sources, installenv): domain = buildenv['PACKAGE'] potfile = buildenv['POTFILE'] + + # + # on glibc systems, libintl is part of libc. not true on OS X + # + if re.search ("darwin[0-9]", config[config_kernel]): + buildenv.Merge ([ libraries['intl'] ]) + installenv.Alias ('potupdate', buildenv.PotBuild (potfile, sources)) p_oze = [ os.path.basename (po) for po in glob.glob ('po/*.po') ] @@ -672,15 +679,11 @@ config = config_guess.split ("-") print "system triple: " + config_guess # Autodetect +print 'dist target: ', env['DIST_TARGET'], '\n' if env['DIST_TARGET'] == 'auto': + print '\n\n\n\n\n', 'kernel is ', config[config_kernel], '\n' if config[config_arch] == 'apple': - # The [.] matches to the dot after the major version, "." would match any character - if re.search ("darwin[0-7][.]", config[config_kernel]) != None: - env['DIST_TARGET'] = 'panther' - if re.search ("darwin8[.]", config[config_kernel]) != None: - env['DIST_TARGET'] = 'tiger' - else: - env['DIST_TARGET'] = 'leopard' + env['DIST_TARGET'] = 'osx' else: if re.search ("x86_64", config[config_cpu]) != None: env['DIST_TARGET'] = 'x86_64' @@ -694,7 +697,7 @@ if env['DIST_TARGET'] == 'auto': print "detected DIST_TARGET = " + env['DIST_TARGET'] print "*******************************\n" -if env['DIST_TARGET'] != 'tiger' and env['DIST_TARGET'] != 'leopard': +if re.search ("darwin[0-9]", config[config_kernel]) == None: # make sure this is all disabled for non-OS X builds env['GTKOSX'] = 0 env['COREAUDIO'] = 0 @@ -708,6 +711,7 @@ if config[config_cpu] == 'powerpc' and env['DIST_TARGET'] != 'none': 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': + print 'Config CPU is', config[config_cpu], '\n' build_host_supports_sse = 0 @@ -734,15 +738,15 @@ elif ((re.search ("i[0-9]86", config[config_cpu]) != None) or (re.search ("x86_6 if "3dnow" in x86_flags: opt_flags.append ("-m3dnow") - if config[config_cpu] == "i586": - opt_flags.append ("-march=i586") - elif config[config_cpu] == "i686": - opt_flags.append ("-march=i686") - if ((env['DIST_TARGET'] == 'i686') or (env['DIST_TARGET'] == 'x86_64')) and build_host_supports_sse: opt_flags.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"]) debug_flags.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"]) + if config[config_cpu] == "i586": + opt_flags.append ("-march=i586") + elif config[config_cpu] == "i686": + opt_flags.append ("-march=i686") + if (env['VST']): # # everything must be 32 bit for VST (we're not replicating Cakewalk's hack, yet ...) @@ -754,9 +758,12 @@ elif ((re.search ("i[0-9]86", config[config_cpu]) != None) or (re.search ("x86_6 # optimization section if env['FPU_OPTIMIZATION']: - if env['DIST_TARGET'] == 'tiger' or env['DIST_TARGET'] == 'leopard': + if env['DIST_TARGET'] in [ 'tiger', 'osx' ]: opt_flags.append ("-DBUILD_VECLIB_OPTIMIZATIONS"); debug_flags.append ("-DBUILD_VECLIB_OPTIMIZATIONS"); + if config[config_cpu] == 'x86_64': + opt_flags.append ("-DUSE_X86_64_ASM") + debug_flags.append ("-DUSE_X86_64_ASM") libraries['core'].Append(LINKFLAGS= '-framework Accelerate') elif env['DIST_TARGET'] == 'i686' or env['DIST_TARGET'] == 'x86_64': opt_flags.append ("-DBUILD_SSE_OPTIMIZATIONS") @@ -793,17 +800,17 @@ if env['DIST_TARGET'] == 'x86_64' and env['VST']: # a single way to test if we're on OS X # -if env['DIST_TARGET'] in ['panther', 'tiger', 'leopard' ]: +if env['DIST_TARGET'] in [ 'tiger', 'osx' ]: env['IS_OSX'] = 1 # force tiger or later, to avoid issues on PPC which defaults # back to 10.1 if we don't tell it otherwise. env.Append (CCFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040") - if env['DIST_TARGET'] == 'leopard': + #if env['DIST_TARGET'] == 'leopard': # need this to really build against the 10.4 SDK when building on leopard # ideally this would be configurable, but lets just do that later when we need it - env.Append(CCFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk") - env.Append(LINKFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk") + #env.Append(CCFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk") + #env.Append(LINKFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk") else: env['IS_OSX'] = 0 @@ -886,14 +893,19 @@ env.Append(CCFLAGS="-D__STDC_FORMAT_MACROS") # def prep_libcheck(topenv, libinfo): - if topenv['IS_OSX']: + if os.path.exists (os.path.expanduser ('~/gtk/inst')): # - # rationale: GTK-Quartz uses jhbuild and installs to ~/gtk/inst by default. - # All libraries needed should be built against this location - if topenv['GTKOSX']: - GTKROOT = os.path.expanduser ('~/gtk/inst') - libinfo.Append(CPPPATH= GTKROOT + "/include", LIBPATH= GTKROOT + "/lib") - libinfo.Append(CXXFLAGS="-I" + GTKROOT + "/include", LINKFLAGS="-L" + GTKROOT + "/lib") + # build-gtk-stack puts the GTK stack under ~/gtk/inst + # build-ardour-stack puts other Ardour deps under ~/a3/inst + # + # things need to build with this in mind + # + GTKROOT = os.path.expanduser ('~/gtk/inst') + libinfo.Append(CPPPATH= GTKROOT + "/include", LIBPATH= GTKROOT + "/lib") + libinfo.Append(CXXFLAGS="-I" + GTKROOT + "/include", LINKFLAGS="-L" + GTKROOT + "/lib") + ARDOURDEP_ROOT = os.path.expanduser ('~/a3/inst') + libinfo.Append(CPPPATH= ARDOURDEP_ROOT + "/include", LIBPATH= ARDOURDEP_ROOT + "/lib") + libinfo.Append(CXXFLAGS="-I" + ARDOURDEP_ROOT + "/include", LINKFLAGS="-L" + ARDOURDEP_ROOT + "/lib") prep_libcheck(env, env) @@ -987,14 +999,7 @@ libraries['boost'] = conf.Finish () if env['LIBLO']: libraries['lo'] = LibraryInfo () - prep_libcheck(env, libraries['lo']) - - conf = Configure (libraries['lo']) - if conf.CheckLib ('lo', 'lo_server_new') == False: - print "liblo does not appear to be installed." - sys.exit (1) - - libraries['lo'] = conf.Finish () + libraries['lo'].ParseConfig ('pkg-config --cflags --libs liblo') # # Check for dmalloc @@ -1112,10 +1117,6 @@ if env['SYSLIBS']: # libraries['libglademm'].ParseConfig ('pkg-config --cflags --libs libglademm-2.4') # libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas') - libraries['soundtouch'] = LibraryInfo() - libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch') - # Comment the previous line and uncomment this for old versions of Debian: - #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch') libraries['appleutility'] = LibraryInfo(LIBS='libappleutility', LIBPATH='#libs/appleutility', @@ -1176,9 +1177,6 @@ else: LIBPATH='#libs/libgnomecanvasmm', CPPPATH='#libs/libgnomecanvasmm') - libraries['soundtouch'] = LibraryInfo(LIBS='soundtouch', - LIBPATH='#libs/soundtouch', - CPPPATH=['#libs', '#libs/soundtouch']) # libraries['libglademm'] = LibraryInfo(LIBS='libglademm', # LIBPATH='#libs/libglademm', # CPPPATH='#libs/libglademm') @@ -1259,7 +1257,7 @@ else: # timestretch libraries # -timefx_subdirs = ['libs/soundtouch'] +timefx_subdirs = [] if env['RUBBERBAND']: timefx_subdirs += ['libs/rubberband'] @@ -1329,6 +1327,7 @@ if env['NLS']: if env['NLS'] == 0: print nls_error else: + libraries['intl'] = LibraryInfo (LIBS='intl') print "International version will be built." env = conf.Finish() diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index 996d234240..37834f3b50 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -668,7 +668,7 @@ EngineControl::enumerate_coreaudio_devices () // (code snippet gently "borrowed" from St?hane Letz jackdmp;) OSStatus err; Boolean isWritable; - size_t outSize = sizeof(isWritable); + UInt32 outSize = sizeof(isWritable); backend_devs.clear (); @@ -684,8 +684,8 @@ EngineControl::enumerate_coreaudio_devices () if (err == noErr) { // Look for the CoreAudio device name... char coreDeviceName[256]; - size_t nameSize; - + UInt32 nameSize; + for (int i = 0; i < numCoreDevices; i++) { nameSize = sizeof (coreDeviceName); diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc index d616df7bdb..1843332208 100644 --- a/gtk2_ardour/keyboard.cc +++ b/gtk2_ardour/keyboard.cc @@ -623,8 +623,9 @@ Keyboard::load_keybindings (string path) std::map<string,string> dict; dict.insert (pair<string,string> ("<Meta>", "<Mod2>")); if (PBD::file_subst (path, dict)) { - cerr << string_compose (_("Your keybindings will be wrong. The file %1 needs to be editable by %2 to update it"), + cerr << string_compose (_("Your keybindings will be wrong. The file %1 needs to be editable by %2 to update it\n"), path, PROGRAM_NAME) + << endl; } #endif diff --git a/libs/appleutility/CAComponent.cpp b/libs/appleutility/CAComponent.cpp index 700d9e2b3e..137e46b595 100644 --- a/libs/appleutility/CAComponent.cpp +++ b/libs/appleutility/CAComponent.cpp @@ -91,7 +91,7 @@ CAComponent::~CAComponent () OSStatus CAComponent::GetResourceVersion (UInt32 &outVersion) const { bool versionFound = false; - short componentResFileID = kResFileNotOpened; + ResFileRefNum componentResFileID = kResFileNotOpened; OSStatus result; short thngResourceCount; @@ -247,7 +247,7 @@ void _ShowCF (FILE* file, CFStringRef str) void CAComponent::Print(FILE* file) const { - fprintf (file, "CAComponent: 0x%X", int(Comp())); + fprintf (file, "CAComponent: %p", (void*) (Comp())); if (mManuName) { fprintf (file, ", Manu:"); _ShowCF (file, mManuName); if (mAUName) fprintf (file, ", Name:"); _ShowCF (file, mAUName); diff --git a/libs/ardour/SConscript b/libs/ardour/SConscript index ec1cd65ee3..7a0ccc710d 100644 --- a/libs/ardour/SConscript +++ b/libs/ardour/SConscript @@ -339,9 +339,6 @@ ardour.Merge ([ if ardour['RUBBERBAND']: ardour.Merge ([ libraries['rubberband']]) timefx_sources += [ 'rb_effect.cc' ] -else: - ardour.Merge ([ libraries['soundtouch'] ]) - timefx_sources += [ 'st_stretch.cc', 'st_pitch.cc' ] if ardour['LV2']: ardour.Merge ([ libraries['lilv'] ]) diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 5a47edbfc5..8b910341a0 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -46,6 +46,7 @@ #include <appleutility/CAAUParameter.h> #include <CoreFoundation/CoreFoundation.h> +#include <CoreFoundation/CFRunLoop.h> #include <CoreServices/CoreServices.h> #include "i18n.h" @@ -2495,7 +2496,7 @@ AUPluginInfo::stringify_descriptor (const CAComponentDescription& desc) int AUPlugin::create_parameter_listener (AUEventListenerProc cb, void* arg, float interval_secs) { - CFRunLoopRef run_loop = (CFRunLoopRef) GetCFRunLoopFromEventLoop(GetCurrentEventLoop()); + CFRunLoopRef run_loop = CFRunLoopGetCurrent (); CFStringRef loop_mode = kCFRunLoopDefaultMode; if (AUEventListenerCreate (cb, arg, run_loop, loop_mode, interval_secs, interval_secs, &_parameter_listener) != noErr) { diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc index 5a3c542521..d595873c86 100644 --- a/libs/ardour/coreaudiosource.cc +++ b/libs/ardour/coreaudiosource.cc @@ -225,7 +225,7 @@ CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string& { FSRef ref; ExtAudioFileRef af = 0; - size_t size; + UInt32 size; CFStringRef name; int ret = -1; diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 3c4120c1c2..0c1dec7e12 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -232,7 +232,7 @@ setup_hardware_optimization (bool try_optimization) } #elif defined (__APPLE__) && defined (BUILD_VECLIB_OPTIMIZATIONS) - long sysVersion = 0; + SInt32 sysVersion = 0; if (noErr != Gestalt(gestaltSystemVersion, &sysVersion)) sysVersion = 0; diff --git a/libs/clearlooks-newer/animation.c b/libs/clearlooks-newer/animation.c index 82af498949..8b0bded3a1 100644 --- a/libs/clearlooks-newer/animation.c +++ b/libs/clearlooks-newer/animation.c @@ -27,7 +27,7 @@ #include "animation.h" #ifdef HAVE_ANIMATION -#include <glib/gtimer.h> +#include <glib.h> struct _AnimationInfo { GTimer *timer; diff --git a/libs/gtkmm2ext/gtkmm2ext/application.h b/libs/gtkmm2ext/gtkmm2ext/application.h index d3de5e1c7f..ccf89caf8e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/application.h +++ b/libs/gtkmm2ext/gtkmm2ext/application.h @@ -23,8 +23,8 @@ #define __GTK_APPLICATION_MM_H__ #include <string> -#include <gtkmm2ext/gtkapplication.h> // for GtkApplicationGroup typedef #include <sigc++/signal.h> +#include <gtkmm2ext/gtkapplication.h> // for GtkApplicationGroup typedef namespace Gtk { class MenuItem; diff --git a/tools/config.guess b/tools/config.guess index 917bbc50f3..44afbd4cc4 100755 --- a/tools/config.guess +++ b/tools/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2005-07-08' +timestamp='2012-03-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1182,7 +1182,12 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; + *86) if sysctl hw.cpu64bit_capable 2>&1 | grep -q 1 ; then + UNAME_PROCESSOR=x86_64 + else + UNAME_PROCESSOR=i686 + fi + ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} diff --git a/vst/SConscript b/vst/SConscript index a3d0fb01af..db2fda6616 100644 --- a/vst/SConscript +++ b/vst/SConscript @@ -46,7 +46,6 @@ ardour_vst.Merge ([ libraries['gtk2'], libraries['xml'], libraries['xslt'], - libraries['soundtouch'], libraries['samplerate'], libraries['jack'] ]) |