Sha256: f8da0a24b47032d496f717765f60c7e7191f53e18ce4b197fb62b486316fed70

Contents?: true

Size: 673 Bytes

Versions: 2

Compression:

Stored size: 673 Bytes

Contents

# frozen_string_literal: true
# rubocop:disable GlobalVars
require "mkmf"

pkg_config("utf8proc")
unless have_library("utf8proc")
  puts "Compiling local libutf8proc..."

  libutf8proc_dir = File.expand_path(
    File.join(File.dirname(__FILE__), "../../vendor/libutf8proc")
  )

  $VPATH << libutf8proc_dir
  $srcs = ["utf8_proc.c", "utf8proc.c"]
  $CFLAGS << " -I#{libutf8proc_dir}"
end

$CFLAGS << " -fPIC" if RbConfig::CONFIG["target_cpu"] == "x86_64"
if RbConfig::CONFIG["CC"] == "clang"
  $CFLAGS << " -flto -mllvm -inline-threshold=5000"
end
$CFLAGS << " -std=c99 -march=native -mtune=native -Wno-declaration-after-statement"

create_makefile("utf8_proc/utf8_proc")

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
utf8_proc-0.6.0 ext/utf8_proc/extconf.rb
utf8_proc-0.5.2 ext/utf8_proc/extconf.rb