Commit 8664de22 authored by Davi Arnaut's avatar Davi Arnaut

WL#5665: Removal of the autotools-based build system

The autotools-based build system has been superseded and
is being removed in order to ease the maintenance burden on
developers tweaking and maintaining the build system.

In order to support tools that need to extract the server
version, a new file that (only) contains the server version,
called VERSION, is introduced. The file contents are human
and machine-readable. The format is:

MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=-rc

The CMake based version extraction in cmake/mysql_version.cmake
is changed to extract the version from this file. The configure
to CMake wrapper is retained for backwards compatibility and to
support the BUILD/ scripts. Also, a new a makefile target
show-dist-name that prints the server version is introduced.

VERSION:
  Add top-level version file.
cmake/mysql_version.cmake:
  Get version information from the top-level VERSION file.
  Do not cache the version components (MAJOR_VERSION, etc).
  Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
parent 766db2b5
......@@ -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`
......
# 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
#!/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
#!/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
......
# 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
This diff is collapsed.
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=
# 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;
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
......@@ -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
......
......@@ -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
#
# 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 configure.in
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,60 +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}")
IF(NOT VERSION_STRING)
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
ENDIF()
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")
......
#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"
......
# 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
## 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
## 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
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
])
This diff is collapsed.
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
])])
# 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
])
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 ---------------------------------------------------------------------------
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
])
#
# 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],
[AS_IF([test "$with_debug" != "no"],
[USE_MYSQL_MAINTAINER_MODE=yes], [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"
C_WARNINGS="${C_WARNINGS} -Wdeclaration-after-statement"
])
# 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])
])
This diff is collapsed.
This diff is collapsed.
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
])
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" ])
])
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 ------------------------------------------------------------------------
This diff is collapsed.
# 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
# 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 $<
SUBDIRS = taocrypt src testsuite
EXTRA_DIST = CMakeLists.txt
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@
SUBDIRS = src test benchmark
EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp)
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
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)
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
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
# 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) > $@
# 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
# 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@
# 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:
# 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
# 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
# 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
# Copyright 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
AM_CPPFLAGS = -I$(top_srcdir)/include
pkglib_LIBRARIES = libmysqlservices.a
libmysqlservices_a_SOURCES = my_snprintf_service.c thd_alloc_service.c \
thd_wait_service.c \
my_thread_scheduler_service.c
EXTRA_DIST = CMakeLists.txt
# Copyright (C) 2000-2001, 2003-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
## Process this file with automake to create Makefile.in
man1_MANS = @man1_files@
man8_MANS = @man8_files@
EXTRA_DIST = $(man1_MANS) $(man8_MANS) CMakeLists.txt
# "make_win_*" are not needed in Unix binary packages,
install-data-hook:
rm -f $(DESTDIR)$(mandir)/man1/make_win_*
This diff is collapsed.
# 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
testroot = $(prefix)
safedir = $(testroot)/mysql-test/lib/My/SafeProcess
#nobase_bin_PROGRAMS = ...
safe_PROGRAMS = my_safe_process
my_safe_process_SOURCES = safe_process.cc
EXTRA_DIST = safe_kill_win.cc \
safe_process_win.cc \
CMakeLists.txt
This diff is collapsed.
This diff is collapsed.
......@@ -7,7 +7,7 @@ SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@")
SET(VERSION "@VERSION@")
SET(MAJOR_VERSION "@MAJOR_VERSION@")
SET(MINOR_VERSION "@MINOR_VERSION@")
SET(PATCH "@PATCH@")
SET(PATCH_VERSION "@PATCH_VERSION@")
SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@)
SET(MANUFACTURER "@MANUFACTURER@")
SET(WIXCA_LOCATION "@WIXCA_LOCATION@")
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment