<commit_before>import SCons
import xmmsenv
from marshal import dump, load;

import os;
import sys;


def showOpts(base_env):
	print "\n* Configuration options\n"
	print "C-Compiler: ", base_env["CC"]
	print "C++-Compiler: ", base_env["CXX"]
	print "C-Flags: ", base_env["CCFLAGS"]
	print "Installation prefix: ", base_env["PREFIX"]
	print "\nModules: "
	for x in base_env.flag_groups.keys():
		print "Module " + x + ": " + base_env.flag_groups[x]
	print "\n* Now run scons again to compile...\n"

##
## This function will check for all libs that XMMS2
## might need. Or its plugins.
##

def checkFlags(base_env):
	##
	## Check for essensial libs
	##
	base_env.CheckAndAddFlagsToGroup("mad", "pkg-config --libs --cflags mad", fail=1)
	base_env.CheckAndAddFlagsToGroup("glib", "pkg-config --libs --cflags gthread-2.0 glib-2.0 gmodule-2.0", fail=1)
	base_env.CheckAndAddFlagsToGroup("dbus", "pkg-config --libs --cflags dbus-1", fail=1)
	base_env.CheckAndAddFlagsToGroup("dbusglib", "pkg-config --libs --cflags dbus-1 dbus-glib-1", fail=1)
	base_env.CheckLibAndAddFlagsToGroup("sqlite","sqlite","sqlite_open", fail=1)
	if base_env.HasGroup("sqlite"):
		base_env.AddFlagsToGroup("sqlite", " -DHAVE_SQLITE");

	##
	## Check for optional libs
	##
	base_env.CheckAndAddFlagsToGroup("ecore", "ecore-config --libs --cflags")
	if base_env.HasGroup("ecore") :
		base_env.AddFlagsToGroup("ecore", " -DHAVE_ECORE")

	base_env.CheckAndAddFlagsToGroup("qt", "pkg-config --libs --cflags qt")
	base_env.CheckAndAddFlagsToGroup("shout", "pkg-config --libs --cflags shout")
	base_env.CheckAndAddFlagsToGroup("curl", "curl-config --libs --cflags")
	if base_env.HasGroup("curl"):
		base_env.AddFlagsToGroup("curl", " -DHAVE_CURL");
	base_env.CheckAndAddFlagsToGroup("sdl", "sdl-config --libs --cflags")
	base_env.CheckAndAddFlagsToGroup("alsa","pkg-config --cflags --libs alsa")
	base_env.CheckLibAndAddFlagsToGroup("sdl-ttf","SDL_ttf","TTF_Init",depends="sdl")
	base_env.CheckLibAndAddFlagsToGroup("vorbis","vorbis","ogg_sync_init")
	base_env.CheckLibAndAddFlagsToGroup("vorbisenc","vorbisenc","vorbis_encode_ctl",depends="vorbis")
	base_env.CheckLibAndAddFlagsToGroup("vorbisfile","vorbisfile","ov_open_callbacks",depends="vorbis")
	base_env.CheckLibAndAddFlagsToGroup("math","m","cos")
	base_env.CheckLibAndAddFlagsToGroup("flac", "FLAC", "FLAC__seekable_stream_decoder_get_state")
	base_env.CheckAndAddFlagsToGroupFromLibTool("resid", "libresid-builder.la")
	base_env.CheckAndAddFlagsToGroupFromLibTool("sid", "libsidplay2.la")
	base_env.CheckLibAndAddFlagsToGroup("samba","libsmbclient","smbc_init")
	base_env.CheckAndAddFlagsToGroup("jack", "pkg-config --libs --cflags jack")
	base_env.CheckAndAddFlagsToGroup("modplug", "pkg-config --libs --cflags libmodplug")

	if base_env.sys == 'Darwin':
		base_env.AddFlagsToGroup("CoreAudio", "-framework CoreAudio")<commit_msg>Create a group for libogg. <commit_after>import SCons
import xmmsenv
from marshal import dump, load;

import os;
import sys;


