From 5ee968d66be70aa75be2aea60fc0753c584ce473 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 4 Oct 2012 22:21:59 +0000 Subject: [PATCH] fix up various aspects of building against a private/personal dependency stack git-svn-id: svn://localhost/ardour2/branches/3.0@13209 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/wscript | 11 +++++++---- wscript | 24 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index aa24c60d88..17b4834375 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -418,21 +418,24 @@ def build(bld): if bld.is_defined('HAVE_SUIL'): obj.source += [ 'lv2_plugin_ui.cc' ] - obj.uselib += ' SUIL ' + obj.use += [ 'SUIL' ] if bld.is_defined('FREESOUND'): obj.source += [ 'sfdb_freesound_mootcher.cc' ] obj.defines += [ 'FREESOUND' ] + if bld.is_defined('NEED_INTL'): + obj.linkflags = ' -lintl' + if bld.is_defined('WINDOWS_VST_SUPPORT'): obj.source += [ 'windows_vst_plugin_ui.cc' ] obj.defines += [ 'WINDOWS_VST_SUPPORT' ] - obj.uselib += ' X11 ' - + obj.use += [ 'X11' ] + if bld.is_defined('LXVST_SUPPORT'): obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ] obj.defines += [ 'LXVST_SUPPORT' ] - obj.uselib += ' X11 ' + obj.use += [ 'X11' ] if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'): obj.source += [ 'vst_plugin_ui.cc' ] diff --git a/wscript b/wscript index 064d03f31f..8d46b1b857 100644 --- a/wscript +++ b/wscript @@ -470,13 +470,30 @@ def configure(conf): # the library itself is part of glibc, or on a bare-bones build system # where we need to pick it up from the GTK dependency stack. # - if not os.path.isfile ('/usr/include/libintl.h'): + user_gtk_root = os.path.expanduser ('~/gtk/inst') + if not os.path.isfile ('/usr/include/libintl.h') or os.getenv('PKG_CONFIG_PATH').find (user_gtk_root) >= 0: # XXXX hack hack hack - prefinclude = ''.join ([ '-I', os.path.expanduser ('~/gtk/inst/include') ]) - preflib = ''.join ([ '-L', os.path.expanduser ('~/gtk/inst/lib') ]) + prefinclude = ''.join ([ '-I', user_gtk_root + '/include']) + preflib = ''.join ([ '-L', user_gtk_root + '/lib']) conf.env.append_value('CFLAGS', [ prefinclude ]) conf.env.append_value('CXXFLAGS', [prefinclude ]) conf.env.append_value('LINKFLAGS', [ preflib ]) + conf.define ('NEED_INTL', 1) + autowaf.display_msg(conf, 'Will use explicit linkage against libintl in ' + user_gtk_root, 'yes') + else: + autowaf.display_msg(conf, 'Will use explicit linkage against libintl in ', 'no') + + user_ardour_root = os.path.expanduser ('~/a3/inst') + if os.getenv('PKG_CONFIG_PATH').find (user_ardour_root) >= 0: + # XXXX hack hack hack + prefinclude = ''.join ([ '-I', user_ardour_root + '/include']) + preflib = ''.join ([ '-L', user_ardour_root + '/lib']) + conf.env.append_value('CFLAGS', [ prefinclude ]) + conf.env.append_value('CXXFLAGS', [prefinclude ]) + conf.env.append_value('LINKFLAGS', [ preflib ]) + autowaf.display_msg(conf, 'Will build against private Ardour dependency stack in ' + user_ardour_root, 'yes') + else: + autowaf.display_msg(conf, 'Will build against private Ardour dependency stack', 'no') if sys.platform == 'darwin': @@ -685,6 +702,7 @@ const char* const ardour_config_info = "\\n\\ write_config_text('C compiler flags', conf.env['CFLAGS']) write_config_text('C++ compiler flags', conf.env['CXXFLAGS']) + write_config_text('Linker flags', conf.env['LINKFLAGS']) config_text.write ('";\n}\n') config_text.close ()