diff options
author | unknown <brian@avenger.(none)> | 2004-12-04 11:00:33 -0800 |
---|---|---|
committer | unknown <brian@avenger.(none)> | 2004-12-04 11:00:33 -0800 |
commit | 623c733895dd490fce64ec864713279570ea37f3 (patch) | |
tree | c28536d2037e8f874d88dc7cf3a9d13e2c6c98f1 /config/ac-macros/zlib.m4 | |
parent | 107ef617ac91856996a0989ccb6367f317e74872 (diff) | |
download | mariadb-git-623c733895dd490fce64ec864713279570ea37f3.tar.gz |
Fixing problem with case insitive file systems.
Would you believe that I wrote all of this on a Mac? I just happen to be not using HFS for the partition I did this work on. Oops :)
config/ac-macros/alloca.m4:
mvdir
config/ac-macros/character_sets.m4:
mvdir
config/ac-macros/check_cpu.m4:
mvdir
config/ac-macros/compiler_flag.m4:
mvdir
config/ac-macros/ha_archive.m4:
mvdir
config/ac-macros/ha_berkeley.m4:
mvdir
config/ac-macros/ha_example.m4:
mvdir
config/ac-macros/ha_innodb.m4:
mvdir
config/ac-macros/ha_isam.m4:
mvdir
config/ac-macros/ha_ndbcluster.m4:
mvdir
config/ac-macros/ha_tina.m4:
mvdir
config/ac-macros/large_file.m4:
mvdir
config/ac-macros/misc.m4:
mvdir
config/ac-macros/mysqlfs.m4:
mvdir
config/ac-macros/openssl.m4:
mvdir
config/ac-macros/readline.m4:
mvdir
config/ac-macros/sanity.m4:
mvdir
config/ac-macros/zlib.m4:
mvdir
configure.in:
Fix silly little problem with case insensitive filesystems.
Funny thing is that I wrote all this on a Mac, but I don't use HFS on that partition so I never noticed that it would be an issue.
Oops :)
Diffstat (limited to 'config/ac-macros/zlib.m4')
-rw-r--r-- | config/ac-macros/zlib.m4 | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4 new file mode 100644 index 00000000000..6c92d561e5a --- /dev/null +++ b/config/ac-macros/zlib.m4 @@ -0,0 +1,105 @@ +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 Auxiliary macro to check for zlib at given path + +AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [ +save_INCLUDES="$INCLUDES" +save_LIBS="$LIBS" +INCLUDES="$INCLUDES $ZLIB_INCLUDES" +LIBS="$LIBS $ZLIB_LIBS" +AC_CACHE_VAL([mysql_cv_compress], + [AC_TRY_LINK([#include <zlib.h>], + [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" +]) + +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 +*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=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 ------------------------------------------------------------------------ |