Permalink
Browse files

Some changes to make the module build with specific libmysqlclient pa…

…th, closes #50
  • Loading branch information...
1 parent 41859fe commit 46dc9ccf266b39d67ed9e6796a178278ccc153a2 @benreesman benreesman committed with Oct 15, 2010
Showing with 6 additions and 4 deletions.
  1. +6 −4 wscript
View
@@ -24,16 +24,18 @@ def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
+ # Node.js and debug flags
conf.env.append_unique('CPPFLAGS', ["-D_FILE_OFFSET_BITS=64","-D_LARGEFILE_SOURCE"])
conf.env.append_unique('CXXFLAGS', ["-Wall"])
+ # MySQL flags and libraries
conf.env.append_unique('CXXFLAGS', Utils.cmd_output(Options.options.mysql_config + ' --include').split())
+ conf.env.append_unique('LINKFLAGS', Utils.cmd_output(Options.options.mysql_config + ' --libs_r').split())
- if conf.check_cxx(lib="mysqlclient_r", errmsg="not found, try to find nonthreadsafe libmysqlclient"):
- conf.env.append_unique('LINKFLAGS', Utils.cmd_output(Options.options.mysql_config + ' --libs_r').split())
- else:
+ if not conf.check_cxx(lib="mysqlclient_r", errmsg="not found, try to find nonthreadsafe libmysqlclient"):
+ # link flags are needed to find the libraries
+ conf.env.append_unique('LINKFLAGS', Utils.cmd_output(Options.options.mysql_config + ' --libs').split())
if conf.check_cxx(lib="mysqlclient"):
- conf.env.append_unique('LINKFLAGS', Utils.cmd_output(Options.options.mysql_config + ' --libs').split())
conf.env.append_unique('CXXDEFINES', ["MYSQL_NON_THREADSAFE"])
else:
conf.fatal("Missing both libmysqlclient_r and libmysqlclient from libmysqlclient-devel or mysql-devel package")

0 comments on commit 46dc9cc

Please sign in to comment.