#!/usr/bin/env ascript
import(module_builder) {build, extraDir}
build('cairo.azd', ['Module_cairo.cpp']) {
	msc = bcc = %{
		`dlls => ['libcairo-2.dll']
		`incDirs => [path.join(extraDir, 'include', 'cairo')]
	}
	gnuc = %{
		`libs => ['cairo']
		`incDirs => ['/usr/local/include/cairo', '/usr/include/cairo']
		`hint => '''\
It seems necessary libraries have not been installed on your system.
See the one of the following step(s) to resolve this problem.
- Install Debian package:
  $ sudo apt-get install libcairo2-dev
- Compile source code:
  $ wget http://cairographics.org/releases/pixman-0.21.4.tar.gz
  $ tar xvfz pixman-0.21.4.tar.gz
  $ cd pixman-0.21.4
  $ ./configure
  $ make
  $ sudo make install
  $ cd ..
  $ wget http://cairographics.org/releases/cairo-1.10.2.tar.gz
  $ tar xvfz cairo-1.10.2.tar.gz
  $ cd cairo-1.10.2
  $ ./configure
  $ make
  $ sudo make install
  $ sudo ldconfig
'''
	}
}
