Method: BaseProject#check_function
- Defined in:
- lib/makeconf/baseproject.rb
#check_function(func, *arg) ⇒ Object
Check if a function is available in the standard C library TODO: probably should add :ldadd when checking..
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/makeconf/baseproject.rb', line 239 def check_function(func, *arg) func = [ func ] if func.kind_of? String throw ArgumentError unless func.kind_of? Array rc = true func.each do |x| next if @funcs.has_key? x printf "checking for #{x}... " @funcs[x] = @cc.test_link "void *#{x}();\nint main() { void *p;\np = &#{x}; }" if @funcs[x] puts 'yes' else puts 'no' rc = false end end rc end |