From 7aa1a6b7c75566b67c5b6fe2e9628273b73ebc9c Mon Sep 17 00:00:00 2001 From: GRMrGecko Date: Sat, 11 Feb 2012 14:00:33 -0600 Subject: [PATCH] Updated build scripts to make the Mac OS X work around for the MySQL client library path only happen when you have Mac OS X. --- buildLogMySQL | 8 ++++++-- buildLogSQLite | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/buildLogMySQL b/buildLogMySQL index 44ce1a6..dfe0905 100755 --- a/buildLogMySQL +++ b/buildLogMySQL @@ -1,5 +1,7 @@ #!/bin/bash +INSTALLNAMETOOL=`which install_name_tool` # Fixes Mac OS X issue with linking. + ZNCBUILD=`which znc-buildmod` if [ "$ZNCBUILD" = "" ]; then echo "Where is znc-buildmod:" @@ -21,6 +23,8 @@ if [ "$ZNCCONFIG" = "" ]; then ZNCCONFIG="$HOME/.znc" fi -LDFLAGS="-L $MYSQL/lib -lmysqlclient -I $MYSQL/include" $ZNCBUILD logmysql.cpp -install_name_tool -change libmysqlclient.18.dylib "$MYSQL/libmysqlclient.dylib" logmysql.so +LDFLAGS="-L $MYSQL/lib -lmysqlclient -I $MYSQL/include" "$ZNCBUILD" logmysql.cpp +if [ "$INSTALLNAMETOOL" != "" ]; then + "$INSTALLNAMETOOL" -change libmysqlclient.18.dylib "$MYSQL/libmysqlclient.dylib" logmysql.so +fi cp logmysql.so "$ZNCCONFIG/modules/logmysql.so" \ No newline at end of file diff --git a/buildLogSQLite b/buildLogSQLite index 82b4180..81ede08 100755 --- a/buildLogSQLite +++ b/buildLogSQLite @@ -21,5 +21,5 @@ if [ "$ZNCCONFIG" = "" ]; then ZNCCONFIG="$HOME/.znc" fi -LDFLAGS="-L $SQLITE/lib -lsqlite3 -I $SQLITE/include" $ZNCBUILD logsqlite.cpp +LDFLAGS="-L $SQLITE/lib -lsqlite3 -I $SQLITE/include" "$ZNCBUILD" logsqlite.cpp cp logsqlite.so "$ZNCCONFIG/modules/logsqlite.so" \ No newline at end of file