<commit_before>require "mkmf"

case CONFIG["arch"]
when /mingw32/
  $CFLAGS += " -DWIN32"
when /mswin32|cygwin|bccwin32|interix|djgpp/
  raise "not supported arch: #{CONFIG["arch"]}"
end

$CFLAGS  += " " + `env sdl-config --cflags`.chomp
$CFLAGS  += " " + `env libpng-config --cflags`.chomp
$LDFLAGS += " " + `env sdl-config --libs`.chomp
$LDFLAGS += " " + `env libpng-config --libs`.chomp

$CFLAGS += " -finline-functions -Wall -std=c99 -mfpmath=sse -msse2 -funit-at-a-time"

have_library("SDL_mixer") or exit(false)
have_library("SDL_ttf") or exit(false)
have_header("png.h") or exit(false)
have_header("zlib.h") or exit(false)

have_header("fontconfig/fontconfig.h") and have_library("fontconfig", "FcInit")

if arg_config("--debug", false)
  $CFLAGS += " -DDEBUG -O0 -g"
else
  $CFLAGS += " -O3"
end

create_makefile("starruby")
<commit_msg>Modified extconf.rb<commit_after>require "mkmf"

case CONFIG["arch"]
when /mingw32/
  $CFLAGS += " -DWIN32"
when /mswin32|cygwin|bccwin32|interix|djgpp/
  raise "not supported arch: #{CONFIG["arch"]}"
end

$CFLAGS  += " " + `env sdl-config --cflags`.chomp
$CFLAGS  += " " + `env libpng-config --cflags`.chomp
$LDFLAGS += " " + `env sdl-config --libs`.chomp
$LDFLAGS += " " + `env libpng-config --libs`.chomp

$CFLAGS += " -finline-functions -Wall -std=c99 -mfpmath=sse -msse2 -funit-at-a-time"

have_library("SDL_mixer") or exit(false)
have_library("SDL_ttf") or exit(false)
have_header("png.h") or exit(false)
have_header("zlib.h") or exit(false)

if CONFIG["arch"] =~ /linux|darwin/
  have_header("fontconfig/fontconfig.h") or exit(false)
  have_library("fontconfig", "FcInit") or exit(false)
end

if arg_config("--debug", false)
  $CFLAGS += " -DDEBUG -O0 -g"
else
  $CFLAGS += " -O3"
end

create_makefile("starruby")

{'fraction_non_alphanumeric': 0.1913929784824462, 'fraction_numerical': 0.014722536806342015, 'mean_word_length': 4.609523809523809, 'pattern_counts': {'":': 0, '<': 3, '<?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': '699937', 'n_tokens_mistral': 737, 'n_tokens_neox': 716, 'n_words': 142}