openbabel 2.3.1.3 → 2.3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/openbabel/extconf.rb +8 -1
- metadata +1 -1
data/ext/openbabel/extconf.rb
CHANGED
@@ -19,7 +19,14 @@ begin
|
|
19
19
|
Dir.chdir ob_main_dir do
|
20
20
|
puts "Configuring OpenBabel"
|
21
21
|
puts `cmake #{ob_main_dir} -DCMAKE_INSTALL_PREFIX=#{lib_dir}`
|
22
|
-
|
22
|
+
openbabel_libs = false
|
23
|
+
openbabel_libs = true if `ldconfig -p`.split("\n").grep(/openbabel/)
|
24
|
+
unless openbabel_libs
|
25
|
+
ENV["LD_LIBRARY_PATH"].split(":").each do |dir|
|
26
|
+
openbabel_libs = true unless Dir[File.join(dir,"*libopenbabel*")].empty?
|
27
|
+
end
|
28
|
+
end
|
29
|
+
unless openbabel_libs
|
23
30
|
puts "OpenBabel not installed. Compiling sources."
|
24
31
|
puts `make`
|
25
32
|
puts `make install`
|