<commit_before>require "mkmf"
require "os"

lib_path = []
if OS.bits == 64
  lib_path << File.expand_path("lib/x64", __dir__)
else
  lib_path << File.expand_path("lib/x86", __dir__)
end

dir_config("xf_sdk", [], lib_path)

have_library("msc") or raise "Library msc not found."
have_library("dl") or raise "Library dl not found."
have_library("pthread") or raise "Library pthread not found."

create_makefile("xf_sdk/xf_sdk")<commit_msg>fix bug that on some systems, rpath is not set<commit_after>require "mkmf"
require "os"

libs_path = []

lib_path = if OS.bits == 64
  File.expand_path("lib/x64", __dir__)
else
  File.expand_path("lib/x86", __dir__)
end

if RbConfig::CONFIG["RPATHFLAG"].to_s.empty?
  $LDFLAGS << " -Wl,-rpath,#{lib_path}"
end

libs_path << lib_path

dir_config("xf_sdk", [], libs_path)

have_library("msc") or raise "Library msc not found."
have_library("dl") or raise "Library dl not found."
have_library("pthread") or raise "Library pthread not found."

create_makefile("xf_sdk/xf_sdk")
{'fraction_non_alphanumeric': 0.1498015873015873, 'fraction_numerical': 0.011904761904761904, 'mean_word_length': 5.682119205298013, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '473238', 'n_tokens_mistral': 383, 'n_tokens_neox': 372, 'n_words': 94}