From 8a9ac26d6ac67a3636b2f763eb252f9ad4f8b61a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 30 Dec 2013 23:55:30 +0000 Subject: Attempt to use whichever graphviz version is present. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5231 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 13b750d..a9fb442 100644 --- a/wscript +++ b/wscript @@ -23,7 +23,7 @@ def options(opt): autowaf.set_options(opt) opt.add_option('--test', action='store_true', dest='build_tests', help='Build unit tests') - opt.add_option('--graphviz', action='store_true', dest='graphviz', + opt.add_option('--no-graphviz', action='store_true', dest='no_graphviz', help='Do not compile with graphviz support') opt.add_option('--no-fdgl', action='store_true', dest='no_fdgl', help='Use experimental force-directed graph layout') @@ -52,9 +52,12 @@ def configure(conf): conf.find_program('g-ir-doc-tool', var='G_IR_DOC_TOOL', mandatory=False) conf.find_program('yelp-build', var='YELP_BUILD', mandatory=False) - if Options.options.graphviz: - autowaf.check_pkg(conf, 'libgvc', uselib_store='AGRAPH', - atleast_version='2.8', mandatory=False) + if not Options.options.no_graphviz: + autowaf.check_pkg(conf, 'libgvc', uselib_store='AGRAPH_2_30', + atleast_version='2.30', mandatory=False) + if not conf.is_defined('HAVE_AGRAPH_2_30'): + autowaf.check_pkg(conf, 'libgvc', uselib_store='AGRAPH_2_20', + atleast_version='2.20', mandatory=False) if not Options.options.no_fdgl: autowaf.define(conf, 'GANV_FDGL', 1) @@ -67,7 +70,8 @@ def configure(conf): conf.write_config_header('ganv_config.h', remove=False) autowaf.display_msg(conf, "Static (Graphviz) arrange", - conf.is_defined('HAVE_AGRAPH')) + conf.is_defined('HAVE_AGRAPH_2_20') or + conf.is_defined('HAVE_AGRAPH_2_30')) autowaf.display_msg(conf, "Interactive force-directed arrange", conf.is_defined('GANV_FDGL')) autowaf.display_msg(conf, "Native language support", conf.is_defined('ENABLE_NLS')) @@ -104,7 +108,7 @@ def build(bld): # Pkgconfig file autowaf.build_pc(bld, 'GANV', GANV_VERSION, GANV_MAJOR_VERSION, - 'AGRAPH GLIBMM ART', + 'AGRAPH_2_20 AGRAPH_2_30 GLIBMM ART', {'GANV_MAJOR_VERSION' : GANV_MAJOR_VERSION}) bld(rule = 'glib-genmarshal --prefix=ganv_marshal --header ${SRC} > ${TGT}', @@ -122,7 +126,7 @@ def build(bld): includes = ['.', './src'], name = 'libganv', target = 'ganv-%s' % GANV_MAJOR_VERSION, - uselib = 'GTKMM AGRAPH ART', + uselib = 'GTKMM AGRAPH_2_20 AGRAPH_2_30 ART', vnum = GANV_VERSION, install_path = '${LIBDIR}') @@ -141,7 +145,7 @@ def build(bld): includes = ['.', './src'], name = 'libganv_profiled', target = 'ganv_profiled', - uselib = 'GTKMM AGRAPH ART', + uselib = 'GTKMM AGRAPH_2_20 AGRAPH_2_30 ART', install_path = '', cflags = [ '-fprofile-arcs', '-ftest-coverage' ]) -- cgit v1.2.1