merge from 5.5 main

This commit is contained in:
Bjorn Munch 2010-12-17 10:37:46 +01:00
commit 2c8bccadcc
852 changed files with 25528 additions and 43483 deletions

View file

@ -9,15 +9,20 @@
*.core
*.d
*.da
*.dll
*.dylib
*.exe
*.exp
*.gcda
*.gcno
*.gcov
*.idb
*.ilk
*.la
*.lai
*.lib
*.lo
*.manifest
*.map
*.o
*.obj
@ -148,6 +153,7 @@ Makefile
Makefile.in
Makefile.in'
PENDING/*
scripts/scripts
TAGS
VC++Files/client/mysql_amd64.dsp
ac_available_languages_fragment
@ -606,6 +612,7 @@ include/mysql_version.h
include/mysqld_ername.h
include/mysqld_error.h
include/openssl
include/probes_mysql_dtrace.h
include/readline
include/readline/*.h
include/readline/readline.h
@ -1981,6 +1988,7 @@ sql-bench/test-transactions
sql-bench/test-wisconsin
sql/*.cpp
sql/*.ds?
sql/*.def
sql/*.vcproj
sql/.deps/client.Po
sql/.deps/derror.Po
@ -2116,6 +2124,7 @@ sql/.libs/udf_example.lai
sql/.libs/udf_example.so.0
sql/.libs/udf_example.so.0.0.0
sql/client.c
sql/cmake_dummy.cc
sql/Doxyfile
sql/f.c
sql/gen_lex_hash
@ -3046,6 +3055,7 @@ vio/viotest.cpp
win/configure.data
win/vs71cache.txt
win/vs8cache.txt
win/nmake_cache.txt
ylwrap
zlib/*.ds?
zlib/*.vcproj

View file

@ -4,8 +4,7 @@ extra_configs="$extra_configs $local_infile_configs"
configure="./configure $base_configs $extra_configs"
commands="\
$make -k maintainer-clean || true
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
/bin/rm -rf configure;
/bin/rm -rf CMakeCache.txt CMakeFiles/
path=`dirname $0`

View file

@ -1,77 +0,0 @@
# Copyright (C) 2002, 2004-2005 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
## Process this file with automake to create Makefile.in
EXTRA_DIST = FINISH.sh \
SETUP.sh \
autorun.sh \
cmake_configure.sh \
build_mccge.sh \
check-cpu \
cleanup \
compile-alpha \
compile-alpha-debug \
compile-amd64-debug-max \
compile-amd64-debug-max-no-ndb \
compile-amd64-gcov \
compile-amd64-gprof \
compile-amd64-max \
compile-amd64-max-sci \
compile-amd64-valgrind-max \
compile-darwin-mwcc \
compile-dist \
compile-hpux11-parisc2-aCC \
compile-ia64-debug-max \
compile-irix-mips64-mipspro \
compile-pentium \
compile-pentium-debug \
compile-pentium-debug-max \
compile-pentium-debug-max-no-embedded \
compile-pentium-debug-max-no-ndb \
compile-pentium-debug-openssl \
compile-pentium-debug-yassl \
compile-pentium-gcov \
compile-pentium-gprof \
compile-pentium-icc \
compile-pentium-icc-valgrind-max \
compile-pentium-icc-yassl \
compile-pentium-max \
compile-pentium-myodbc \
compile-pentium-pgcc \
compile-pentium-valgrind-max \
compile-pentium64 \
compile-pentium64-debug \
compile-pentium64-debug-max \
compile-pentium64-gcov \
compile-pentium64-gprof \
compile-pentium64-max \
compile-pentium64-max-sci \
compile-pentium64-valgrind-max \
compile-ppc \
compile-ppc-debug \
compile-ppc-debug-max \
compile-ppc-debug-max-no-ndb \
compile-ppc-max \
compile-solaris-amd64 \
compile-solaris-amd64-debug \
compile-solaris-amd64-forte \
compile-solaris-amd64-forte-debug \
compile-solaris-sparc \
compile-solaris-sparc-debug \
compile-solaris-sparc-forte \
compile-solaris-sparc-purify

View file

@ -111,7 +111,7 @@ else
# C++ warnings
cxx_warnings="$warnings -Wno-unused-parameter"
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
cxx_warnings="$cxx_warnings -Wnon-virtual-dtor"
debug_extra_cflags="-O0 -g3 -gdwarf-2"
fi

View file

@ -1,38 +1,9 @@
#!/bin/sh
# Create MySQL autotools infrastructure
# Create MySQL cmake configure wrapper
die() { echo "$@"; exit 1; }
# Handle "glibtoolize" (e.g., for native OS X autotools) as another
# name for "libtoolize". Use the first one, either name, found in PATH.
LIBTOOLIZE=libtoolize # Default
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
for dir in $PATH
do
if test -x $dir/glibtoolize
then
LIBTOOLIZE=glibtoolize
break
elif test -x $dir/libtoolize
then
break
fi
done
IFS="$save_ifs"
rm -rf configure
aclocal || die "Can't execute aclocal"
autoheader || die "Can't execute autoheader"
# --force means overwrite ltmain.sh script if it already exists
$LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
# --add-missing instructs automake to install missing auxiliary files
# and --force to overwrite them if they already exist
automake --add-missing --force --copy || die "Can't execute automake"
autoconf || die "Can't execute autoconf"
# Do not use autotools generated configure directly. Instead, use a script
# that will either call CMake or original configure shell script at build
# time (CMake is preferred if installed).
mv configure configure.am
cp BUILD/cmake_configure.sh configure
chmod a+x configure
# Use a configure script that will call CMake.
path=`dirname $0`
cp $path/cmake_configure.sh $path/../configure
chmod +x $path/../configure

View file

@ -1,14 +1,17 @@
#!/bin/sh
# Choose whether to use autoconf created configure
# of perl script that calls cmake.
# Ensure cmake and perl are there
cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
perl --version >/dev/null 2>&1 || HAVE_PERL=no
scriptdir=`dirname $0`
if test "$HAVE_CMAKE" = "no"
then
sh $scriptdir/configure.am "$@"
echo "CMake is required to build MySQL."
exit 1
elif test "$HAVE_PERL" = "no"
then
echo "Perl is required to build MySQL using the configure to CMake translator."
exit 1
else
perl $scriptdir/cmake/configure.pl "$@"
fi

View file

@ -7,18 +7,3 @@ extra_flags="$amd64_cflags $debug_cflags $valgrind_flags"
extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh"
if test -z "$just_print"
then
set +v +x
echo "\
******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
function (for example an uninitialized value used as an argument of an
assembly function), Valgrind will not print the stacktrace and 'valgrind
--gdb-attach=yes' will not work either. If you need a stacktrace in those
cases, you have to run BUILD/compile-pentium-valgrind-max with the
--disable-assembler argument.
******************************************************************************"
fi

View file

@ -7,18 +7,3 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh"
if test -z "$just_print"
then
set +v +x
echo "\
******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
function (for example an uninitialized value used as an argument of an
assembly function), Valgrind will not print the stacktrace and 'valgrind
--gdb-attach=yes' will not work either. If you need a stacktrace in those
cases, you have to run BUILD/compile-pentium-valgrind-max with the
--disable-assembler argument.
******************************************************************************"
fi

View file

@ -7,18 +7,3 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_no_ndb_configs"
. "$path/FINISH.sh"
if test -z "$just_print"
then
set +v +x
echo "\
******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
function (for example an uninitialized value used as an argument of an
assembly function), Valgrind will not print the stacktrace and 'valgrind
--gdb-attach=yes' will not work either. If you need a stacktrace in those
cases, you have to run BUILD/compile-pentium-valgrind-max with the
--disable-assembler argument.
******************************************************************************"
fi

View file

@ -7,18 +7,3 @@ extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh"
if test -z "$just_print"
then
set +v +x
echo "\
******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
function (for example an uninitialized value used as an argument of an
assembly function), Valgrind will not print the stacktrace and 'valgrind
--gdb-attach=yes' will not work either. If you need a stacktrace in those
cases, you have to run BUILD/compile-pentium-valgrind-max with the
--disable-assembler argument.
******************************************************************************"
fi

View file

@ -61,6 +61,13 @@ SET(BUILDTYPE_DOCSTRING
IF(WITH_DEBUG)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING ${BUILDTYPE_DOCSTRING} FORCE)
SET(MYSQL_MAINTAINER_MODE ON CACHE BOOL
"MySQL maintainer-specific development environment")
IF(UNIX AND NOT APPLE)
# Compiling with PIC speeds up embedded build, on PIC sensitive systems
# Predefine it to ON, in case user chooses to build embedded.
SET(WITH_PIC ON CACHE BOOL "Compile with PIC")
ENDIF()
SET(OLD_WITH_DEBUG 1 CACHE INTERNAL "" FORCE)
ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG)
IF(CUSTOM_C_FLAGS)
@ -72,12 +79,12 @@ ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG)
SET(OLD_WITH_DEBUG 0 CACHE INTERNAL "" FORCE)
ENDIF()
IF(BUILD_CONFIG)
SET(CMAKE_USER_MAKE_RULES_OVERRIDE
${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
ENDIF()
PROJECT(MySQL)
IF(BUILD_CONFIG)
INCLUDE(
${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
ENDIF()
# Include the platform-specific file. To allow exceptions, this code
# looks for files in order of how specific they are. If there is, for
@ -108,18 +115,27 @@ ENDIF()
# Control aspects of the development environment which are
# specific to MySQL maintainers and developers.
#
INCLUDE (CheckCCompilerFlag)
OPTION(MYSQL_MAINTAINER_MODE "MySQL maintainer-specific development environment" OFF)
# Whether the maintainer mode should be enabled.
IF(MYSQL_MAINTAINER_MODE)
IF(CMAKE_COMPILER_IS_GNUCC)
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" HAVE_DECLARATION_AFTER_STATEMENT)
IF(HAVE_DECLARATION_AFTER_STATEMENT)
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT "-Wdeclaration-after-statement")
ENDIF()
SET(MY_MAINTAINER_C_WARNINGS
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
CACHE STRING "C warning options used in maintainer builds.")
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_C_WARNINGS} -Wno-unused-parameter"
CACHE STRING "C++ warning options used in maintainer builds.")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
SET(MY_MAINTAINER_C_WARNINGS
"${MY_MAINTAINER_C_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
CACHE STRING "C warning options used in maintainer builds.")
ENDIF()
# Do not make warnings in checks into errors.
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
@ -315,23 +331,33 @@ ELSE()
SET(CPACK_GENERATOR "TGZ")
ENDIF()
ADD_SUBDIRECTORY(packaging/WiX)
# Create a single package with "make package"
# (see http://public.kitware.com/Bug/view.php?id=11452)
SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "")
INCLUDE(CPack)
IF(UNIX)
INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL)
INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info)
ENDIF()
#
# RPM installs documentation directly from the source tree
#
IF(NOT INSTALL_LAYOUT MATCHES "RPM")
INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql DESTINATION ${INSTALL_DOCREADMEDIR} OPTIONAL)
INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR})
INSTALL(FILES COPYING LICENSE.mysql
DESTINATION ${INSTALL_DOCREADMEDIR}
COMPONENT Readme
OPTIONAL
)
INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
IF(UNIX)
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR})
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
ENDIF()
# MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory
SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR}
COMPONENT Documentation
PATTERN "INSTALL-BINARY" EXCLUDE
PATTERN "Makefile.*" EXCLUDE
PATTERN "glibc*" EXCLUDE

View file

@ -1,39 +0,0 @@
# Copyright (C) 2000-2006 MySQL 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
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
EXTRA_DIST = mysql.info INSTALL-BINARY @extra_docs@
# make sure that "make install" installs the info page, too
# automake only seems to take care of this automatically,
# if we're building the info page from texi directly.
install-data-hook: $(srcdir)/mysql.info
if test `basename $(prefix)` = "mysql" ; then \
$(mkinstalldirs) $(DESTDIR)$(prefix)/docs ; \
$(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(prefix)/docs ; \
test ! -f $(top_srcdir)/ChangeLog || $(INSTALL_DATA) $(top_srcdir)/ChangeLog $(DESTDIR)$(prefix)/docs ; \
else \
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(pkgdatadir) ; \
$(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(infodir) ; \
test ! -f $(top_srcdir)/ChangeLog || $(INSTALL_DATA) $(top_srcdir)/ChangeLog $(DESTDIR)$(pkgdatadir) ; \
fi
uninstall-local:
if test `basename $(prefix)` = "mysql" ; then \
@RM@ -f $(DESTDIR)$(prefix)/docs/mysql.info ; \
@RM@ -f $(DESTDIR)$(prefix)/docs/ChangeLog ; \
else \
@RM@ -f $(DESTDIR)$(infodir)/mysql.info ; \
@RM@ -f $(DESTDIR)$(pkgdatadir)/ChangeLog ; \
fi

View file

@ -1,119 +0,0 @@
MySQL FLOSS License Exception
The MySQL AB Exception for Free/Libre and Open Source
Software-only Applications Using MySQL Client Libraries (the
"FLOSS Exception").
Version 0.6, 7 March 2007
Exception Intent
We want specified Free/Libre and Open Source Software (``FLOSS'')
applications to be able to use specified GPL-licensed MySQL client
libraries (the ``Program'') despite the fact that not all FLOSS
licenses are compatible with version 2 of the GNU General Public
License (the ``GPL'').
Legal Terms and Conditions
As a special exception to the terms and conditions of version 2.0
of the GPL:
1. You are free to distribute a Derivative Work that is formed
entirely from the Program and one or more works (each, a
"FLOSS Work") licensed under one or more of the licenses
listed below in section 1, as long as:
a. You obey the GPL in all respects for the Program and the
Derivative Work, except for identifiable sections of the
Derivative Work which are not derived from the Program,
and which can reasonably be considered independent and
separate works in themselves,
b. all identifiable sections of the Derivative Work which
are not derived from the Program, and which can
reasonably be considered independent and separate works
in themselves,
i. are distributed subject to one of the FLOSS licenses
listed below, and
ii. the object code or executable form of those sections
are accompanied by the complete corresponding
machine-readable source code for those sections on
the same medium and under the same FLOSS license as
the corresponding object code or executable forms of
those sections, and
c. any works which are aggregated with the Program or with a
Derivative Work on a volume of a storage or distribution
medium in accordance with the GPL, can reasonably be
considered independent and separate works in themselves
which are not derivatives of either the Program, a
Derivative Work or a FLOSS Work.
If the above conditions are not met, then the Program may only
be copied, modified, distributed or used under the terms and
conditions of the GPL or another valid licensing option from
MySQL AB.
2. FLOSS License List
License name Version(s)/Copyright Date
Academic Free License 2.0
Apache Software License 1.0/1.1/2.0
Apple Public Source License 2.0
Artistic license From Perl 5.8.0
BSD license "July 22 1999"
Common Development and Distribution License (CDDL) 1.0
Common Public License 1.0
Eclipse Public License 1.0
GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1
Jabber Open Source License 1.0
MIT license (As listed in file MIT-License.txt) ---
Mozilla Public License (MPL) 1.0/1.1
Open Software License 2.0
OpenSSL license (with original SSLeay license) "2003" ("1998")
PHP License 3.0
Python license (CNRI Python License) ---
Python Software Foundation License 2.1.1
Sleepycat License "1999"
University of Illinois/NCSA Open Source License ---
W3C License "2001"
X11 License "2001"
Zlib/libpng License ---
Zope Public License 2.0
Due to the many variants of some of the above licenses, we
require that any version follow the 2003 version of the Free
Software Foundation's Free Software Definition
(http://www.gnu.org/philosophy/free-sw.html) or version 1.9 of
the Open Source Definition by the Open Source Initiative
(http://www.opensource.org/docs/definition.php).
3. Definitions
a. Terms used, but not defined, herein shall have the
meaning provided in the GPL.
b. Derivative Work means a derivative work under copyright
law.
4. Applicability: This FLOSS Exception applies to all Programs
that contain a notice placed by MySQL AB saying that the
Program may be distributed under the terms of this FLOSS
Exception. If you create or distribute a work which is a
Derivative Work of both the Program and any other work
licensed under the GPL, then this FLOSS Exception is not
available for that work; thus, you must remove the FLOSS
Exception notice from that work and comply with the GPL in all
respects, including by retaining all GPL notices. You may
choose to redistribute a copy of the Program exclusively under
the terms of the GPL by removing the FLOSS Exception notice
from that copy of the Program, provided that the copy has
never been modified by you or any third party.
Appendix A. Qualified Libraries and Packages
The following is a non-exhaustive list of libraries and packages
which are covered by the FLOSS License Exception. Please note that
this appendix is provided merely as an additional service to
specific FLOSS projects wishing to simplify licensing information
for their users. Compliance with one of the licenses noted under
the "FLOSS license list" section remains a prerequisite.
Package Name Qualifying License and Version
Apache Portable Runtime (APR) Apache Software License 2.0

View file

@ -1,335 +0,0 @@
# Copyright 2000-2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Process this file with automake to create Makefile.in
AUTOMAKE_OPTIONS = foreign
# These are built from source in the Docs directory
EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
README COPYING EXCEPTIONS-CLIENT \
CMakeLists.txt configure.cmake config.h.cmake BUILD-CMAKE
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
@readline_topdir@ sql-common scripts \
libservices \
@sql_union_dirs@ unittest \
@sql_server@ @man_dirs@ tests \
@libmysqld_dirs@ \
mysql-test support-files sql-bench \
win \
packaging \
cmake
DIST_SUBDIRS = . include Docs zlib \
cmd-line-utils sql-common scripts \
libservices \
strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
vio sql man tests \
libmysqld \
mysql-test support-files sql-bench \
win \
cmake \
packaging \
BUILD
DISTCLEANFILES = ac_available_languages_fragment
# Create permission databases
init-db: all
$(top_builddir)/scripts/mysql_install_db
bin-dist: all
$(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
# Remove BK's "SCCS" subdirectories from source distribution
# Create initial database files for Windows installations and check them.
dist-hook:
rm -rf `find $(distdir) -type d -name SCCS -print`
mkdir -p $(distdir)/win
scripts/mysql_install_db --no-defaults --cross-bootstrap \
--builddir=$(top_builddir) \
--datadir=$(distdir)/win/data \
--srcdir=$(top_srcdir)
storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
test ! -f $(top_srcdir)/configure.am || \
$(INSTALL_DATA) $(top_srcdir)/configure.am $(distdir)
all-local: @ABI_CHECK@
tags:
support-files/build-tags
.PHONY: init-db bin-dist \
test test-force test-full test-force-full test-force-mem \
test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
test-unit test-ps test-nr test-pr test-ns test-binlog-statement \
test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp \
test-ext-stress test-ext test-embedded test-reprepare \
test-fast test-fast-cursor test-fast-view test-fast-prepare \
test-full-qa
# Target 'test' will run the regression test suite using the built server.
#
# If you are running in a shared environment, users can avoid clashing
# port numbers by setting individual small numbers 1-100 to the
# environment variable MTR_BUILD_THREAD. The script "mysql-test-run"
# will then calculate the various port numbers it needs from this,
# making sure each user use different ports.
test-unit:
cd unittest && $(MAKE) test
test-ps:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed
test-nr:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row
test-pr:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol --mysqld=--binlog-format=row
test-ns:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed ; \
@PERL@ ./mysql-test-run.pl $(force) $(mem) --suite=funcs_1
test-binlog-statement:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
# This code is duplicated in "test-bt", see the Changeset comment of 2007-Dec-07
test-embedded:
if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
--embedded-server --skip-rpl --skip-ndbcluster ; \
else \
echo "no program found for 'embedded' tests - skipped testing" ; \
fi
test-reprepare:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol \
--mysqld=--debug=+d,reprepare_each_statement
test: test-unit test-ns test-pr
smoke:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --do-test=s
test-full: test test-nr test-ps
test-force:
$(MAKE) -k force=--force test
test-force-full:
$(MAKE) -k force=--force test-full
#used by autopush.pl to run memory based tests
test-force-mem:
$(MAKE) -k force=--force mem=--mem test
EXP = --experimental=collections/default.experimental
test-bt:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=normal --force --timer \
--skip-ndbcluster --report-features $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ps --force --timer \
--skip-ndbcluster --ps-protocol $(EXP)
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
cd mysql-test ; \
MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ndb+ps --force --timer \
--ps-protocol --mysqld=--binlog-format=row --suite=ndb $(EXP) ; \
MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
--with-ndbcluster-only $(EXP) ; \
else \
echo "no program found for 'ndbcluster' tests - skipped testing" ; \
fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs1+ps --ps-protocol --reorder --suite=funcs_1 $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2 $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp $(EXP)
-if [ -d mysql-test/suite/nist ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=nist --force --suite=nist $(EXP) ; \
fi
-if [ -d mysql-test/suite/nist ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=nist+ps --force --suite=nist --ps-protocol $(EXP) ; \
fi
-if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
--embedded-server --skip-rpl --skip-ndbcluster $(EXP) ; \
else \
echo "no program found for 'embedded' tests - skipped testing" ; \
fi
test-bt-fast:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ps --force --timer \
--skip-ndbcluster --ps-protocol --report-features $(EXP)
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
cd mysql-test ; \
MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
--with-ndbcluster-only $(EXP) ; \
else \
echo "no program found for 'ndbcluster' tests - skipped testing" ; \
fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress $(EXP)
test-bt-debug:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=debug --force --timer \
--skip-ndbcluster --skip-rpl --report-features $(EXP)
# Keep these for a while
test-pl: test
test-full-pl: test-full
test-force-pl: test-force
test-force-pl-mem: test-force-mem
test-force-full-pl: test-force-full
test-ext-funcs:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --reorder --suite=funcs_1 ; \
@PERL@ ./mysql-test-run.pl --force --suite=funcs_2
test-ext-rpl:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --suite=rpl
test-ext-partitions:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --suite=parts
test-ext-jp:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --suite=jp
test-ext-stress:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --big-test --suite=stress
test-ext: test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp test-ext-stress
test-fast:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --suite=stress --do-test=ddl_myisam
test-fast-view:
$(MAKE) subset=--view-protocol test-fast
test-fast-cursor:
$(MAKE) subset=--cursor-protocol test-fast
test-fast-prepare:
$(MAKE) subset=--ps-protocol test-fast
test-full-qa:
$(MAKE) force=--force test-pr \
test-binlog-statement test-ext test-fast-view \
test-fast-cursor test-unit
#
# Headers which need to be checked for abi/api compatibility.
#
API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin_audit.h \
$(top_srcdir)/include/mysql/plugin_ftparser.h \
$(top_srcdir)/include/mysql.h \
$(top_srcdir)/include/mysql/psi/psi_abi_v1.h \
$(top_srcdir)/include/mysql/psi/psi_abi_v2.h \
$(top_srcdir)/include/mysql/client_plugin.h \
$(top_srcdir)/include/mysql/plugin_auth.h
#
# Rules for checking that the abi/api has not changed.
#
# The following steps are followed in the do_abi_check rule below
#
# 1) Generate preprocessor output for the files that need to
# be tested for abi/api changes. use -nostdinc to prevent
# generation of preprocessor output for system headers. This
# results in messages in stderr saying that these headers
# were not found. Redirect the stderr output to /dev/null
# to prevent seeing these messages.
# 2) sed the output to
# 2.1) remove blank lines and lines that begin with "# "
# 2.2) When gcc -E is run on the Mac OS and solaris sparc platforms it
# introduces a line of output that shows up as a difference between
# the .pp and .out files. Remove these OS specific preprocessor text
# inserted by the preprocessor.
# 3) diff the generated file and the canons (.pp files already in
# the repository).
# 4) delete the .out file that is generated.
#
# If the diff fails, the generated file is not removed. This will
# be useful for analysis of ABI differences (e.g. using a visual
# diff tool).
#
# A ABI change that causes a build to fail will always be accompanied
# by new canons (.out files). The .out files that are not removed will
# be replaced as the new .pp files.
#
# e.g. If include/mysql/plugin.h has an ABI change then this rule would
# leave a <build directory>/abi_check.out file.
#
# A developer with a justified API change will then do a
# mv <build directory>/abi_check.out include/mysql/plugin.pp
# to replace the old canons with the new ones.
#
abi_check: $(API_PREPROCESSOR_HEADER)
$(MAKE) abi_headers="$^" do_abi_check
abi_check_all: abi_check
do_abi_check:
set -ex; \
for file in $(abi_headers); do \
@CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/mysql \
-I$(top_srcdir)/sql \
-I$(top_builddir)/include \
-I$(top_builddir)/include/mysql \
-I$(top_builddir)/sql \
$$file 2>/dev/null | \
@SED@ -e '/^# /d' \
-e '/^[ ]*$$/d' \
-e '/^#pragma GCC set_debug_pwd/d' \
-e '/^#ident/d' > \
$(top_builddir)/abi_check.out; \
@DIFF@ -w $$file.pp $(top_builddir)/abi_check.out; \
@RM@ $(top_builddir)/abi_check.out; \
done

4464
README

File diff suppressed because it is too large Load diff

4
VERSION Normal file
View file

@ -0,0 +1,4 @@
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=9
MYSQL_VERSION_EXTRA=

View file

@ -1,125 +0,0 @@
# Copyright (C) 2000-2006 MySQL 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
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# This file is public domain and comes with NO WARRANTY of any kind
if THREAD_SAFE_CLIENT
LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql_r/libmysqlclient_r.la
else
LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql/libmysqlclient.la
endif
INCLUDES = -I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/regex \
$(openssl_includes)
LIBS = @CLIENT_LIBS@
LDADD= @CLIENT_EXTRA_LDFLAGS@ $(CLIENT_THREAD_LIBS) \
$(top_builddir)/libmysql/libmysqlclient.la
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
client_priv.h
EXTRA_DIST = get_password.c CMakeLists.txt echo.c
BUILT_SOURCES = link_sources
CLEANFILES = $(BUILT_SOURCES)
bin_PROGRAMS = mysql \
mysqladmin \
mysqlbinlog \
mysqlcheck \
mysqldump \
mysqlimport \
mysqlshow \
mysqlslap \
mysqltest \
mysql_upgrade
mysql_SOURCES = mysql.cc readline.cc sql_string.cc \
completion_hash.cc
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ \
$(LDADD) $(CXXLDFLAGS)
mysqladmin_SOURCES = mysqladmin.cc
mysqlbinlog_SOURCES = mysqlbinlog.cc \
$(top_srcdir)/mysys/mf_tempdir.c \
$(top_srcdir)/mysys/my_new.cc \
$(top_srcdir)/mysys/my_bit.c \
$(top_srcdir)/mysys/my_bitmap.c \
$(top_srcdir)/mysys/base64.c
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
mysqldump_SOURCES= mysqldump.c \
my_user.c \
$(top_srcdir)/mysys/mf_getdate.c
mysqlimport_SOURCES= mysqlimport.c
mysqlimport_CFLAGS= -DTHREAD -UUNDEF_THREADS_HACK
mysqlimport_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
@CLIENT_EXTRA_LDFLAGS@ \
$(LIBMYSQLCLIENT_LA) \
$(top_builddir)/mysys/libmysys.a
mysqlshow_SOURCES= mysqlshow.c
mysqlslap_SOURCES= mysqlslap.c
mysqlslap_CFLAGS= -DTHREAD -UMYSQL_CLIENT_NO_THREADS
mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
@CLIENT_EXTRA_LDFLAGS@ \
$(LIBMYSQLCLIENT_LA) \
$(top_builddir)/mysys/libmysys.a
mysqltest_SOURCES= mysqltest.cc
mysqltest_CXXFLAGS= -DTHREAD -UMYSQL_CLIENT_NO_THREADS
mysqltest_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
@CLIENT_EXTRA_LDFLAGS@ \
$(LIBMYSQLCLIENT_LA) \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/regex/libregex.a \
$(CLIENT_THREAD_LIBS)
mysql_upgrade_SOURCES= mysql_upgrade.c \
$(top_srcdir)/mysys/my_getpagesize.c
# Fix for mit-threads
DEFS = -DMYSQL_CLIENT_NO_THREADS \
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
-DMYSQL_DATADIR="\"$(localstatedir)\""
sql_src=log_event.h sql_priv.h rpl_constants.h \
rpl_tblmap.h rpl_tblmap.cc \
log_event.cc my_decimal.h my_decimal.cc \
log_event_old.h log_event_old.cc \
rpl_record_old.h rpl_record_old.cc \
rpl_utility.h rpl_utility.cc \
transaction.h sql_const.h
strings_src=decimal.c dtoa.c
link_sources:
for f in $(sql_src) ; do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
done; \
for f in $(strings_src) ; do \
rm -f $(srcdir)/$$f; \
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
done; \
rm -f $(srcdir)/my_user.c; \
@LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c;
echo timestamp > link_sources;

View file

@ -3739,7 +3739,8 @@ print_tab_data(MYSQL_RES *result)
}
static int
com_tee(String *buffer, char *line __attribute__((unused)))
com_tee(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
char file_name[FN_REFLEN], *end, *param;
@ -3798,7 +3799,8 @@ com_notee(String *buffer __attribute__((unused)),
#ifdef USE_POPEN
static int
com_pager(String *buffer, char *line __attribute__((unused)))
com_pager(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
char pager_name[FN_REFLEN], *end, *param;
@ -3923,7 +3925,8 @@ com_rehash(String *buffer __attribute__((unused)),
#ifdef USE_POPEN
static int
com_shell(String *buffer, char *line __attribute__((unused)))
com_shell(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
char *shell_cmd;
@ -4015,7 +4018,8 @@ com_connect(String *buffer, char *line)
}
static int com_source(String *buffer, char *line)
static int com_source(String *buffer __attribute__((unused)),
char *line)
{
char source_name[FN_REFLEN], *end, *param;
LINE_BUFFER *line_buff;
@ -4929,7 +4933,8 @@ static void init_username()
}
}
static int com_prompt(String *buffer, char *line)
static int com_prompt(String *buffer __attribute__((unused)),
char *line)
{
char *ptr=strchr(line, ' ');
prompt_counter = 0;

View file

@ -1010,10 +1010,11 @@ static struct my_option my_long_options[] =
"row-based events; 'decode-rows' decodes row events into commented SQL "
"statements if the --verbose option is also given; 'auto' prints base64 "
"only when necessary (i.e., for row-based events and format description "
"events); 'always' prints base64 whenever possible. 'always' is for "
"debugging only and should not be used in a production system. If this "
"argument is not given, the default is 'auto'; if it is given with no "
"argument, 'always' is used.",
"events); 'always' prints base64 whenever possible. 'always' is "
"deprecated, will be removed in a future version, and should not be used "
"in a production system. --base64-output with no 'name' argument is "
"equivalent to --base64-output=always and is also deprecated. If no "
"--base64-output[=name] option is given at all, the default is 'auto'.",
&opt_base64_output_mode_str, &opt_base64_output_mode_str,
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
/*
@ -2024,6 +2025,13 @@ int main(int argc, char** argv)
if (opt_base64_output_mode == BASE64_OUTPUT_UNSPEC)
opt_base64_output_mode= BASE64_OUTPUT_AUTO;
if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS)
warning("The --base64-output=always flag and the --base64-output flag "
"(with '=MODE' omitted), are deprecated. "
"The output generated when these flags are used cannot be "
"parsed by mysql 5.6.0 and later. "
"The flags will be removed in a future version. "
"Please use --base64-output=auto instead.");
my_set_max_open_files(open_files_limit);

View file

@ -5405,8 +5405,13 @@ void do_connect(struct st_command *command)
opt_charsets_dir);
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if (opt_use_ssl || con_ssl)
if (opt_use_ssl)
con_ssl= 1;
#endif
if (con_ssl)
{
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
#if MYSQL_VERSION_ID >= 50000
@ -5415,36 +5420,37 @@ void do_connect(struct st_command *command)
mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
&opt_ssl_verify_server_cert);
#endif
}
#endif
}
#ifdef __WIN__
if (con_pipe)
{
#ifdef __WIN__
opt_protocol= MYSQL_PROTOCOL_PIPE;
}
#endif
}
if (opt_protocol)
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
#ifdef HAVE_SMEM
if (con_shm)
{
#ifdef HAVE_SMEM
uint protocol= MYSQL_PROTOCOL_MEMORY;
if (!ds_shm.length)
die("Missing shared memory base name");
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
#endif
}
else if(shared_memory_base_name)
#ifdef HAVE_SMEM
else if (shared_memory_base_name)
{
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
shared_memory_base_name);
shared_memory_base_name);
}
#endif
/* Use default db name */
if (ds_database.length == 0)
dynstr_set(&ds_database, opt_db);
@ -5731,6 +5737,8 @@ void do_block(enum block_cmd cmd, struct st_command* command)
case GE_OP:
v.int_val= (v.int_val >= v2.int_val);
break;
case ILLEG_OP:
die("Impossible operator, this cannot happen");
}
v.is_int= TRUE;

