File: extconf.rb

package info (click to toggle)
libgpgme-ruby 1.0.8-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 280 kB
  • ctags: 377
  • sloc: ansic: 2,186; ruby: 1,344; makefile: 143
file content (26 lines) | stat: -rw-r--r-- 529 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'mkmf'

unless find_executable('gpgme-config')
  $stderr.puts("gpgme-config not found")
  exit(1)
end

$CFLAGS += ' ' << `gpgme-config --cflags`.chomp
$libs += ' ' << `gpgme-config --libs`.chomp

checking_for('gpgme >= 1.1.3') do
  if try_run(<<'End')
#include <gpgme.h>
#include <stdlib.h>
int main (void) {
  return gpgme_check_version ("1.1.3") == NULL;
}
End
    true
  else
    $CFLAGS += ' -DRUBY_GPGME_NEED_WORKAROUND_KEYLIST_NEXT'
    false
  end
end
have_func('gpgme_op_export_keys')
create_makefile ('gpgme_n')