summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-05-09 12:35:11 +0200
committerSergei Golubchik <sergii@pisem.net>2014-05-09 12:35:11 +0200
commitd3e2e1243bb0dae95ce35b0380dd4f8f476b254d (patch)
tree8779ad6b2059f181770cc07e2437925d7d5d5d04 /scripts
parent229dad1f9b12f8e9f64b6a605bdf8e31c339d018 (diff)
parent124428a9e28e59f98b25d8ee07b57d264f63cbe4 (diff)
downloadmariadb-git-d3e2e1243bb0dae95ce35b0380dd4f8f476b254d.tar.gz
5.5 merge
Diffstat (limited to 'scripts')
-rw-r--r--scripts/CMakeLists.txt20
-rw-r--r--scripts/comp_sql.c2
-rw-r--r--scripts/msql2mysql.sh1
-rw-r--r--scripts/mysql_config.pl.in4
-rw-r--r--scripts/mysql_config.sh8
-rw-r--r--scripts/mysql_install_db.pl.in6
-rw-r--r--scripts/mysql_test_data_timezone.sql1
-rw-r--r--scripts/mysqlbug.sh1
8 files changed, 28 insertions, 15 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 82de99e2690..e865edc46c0 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -232,6 +232,11 @@ SET(pkglibdir ${prefix}/${INSTALL_LIBDIR})
SET(pkgplugindir ${prefix}/${INSTALL_PLUGINDIR})
SET(localstatedir ${MYSQL_DATADIR})
+SET(RPATH_OPTION "")
+IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+ SET(RPATH_OPTION "-R$pkglibdir")
+ENDIF()
+
# some scripts use @TARGET_LINUX@
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(TARGET_LINUX "true")
@@ -265,10 +270,12 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
IF (lib MATCHES "^\\-l")
SET(${var} "${${var}} ${lib} ")
ELSEIF(lib MATCHES "^/")
- # Full path, convert to just filename, strip "lib" prefix and extension
- GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE)
- STRING(REGEX REPLACE "^lib" "" lib "${lib}")
- SET(${var} "${${var}}-l${lib} " )
+ IF (lib MATCHES "\\.(a|so([0-9.]*)|lib|dll|dylib)$")
+ # Full path, convert to just filename, strip "lib" prefix and extension
+ GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE)
+ STRING(REGEX REPLACE "^lib" "" lib "${lib}")
+ SET(${var} "${${var}}-l${lib} " )
+ ENDIF()
ELSE()
SET(${var} "${${var}}-l${lib} " )
ENDIF()
@@ -320,6 +327,9 @@ IF(WIN32)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT Server_Scripts)
ENDFOREACH()
ELSE()
+ # Configure this one, for testing, but do not install it.
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_config.pl.in
+ ${CMAKE_CURRENT_BINARY_DIR}/mysql_config.pl ESCAPE_QUOTES @ONLY)
# On Unix, most of the files end up in the bin directory
SET(BIN_SCRIPTS
msql2mysql
diff --git a/scripts/comp_sql.c b/scripts/comp_sql.c
index ce0e90d54a7..20dedfdfa14 100644
--- a/scripts/comp_sql.c
+++ b/scripts/comp_sql.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2004, 2010, Oracle and/or its affiliates.
- Copyright (c) 2012 Monty Program Ab
+ Copyright (c) 2012, 2014, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/scripts/msql2mysql.sh b/scripts/msql2mysql.sh
index 3c802d63705..d5f1e55af34 100644
--- a/scripts/msql2mysql.sh
+++ b/scripts/msql2mysql.sh
@@ -1,5 +1,6 @@
#!/bin/sh
# Copyright (C) 1979-2007 MySQL AB
+# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/scripts/mysql_config.pl.in b/scripts/mysql_config.pl.in
index b39bf146f58..d7b36ec9b09 100644
--- a/scripts/mysql_config.pl.in
+++ b/scripts/mysql_config.pl.in
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# -*- cperl -*-
#
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -189,7 +189,7 @@ if ( $^O eq "MSWin32" )
}
else
{
- my $linkpath = "-L$pkglibdir";
+ my $linkpath = "-L$pkglibdir @RPATH_OPTION@";
@lib_opts = ($linkpath,"-lmysqlclient");
@lib_r_opts = ($linkpath,"-lmysqlclient_r");
@lib_e_opts = ($linkpath,"-lmysqld");
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index 81b2e96fbd9..beff6e5eb5f 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -106,10 +106,10 @@ fi
# Create options
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
-libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
+libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
-libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
-embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
+libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
+embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
if [ -r "$pkglibdir/libmygcc.a" ]; then
# When linking against the static library with a different version of GCC
diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in
index e63e8646d07..40dc275a29c 100644
--- a/scripts/mysql_install_db.pl.in
+++ b/scripts/mysql_install_db.pl.in
@@ -365,7 +365,7 @@ my $hostname = hostname();
my $resolved;
if ( !$opt->{'cross-bootstrap'} and !$opt->{rpm} and !$opt->{force} )
{
- my $resolveip = $bindir/resolveip;
+ my $resolveip = "$extra_bindir/resolveip";
$resolved = `$resolveip $hostname 2>&1`;
if ( $? != 0 )
@@ -375,14 +375,14 @@ if ( !$opt->{'cross-bootstrap'} and !$opt->{rpm} and !$opt->{force} )
{
error($opt,
"Neither host '$hostname' nor 'localhost' could be looked up with",
- "$bindir/resolveip",
+ "$resolveip",
"Please configure the 'hostname' command to return a correct",
"hostname.",
"If you want to solve this at a later stage, restart this script",
"with the --force option");
}
warning($opt,
- "The host '$hostname' could not be looked up with resolveip.",
+ "The host '$hostname' could not be looked up with $resolveip.",
"This probably means that your libc libraries are not 100 % compatible",
"with this binary MySQL version. The MySQL daemon, mysqld, should work",
"normally with the exception that host name resolving will not work.",
diff --git a/scripts/mysql_test_data_timezone.sql b/scripts/mysql_test_data_timezone.sql
index 6fe0ae4c4d3..091d4f00a97 100644
--- a/scripts/mysql_test_data_timezone.sql
+++ b/scripts/mysql_test_data_timezone.sql
@@ -1,4 +1,5 @@
-- Copyright (C) 2007 MySQL AB
+-- Use is subject to license terms
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh
index f0534d0e1e9..e9df210fa84 100644
--- a/scripts/mysqlbug.sh
+++ b/scripts/mysqlbug.sh
@@ -1,5 +1,6 @@
#!/bin/sh
# Copyright (C) 2000-2002, 2004 MySQL AB
+# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by