#!/usr/bin/env ascript
import(module_builder) {build, extraDir}
build('re.azd', ['Module_re.cpp']) {
	msc = %{
		`incDirs => [path.join(extraDir, 'onig-5.9.2')]
		`libs => [path.join(extraDir, 'onig-5.9.2', 'onig_s.lib')]
		`cflags => ['-DONIG_EXTERN=extern']
	}
	bcc = %{
		`incDirs => [path.join(extraDir, 'onig-5.9.2')]
		`libs => [path.join(extraDir, 'onig-5.9.2', 'onig_s.bcc.lib')]
		`cflags => ['-DONIG_EXTERN=extern']
	}
	gnuc = %{
		`libs => ['onig']
		`hint => '''\
It seems necessary libraries have not been installed on your system.
See the following steps to resolve this problem.
- Compile source code:
  $ wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.2.tar.gz
  $ tar xvfz onig-5.9.2.tar.gz
  $ cd onig-5.9.2
  $ ./configure
  $ make
  $ sudo make install
  $ sudo ldconfig
'''
	}
}
