Sha256: fd17d86995ab56b0e4bafd70a7edb35f35a3024a64518cf8a4bafb8924ddd734

Contents?: true

Size: 1.3 KB

Versions: 17

Compression:

Stored size: 1.3 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.' << ' -Wall'
end
$CPPFLAGS << %Q{ -DVERSION=\\"#{version}\\"}

# Add my own debugging hooks if building for me
if ENV['DEBUGGING_BUILD']
	$CFLAGS << ' -ggdb' << ' -DDEBUG'
end

def fail( *messages )
	$stderr.puts( *messages )
	exit( 1 )
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" )
	fail( "This extension requires either strcasecmp() or stricmp()" )
end
unless have_func( "strncasecmp" ) || have_func( "strnicmp" )
	fail( "This extensions requires either strncasecmp() or strnicmp()" )
end

have_header( 'mkdio.h' ) or fail( "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

17 entries across 17 versions & 1 rubygems

Version Path
bluecloth-2.0.10 ext/extconf.rb
bluecloth-2.0.9 ext/extconf.rb
bluecloth-2.0.7 ext/extconf.rb
bluecloth-2.0.7-x86-mswin32 ext/extconf.rb
bluecloth-2.0.7-x86-mingw32 ext/extconf.rb
bluecloth-2.0.7.pre126 ext/extconf.rb
bluecloth-2.0.7.pre126-x86-mswin32 ext/extconf.rb
bluecloth-2.0.7.pre126-x86-mingw32 ext/extconf.rb
bluecloth-2.0.6-x86-mswin32 ext/extconf.rb
bluecloth-2.0.6-x86-mingw32 ext/extconf.rb
bluecloth-2.0.6 ext/extconf.rb
bluecloth-2.0.6.pre122-x86-mswin32 ext/extconf.rb
bluecloth-2.0.6.pre122-x86-mingw32 ext/extconf.rb
bluecloth-2.0.6.pre122 ext/extconf.rb
bluecloth-2.0.6.pre120-x86-mswin32 ext/extconf.rb
bluecloth-2.0.6.pre120-x86-mingw32 ext/extconf.rb
bluecloth-2.0.6.pre120 ext/extconf.rb