Commit 5217955d authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/kostja/mysql/mysql-4.1-zlib


configure.in:
  Auto merged
parents 906ad26d 6a371e24
......@@ -19,8 +19,15 @@
AUTOMAKE_OPTIONS = foreign
# These are built from source in the Docs directory
EXTRA_DIST = INSTALL-SOURCE README COPYING zlib
SUBDIRS = . include @docs_dirs@ \
EXTRA_DIST = INSTALL-SOURCE README COPYING
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
@readline_topdir@ sql-common \
@thread_dirs@ pstack @sql_client_dirs@ \
@sql_server_dirs@ scripts man tests \
netware @libmysqld_dirs@ \
@bench_dirs@ support-files @fs_dirs@ @tools_dirs@
DIST_SUBDIRS = . include @docs_dirs@ zlib \
@readline_topdir@ sql-common \
@thread_dirs@ pstack @sql_client_dirs@ \
@sql_server_dirs@ scripts man tests SSL\
......
......@@ -167,32 +167,116 @@ then
fi
])
AC_DEFUN(MYSQL_CHECK_ZLIB_WITH_COMPRESS, [
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/libz.la"
zlib_dir="zlib"
AC_SUBST([zlib_dir])
mysql_cv_compress="yes"
])
dnl Auxilary macro to check for zlib at given path
AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
save_INCLUDES="$INCLUDES"
save_LIBS="$LIBS"
LIBS="-l$1 $LIBS"
AC_CACHE_CHECK([if libz with compress], mysql_cv_compress,
[AC_TRY_RUN([#include <zlib.h>
#ifdef __cplusplus
extern "C"
#endif
int main(int argv, char **argc)
{
return 0;
}
INCLUDES="$ZLIB_INCLUDES"
LIBS="$ZLIB_LIBS"
AC_CACHE_VAL([mysql_cv_compress],
[AC_TRY_LINK([#include <zlib.h>],
[int link_test() { return compress(0, (unsigned long*) 0, "", 0); }],
[mysql_cv_compress="yes"
AC_MSG_RESULT([ok])],
[mysql_cv_compress="no"])
])
INCLUDES="$save_INCLUDES"
LIBS="$save_LIBS"
])
int link_test()
{
return compress(0, (unsigned long*) 0, "", 0);
}
], mysql_cv_compress=yes, mysql_cv_compress=no)])
if test "$mysql_cv_compress" = "yes"
then
AC_DEFINE([HAVE_COMPRESS], [1], [ZLIB and compress])
else
LIBS="$save_LIBS"
fi
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) and
dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz).
AC_DEFUN([MYSQL_CHECK_ZLIB_WITH_COMPRESS], [
AC_MSG_CHECKING([for zlib compression library])
case $SYSTEM_TYPE in
dnl This is a quick fix for Netware if AC_TRY_LINK for some reason
dnl won't work there. Uncomment in case of failure and on Netware
dnl we'll always assume that zlib is present
dnl *netware* | *modesto*)
dnl AC_MSG_RESULT(ok)
dnl AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
dnl ;;
*)
AC_ARG_WITH([zlib-dir],
AC_HELP_STRING([--with-zlib-dir=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
;;
*)
if test -f "$mysql_zlib_dir/lib/libz.a" -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
AC_SUBST([ZLIB_LIBS])
AC_SUBST([ZLIB_INCLUDES])
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
fi
;;
esac
])
dnl ------------------------------------------------------------------------
#---START: Used in for client configure
AC_DEFUN(MYSQL_CHECK_ULONG,
[AC_MSG_CHECKING(for type ulong)
......
......@@ -664,15 +664,6 @@ AC_ARG_WITH(named-curses-libs,
[ with_named_curses=no ]
)
# Force use of a zlib (compress)
AC_ARG_WITH(named-z-libs,
[ --with-named-z-libs=ARG
Use specified zlib libraries instead of
those automatically found by configure.],
[ with_named_zlib=$withval ],
[ with_named_zlib=z ]
)
# Make thread safe client
AC_ARG_ENABLE(thread-safe-client,
[ --enable-thread-safe-client
......@@ -806,16 +797,7 @@ AC_CHECK_FUNC(crypt, AC_DEFINE([HAVE_CRYPT], [1], [crypt]))
# For sem_xxx functions on Solaris 2.6
AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init))
# For compress in zlib
case $SYSTEM_TYPE in
*netware* | *modesto*)
AC_DEFINE(HAVE_COMPRESS, [1])
;;
*)
MYSQL_CHECK_ZLIB_WITH_COMPRESS($with_named_zlib)
;;
esac
MYSQL_CHECK_ZLIB_WITH_COMPRESS
#--------------------------------------------------------------------
# Check for TCP wrapper support
......@@ -945,7 +927,7 @@ then
fi
# We make a special variable for client library's to avoid including
# thread libs in the client.
NON_THREADED_CLIENT_LIBS="$LIBS"
NON_THREADED_CLIENT_LIBS="$LIBS $ZLIB_LIBS"
AC_MSG_CHECKING([for int8])
case $SYSTEM_TYPE in
......@@ -3082,6 +3064,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
include/mysql_version.h dnl
cmd-line-utils/Makefile dnl
cmd-line-utils/libedit/Makefile dnl
zlib/Makefile dnl
cmd-line-utils/readline/Makefile)
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
AC_OUTPUT
......
......@@ -20,7 +20,7 @@
target = libmysqlclient.la
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
LIBS = @CLIENT_LIBS@
INCLUDES = -I$(top_srcdir)/include $(openssl_includes)
INCLUDES = -I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@
include $(srcdir)/Makefile.shared
......
......@@ -21,7 +21,8 @@ target = libmysqlclient_r.la
target_defs = -DDONT_USE_RAID -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
LIBS = @LIBS@ @openssl_libs@
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes)
INCLUDES = @MT_INCLUDES@ \
-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
......
......@@ -27,7 +27,7 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
-DSHAREDIR="\"$(MYSQLSHAREdir)\""
INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \
-I$(top_srcdir)/sql -I$(top_srcdir)/regex \
$(openssl_includes)
$(openssl_includes) @ZLIB_INCLUDES@
noinst_LIBRARIES = libmysqld_int.a
pkglib_LIBRARIES = libmysqld.a
......
......@@ -18,8 +18,11 @@ EXTRA_DIST = mi_test_all.sh mi_test_all.res
pkgdata_DATA = mi_test_all mi_test_all.res
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include
LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a
LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \
@ZLIB_LIBS@ \
$(top_builddir)/strings/libmystrings.a
pkglib_LIBRARIES = libmyisam.a
bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump
myisamchk_DEPENDENCIES= $(LIBRARIES)
......
......@@ -17,7 +17,8 @@
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir)
INCLUDES = @MT_INCLUDES@ \
@ZLIB_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir)
pkglib_LIBRARIES = libmysys.a
LDADD = libmysys.a ../dbug/libdbug.a \
../strings/libmystrings.a
......
......@@ -19,7 +19,7 @@
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
INCLUDES = @MT_INCLUDES@ \
INCLUDES = @MT_INCLUDES@ @ZLIB_INCLUDES@ \
@bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \
-I$(top_srcdir)/include -I$(top_srcdir)/regex \
-I$(srcdir) $(openssl_includes)
......@@ -30,14 +30,15 @@ noinst_PROGRAMS = gen_lex_hash
bin_PROGRAMS = mysql_tzinfo_to_sql
gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@
LDADD = @isam_libs@ \
../myisam/libmyisam.a \
../myisammrg/libmyisammrg.a \
../heap/libheap.a \
../vio/libvio.a \
../mysys/libmysys.a \
../dbug/libdbug.a \
../regex/libregex.a \
../strings/libmystrings.a
@ZLIB_LIBS@ \
$(top_builddir)/myisam/libmyisam.a \
$(top_builddir)/myisammrg/libmyisammrg.a \
$(top_builddir)/heap/libheap.a \
$(top_builddir)/vio/libvio.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/regex/libregex.a \
$(top_builddir)/strings/libmystrings.a
mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
@bdb_libs@ @innodb_libs@ @pstack_libs@ \
......
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes)
LDADD= @CLIENT_EXTRA_LDFLAGS@ ../libmysql_r/libmysqlclient_r.la @openssl_libs@
# Copyright (C) 2004 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; either version 2 of the License, or
# (at your option) any later version.
#
# 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
INCLUDES=@MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes)
LDADD= @CLIENT_EXTRA_LDFLAGS@ @openssl_libs@ @ZLIB_LIBS@ \
$(top_builddir)/libmysql_r/libmysqlclient_r.la
bin_PROGRAMS= mysqlmanager
mysqlmanager_SOURCES= mysqlmanager.c
mysqlmanager_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
......
# Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult 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; either version 2 of the License, or
# (at your option) any later version.
#
# 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
noinst_LTLIBRARIES=libz.la
noinst_HEADERS= crc32.h deflate.h inffast.h inffixed.h inflate.h \
inftrees.h trees.h zconf.h zlib.h zutil.h
libz_la_SOURCES= adler32.c compress.c crc32.c deflate.c gzio.c \
infback.c inffast.c inflate.c inftrees.c trees.c \
uncompr.c zutil.c
EXTRA_DIST= README FAQ INDEX ChangeLog algorithm.txt zlib.3
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