View file

@ -69,9 +69,13 @@ public:
}
static void *operator new(size_t size, MEM_ROOT *mem_root)
{ return (void*) alloc_root(mem_root, (uint) size); }
static void operator delete(void *ptr_arg,size_t size)
{ TRASH(ptr_arg, size); }
static void operator delete(void *ptr_arg, MEM_ROOT *mem_root)
static void operator delete(void *ptr_arg, size_t size)
{
(void) ptr_arg;
(void) size;
TRASH(ptr_arg, size);
}
static void operator delete(void *, MEM_ROOT *)
{ /* never called */ }
~String() { free(); }

View file

@ -1,40 +0,0 @@
EXTRA_DIST = \
cmake_parse_arguments.cmake \
cpack_source_ignore_files.cmake \
package_name.cmake \
configurable_file_content.in \
check_minimal_version.cmake \
create_initial_db.cmake.in \
make_dist.cmake.in \
dtrace.cmake \
abi_check.cmake \
bison.cmake \
configure.pl \
character_sets.cmake \
libutils.cmake \
readline.cmake \
mysql_version.cmake \
install_macros.cmake \
ssl.cmake \
plugin.cmake \
zlib.cmake \
stack_direction.c \
do_abi_check.cmake \
merge_archives_unix.cmake.in \
dtrace_prelink.cmake \
versioninfo.rc.in \
mysql_add_executable.cmake \
tags.cmake \
install_layout.cmake \
build_configurations/mysql_release.cmake \
os/Windows.cmake \
os/WindowsCache.cmake \
os/Linux.cmake \
os/SunOS.cmake \
os/Darwin.cmake \
os/HP-UX.cmake \
os/AIX.cmake \
os/OS400.cmake \
os/Cygwin.cmake

View file

@ -27,12 +27,14 @@ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME MATCHES "Linux")
ELSE()
SET(COMPILER ${CMAKE_C_COMPILER})
ENDIF()
SET(API_PREPROCESSOR_HEADER
SET(API_PREPROCESSOR_HEADER
${CMAKE_SOURCE_DIR}/include/mysql/plugin_audit.h
${CMAKE_SOURCE_DIR}/include/mysql/plugin_ftparser.h
${CMAKE_SOURCE_DIR}/include/mysql.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v2.h
${CMAKE_SOURCE_DIR}/include/mysql/client_plugin.h
${CMAKE_SOURCE_DIR}/include/mysql/plugin_auth.h
)
ADD_CUSTOM_TARGET(abi_check ALL

View file

@ -101,8 +101,10 @@ IF(NOT COMPILATION_COMMENT)
ENDIF()
IF(WIN32)
# Sign executables with authenticode certificate
SET(SIGNCODE 1 CACHE BOOL "")
IF(NOT CMAKE_USING_VC_FREE_TOOLS)
# Sign executables with authenticode certificate
SET(SIGNCODE 1 CACHE BOOL "")
ENDIF()
ENDIF()
IF(UNIX)
@ -120,7 +122,13 @@ IF(UNIX)
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO)
MESSAGE(FATAL_ERROR "aio is required on Linux")
MESSAGE(FATAL_ERROR "
aio is required on Linux, you need to install the required library:
Debian/Ubuntu: apt-get install libaio-dev
RedHat/Fedora/Oracle Linux: yum install libaio-devel
SuSE: zypper install libaio-devel
")
ENDIF()
ENDIF()
@ -219,22 +227,4 @@ IF(UNIX)
ENDIF()
ENDIF()
ENDIF()
IF(CMAKE_C_FLAGS_DEBUG)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}"
CACHE STRING "Debug C compile flags")
ENDIF()
IF(CMAKE_CXX_FLAGS_DEBUG)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}"
CACHE STRING "Debug C++ compile flags")
ENDIF()
IF(CMAKE_C_FLAGS_RELWITHDEBINFO)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}"
CACHE STRING "RelWithDebInfo C compile flags")
ENDIF()
IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO)
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
CACHE STRING "RelWithDebInfo C++ compile flags")
ENDIF()
ENDIF()

View file

@ -185,6 +185,11 @@ foreach my $option (@ARGV)
($option =~ /enable/ ? "1" : "0");
next;
}
if ($option =~ /with-comment=/)
{
$cmakeargs = $cmakeargs." \"-DWITH_COMMENT=".substr($option,13)."\"";
next;
}
$option = uc($option);
$option =~ s/-/_/g;

View file

@ -26,7 +26,7 @@
# Build as per default RPM layout, with prefix=/usr
#
# DEB
# Build as per STANDALONE, prefix=/opt/mysql-$major.$minor
# Build as per STANDALONE, prefix=/opt/mysql/server-$major.$minor
#
# SVR4
# Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
@ -74,7 +74,7 @@ IF(UNIX)
IF(INSTALL_LAYOUT MATCHES "RPM")
SET(default_prefix "/usr")
ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
SET(default_prefix "/opt/${MYSQL_BASE_VERSION}")
SET(default_prefix "/opt/mysql/server-${MYSQL_BASE_VERSION}")
# This is required to avoid "cpack -GDEB" default of prefix=/usr
SET(CPACK_SET_DESTDIR ON)
ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")

View file

@ -78,7 +78,9 @@ FUNCTION(INSTALL_MANPAGE file)
ELSE()
SET(SECTION man8)
ENDIF()
INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}")
MESSAGE("huj!")
INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}"
COMPONENT ManPages)
ENDIF()
ENDFUNCTION()
@ -137,12 +139,7 @@ IF(UNIX)
STRING(REPLACE "${CMAKE_CFG_INTDIR}"
"\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
ENDIF()
IF(component)
SET(COMP COMPONENT ${component})
ELSE()
SET(COMP)
ENDIF()
INSTALL(FILES ${output} DESTINATION ${destination} ${COMP})
INSTALL(FILES ${output} DESTINATION ${destination} COMPONENT ${component})
ENDIF()
ENDMACRO()
@ -224,8 +221,6 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
IF(SIGNCODE AND SIGNCODE_ENABLED)
SIGN_TARGET(${target})
ENDIF()
# For Windows, add version info to executables
ADD_VERSION_INFO(${target})
# Install man pages on Unix
IF(UNIX)
GET_TARGET_PROPERTY(target_location ${target} LOCATION)

View file

@ -250,6 +250,9 @@ MACRO(MERGE_LIBRARIES)
ENDFOREACH()
ENDIF()
CREATE_EXPORT_FILE(SRC ${TARGET} "${ARG_EXPORTS}")
IF(NOT ARG_NOINSTALL)
ADD_VERSION_INFO(${TARGET} SHARED SRC)
ENDIF()
ADD_LIBRARY(${TARGET} ${LIBTYPE} ${SRC})
TARGET_LINK_LIBRARIES(${TARGET} ${LIBS})
IF(ARG_OUTPUT_NAME)

View file

@ -14,19 +14,12 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Make source distribution
# If bzr is present, run bzr export, add output of BUILD/autorun.sh
# if autotools are present, also pack bison output into it.
# If bzr is present, run bzr export.
# Otherwise, just run cpack with source configuration.
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@")
SET(GLIBTOOLIZE_EXECUTABLE "@GLIBTOOLIZE_EXECUTABLE@")
SET(LIBTOOLIZE_EXECUTABLE "@LIBTOOLIZE_EXECUTABLE@")
SET(ACLOCAL_EXECUTABLE "@ACLOCAL_EXECUTABLE@")
SET(AUTOCONF_EXECUTABLE "@AUTOCONF_EXECUTABLE@")
SET(AUTOHEADER_EXECUTABLE "@AUTOHEADER_EXECUTABLE@")
SET(AUTOMAKE_EXECUTABLE "@AUTOMAKE_EXECUTABLE@")
SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@")
SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
@ -101,28 +94,6 @@ IF(NOT BZR_EXECUTABLE)
)
ENDIF()
# Try to pack output of BUILD/autorun, if autotools are present
IF(GLIBTOOLIZE_EXECUTABLE OR LIBTOOLIZE_EXECUTABLE)
IF(ACLOCAL_EXECUTABLE AND AUTOMAKE_EXECUTABLE AND AUTOCONF_EXECUTABLE
AND AUTOHEADER_EXECUTABLE)
SET(HAVE_AUTOTOOLS 1)
ENDIF()
ENDIF()
IF(HAVE_AUTOTOOLS)
EXECUTE_PROCESS(COMMAND BUILD/autorun.sh
WORKING_DIRECTORY ${PACKAGE_DIR})
ELSE()
MESSAGE( "Autotools not found, resulting source package can only be built"
" with cmake")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/configure.pl
${PACKAGE_DIR}/configure
COPYONLY)
IF(UNIX)
EXECUTE_PROCESS(COMMAND chmod +x ${PACKAGE_DIR}/configure)
ENDIF()
ENDIF()
# Copy bison output
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
${PACKAGE_DIR}/sql/sql_yacc.h COPYONLY)
@ -138,7 +109,6 @@ ENDIF()
# In case we used CPack, it could have copied some
# extra files that are not usable on different machines.
FILE(REMOVE ${PACKAGE_DIR}/CMakeCache.txt)
FILE(REMOVE_RECURSE ${PACKAGE_DIR}/autom4te.cache)
# When packing source, prefer gnu tar to "cmake -P tar"
# cmake does not preserve timestamps.gnuwin32 tar is broken, cygwin is ok

View file

@ -37,7 +37,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
SET(sources ${ARG_DEFAULT_ARGS})
ADD_VERSION_INFO(${target} EXECUTABLE sources)
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
# tell CPack where to install
IF(NOT ARG_EXCLUDE_FROM_ALL)

View file

@ -13,16 +13,24 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Read value for a variable from configure.in
#
# Global constants, only to be changed between major releases.
#
SET(SHARED_LIB_MAJOR_VERSION "16")
SET(PROTOCOL_VERSION "10")
SET(DOT_FRM_VERSION "6")
# Read value for a variable from VERSION.
MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
IF(NOT ${var})
IF (EXISTS ${CMAKE_SOURCE_DIR}/configure.in)
FILE (STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "^[ ]*${keyword}=")
IF (EXISTS ${CMAKE_SOURCE_DIR}/VERSION)
FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
IF(str)
STRING(REPLACE "${keyword}=" "" str ${str})
STRING(REGEX REPLACE "[ ].*" "" str ${str})
SET(${var} ${str} CACHE INTERNAL "Config variable")
STRING(REGEX REPLACE "[ ].*" "" str "${str}")
SET(${var} ${str})
ENDIF()
ENDIF()
ENDIF()
@ -32,57 +40,32 @@ ENDMACRO()
# Read mysql version for configure script
MACRO(GET_MYSQL_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MAJOR" MAJOR_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MINOR" MINOR_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_PATCH" PATCH_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION)
IF(NOT VERSION_STRING)
IF(EXISTS ${CMAKE_SOURCE_DIR}/configure.in)
FILE(STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "AM_INIT_AUTOMAKE")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][^ \\)]+" VERSION_STRING "${str}")
IF(NOT VERSION_STRING)
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
IF(NOT VERSION_STRING)
FILE(STRINGS configure.in str REGEX "AC_INIT\\(")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][a-zAZ0-9]+" VERSION_STRING "${str}")
ENDIF()
ENDIF()
ENDIF()
IF(NOT MAJOR_VERSION OR NOT MINOR_VERSION OR NOT PATCH_VERSION)
MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.")
ENDIF()
IF(NOT VERSION_STRING)
MESSAGE(FATAL_ERROR
"VERSION_STRING cannot be parsed, please specify -DVERSION_STRING=major.minor.patch-extra"
"when calling cmake")
ENDIF()
SET(VERSION ${VERSION_STRING})
STRING(REPLACE "-" "_" MYSQL_U_SCORE_VERSION "${VERSION_STRING}")
# Remove trailing (non-numeric) part of the version string
STRING(REGEX REPLACE "[^\\.0-9].*" "" VERSION_STRING ${VERSION_STRING})
STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" MAJOR_VERSION "${VERSION_STRING}")
STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" MINOR_VERSION "${VERSION_STRING}")
STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" PATCH "${VERSION_STRING}")
SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}")
MESSAGE("-- MySQL ${VERSION}")
SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}")
MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH}")
SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
STRING(REPLACE "-" "_" MYSQL_RPM_VERSION "${VERSION}")
MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH_VERSION}")
MARK_AS_ADVANCED(VERSION MYSQL_VERSION_ID MYSQL_BASE_VERSION)
SET(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
SET(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION})
SET(CPACK_PACKAGE_VERSION_PATCH ${PATCH})
SET(CPACK_PACKAGE_VERSION_PATCH ${PATCH_VERSION})
ENDMACRO()
# Get mysql version and other interesting variables
GET_MYSQL_VERSION()
MYSQL_GET_CONFIG_VALUE("PROTOCOL_VERSION" PROTOCOL_VERSION)
MYSQL_GET_CONFIG_VALUE("DOT_FRM_VERSION" DOT_FRM_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_TCP_PORT_DEFAULT" MYSQL_TCP_PORT_DEFAULT)
MYSQL_GET_CONFIG_VALUE("MYSQL_UNIX_ADDR_DEFAULT" MYSQL_UNIX_ADDR_DEFAULT)
MYSQL_GET_CONFIG_VALUE("SHARED_LIB_MAJOR_VERSION" SHARED_LIB_MAJOR_VERSION)
IF(NOT MYSQL_TCP_PORT_DEFAULT)
SET(MYSQL_TCP_PORT_DEFAULT "3306")
ENDIF()
SET(MYSQL_TCP_PORT_DEFAULT "3306")
IF(NOT MYSQL_TCP_PORT)
SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT})
SET(MYSQL_TCP_PORT_DEFAULT "0")
@ -130,9 +113,8 @@ ENDIF()
# Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
# for more info.
IF(MSVC)
GET_TARGET_PROPERTY(location gen_versioninfo LOCATION)
IF(NOT location)
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
SET(FILETYPE VFT_APP)
CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
@ -140,31 +122,14 @@ IF(MSVC)
SET(FILETYPE VFT_DLL)
CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/versioninfo_exe.res
${CMAKE_BINARY_DIR}/versioninfo_dll.res
COMMAND ${CMAKE_RC_COMPILER} versioninfo_exe.rc
COMMAND ${CMAKE_RC_COMPILER} versioninfo_dll.rc
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ADD_CUSTOM_TARGET(gen_versioninfo
DEPENDS
${CMAKE_BINARY_DIR}/versioninfo_exe.res
${CMAKE_BINARY_DIR}/versioninfo_dll.res
)
ENDIF()
FUNCTION(ADD_VERSION_INFO target)
GET_TARGET_PROPERTY(target_type ${target} TYPE)
ADD_DEPENDENCIES(${target} gen_versioninfo)
IF(target_type MATCHES "SHARED" OR target_type MATCHES "MODULE")
SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS
"\"${CMAKE_BINARY_DIR}/versioninfo_dll.res\"")
ELSEIF(target_type MATCHES "EXE")
SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS
"${target_link_flags} \"${CMAKE_BINARY_DIR}/versioninfo_exe.res\"")
FUNCTION(ADD_VERSION_INFO target target_type sources_var)
IF("${target_type}" MATCHES "SHARED" OR "${target_type}" MATCHES "MODULE")
SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
ELSEIF("${target_type}" MATCHES "EXE")
SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
ENDIF()
SET(${sources_var} ${${sources_var}} ${rcfile} PARENT_SCOPE)
ENDFUNCTION()
ELSE()
FUNCTION(ADD_VERSION_INFO)

View file

@ -33,7 +33,7 @@ ENDFOREACH()
# Ensure we have clean build for shared libraries
# without unresolved symbols
SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined")
SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
# 64 bit file offset support flag
SET(_FILE_OFFSET_BITS 64)

View file

@ -91,7 +91,6 @@ IF(MSVC)
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
ENDFOREACH()
ADD_DEFINITIONS(-DPTHREAD_STACK_MIN=1048576)
# Mark 32 bit executables large address aware so they can
# use > 2GB address space
IF(CMAKE_SIZEOF_VOID_P MATCHES 4)
@ -105,14 +104,9 @@ IF(MSVC)
ENDIF()
#TODO: update the code and remove the disabled warnings
ADD_DEFINITIONS(/wd4800 /wd4805)
IF (MSVC_VERSION GREATER 1310)
ADD_DEFINITIONS(/wd4996)
ENDIF()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099")
# Make class/struct definition mismatch an error (overseen too often,
# adds tons of new warnings)
ADD_DEFINITIONS(/we4099)
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
# _WIN64 is defined by the compiler itself.

View file

@ -57,6 +57,7 @@ SET(HAVE_FCNTL_H 1 CACHE INTERNAL "")
SET(HAVE_FCNTL_NONBLOCK CACHE INTERNAL "")
SET(HAVE_FCONVERT CACHE INTERNAL "")
SET(HAVE_FDATASYNC CACHE INTERNAL "")
SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "")
SET(HAVE_FENV_H CACHE INTERNAL "")
SET(HAVE_FESETROUND CACHE INTERNAL "")
SET(HAVE_FGETLN CACHE INTERNAL "")

View file

@ -151,6 +151,7 @@ MACRO(MYSQL_ADD_PLUGIN)
ENDIF()
ENDIF()
ADD_VERSION_INFO(${target} MODULE SOURCES)
ADD_LIBRARY(${target} MODULE ${SOURCES})
DTRACE_INSTRUMENT(${target})
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX ""

View file

@ -1,7 +1,7 @@
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,0
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,0
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,0
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS__WINDOWS32
@ -12,8 +12,8 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.0\0"
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.0\0"
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.0\0"
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.0\0"
END
END
BLOCK "VarFileInfo"

View file

@ -1,21 +0,0 @@
# Copyright (C) 2004 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
## Process this file with automake to create Makefile.in
SUBDIRS= @readline_basedir@
DIST_SUBDIRS= libedit readline

View file

