| Line | |
|---|
| 1 | # mkmf config for the FastXml ruby extension |
|---|
| 2 | # Please see the LICENSE file for copyright, licensing and distribution information |
|---|
| 3 | |
|---|
| 4 | # FastXml depends on libxml and libxslt |
|---|
| 5 | |
|---|
| 6 | require 'mkmf' |
|---|
| 7 | ext_name = 'fastxml' |
|---|
| 8 | dir_config ext_name |
|---|
| 9 | find_header( 'libxml/tree.h', "/usr/include/libxml2", "/usr/local/include/libxml2", "/opt/local/include/libxml2" ) |
|---|
| 10 | find_header( 'libxslt/xslt.h', "/usr/include/libxslt", "/usr/local/include/libxslt", "/opt/local/include/libxslt" ) |
|---|
| 11 | find_library( 'xml2', "xmlInitParser", "/usr/lib", "/usr/local/lib", "/opt/local/lib" ) |
|---|
| 12 | have_library( 'xml2', 'xmlInitParser', 'libxml/parser.h' ) |
|---|
| 13 | find_library( 'xslt', "xmlInitParser", "/usr/lib", "/usr/local/lib", "/opt/local/lib" ) |
|---|
| 14 | have_library( 'xslt', 'xsltParseStylesheetFile', 'libxslt/xslt.h' ) |
|---|
| 15 | $LDFLAGS << ' %s' % (`xml2-config --libs`).chomp |
|---|
| 16 | $CFLAGS << ' -Wall %s' % (`xml2-config --cflags`).chomp |
|---|
| 17 | |
|---|
| 18 | create_makefile ext_name |
|---|