patch from Steven Jenkins <steven.jenkins@ieee.org>:
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 23 Nov 2004 01:18:14 +0000 (01:18 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 23 Nov 2004 01:18:14 +0000 (01:18 +0000)
If configure attempts to build the Ruby extension on a system without a previous
installation of comedilib, compilation fails because gcc can't find comedilib.h.

The attached patch adds the distribution include directory to the gcc search
path when compiling the extension.

swig/ruby/Makefile.am
swig/ruby/ext/extconf.rb

index 9ecc01040c0f87ebe4c89ddb7becba1092df27e0..12dd9af767fbe3b43063e64df53463e41e703212 100644 (file)
@@ -13,7 +13,7 @@ install-data-local:
 endif
 
 ext/Makefile config.save:
-       $(RUBY) $(srcdir)/setup.rb config $(RUBY_CONFIG_OPTIONS)
+       $(RUBY) $(srcdir)/setup.rb config $(RUBY_CONFIG_OPTIONS) -- --with-comedilib-dir=../../..
 
 ext/comedi.so ext/comedi_ruby_wrap.o: ext/Makefile config.save $(srcdir)/ext/comedi_ruby_wrap.c
        $(RUBY) $(srcdir)/setup.rb setup
index 4702f02ff4368b3063d513b8d1992da20c6f53ac..15e67b95a2e7d2fd5bc26fffd60d95496c2bcec1 100644 (file)
@@ -1,3 +1,4 @@
 require 'mkmf'
+dir_config('comedilib')
 have_library('comedi')
 create_makefile("comedi")