Sha256: a2958c593cd1a48b94776b028268725feb01ca56a9fdf115302f3c4a65a95565

Contents?: true

Size: 1.28 KB

Versions: 6

Compression:

Stored size: 1.28 KB

Contents

#!/usr/bin/env ruby

require 'mkmf'
require 'fileutils'
require 'pathname'
require 'rbconfig'
include Config

versionfile = Pathname.new( __FILE__ ).dirname + 'VERSION'
version = versionfile.read.chomp

# Thanks to Daniel Berger for helping me out with this. :)
if CONFIG['host_os'].match( 'mswin' )
	$CFLAGS << ' -I.' << ' -W3' << ' -Zi'
else
	$CFLAGS << ' -I.'
end
$CPPFLAGS << %Q{ -DVERSION=\\"#{version}\\"}

# Add my own debugging hooks if building for me
if ENV['MAINTAINER_MODE']
	$stderr.puts "Maintainer mode enabled."
	$CFLAGS << ' -Wall'
	$CFLAGS << ' -ggdb' << ' -DDEBUG'
end

# Stuff from configure.sh
have_func( "srand" ) || have_func( "srandom" )
have_func( "random" ) || have_func( "rand" )

# bzero() isn't ANSI C, so use memset() if it isn't defined
have_func( "bzero", %w[string.h strings.h] )

unless have_func( "strcasecmp" ) || have_func( "stricmp" )
	abort "This extension requires either strcasecmp() or stricmp()"
end
unless have_func( "strncasecmp" ) || have_func( "strnicmp" )
	abort "This extensions requires either strncasecmp() or strnicmp()"
end

have_header( 'mkdio.h' ) or abort "missing mkdio.h"

# Check for 1.9.xish encoding header
have_header( 'ruby/encoding.h' )

create_header()
create_makefile( 'bluecloth_ext' )

FileUtils.rm_rf( 'conftest.dSYM' ) # MacOS X cleanup

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/bluecloth-2.1.0/ext/extconf.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/bluecloth-2.1.0/ext/extconf.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/bluecloth-2.1.0/ext/extconf.rb
bluecloth-2.1.0-x86-mswin32 ext/extconf.rb
bluecloth-2.1.0-x86-mingw32 ext/extconf.rb
bluecloth-2.1.0 ext/extconf.rb