diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-08-20 16:03:25 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-08-20 16:03:25 +0200 |
commit | 749d6e732c0b23c0a484c3257eb0c6ba812e0289 (patch) | |
tree | e8fd633d01cd84509345a4ca3c7219ab0108dc23 | |
parent | 6c7d7cc695de37e5dbc2babf5e349a8f9b066489 (diff) |
search for openbabel libraries instead of executablev2.3.1.4
-rw-r--r-- | ext/openbabel/extconf.rb | 9 | ||||
-rw-r--r-- | openbabel.gemspec | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ext/openbabel/extconf.rb b/ext/openbabel/extconf.rb index 2eecab8..8103e72 100644 --- a/ext/openbabel/extconf.rb +++ b/ext/openbabel/extconf.rb @@ -19,7 +19,14 @@ begin Dir.chdir ob_main_dir do puts "Configuring OpenBabel" puts `cmake #{ob_main_dir} -DCMAKE_INSTALL_PREFIX=#{lib_dir}` - unless File.exists?(`which obabel`.chomp) + openbabel_libs = false + openbabel_libs = true if `ldconfig -p`.split("\n").grep(/openbabel/) + unless openbabel_libs + ENV["LD_LIBRARY_PATH"].split(":").each do |dir| + openbabel_libs = true unless Dir[File.join(dir,"*libopenbabel*")].empty? + end + end + unless openbabel_libs puts "OpenBabel not installed. Compiling sources." puts `make` puts `make install` diff --git a/openbabel.gemspec b/openbabel.gemspec index 709e16a..2b82db6 100644 --- a/openbabel.gemspec +++ b/openbabel.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "openbabel" - s.version = "2.3.1.3" + s.version = "2.3.1.4" s.authors = ["Andreas Maunz, Christoph Helma"] s.date = %q{2012-04-03} |