diff options
author | David Robillard <d@drobilla.net> | 2013-12-30 23:55:30 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-12-30 23:55:30 +0000 |
commit | 8a9ac26d6ac67a3636b2f763eb252f9ad4f8b61a (patch) | |
tree | 409f1ae250add3d450cbb2f60f403b29ea4e01ce /wscript | |
parent | 97436f5da2e41b0b97d30ca7db5b574707b80e34 (diff) | |
download | ganv-8a9ac26d6ac67a3636b2f763eb252f9ad4f8b61a.tar.gz ganv-8a9ac26d6ac67a3636b2f763eb252f9ad4f8b61a.tar.bz2 ganv-8a9ac26d6ac67a3636b2f763eb252f9ad4f8b61a.zip |
Attempt to use whichever graphviz version is present.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5231 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -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' ]) |