@ -1,92 +0,0 @@
## Process this file with automake to create Makefile.in
ASRC = $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c
AHDR = vi.h emacs.h common.h
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
noinst_LIBRARIES = libedit.a
libedit_a_SOURCES = chared.c el.c history.c map.c prompt.c readline.c \
search.c tokenizer.c vi.c common.c emacs.c \
hist.c key.c parse.c read.c refresh.c sig.c term.c \
tty.c help.c fcns.c filecomplete.c \
np/unvis.c np/strlcpy.c np/vis.c np/strlcat.c \
np/fgetln.c
libedit_a_LIBADD = @LIBEDIT_LOBJECTS@
libedit_a_DEPENDENCIES = @LIBEDIT_LOBJECTS@
pkginclude_HEADERS = readline/readline.h
noinst_HEADERS = chared.h el.h el_term.h histedit.h key.h parse.h refresh.h sig.h \
sys.h config.h hist.h map.h prompt.h read.h \
search.h tty.h filecomplete.h np/vis.h
EXTRA_DIST = makelist.sh CMakeLists.txt
CLEANFILES = makelist common.h emacs.h vi.h fcns.h help.h fcns.c help.c
SUFFIXES = .sh
.sh:
@RM@ -f $@ $@-t
@SED@ \
-e 's!@''AWK''@!@AWK@!' \
$< > $@-t
@MV@ $@-t $@
vi.h: $(srcdir)/vi.c makelist
sh ./makelist -h $(srcdir)/vi.c > $@.tmp && \
mv $@.tmp $@
emacs.h: $(srcdir)/emacs.c makelist
sh ./makelist -h $(srcdir)/emacs.c > $@.tmp && \
mv $@.tmp $@
common.h: $(srcdir)/common.c makelist
sh ./makelist -h $(srcdir)/common.c > $@.tmp && \
mv $@.tmp $@
help.c: ${ASRC} makelist
sh ./makelist -bc ${ASRC} > $@.tmp && \
mv $@.tmp $@
help.h: ${ASRC} makelist
sh ./makelist -bh ${ASRC} > $@.tmp && \
mv $@.tmp $@
fcns.h: ${AHDR} makelist
sh ./makelist -fh ${AHDR} > $@.tmp && \
mv $@.tmp $@
fcns.c: ${AHDR} fcns.h makelist
sh ./makelist -fc ${AHDR} > $@.tmp && \
mv $@.tmp $@
#%.o: vi.h emacs.h common.h help.h fcns.h
#objects := $(patsubst %.c,%.o,$(wildcard *.c))
#$(objects): vi.h emacs.h
chared.o: vi.h emacs.h common.h help.h fcns.h
el.o: vi.h emacs.h common.h help.h fcns.h
history.o: vi.h emacs.h common.h help.h fcns.h
map.o: vi.h emacs.h common.h help.h fcns.h
prompt.o: vi.h emacs.h common.h help.h fcns.h
readline.o: vi.h emacs.h common.h help.h fcns.h
search.o: vi.h emacs.h common.h help.h fcns.h
tokenizer.o: vi.h emacs.h common.h help.h fcns.h
vi.o: vi.h emacs.h common.h help.h fcns.h
common.o: vi.h emacs.h common.h help.h fcns.h
emacs.o: vi.h emacs.h common.h help.h fcns.h
hist.o: vi.h emacs.h common.h help.h fcns.h
key.o: vi.h emacs.h common.h help.h fcns.h
parse.o: vi.h emacs.h common.h help.h fcns.h
read.o: vi.h emacs.h common.h help.h fcns.h
refresh.o: vi.h emacs.h common.h help.h fcns.h
sig.o: vi.h emacs.h common.h help.h fcns.h
term.o: vi.h emacs.h common.h help.h fcns.h
tty.o: vi.h emacs.h common.h help.h fcns.h
help.o: vi.h emacs.h common.h help.h fcns.h
fcns.o: vi.h emacs.h common.h help.h fcns.h
filecomplete.o: vi.h emacs.h common.h help.h fcns.h

View file

@ -136,7 +136,7 @@ ed_delete_prev_word(EditLine *el, int c __attribute__((__unused__)))
*/
protected el_action_t
/*ARGSUSED*/
ed_delete_next_char(EditLine *el, int c)
ed_delete_next_char(EditLine *el, int c __attribute__((__unused__)))
{
#ifdef notdef /* XXX */
#define EL el->el_line
@ -431,7 +431,8 @@ ed_argument_digit(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
ed_unassigned(EditLine *el, int c __attribute__((__unused__)))
ed_unassigned(EditLine *el __attribute__((__unused__)),
int c __attribute__((__unused__)))
{
return (CC_ERROR);

View file

@ -202,7 +202,7 @@ _move_history(int op)
*/
static int
/*ARGSUSED*/
_getc_function(EditLine *el, char *c)
_getc_function(EditLine *el __attribute__((__unused__)), char *c)
{
int i;
@ -1613,7 +1613,8 @@ rl_insert(int count, int c)
/*ARGSUSED*/
int
rl_newline(int count, int c)
rl_newline(int count __attribute__((__unused__)),
int c __attribute__((__unused__)))
{
/*
* Readline-4.0 appears to ignore the args.
@ -1623,7 +1624,7 @@ rl_newline(int count, int c)
/*ARGSUSED*/
static unsigned char
rl_bind_wrapper(EditLine *el, unsigned char c)
rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)
{
if (map[c] == NULL)
return CC_ERROR;
@ -1718,7 +1719,7 @@ rl_get_previous_history(int count, int key)
void
/*ARGSUSED*/
rl_prep_terminal(int meta_flag)
rl_prep_terminal(int meta_flag __attribute__((__unused__)))
{
el_set(e, EL_PREP_TERM, 1);
}
@ -1922,7 +1923,8 @@ _rl_qsort_string_compare(char **s1, char **s2)
int
/*ARGSUSED*/
rl_kill_text(int from, int to)
rl_kill_text(int from __attribute__((__unused__)),
int to __attribute__((__unused__)))
{
return 0;
}
@ -1941,20 +1943,25 @@ rl_get_keymap(void)
void
/*ARGSUSED*/
rl_set_keymap(Keymap k)
rl_set_keymap(Keymap k __attribute__((__unused__)))
{
}
int
/*ARGSUSED*/
rl_generic_bind(int type, const char * keyseq, const char * data, Keymap k)
rl_generic_bind(int type __attribute__((__unused__)),
const char * keyseq __attribute__((__unused__)),
const char * data __attribute__((__unused__)),
Keymap k __attribute__((__unused__)))
{
return 0;
}
int
/*ARGSUSED*/
rl_bind_key_in_map(int key, Function *fun, Keymap k)
rl_bind_key_in_map(int key __attribute__((__unused__)),
Function *fun __attribute__((__unused__)),
Keymap k __attribute__((__unused__)))
{
return 0;
}

View file

@ -145,7 +145,7 @@ vi_paste_prev(EditLine *el, int c __attribute__((__unused__)))
*/
protected el_action_t
/*ARGSUSED*/
vi_prev_big_word(EditLine *el, int c)
vi_prev_big_word(EditLine *el, int c __attribute__((__unused__)))
{
if (el->el_line.cursor == el->el_line.buffer)
@ -195,7 +195,7 @@ vi_prev_word(EditLine *el, int c __attribute__((__unused__)))
*/
protected el_action_t
/*ARGSUSED*/
vi_next_big_word(EditLine *el, int c)
vi_next_big_word(EditLine *el, int c __attribute__((__unused__)))
{
if (el->el_line.cursor >= el->el_line.lastchar - 1)
@ -462,7 +462,7 @@ vi_delete_meta(EditLine *el, int c __attribute__((__unused__)))
*/
protected el_action_t
/*ARGSUSED*/
vi_end_big_word(EditLine *el, int c)
vi_end_big_word(EditLine *el, int c __attribute__((__unused__)))
{
if (el->el_line.cursor == el->el_line.lastchar)
@ -797,7 +797,7 @@ vi_repeat_prev_char(EditLine *el, int c __attribute__((__unused__)))
*/
protected el_action_t
/*ARGSUSED*/
vi_match(EditLine *el, int c)
vi_match(EditLine *el, int c __attribute__((__unused__)))
{
const char match_chars[] = "()[]{}";
char *cp;
@ -844,7 +844,7 @@ vi_match(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_undo_line(EditLine *el, int c)
vi_undo_line(EditLine *el, int c __attribute__((__unused__)))
{
cv_undo(el);
@ -858,7 +858,7 @@ vi_undo_line(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_to_column(EditLine *el, int c)
vi_to_column(EditLine *el, int c __attribute__((__unused__)))
{
el->el_line.cursor = el->el_line.buffer;
@ -872,7 +872,7 @@ vi_to_column(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_yank_end(EditLine *el, int c)
vi_yank_end(EditLine *el, int c __attribute__((__unused__)))
{
cv_yank(el, el->el_line.cursor,
@ -886,7 +886,7 @@ vi_yank_end(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_yank(EditLine *el, int c)
vi_yank(EditLine *el, int c __attribute__((__unused__)))
{
return cv_action(el, YANK);
@ -898,7 +898,7 @@ vi_yank(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_comment_out(EditLine *el, int c)
vi_comment_out(EditLine *el, int c __attribute__((__unused__)))
{
el->el_line.cursor = el->el_line.buffer;
@ -919,7 +919,8 @@ extern char *get_alias_text(const char *) __weak_reference(get_alias_text);
#endif
protected el_action_t
/*ARGSUSED*/
vi_alias(EditLine *el, int c)
vi_alias(EditLine *el __attribute__((__unused__)),
int c __attribute__((__unused__)))
{
#if defined(__weak_reference) && !defined(__FreeBSD__)
char alias_name[3];
@ -949,7 +950,7 @@ vi_alias(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_to_history_line(EditLine *el, int c)
vi_to_history_line(EditLine *el, int c __attribute__((__unused__)))
{
int sv_event_no = el->el_history.eventno;
el_action_t rval;
@ -994,7 +995,7 @@ vi_to_history_line(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_histedit(EditLine *el, int c)
vi_histedit(EditLine *el, int c __attribute__((__unused__)))
{
int fd;
pid_t pid;
@ -1050,7 +1051,7 @@ vi_histedit(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_history_word(EditLine *el, int c)
vi_history_word(EditLine *el, int c __attribute__((__unused__)))
{
const char *wp = HIST_FIRST(el);
const char *wep, *wsp;
@ -1099,7 +1100,7 @@ vi_history_word(EditLine *el, int c)
*/
protected el_action_t
/*ARGSUSED*/
vi_redo(EditLine *el, int c)
vi_redo(EditLine *el, int c __attribute__((__unused__)))
{
c_redo_t *r = &el->el_chared.c_redo;

View file

@ -1,34 +0,0 @@
## Process this file with automake to create Makefile.in
# Makefile for the GNU readline library.
# Copyright (C) 1994,1996,1997 Free Software Foundation, Inc.
# Last -I$(top_srcdir) needed for RedHat!
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)
noinst_LIBRARIES = libreadline.a
libreadline_a_SOURCES = readline.c funmap.c keymaps.c \
vi_mode.c parens.c rltty.c \
complete.c bind.c isearch.c \
display.c signals.c \
util.c kill.c \
undo.c macro.c input.c \
callback.c terminal.c xmalloc.c \
history.c histsearch.c histexpand.c \
histfile.c nls.c search.c \
shell.c tilde.c misc.c text.c mbutil.c \
compat.c savestring.c
noinst_HEADERS = readline.h chardefs.h keymaps.h \
history.h tilde.h rlmbutil.h rltypedefs.h rlprivate.h \
rlshell.h xmalloc.h \
\
config_readline.h rldefs.h histlib.h rlwinsize.h \
posixstat.h posixdir.h posixjmp.h \
tilde.h rlconf.h rltty.h ansi_stdlib.h \
tcap.h rlstdc.h
EXTRA_DIST= emacs_keymap.c vi_keymap.c CMakeLists.txt
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR -D_GNU_SOURCE=1

View file

@ -855,7 +855,7 @@ _rl_read_init_file (filename, include_level)
{
register int i;
char *buffer, *openname, *line, *end;
size_t file_size;
size_t file_size = 0;
current_readline_init_file = filename;
current_readline_init_include_level = include_level;

View file

@ -1839,8 +1839,11 @@ rl_username_completion_function (text, state)
#else /* !__WIN32__ && !__OPENNT) */
static char *username = (char *)NULL;
static struct passwd *entry;
static int namelen, first_char, first_char_loc;
static int first_char, first_char_loc;
char *value;
#if defined (HAVE_GETPWENT)
static int namelen;
#endif
if (state == 0)
{
@ -1850,7 +1853,9 @@ rl_username_completion_function (text, state)
first_char_loc = first_char == '~';
username = savestring (&text[first_char_loc]);
#if defined (HAVE_GETPWENT)
namelen = strlen (username);
#endif
setpwent ();
}

View file

@ -693,7 +693,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
case 's':
{
char *new_event;
int delimiter, failed, si, l_temp, ws, we;
int delimiter, failed, si, l_temp, we;
if (c == 's')
{
@ -792,7 +792,6 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
{
for (; temp[si] && whitespace (temp[si]); si++)
;
ws = si;
we = history_tokenize_word (temp, si);
}

View file

@ -402,6 +402,7 @@ history_truncate_file (fname, lines)
if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
{
bytes_written= write (file, bp, chars_read - (bp - buffer));
(void) bytes_written;
#if defined (__BEOS__)
/* BeOS ignores O_TRUNC. */

View file

@ -617,7 +617,7 @@ rl_search_history (direction, invoking_key)
int direction, invoking_key __attribute__((unused));
{
_rl_search_cxt *cxt; /* local for now, but saved globally */
int c, r;
int r;
RL_SETSTATE(RL_STATE_ISEARCH);
cxt = _rl_isearch_init (direction);
@ -632,7 +632,7 @@ rl_search_history (direction, invoking_key)
r = -1;
for (;;)
{
c = _rl_search_getchar (cxt);
_rl_search_getchar (cxt);
/* We might want to handle EOF here (c == 0) */
r = _rl_isearch_dispatch (cxt, cxt->lastc);
if (r <= 0)
@ -655,9 +655,9 @@ int
_rl_isearch_callback (cxt)
_rl_search_cxt *cxt;
{
int c, r;
int r;
c = _rl_search_getchar (cxt);
_rl_search_getchar (cxt);
/* We might want to handle EOF here */
r = _rl_isearch_dispatch (cxt, cxt->lastc);

View file

@ -115,7 +115,7 @@ rl_insert_close (count, invoking_key)
else
{
#if defined (HAVE_SELECT)
int orig_point, match_point, ready;
int orig_point, match_point;
struct timeval timer;
fd_set readfds;
@ -136,7 +136,7 @@ rl_insert_close (count, invoking_key)
orig_point = rl_point;
rl_point = match_point;
(*rl_redisplay_function) ();
ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
rl_point = orig_point;
#else /* !HAVE_SELECT */
_rl_insert_char (count, invoking_key);

View file

@ -447,11 +447,10 @@ readline_internal_char ()
readline_internal_charloop ()
#endif
{
static int lastc, eof_found;
static int lastc;
int c, code, lk;
lastc = -1;
eof_found = 0;
#if !defined (READLINE_CALLBACKS)
while (rl_done == 0)

View file

@ -268,7 +268,7 @@ _rl_get_screen_size (tty, ignore_env)
#if !defined (__DJGPP__)
if (_rl_screenwidth <= 0 && term_string_buffer)
_rl_screenwidth = tgetnum ("co");
_rl_screenwidth = tgetnum ((char *)"co");
#endif
}
@ -284,7 +284,7 @@ _rl_get_screen_size (tty, ignore_env)
#if !defined (__DJGPP__)
if (_rl_screenheight <= 0 && term_string_buffer)
_rl_screenheight = tgetnum ("li");
_rl_screenheight = tgetnum ((char *)"li");
#endif
}
@ -516,7 +516,7 @@ _rl_init_terminal_io (terminal_name)
if (!_rl_term_cr)
_rl_term_cr = "\r";
_rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
_rl_term_autowrap = tgetflag ((char *)"am") && tgetflag ((char *)"xn");
/* Allow calling application to set default height and width, using
rl_set_screen_size */
@ -531,7 +531,7 @@ _rl_init_terminal_io (terminal_name)
/* Check to see if this terminal has a meta key and clear the capability
variables if there is none. */
term_has_meta = (tgetflag ("km") || tgetflag ("MT"));
term_has_meta = (tgetflag ((char *)"km") || tgetflag ((char *)"MT"));
if (!term_has_meta)
_rl_term_mm = _rl_term_mo = (char *)NULL;

View file

@ -811,11 +811,10 @@ _rl_overwrite_char (count, c)
int i;
#if defined (HANDLE_MULTIBYTE)
char mbkey[MB_LEN_MAX];
int k;
/* Read an entire multibyte character sequence to insert COUNT times. */
if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0)
k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
_rl_read_mbstring (c, mbkey, MB_LEN_MAX);
#endif
rl_begin_undo_group ();

View file

@ -1,68 +0,0 @@
AC_DEFUN([MYSQL_FUNC_ALLOCA],
[
# Since we have heard that alloca fails on IRIX never define it on a
# SGI machine
if test ! "$host_vendor" = "sgi"
then
AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
if test "$ac_cv_header_alloca_h" = "yes"
then
AC_DEFINE(HAVE_ALLOCA, 1)
fi
AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
[AC_TRY_LINK([
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
], [char *p = (char *) alloca(1);],
ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)])
if test "$ac_cv_func_alloca_works" = "yes"; then
AC_DEFINE([HAVE_ALLOCA], [1], [If we have a working alloca() implementation])
fi
if test "$ac_cv_func_alloca_works" = "no"; then
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
ALLOCA=alloca.o
AC_DEFINE(C_ALLOCA, 1)
AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
[AC_EGREP_CPP(webecray,
[#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
if test "$ac_cv_os_cray" = "yes"; then
for ac_func in _getb67 GETB67 getb67; do
AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
break])
done
fi
fi
AC_SUBST(ALLOCA)dnl
else
AC_MSG_RESULT("Skipped alloca tests")
fi
])

View file

@ -1,501 +0,0 @@
dnl In order to add new charset, you must add charset name to
dnl this CHARSETS_AVAILABLE list and sql/share/charsets/Index.xml.
dnl If the character set uses strcoll or other special handling,
dnl you must also create strings/ctype-$charset_name.c
AC_DIVERT_PUSH(0)
define(CHARSETS_AVAILABLE0,binary)
define(CHARSETS_AVAILABLE1,armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257)
define(CHARSETS_AVAILABLE2,cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8)
define(CHARSETS_AVAILABLE3,greek hebrew hp8 keybcs2 koi8r koi8u)
define(CHARSETS_AVAILABLE4,latin1 latin2 latin5 latin7 macce macroman)
define(CHARSETS_AVAILABLE5,sjis swe7 tis620 ucs2 ujis utf8mb4 utf8 utf16 utf32)
DEFAULT_CHARSET=latin1
CHARSETS_AVAILABLE="CHARSETS_AVAILABLE0 CHARSETS_AVAILABLE1 CHARSETS_AVAILABLE2 CHARSETS_AVAILABLE3 CHARSETS_AVAILABLE4 CHARSETS_AVAILABLE5"
CHARSETS_COMPLEX="big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8mb4 utf8 utf16 utf32"
AC_DIVERT_POP
AC_ARG_WITH(charset,
[ --with-charset=CHARSET
Default character set, use one of:
CHARSETS_AVAILABLE0
CHARSETS_AVAILABLE1
CHARSETS_AVAILABLE2
CHARSETS_AVAILABLE3
CHARSETS_AVAILABLE4
CHARSETS_AVAILABLE5],
[default_charset="$withval"],
[default_charset="$DEFAULT_CHARSET"])
AC_ARG_WITH(collation,
[ --with-collation=COLLATION
Default collation],
[default_collation="$withval"],
[default_collation="default"])
AC_ARG_WITH(extra-charsets,
[ --with-extra-charsets=CHARSET[,CHARSET,...]
Use charsets in addition to default (none, complex,
all, or a list selected from the above sets)],
[extra_charsets="$withval"],
[extra_charsets="none"])
AC_MSG_CHECKING("character sets")
CHARSETS="$default_charset latin1 utf8mb4 utf8"
if test "$extra_charsets" = no; then
CHARSETS="$CHARSETS"
elif test "$extra_charsets" = none; then
CHARSETS="$CHARSETS"
elif test "$extra_charsets" = complex; then
CHARSETS="$CHARSETS $CHARSETS_COMPLEX"
AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
elif test "$extra_charsets" = all; then
CHARSETS="$CHARSETS $CHARSETS_AVAILABLE"
AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
else
EXTRA_CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
CHARSETS="$CHARSETS $EXTRA_CHARSETS"
fi
for cs in $CHARSETS
do
case $cs in
armscii8)
AC_DEFINE(HAVE_CHARSET_armscii8, 1,
[Define to enable charset armscii8])
;;
ascii)
AC_DEFINE(HAVE_CHARSET_ascii, 1,
[Define to enable ascii character set])
;;
big5)
AC_DEFINE(HAVE_CHARSET_big5, 1, [Define to enable charset big5])
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, [1], [ ])
;;
binary)
;;
cp1250)
AC_DEFINE(HAVE_CHARSET_cp1250, 1, [Define to enable cp1250])
;;
cp1251)
AC_DEFINE(HAVE_CHARSET_cp1251, 1, [Define to enable charset cp1251])
;;
cp1256)
AC_DEFINE(HAVE_CHARSET_cp1256, 1, [Define to enable charset cp1256])
;;
cp1257)
AC_DEFINE(HAVE_CHARSET_cp1257, 1, [Define to enable charset cp1257])
;;
cp850)
AC_DEFINE(HAVE_CHARSET_cp850, 1, [Define to enable charset cp850])
;;
cp852)
AC_DEFINE(HAVE_CHARSET_cp852, 1, [Define to enable charset cp852])
;;
cp866)
AC_DEFINE(HAVE_CHARSET_cp866, 1, [Define to enable charset cp866])
;;
cp932)
AC_DEFINE(HAVE_CHARSET_cp932, 1, [Define to enable charset cp932])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
dec8)
AC_DEFINE(HAVE_CHARSET_dec8, 1, [Define to enable charset dec8])
;;
eucjpms)
AC_DEFINE(HAVE_CHARSET_eucjpms, 1, [Define to enable charset eucjpms])
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
euckr)
AC_DEFINE(HAVE_CHARSET_euckr, 1, [Define to enable charset euckr])
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
gb2312)
AC_DEFINE(HAVE_CHARSET_gb2312, 1, [Define to enable charset gb2312])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
gbk)
AC_DEFINE(HAVE_CHARSET_gbk, 1, [Define to enable charset gbk])
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
geostd8)
AC_DEFINE(HAVE_CHARSET_geostd8, 1, [Define to enable charset geostd8])
;;
greek)
AC_DEFINE(HAVE_CHARSET_greek, 1, [Define to enable charset greek])
;;
hebrew)
AC_DEFINE(HAVE_CHARSET_hebrew, 1, [Define to enable charset hebrew])
;;
hp8)
AC_DEFINE(HAVE_CHARSET_hp8, 1, [Define to enable charset hp8])
;;
keybcs2)
AC_DEFINE(HAVE_CHARSET_keybcs2, 1, [Define to enable charset keybcs2])
;;
koi8r)
AC_DEFINE(HAVE_CHARSET_koi8r, 1, [Define to enable charset koi8r])
;;
koi8u)
AC_DEFINE(HAVE_CHARSET_koi8u, 1, [Define to enable charset koi8u])
;;
latin1)
AC_DEFINE(HAVE_CHARSET_latin1, 1, [Define to enable charset latin1])
;;
latin2)
AC_DEFINE(HAVE_CHARSET_latin2, 1, [Define to enable charset latin2])
;;
latin5)
AC_DEFINE(HAVE_CHARSET_latin5, 1, [Define to enable charset latin5])
;;
latin7)
AC_DEFINE(HAVE_CHARSET_latin7, 1, [Define to enable charset latin7])
;;
macce)
AC_DEFINE(HAVE_CHARSET_macce, 1, [Define to enable charset macce])
;;
macroman)
AC_DEFINE(HAVE_CHARSET_macroman, 1,
[Define to enable charset macroman])
;;
sjis)
AC_DEFINE(HAVE_CHARSET_sjis, 1, [Define to enable charset sjis])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
swe7)
AC_DEFINE(HAVE_CHARSET_swe7, 1, [Define to enable charset swe7])
;;
tis620)
AC_DEFINE(HAVE_CHARSET_tis620, 1, [Define to enable charset tis620])
;;
ucs2)
AC_DEFINE(HAVE_CHARSET_ucs2, 1, [Define to enable charset ucs2])
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
ujis)
AC_DEFINE(HAVE_CHARSET_ujis, 1, [Define to enable charset ujis])
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
utf8mb4)
AC_DEFINE(HAVE_CHARSET_utf8mb4, 1, [Define to enable utf8mb4])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
utf8)
AC_DEFINE(HAVE_CHARSET_utf8, 1, [Define to enable utf8])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
utf16)
AC_DEFINE(HAVE_CHARSET_utf16, 1, [Define to enable utf16])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
utf32)
AC_DEFINE(HAVE_CHARSET_utf32, 1, [Define to enable utf32])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
*)
AC_MSG_ERROR([Charset '$cs' not available. (Available are: $CHARSETS_AVAILABLE).
See the Installation chapter in the Reference Manual.])
esac
done
default_charset_collations=""
case $default_charset in
armscii8)
default_charset_default_collation="armscii8_general_ci"
default_charset_collations="armscii8_general_ci armscii8_bin"
;;
ascii)
default_charset_default_collation="ascii_general_ci"
default_charset_collations="ascii_general_ci ascii_bin"
;;
big5)
default_charset_default_collation="big5_chinese_ci"
default_charset_collations="big5_chinese_ci big5_bin"
;;
binary)
default_charset_default_collation="binary"
default_charset_collations="binary"
;;
cp1250)
default_charset_default_collation="cp1250_general_ci"
default_charset_collations="cp1250_general_ci cp1250_czech_cs cp1250_bin"
;;
cp1251)
default_charset_default_collation="cp1251_general_ci"
default_charset_collations="cp1251_general_ci cp1251_general_cs cp1251_bin cp1251_bulgarian_ci cp1251_ukrainian_ci"
;;
cp1256)
default_charset_default_collation="cp1256_general_ci"
default_charset_collations="cp1256_general_ci cp1256_bin"
;;
cp1257)
default_charset_default_collation="cp1257_general_ci"
default_charset_collations="cp1257_general_ci cp1257_lithuanian_ci cp1257_bin"
;;
cp850)
default_charset_default_collation="cp850_general_ci"
default_charset_collations="cp850_general_ci cp850_bin"
;;
cp852)
default_charset_default_collation="cp852_general_ci"
default_charset_collations="cp852_general_ci cp852_bin"
;;
cp866)
default_charset_default_collation="cp866_general_ci"
default_charset_collations="cp866_general_ci cp866_bin"
;;
cp932)
default_charset_default_collation="cp932_japanese_ci"
default_charset_collations="cp932_japanese_ci cp932_bin"
;;
dec8)
default_charset_default_collation="dec8_swedish_ci"
default_charset_collations="dec8_swedish_ci dec8_bin"
;;
eucjpms)
default_charset_default_collation="eucjpms_japanese_ci"
default_charset_collations="eucjpms_japanese_ci ujis_bin"
;;
euckr)
default_charset_default_collation="euckr_korean_ci"
default_charset_collations="euckr_korean_ci euckr_bin"
;;
gb2312)
default_charset_default_collation="gb2312_chinese_ci"
default_charset_collations="gb2312_chinese_ci gb2312_bin"
;;
gbk)
default_charset_default_collation="gbk_chinese_ci"
default_charset_collations="gbk_chinese_ci gbk_bin"
;;
geostd8)
default_charset_default_collation="geostd8_general_ci"
default_charset_collations="geostd8_general_ci geostd8_bin"
;;
greek)
default_charset_default_collation="greek_general_ci"
default_charset_collations="greek_general_ci greek_bin"
;;
hebrew)
default_charset_default_collation="hebrew_general_ci"
default_charset_collations="hebrew_general_ci hebrew_bin"
;;
hp8)
default_charset_default_collation="hp8_english_ci"
default_charset_collations="hp8_english_ci hp8_bin"
;;
keybcs2)
default_charset_default_collation="keybcs2_general_ci"
default_charset_collations="keybcs2_general_ci keybcs2_bin"
;;
koi8r)
default_charset_default_collation="koi8r_general_ci"
default_charset_collations="koi8r_general_ci koi8r_bin"
;;
koi8u)
default_charset_default_collation="koi8u_general_ci"
default_charset_collations="koi8u_general_ci koi8u_bin"
;;
latin1)
default_charset_default_collation="latin1_swedish_ci"
default_charset_collations="latin1_general_ci latin1_general_cs latin1_bin latin1_german1_ci latin1_german2_ci latin1_danish_ci latin1_spanish_ci latin1_swedish_ci"
;;
latin2)
default_charset_default_collation="latin2_general_ci"
default_charset_collations="latin2_general_ci latin2_bin latin2_czech_cs latin2_hungarian_ci latin2_croatian_ci"
;;
latin5)
default_charset_default_collation="latin5_turkish_ci"
default_charset_collations="latin5_turkish_ci latin5_bin"
;;
latin7)
default_charset_default_collation="latin7_general_ci"
default_charset_collations="latin7_general_ci latin7_general_cs latin7_bin latin7_estonian_cs"
;;
macce)
default_charset_default_collation="macce_general_ci"
default_charset_collations="macce_general_ci macce_bin"
;;
macroman)
default_charset_default_collation="macroman_general_ci"
default_charset_collations="macroman_general_ci macroman_bin"
;;
sjis)
default_charset_default_collation="sjis_japanese_ci"
default_charset_collations="sjis_japanese_ci sjis_bin"
;;
swe7)
default_charset_default_collation="swe7_swedish_ci"
default_charset_collations="swe7_swedish_ci swe7_bin"
;;
tis620)
default_charset_default_collation="tis620_thai_ci"
default_charset_collations="tis620_thai_ci tis620_bin"
;;
ucs2)
default_charset_default_collation="ucs2_general_ci"
define(UCSC1, ucs2_general_ci ucs2_bin)
define(UCSC2, ucs2_czech_ci ucs2_danish_ci)
define(UCSC3, ucs2_esperanto_ci ucs2_estonian_ci ucs2_hungarian_ci)
define(UCSC4, ucs2_icelandic_ci ucs2_latvian_ci ucs2_lithuanian_ci)
define(UCSC5, ucs2_persian_ci ucs2_polish_ci ucs2_romanian_ci)
define(UCSC6, ucs2_slovak_ci ucs2_slovenian_ci)
define(UCSC7, ucs2_spanish2_ci ucs2_spanish_ci)
define(UCSC8, ucs2_swedish_ci ucs2_turkish_ci)
define(UCSC9, ucs2_unicode_ci)
UCSC="UCSC1 UCSC2 UCSC3 UCSC4 UCSC5 UCSC6 UCSC7 UCSC8 UCSC9"
default_charset_collations="$UCSC"
;;
ujis)
default_charset_default_collation="ujis_japanese_ci"
default_charset_collations="ujis_japanese_ci ujis_bin"
;;
utf8)
default_charset_default_collation="utf8_general_ci"
if test "$default_collation" = "utf8_general_cs"; then
# For those who explicitly desire "utf8_general_cs", support it,
# and then also set the CPP switch enabling that code.
UTFC="utf8_general_cs"
AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
else
define(UTFC1, utf8_general_ci utf8_bin)
define(UTFC2, utf8_czech_ci utf8_danish_ci)
define(UTFC3, utf8_esperanto_ci utf8_estonian_ci utf8_hungarian_ci)
define(UTFC4, utf8_icelandic_ci utf8_latvian_ci utf8_lithuanian_ci)
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
define(UTFC9, utf8_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
fi
default_charset_collations="$UTFC"
;;
utf8mb4)
default_charset_default_collation="utf8mb4_general_ci"
define(UTFC1, utf8mb4_general_ci utf8mb4_bin)
define(UTFC2, utf8mb4_czech_ci utf8mb4_danish_ci)
define(UTFC3, utf8mb4_esperanto_ci utf8mb4_estonian_ci utf8mb4_hungarian_ci)
define(UTFC4, utf8mb4_icelandic_ci utf8mb4_latvian_ci utf8mb4_lithuanian_ci)
define(UTFC5, utf8mb4_persian_ci utf8mb4_polish_ci utf8mb4_romanian_ci)
define(UTFC6, utf8mb4_sinhala_ci utf8mb4_slovak_ci utf8mb4_slovenian_ci)
define(UTFC7, utf8mb4_spanish2_ci utf8mb4_spanish_ci)
define(UTFC8, utf8mb4_swedish_ci utf8mb4_turkish_ci)
define(UTFC9, utf8mb4_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
default_charset_collations="$UTFC"
;;
utf16)
default_charset_default_collation="utf16_general_ci"
define(UTFC1, utf16_general_ci utf16_bin)
define(UTFC2, utf16_czech_ci utf16_danish_ci)
define(UTFC3, utf16_esperanto_ci utf16_estonian_ci utf16_hungarian_ci)
define(UTFC4, utf16_icelandic_ci utf16_latvian_ci utf16_lithuanian_ci)
define(UTFC5, utf16_persian_ci utf16_polish_ci utf16_romanian_ci)
define(UTFC6, utf16_sinhala_ci utf16_slovak_ci utf16_slovenian_ci)
define(UTFC7, utf16_spanish2_ci utf16_spanish_ci)
define(UTFC8, utf16_swedish_ci utf16_turkish_ci)
define(UTFC9, utf16_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
default_charset_collations="$UTFC"
;;
utf32)
default_charset_default_collation="utf32_general_ci"
define(UTFC1, utf32_general_ci utf32_bin)
define(UTFC2, utf32_czech_ci utf32_danish_ci)
define(UTFC3, utf32_esperanto_ci utf32_estonian_ci utf32_hungarian_ci)
define(UTFC4, utf32_icelandic_ci utf32_latvian_ci utf32_lithuanian_ci)
define(UTFC5, utf32_persian_ci utf32_polish_ci utf32_romanian_ci)
define(UTFC6, utf32_sinhala_ci utf32_slovak_ci utf32_slovenian_ci)
define(UTFC7, utf32_spanish2_ci utf32_spanish_ci)
define(UTFC8, utf32_swedish_ci utf32_turkish_ci)
define(UTFC9, utf32_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
default_charset_collations="$UTFC"
;;
*)
AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE).
See the Installation chapter in the Reference Manual.])
esac
if test "$default_collation" = default; then
default_collation=$default_charset_default_collation
fi
valid_default_collation=no
for cl in $default_charset_collations
do
if test x"$cl" = x"$default_collation"
then
valid_default_collation=yes
break
fi
done
if test x$valid_default_collation = xyes
then
AC_MSG_RESULT([default: $default_charset, collation: $default_collation; compiled in: $CHARSETS])
else
AC_MSG_ERROR([
Collation $default_collation is not valid for character set $default_charset.
Valid collations are: $default_charset_collations.
See the Installation chapter in the Reference Manual.
])
fi
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],
[Define the default charset name])
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
[Define the default charset name])
# Shall we build the UCA-based Unicode collations
AC_ARG_WITH(uca,
[ --without-uca Skip building of the national Unicode collations.],
[with_uca=$withval],
[with_uca=yes]
)
AC_MSG_CHECKING([whether to compile national Unicode collations])
if test "$with_uca" = "yes"
then
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_UCA_COLLATIONS], [1], [national Unicode collations])
else
AC_MSG_RESULT(no)
fi
# Shall we build experimental collations
AC_ARG_WITH(experimental-collations,
[],
[with_exp_coll=$withval],
[with_exp_coll=no]
)
if test "$with_exp_coll" = "yes"
then
AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
fi

