Sha256: 960dff242b07b7cf5733bfd1b26f83ae9b17865a84c342c39a8d158f9fc0702a

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

require 'mkmf'
require 'rbconfig'

extension_name = 'base64'

arch = Config::CONFIG['arch']

windows = (/mswin/ =~ arch) #RUBY_PLATFORM)

if (ENV['NORUBYEXT'] == 'true') || windows  # TEMPORARILY ADD WINDOWS HERE
  #ENV['make'] = 'echo' # THIS DOESN"T GET TO THE PARENT PROCESS!!!
  # LETS TRY FAKING IT OUT.
  if windows
    File.open('make.bat', 'w') do |f|
      f << 'echo Native extension will be omitted.'
    end
    File.open('nmake.bat', 'w') do |f|
      f << 'echo Native extension will be omitted.'
    end
    #File.chmod(0755, "make.bat", "nmake.bat")  # need?
  end
  File.open('Makefile', 'w') do |f|
    f << "all:\n"
    f << "install:\n"
  end
else
  if windows && ENV['make'].nil?
    $LIBS += " msvcprt.lib"
    #dir_config(extension_name)
    #create_makefile(extension_name, "tmail")
    create_makefile(extension_name, "tmail/#{arch}")
  else
    $CFLAGS += " -D_FILE_OFFSET_BITS=64"  #???
    #dir_config(extension_name)
    #create_makefile(extension_name, "tmail")
    create_makefile(extension_name, "tmail/#{arch}")
  end
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
tmail-1.1.1 ext/tmail/base64/extconf.rb
tmail-1.1.1 ./ext/tmail/base64/extconf.rb