diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-08-08 13:12:59 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-08-08 13:12:59 +0300 |
commit | d545873580192eda1c664436f4da5fee194fa644 (patch) | |
tree | 048f8386e404ce2960c3e97c3e1ebfd3011c4a21 | |
parent | 83cbda2754268d82d55cca52f44b741d191909fe (diff) | |
parent | e759be5de947a36eabe1dcf0bde3eeeb3848b4f6 (diff) |
Merge pull request #17 from hughperkins/master
Fix using .dot/graphviz on ubuntu 14.04 64-bit
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | graphviz.lua | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc84959 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/ + diff --git a/graphviz.lua b/graphviz.lua index a30fff6..785e325 100644 --- a/graphviz.lua +++ b/graphviz.lua @@ -34,7 +34,14 @@ extern int gvFreeLayout(GVC_t *context, graph_t *g); extern int gvFreeContext(GVC_t *context); ]] graphvizOk, graphviz = pcall(function() return ffi.load('libgvc') end) + if not graphvizOk then + graphvizOk, graphviz = pcall(function() return ffi.load('libgvc.so.6') end) + end + cgraphOk, cgraph = pcall(function() return ffi.load('libcgraph') end) + if not cgraphOk then + cgraphOk, cgraph = pcall(function() return ffi.load('libcgraph.so.6') end) + end else graphvizOk = false cgraphOk = false |