View file

@ -1,47 +0,0 @@
AC_DEFUN([MYSQL_CHECK_CPU],
[AC_CACHE_CHECK([if compiler supports optimizations for current cpu],
mysql_cv_cpu,[
ac_save_CFLAGS="$CFLAGS"
if test -r /proc/cpuinfo ; then
cpuinfo="cat /proc/cpuinfo"
cpu_family=`$cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
fi
if test "$cpu_vendor" = "AuthenticAMD"; then
if test $cpu_family -ge 6; then
cpu_set="athlon pentiumpro k5 pentium i486 i386";
elif test $cpu_family -eq 5; then
cpu_set="k5 pentium i486 i386";
elif test $cpu_family -eq 4; then
cpu_set="i486 i386"
else
cpu_set="i386"
fi
elif test "$cpu_vendor" = "GenuineIntel"; then
if test $cpu_family -ge 6; then
cpu_set="pentiumpro pentium i486 i386";
elif test $cpu_family -eq 5; then
cpu_set="pentium i486 i386";
elif test $cpu_family -eq 4; then
cpu_set="i486 i386"
else
cpu_set="i386"
fi
fi
for ac_arg in $cpu_set;
do
CFLAGS="$ac_save_CFLAGS -mcpu=$ac_arg -march=$ac_arg -DCPU=$ac_arg"
AC_TRY_COMPILE([],[int i],mysql_cv_cpu=$ac_arg; break;, mysql_cv_cpu="unknown")
done
if test "$mysql_cv_cpu" = "unknown"
then
CFLAGS="$ac_save_CFLAGS"
AC_MSG_RESULT(none)
else
AC_MSG_RESULT($mysql_cv_cpu)
fi
])])

View file

@ -1,62 +0,0 @@
# option, cache_name, variable,
# code to execute if yes, code to exectute if fail
AC_DEFUN([AC_SYS_COMPILER_FLAG],
[
AC_MSG_CHECKING($1)
OLD_CFLAGS="[$]CFLAGS"
AC_CACHE_VAL(mysql_cv_option_$2,
[
CFLAGS="[$]OLD_CFLAGS $1"
AC_TRY_LINK([int main(){exit(0);}],mysql_cv_option_$2=yes,mysql_cv_option_$2=no,mysql_cv_option_$2=no)
])
CFLAGS="[$]OLD_CFLAGS"
if test x"[$]mysql_cv_option_$2" = "xyes" ; then
$3="[$]$3 $1"
AC_MSG_RESULT(yes)
$5
else
AC_MSG_RESULT(no)
$4
fi
])
# arch, option, cache_name, variable
AC_DEFUN([AC_SYS_CPU_COMPILER_FLAG],
[
if test "`uname -m 2>/dev/null`" = "$1" ; then
AC_SYS_COMPILER_FLAG($2,$3,$4)
fi
])
# os, option, cache_name, variable
AC_DEFUN([AC_SYS_OS_COMPILER_FLAG],
[
if test "x$mysql_cv_sys_os" = "x$1" ; then
AC_SYS_COMPILER_FLAG($2,$3,$4)
fi
])
AC_DEFUN([AC_CHECK_NOEXECSTACK],
[
AC_CACHE_CHECK(whether --noexecstack is desirable for .S files,
mysql_cv_as_noexecstack, [dnl
cat > conftest.c <<EOF
void foo (void) { }
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS
-S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD]) \
&& grep .note.GNU-stack conftest.s >/dev/null \
&& AC_TRY_COMMAND([${CC-cc} $CCASFLAGS $CPPFLAGS -Wa,--noexecstack
-c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD])
then
mysql_cv_as_noexecstack=yes
else
mysql_cv_as_noexecstack=no
fi
rm -f conftest*])
if test $mysql_cv_as_noexecstack = yes; then
CCASFLAGS="$CCASFLAGS -Wa,--noexecstack"
fi
])

View file

@ -1,38 +0,0 @@
dnl ---------------------------------------------------------------------------
dnl Macro: DTRACE_TEST
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(dtrace,
AC_HELP_STRING([--enable-dtrace],[Build with support for the DTRACE.]),
[
ENABLE_DTRACE="$enable_dtrace"
],
[
ENABLE_DTRACE="yes"
]
)
DTRACEFLAGS=""
HAVE_DTRACE=""
HAVE_DTRACE_DASH_G=""
if test "$ENABLE_DTRACE" = "yes"; then
AC_PATH_PROGS(DTRACE, dtrace, [not found], [$PATH:/usr/sbin])
if test "$DTRACE" = "not found"; then
ENABLE_DTRACE="no"
else
AC_DEFINE([HAVE_DTRACE], [1], [Defined to 1 if DTrace support is enabled])
case "$target_os" in
*solaris*)
HAVE_DTRACE_DASH_G="yes"
;;
*)
HAVE_DTRACE_DASH_G="no"
;;
esac
fi
fi
AC_SUBST(DTRACEFLAGS)
AC_SUBST(HAVE_DTRACE)
AM_CONDITIONAL([HAVE_DTRACE], [ test "$ENABLE_DTRACE" = "yes" ])
AM_CONDITIONAL([HAVE_DTRACE_DASH_G], [ test "$HAVE_DTRACE_DASH_G" = "yes" ])
dnl ---------------------------------------------------------------------------
dnl End Macro: DTRACE_TEST
dnl ---------------------------------------------------------------------------

View file

@ -1,142 +0,0 @@
dnl By default, many hosts won't let programs access large files;
dnl one must use special compiler options to get large-file access to work.
dnl For more details about this brain damage please see:
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
dnl Written by Paul Eggert <eggert@twinsun.com>.
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
AC_DEFUN([AC_SYS_LARGEFILE_FLAGS],
[AC_CACHE_CHECK([for $1 value to request large file support],
ac_cv_sys_largefile_$1,
[if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
then
ac_cv_sys_largefile_$1=`cat conftest.1`
else
ac_cv_sys_largefile_$1=no
ifelse($1, CFLAGS,
[case "$host_os" in
# HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
changequote(, )dnl
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
changequote([, ])dnl
if test "$GCC" = yes; then
case `$CC --version 2>/dev/null` in
2.95.*) ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__ ;;
esac
fi
;;
# IRIX 6.2 and later require cc -n32.
changequote(, )dnl
irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
changequote([, ])dnl
if test "$GCC" != yes; then
ac_cv_sys_largefile_CFLAGS=-n32
fi
esac
if test "$ac_cv_sys_largefile_CFLAGS" != no; then
ac_save_CC="$CC"
CC="$CC $ac_cv_sys_largefile_CFLAGS"
AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
CC="$ac_save_CC"
fi])
fi
rm -f conftest*])])
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
AC_DEFUN([AC_SYS_LARGEFILE_SPACE_APPEND],
[case $2 in
no) ;;
?*)
case "[$]$1" in
'') $1=$2 ;;
*) $1=[$]$1' '$2 ;;
esac ;;
esac])
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
[AC_CACHE_CHECK([for $1], $2,
[$2=no
changequote(, )dnl
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
case "$ac_flag" in
-D$1)
$2=1 ;;
-D$1=*)
$2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
esac
done
$4
changequote([, ])dnl
])
if test "[$]$2" != no; then
AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
fi])
AC_DEFUN([MYSQL_SYS_LARGEFILE],
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_ENABLE(largefile,
[ --disable-largefile Omit support for large files])
if test "$enable_largefile" != no; then
AC_CHECK_TOOL(GETCONF, getconf)
AC_SYS_LARGEFILE_FLAGS(CFLAGS)
AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
AC_SYS_LARGEFILE_FLAGS(LIBS)
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
case "$ac_flag" in
no) ;;
-D_FILE_OFFSET_BITS=*) ;;
-D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
-D_LARGE_FILES | -D_LARGE_FILES=*) ;;
-D?* | -I?*)
AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
*)
AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
esac
done
AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
ac_cv_sys_file_offset_bits,
[Number of bits in a file offset, on hosts where this is settable.],
[case "$host_os" in
# HP-UX 10.20 and later
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
ac_cv_sys_file_offset_bits=64 ;;
# We can't declare _FILE_OFFSET_BITS here as this will cause
# compile errors as AC_PROG_CC adds include files in confdefs.h
# We solve this (until autoconf is fixed) by instead declaring it
# as define instead
solaris2.[8,9])
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64"
ac_cv_sys_file_offset_bits=no ;;
esac])
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
ac_cv_sys_largefile_source,
[makes fseeko etc. visible, on some hosts.],
[case "$host_os" in
# HP-UX 10.20 and later
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
ac_cv_sys_largefile_source=1 ;;
esac])
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
ac_cv_sys_large_files,
[Large files support on AIX-style hosts.],
[case "$host_os" in
# Large file support on AIX is available starting from version 4.2
# Tested only on 5.2 and up
aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
ac_cv_sys_large_files=1 ;;
esac])
fi
])

View file

@ -1,64 +0,0 @@
#
# Control aspects of the development environment which are
# specific to MySQL maintainers and developers.
#
AC_DEFUN([MY_MAINTAINER_MODE], [
AC_MSG_CHECKING([whether to enable the maintainer-specific development environment])
AC_ARG_ENABLE([mysql-maintainer-mode],
[AS_HELP_STRING([--enable-mysql-maintainer-mode],
[Enable a MySQL maintainer-specific development environment])],
[USE_MYSQL_MAINTAINER_MODE=$enableval],
[USE_MYSQL_MAINTAINER_MODE=no])
AC_MSG_RESULT([$USE_MYSQL_MAINTAINER_MODE])
])
# Set warning options required under maintainer mode.
AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
# Setup GCC warning options.
AS_IF([test "$GCC" = "yes"], [
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
])
# Test whether the warning options work.
# Test C options
AS_IF([test -n "$C_WARNINGS"], [
save_CFLAGS="$CFLAGS"
AC_MSG_CHECKING([whether to use C warning options ${C_WARNINGS}])
AC_LANG_PUSH(C)
CFLAGS="$CFLAGS ${C_WARNINGS}"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_c_warning_flags=yes],
[myac_c_warning_flags=no])
AC_LANG_POP()
AC_MSG_RESULT([$myac_c_warning_flags])
CFLAGS="$save_CFLAGS"
])
# Test C++ options
AS_IF([test -n "$CXX_WARNINGS"], [
save_CXXFLAGS="$CXXFLAGS"
AC_MSG_CHECKING([whether to use C++ warning options ${CXX_WARNINGS}])
AC_LANG_PUSH(C++)
CXXFLAGS="$CXXFLAGS ${CXX_WARNINGS}"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_cxx_warning_flags=yes],
[myac_cxx_warning_flags=no])
AC_LANG_POP()
AC_MSG_RESULT([$myac_cxx_warning_flags])
CXXFLAGS="$save_CXXFLAGS"
])
# Set compile flag variables.
AS_IF([test "$myac_c_warning_flags" = "yes"], [
AM_CFLAGS="${AM_CFLAGS} ${C_WARNINGS}"
AC_SUBST([AM_CFLAGS])])
AS_IF([test "$myac_cxx_warning_flags" = "yes"], [
AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS}"
AC_SUBST([AM_CXXFLAGS])])
])
# Set compiler flags required under maintainer mode.
AC_DEFUN([MY_MAINTAINER_MODE_SETUP], [
AS_IF([test "$USE_MYSQL_MAINTAINER_MODE" = "yes"],
[MY_MAINTAINER_MODE_WARNINGS])
])

View file

@ -1,688 +0,0 @@
# Local macros for automake & autoconf
#---START: Used in for client configure
AC_DEFUN([MYSQL_TYPE_ACCEPT],
[ac_save_CXXFLAGS="$CXXFLAGS"
AC_CACHE_CHECK([base type of last arg to accept], mysql_cv_btype_last_arg_accept,
AC_LANG_PUSH(C++)
if test "$ac_cv_prog_gxx" = "yes"
then
# Add -Werror, remove -fbranch-probabilities (Bug #268)
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi
mysql_cv_btype_last_arg_accept=none
[AC_TRY_COMPILE([#if defined(inline)
#undef inline
#endif
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
],
[int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0); return (a != 0);],
mysql_cv_btype_last_arg_accept=socklen_t)]
if test "$mysql_cv_btype_last_arg_accept" = "none"; then
[AC_TRY_COMPILE([#if defined(inline)
#undef inline
#endif
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
],
[int a = accept(1, (struct sockaddr *) 0, (size_t *) 0); return (a != 0);],
mysql_cv_btype_last_arg_accept=size_t)]
fi
if test "$mysql_cv_btype_last_arg_accept" = "none"; then
mysql_cv_btype_last_arg_accept=int
fi)
AC_LANG_POP(C++)
AC_DEFINE_UNQUOTED([SOCKET_SIZE_TYPE], [$mysql_cv_btype_last_arg_accept],
[The base type of the last arg to accept])
CXXFLAGS="$ac_save_CXXFLAGS"
])
#---END:
dnl Find type of qsort
AC_DEFUN([MYSQL_TYPE_QSORT],
[AC_CACHE_CHECK([return type of qsort], mysql_cv_type_qsort,
[AC_TRY_COMPILE([#include <stdlib.h>
#ifdef __cplusplus
extern "C"
#endif
void qsort(void *base, size_t nel, size_t width,
int (*compar) (const void *, const void *));
],
[int i;], mysql_cv_type_qsort=void, mysql_cv_type_qsort=int)])
AC_DEFINE_UNQUOTED([RETQSORTTYPE], [$mysql_cv_type_qsort],
[The return type of qsort (int or void).])
if test "$mysql_cv_type_qsort" = "void"
then
AC_DEFINE_UNQUOTED([QSORT_TYPE_IS_VOID], [1], [qsort returns void])
fi
])
#---START: Figure out whether to use 'struct rlimit' or 'struct rlimit64'
AC_DEFUN([MYSQL_TYPE_STRUCT_RLIMIT],
[ac_save_CXXFLAGS="$CXXFLAGS"
AC_CACHE_CHECK([struct type to use with setrlimit], mysql_cv_btype_struct_rlimit,
AC_LANG_PUSH(C++)
if test "$ac_cv_prog_gxx" = "yes"
then
# Add -Werror, remove -fbranch-probabilities (Bug #268)
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi
mysql_cv_btype_struct_rlimit=none
[AC_TRY_COMPILE([#if defined(inline)
#undef inline
#endif
#include <stdlib.h>
#include <sys/resource.h>
],
[struct rlimit64 rl; setrlimit(RLIMIT_CORE, &rl);],
mysql_cv_btype_struct_rlimit="struct rlimit64")]
if test "$mysql_cv_btype_struct_rlimit" = "none"; then
mysql_cv_btype_struct_rlimit="struct rlimit"
fi)
AC_LANG_POP(C++)
AC_DEFINE_UNQUOTED([STRUCT_RLIMIT], [$mysql_cv_btype_struct_rlimit],
[The struct rlimit type to use with setrlimit])
CXXFLAGS="$ac_save_CXXFLAGS"
])
#---END:
AC_DEFUN([MYSQL_TIMESPEC_TS],
[AC_CACHE_CHECK([if struct timespec has a ts_sec member], mysql_cv_timespec_ts,
[AC_TRY_COMPILE([#include <pthread.h>
#ifdef __cplusplus
extern "C"
#endif
],
[struct timespec abstime;
abstime.ts_sec = time(NULL)+1;
abstime.ts_nsec = 0;
], mysql_cv_timespec_ts=yes, mysql_cv_timespec_ts=no)])
if test "$mysql_cv_timespec_ts" = "yes"
then
AC_DEFINE([HAVE_TIMESPEC_TS_SEC], [1],
[Timespec has a ts_sec instead of tv_sev])
fi
])
AC_DEFUN([MYSQL_TZNAME],
[AC_CACHE_CHECK([if we have tzname variable], mysql_cv_tzname,
[AC_TRY_COMPILE([#include <time.h>
#ifdef __cplusplus
extern "C"
#endif
],
[ tzset();
return tzname[0] != 0;
], mysql_cv_tzname=yes, mysql_cv_tzname=no)])
if test "$mysql_cv_tzname" = "yes"
then
AC_DEFINE([HAVE_TZNAME], [1], [Have the tzname variable])
fi
])
AC_DEFUN([MYSQL_PTHREAD_YIELD],
[AC_CACHE_CHECK([if pthread_yield takes zero arguments], ac_cv_pthread_yield_zero_arg,
[AC_TRY_LINK([#define _GNU_SOURCE
#include <pthread.h>
#ifdef __cplusplus
extern "C"
#endif
],
[
pthread_yield();
], ac_cv_pthread_yield_zero_arg=yes, ac_cv_pthread_yield_zero_arg=yeso)])
if test "$ac_cv_pthread_yield_zero_arg" = "yes"
then
AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1],
[pthread_yield that doesn't take any arguments])
fi
]
[AC_CACHE_CHECK([if pthread_yield takes 1 argument], ac_cv_pthread_yield_one_arg,
[AC_TRY_LINK([#define _GNU_SOURCE
#include <pthread.h>
#ifdef __cplusplus
extern "C"
#endif
],
[
pthread_yield(0);
], ac_cv_pthread_yield_one_arg=yes, ac_cv_pthread_yield_one_arg=no)])
if test "$ac_cv_pthread_yield_one_arg" = "yes"
then
AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1],
[pthread_yield function with one argument])
fi
]
)
#---END:
# From fileutils-3.14/aclocal.m4
# @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC
# @ovindex CC
# If the C compiler in not in ANSI C mode by default, try to add an option
# to output variable @code{CC} to make it so. This macro tries various
# options that select ANSI C on some system or another. It considers the
# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
# handles function prototypes correctly.
#
# Patched by monty to only check if __STDC__ is defined. With the original
# check it's impossible to get things to work with the Sunpro compiler from
# Workshop 4.2
#
# If you use this macro, you should check after calling it whether the C
# compiler has been set to accept ANSI C; if not, the shell variable
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
# program @code{ansi2knr}, which comes with Ghostscript.
# @end defmac
AC_DEFUN([AM_PROG_CC_STDC],
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
AC_CACHE_VAL(am_cv_prog_cc_stdc,
[am_cv_prog_cc_stdc=no
ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
# HP-UX -Aa -D_HPUX_SOURCE
# SVR4 -Xc -D__EXTENSIONS__
# removed "-Xc -D__EXTENSIONS__" beacause sun c++ does not like it.
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
do
CC="$ac_save_CC $ac_arg"
AC_TRY_COMPILE(
[#if !defined(__STDC__)
choke me
#endif
/* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/stat.h>
#endif
], [
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};],
[am_cv_prog_cc_stdc="$ac_arg"; break])
done
CC="$ac_save_CC"
])
AC_MSG_RESULT($am_cv_prog_cc_stdc)
case "x$am_cv_prog_cc_stdc" in
x|xno) ;;
*) CC="$CC $am_cv_prog_cc_stdc" ;;
esac
])
# Orginal from bash-2.0 aclocal.m4, Changed to use termcap last by monty.
AC_DEFUN([MYSQL_CHECK_LIB_TERMCAP],
[
AC_CACHE_VAL(mysql_cv_termcap_lib,
[AC_CHECK_LIB(ncursesw, tgetent, mysql_cv_termcap_lib=libncursesw,
[AC_CHECK_LIB(ncurses, tgetent, mysql_cv_termcap_lib=libncurses,
[AC_CHECK_LIB(curses, tgetent, mysql_cv_termcap_lib=libcurses,
[AC_CHECK_LIB(termcap, tgetent, mysql_cv_termcap_lib=libtermcap,
[AC_CHECK_LIB(tinfo, tgetent, mysql_cv_termcap_lib=libtinfo,
mysql_cv_termcap_lib=NOT_FOUND)])])])])])
AC_MSG_CHECKING(for termcap functions library)
if test "$mysql_cv_termcap_lib" = "NOT_FOUND"; then
AC_MSG_ERROR([No curses/termcap library found])
elif test "$mysql_cv_termcap_lib" = "libtermcap"; then
TERMCAP_LIB=-ltermcap
elif test "$mysql_cv_termcap_lib" = "libncursesw"; then
TERMCAP_LIB=-lncursesw
elif test "$mysql_cv_termcap_lib" = "libncurses"; then
TERMCAP_LIB=-lncurses
elif test "$mysql_cv_termcap_lib" = "libtinfo"; then
TERMCAP_LIB=-ltinfo
else
TERMCAP_LIB=-lcurses
fi
AC_MSG_RESULT($TERMCAP_LIB)
])
dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
AC_DEFUN([MYSQL_SIGNAL_CHECK],
[AC_REQUIRE([AC_TYPE_SIGNAL])
AC_MSG_CHECKING(for type of signal functions)
AC_CACHE_VAL(mysql_cv_signal_vintage,
[
AC_TRY_LINK([#include <signal.h>],[
sigset_t ss;
struct sigaction sa;
sigemptyset(&ss); sigsuspend(&ss);
sigaction(SIGINT, &sa, (struct sigaction *) 0);
sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
], mysql_cv_signal_vintage=posix,
[
AC_TRY_LINK([#include <signal.h>], [
int mask = sigmask(SIGINT);
sigsetmask(mask); sigblock(mask); sigpause(mask);
], mysql_cv_signal_vintage=4.2bsd,
[
AC_TRY_LINK([
#include <signal.h>
RETSIGTYPE foo() { }], [
int mask = sigmask(SIGINT);
sigset(SIGINT, foo); sigrelse(SIGINT);
sighold(SIGINT); sigpause(SIGINT);
], mysql_cv_signal_vintage=svr3, mysql_cv_signal_vintage=v7
)]
)]
)
])
AC_MSG_RESULT($mysql_cv_signal_vintage)
if test "$mysql_cv_signal_vintage" = posix; then
AC_DEFINE(HAVE_POSIX_SIGNALS, [1],
[Signal handling is POSIX (sigset/sighold, etc)])
elif test "$mysql_cv_signal_vintage" = "4.2bsd"; then
AC_DEFINE([HAVE_BSD_SIGNALS], [1], [BSD style signals])
elif test "$mysql_cv_signal_vintage" = svr3; then
AC_DEFINE(HAVE_USG_SIGHOLD, [1], [sighold() is present and usable])
fi
])
AC_DEFUN([MYSQL_CHECK_GETPW_FUNCS],
[AC_MSG_CHECKING(whether programs are able to redeclare getpw functions)
AC_CACHE_VAL(mysql_cv_can_redecl_getpw,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <pwd.h>
extern struct passwd *getpwent();], [struct passwd *z; z = getpwent();],
mysql_cv_can_redecl_getpw=yes,mysql_cv_can_redecl_getpw=no)])
AC_MSG_RESULT($mysql_cv_can_redecl_getpw)
if test "$mysql_cv_can_redecl_getpw" = "no"; then
AC_DEFINE(HAVE_GETPW_DECLS, [1], [getpwent() declaration present])
fi
])
AC_DEFUN([MYSQL_HAVE_TIOCGWINSZ],
[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
AC_CACHE_VAL(mysql_cv_tiocgwinsz_in_ioctl,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
mysql_cv_tiocgwinsz_in_ioctl=yes,mysql_cv_tiocgwinsz_in_ioctl=no)])
AC_MSG_RESULT($mysql_cv_tiocgwinsz_in_ioctl)
if test "$mysql_cv_tiocgwinsz_in_ioctl" = "yes"; then
AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1],
[READLINE: your system defines TIOCGWINSZ in sys/ioctl.h.])
fi
])
AC_DEFUN([MYSQL_HAVE_FIONREAD],
[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
AC_CACHE_VAL(mysql_cv_fionread_in_ioctl,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/ioctl.h>], [int x = FIONREAD;],
mysql_cv_fionread_in_ioctl=yes,mysql_cv_fionread_in_ioctl=no)])
AC_MSG_RESULT($mysql_cv_fionread_in_ioctl)
if test "$mysql_cv_fionread_in_ioctl" = "yes"; then
AC_DEFINE([FIONREAD_IN_SYS_IOCTL], [1], [Do we have FIONREAD])
fi
])
AC_DEFUN([MYSQL_HAVE_TIOCSTAT],
[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
AC_CACHE_VAL(mysql_cv_tiocstat_in_ioctl,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/ioctl.h>], [int x = TIOCSTAT;],
mysql_cv_tiocstat_in_ioctl=yes,mysql_cv_tiocstat_in_ioctl=no)])
AC_MSG_RESULT($mysql_cv_tiocstat_in_ioctl)
if test "$mysql_cv_tiocstat_in_ioctl" = "yes"; then
AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL, [1],
[declaration of TIOCSTAT in sys/ioctl.h])
fi
])
AC_DEFUN([MYSQL_STRUCT_DIRENT_D_INO],
[AC_REQUIRE([AC_HEADER_DIRENT])
AC_MSG_CHECKING(if struct dirent has a d_ino member)
AC_CACHE_VAL(mysql_cv_dirent_has_dino,
[AC_TRY_COMPILE([
#include <stdio.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
#if defined(HAVE_DIRENT_H)
# include <dirent.h>
#else
# define dirent direct
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif /* SYSNDIR */
# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif /* SYSDIR */
# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif
#endif /* HAVE_DIRENT_H */
],[
struct dirent d; int z; z = d.d_ino;
], mysql_cv_dirent_has_dino=yes, mysql_cv_dirent_has_dino=no)])
AC_MSG_RESULT($mysql_cv_dirent_has_dino)
if test "$mysql_cv_dirent_has_dino" = "yes"; then
AC_DEFINE(STRUCT_DIRENT_HAS_D_INO, [1],
[d_ino member present in struct dirent])
fi
])
AC_DEFUN([MYSQL_STRUCT_DIRENT_D_NAMLEN],
[AC_REQUIRE([AC_HEADER_DIRENT])
AC_MSG_CHECKING(if struct dirent has a d_namlen member)
AC_CACHE_VAL(mysql_cv_dirent_has_dnamlen,
[AC_TRY_COMPILE([
#include <stdio.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
#if defined(HAVE_DIRENT_H)
# include <dirent.h>
#else
# define dirent direct
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif /* SYSNDIR */
# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif /* SYSDIR */
# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif
#endif /* HAVE_DIRENT_H */
],[
struct dirent d; int z; z = (int)d.d_namlen;
], mysql_cv_dirent_has_dnamlen=yes, mysql_cv_dirent_has_dnamlen=no)])
AC_MSG_RESULT($mysql_cv_dirent_has_dnamlen)
if test "$mysql_cv_dirent_has_dnamlen" = "yes"; then
AC_DEFINE(STRUCT_DIRENT_HAS_D_NAMLEN, [1],
[d_namlen member present in struct dirent])
fi
])
AC_DEFUN([MYSQL_TYPE_SIGHANDLER],
[AC_MSG_CHECKING([whether signal handlers are of type void])
AC_CACHE_VAL(mysql_cv_void_sighandler,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C"
#endif
void (*signal ()) ();],
[int i;], mysql_cv_void_sighandler=yes, mysql_cv_void_sighandler=no)])dnl
AC_MSG_RESULT($mysql_cv_void_sighandler)
if test "$mysql_cv_void_sighandler" = "yes"; then
AC_DEFINE(VOID_SIGHANDLER, [1], [sighandler type is void (*signal ()) ();])
fi
])
AC_DEFUN([MYSQL_CXX_BOOL],
[
AC_REQUIRE([AC_PROG_CXX])
AC_MSG_CHECKING(if ${CXX} supports bool types)
AC_CACHE_VAL(mysql_cv_have_bool,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE(,[bool b = true;],
mysql_cv_have_bool=yes,
mysql_cv_have_bool=no)
AC_LANG_RESTORE
])
AC_MSG_RESULT($mysql_cv_have_bool)
if test "$mysql_cv_have_bool" = yes; then
AC_DEFINE([HAVE_BOOL], [1], [bool is not defined by all C++ compilators])
fi
])dnl
AC_DEFUN([MYSQL_STACK_DIRECTION],
[AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
[AC_TRY_RUN([#include <stdlib.h>
/* Prevent compiler optimization by HP's compiler, see bug#42213 */
#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
#pragma noinline
#endif
int find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
if (addr == 0)
{
addr = &dummy;
return find_stack_direction ();
}
else
return (&dummy > addr) ? 1 : -1;
}
int main ()
{
exit (find_stack_direction() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
ac_cv_c_stack_direction=)])
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
])dnl
AC_DEFUN([MYSQL_CHECK_LONGLONG_TO_FLOAT],
[
AC_MSG_CHECKING(if conversion of longlong to float works)
AC_CACHE_VAL(ac_cv_conv_longlong_to_float,
[AC_TRY_RUN([#include <stdio.h>
typedef long long longlong;
int main()
{
longlong ll=1;
float f;
FILE *file=fopen("conftestval", "w");
f = (float) ll;
fprintf(file,"%g\n",f);
fclose(file);
return (0);
}], ac_cv_conv_longlong_to_float=`cat conftestval`,
ac_cv_conv_longlong_to_float=0,
ac_cv_conv_longlong_to_float="yes")])dnl # Cross compiling, assume can convert
if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes"
then
ac_cv_conv_longlong_to_float=yes
else
ac_cv_conv_longlong_to_float=no
fi
AC_MSG_RESULT($ac_cv_conv_longlong_to_float)
])
AC_DEFUN([MYSQL_CHECK_VIO], [
dnl
dnl we always use vio: no need for special defines
dnl
AC_DEFINE([HAVE_VIO_READ_BUFF], [1],
[Define to enable buffered read. This works only if syscalls
read/recv return as soon as there is some data in the kernel
buffer, no matter how big the given buffer is.])
])
# Local version of _AC_PROG_CXX_EXIT_DECLARATION that does not
# include #stdlib.h as default as this breaks things on Solaris
# (Conflicts with pthreads and big file handling)
m4_define([_AC_PROG_CXX_EXIT_DECLARATION],
[for ac_declaration in \
''\
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);' \
'#include <stdlib.h>'
do
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration
@%:@include <stdlib.h>],
[exit (42);])],
[],
[continue])
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration],
[exit (42);])],
[break])
done
rm -f conftest*
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
echo '#endif' >>confdefs.h
fi
])# _AC_PROG_CXX_EXIT_DECLARATION
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_BIG_TABLES
dnl Sets BIG_TABLES if --with-big-tables is used
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_BIG_TABLES], [
AC_ARG_WITH([big-tables],
AS_HELP_STRING([--with-big-tables],
[Support tables with more than 4 G rows even on 32 bit platforms]),
[bigtables="$withval"],
[bigtables=no])
AC_MSG_CHECKING([for big tables support])
case "$bigtables" in
yes )
AC_DEFINE([BIG_TABLES], [1], [Support big tables])
AC_MSG_RESULT([yes])
;;
* )
AC_MSG_RESULT([no])
;;
esac
])
dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_BIG_TABLES SECTION
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_MAX_INDEXES
dnl Sets MAX_INDEXES
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_MAX_INDEXES], [
AC_ARG_WITH([max-indexes],
AS_HELP_STRING([--with-max-indexes=N],
[Sets the maximum number of indexes per table, default 64]),
[max_indexes="$withval"],
[max_indexes=64])
AC_MSG_CHECKING([max indexes per table])
AC_DEFINE_UNQUOTED([MAX_INDEXES], [$max_indexes],
[Maximum number of indexes per table])
AC_MSG_RESULT([$max_indexes])
])
dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_MAX_INDEXES SECTION
dnl ---------------------------------------------------------------------------
dnl MYSQL_NEEDS_MYSYS_NEW
AC_DEFUN([MYSQL_NEEDS_MYSYS_NEW],
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_cv_use_mysys_new,
[
AC_LANG_PUSH(C++)
AC_TRY_LINK([], [
class A { public: int b; }; A *a=new A; a->b=10; delete a;
], mysql_cv_use_mysys_new=no, mysql_cv_use_mysys_new=yes)
AC_LANG_POP(C++)
])
if test "$mysql_cv_use_mysys_new" = "yes"
then
AC_DEFINE([USE_MYSYS_NEW], [1], [Needs to use mysys_new helpers])
fi
])
AC_DEFUN([MYSQL_CHECK_CXX_VERSION], [
CXX_VERSION=`$CXX --version | sed 1q`
if test $? -ne "0" -o -z "$CXX_VERSION"
then
CXX_VERSION=`$CXX -V 2>&1|sed 1q` # trying harder for Sun and SGI
fi
if test $? -ne "0" -o -z "$CXX_VERSION"
then
CXX_VERSION=`$CXX -v 2>&1|sed 1q` # even harder for Alpha
fi
if test $? -ne "0" -o -z "$CXX_VERSION"
then
CXX_VERSION=""
fi
if test "$CXX_VERSION"
then
AC_MSG_CHECKING("C++ compiler version")
AC_MSG_RESULT("$CXX $CXX_VERSION")
fi
AC_SUBST(CXX_VERSION)
])
AC_DEFUN([MYSQL_PROG_AR], [
case $CXX_VERSION in
MIPSpro*)
AR=$CXX
ARFLAGS="-ar -o"
;;
*Forte*)
AR=$CXX
ARFLAGS="-xar -o"
;;
*)
AC_CHECK_PROG([AR], [ar], [ar])
if test -z "$AR" || test "$AR" = "false"
then
AC_MSG_ERROR([You need ar to build the library])
fi
if test -z "$ARFLAGS"
then
ARFLAGS="cru"
fi
esac
AC_SUBST(AR)
AC_SUBST(ARFLAGS)
])
dnl
dnl Macro to check time_t range: according to C standard
dnl array index must be greater than 0 => if time_t is signed,
dnl the code in the macros below won't compile.
dnl
AC_DEFUN([MYSQL_CHECK_TIME_T],[
AC_MSG_CHECKING(if time_t is unsigned)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[
#include <time.h>
]],
[[
int array[(((time_t)-1) > 0) ? 1 : -1];
]] )
], [
AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
])

View file

@ -1,862 +0,0 @@
dnl ===========================================================================
dnl Support for mysql server plugins
dnl ===========================================================================
dnl
dnl WorkLog#3201
dnl
dnl Framework for pluggable static and dynamic plugins for mysql
dnl
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN([name],[Plugin name],
dnl [Plugin description],
dnl [group,group...])
dnl
dnl DESCRIPTION
dnl First declaration for a plugin (mandatory).
dnl Adds plugin as member to configuration groups (if specified)
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN],[
_MYSQL_PLUGIN(
[$1],
[__MYSQL_PLUGIN_]AS_TR_CPP([$1])[__],
m4_default([$2], [$1 plugin]),
m4_default([$3], [plugin for $1]),
m4_default([$4], []),
)
])
AC_DEFUN([_MYSQL_PLUGIN],[
m4_ifdef([$2], [
AC_FATAL([Duplicate MYSQL_PLUGIN declaration for $3])
],[
m4_define([$2], [$1])
_MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
_MYSQL_PLUGAPPEND_META([$1], $5)
ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
MYSQL_PLUGIN_DIRECTORY([$1],
m4_bregexp(__mysql_include__,[^\(.*\)/plug\.in$],[\1]))
])
])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_STORAGE_ENGINE
dnl
dnl SYNOPSIS
dnl MYSQL_STORAGE_ENGINE([name],[legacy-option],[Storage engine name],
dnl [Storage engine description],[group,group...])
dnl
dnl DESCRIPTION
dnl Short cut for storage engine declarations
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_STORAGE_ENGINE],[
MYSQL_PLUGIN([$1], [$3], [$4], [[$5]])
MYSQL_PLUGIN_DEFINE([$1], [WITH_]AS_TR_CPP([$1])[_STORAGE_ENGINE])
ifelse([$2],[no],[],[
_MYSQL_LEGACY_STORAGE_ENGINE(
m4_bpatsubst([$1], -, _),
m4_bpatsubst(m4_default([$2], [$1-storage-engine]), -, _))
])
])
AC_DEFUN([_MYSQL_LEGACY_STORAGE_ENGINE],[
if test "[${with_]$2[+set}]" = set; then
[with_plugin_]$1="[$with_]$2"
fi
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_DEFINE
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_DEFINE([name],[MYSQL_CPP_DEFINE])
dnl
dnl DESCRIPTION
dnl When a plugin is to be statically linked, define the C macro
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_DEFINE],[
MYSQL_REQUIRE_PLUGIN([$1])
m4_define([MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]), [$2])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_DIRECTORY
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_DIRECTORY([name],[plugin/dir])
dnl
dnl DESCRIPTION
dnl Adds a directory to the build process
dnl if it contains 'configure' it will be picked up automatically
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_DIRECTORY],[
MYSQL_REQUIRE_PLUGIN([$1])
m4_define([MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]), [$2])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_STATIC
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_STATIC([name],[libmyplugin.a])
dnl
dnl DESCRIPTION
dnl Declare the name for the static library
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_STATIC],[
MYSQL_REQUIRE_PLUGIN([$1])
m4_define([MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]), [$2])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_DYNAMIC
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_DYNAMIC([name],[myplugin.la])
dnl
dnl DESCRIPTION
dnl Declare the name for the shared library
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_DYNAMIC],[
MYSQL_REQUIRE_PLUGIN([$1])
m4_define([MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]), [$2])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_MANDATORY
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_MANDATORY([name])
dnl
dnl DESCRIPTION
dnl Marks the specified plugin as a mandatory plugin
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_MANDATORY],[
MYSQL_REQUIRE_PLUGIN([$1])
_MYSQL_PLUGIN_MANDATORY([$1],
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1])
)
])
AC_DEFUN([_MYSQL_PLUGIN_MANDATORY],[
m4_define([$2], [yes])
m4_ifdef([$3], [
AC_FATAL([mandatory plugin $1 has been disabled])
m4_undefine([$2])
])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_DISABLED
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_DISABLED([name])
dnl
dnl DESCRIPTION
dnl Marks the specified plugin as a disabled plugin
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_DISABLED],[
MYSQL_REQUIRE_PLUGIN([$1])
_MYSQL_PLUGIN_DISABLED([$1],
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1])
)
])
AC_DEFUN([_MYSQL_PLUGIN_DISABLED],[
m4_define([$2], [yes])
m4_ifdef([$3], [
AC_FATAL([attempt to disable mandatory plugin $1])
m4_undefine([$2])
])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_DEPENDS
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_DEPENDS([name],[prereq,prereq...])
dnl
dnl DESCRIPTION
dnl Enables other plugins neccessary for the named plugin
dnl Dependency checking is not recursive so if any
dnl required plugin requires further plugins, list them
dnl here too!
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_DEPENDS],[
MYSQL_REQUIRE_PLUGIN([$1])
ifelse($#, 2, [
_MYSQL_PLUGIN_DEPEND([$1], $2)
], [
AC_FATAL([bad number of arguments])
])
])
AC_DEFUN([_MYSQL_PLUGIN_DEPEND],[
ifelse($#, 1, [], [$#:$2], [2:], [], [
MYSQL_REQUIRE_PLUGIN([$2])
_MYSQL_PLUGAPPEND([__mysql_plugdepends_$1__],[$2])
_MYSQL_PLUGIN_DEPEND([$1], m4_shift(m4_shift($@)))
])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_ACTIONS
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_ACTIONS([name],[PLUGIN_CONFIGURE_STUFF])
dnl
dnl DESCRIPTION
dnl Declares additional autoconf actions required to configure the plugin
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_ACTIONS],[
MYSQL_REQUIRE_PLUGIN([$1])
m4_ifdef([$2],[
m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),m4_defn([$2]))
],[
m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [$2])
])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS([name],[file name])
dnl
dnl DESCRIPTION
dnl Some modules in plugins keep dependance on structures
dnl declared in sql/ (THD class usually)
dnl That has to be fixed in the future, but until then
dnl we have to recompile these modules when we want to
dnl to compile server parts with the different #defines
dnl Normally it happens when we compile the embedded server
dnl Thus one should mark such files in his handler using this macro
dnl (currently only one such a file per plugin is supported)
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS],[
MYSQL_REQUIRE_PLUGIN([$1])
m4_define([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]), [$2])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CONFIGURE_PLUGINS
dnl
dnl SYNOPSIS
dnl MYSQL_PLUGIN_DEPENDS([name,name...])
dnl
dnl DESCRIPTION
dnl Used last, emits all required shell code to configure the plugins
dnl Argument is a list of default plugins or meta-plugin
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CONFIGURE_PLUGINS],[
m4_ifdef([__mysql_plugin_configured__],[
AC_FATAL([cannot use [MYSQL_CONFIGURE_PLUGINS] multiple times])
],[
m4_define([__mysql_plugin_configured__],[done])
_MYSQL_INCLUDE_LIST(
m4_bpatsubst(m4_esyscmd([ls plugin/*/plug.in storage/*/plug.in 2>/dev/null]),
[[
]],[,]))
m4_ifdef([__mysql_plugin_list__],[
_MYSQL_CHECK_PLUGIN_ARGS([$1])
_MYSQL_CONFIGURE_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
_MYSQL_EMIT_PLUGIN_ACTIONS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
AC_SUBST([mysql_se_dirs])
AC_SUBST([mysql_se_distdirs])
AC_SUBST([mysql_pg_dirs])
AC_SUBST([mysql_pg_distdirs])
AC_SUBST([mysql_se_unittest_dirs])
AC_SUBST([mysql_pg_unittest_dirs])
AC_SUBST([condition_dependent_plugin_modules])
AC_SUBST([condition_dependent_plugin_objects])
AC_SUBST([condition_dependent_plugin_links])
AC_SUBST([condition_dependent_plugin_includes])
])
])
])
AC_DEFUN([_MYSQL_CONFIGURE_PLUGINS],[
ifelse($#, 0, [], $#, 1, [
_MYSQL_EMIT_CHECK_PLUGIN([$1])
],[
_MYSQL_EMIT_CHECK_PLUGIN([$1])
_MYSQL_CONFIGURE_PLUGINS(m4_shift($@))
])
])
AC_DEFUN([_MYSQL_EMIT_CHECK_PLUGIN],[
__MYSQL_EMIT_CHECK_PLUGIN(
[$1],
m4_bpatsubst([$1], -, _),
[MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
)
])
AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
m4_ifdef([$5],[
AH_TEMPLATE($5, [Include ]$4[ into mysqld])
])
AC_MSG_CHECKING([whether to use ]$3)
mysql_use_plugin_dir=""
m4_ifdef([$10],[
if test "X[$mysql_plugin_]$2" = Xyes -a \
"X[$with_plugin_]$2" != Xno -o \
"X[$with_plugin_]$2" = Xyes; then
AC_MSG_RESULT([error])
AC_MSG_ERROR([disabled])
fi
AC_MSG_RESULT([no])
],[
# Plugin is not disabled, determine if it should be built,
# or only distributed
m4_ifdef([$6], [
if test ! -d "$srcdir/$6"; then
# Plugin directory was removed after autoconf was run; treat
# this as a disabled plugin
if test "X[$with_plugin_]$2" = Xyes; then
AC_MSG_RESULT([error])
AC_MSG_ERROR([disabled])
fi
# The result message will be printed below
[with_plugin_]$2=no
fi
])
m4_ifdef([$9],[
if test "X[$with_plugin_]$2" = Xno; then
AC_MSG_RESULT([error])
AC_MSG_ERROR([cannot disable mandatory plugin])
fi
[mysql_plugin_]$2=yes
],[
case "$with_mysqld_ldflags " in
*"-all-static "*)
# No need to build shared plugins when mysqld is linked with
# -all-static as it won't be able to load them.
if test "X[$mysql_plugin_]$2" != Xyes -a \
"X[$with_plugin_]$2" != Xyes; then
[with_plugin_]$2=no
fi
;;
esac
])
if test "X[$with_plugin_]$2" = Xno; then
AC_MSG_RESULT([no])
else
m4_ifdef([$8],m4_ifdef([$7],[],[[with_plugin_]$2='']))
if test "X[$mysql_plugin_]$2" != Xyes -a \
"X[$with_plugin_]$2" != Xyes; then
m4_ifdef([$8],[
m4_ifdef([$6],[
if test -d "$srcdir/$6" ; then
mysql_use_plugin_dir="$6"
])
AC_SUBST([plugin_]$2[_shared_target], "$8")
AC_SUBST([plugin_]$2[_static_target], [""])
[with_plugin_]$2=yes
AC_MSG_RESULT([plugin])
m4_ifdef([$6],[
else
[mysql_plugin_]$2=no
AC_MSG_RESULT([no])
fi
])
],[
[with_plugin_]$2=no
AC_MSG_RESULT([no])
])
else
m4_ifdef([$7],[
ifelse(m4_bregexp($7, [^lib[^.]+\.a$]), -2, [
dnl change above "-2" to "0" to enable this section
dnl Although this is "pretty", it breaks libmysqld build
m4_ifdef([$6],[
mysql_use_plugin_dir="$6"
mysql_plugin_libs="$mysql_plugin_libs -L[\$(top_builddir)]/$6"
])
mysql_plugin_libs="$mysql_plugin_libs dnl
[-l]m4_bregexp($7, [^lib\([^.]+\)], [\1])"
], m4_bregexp($7, [^\\\$]), 0, [
m4_ifdef([$6],[
mysql_use_plugin_dir="$6"
])
mysql_plugin_libs="$mysql_plugin_libs $7"
], [
m4_ifdef([$6],[
mysql_use_plugin_dir="$6"
mysql_plugin_libs="$mysql_plugin_libs \$(top_builddir)/$6/$7"
],[
mysql_plugin_libs="$mysql_plugin_libs $7"
])
])
m4_ifdef([$5],[
AC_DEFINE($5)
])
AC_SUBST([plugin_]$2[_static_target], "$7")
AC_SUBST([plugin_]$2[_shared_target], [""])
],[
m4_ifdef([$6],[
AC_MSG_RESULT([error])
AC_MSG_ERROR([Plugin $1 does not support static linking])
],[
m4_ifdef([$5],[
AC_DEFINE($5)
AC_SUBST([plugin_]$2[_static_target], ["yes"])
AC_SUBST([plugin_]$2[_shared_target], [""])
])
])
])
m4_ifdef([$9],[
mysql_mandatory_plugins="$mysql_mandatory_plugins [builtin_]$2[_plugin],"
],[
mysql_optional_plugins="$mysql_optional_plugins [builtin_]$2[_plugin],"
])
[with_plugin_]$2=yes
AC_MSG_RESULT([yes])
m4_ifdef([$11],[
condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp($11, [[^/]+$], [\&])"
condition_dependent_plugin_objects="$condition_dependent_plugin_objects m4_bregexp($11, [[^/]+\.], [\&o])"
condition_dependent_plugin_links="$condition_dependent_plugin_links $6/$11"
condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp($11, [^.+[/$]], [\&])"
])
fi
fi
m4_ifdef([$6], [
if test -d "$srcdir/$6"; then
# Even if we don't build a plugin, we bundle its source into the dist
# file. So its Makefile (and Makefiles for any subdirs) must be
# generated for 'make dist' to work.
m4_syscmd([test -f "]$6[/configure"])
ifelse(m4_sysval, 0,
[AC_CONFIG_SUBDIRS($6)],
[
# autoconf doesn't provide an automatic way to configure DIST_SUBDIRS of
# a subdir; for our purposes, it's enough to just check for existing
# Makefile.am files and add them in here
dnl
dnl Warning, don't try to quote the m4_esyscmd() macro, it doesn't
dnl work. Quoting here is tricky.
dnl
dnl The $FIND or $SED variable can be set by the user when calling autoconf itself
dnl to if they need to pass a specific path. This is *NOT* used when calling
dnl running configure!
dnl
AC_CONFIG_FILES(m4_esyscmd([${FIND-find} "]$6[" -name Makefile.am -print | ${SED-sed} 's,\.am$,,']))
]
)
ifelse(
m4_substr($6, 0, 8), [storage/], [
mysql_se_distdirs="$mysql_se_distdirs m4_substr($6, 8)"
if test -n "$mysql_use_plugin_dir" ; then
mysql_se_dirs="$mysql_se_dirs m4_substr($6, 8)"
mysql_se_unittest_dirs="$mysql_se_unittest_dirs ../$6"
fi],
m4_substr($6, 0, 7), [plugin/], [
mysql_pg_distdirs="$mysql_pg_distdirs m4_substr($6, 7)"
if test -n "$mysql_use_plugin_dir" ; then
mysql_pg_dirs="$mysql_pg_dirs m4_substr($6, 7)"
mysql_pg_unittest_dirs="$mysql_pg_unittest_dirs ../$6"
fi],
[AC_FATAL([don't know how to handle plugin dir ]$6)])
fi
])
])
])
AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTIONS],[
ifelse($#, 0, [], $#, 1, [
_MYSQL_EMIT_PLUGIN_ACTION([$1])
],[
_MYSQL_EMIT_PLUGIN_ACTION([$1])
_MYSQL_EMIT_PLUGIN_ACTIONS(m4_shift($@))
])
])
AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTION],[
__MYSQL_EMIT_PLUGIN_ACTION(
[$1],
m4_bpatsubst([$1], -, _),
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
)
])
AC_DEFUN([__MYSQL_EMIT_PLUGIN_ACTION],[
m4_ifdef([$3], [], [
if test "X[$with_plugin_]$2" = Xyes; then
if test "X[$plugin_]$2[_static_target]" = X -a \
"X[$plugin_]$2[_shared_target]" = X; then
AC_MSG_ERROR([that's strange, $1 failed sanity check])
fi
$4
fi
])
])
dnl ===========================================================================
dnl Private helper macros
dnl ===========================================================================
dnl SYNOPSIS
dnl MYSQL_REQUIRE_PLUGIN([name])
dnl
dnl DESCRIPTION
dnl Checks that the specified plugin does exist
AC_DEFUN([MYSQL_REQUIRE_PLUGIN],[
_MYSQL_REQUIRE_PLUGIN([$1], [__MYSQL_PLUGIN_]AS_TR_CPP([$1])[__])
])
define([_MYSQL_REQUIRE_PLUGIN],[
ifdef([$2],[
ifelse($2, [$1], [], [
AC_FATAL([Misspelt MYSQL_PLUGIN declaration for $1])
])
],[
AC_FATAL([Missing MYSQL_PLUGIN declaration for $1])
])
])
dnl ---------------------------------------------------------------------------
dnl SYNOPSIS
dnl _MYSQL_EMIT_METAPLUGINS([name,name...])
dnl
dnl DESCRIPTION
dnl Emits shell code for metaplugins
AC_DEFUN([_MYSQL_EMIT_METAPLUGINS], [ifelse($#, 0, [], $#, 1,
[_MYSQL_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
],
[_MYSQL_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
_MYSQL_EMIT_METAPLUGINS(m4_shift($@))])
])
AC_DEFUN([_MYSQL_EMIT_METAPLUGIN], [
[$1] )
m4_ifdef([$2], [
mysql_plugins='m4_bpatsubst($2, :, [ ])'
],[
mysql_plugins=''
])
;;
])
dnl ---------------------------------------------------------------------------
dnl SYNOPSIS
dnl _MYSQL_PLUGAPPEND([name],[to-append])
dnl
dnl DESCRIPTION
dnl Helper macro for appending to colon-delimited lists
dnl Optinal 3rd argument is for actions only required when defining
dnl macro named for the first time.
AC_DEFUN([_MYSQL_PLUGAPPEND],[
m4_ifdef([$1],[
m4_define([__plugin_append_tmp__], m4_defn([$1]))
m4_undefine([$1])
m4_define([$1], __plugin_append_tmp__[:$2])
m4_undefine([__plugin_append_tmp__])
],[
m4_define([$1], [$2])
$3
])
])
dnl SYNOPSIS
dnl _MYSQL_PLUGAPPEND_META([name],[meta,meta...])
dnl
dnl DESCRIPTION
dnl Helper macro for adding plugins to meta plugins
AC_DEFUN([_MYSQL_PLUGAPPEND_META],[
ifelse($#, 1, [], [$#:$2], [2:], [], [$2], [all], [
AC_FATAL([protected plugin group: all])
], [$2], [none], [
AC_FATAL([protected plugin group: none])
],[
_MYSQL_PLUGAPPEND([__mysql_$1_configs__],[$2])
_MYSQL_PLUGAPPEND([__mysql_]m4_bpatsubst($2, -, _)[_plugins__],[$1], [
_MYSQL_PLUGAPPEND([__mysql_metaplugin_list__],[$2])
])
_MYSQL_PLUGAPPEND_META([$1], m4_shift(m4_shift($@)))
])
])
dnl ---------------------------------------------------------------------------
dnl SYNOPSIS
dnl MYSQL_LIST_PLUGINS
dnl
dnl DESCRIPTION
dnl Emits formatted list of declared plugins
AC_DEFUN([MYSQL_LIST_PLUGINS],[dnl
m4_ifdef([__mysql_plugin_list__],[dnl
_MYSQL_LIST_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))dnl
])dnl
])
AC_DEFUN([_MYSQL_LIST_PLUGINS],[dnl
ifelse($#, 0, [], $#, 1, [dnl
MYSQL_SHOW_PLUGIN([$1])dnl
],[dnl
MYSQL_SHOW_PLUGIN([$1])dnl
_MYSQL_LIST_PLUGINS(m4_shift($@))dnl
])dnl
])
AC_DEFUN([MYSQL_SHOW_PLUGIN],[
_MYSQL_SHOW_PLUGIN(
[$1],
[$1-plugin],
[MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),
__mysql_[$1]_configs__,
)
])
AC_DEFUN([_MYSQL_SHOW_PLUGIN],[dnl
=== $3 ===
Plugin Name: [$1]
Description: $4
Supports build: _PLUGIN_BUILD_TYPE([$7],[$8])[]dnl
m4_ifdef([$12],[
Configurations: m4_bpatsubst($12, :, [, ])])[]dnl
m4_ifdef([$10],[
Status: disabled])[]dnl
m4_ifdef([$9],[
Status: mandatory])[]dnl
])
AC_DEFUN([_PLUGIN_BUILD_TYPE],
[m4_ifdef([$1],[static ]m4_ifdef([$2],[and dnl
]))[]m4_ifdef([$2],[dynamic],[m4_ifdef([$1],[],[static])])])
dnl ---------------------------------------------------------------------------
AC_DEFUN([_MYSQL_EMIT_PLUGINS],[
ifelse($#, 0, [], [$#:$1], [1:], [], [
m4_ifdef([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [], [
m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),[ ])
])
[$1] )
m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
AC_MSG_ERROR([plugin $1 is disabled])
],[
_MYSQL_EMIT_PLUGIN_ENABLE([$1], m4_bpatsubst([$1], -, _),
[MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]))
])
;;
_MYSQL_EMIT_PLUGINS(m4_shift($@))
])
])
AC_DEFUN([_MYSQL_EMIT_PLUGIN_ENABLE],[
m4_ifdef([$5],m4_ifdef([$4],[
[mysql_plugin_]$2=yes
],[
AC_MSG_WARN([$3 can only be built as a plugin])
]),[
[mysql_plugin_]$2=yes
])
])
AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDS], [
ifelse($#, 0, [], [$#:$1], [1:], [], [
_MYSQL_EMIT_CHECK_DEPENDS(m4_bpatsubst([$1], -, _),
[__mysql_plugdepends_$1__])
_MYSQL_EMIT_PLUGIN_DEPENDS(m4_shift($@))
])
])
AC_DEFUN([_MYSQL_EMIT_CHECK_DEPENDS], [
m4_ifdef([$2], [
if test "X[$mysql_plugin_]$1" = Xyes -a \
"X[$with_plugin_]$1" != Xno -o \
"X[$with_plugin_]$1" = Xyes; then
_MYSQL_EMIT_PLUGIN_DEPENDENCIES(m4_bpatsubst($2, :, [,]))
fi
])
])
AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDENCIES], [
ifelse([$1], [], [], [
m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
AC_MSG_ERROR([depends upon disabled plugin $1])
],[
[mysql_plugin_]m4_bpatsubst([$1], -, _)=yes
if test "X[$with_plugin_]m4_bpatsubst([$1], -, _)" = Xno; then
AC_MSG_ERROR([depends upon disabled plugin $1])
fi
])
_MYSQL_EMIT_PLUGIN_DEPENDENCIES(m4_shift($@))
])
])
dnl SYNOPSIS
dnl _MYSQL_CHECK_PLUGIN_ARGS([plugin],[plugin]...)
dnl
dnl DESCRIPTION
dnl Emits shell script for checking configure arguments
dnl Arguments to this macro is default value for selected plugins
AC_DEFUN([_MYSQL_CHECK_PLUGIN_ARGS],[
__MYSQL_CHECK_PLUGIN_ARGS(m4_default([$1], [default]))
])
AC_DEFUN([__MYSQL_CHECK_PLUGIN_ARGS],[
AC_ARG_WITH([plugins],
AS_HELP_STRING([--with-plugins=PLUGIN[[[[[,PLUGIN..]]]]]],
[Plugins to include in mysqld. (default is: $1) Must be a
configuration name or a comma separated list of plugins.])
AS_HELP_STRING([],
[Available configurations are:] dnl
m4_bpatsubst([none:]m4_ifdef([__mysql_metaplugin_list__],
__mysql_metaplugin_list__:)[all], :, [ ])[.])
AS_HELP_STRING([],
[Available plugins are:] dnl
m4_bpatsubst(__mysql_plugin_list__, :, [ ])[.])
AS_HELP_STRING([--without-plugin-PLUGIN],
[Disable the named plugin from being built. Otherwise, for
plugins which are not selected for inclusion in mysqld will be
built dynamically (if supported)])
AS_HELP_STRING([--with-plugin-PLUGIN],
[Forces the named plugin to be linked into mysqld statically.]),
[mysql_plugins="`echo $withval | tr ',.:;*[]' ' '`"],
[mysql_plugins=['$1']])
m4_divert_once([HELP_VAR_END],[
Description of plugins:
MYSQL_LIST_PLUGINS])
case "$mysql_plugins" in
all )
mysql_plugins='m4_bpatsubst(__mysql_plugin_list__, :, [ ])'
;;
none )
mysql_plugins=''
;;
m4_ifdef([__mysql_metaplugin_list__],[
_MYSQL_EMIT_METAPLUGINS(m4_bpatsubst(__mysql_metaplugin_list__, :, [,]))
])
esac
for plugin in $mysql_plugins; do
case "$plugin" in
all | none )
AC_MSG_ERROR([bad plugin name: $plugin])
;;
_MYSQL_EMIT_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
* )
AC_MSG_ERROR([unknown plugin: $plugin])
;;
esac
done
_MYSQL_EMIT_PLUGIN_DEPENDS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
])
dnl ---------------------------------------------------------------------------
dnl Macro: _MYSQL_INCLUDE_LIST
dnl
dnl SYNOPSIS
dnl _MYSQL_INCLUDE_LIST([filename,filename...])
dnl
dnl DESCRIPTION
dnl includes all files from the list
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([_MYSQL_INCLUDE_LIST],[
ifelse([$1], [], [], [
m4_define([__mysql_include__],[$1])
dnl We have to use builtin(), because sinclude would generate an error
dnl "file $1 does not exists" in aclocal-1.8 - which is a bug, clearly
dnl violating m4 specs, and which is fixed in aclocal-1.9
builtin([include],$1)
m4_undefine([__mysql_include__])
_MYSQL_INCLUDE_LIST(m4_shift($@))
])
])
dnl ===========================================================================

View file

@ -1,143 +0,0 @@
AC_DEFUN([MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY], [
AC_CACHE_CHECK([HIST_ENTRY is declared in readline/readline.h], mysql_cv_hist_entry_declared,
AC_TRY_COMPILE(
[
#include "stdio.h"
#include "readline/readline.h"
],
[
HIST_ENTRY entry;
],
[
mysql_cv_hist_entry_declared=yes
AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, [1],
[HIST_ENTRY is defined in the outer libeditreadline])
],
[mysql_cv_libedit_interface=no]
)
)
])
AC_DEFUN([MYSQL_CHECK_LIBEDIT_INTERFACE], [
AC_CACHE_CHECK([libedit variant of rl_completion_entry_function], mysql_cv_libedit_interface,
AC_TRY_COMPILE(
[
#include "stdio.h"
#include "readline/readline.h"
],
[
char res= *(*rl_completion_entry_function)(0,0);
completion_matches(0,0);
],
[
mysql_cv_libedit_interface=yes
AC_DEFINE_UNQUOTED([USE_LIBEDIT_INTERFACE], [1],
[used libedit interface (can we dereference result of rl_completion_entry_function)])
],
[mysql_cv_libedit_interface=no]
)
)
])
AC_DEFUN([MYSQL_CHECK_NEW_RL_INTERFACE], [
AC_CACHE_CHECK([defined rl_compentry_func_t and rl_completion_func_t], mysql_cv_new_rl_interface,
AC_TRY_COMPILE(
[
#include "stdio.h"
#include "readline/readline.h"
],
[
rl_completion_func_t *func1= (rl_completion_func_t*)0;
rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
],
[
mysql_cv_new_rl_interface=yes
AC_DEFINE_UNQUOTED([USE_NEW_READLINE_INTERFACE], [1],
[used new readline interface (are rl_completion_func_t and rl_compentry_func_t defined)])
],
[mysql_cv_new_rl_interface=no]
)
)
])
dnl
dnl check for availability of multibyte characters and functions
dnl (Based on BASH_CHECK_MULTIBYTE in aclocal.m4 of readline-5.0)
dnl
AC_DEFUN([MYSQL_CHECK_MULTIBYTE],
[
AC_CHECK_HEADERS(wctype.h)
AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN,[],[Define if you have mbrlen]))
AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP,[],[Define if you have mbscmp]))
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS,[],[Define if you have mbsrtowcs]))
AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB,[],[Define if you have wcrtomb]))
AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC,[],[Define if you have mbrtowc]))
AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL,[],[Define if you have wcscoll]))
AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP,[],[Define if you have wcsdup]))
AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH,[],[Define if you have wcwidth]))
AC_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE,[],[Define if you have wctype]))
AC_CACHE_CHECK([for mbstate_t], mysql_cv_have_mbstate_t,
[AC_TRY_COMPILE([
#include <wchar.h>], [
mbstate_t ps;
mbstate_t *psp;
psp = (mbstate_t *)0;
], mysql_cv_have_mbstate_t=yes, mysql_cv_have_mbstate_t=no)])
if test $mysql_cv_have_mbstate_t = yes; then
AC_DEFINE([HAVE_MBSTATE_T],[],[Define if mysql_cv_have_mbstate_t=yes])
fi
AC_CHECK_FUNCS(iswlower iswupper towlower towupper iswctype)
AC_CACHE_CHECK([for nl_langinfo and CODESET], mysql_cv_langinfo_codeset,
[AC_TRY_LINK(
[#include <langinfo.h>],
[char* cs = nl_langinfo(CODESET);],
mysql_cv_langinfo_codeset=yes, mysql_cv_langinfo_codeset=no)])
if test $mysql_cv_langinfo_codeset = yes; then
AC_DEFINE([HAVE_LANGINFO_CODESET],[],[Define if mysql_cv_langinfo_codeset=yes])
fi
dnl check for wchar_t in <wchar.h>
AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t,
[AC_TRY_COMPILE(
[#include <wchar.h>
],
[
wchar_t foo;
foo = 0;
], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)])
if test $bash_cv_type_wchar_t = yes; then
AC_DEFINE(HAVE_WCHAR_T, 1, [systems should define this type here])
fi
dnl check for wctype_t in <wctype.h>
AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t,
[AC_TRY_COMPILE(
[#include <wctype.h>],
[
wctype_t foo;
foo = 0;
], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)])
if test $bash_cv_type_wctype_t = yes; then
AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here])
fi
dnl check for wint_t in <wctype.h>
AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t,
[AC_TRY_COMPILE(
[#include <wctype.h>],
[
wint_t foo;
foo = 0;
], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)])
if test $bash_cv_type_wint_t = yes; then
AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
fi
])

View file

@ -1,219 +0,0 @@
dnl ===========================================================================
dnl Support for SSL
dnl ===========================================================================
dnl
dnl
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_USE_BUNDLED_YASSL
dnl
dnl SYNOPSIS
dnl MYSQL_USE_BUNDLED_YASSL()
dnl
dnl DESCRIPTION
dnl Add defines so yassl is built and linked with
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_USE_BUNDLED_YASSL], [
with_bundled_yassl="yes"
yassl_dir="yassl"
AC_SUBST([yassl_dir])
yassl_libs="\$(top_builddir)/extra/yassl/src/libyassl.la \
\$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la"
AC_SUBST(yassl_libs)
AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for SSL.])
AC_DEFINE([HAVE_YASSL], [1], [Defined by configure. Using yaSSL for SSL.])
# System specific checks
yassl_integer_extra_cxxflags=""
case $host_cpu--$CXX_VERSION in
sparc*--*Sun*C++*5.6*)
# Disable inlining when compiling taocrypt/src/
yassl_taocrypt_extra_cxxflags="+d"
AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/])
;;
esac
AC_SUBST([yassl_taocrypt_extra_cxxflags])
# Thread safe check
yassl_thread_cxxflags=""
yassl_thread_safe=""
if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"; then
yassl_thread_cxxflags="-DYASSL_THREAD_SAFE"
yassl_thread_safe="(thread-safe)"
fi
AC_SUBST([yassl_thread_cxxflags])
# Link extra/yassl/include/openssl subdir to include/
yassl_h_ln_cmd="\$(LN) -s \$(top_srcdir)/extra/yassl/include/openssl openssl"
AC_SUBST(yassl_h_ln_cmd)
AC_MSG_RESULT([using bundled yaSSL $yassl_thread_safe])
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_SSL_DIR
dnl
dnl SYNOPSIS
dnl MYSQL_CHECK_SSL_DIR(includes, libs)
dnl
dnl DESCRIPTION
dnl Auxiliary macro to check for ssl at given path
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_SSL_DIR], [
ssl_incs="$1"
ssl_libs="$2"
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
CPPFLAGS="$ssl_incs $CPPFLAGS"
LIBS="$LIBS $ssl_libs"
AC_TRY_LINK([#include <openssl/ssl.h>],
[return SSL_library_init();],
[mysql_ssl_found="yes"],
[mysql_ssl_found="no"])
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_FIND_OPENSSL
dnl
dnl SYNOPSIS
dnl MYSQL_FIND_OPENSSL(location)
dnl
dnl DESCRIPTION
dnl Search the location for OpenSSL support
dnl
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_FIND_OPENSSL], [
location="$1"
#
# Set include paths
#
openssl_include="$location/include"
openssl_includes=""
# Don't set ssl_includes to /usr/include as this gives us a lot of
# compiler warnings when using gcc 3.x
if test "$openssl_include" != "/usr/include"
then
openssl_includes="-I$openssl_include"
fi
#
# Try to link with openSSL libs in <location>
#
openssl_libs="-L$location/lib/ -lssl -lcrypto"
MYSQL_CHECK_SSL_DIR([$openssl_includes], [$openssl_libs])
if test "$mysql_ssl_found" == "no"
then
#
# BUG 764: Compile failure with OpenSSL on Red Hat Linux (krb5.h missing)
# Try to link with include paths to kerberos set
#
openssl_includes="$openssl_includes -I/usr/kerberos/include"
MYSQL_CHECK_SSL_DIR([$openssl_includes], [$openssl_libs])
fi
if test "$mysql_ssl_found" == "no"
then
AC_MSG_ERROR([Could not link with SSL libs at $location])
fi
# openssl-devel-0.9.6 requires dlopen() and we can't link staticly
# on many platforms (We should actually test this here, but it's quite
# hard to do as we are doing libtool for linking.)
case "$CLIENT_EXTRA_LDFLAGS $MYSQLD_EXTRA_LDFLAGS" in
*-all-static*)
AC_MSG_ERROR([You can't use the --all-static link option when using openssl.])
;;
esac
AC_SUBST(openssl_includes)
AC_SUBST(openssl_libs)
NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS $openssl_libs"
AC_DEFINE([HAVE_OPENSSL], [1], [OpenSSL])
AC_MSG_RESULT([using openSSL from $location])
])
dnl ------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_SSL
dnl
dnl SYNOPSIS
dnl MYSQL_CHECK_SSL
dnl
dnl Provides the following configure options:
dnl --with-ssl=DIR
dnl Possible DIR values are:
dnl - no - the macro will disable use of ssl
dnl - bundled, empty or not specified - means use ssl lib
dnl bundled along with MySQL sources
dnl - ssl location prefix - given location prefix, the macro expects
dnl to find the header files in $prefix/include/, and libraries in
dnl $prefix/lib. If headers or libraries weren't found at $prefix, the
dnl macro bails out with error.
dnl
dnl ------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_SSL], [
AC_CONFIG_FILES(extra/yassl/Makefile dnl
extra/yassl/taocrypt/Makefile dnl
extra/yassl/taocrypt/benchmark/Makefile dnl
extra/yassl/taocrypt/src/Makefile dnl
extra/yassl/taocrypt/test/Makefile dnl
extra/yassl/src/Makefile dnl
extra/yassl/testsuite/Makefile)
AC_MSG_CHECKING(for SSL)
AC_ARG_WITH([ssl],
[ --with-ssl[=DIR] Include SSL support],
[mysql_ssl_dir="$withval"],
[mysql_ssl_dir=no])
if test "$with_yassl"
then
AC_MSG_ERROR([The flag --with-yassl is deprecated, use --with-ssl])
fi
if test "$with_openssl"
then
AC_MSG_ERROR([The flag --with-openssl is deprecated, use --with-ssl])
fi
case "$mysql_ssl_dir" in
"no")
#
# Don't include SSL support
#
AC_MSG_RESULT([disabled])
;;
"bundled"|"yes")
#
# Use the bundled SSL implementation (yaSSL)
#
MYSQL_USE_BUNDLED_YASSL
;;
*)
#
# A location where to search for OpenSSL was specified
#
MYSQL_FIND_OPENSSL([$mysql_ssl_dir])
;;
esac
AM_CONDITIONAL([HAVE_YASSL], [ test "$with_bundled_yassl" = "yes" ])
])

View file

@ -1,132 +0,0 @@
dnl Define zlib paths to point at bundled zlib
AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [
ZLIB_INCLUDES="-I\$(top_srcdir)/zlib"
ZLIB_LIBS="\$(top_builddir)/zlib/libzlt.la"
dnl Omit -L$pkglibdir as it's always in the list of mysql_config deps.
ZLIB_DEPS="-lz"
zlib_dir="zlib"
AC_SUBST([zlib_dir])
mysql_cv_compress="yes"
])
dnl Auxiliary macro to check for zlib at given path.
dnl We are strict with the server, as "archive" engine
dnl needs zlibCompileFlags(), but for client only we
dnl are less strict, and take the zlib we find.
AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS"
LIBS="$LIBS $ZLIB_LIBS"
if test X"$with_server" = Xno
then
zlibsym=zlibVersion
else
zlibsym=zlibCompileFlags
fi
AC_CACHE_VAL([mysql_cv_compress],
[AC_TRY_LINK([#include <zlib.h>],
[return $zlibsym();],
[mysql_cv_compress="yes"
AC_MSG_RESULT([ok])],
[mysql_cv_compress="no"])
])
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
])
dnl MYSQL_CHECK_ZLIB_WITH_COMPRESS
dnl ------------------------------------------------------------------------
dnl @synopsis MYSQL_CHECK_ZLIB_WITH_COMPRESS
dnl
dnl Provides the following configure options:
dnl --with-zlib-dir=DIR
dnl Possible DIR values are:
dnl - "no" - the macro will disable use of compression functions
dnl - "bundled" - means use zlib bundled along with MySQL sources
dnl - empty, or not specified - the macro will try default system
dnl library (if present), and in case of error will fall back to
dnl bundled zlib
dnl - zlib location prefix - given location prefix, the macro expects
dnl to find the library headers in $prefix/include, and binaries in
dnl $prefix/lib. If zlib headers or binaries weren't found at $prefix, the
dnl macro bails out with error.
dnl
dnl If the library was found, this function #defines HAVE_COMPRESS
dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include),
dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz) and ZLIB_DEPS which is
dnl used in mysql_config and is always the same as ZLIB_LIBS except to
dnl when we use the bundled zlib. In the latter case ZLIB_LIBS points to the
dnl build dir ($top_builddir/zlib), while mysql_config must point to the
dnl installation dir ($pkglibdir), so ZLIB_DEPS is set to point to
dnl $pkglibdir.
AC_DEFUN([MYSQL_CHECK_ZLIB_WITH_COMPRESS], [
AC_CONFIG_FILES(zlib/Makefile)
AC_MSG_CHECKING([for zlib compression library])
case $SYSTEM_TYPE in
*netware* | *modesto*)
AC_MSG_RESULT(ok)
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
;;
*)
AC_ARG_WITH([zlib-dir],
AC_HELP_STRING([--with-zlib-dir=no|bundled|DIR],
[Provide MySQL with a custom location of
compression library. Given DIR, zlib binary is
assumed to be in $DIR/lib and header files
in $DIR/include.]),
[mysql_zlib_dir=${withval}],
[mysql_zlib_dir=""])
case "$mysql_zlib_dir" in
"no")
mysql_cv_compress="no"
AC_MSG_RESULT([disabled])
;;
"bundled")
MYSQL_USE_BUNDLED_ZLIB
AC_MSG_RESULT([using bundled zlib])
;;
"")
ZLIB_INCLUDES=""
ZLIB_LIBS="-lz"
MYSQL_CHECK_ZLIB_DIR
if test "$mysql_cv_compress" = "no"; then
MYSQL_USE_BUNDLED_ZLIB
AC_MSG_RESULT([system-wide zlib not found, using one bundled with MySQL])
fi
;;
*)
# Test for libz using all known library file endings
if test \( -f "$mysql_zlib_dir/lib/libz.a" -o \
-f "$mysql_zlib_dir/lib/libz.so" -o \
-f "$mysql_zlib_dir/lib/libz.sl" -o \
-f "$mysql_zlib_dir/lib/libz.dylib" \) \
-a -f "$mysql_zlib_dir/include/zlib.h"; then
ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
MYSQL_CHECK_ZLIB_DIR
fi
if test "x$mysql_cv_compress" != "xyes"; then
AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,lib}])
fi
;;
esac
if test "$mysql_cv_compress" = "yes"; then
if test "x$ZLIB_DEPS" = "x"; then
ZLIB_DEPS="$ZLIB_LIBS"
fi
AC_SUBST([ZLIB_LIBS])
AC_SUBST([ZLIB_DEPS])
AC_SUBST([ZLIB_INCLUDES])
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
fi
;;
esac
])
dnl ------------------------------------------------------------------------

View file

@ -299,7 +299,8 @@ CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN)
CHECK_FUNCTION_EXISTS (fchmod HAVE_FCHMOD)
CHECK_FUNCTION_EXISTS (fcntl HAVE_FCNTL)
CHECK_FUNCTION_EXISTS (fconvert HAVE_FCONVERT)
CHECK_SYMBOL_EXISTS(fdatasync "unistd.h" HAVE_FDATASYNC)
CHECK_FUNCTION_EXISTS (fdatasync HAVE_FDATASYNC)
CHECK_SYMBOL_EXISTS(fdatasync "unistd.h" HAVE_DECL_FDATASYNC)
CHECK_FUNCTION_EXISTS (fesetround HAVE_FESETROUND)
CHECK_FUNCTION_EXISTS (fpsetmask HAVE_FPSETMASK)
CHECK_FUNCTION_EXISTS (fseeko HAVE_FSEEKO)

File diff suppressed because it is too large Load diff

View file

@ -1,68 +0,0 @@
# Copyright (C) 2000, 2002, 2004-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a
pkglib_LIBRARIES = libdbug.a
noinst_HEADERS = dbug_long.h
libdbug_a_SOURCES = dbug.c
EXTRA_DIST = CMakeLists.txt example1.c example2.c example3.c \
user.r monty.doc dbug_add_tags.pl \
my_main.c main.c factorial.c dbug_analyze.c \
CMakeLists.txt tests.c tests-t.pl
NROFF_INC = example1.r example2.r example3.r main.r \
factorial.r output1.r output2.r output3.r \
output4.r output5.r
CLEANFILES = $(NROFF_INC) user.t user.ps tests-t
# Must be linked with libs that are not compiled yet
noinst_PROGRAMS = factorial dbug_analyze tests
factorial_SOURCES = my_main.c factorial.c
tests_SOURCES = tests.c
dbug_analyze_SOURCES = dbug_analyze.c
all: user.t user.ps tests-t
user.t: user.r $(NROFF_INC)
-nroff -mm user.r > $@
user.ps: user.r $(NROFF_INC)
-groff -mm user.r > $@
output1.r: factorial
./factorial 1 2 3 4 5 | cat > $@
output2.r: factorial
./factorial -\#t:o 2 3 | cat >$@
output3.r: factorial
./factorial -\#d:t:o 3 | cat >$@
output4.r: factorial
./factorial -\#d,result:o 4 | cat >$@
output5.r: factorial
./factorial -\#d:f,factorial:F:L:o 3 | cat >$@
.c.r:
@RM@ -f $@
@SED@ -e 's!\\!\\\\!g' $< > $@
# a hack to have executable in builddir, not in srcdir
tests-t: tests-t.pl
cp -f $(srcdir)/tests-t.pl ./tests-t

View file

@ -905,6 +905,7 @@ void _db_set_init_(const char *control)
CODE_STATE tmp_cs;
bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
tmp_cs.stack= &init_settings;
tmp_cs.process= db_process ? db_process : "dbug";
DbugParse(&tmp_cs, control);
}
@ -2370,7 +2371,7 @@ static void DbugFlush(CODE_STATE *cs)
void _db_flush_()
{
CODE_STATE *cs;
CODE_STATE *cs= NULL;
get_code_state_or_return;
(void) fflush(cs->stack->out_file);
}

View file

@ -1,57 +0,0 @@
# Copyright (C) 2000-2006 MySQL 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
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/sql
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a \
$(ZLIB_LIBS)
BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \
$(top_builddir)/include/sql_state.h \
$(top_builddir)/include/mysqld_ername.h
pkginclude_HEADERS= $(BUILT_SOURCES)
DISTCLEANFILES = $(BUILT_SOURCES)
SUBDIRS = @yassl_dir@
DIST_SUBDIRS = yassl
# This will build mysqld_error.h, mysqld_ername.h and sql_state.h
# NOTE Built files should depend on their sources to avoid
# the built files being rebuilt in source dist
$(top_builddir)/include/mysqld_error.h: comp_err.c \
$(top_srcdir)/sql/share/errmsg-utf8.txt
$(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT)
$(top_builddir)/extra/comp_err$(EXEEXT) \
--charset=$(top_srcdir)/sql/share/charsets \
--out-dir=$(top_builddir)/sql/share/ \
--header_file=$(top_builddir)/include/mysqld_error.h \
--name_file=$(top_builddir)/include/mysqld_ername.h \
--state_file=$(top_builddir)/include/sql_state.h \
--in_file=$(top_srcdir)/sql/share/errmsg-utf8.txt
$(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
$(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
bin_PROGRAMS = replace perror resolveip my_print_defaults \
resolve_stack_dump mysql_waitpid
# "innochecksum" should be switched
if BUILD_INNODB_TOOLS
bin_PROGRAMS += innochecksum
endif
noinst_PROGRAMS = charset2html
EXTRA_PROGRAMS = comp_err
EXTRA_DIST = CMakeLists.txt
perror.o: perror.c
$(COMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<

View file

@ -1,2 +0,0 @@
SUBDIRS = taocrypt src testsuite
EXTRA_DIST = CMakeLists.txt

View file

@ -1,8 +0,0 @@
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../taocrypt/include -I$(srcdir)/../taocrypt/mySTL
noinst_LTLIBRARIES = libyassl.la
libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \
template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@

View file

@ -1,2 +0,0 @@
SUBDIRS = src test benchmark
EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp)

View file

@ -1,6 +0,0 @@
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
noinst_PROGRAMS = benchmark
benchmark_SOURCES = benchmark.cpp
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
benchmark_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat

View file

@ -1,14 +0,0 @@
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
noinst_LTLIBRARIES = libtaocrypt.la
libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \
asn.cpp bftables.cpp blowfish.cpp coding.cpp des.cpp dh.cpp \
dsa.cpp file.cpp hash.cpp integer.cpp md2.cpp md4.cpp md5.cpp misc.cpp \
random.cpp ripemd.cpp rsa.cpp sha.cpp template_instnt.cpp \
tftables.cpp twofish.cpp
libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C \
@yassl_thread_cxxflags@
EXTRA_DIST = $(wildcard ../include/*.hpp)

View file

@ -1,6 +0,0 @@
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
noinst_PROGRAMS = test
test_SOURCES = test.cpp
test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
test_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
EXTRA_DIST = make.bat

View file

@ -1,10 +0,0 @@
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../taocrypt/include -I$(srcdir)/../taocrypt/mySTL
noinst_PROGRAMS = testsuite
testsuite_SOURCES = testsuite.cpp ../taocrypt/test/test.cpp \
../examples/client/client.cpp ../examples/server/server.cpp \
../examples/echoclient/echoclient.cpp \
../examples/echoserver/echoserver.cpp
testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER @yassl_thread_cxxflags@
testsuite_LDADD = $(top_builddir)/extra/yassl/src/libyassl.la \
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat

View file

@ -1,107 +0,0 @@
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
pkgpsiincludedir = $(pkgincludedir)/psi
BUILT_SOURCES = $(HEADERS_GEN_MAKE) link_sources probes_mysql_nodtrace.h
HEADERS_GEN_CONFIGURE = mysql_version.h
HEADERS_GEN_MAKE = my_config.h
HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \
my_list.h my_alloc.h typelib.h mysql/plugin.h \
mysql/plugin_audit.h mysql/plugin_ftparser.h
pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
my_xml.h mysql_embed.h mysql/plugin_auth.h \
mysql/client_plugin.h mysql/plugin_auth_common.h \
mysql/services.h \
mysql/service_my_snprintf.h mysql/service_thd_alloc.h \
mysql/service_thread_scheduler.h \
mysql/service_thd_wait.h \
my_pthread.h my_no_pthread.h \
decimal.h errmsg.h my_global.h my_net.h \
my_getopt.h sslopt-longopts.h my_dir.h \
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
m_ctype.h my_attribute.h my_compiler.h \
$(HEADERS_GEN_CONFIGURE) $(HEADERS_GEN_MAKE) \
probes_mysql.h probes_mysql_nodtrace.h
noinst_HEADERS = lf.h my_bit.h \
heap.h my_bitmap.h my_uctype.h password.h \
myisam.h myisampack.h myisammrg.h ft_global.h\
mysys_err.h my_base.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h sha2.h \
my_aes.h my_tree.h hash.h thr_alarm.h \
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
my_handler.h my_time.h service_versions.h \
my_rdtsc.h mysql/psi/psi_abi_v1.h mysql/psi/psi_abi_v2.h \
my_user.h my_atomic.h atomic/nolock.h \
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
atomic/solaris.h mysql/innodb_priv.h
pkgpsiinclude_HEADERS = mysql/psi/psi.h mysql/psi/mysql_thread.h \
mysql/psi/mysql_file.h
EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp probes_mysql.d.base \
CMakeLists.txt \
mysql/psi/psi_abi_v1.h.pp \
mysql/psi/psi_abi_v2.h.pp \
mysql/plugin_auth.h.pp mysql/client_plugin.h.pp
# Remove built files and the symlinked directories
CLEANFILES = $(BUILT_SOURCES) readline openssl probes_mysql.d probes_mysql_nodtrace.h
# Some include files that may be moved and patched by configure
DISTCLEANFILES = sched.h $(CLEANFILES) $(HEADERS_GEN_CONFIGURE)
link_sources:
-$(RM) -f readline openssl
@readline_h_ln_cmd@
@yassl_h_ln_cmd@
echo timestamp > link_sources
# We want both "my_config.h" and "config.h" that are identical, as
# MySQL sources assumes the name "my_config.h", and 3rd party sources
# assumes the name "config.h".
my_config.h: config.h
$(CP) config.h my_config.h
# These files should not be included in distributions since they are
# generated by configure from the .h.in files
dist-hook:
$(RM) -f $(distdir)/mysql_version.h $(distdir)/my_config.h
probes_mysql.d:
if ! test -f probes_mysql.d ; then \
$(CP) -f $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d; \
fi
DTRACEPROVIDER = probes_mysql.d
if HAVE_DTRACE
BUILT_SOURCES += probes_mysql_dtrace.h
CLEANFILES += $(DTRACEPROVIDER)
# Fake for creating the probes file. If we are building a separate directory
# then we copy the probes from the source location and use that
# If we are building in the same directory as the source, we do not copy
probes_mysql_dtrace.h: $(DTRACEPROVIDER)
$(DTRACE) $(DTRACEFLAGS) -h -s $(DTRACEPROVIDER) -o $@
endif
probes_mysql_nodtrace.h: $(DTRACEPROVIDER)
@PERL@ $(top_srcdir)/scripts/dheadgen.pl -f $(DTRACEPROVIDER) > $@

View file

@ -52,8 +52,6 @@
# define memmove(d, s, n) bmove ((d), (s), (n))
#elif defined(HAVE_MEMMOVE)
# define bmove(d, s, n) memmove((d), (s), (n))
#else
# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */
#endif
/* Unixware 7 */
@ -76,7 +74,9 @@ extern "C" {
extern void *(*my_str_malloc)(size_t);
extern void (*my_str_free)(void *);
#if defined(HAVE_STPCPY)
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
#define strmov(A,B) __builtin_stpcpy((A),(B))
#elif defined(HAVE_STPCPY)
#define strmov(A,B) stpcpy((A),(B))
#ifndef stpcpy
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
@ -94,14 +94,6 @@ extern char _dig_vec_lower[];
/* Prototypes for string functions */
#if !defined(bfill) && !defined(HAVE_BFILL)
extern void bfill(uchar *dst,size_t len,pchar fill);
#endif
#if !defined(HAVE_BMOVE) && !defined(bmove)
extern void bmove(uuchar *dst, const uchar *src,size_t len);
#endif
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
extern void bchange(uchar *dst,size_t old_len,const uchar *src,
size_t new_len,size_t tot_len);
@ -126,11 +118,6 @@ extern char *strxnmov(char *dst, size_t len, const char *src, ...);
extern size_t strnlen(const char *s, size_t n);
#endif
#if !defined(__cplusplus)
#ifndef HAVE_STRSTR
extern char *strstr(const char *, const char *);
#endif
#endif
extern int is_prefix(const char *, const char *);
/* Conversion routines */

View file

@ -32,8 +32,15 @@
/* GNU C/C++ */
#if defined __GNUC__
/* Convenience macro to test the minimum required GCC version. */
# define MY_GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
/* Any after 2.95... */
# define MY_ALIGN_EXT
/* Comunicate to the compiler the unreachability of the code. */
# if MY_GNUC_PREREQ(4,5)
# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()
# endif
/* Microsoft Visual C++ */
#elif defined _MSC_VER
@ -67,8 +74,13 @@
#endif
/**
Generic compiler-dependent features.
Generic (compiler-independent) features.
*/
#ifndef MY_GNUC_PREREQ
# define MY_GNUC_PREREQ(maj, min) (0)
#endif
#ifndef MY_ALIGNOF
# ifdef __cplusplus
template<typename type> struct my_alignof_helper { char m1; type m2; };
@ -79,6 +91,10 @@
# endif
#endif
#ifndef MY_ASSERT_UNREACHABLE
# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
#endif
/**
C++ Type Traits
*/

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2010, 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
@ -13,8 +13,18 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef _dbug_h
#define _dbug_h
#ifndef MY_DBUG_INCLUDED
#define MY_DBUG_INCLUDED
#ifndef __WIN__
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <signal.h>
#endif /* not __WIN__ */
#ifdef __cplusplus
extern "C" {
@ -111,6 +121,20 @@ extern const char* _db_get_func_(void);
#define DBUG_CRASH_VOID_RETURN \
DBUG_CHECK_CRASH (_db_get_func_(), "_crash_return")
/*
Make the program fail, without creating a core file.
abort() will send SIGABRT which (most likely) generates core.
Use SIGKILL instead, which cannot be caught.
We also pause the current thread, until the signal is actually delivered.
An alternative would be to use _exit(EXIT_FAILURE),
but then valgrind would report lots of memory leaks.
*/
#ifdef __WIN__
#define DBUG_SUICIDE() DBUG_ABORT()
#else
#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause())
#endif
#else /* No debugger */
#define DBUG_ENTER(a1)
@ -139,10 +163,11 @@ extern const char* _db_get_func_(void);
#define DBUG_EXPLAIN_INITIAL(buf,len)
#define DEBUGGER_OFF do { } while(0)
#define DEBUGGER_ON do { } while(0)
#define DBUG_ABORT() abort()
#define DBUG_ABORT() do { } while(0)
#define DBUG_CRASH_ENTER(func)
#define DBUG_CRASH_RETURN(val) do { return(val); } while(0)
#define DBUG_CRASH_VOID_RETURN do { return; } while(0)
#define DBUG_SUICIDE() do { } while(0)
#endif
@ -164,4 +189,5 @@ void debug_sync_point(const char* lock_name, uint lock_timeout);
#ifdef __cplusplus
}
#endif
#endif
#endif /* MY_DBUG_INCLUDED */

View file

@ -39,6 +39,13 @@ C_MODE_START
#define GET_ASK_ADDR 128
#define GET_TYPE_MASK 127
/**
Enumeration of the my_option::arg_type attributes.
It should be noted that for historical reasons variables with the combination
arg_type=NO_ARG, my_option::var_type=GET_BOOL still accepts
arguments. This is someone counter intuitive and care should be taken
if the code is refactored.
*/
enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
struct st_typelib;

View file

@ -501,7 +501,8 @@ int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
uint line);
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
struct timespec *abstime, const char *file, uint line);
const struct timespec *abstime,
const char *file, uint line);
void safe_mutex_global_init(void);
void safe_mutex_end(FILE *file);

View file

@ -256,7 +256,7 @@ extern my_bool my_disable_locking, my_disable_async_io,
extern char wild_many,wild_one,wild_prefix;
extern const char *charsets_dir;
/* from default.c */
extern char *my_defaults_extra_file;
extern const char *my_defaults_extra_file;
extern const char *my_defaults_group_suffix;
extern const char *my_defaults_file;

View file

@ -17,11 +17,10 @@
This file defines the client API to MySQL and also the ABI of the
dynamically linked libmysqlclient.
The ABI should never be changed in a released product of MySQL
The ABI should never be changed in a released product of MySQL,
thus you need to take great care when changing the file. In case
the file is changed so the ABI is broken, you must also
update the SHAREDLIB_MAJOR_VERSION in configure.in .
the file is changed so the ABI is broken, you must also update
the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake
*/
#ifndef _mysql_h

View file

@ -23,8 +23,10 @@
*/
#define MYSQL_CLIENT_PLUGIN_INCLUDED
#ifndef MYSQL_ABI_CHECK
#include <stdarg.h>
#include <stdlib.h>
#endif
/* known plugin types */
#define MYSQL_CLIENT_reserved1 0
@ -77,8 +79,7 @@ struct st_mysql_client_plugin_AUTHENTICATION
/**
loads a plugin and initializes it
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
and last_errno/last_error, for error reporting
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded, -1 to disable type check
@param argc number of arguments to pass to the plugin initialization
@ -98,8 +99,7 @@ mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
This is the same as mysql_load_plugin, but take va_list instead of
a list of arguments.
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
and last_errno/last_error, for error reporting
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded, -1 to disable type check
@param argc number of arguments to pass to the plugin initialization
@ -116,8 +116,7 @@ mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
/**
finds an already loaded plugin by name, or loads it, if necessary
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
and last_errno/last_error, for error reporting
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded

View file

@ -1,5 +1,3 @@
#include <stdarg.h>
#include <stdlib.h>
struct st_mysql_client_plugin
{
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);

View file

@ -90,8 +90,8 @@ typedef struct st_mysql_server_auth_info
int password_used;
/**
Set to the name of the connected client if it can be resolved, or to
the address otherwise
Set to the name of the connected client host, if it can be resolved,
or to its IP address otherwise.
*/
const char *host_or_ip;
@ -107,7 +107,7 @@ typedef struct st_mysql_server_auth_info
*/
struct st_mysql_auth
{
int interface_version; /**< version plugin uses */
int interface_version; /** version plugin uses */
/**
A plugin that a client must use for authentication with this server
plugin. Can be NULL to mean "any plugin".

View file

@ -255,7 +255,11 @@ enum enum_server_command
#define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \
SERVER_QUERY_NO_INDEX_USED|\
SERVER_MORE_RESULTS_EXISTS|\
SERVER_STATUS_METADATA_CHANGED)
SERVER_STATUS_METADATA_CHANGED |\
SERVER_QUERY_WAS_SLOW |\
SERVER_STATUS_DB_DROPPED |\
SERVER_STATUS_CURSOR_EXISTS|\
SERVER_STATUS_LAST_ROW_SENT)
#define MYSQL_ERRMSG_SIZE 512
#define NET_READ_TIMEOUT 30 /* Timeout on read */

View file

@ -172,7 +172,7 @@ IF(UNIX)
SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
ENDIF()
ENDMACRO()
INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
ENDIF()
IF(NOT DISABLE_SHARED)
@ -210,7 +210,7 @@ IF(NOT DISABLE_SHARED)
"${CMAKE_SHARED_LIBRARY_SUFFIX}"
""
linkname)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
@ -219,7 +219,7 @@ IF(NOT DISABLE_SHARED)
"${CMAKE_SHARED_LIBRARY_SUFFIX}"
"${ver}"
linkname)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
ENDFOREACH()
ENDIF()
ENDIF()

View file

@ -1,115 +0,0 @@
# Copyright (C) 2000-2004 MySQL AB, 2008-2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 GNU General Public License as
# published by the Free Software Foundation.
#
# There are special exceptions to the terms and conditions of the GPL as it
# is applied to this software. View the full text of the exception in file
# EXCEPTIONS-CLIENT in the directory of this software distribution.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
#
# This file is public domain and comes with NO WARRANTY of any kind
target = libmysqlclient.la
target_defs = -DMYSQL_CLIENT_NO_THREADS -DDISABLE_MYSQL_THREAD_H \
@LIB_EXTRA_CCFLAGS@
LIBS = @CLIENT_LIBS@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes) @ZLIB_INCLUDES@
include $(srcdir)/Makefile.shared
libmysqlclient_la_SOURCES = $(target_sources)
libmysqlclient_la_LIBADD = $(target_libadd) $(yassl_las)
libmysqlclient_la_LDFLAGS = $(target_ldflags)
EXTRA_DIST = Makefile.shared libmysql.def CMakeLists.txt
noinst_HEADERS = client_settings.h
link_sources:
set -x; \
ss=`echo $(mystringsobjects) | sed "s;\.lo;.c;g"`; \
ds=`echo $(dbugobjects) | sed "s;\.lo;.c;g"`; \
ms=`echo $(mysysobjects) | sed "s;\.lo;.c;g"`; \
vs=`echo $(vio_objects) | sed "s;\.lo;.c;g"`; \
scs=`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"`; \
for f in $$ss; do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
done; \
for f in $$vs $(vioheaders); do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/vio/$$f $$f; \
done; \
for f in $$scs; do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/sql-common/$$f $$f; \
done; \
for f in $(mystringsextra); do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
done; \
for f in $$ds; do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/dbug/$$f $$f; \
done; \
for f in $$ms $(mysysheaders); do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/mysys/$$f $$f; \
done; \
rm -f net.c; \
@LN_CP_F@ $(top_srcdir)/sql/net_serv.cc net.c ; \
rm -f password.c; \
@LN_CP_F@ $(top_srcdir)/sql/password.c password.c
echo timestamp > link_sources
# This part requires GNUmake
#
# This makes a distribution file with only the files needed to compile
# a minimal MySQL client library
#
# For a really minimal distribution (without debugging code) we could
# keep only the stubs for debug.c
#
# A list of needed headers collected from the deps information 000213
nh = my_global.h dbug.h errmsg.h \
m_ctype.h m_string.h password.h \
my_alarm.h my_config.h my_dir.h my_list.h my_net.h my_sys.h \
mysql.h mysql_com.h mysql_version.h mysqld_error.h \
mysys_err.h my_pthread.h thr_alarm.h violite.h hash.h \
sql_common.h ../libmysql/client_settings.h
# Get a list of the needed objects
lobjs = $(mysysobjects1) $(dbugobjects) $(mystringsobjects) $(sqlobjects)
do-lib-dist:
dir=libmysql-$(MYSQL_NO_DASH_VERSION); \
srcs1=`echo $(lobjs) | sed "s;\.lo;.c;g"`; \
srcs2=$(target_sources); \
srcs="$$srcs1 $$srcs2"; \
objs1=`echo $(lobjs) | sed "s;\.lo;.o;g"`; \
objs2=`echo $(target_sources) | sed "s;\.c;.o;g"`; \
objs="$$objs1 $$objs2"; \
rm -rf $$dir; \
mkdir $$dir; \
$(INSTALL_DATA) $$srcs $(mysysheaders) $$dir; \
for i in $(nh); do $(INSTALL_DATA) ../include/$$i $$dir; done; \
echo "# A very minimal Makefile to compile" > $$dir/Makefile; \
echo "# the minimized libmysql library" >> $$dir/Makefile; \
echo "# This file is autogenerated from Makefile.am" >> $$dir/Makefile; \
echo 'CFLAGS= -I. -DMYSQL_CLIENT_NO_THREADS' >>$$dir/Makefile; \
echo "obj=$$objs" >>$$dir/Makefile; \
echo 'all: libmysql.a' >>$$dir/Makefile; \
echo 'libmysql.a: $$(obj)' >>$$dir/Makefile; \
echo ' $$(AR) r $$@ $$?' >>$$dir/Makefile; \
gtar cvzf $$dir.tar.gz $$dir; \
cd $$dir; gmake

View file

@ -1,119 +0,0 @@
# Copyright (C) 2000-2004 MySQL AB, 2008-2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 GNU General Public License as
# published by the Free Software Foundation.
#
# There are special exceptions to the terms and conditions of the GPL as it
# is applied to this software. View the full text of the exception in file
# EXCEPTIONS-CLIENT in the directory of this software distribution.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
#
# This file is public domain and comes with NO WARRANTY of any kind
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
pkgplugindir = $(pkglibdir)/plugin
## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded
## until someone complains that they need separate options.
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target)
pkglib_LTLIBRARIES = $(target)
noinst_PROGRAMS = conf_to_src
target_sources = libmysql.c password.c \
get_password.c errmsg.c
mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
strmake.lo strend.lo \
strnlen.lo strfill.lo is_prefix.lo \
int2str.lo str2int.lo strcont.lo \
strcend.lo ctype-latin1.lo \
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \
strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo \
ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo \
ctype-big5.lo ctype-czech.lo ctype-cp932.lo ctype-eucjpms.lo ctype-euc_kr.lo \
ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \
ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo \
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo \
ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo dtoa.lo
mystringsextra= strto.c
dbugobjects = dbug.lo
mysysheaders = mysys_priv.h my_static.h
vioheaders = vio_priv.h
mysysobjects1 = my_init.lo my_static.lo my_malloc.lo \
my_create.lo my_delete.lo mf_tempfile.lo my_open.lo \
my_file.lo my_read.lo my_write.lo errors.lo \
my_error.lo my_getwd.lo my_div.lo \
mf_pack.lo my_mess.lo mf_dirname.lo mf_fn_ext.lo\
mf_wcomp.lo typelib.lo my_alloc.lo \
mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
my_symlink.lo my_fstream.lo mf_arr_appstr.lo \
mf_loadpath.lo my_pthread.lo my_thr_init.lo \
thr_mutex.lo mulalloc.lo string.lo default.lo \
my_compress.lo array.lo my_once.lo list.lo \
charset.lo charset-def.lo hash.lo mf_iocache.lo \
mf_iocache2.lo my_seek.lo my_sleep.lo \
my_pread.lo mf_cache.lo md5.lo sha1.lo \
my_getopt.lo my_gethostbyname.lo my_port.lo \
my_rename.lo my_chsize.lo my_sync.lo \
my_getsystime.lo my_symlink2.lo mf_same.lo
sqlobjects = net.lo
sql_cmn_objects = pack.lo client.lo my_time.lo client_plugin.lo
# Not needed in the minimum library
mysysobjects2 = my_lib.lo mf_qsort.lo
mysysobjects = $(mysysobjects1) $(mysysobjects2)
target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) \
$(sql_cmn_objects) $(vio_objects) $(sqlobjects)
target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@ @LIBDL@
vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo
BUILT_SOURCES = link_sources
CLEANFILES = $(target_libadd) $(SHLIBOBJS) \
$(target) $(BUILT_SOURCES)
DEFS = -DDEFAULT_CHARSET_HOME='"$(MYSQLBASEdir)"' \
-DMYSQL_DATADIR='"$(MYSQLDATAdir)"' \
-DDEFAULT_HOME_ENV=MYSQL_HOME \
-DPLUGINDIR='"$(pkgplugindir)"' \
-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
-DDEFAULT_SYSCONFDIR='"$(sysconfdir)"' \
-DSHAREDIR='"$(MYSQLSHAREdir)"' -DDISABLE_DTRACE \
$(target_defs)
if HAVE_YASSL
yassl_las = $(top_builddir)/extra/yassl/src/libyassl.la \
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
endif
# The automatic dependencies miss this
#bmove_upp.lo: $(LTCHARSET_OBJS)
clean-local:
rm -f `echo $(mystringsobjects) | sed "s;\.lo;.c;g"` \
`echo $(dbugobjects) | sed "s;\.lo;.c;g"` \
`echo $(mysysobjects) | sed "s;\.lo;.c;g"` \
`echo $(vio_objects) | sed "s;\.lo;.c;g"` \
`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"` \
$(CHARSET_SRCS) $(CHARSET_OBJS) \
$(mystringsextra) $(mysysheaders) $(vioheaders) \
net.c
conf_to_src_SOURCES = conf_to_src.c
conf_to_src_LDADD=
#force static linking of conf_to_src - essential when linking against
#custom installation of libc
conf_to_src_LDFLAGS=@NOINST_LDFLAGS@

View file

@ -1,91 +0,0 @@
# Local macros for automake & autoconf
AC_DEFUN(MYSQL_TYPE_ACCEPT,
[ac_save_CXXFLAGS="$CXXFLAGS"
AC_CACHE_CHECK([base type of last arg to accept], mysql_cv_btype_last_arg_accept,
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if test "$ac_cv_prog_gxx" = "yes"
then
CXXFLAGS="$CXXFLAGS -Werror"
fi
mysql_cv_btype_last_arg_accept=none
[AC_TRY_COMPILE([#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
],
[int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0);],
mysql_cv_btype_last_arg_accept=socklen_t)]
if test $mysql_cv_btype_last_arg_accept = none; then
[AC_TRY_COMPILE([#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
],
[int a = accept(1, (struct sockaddr *) 0, (size_t *) 0);],
mysql_cv_btype_last_arg_accept=size_t)]
fi
if test $mysql_cv_btype_last_arg_accept = none; then
mysql_cv_btype_last_arg_accept=int
fi)
AC_LANG_RESTORE
AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $mysql_cv_btype_last_arg_accept)
CXXFLAGS="$ac_save_CXXFLAGS"
])
#---START: Used in for client configure
AC_DEFUN(MYSQL_CHECK_ULONG,
[AC_MSG_CHECKING(for type ulong)
AC_CACHE_VAL(ac_cv_ulong,
[AC_TRY_RUN([#include <stdio.h>
#include <sys/types.h>
main()
{
ulong foo;
foo++;
exit(0);
}], ac_cv_ulong=yes, ac_cv_ulong=no, ac_cv_ulong=no)])
AC_MSG_RESULT($ac_cv_ulong)
if test "$ac_cv_ulong" = "yes"
then
AC_DEFINE(HAVE_ULONG)
fi
])
AC_DEFUN(MYSQL_CHECK_UCHAR,
[AC_MSG_CHECKING(for type uchar)
AC_CACHE_VAL(ac_cv_uchar,
[AC_TRY_RUN([#include <stdio.h>
#include <sys/types.h>
main()
{
uchar foo;
foo++;
exit(0);
}], ac_cv_uchar=yes, ac_cv_uchar=no, ac_cv_uchar=no)])
AC_MSG_RESULT($ac_cv_uchar)
if test "$ac_cv_uchar" = "yes"
then
AC_DEFINE(HAVE_UCHAR)
fi
])
AC_DEFUN(MYSQL_CHECK_UINT,
[AC_MSG_CHECKING(for type uint)
AC_CACHE_VAL(ac_cv_uint,
[AC_TRY_RUN([#include <stdio.h>
#include <sys/types.h>
main()
{
uint foo;
foo++;
exit(0);
}], ac_cv_uint=yes, ac_cv_uint=no, ac_cv_uint=no)])
AC_MSG_RESULT($ac_cv_uint)
if test "$ac_cv_uint" = "yes"
then
AC_DEFINE(HAVE_UINT)
fi
])
#---END:

