Top Level Namespace

Defined Under Namespace

Modules: DataObjects Classes: PostgresError

Instance Method Summary collapse

Instance Method Details

#config_value(type) ⇒ Object



16
17
18
# File 'ext/extconf.rb', line 16

def config_value(type)
  ENV["POSTGRES_#{type.upcase}"] || pg_config(type)
end

#have_build_envObject



24
25
26
27
# File 'ext/extconf.rb', line 24

def have_build_env
  (have_library('pq') || have_library('libpq')) &&
    have_header('libpq-fe.h') && have_header('libpq/libpq-fs.h')
end

#pg_config(type) ⇒ Object



20
21
22
# File 'ext/extconf.rb', line 20

def pg_config(type)
  IO.popen("pg_config --#{type}dir").readline.chomp rescue nil
end