def showOpts(base_env):
	print "\n* Configuration options\n"
	print "C-Compiler: ", base_env["CC"]
	print "C++-Compiler: ", base_env["CXX"]
	print "C-Flags: ", base_env["CCFLAGS"]
	print "Installation prefix: ", base_env["PREFIX"]
	print "\nModules: "
	for x in base_env.flag_groups.keys():
		print "Module " + x + ": " + base_env.flag_groups[x]
	print "\n* Now run scons again to compile...\n"

##
## This function will check for all libs that XMMS2
## might need. Or its plugins.
##

def checkFlags(base_env):
	##
	## Check for essensial libs
	##
	base_env.CheckAndAddFlagsToGroup("mad", "pkg-config --libs --cflags mad", fail=1)
	base_env.CheckAndAddFlagsToGroup("glib", "pkg-config --libs --cflags gthread-2.0 glib-2.0 gmodule-2.0", fail=1)
	base_env.CheckAndAddFlagsToGroup("dbus", "pkg-config --libs --cflags dbus-1", fail=1)
	base_env.CheckAndAddFlagsToGroup("dbusglib", "pkg-config --libs --cflags dbus-1 dbus-glib-1", fail=1)
	base_env.CheckLibAndAddFlagsToGroup("sqlite","sqlite","sqlite_open", fail=1)
	if base_env.HasGroup("sqlite"):
		base_env.AddFlagsToGroup("sqlite", " -DHAVE_SQLITE");

	##
	## Check for optional libs
	##
	base_env.CheckAndAddFlagsToGroup("ecore", "ecore-config --libs --cflags")
	if base_env.HasGroup("ecore") :
		base_env.AddFlagsToGroup("ecore", " -DHAVE_ECORE")

	base_env.CheckAndAddFlagsToGroup("qt", "pkg-config --libs --cflags qt")
	base_env.CheckAndAddFlagsToGroup("shout", "pkg-config --libs --cflags shout")
	base_env.CheckAndAddFlagsToGroup("curl", "curl-config --libs --cflags")
	if base_env.HasGroup("curl"):
		base_env.AddFlagsToGroup("curl", " -DHAVE_CURL");
	base_env.CheckAndAddFlagsToGroup("sdl", "sdl-config --libs --cflags")
	base_env.CheckAndAddFlagsToGroup("alsa","pkg-config --cflags --libs alsa")
	base_env.CheckLibAndAddFlagsToGroup("sdl-ttf","SDL_ttf","TTF_Init",depends="sdl")
	base_env.CheckLibAndAddFlagsToGroup("ogg","ogg","ogg_sync_init")
	base_env.CheckLibAndAddFlagsToGroup("vorbis","vorbis","vorbis_synthesis_init")
	base_env.CheckLibAndAddFlagsToGroup("vorbisenc","vorbisenc","vorbis_encode_ctl",depends="vorbis")
	base_env.CheckLibAndAddFlagsToGroup("vorbisfile","vorbisfile","ov_open_callbacks",depends="vorbis")
	base_env.CheckLibAndAddFlagsToGroup("math","m","cos")
	base_env.CheckLibAndAddFlagsToGroup("flac", "FLAC", "FLAC__seekable_stream_decoder_get_state")
	base_env.CheckAndAddFlagsToGroupFromLibTool("resid", "libresid-builder.la")
	base_env.CheckAndAddFlagsToGroupFromLibTool("sid", "libsidplay2.la")
	base_env.CheckLibAndAddFlagsToGroup("samba","libsmbclient","smbc_init")
	base_env.CheckAndAddFlagsToGroup("jack", "pkg-config --libs --cflags jack")
	base_env.CheckAndAddFlagsToGroup("modplug", "pkg-config --libs --cflags libmodplug")

	if base_env.sys == 'Darwin':
		base_env.AddFlagsToGroup("CoreAudio", "-framework CoreAudio")
{'fraction_non_alphanumeric': 0.1619475138121547, 'fraction_numerical': 0.0055248618784530384, 'mean_word_length': 6.582460732984293, 'pattern_counts': {'":': 2, '<': 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': '4347579', 'n_tokens_mistral': 2206, 'n_tokens_neox': 2149, 'n_words': 345}