If we find the mysql libraries on the machine, just compile

with mysql and remove the special compile type.

SConscript:
    If we find the mysql libraries on the machine, just compile
    with mysql.
build/SConstruct:
    we always use mysql, and we got rid of the FS_MEASURE

--HG--
extra : convert_revision : a7c4277c890e1b6390ef06288114c9bdde11b178
This commit is contained in:
Nathan Binkert 2005-03-28 00:41:28 -05:00
parent 1cd15e8e4a
commit a86b95cb18
2 changed files with 7 additions and 18 deletions

View file

@ -28,6 +28,7 @@
import os
import sys
from os.path import isdir
# This file defines how to build a particular configuration of M5
# based on variable settings in the 'env' build environment.
@ -337,18 +338,17 @@ else:
extra_libraries = []
env.Append(LIBS=['z'])
if env['USE_MYSQL']:
if isdir('/usr/lib64/mysql') or isdir('/usr/lib/mysql') or \
isdir('/usr/local/lib/mysql'):
print 'Compiling with MySQL support!'
env.Append(LIBPATH=['/usr/lib64/mysql', '/usr/local/lib/mysql/',
'/usr/lib/mysql'])
env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
sources += mysql_sources
env.Append(CPPDEFINES = 'USE_MYSQL')
env.Append(CPPDEFINES = 'STATS_BINNING')
env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
if os.path.isdir('/usr/lib64'):
env.Append(LIBPATH=['/usr/lib64/mysql'])
else:
env.Append(LIBPATH=['/usr/lib/mysql/'])
env.Append(LIBS=['mysqlclient'])
###################################################
#
# Special build rules.

View file

@ -104,23 +104,12 @@ configs_map = {
'KERNEL' : KernelConfig
}
# Enable detailed full-system binning.
def MeasureOpt(env):
env.Replace(USE_MYSQL = True)
env.Append(CPPDEFINES = 'FS_MEASURE')
# Enable MySql database output for stats.
def MySqlOpt(env):
env.Replace(USE_MYSQL = True)
# Disable FastAlloc object allocation.
def NoFastAllocOpt(env):
env.Append(CPPDEFINES = 'NO_FAST_ALLOC')
# Configuration options map.
options_map = {
'MEASURE' : MeasureOpt,
'MYSQL' : MySqlOpt,
'NO_FAST_ALLOC' : NoFastAllocOpt
}