summaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-03-28 00:41:28 -0500
committerNathan Binkert <binkertn@umich.edu>2005-03-28 00:41:28 -0500
commita86b95cb182b435bda5d76197cd9f32ba6db83c2 (patch)
tree45bb5315f0c6a5a9eefe20627edb3d0a58ae8db3 /SConscript
parent1cd15e8e4addf995fb0683d76ec1214a832b49b5 (diff)
downloadgem5-a86b95cb182b435bda5d76197cd9f32ba6db83c2.tar.xz
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
Diffstat (limited to 'SConscript')
-rw-r--r--SConscript14
1 files changed, 7 insertions, 7 deletions
diff --git a/SConscript b/SConscript
index 3b3c871bc..93962778f 100644
--- a/SConscript
+++ b/SConscript
@@ -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.