View file

@ -5,8 +5,7 @@
the Free Software Foundation.
There are special exceptions to the terms and conditions of the GPL as it
is applied to this software. View the full text of the exception in file
EXCEPTIONS-CLIENT in the directory of this software distribution.
is applied to this software.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -5,8 +5,7 @@
the Free Software Foundation.
There are special exceptions to the terms and conditions of the GPL as it
is applied to this software. View the full text of the exception in file
EXCEPTIONS-CLIENT in the directory of this software distribution.
is applied to this software.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -5,8 +5,7 @@
the Free Software Foundation.
There are special exceptions to the terms and conditions of the GPL as it
is applied to this software. View the full text of the exception in file
EXCEPTIONS-CLIENT in the directory of this software distribution.
is applied to this software.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -5,8 +5,7 @@
the Free Software Foundation.
There are special exceptions to the terms and conditions of the GPL as it
is applied to this software. View the full text of the exception in file
EXCEPTIONS-CLIENT in the directory of this software distribution.
is applied to this software.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,45 +0,0 @@
# Copyright (C) 2000-2004 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 GNU General Public License as
# published by the Free Software Foundation.
#
# There are special exceptions to the terms and conditions of the GPL as it
# is applied to this software. View the full text of the exception in file
# EXCEPTIONS-CLIENT in the directory of this software distribution.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
#
# This file is public domain and comes with NO WARRANTY of any kind
target = libmysqlclient_r.la
target_defs = -DDISABLE_MYSQL_PRLOCK_H -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes) @ZLIB_INCLUDES@
## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include
include $(top_srcdir)/libmysql/Makefile.shared
nodist_libmysqlclient_r_la_SOURCES = $(target_sources)
libmysqlclient_r_la_LIBADD = $(target_libadd) $(yassl_las)
libmysqlclient_r_la_LDFLAGS = $(target_ldflags)
link_sources:
set -x; \
for d in $(top_srcdir)/libmysql $(top_builddir)/libmysql; do \
for f in `cd $$d && echo *.[ch]`; do \
rm -f $$f; \
@LN_CP_F@ $$d/$$f $$f; \
done; \
done
echo timestamp > link_sources

View file

@ -1,229 +0,0 @@
# Copyright (c) 2001, 2010, 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
# 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-1301 USA
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
MYSQLLIBdir= $(libdir)
pkgplugindir = $(pkglibdir)/plugin
EXTRA_DIST = libmysqld.def CMakeLists.txt
DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-DPLUGINDIR="\"$(pkgplugindir)\"" \
-DDISABLE_DTRACE \
@DEFS@
INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/sql -I$(top_srcdir)/sql \
-I$(top_srcdir)/sql/examples \
-I$(top_srcdir)/regex \
$(openssl_includes) @ZLIB_INCLUDES@ \
@condition_dependent_plugin_includes@
noinst_LIBRARIES = libmysqld_int.a
pkglib_LIBRARIES = libmysqld.a
SUBDIRS = . examples
libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
my_time.c client_plugin.c
noinst_HEADERS = embedded_priv.h emb_qcache.h
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
ha_ndbcluster.cc ha_ndbcluster_cond.cc \
ha_ndbcluster_binlog.cc ha_partition.cc \
handler.cc sql_handler.cc \
hostname.cc init.cc password.c \
item.cc item_buff.cc item_cmpfunc.cc item_create.cc \
item_func.cc item_strfunc.cc item_sum.cc item_timefunc.cc \
item_geofunc.cc item_subselect.cc item_row.cc\
item_xmlfunc.cc \
sha2.cc des_key_file.cc \
key.cc lock.cc log.cc sql_state.c \
log_event.cc rpl_record.cc rpl_utility.cc \
log_event_old.cc rpl_record_old.cc \
protocol.cc net_serv.cc opt_range.cc \
opt_sum.cc procedure.cc records.cc sql_acl.cc \
sql_load.cc discover.cc sql_locale.cc \
sql_profile.cc sql_admin.cc sql_truncate.cc datadict.cc \
sql_reload.cc \
sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \
sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \
sql_lex.cc sql_list.cc sql_manager.cc \
scheduler.cc sql_connect.cc sql_parse.cc \
sql_prepare.cc sql_derived.cc sql_rename.cc \
sql_select.cc sql_do.cc sql_show.cc set_var.cc sys_vars.cc \
sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc sql_time.cc \
unireg.cc uniques.cc sql_union.cc hash_filo.cc \
spatial.cc gstream.cc sql_help.cc tztime.cc sql_cursor.cc \
sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \
parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
rpl_filter.cc sql_partition.cc sql_builtin.cc sql_plugin.cc \
debug_sync.cc sql_tablespace.cc transaction.cc \
rpl_injector.cc my_user.c partition_info.cc sql_alter.cc \
sql_servers.cc event_parse_data.cc sql_signal.cc \
rpl_handler.cc mdl.cc keycaches.cc sql_audit.cc \
sql_partition_admin.cc
libmysqld_int_a_SOURCES= $(libmysqld_sources)
nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources)
libmysqld_a_SOURCES=
sqlstoragesources = $(EXTRA_libmysqld_a_SOURCES)
storagesources = @condition_dependent_plugin_modules@
storageobjects = @condition_dependent_plugin_objects@
storagesourceslinks = @condition_dependent_plugin_links@
# automake misses these
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
# The following libraries should be included in libmysqld.a
INC_LIB= $(top_builddir)/regex/libregex.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/vio/libvio.a \
@NDB_SCI_LIBS@ \
@mysql_plugin_libs@ \
$(yassl_inc_libs)
if HAVE_YASSL
yassl_inc_libs= $(top_builddir)/extra/yassl/src/.libs/libyassl.a \
$(top_builddir)/extra/yassl/taocrypt/src/.libs/libtaocrypt.a
endif
# Storage engine specific compilation options
ha_ndbcluster.o:ha_ndbcluster.cc
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
ha_ndbcluster_cond.o:ha_ndbcluster_cond.cc
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
ha_ndbcluster_binlog.o: ha_ndbcluster_binlog.cc
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
# Until we can remove dependency on ha_ndbcluster.h
handler.o: handler.cc
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
# We need rules to compile these as no good way
# found to append fileslists that collected by configure
# to the sources list
ha_federated.o:ha_federated.cc
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
ha_heap.o:ha_heap.cc
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
ha_innodb.o:ha_innodb.cc
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
ha_myisam.o:ha_myisam.cc
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
ha_myisammrg.o:ha_myisammrg.cc
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
#
# To make it easy for the end user to use the embedded library we
# generate a total libmysqld.a from all library files,
# note - InnoDB libraries have circular dependencies, so in INC_LIB
# few libraries are present two times. Metrowerks linker doesn't like
# it at all. Traditional ar has no problems with it, but still there's no
# need to add the same file twice to the library, so 'sort -u' save us
# some time and spares unnecessary work.
libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES) $(storageobjects)
if DARWIN_MWCC
mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects)
else
-rm -f libmysqld.a
current_dir=`pwd`; \
rm -rf tmp; mkdir tmp; \
(for arc in $(INC_LIB) ./libmysqld_int.a; do \
arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
for F in `$(AR) t $$arc | grep -v SYMDEF`; do \
if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
mkdir $$artmp; cd $$artmp > /dev/null; \
$(AR) x ../../$$arc; \
cd $$current_dir > /dev/null; \
ls $$artmp/* | grep -v SYMDEF; \
continue 2; fi; done; \
done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a; \
$(AR) r libmysqld.a $(storageobjects); \
$(RANLIB) libmysqld.a ; \
rm -rf tmp
endif
## XXX: any time the client interface changes, we'll need to bump
## the version info for libmysqld; however, it's possible for the
## libmysqld interface to change without affecting the standard
## libmysqlclient interface. Should we make a separate version
## string for the two?
#libmysqld_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@
#CLEANFILES = $(libmysqld_la_LIBADD) libmysqld.la
BUILT_SOURCES = link_sources
CLEANFILES = $(BUILT_SOURCES)
link_sources:
for f in $(sqlsources); do \
rm -f $$f; \
if test -e $(top_srcdir)/sql/$$f ; \
then \
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
else \
@LN_CP_F@ $(top_builddir)/sql/$$f $$f; \
fi ; \
done; \
for f in $(libmysqlsources); do \
rm -f $$f; \
if test -e $(top_srcdir)/libmysql/$$f ; \
then \
@LN_CP_F@ $(top_srcdir)/libmysql/$$f $$f; \
else \
@LN_CP_F@ $(top_builddir)/libmysql/$$f $$f; \
fi ; \
done; \
if test -n "$(sqlstoragesources)" ; \
then \
for f in "$(sqlstoragesources)"; do \
rm -f "$$f"; \
@LN_CP_F@ `find $(srcdir)/../sql -name "$$f"` "$$f"; \
done; \
fi; \
if test -n "$(storagesources)" ; \
then \
rm -f $(storagesources); \
for f in $(storagesourceslinks); do \
@LN_CP_F@ $(top_srcdir)/$$f . ; \
done; \
fi; \
rm -f client_settings.h; \
@LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h \
client_settings.h; \
echo timestamp > link_sources
clean-local:
rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) | sed "s;\.lo;.c;g"`; \
rm -f client_settings.h

View file

@ -1,53 +0,0 @@
# Copyright (C) 2000 MySQL 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
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
noinst_PROGRAMS = mysql
bin_PROGRAMS = mysqltest_embedded mysql_client_test_embedded
client_sources = $(nodist_mysqltest_embedded_SOURCES) $(nodist_mysql_SOURCES)
tests_sources = $(nodist_mysql_client_test_embedded_SOURCES)
BUILT_SOURCES = link_sources
CLEANFILES = $(client_sources) $(tests_sources) $(BUILT_SOURCES)
EXTRA_DIST = CMakeLists.txt
link_sources:
for f in $(client_sources); do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/client/$$f $$f; \
done; \
for f in $(tests_sources); do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/tests/$$f $$f; \
done
echo timestamp > link_sources
DEFS = -DEMBEDDED_LIBRARY @DEFS@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) \
-I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \
$(openssl_includes)
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ $(yassl_libs)
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @LIBDL@ $(CXXLDFLAGS) \
@NDB_SCI_LIBS@
mysqltest_embedded_LINK = $(CXXLINK)
nodist_mysqltest_embedded_SOURCES = mysqltest.cc
mysqltest_embedded_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a \
@MYSQLD_EXTRA_LDFLAGS@
nodist_mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \
my_readline.h sql_string.h completion_hash.h
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
mysql_client_test_embedded_LINK = $(CXXLINK)
nodist_mysql_client_test_embedded_SOURCES = mysql_client_test.c

View file

@ -506,7 +506,8 @@ int init_embedded_server(int argc, char **argv, char **groups)
orig_argc= *argcp;
orig_argv= *argvp;
load_defaults("my", (const char **)groups, argcp, argvp);
if (load_defaults("my", (const char **)groups, argcp, argvp))
return 1;
defaults_argc= *argcp;
defaults_argv= *argvp;
remaining_argc= argc;

View file

@ -22,4 +22,4 @@ SET(MYSQLSERVICES_SOURCES
my_thread_scheduler_service.c)
ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR})
INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)

Some files were not shown because too many files have changed in this diff Show more