mariadb/scripts/mysql_config.pl.in

285 lines
8.3 KiB
Perl
Raw Normal View History

#!@PERL_PATH@
make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows
2007-12-28 01:02:28 +01:00
# -*- cperl -*-
#
# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows
2007-12-28 01:02:28 +01:00
#
# 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
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows
2007-12-28 01:02:28 +01:00
##############################################################################
#
# This script reports various configuration settings that may be needed
# when using the MySQL client library.
#
# This script try to match the shell script version as close as possible,
# but in addition being compatible with ActiveState Perl on Windows.
#
# All unrecognized arguments to this script are passed to mysqld.
#
# NOTE: This script will only be used on Windows until solved how to
# handle @LIBS@ and other strings inserted that might contain
# several arguments, possibly with spaces in them.
#
# NOTE: This script was deliberately written to be as close to the shell
# script as possible, to make the maintenance of both in parallel
# easier.
#
##############################################################################
use File::Basename;
use Getopt::Long;
use Cwd;
use strict;
my @exclude_cflags =
Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives. client/mysqldump.c: Pass my_free directly as its signature is compatible with the callback type -- which wasn't the case for free_table_ent.
2010-07-08 23:20:08 +02:00
qw/DDBUG_OFF DSAFE_MUTEX DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS
We are now using Valgrind rather than purify, and have for quite some time. Consequently, rename HAVE_purify to HAVE_valgrind, and related changes. Leave some comments about purify when not clear that they apply also to Valgrind. Fix redundant IF_VALGRIND declaration. Misc. small fixes: - Fixes for pool-of-threads patch. - Fixes for push of PBXT storage engine. - mysql-test-run.pl fix. - Fix build problem in compile-pentium64-max. BUILD/SETUP.sh: Rename purify -> valgrind. BUILD/build_mccge.sh: Rename purify -> valgrind. BUILD/compile-dist: Fix that PBXT was missing in source tarball after `BUILD/compile-dist && make dist` BUILD/compile-pentium64-max: Fix a build problem with BUILD/compile-pentium64-max on CentOS/Fedora Core 10 amd64. On these systems, there is libz.so but no libz.a. Finding libz.so, ./configure decides to use system zlib. But since BUILD/compile-pentium64-max builds a fully static binary with -all-static, the link of mysqld fails due to missing libz.a. Fix by using bundled zlib in the build script. BUILD/compile-solaris-sparc-purify: Rename purify -> valgrind. include/m_string.h: Rename purify -> valgrind. include/my_global.h: Rename purify -> valgrind. mysql-test/Makefile.am: Fix that PBXT test suite was missing from `make dist` source tarball. mysql-test/lib/mtr_unique.pm: Better fix to avoid races when chmod'ing the semaphore file. (Though using chmod 666 shared files in /tmp/ is still not a very good solution). mysql-test/t/pool_of_threads.cnf: Fix that test case pool_of_threads fails if run on mysqld with no --with-libevent support. mysys/mf_qsort.c: Rename purify -> valgrind. mysys/my_alloc.c: Rename purify -> valgrind. mysys/my_init.c: Rename purify -> valgrind. mysys/my_rnd.c: Rename purify -> valgrind. mysys/safemalloc.c: Rename purify -> valgrind. scripts/mysql_config.pl.in: Rename purify -> valgrind. scripts/mysql_config.sh: Rename purify -> valgrind. sql/field_conv.cc: Rename purify -> valgrind. sql/filesort.cc: Rename purify -> valgrind. sql/ha_partition.cc: Rename purify -> valgrind. sql/hostname.cc: Rename purify -> valgrind. sql/item_timefunc.cc: Rename purify -> valgrind. sql/log_event.cc: Rename purify -> valgrind. sql/log_event_old.cc: Rename purify -> valgrind. sql/my_decimal.h: Rename purify -> valgrind. sql/mysqld.cc: Rename purify -> valgrind. Fix redundant IF_VALGRIND declaration. sql/opt_range.cc: Rename purify -> valgrind. sql/opt_range.h: Rename purify -> valgrind. sql/records.cc: Rename purify -> valgrind. sql/rpl_rli.cc: Rename purify -> valgrind. sql/rpl_rli.h: Rename purify -> valgrind. sql/set_var.cc: Fix missing static declaration on pool_of_threads. sql/slave.cc: Rename purify -> valgrind. sql/sql_base.cc: Rename purify -> valgrind. sql/sql_binlog.cc: Rename purify -> valgrind. sql/sql_class.cc: Rename purify -> valgrind. sql/sql_list.h: Rename purify -> valgrind. sql/sql_load.cc: Rename purify -> valgrind. sql/sql_select.cc: Rename purify -> valgrind. sql/table.cc: Rename purify -> valgrind. storage/archive/azio.c: Rename purify -> valgrind. storage/innobase/buf/buf0buf.c: Rename purify -> valgrind. storage/innobase/include/univ.i: Rename purify -> valgrind. storage/innobase/srv/srv0start.c: Rename purify -> valgrind. storage/maria/ha_maria.cc: Rename purify -> valgrind. storage/maria/ma_blockrec.c: Rename purify -> valgrind. storage/maria/ma_check.c: Rename purify -> valgrind. storage/maria/ma_loghandler.c: Rename purify -> valgrind. storage/maria/ma_packrec.c: Rename purify -> valgrind. storage/maria/ma_page.c: Rename purify -> valgrind. storage/maria/ma_pagecrc.c: Rename purify -> valgrind. storage/maria/ma_search.c: Rename purify -> valgrind. storage/myisam/mi_check.c: Rename purify -> valgrind. storage/myisam/mi_page.c: Rename purify -> valgrind. storage/myisam/mi_search.c: Rename purify -> valgrind. storage/myisammrg/ha_myisammrg.cc: Rename purify -> valgrind. strings/bcmp.c: Rename purify -> valgrind. strings/decimal.c: Rename purify -> valgrind. strings/strmake.c: Rename purify -> valgrind.
2009-05-06 14:03:24 +02:00
DEXTRA_DEBUG DHAVE_valgrind O O[0-9] xO[0-9] W[-A-Za-z]*
make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows
2007-12-28 01:02:28 +01:00
Xa xstrconst xc99=none
unroll2 ip mp restrict/;
my @exclude_libs = qw/lmtmalloc static-libcxa i-static static-intel/;
my $cwd = cwd();
my $basedir;
my $socket = '@MYSQL_UNIX_ADDR@';
my $version = '@VERSION@';
sub which
{
my $file = shift;
my $IFS = $^O eq "MSWin32" ? ";" : ":";
foreach my $dir ( split($IFS, $ENV{PATH}) )
{
if ( -f "$dir/$file" or -f "$dir/$file.exe" )
{
return "$dir/$file";
}
}
print STDERR "which: no $file in ($ENV{PATH})\n";
exit 1;
}
# ----------------------------------------------------------------------
# If we can find the given directory relatively to where mysql_config is
# we should use this instead of the incompiled one.
# This is to ensure that this script also works with the binary MySQL
# version
# ----------------------------------------------------------------------
sub fix_path
{
my $default = shift;
my @dirs = @_;
foreach my $dirname ( @dirs )
{
my $path = "$basedir/$dirname";
if ( -d $path )
{
return $path;
}
}
return $default;
}
sub get_full_path
{
my $file = shift;
# if the file is a symlink, try to resolve it
if ( $^O ne "MSWin32" and -l $file )
{
$file = readlink($file);
}
if ( $file =~ m,^/, )
{
# Do nothing, absolute path
}
elsif ( $file =~ m,/, )
{
# Make absolute, and remove "/./" in path
$file = "$cwd/$file";
$file =~ s,/\./,/,g;
}
else
{
# Find in PATH
$file = which($file);
}
return $file;
}
##############################################################################
#
# Form a command line that can handle spaces in paths and arguments
#
##############################################################################
sub quote_options {
my @cmd;
foreach my $opt ( @_ )
{
next unless $opt; # If undefined or empty, just skip
push(@cmd, "\"$opt\""); # Quote argument
}
return join(" ", @cmd);
}
##############################################################################
#
# Main program
#
##############################################################################
my $me = get_full_path($0);
$basedir = dirname(dirname($me)); # Remove "/bin/mysql_config" part
my $ldata = '@localstatedir@';
my $execdir = '@libexecdir@';
my $bindir = '@bindir@';
# ----------------------------------------------------------------------
# If installed, search for the compiled in directory first (might be "lib64")
# ----------------------------------------------------------------------
my $pkglibdir = fix_path('@pkglibdir@',"libmysql/relwithdebinfo",
"libmysql/release","libmysql/debug","lib/mysql","lib");
my $pkgincludedir = fix_path('@pkgincludedir@', "include/mysql", "include");
# Assume no argument with space in it
my @ldflags = split(" ",'@LDFLAGS@');
my $port;
if ( '@MYSQL_TCP_PORT_DEFAULT@' == 0 ) {
$port = 0;
} else {
$port = '@MYSQL_TCP_PORT@';
}
# ----------------------------------------------------------------------
# Create options
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
# ----------------------------------------------------------------------
my (@lib_opts,@lib_r_opts,@lib_e_opts);
if ( $^O eq "MSWin32" )
{
my $linkpath = "$pkglibdir";
# user32 is only needed for debug or embedded
my @winlibs = ("wsock32.lib","advapi32.lib","user32.lib");
@lib_opts = ("$linkpath/mysqlclient.lib",@winlibs);
@lib_r_opts = @lib_opts;
@lib_e_opts = ("$linkpath/mysqlserver.lib",@winlibs);
}
else
{
my $linkpath = "-L$pkglibdir @RPATH_OPTION@";
make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows
2007-12-28 01:02:28 +01:00
@lib_opts = ($linkpath,"-lmysqlclient");
@lib_r_opts = ($linkpath,"-lmysqlclient_r");
@lib_e_opts = ($linkpath,"-lmysqld");
}
my $flags;
$flags->{libs} =
[@ldflags,@lib_opts,'@ZLIB_DEPS@','@NON_THREADED_LIBS@','@openssl_libs@','@STATIC_NSS_FLAGS@'];
$flags->{libs_r} =
[@ldflags,@lib_r_opts,'@ZLIB_DEPS@','@LIBS@','@openssl_libs@'];
$flags->{embedded_libs} =
2020-10-29 12:38:38 +01:00
[@ldflags,@lib_e_opts,'@CMAKE_DL_LIBS@','@ZLIB_DEPS@','@LIBS@','@WRAPLIBS@','@openssl_libs@'];
make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows
2007-12-28 01:02:28 +01:00
$flags->{include} = ["-I$pkgincludedir"];
$flags->{cflags} = [@{$flags->{include}},split(" ",'@CFLAGS@')];
# ----------------------------------------------------------------------
# Remove some options that a client doesn't have to care about
# FIXME until we have a --cxxflags, we need to remove -Xa
# and -xstrconst to make --cflags usable for Sun Forte C++
# ----------------------------------------------------------------------
my $filter = join("|", @exclude_cflags);
my @tmp = @{$flags->{cflags}}; # Copy the flag list
$flags->{cflags} = []; # Clear it
foreach my $cflag ( @tmp )
{
push(@{$flags->{cflags}}, $cflag) unless $cflag =~ m/^($filter)$/o;
}
# Same for --libs(_r)
$filter = join("|", @exclude_libs);
foreach my $lib_type ( "libs","libs_r","embedded_libs" )
{
my @tmp = @{$flags->{$lib_type}}; # Copy the flag list
$flags->{$lib_type} = []; # Clear it
foreach my $lib ( @tmp )
{
push(@{$flags->{$lib_type}}, $lib) unless $lib =~ m/^($filter)$/o;
}
}
my $include = quote_options(@{$flags->{include}});
my $cflags = quote_options(@{$flags->{cflags}});
my $libs = quote_options(@{$flags->{libs}});
my $libs_r = quote_options(@{$flags->{libs_r}});
my $embedded_libs = quote_options(@{$flags->{embedded_libs}});
##############################################################################
#
# Usage information, output if no option is given
#
##############################################################################
sub usage
{
print <<EOF;
Usage: $0 [OPTIONS]
Options:
--cflags [$cflags]
--include [$include]
--libs [$libs]
--libs_r [$libs_r]
--socket [$socket]
--port [$port]
--version [$version]
--libmysqld-libs [$embedded_libs]
EOF
exit 0;
make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows
2007-12-28 01:02:28 +01:00
}
@ARGV or usage();
##############################################################################
#
# Get options and output the values
#
##############################################################################
GetOptions(
"cflags" => sub { print "$cflags\n" },
"include" => sub { print "$include\n" },
"libs" => sub { print "$libs\n" },
"libs_r" => sub { print "$libs_r\n" },
"socket" => sub { print "$socket\n" },
"port" => sub { print "$port\n" },
"version" => sub { print "$version\n" },
"embedded-libs|embedded|libmysqld-libs" =>
sub { print "$embedded_libs\n" },
) or usage();
exit 0