summaryrefslogtreecommitdiff
path: root/config/ac-macros
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-07-02 22:08:51 +0200
committerSergei Golubchik <sergii@pisem.net>2011-07-02 22:08:51 +0200
commit9809f05199aeb0b67991fac41bd86f38730768dc (patch)
treefa2792ff86d0da014b535d743759810612338042 /config/ac-macros
parent0accbd0364e0333e0b119aa9ce93e34ded9df6cb (diff)
parent5a0e7394a5ae0c7b6a1ea35b7ea3a8985325987a (diff)
downloadmariadb-git-9809f05199aeb0b67991fac41bd86f38730768dc.tar.gz
5.5-merge
Diffstat (limited to 'config/ac-macros')
-rw-r--r--config/ac-macros/alloca.m468
-rw-r--r--config/ac-macros/character_sets.m4501
-rw-r--r--config/ac-macros/check_cpu.m447
-rw-r--r--config/ac-macros/compiler_flag.m462
-rw-r--r--config/ac-macros/dtrace.m438
-rw-r--r--config/ac-macros/ha_ndbcluster.m4343
-rw-r--r--config/ac-macros/large_file.m4142
-rw-r--r--config/ac-macros/libevent.m495
-rw-r--r--config/ac-macros/libevent_configure.m4324
-rw-r--r--config/ac-macros/maintainer.m464
-rw-r--r--config/ac-macros/misc.m4688
-rw-r--r--config/ac-macros/plugins.m4902
-rw-r--r--config/ac-macros/readline.m4143
-rw-r--r--config/ac-macros/ssl.m4219
-rw-r--r--config/ac-macros/zlib.m4132
15 files changed, 0 insertions, 3768 deletions
diff --git a/config/ac-macros/alloca.m4 b/config/ac-macros/alloca.m4
deleted file mode 100644
index 8c730dd671f..00000000000
--- a/config/ac-macros/alloca.m4
+++ /dev/null
@@ -1,68 +0,0 @@
-AC_DEFUN([MYSQL_FUNC_ALLOCA],
-[
-# Since we have heard that alloca fails on IRIX never define it on a
-# SGI machine
-if test ! "$host_vendor" = "sgi"
-then
- AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
- # for constant arguments. Useless!
- AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
- [AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
- ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
- if test "$ac_cv_header_alloca_h" = "yes"
- then
- AC_DEFINE(HAVE_ALLOCA, 1)
- fi
-
- AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
- [AC_TRY_LINK([
- #ifdef __GNUC__
- # define alloca __builtin_alloca
- #else
- # if HAVE_ALLOCA_H
- # include <alloca.h>
- # else
- # ifdef _AIX
- #pragma alloca
- # else
- # ifndef alloca /* predefined by HP cc +Olibcalls */
- char *alloca ();
- # endif
- # endif
- # endif
- #endif
- ], [char *p = (char *) alloca(1);],
- ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)])
- if test "$ac_cv_func_alloca_works" = "yes"; then
- AC_DEFINE([HAVE_ALLOCA], [1], [If we have a working alloca() implementation])
- fi
-
- if test "$ac_cv_func_alloca_works" = "no"; then
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.o
- AC_DEFINE(C_ALLOCA, 1)
-
- AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
- [AC_EGREP_CPP(webecray,
- [#if defined(CRAY) && ! defined(CRAY2)
- webecray
- #else
- wenotbecray
- #endif
- ], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
- if test "$ac_cv_os_cray" = "yes"; then
- for ac_func in _getb67 GETB67 getb67; do
- AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
- break])
- done
- fi
- fi
- AC_SUBST(ALLOCA)dnl
-else
- AC_MSG_RESULT("Skipped alloca tests")
-fi
-])
diff --git a/config/ac-macros/character_sets.m4 b/config/ac-macros/character_sets.m4
deleted file mode 100644
index c49e4f89316..00000000000
--- a/config/ac-macros/character_sets.m4
+++ /dev/null
@@ -1,501 +0,0 @@
-dnl In order to add new charset, you must add charset name to
-dnl this CHARSETS_AVAILABLE list and sql/share/charsets/Index.xml.
-dnl If the character set uses strcoll or other special handling,
-dnl you must also create strings/ctype-$charset_name.c
-
-AC_DIVERT_PUSH(0)
-
-define(CHARSETS_AVAILABLE0,binary)
-define(CHARSETS_AVAILABLE1,armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257)
-define(CHARSETS_AVAILABLE2,cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8)
-define(CHARSETS_AVAILABLE3,greek hebrew hp8 keybcs2 koi8r koi8u)
-define(CHARSETS_AVAILABLE4,latin1 latin2 latin5 latin7 macce macroman)
-define(CHARSETS_AVAILABLE5,sjis swe7 tis620 ucs2 ujis utf8mb4 utf8 utf16 utf32)
-
-DEFAULT_CHARSET=latin1
-CHARSETS_AVAILABLE="CHARSETS_AVAILABLE0 CHARSETS_AVAILABLE1 CHARSETS_AVAILABLE2 CHARSETS_AVAILABLE3 CHARSETS_AVAILABLE4 CHARSETS_AVAILABLE5"
-CHARSETS_COMPLEX="big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8mb4 utf8 utf16 utf32"
-
-AC_DIVERT_POP
-
-AC_ARG_WITH(charset,
- [ --with-charset=CHARSET
- Default character set, use one of:
- CHARSETS_AVAILABLE0
- CHARSETS_AVAILABLE1
- CHARSETS_AVAILABLE2
- CHARSETS_AVAILABLE3
- CHARSETS_AVAILABLE4
- CHARSETS_AVAILABLE5],
- [default_charset="$withval"],
- [default_charset="$DEFAULT_CHARSET"])
-
-AC_ARG_WITH(collation,
- [ --with-collation=COLLATION
- Default collation],
- [default_collation="$withval"],
- [default_collation="default"])
-
-
-AC_ARG_WITH(extra-charsets,
- [ --with-extra-charsets=CHARSET[,CHARSET,...]
- Use charsets in addition to default (none, complex,
- all, or a list selected from the above sets)],
- [extra_charsets="$withval"],
- [extra_charsets="none"])
-
-
-AC_MSG_CHECKING("character sets")
-
-CHARSETS="$default_charset latin1 utf8mb4 utf8"
-
-if test "$extra_charsets" = no; then
- CHARSETS="$CHARSETS"
-elif test "$extra_charsets" = none; then
- CHARSETS="$CHARSETS"
-elif test "$extra_charsets" = complex; then
- CHARSETS="$CHARSETS $CHARSETS_COMPLEX"
- AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
-elif test "$extra_charsets" = all; then
- CHARSETS="$CHARSETS $CHARSETS_AVAILABLE"
- AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
-else
- EXTRA_CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
- CHARSETS="$CHARSETS $EXTRA_CHARSETS"
-fi
-
-for cs in $CHARSETS
-do
- case $cs in
- armscii8)
- AC_DEFINE(HAVE_CHARSET_armscii8, 1,
- [Define to enable charset armscii8])
- ;;
- ascii)
- AC_DEFINE(HAVE_CHARSET_ascii, 1,
- [Define to enable ascii character set])
- ;;
- big5)
- AC_DEFINE(HAVE_CHARSET_big5, 1, [Define to enable charset big5])
- AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, [1], [ ])
- ;;
- binary)
- ;;
- cp1250)
- AC_DEFINE(HAVE_CHARSET_cp1250, 1, [Define to enable cp1250])
- ;;
- cp1251)
- AC_DEFINE(HAVE_CHARSET_cp1251, 1, [Define to enable charset cp1251])
- ;;
- cp1256)
- AC_DEFINE(HAVE_CHARSET_cp1256, 1, [Define to enable charset cp1256])
- ;;
- cp1257)
- AC_DEFINE(HAVE_CHARSET_cp1257, 1, [Define to enable charset cp1257])
- ;;
- cp850)
- AC_DEFINE(HAVE_CHARSET_cp850, 1, [Define to enable charset cp850])
- ;;
- cp852)
- AC_DEFINE(HAVE_CHARSET_cp852, 1, [Define to enable charset cp852])
- ;;
- cp866)
- AC_DEFINE(HAVE_CHARSET_cp866, 1, [Define to enable charset cp866])
- ;;
- cp932)
- AC_DEFINE(HAVE_CHARSET_cp932, 1, [Define to enable charset cp932])
- AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- dec8)
- AC_DEFINE(HAVE_CHARSET_dec8, 1, [Define to enable charset dec8])
- ;;
- eucjpms)
- AC_DEFINE(HAVE_CHARSET_eucjpms, 1, [Define to enable charset eucjpms])
- AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- euckr)
- AC_DEFINE(HAVE_CHARSET_euckr, 1, [Define to enable charset euckr])
- AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- gb2312)
- AC_DEFINE(HAVE_CHARSET_gb2312, 1, [Define to enable charset gb2312])
- AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- gbk)
- AC_DEFINE(HAVE_CHARSET_gbk, 1, [Define to enable charset gbk])
- AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- geostd8)
- AC_DEFINE(HAVE_CHARSET_geostd8, 1, [Define to enable charset geostd8])
- ;;
- greek)
- AC_DEFINE(HAVE_CHARSET_greek, 1, [Define to enable charset greek])
- ;;
- hebrew)
- AC_DEFINE(HAVE_CHARSET_hebrew, 1, [Define to enable charset hebrew])
- ;;
- hp8)
- AC_DEFINE(HAVE_CHARSET_hp8, 1, [Define to enable charset hp8])
- ;;
- keybcs2)
- AC_DEFINE(HAVE_CHARSET_keybcs2, 1, [Define to enable charset keybcs2])
- ;;
- koi8r)
- AC_DEFINE(HAVE_CHARSET_koi8r, 1, [Define to enable charset koi8r])
- ;;
- koi8u)
- AC_DEFINE(HAVE_CHARSET_koi8u, 1, [Define to enable charset koi8u])
- ;;
- latin1)
- AC_DEFINE(HAVE_CHARSET_latin1, 1, [Define to enable charset latin1])
- ;;
- latin2)
- AC_DEFINE(HAVE_CHARSET_latin2, 1, [Define to enable charset latin2])
- ;;
- latin5)
- AC_DEFINE(HAVE_CHARSET_latin5, 1, [Define to enable charset latin5])
- ;;
- latin7)
- AC_DEFINE(HAVE_CHARSET_latin7, 1, [Define to enable charset latin7])
- ;;
- macce)
- AC_DEFINE(HAVE_CHARSET_macce, 1, [Define to enable charset macce])
- ;;
- macroman)
- AC_DEFINE(HAVE_CHARSET_macroman, 1,
- [Define to enable charset macroman])
- ;;
- sjis)
- AC_DEFINE(HAVE_CHARSET_sjis, 1, [Define to enable charset sjis])
- AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- swe7)
- AC_DEFINE(HAVE_CHARSET_swe7, 1, [Define to enable charset swe7])
- ;;
- tis620)
- AC_DEFINE(HAVE_CHARSET_tis620, 1, [Define to enable charset tis620])
- ;;
- ucs2)
- AC_DEFINE(HAVE_CHARSET_ucs2, 1, [Define to enable charset ucs2])
- AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- ujis)
- AC_DEFINE(HAVE_CHARSET_ujis, 1, [Define to enable charset ujis])
- AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- utf8mb4)
- AC_DEFINE(HAVE_CHARSET_utf8mb4, 1, [Define to enable utf8mb4])
- AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- utf8)
- AC_DEFINE(HAVE_CHARSET_utf8, 1, [Define to enable utf8])
- AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- utf16)
- AC_DEFINE(HAVE_CHARSET_utf16, 1, [Define to enable utf16])
- AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- utf32)
- AC_DEFINE(HAVE_CHARSET_utf32, 1, [Define to enable utf32])
- AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
- AC_DEFINE(USE_MB_IDENT, 1)
- ;;
- *)
- AC_MSG_ERROR([Charset '$cs' not available. (Available are: $CHARSETS_AVAILABLE).
- See the Installation chapter in the Reference Manual.])
- esac
-done
-
-
- default_charset_collations=""
-
-case $default_charset in
- armscii8)
- default_charset_default_collation="armscii8_general_ci"
- default_charset_collations="armscii8_general_ci armscii8_bin"
- ;;
- ascii)
- default_charset_default_collation="ascii_general_ci"
- default_charset_collations="ascii_general_ci ascii_bin"
- ;;
- big5)
- default_charset_default_collation="big5_chinese_ci"
- default_charset_collations="big5_chinese_ci big5_bin"
- ;;
- binary)
- default_charset_default_collation="binary"
- default_charset_collations="binary"
- ;;
- cp1250)
- default_charset_default_collation="cp1250_general_ci"
- default_charset_collations="cp1250_general_ci cp1250_czech_cs cp1250_bin"
- ;;
- cp1251)
- default_charset_default_collation="cp1251_general_ci"
- default_charset_collations="cp1251_general_ci cp1251_general_cs cp1251_bin cp1251_bulgarian_ci cp1251_ukrainian_ci"
- ;;
- cp1256)
- default_charset_default_collation="cp1256_general_ci"
- default_charset_collations="cp1256_general_ci cp1256_bin"
- ;;
- cp1257)
- default_charset_default_collation="cp1257_general_ci"
- default_charset_collations="cp1257_general_ci cp1257_lithuanian_ci cp1257_bin"
- ;;
- cp850)
- default_charset_default_collation="cp850_general_ci"
- default_charset_collations="cp850_general_ci cp850_bin"
- ;;
- cp852)
- default_charset_default_collation="cp852_general_ci"
- default_charset_collations="cp852_general_ci cp852_bin"
- ;;
- cp866)
- default_charset_default_collation="cp866_general_ci"
- default_charset_collations="cp866_general_ci cp866_bin"
- ;;
- cp932)
- default_charset_default_collation="cp932_japanese_ci"
- default_charset_collations="cp932_japanese_ci cp932_bin"
- ;;
- dec8)
- default_charset_default_collation="dec8_swedish_ci"
- default_charset_collations="dec8_swedish_ci dec8_bin"
- ;;
- eucjpms)
- default_charset_default_collation="eucjpms_japanese_ci"
- default_charset_collations="eucjpms_japanese_ci ujis_bin"
- ;;
- euckr)
- default_charset_default_collation="euckr_korean_ci"
- default_charset_collations="euckr_korean_ci euckr_bin"
- ;;
- gb2312)
- default_charset_default_collation="gb2312_chinese_ci"
- default_charset_collations="gb2312_chinese_ci gb2312_bin"
- ;;
- gbk)
- default_charset_default_collation="gbk_chinese_ci"
- default_charset_collations="gbk_chinese_ci gbk_bin"
- ;;
- geostd8)
- default_charset_default_collation="geostd8_general_ci"
- default_charset_collations="geostd8_general_ci geostd8_bin"
- ;;
- greek)
- default_charset_default_collation="greek_general_ci"
- default_charset_collations="greek_general_ci greek_bin"
- ;;
- hebrew)
- default_charset_default_collation="hebrew_general_ci"
- default_charset_collations="hebrew_general_ci hebrew_bin"
- ;;
- hp8)
- default_charset_default_collation="hp8_english_ci"
- default_charset_collations="hp8_english_ci hp8_bin"
- ;;
- keybcs2)
- default_charset_default_collation="keybcs2_general_ci"
- default_charset_collations="keybcs2_general_ci keybcs2_bin"
- ;;
- koi8r)
- default_charset_default_collation="koi8r_general_ci"
- default_charset_collations="koi8r_general_ci koi8r_bin"
- ;;
- koi8u)
- default_charset_default_collation="koi8u_general_ci"
- default_charset_collations="koi8u_general_ci koi8u_bin"
- ;;
- latin1)
- default_charset_default_collation="latin1_swedish_ci"
- default_charset_collations="latin1_general_ci latin1_general_cs latin1_bin latin1_german1_ci latin1_german2_ci latin1_danish_ci latin1_spanish_ci latin1_swedish_ci"
- ;;
- latin2)
- default_charset_default_collation="latin2_general_ci"
- default_charset_collations="latin2_general_ci latin2_bin latin2_czech_cs latin2_hungarian_ci latin2_croatian_ci"
- ;;
- latin5)
- default_charset_default_collation="latin5_turkish_ci"
- default_charset_collations="latin5_turkish_ci latin5_bin"
- ;;
- latin7)
- default_charset_default_collation="latin7_general_ci"
- default_charset_collations="latin7_general_ci latin7_general_cs latin7_bin latin7_estonian_cs"
- ;;
- macce)
- default_charset_default_collation="macce_general_ci"
- default_charset_collations="macce_general_ci macce_bin"
- ;;
- macroman)
- default_charset_default_collation="macroman_general_ci"
- default_charset_collations="macroman_general_ci macroman_bin"
- ;;
- sjis)
- default_charset_default_collation="sjis_japanese_ci"
- default_charset_collations="sjis_japanese_ci sjis_bin"
- ;;
- swe7)
- default_charset_default_collation="swe7_swedish_ci"
- default_charset_collations="swe7_swedish_ci swe7_bin"
- ;;
- tis620)
- default_charset_default_collation="tis620_thai_ci"
- default_charset_collations="tis620_thai_ci tis620_bin"
- ;;
- ucs2)
- default_charset_default_collation="ucs2_general_ci"
- define(UCSC1, ucs2_general_ci ucs2_bin)
- define(UCSC2, ucs2_czech_ci ucs2_danish_ci)
- define(UCSC3, ucs2_esperanto_ci ucs2_estonian_ci ucs2_hungarian_ci)
- define(UCSC4, ucs2_icelandic_ci ucs2_latvian_ci ucs2_lithuanian_ci)
- define(UCSC5, ucs2_persian_ci ucs2_polish_ci ucs2_romanian_ci)
- define(UCSC6, ucs2_slovak_ci ucs2_slovenian_ci)
- define(UCSC7, ucs2_spanish2_ci ucs2_spanish_ci)
- define(UCSC8, ucs2_swedish_ci ucs2_turkish_ci)
- define(UCSC9, ucs2_unicode_ci)
- UCSC="UCSC1 UCSC2 UCSC3 UCSC4 UCSC5 UCSC6 UCSC7 UCSC8 UCSC9"
- default_charset_collations="$UCSC"
- ;;
- ujis)
- default_charset_default_collation="ujis_japanese_ci"
- default_charset_collations="ujis_japanese_ci ujis_bin"
- ;;
- utf8)
- default_charset_default_collation="utf8_general_ci"
- if test "$default_collation" = "utf8_general_cs"; then
- # For those who explicitly desire "utf8_general_cs", support it,
- # and then also set the CPP switch enabling that code.
- UTFC="utf8_general_cs"
- AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
- else
- define(UTFC1, utf8_general_ci utf8_bin)
- define(UTFC2, utf8_czech_ci utf8_danish_ci)
- define(UTFC3, utf8_esperanto_ci utf8_estonian_ci utf8_hungarian_ci)
- define(UTFC4, utf8_icelandic_ci utf8_latvian_ci utf8_lithuanian_ci)
- define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
- define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
- define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
- define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
- define(UTFC9, utf8_unicode_ci)
- UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
- fi
- default_charset_collations="$UTFC"
- ;;
- utf8mb4)
- default_charset_default_collation="utf8mb4_general_ci"
- define(UTFC1, utf8mb4_general_ci utf8mb4_bin)
- define(UTFC2, utf8mb4_czech_ci utf8mb4_danish_ci)
- define(UTFC3, utf8mb4_esperanto_ci utf8mb4_estonian_ci utf8mb4_hungarian_ci)
- define(UTFC4, utf8mb4_icelandic_ci utf8mb4_latvian_ci utf8mb4_lithuanian_ci)
- define(UTFC5, utf8mb4_persian_ci utf8mb4_polish_ci utf8mb4_romanian_ci)
- define(UTFC6, utf8mb4_sinhala_ci utf8mb4_slovak_ci utf8mb4_slovenian_ci)
- define(UTFC7, utf8mb4_spanish2_ci utf8mb4_spanish_ci)
- define(UTFC8, utf8mb4_swedish_ci utf8mb4_turkish_ci)
- define(UTFC9, utf8mb4_unicode_ci)
- UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
- default_charset_collations="$UTFC"
- ;;
- utf16)
- default_charset_default_collation="utf16_general_ci"
- define(UTFC1, utf16_general_ci utf16_bin)
- define(UTFC2, utf16_czech_ci utf16_danish_ci)
- define(UTFC3, utf16_esperanto_ci utf16_estonian_ci utf16_hungarian_ci)
- define(UTFC4, utf16_icelandic_ci utf16_latvian_ci utf16_lithuanian_ci)
- define(UTFC5, utf16_persian_ci utf16_polish_ci utf16_romanian_ci)
- define(UTFC6, utf16_sinhala_ci utf16_slovak_ci utf16_slovenian_ci)
- define(UTFC7, utf16_spanish2_ci utf16_spanish_ci)
- define(UTFC8, utf16_swedish_ci utf16_turkish_ci)
- define(UTFC9, utf16_unicode_ci)
- UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
- default_charset_collations="$UTFC"
- ;;
- utf32)
- default_charset_default_collation="utf32_general_ci"
- define(UTFC1, utf32_general_ci utf32_bin)
- define(UTFC2, utf32_czech_ci utf32_danish_ci)
- define(UTFC3, utf32_esperanto_ci utf32_estonian_ci utf32_hungarian_ci)
- define(UTFC4, utf32_icelandic_ci utf32_latvian_ci utf32_lithuanian_ci)
- define(UTFC5, utf32_persian_ci utf32_polish_ci utf32_romanian_ci)
- define(UTFC6, utf32_sinhala_ci utf32_slovak_ci utf32_slovenian_ci)
- define(UTFC7, utf32_spanish2_ci utf32_spanish_ci)
- define(UTFC8, utf32_swedish_ci utf32_turkish_ci)
- define(UTFC9, utf32_unicode_ci)
- UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
- default_charset_collations="$UTFC"
- ;;
- *)
- AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE).
- See the Installation chapter in the Reference Manual.])
-esac
-
-if test "$default_collation" = default; then
- default_collation=$default_charset_default_collation
-fi
-
-valid_default_collation=no
-for cl in $default_charset_collations
-do
- if test x"$cl" = x"$default_collation"
- then
- valid_default_collation=yes
- break
- fi
-done
-
-if test x$valid_default_collation = xyes
-then
- AC_MSG_RESULT([default: $default_charset, collation: $default_collation; compiled in: $CHARSETS])
-else
- AC_MSG_ERROR([
- Collation $default_collation is not valid for character set $default_charset.
- Valid collations are: $default_charset_collations.
- See the Installation chapter in the Reference Manual.
- ])
-fi
-
-AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],
- [Define the default charset name])
-AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
- [Define the default charset name])
-
-# Shall we build the UCA-based Unicode collations
-AC_ARG_WITH(uca,
- [ --without-uca Skip building of the national Unicode collations.],
- [with_uca=$withval],
- [with_uca=yes]
-)
-
-AC_MSG_CHECKING([whether to compile national Unicode collations])
-
-if test "$with_uca" = "yes"
-then
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_UCA_COLLATIONS], [1], [national Unicode collations])
-else
- AC_MSG_RESULT(no)
-fi
-
-
-# Shall we build experimental collations
-AC_ARG_WITH(experimental-collations,
- [],
- [with_exp_coll=$withval],
- [with_exp_coll=no]
-)
-
-if test "$with_exp_coll" = "yes"
-then
- AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
-fi
diff --git a/config/ac-macros/check_cpu.m4 b/config/ac-macros/check_cpu.m4
deleted file mode 100644
index d551f47769e..00000000000
--- a/config/ac-macros/check_cpu.m4
+++ /dev/null
@@ -1,47 +0,0 @@
-AC_DEFUN([MYSQL_CHECK_CPU],
-[AC_CACHE_CHECK([if compiler supports optimizations for current cpu],
-mysql_cv_cpu,[
-
-ac_save_CFLAGS="$CFLAGS"
-if test -r /proc/cpuinfo ; then
- cpuinfo="cat /proc/cpuinfo"
- cpu_family=`$cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
- cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
-fi
-if test "$cpu_vendor" = "AuthenticAMD"; then
- if test $cpu_family -ge 6; then
- cpu_set="athlon pentiumpro k5 pentium i486 i386";
- elif test $cpu_family -eq 5; then
- cpu_set="k5 pentium i486 i386";
- elif test $cpu_family -eq 4; then
- cpu_set="i486 i386"
- else
- cpu_set="i386"
- fi
-elif test "$cpu_vendor" = "GenuineIntel"; then
- if test $cpu_family -ge 6; then
- cpu_set="pentiumpro pentium i486 i386";
- elif test $cpu_family -eq 5; then
- cpu_set="pentium i486 i386";
- elif test $cpu_family -eq 4; then
- cpu_set="i486 i386"
- else
- cpu_set="i386"
- fi
-fi
-
-for ac_arg in $cpu_set;
-do
- CFLAGS="$ac_save_CFLAGS -mcpu=$ac_arg -march=$ac_arg -DCPU=$ac_arg"
- AC_TRY_COMPILE([],[int i],mysql_cv_cpu=$ac_arg; break;, mysql_cv_cpu="unknown")
-done
-
-if test "$mysql_cv_cpu" = "unknown"
-then
- CFLAGS="$ac_save_CFLAGS"
- AC_MSG_RESULT(none)
-else
- AC_MSG_RESULT($mysql_cv_cpu)
-fi
-])])
-
diff --git a/config/ac-macros/compiler_flag.m4 b/config/ac-macros/compiler_flag.m4
deleted file mode 100644
index ce2ce6cbdfa..00000000000
--- a/config/ac-macros/compiler_flag.m4
+++ /dev/null
@@ -1,62 +0,0 @@
-# option, cache_name, variable,
-# code to execute if yes, code to exectute if fail
-AC_DEFUN([AC_SYS_COMPILER_FLAG],
-[
- AC_MSG_CHECKING($1)
- OLD_CFLAGS="[$]CFLAGS"
- AC_CACHE_VAL(mysql_cv_option_$2,
- [
- CFLAGS="[$]OLD_CFLAGS $1"
- AC_TRY_LINK([int main(){exit(0);}],mysql_cv_option_$2=yes,mysql_cv_option_$2=no,mysql_cv_option_$2=no)
- ])
-
- CFLAGS="[$]OLD_CFLAGS"
-
- if test x"[$]mysql_cv_option_$2" = "xyes" ; then
- $3="[$]$3 $1"
- AC_MSG_RESULT(yes)
- $5
- else
- AC_MSG_RESULT(no)
- $4
- fi
-])
-
-# arch, option, cache_name, variable
-AC_DEFUN([AC_SYS_CPU_COMPILER_FLAG],
-[
- if test "`uname -m 2>/dev/null`" = "$1" ; then
- AC_SYS_COMPILER_FLAG($2,$3,$4)
- fi
-])
-
-# os, option, cache_name, variable
-AC_DEFUN([AC_SYS_OS_COMPILER_FLAG],
-[
- if test "x$mysql_cv_sys_os" = "x$1" ; then
- AC_SYS_COMPILER_FLAG($2,$3,$4)
- fi
-])
-
-AC_DEFUN([AC_CHECK_NOEXECSTACK],
-[
- AC_CACHE_CHECK(whether --noexecstack is desirable for .S files,
- mysql_cv_as_noexecstack, [dnl
- cat > conftest.c <<EOF
-void foo (void) { }
-EOF
- if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS
- -S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD]) \
- && grep .note.GNU-stack conftest.s >/dev/null \
- && AC_TRY_COMMAND([${CC-cc} $CCASFLAGS $CPPFLAGS -Wa,--noexecstack
- -c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD])
- then
- mysql_cv_as_noexecstack=yes
- else
- mysql_cv_as_noexecstack=no
- fi
- rm -f conftest*])
- if test $mysql_cv_as_noexecstack = yes; then
- CCASFLAGS="$CCASFLAGS -Wa,--noexecstack"
- fi
-])
diff --git a/config/ac-macros/dtrace.m4 b/config/ac-macros/dtrace.m4
deleted file mode 100644
index a42d78d97fe..00000000000
--- a/config/ac-macros/dtrace.m4
+++ /dev/null
@@ -1,38 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: DTRACE_TEST
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(dtrace,
- AC_HELP_STRING([--enable-dtrace],[Build with support for the DTRACE.]),
- [
- ENABLE_DTRACE="$enable_dtrace"
- ],
- [
- ENABLE_DTRACE="yes"
- ]
-)
-DTRACEFLAGS=""
-HAVE_DTRACE=""
-HAVE_DTRACE_DASH_G=""
-if test "$ENABLE_DTRACE" = "yes"; then
- AC_PATH_PROGS(DTRACE, dtrace, [not found], [$PATH:/usr/sbin])
- if test "$DTRACE" = "not found"; then
- ENABLE_DTRACE="no"
- else
- AC_DEFINE([HAVE_DTRACE], [1], [Defined to 1 if DTrace support is enabled])
- case "$target_os" in
- *solaris*)
- HAVE_DTRACE_DASH_G="yes"
- ;;
- *)
- HAVE_DTRACE_DASH_G="no"
- ;;
- esac
- fi
-fi
-AC_SUBST(DTRACEFLAGS)
-AC_SUBST(HAVE_DTRACE)
-AM_CONDITIONAL([HAVE_DTRACE], [ test "$ENABLE_DTRACE" = "yes" ])
-AM_CONDITIONAL([HAVE_DTRACE_DASH_G], [ test "$HAVE_DTRACE_DASH_G" = "yes" ])
-dnl ---------------------------------------------------------------------------
-dnl End Macro: DTRACE_TEST
-dnl ---------------------------------------------------------------------------
diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4
deleted file mode 100644
index 533dba09feb..00000000000
--- a/config/ac-macros/ha_ndbcluster.m4
+++ /dev/null
@@ -1,343 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_NDBCLUSTER
-dnl ---------------------------------------------------------------------------
-
-NDB_VERSION_MAJOR=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f1`
-NDB_VERSION_MINOR=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f2`
-NDB_VERSION_BUILD=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f3`
-NDB_VERSION_STATUS=`echo $VERSION | sed 's/^[[-.0-9]]*//'`
-TEST_NDBCLUSTER=""
-
-dnl for build ndb docs
-
-AC_PATH_PROG(DOXYGEN, doxygen, no)
-AC_PATH_PROG(PDFLATEX, pdflatex, no)
-AC_PATH_PROG(MAKEINDEX, makeindex, no)
-
-AC_SUBST(DOXYGEN)
-AC_SUBST(PDFLATEX)
-AC_SUBST(MAKEINDEX)
-
-
-AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
- AC_ARG_WITH([ndb-sci],
- AC_HELP_STRING([--with-ndb-sci=DIR],
- [Provide MySQL with a custom location of
- sci library. Given DIR, sci library is
- assumed to be in $DIR/lib and header files
- in $DIR/include.]),
- [mysql_sci_dir=${withval}],
- [mysql_sci_dir=""])
-
- case "$mysql_sci_dir" in
- "no" )
- have_ndb_sci=no
- AC_MSG_RESULT([-- not including sci transporter])
- ;;
- * )
- if test -f "$mysql_sci_dir/lib/libsisci.a" -a \
- -f "$mysql_sci_dir/include/sisci_api.h"; then
- NDB_SCI_INCLUDES="-I$mysql_sci_dir/include"
- NDB_SCI_LIBS="$mysql_sci_dir/lib/libsisci.a"
- AC_MSG_RESULT([-- including sci transporter])
- AC_DEFINE([NDB_SCI_TRANSPORTER], [1],
- [Including Ndb Cluster DB sci transporter])
- AC_SUBST(NDB_SCI_INCLUDES)
- AC_SUBST(NDB_SCI_LIBS)
- have_ndb_sci="yes"
- AC_MSG_RESULT([found sci transporter in $mysql_sci_dir/{include, lib}])
- else
- AC_MSG_RESULT([could not find sci transporter in $mysql_sci_dir/{include, lib}])
- fi
- ;;
- esac
-
- AC_ARG_WITH([ndb-test],
- [
- --with-ndb-test Include the NDB Cluster ndbapi test programs],
- [ndb_test="$withval"],
- [ndb_test=no])
- AC_ARG_WITH([ndb-docs],
- [
- --with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation],
- [ndb_docs="$withval"],
- [ndb_docs=no])
- AC_ARG_WITH([ndb-port],
- [
- --with-ndb-port Port for NDB Cluster management server],
- [ndb_port="$withval"],
- [ndb_port="default"])
- AC_ARG_WITH([ndb-port-base],
- [
- --with-ndb-port-base Base port for NDB Cluster transporters],
- [ndb_port_base="$withval"],
- [ndb_port_base="default"])
- AC_ARG_WITH([ndb-debug],
- [
- --without-ndb-debug Disable special ndb debug features],
- [ndb_debug="$withval"],
- [ndb_debug="default"])
- AC_ARG_WITH([ndb-ccflags],
- AC_HELP_STRING([--with-ndb-ccflags=CFLAGS],
- [Extra CFLAGS for ndb compile]),
- [ndb_ccflags=${withval}],
- [ndb_ccflags=""])
- AC_ARG_WITH([ndb-binlog],
- [
- --without-ndb-binlog Disable ndb binlog],
- [ndb_binlog="$withval"],
- [ndb_binlog="default"])
-
- case "$ndb_ccflags" in
- "yes")
- AC_MSG_RESULT([The --ndb-ccflags option requires a parameter (passed to CC for ndb compilation)])
- ;;
- *)
- ndb_cxxflags_fix="$ndb_cxxflags_fix $ndb_ccflags"
- ;;
- esac
-
- AC_MSG_CHECKING([for NDB Cluster options])
- AC_MSG_RESULT([])
-
- have_ndb_test=no
- case "$ndb_test" in
- yes )
- AC_MSG_RESULT([-- including ndbapi test programs])
- have_ndb_test="yes"
- ;;
- * )
- AC_MSG_RESULT([-- not including ndbapi test programs])
- ;;
- esac
-
- have_ndb_docs=no
- case "$ndb_docs" in
- yes )
- AC_MSG_RESULT([-- including ndbapi and mgmapi documentation])
- have_ndb_docs="yes"
- ;;
- * )
- AC_MSG_RESULT([-- not including ndbapi and mgmapi documentation])
- ;;
- esac
-
- case "$ndb_debug" in
- yes )
- AC_MSG_RESULT([-- including ndb extra debug options])
- have_ndb_debug="yes"
- ;;
- full )
- AC_MSG_RESULT([-- including ndb extra extra debug options])
- have_ndb_debug="full"
- ;;
- no )
- AC_MSG_RESULT([-- not including ndb extra debug options])
- have_ndb_debug="no"
- ;;
- * )
- have_ndb_debug="default"
- ;;
- esac
-
- AC_MSG_RESULT([done.])
-])
-
-AC_DEFUN([NDBCLUSTER_WORKAROUNDS], [
-
- #workaround for Sun Forte/x86 see BUG#4681
- case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc in
- *solaris*-i?86-no)
- CFLAGS="$CFLAGS -DBIG_TABLES"
- CXXFLAGS="$CXXFLAGS -DBIG_TABLES"
- ;;
- *)
- ;;
- esac
-
- # workaround for Sun Forte compile problem for ndb
- case $SYSTEM_TYPE-$ac_cv_prog_gcc in
- *solaris*-no)
- ndb_cxxflags_fix="$ndb_cxxflags_fix -instances=static"
- ;;
- *)
- ;;
- esac
-
- # ndb fail for whatever strange reason to link Sun Forte/x86
- # unless using incremental linker
- case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc-$have_ndbcluster in
- *solaris*-i?86-no-yes)
- CXXFLAGS="$CXXFLAGS -xildon"
- ;;
- *)
- ;;
- esac
-])
-
-AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
-
- AC_MSG_RESULT([Using NDB Cluster])
- with_partition="yes"
- ndb_cxxflags_fix=""
- TEST_NDBCLUSTER="--ndbcluster"
-
- ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_srcdir)/storage/ndb/include -I\$(top_srcdir)/storage/ndb/include/ndbapi -I\$(top_srcdir)/storage/ndb/include/mgmapi"
- ndbcluster_libs="\$(top_builddir)/storage/ndb/src/.libs/libndbclient.a"
- ndbcluster_system_libs=""
- ndb_mgmclient_libs="\$(top_builddir)/storage/ndb/src/mgmclient/libndbmgmclient.la"
-
- MYSQL_CHECK_NDB_OPTIONS
- NDBCLUSTER_WORKAROUNDS
-
- MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster"
-
- if test "$have_ndb_debug" = "default"
- then
- have_ndb_debug=$with_debug
- fi
-
- if test "$have_ndb_debug" = "yes"
- then
- # Medium debug.
- NDB_DEFS="-DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
- elif test "$have_ndb_debug" = "full"
- then
- NDB_DEFS="-DNDB_DEBUG_FULL -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
- else
- # no extra ndb debug but still do asserts if debug version
- if test "$with_debug" = "yes"
- then
- NDB_DEFS=""
- else
- NDB_DEFS="-DNDEBUG"
- fi
- fi
-
- if test X"$ndb_port" = Xdefault
- then
- ndb_port="1186"
- fi
-
- have_ndb_binlog="no"
- if test X"$ndb_binlog" = Xdefault ||
- test X"$ndb_binlog" = Xyes
- then
- have_ndb_binlog="yes"
- fi
-
- if test X"$have_ndb_binlog" = Xyes
- then
- AC_DEFINE([WITH_NDB_BINLOG], [1],
- [Including Ndb Cluster Binlog])
- AC_MSG_RESULT([Including Ndb Cluster Binlog])
- else
- AC_MSG_RESULT([Not including Ndb Cluster Binlog])
- fi
-
- ndb_transporter_opt_objs=""
- if test "$ac_cv_func_shmget" = "yes" &&
- test "$ac_cv_func_shmat" = "yes" &&
- test "$ac_cv_func_shmdt" = "yes" &&
- test "$ac_cv_func_shmctl" = "yes" &&
- test "$ac_cv_func_sigaction" = "yes" &&
- test "$ac_cv_func_sigemptyset" = "yes" &&
- test "$ac_cv_func_sigaddset" = "yes" &&
- test "$ac_cv_func_pthread_sigmask" = "yes"
- then
- AC_DEFINE([NDB_SHM_TRANSPORTER], [1],
- [Including Ndb Cluster DB shared memory transporter])
- AC_MSG_RESULT([Including ndb shared memory transporter])
- ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo"
- else
- AC_MSG_RESULT([Not including ndb shared memory transporter])
- fi
-
- if test X"$have_ndb_sci" = Xyes
- then
- ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo"
- fi
-
- ndb_opt_subdirs=
- ndb_bin_am_ldflags="-static"
- if test X"$have_ndb_test" = Xyes
- then
- ndb_opt_subdirs="test"
- ndb_bin_am_ldflags=""
- fi
-
- if test X"$have_ndb_docs" = Xyes
- then
- ndb_opt_subdirs="$ndb_opt_subdirs docs"
- ndb_bin_am_ldflags=""
- fi
-
- # building dynamic breaks on AIX. (If you want to try it and get unresolved
- # __vec__delete2 and some such, try linking against libhC.)
- case "$host_os" in
- aix3.* | aix4.0.* | aix4.1.*) ;;
- *) ndb_bin_am_ldflags="-static";;
- esac
-
- # libndbclient versioning when linked with GNU ld.
- if $LD --version 2>/dev/null|grep GNU >/dev/null 2>&1 ; then
- NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/storage/ndb/src/libndb.ver"
- AC_CONFIG_FILES(storage/ndb/src/libndb.ver)
- fi
- AC_SUBST(NDB_LD_VERSION_SCRIPT)
-
- AC_SUBST(NDB_SHARED_LIB_MAJOR_VERSION)
- AC_SUBST(NDB_SHARED_LIB_VERSION)
-
-
- AC_SUBST(NDB_VERSION_MAJOR)
- AC_SUBST(NDB_VERSION_MINOR)
- AC_SUBST(NDB_VERSION_BUILD)
- AC_SUBST(NDB_VERSION_STATUS)
- AC_DEFINE_UNQUOTED([NDB_VERSION_MAJOR], [$NDB_VERSION_MAJOR],
- [NDB major version])
- AC_DEFINE_UNQUOTED([NDB_VERSION_MINOR], [$NDB_VERSION_MINOR],
- [NDB minor version])
- AC_DEFINE_UNQUOTED([NDB_VERSION_BUILD], [$NDB_VERSION_BUILD],
- [NDB build version])
- AC_DEFINE_UNQUOTED([NDB_VERSION_STATUS], ["$NDB_VERSION_STATUS"],
- [NDB status version])
-
- AC_SUBST(ndbcluster_includes)
- AC_SUBST(ndbcluster_libs)
- AC_SUBST(ndbcluster_system_libs)
- AC_SUBST(ndb_mgmclient_libs)
- AC_SUBST(NDB_SCI_LIBS)
-
- AC_SUBST(ndb_transporter_opt_objs)
- AC_SUBST(ndb_port)
- AC_SUBST(ndb_bin_am_ldflags)
- AC_SUBST(ndb_opt_subdirs)
-
- AC_SUBST(NDB_DEFS)
- AC_SUBST(ndb_cxxflags_fix)
-
- NDB_SIZEOF_CHARP="$ac_cv_sizeof_charp"
- NDB_SIZEOF_CHAR="$ac_cv_sizeof_char"
- NDB_SIZEOF_SHORT="$ac_cv_sizeof_short"
- NDB_SIZEOF_INT="$ac_cv_sizeof_int"
- NDB_SIZEOF_LONG="$ac_cv_sizeof_long"
- NDB_SIZEOF_LONG_LONG="$ac_cv_sizeof_long_long"
- AC_SUBST([NDB_SIZEOF_CHARP])
- AC_SUBST([NDB_SIZEOF_CHAR])
- AC_SUBST([NDB_SIZEOF_SHORT])
- AC_SUBST([NDB_SIZEOF_INT])
- AC_SUBST([NDB_SIZEOF_LONG])
- AC_SUBST([NDB_SIZEOF_LONG_LONG])
-
- AC_CONFIG_FILES([
- storage/ndb/include/ndb_version.h
- storage/ndb/include/ndb_global.h
- storage/ndb/include/ndb_types.h
- ])
-])
-
-AC_SUBST(TEST_NDBCLUSTER)
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_NDBCLUSTER SECTION
-dnl ---------------------------------------------------------------------------
diff --git a/config/ac-macros/large_file.m4 b/config/ac-macros/large_file.m4
deleted file mode 100644
index 279ce6d60f1..00000000000
--- a/config/ac-macros/large_file.m4
+++ /dev/null
@@ -1,142 +0,0 @@
-
-dnl By default, many hosts won't let programs access large files;
-dnl one must use special compiler options to get large-file access to work.
-dnl For more details about this brain damage please see:
-dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
-
-dnl Written by Paul Eggert <eggert@twinsun.com>.
-
-dnl Internal subroutine of AC_SYS_LARGEFILE.
-dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
-AC_DEFUN([AC_SYS_LARGEFILE_FLAGS],
- [AC_CACHE_CHECK([for $1 value to request large file support],
- ac_cv_sys_largefile_$1,
- [if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
- then
- ac_cv_sys_largefile_$1=`cat conftest.1`
- else
- ac_cv_sys_largefile_$1=no
- ifelse($1, CFLAGS,
- [case "$host_os" in
- # HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
-changequote(, )dnl
- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
-changequote([, ])dnl
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- 2.95.*) ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__ ;;
- esac
- fi
- ;;
- # IRIX 6.2 and later require cc -n32.
-changequote(, )dnl
- irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
-changequote([, ])dnl
- if test "$GCC" != yes; then
- ac_cv_sys_largefile_CFLAGS=-n32
- fi
- esac
- if test "$ac_cv_sys_largefile_CFLAGS" != no; then
- ac_save_CC="$CC"
- CC="$CC $ac_cv_sys_largefile_CFLAGS"
- AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
- CC="$ac_save_CC"
- fi])
- fi
- rm -f conftest*])])
-
-dnl Internal subroutine of AC_SYS_LARGEFILE.
-dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
-AC_DEFUN([AC_SYS_LARGEFILE_SPACE_APPEND],
- [case $2 in
- no) ;;
- ?*)
- case "[$]$1" in
- '') $1=$2 ;;
- *) $1=[$]$1' '$2 ;;
- esac ;;
- esac])
-
-dnl Internal subroutine of AC_SYS_LARGEFILE.
-dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
-AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
- [AC_CACHE_CHECK([for $1], $2,
- [$2=no
-changequote(, )dnl
- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
- case "$ac_flag" in
- -D$1)
- $2=1 ;;
- -D$1=*)
- $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
- esac
- done
- $4
-changequote([, ])dnl
- ])
- if test "[$]$2" != no; then
- AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
- fi])
-
-AC_DEFUN([MYSQL_SYS_LARGEFILE],
- [AC_REQUIRE([AC_CANONICAL_HOST])
- AC_ARG_ENABLE(largefile,
- [ --disable-largefile Omit support for large files])
- if test "$enable_largefile" != no; then
- AC_CHECK_TOOL(GETCONF, getconf)
- AC_SYS_LARGEFILE_FLAGS(CFLAGS)
- AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
- AC_SYS_LARGEFILE_FLAGS(LIBS)
-
- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
- case "$ac_flag" in
- no) ;;
- -D_FILE_OFFSET_BITS=*) ;;
- -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
- -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
- -D?* | -I?*)
- AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
- *)
- AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
- esac
- done
- AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
- AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
-
- AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
- ac_cv_sys_file_offset_bits,
- [Number of bits in a file offset, on hosts where this is settable.],
- [case "$host_os" in
- # HP-UX 10.20 and later
- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
- ac_cv_sys_file_offset_bits=64 ;;
- # We can't declare _FILE_OFFSET_BITS here as this will cause
- # compile errors as AC_PROG_CC adds include files in confdefs.h
- # We solve this (until autoconf is fixed) by instead declaring it
- # as define instead
- solaris2.[8,9])
- CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
- CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64"
- ac_cv_sys_file_offset_bits=no ;;
- esac])
- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
- ac_cv_sys_largefile_source,
- [makes fseeko etc. visible, on some hosts.],
- [case "$host_os" in
- # HP-UX 10.20 and later
- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
- ac_cv_sys_largefile_source=1 ;;
- esac])
-
- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
- ac_cv_sys_large_files,
- [Large files support on AIX-style hosts.],
- [case "$host_os" in
- # Large file support on AIX is available starting from version 4.2
- # Tested only on 5.2 and up
- aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
- ac_cv_sys_large_files=1 ;;
- esac])
- fi
- ])
-
diff --git a/config/ac-macros/libevent.m4 b/config/ac-macros/libevent.m4
deleted file mode 100644
index 90ac89cc74c..00000000000
--- a/config/ac-macros/libevent.m4
+++ /dev/null
@@ -1,95 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_USE_BUNDLED_LIBEVENT
-dnl
-dnl SYNOPSIS
-dnl MYSQL_USE_BUNDLED_LIBEVENT()
-dnl
-dnl DESCRIPTION
-dnl Add defines so libevent is built and linked with
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_USE_BUNDLED_LIBEVENT], [
-
- libevent_dir="libevent"
- AC_SUBST([libevent_dir])
-
- libevent_libs="\$(top_builddir)/extra/libevent/libevent.a"
- libevent_includes="-I\$(top_srcdir)/extra/libevent"
-
- dnl Get the upstream file with the original libevent configure macros.
- dnl Use builtin include for this, to work around path problems in old versions of aclocal.
- builtin([include],[config/ac-macros/libevent_configure.m4])
-])
-
-
-dnl ------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_LIBEVENT
-dnl
-dnl SYNOPSIS
-dnl MYSQL_CHECK_LIBEVENT
-dnl
-dnl ------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_LIBEVENT], [
-
- AC_CONFIG_FILES(extra/libevent/Makefile)
-
- AC_MSG_NOTICE([checking what libevent library to use])
-
- AC_ARG_WITH([libevent],
- AC_HELP_STRING([--with-libevent=yes|no|bundled|DIR],
- [Use libevent and have connection pooling.
- A location of libevent library can be specified.
- Given DIR, libevent library is
- assumed to be in $DIR/lib and header files
- in $DIR/include.]),
- [with_libevent=${withval}],
- [with_libevent=no])
-
- case "$with_libevent" in
- "no")
- with_libevent=disabled
- ;;
- "bundled")
- MYSQL_USE_BUNDLED_LIBEVENT
- ;;
- "" | "yes")
- libevent_includes=""
- libevent_libs="-levent"
- AC_CHECK_LIB(event, evutil_socketpair,[with_libevent=system],
- [with_libevent=bundled])
- AC_CHECK_HEADER(evutil.h,,[with_libevent=bundled])
- if test "$with_libevent" = "bundled"; then
- MYSQL_USE_BUNDLED_LIBEVENT
- fi
- ;;
- *)
- # Test for libevent using all known library file endings
- if test \( -f "$with_libevent/lib/libevent.a" -o \
- -f "$with_libevent/lib/libevent.so" -o \
- -f "$with_libevent/lib/libevent.sl" -o \
- -f "$with_libevent/lib/libevent.dylib" \) \
- -a -f "$with_libevent/include/evutil.h"; then
- libevent_includes="-I$with_libevent/include"
- libevent_libs="-L$with_libevent/lib -levent"
- AC_CHECK_LIB(event, evutil_socketpair,[with_libevent=$with_libevent],
- [with_libevent=no], [$libevent_libs])
- else
- with_libevent=no
- fi
- if test "$with_libevent" = "no"; then
- AC_MSG_ERROR([libevent headers or binaries were not found])
- fi
- ;;
- esac
- AC_MSG_CHECKING(for libevent)
- AC_MSG_RESULT([$with_libevent])
-
- if test "$with_libevent" != "disabled"; then
- libevent_test_option="--mysqld=--thread-handling=pool-of-threads"
- AC_SUBST(libevent_libs)
- AC_SUBST(libevent_includes)
- AC_SUBST(libevent_test_option)
- dnl AC_DEFINE([HAVE_LIBEVENT], [1], [If we want to use libevent and have connection pooling])
- fi
- AM_CONDITIONAL([HAVE_LIBEVENT], [ test "$with_libevent" != "disabled" ])
-])
-
diff --git a/config/ac-macros/libevent_configure.m4 b/config/ac-macros/libevent_configure.m4
deleted file mode 100644
index ed6de3dcf95..00000000000
--- a/config/ac-macros/libevent_configure.m4
+++ /dev/null
@@ -1,324 +0,0 @@
-dnl Checks for libraries.
-AC_CHECK_LIB(socket, socket)
-AC_CHECK_LIB(resolv, inet_aton)
-AC_CHECK_LIB(rt, clock_gettime)
-AC_CHECK_LIB(nsl, inet_ntoa)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h stdarg.h inttypes.h stdint.h poll.h signal.h unistd.h sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/param.h sys/ioctl.h sys/select.h sys/devpoll.h port.h netinet/in6.h sys/socket.h)
-if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
- AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h)
- AC_EGREP_CPP(yes,
-[
-#include <sys/queue.h>
-#ifdef TAILQ_FOREACH
- yes
-#endif
-], [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_TAILQFOREACH, 1,
- [Define if TAILQ_FOREACH is defined in <sys/queue.h>])],
- [AC_MSG_RESULT(no)]
- )
-fi
-
-if test "x$ac_cv_header_sys_time_h" = "xyes"; then
- AC_MSG_CHECKING(for timeradd in sys/time.h)
- AC_EGREP_CPP(yes,
-[
-#include <sys/time.h>
-#ifdef timeradd
- yes
-#endif
-], [ AC_DEFINE(HAVE_TIMERADD, 1,
- [Define if timeradd is defined in <sys/time.h>])
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)]
-)
-fi
-
-if test "x$ac_cv_header_sys_time_h" = "xyes"; then
- AC_MSG_CHECKING(for timercmp in sys/time.h)
- AC_EGREP_CPP(yes,
-[
-#include <sys/time.h>
-#ifdef timercmp
- yes
-#endif
-], [ AC_DEFINE(HAVE_TIMERCMP, 1,
- [Define if timercmp is defined in <sys/time.h>])
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)]
-)
-fi
-
-if test "x$ac_cv_header_sys_time_h" = "xyes"; then
- AC_MSG_CHECKING(for timerclear in sys/time.h)
- AC_EGREP_CPP(yes,
-[
-#include <sys/time.h>
-#ifdef timerclear
- yes
-#endif
-], [ AC_DEFINE(HAVE_TIMERCLEAR, 1,
- [Define if timerclear is defined in <sys/time.h>])
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)]
-)
-fi
-
-if test "x$ac_cv_header_sys_time_h" = "xyes"; then
- AC_MSG_CHECKING(for timerisset in sys/time.h)
- AC_EGREP_CPP(yes,
-[
-#include <sys/time.h>
-#ifdef timerisset
- yes
-#endif
-], [ AC_DEFINE(HAVE_TIMERISSET, 1,
- [Define if timerisset is defined in <sys/time.h>])
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)]
-)
-fi
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_HEADER_TIME
-
-dnl Checks for library functions.
-AC_CHECK_FUNCS(gettimeofday vasprintf fcntl clock_gettime strtok_r strsep getaddrinfo getnameinfo strlcpy inet_ntop signal sigaction strtoll)
-
-AC_CHECK_SIZEOF(long)
-
-if test "x$ac_cv_func_clock_gettime" = "xyes"; then
- AC_DEFINE(DNS_USE_CPU_CLOCK_FOR_ID, 1, [Define if clock_gettime is available in libc])
-else
- AC_DEFINE(DNS_USE_GETTIMEOFDAY_FOR_ID, 1, [Define is no secure id variant is available])
-fi
-
-AC_MSG_CHECKING(for F_SETFD in fcntl.h)
-AC_EGREP_CPP(yes,
-[
-#define _GNU_SOURCE
-#include <fcntl.h>
-#ifdef F_SETFD
-yes
-#endif
-], [ AC_DEFINE(HAVE_SETFD, 1,
- [Define if F_SETFD is defined in <fcntl.h>])
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)]
- )
-
-needsignal=no
-haveselect=no
-AC_CHECK_FUNCS(select, [haveselect=yes])
-if test "x$haveselect" = "xyes" ; then
- AC_LIBOBJ(select)
- needsignal=yes
-fi
-
-havepoll=no
-AC_CHECK_FUNCS(poll, [havepoll=yes])
-if test "x$havepoll" = "xyes" ; then
- AC_LIBOBJ(poll)
- needsignal=yes
-fi
-
-haveepoll=no
-AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes])
-if test "x$haveepoll" = "xyes" ; then
- AC_DEFINE(HAVE_EPOLL, 1,
- [Define if your system supports the epoll system calls])
- AC_LIBOBJ(epoll)
- needsignal=yes
-fi
-
-havedevpoll=no
-if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
- AC_DEFINE(HAVE_DEVPOLL, 1,
- [Define if /dev/poll is available])
- AC_LIBOBJ(devpoll)
-fi
-
-havekqueue=no
-if test "x$ac_cv_header_sys_event_h" = "xyes"; then
- AC_CHECK_FUNCS(kqueue, [havekqueue=yes])
- if test "x$havekqueue" = "xyes" ; then
- AC_MSG_CHECKING(for working kqueue)
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/event.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
- ]],
- [[
- int kq;
- int n;
- int fd[2];
- struct kevent ev;
- struct timespec ts;
- char buf[8000];
-
- if (pipe(fd) == -1)
- exit(1);
- if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1)
- exit(1);
-
- while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf))
- ;
-
- if ((kq = kqueue()) == -1)
- exit(1);
-
- ev.ident = fd[1];
- ev.filter = EVFILT_WRITE;
- ev.flags = EV_ADD | EV_ENABLE;
- n = kevent(kq, &ev, 1, NULL, 0, NULL);
- if (n == -1)
- exit(1);
-
- read(fd[0], buf, sizeof(buf));
-
- ts.tv_sec = 0;
- ts.tv_nsec = 0;
- n = kevent(kq, NULL, 0, &ev, 1, &ts);
- if (n == -1 || n == 0)
- exit(1);
-
- exit(0);
- ]]
- )],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
- [Define if kqueue works correctly with pipes])
- AC_LIBOBJ(kqueue)],
- [AC_MSG_RESULT(no)],
- [AC_MSG_RESULT(no)]
- )
- fi
-fi
-
-haveepollsyscall=no
-if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
- if test "x$haveepoll" = "xno" ; then
- AC_MSG_CHECKING(for epoll system call)
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[
-#include <stdint.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <sys/epoll.h>
-#include <unistd.h>
-
-int
-epoll_create(int size)
-{
- return (syscall(__NR_epoll_create, size));
-}
- ]],
- [[
- int epfd;
-
- epfd = epoll_create(256);
- exit (epfd == -1 ? 1 : 0);
- ]]
- )],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_EPOLL, 1,
- [Define if your system supports the epoll system calls])
- needsignal=yes
- AC_LIBOBJ(epoll_sub)
- AC_LIBOBJ(epoll)],
- [AC_MSG_RESULT(no)],
- [AC_MSG_RESULT(no)]
- )
- fi
-fi
-
-haveeventports=no
-AC_CHECK_FUNCS(port_create, [haveeventports=yes])
-if test "x$haveeventports" = "xyes" ; then
- AC_DEFINE(HAVE_EVENT_PORTS, 1,
- [Define if your system supports event ports])
- AC_LIBOBJ(evport)
- needsignal=yes
-fi
-if test "x$bwin32" = "xtrue"; then
- needsignal=yes
-fi
-if test "x$bwin32" = "xtrue"; then
- needsignal=yes
-fi
-if test "x$needsignal" = "xyes" ; then
- AC_LIBOBJ(signal)
-fi
-
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t],[],[],
-[[#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#elif defined(HAVE_INTTYPES_H)
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif]])
-AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_TYPES([struct in6_addr],[],[],
-[[#ifdef WIN32
-#include <winsock2.h>
-#else
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN6_H
-#include <netinet/in6.h>
-#endif]])
-
-AC_MSG_CHECKING([for socklen_t])
-AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- ]],
- [[
- socklen_t x;
- ]]
- )],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_DEFINE(socklen_t, unsigned int,
- [Define to unsigned int if you dont have it])]
-)
-
-AC_MSG_CHECKING([whether our compiler supports __func__])
-AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([],[[const char *cp = __func__;]])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([],[[const char *cp = __FUNCTION__;]])],
- [AC_MSG_RESULT([yes])
- AC_DEFINE(__func__, __FUNCTION__,
- [Define to appropriate substitue if compiler doesnt have __func__])],
- [AC_MSG_RESULT([no])
- AC_DEFINE(__func__, __FILE__,
- [Define to appropriate substitue if compiler doesnt have __func__])]
- )]
-)
diff --git a/config/ac-macros/maintainer.m4 b/config/ac-macros/maintainer.m4
deleted file mode 100644
index 24be31395f2..00000000000
--- a/config/ac-macros/maintainer.m4
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Control aspects of the development environment which are
-# specific to MySQL maintainers and developers.
-#
-AC_DEFUN([MY_MAINTAINER_MODE], [
- AC_MSG_CHECKING([whether to enable the maintainer-specific development environment])
- AC_ARG_ENABLE([mysql-maintainer-mode],
- [AS_HELP_STRING([--enable-mysql-maintainer-mode],
- [Enable a MySQL maintainer-specific development environment])],
- [USE_MYSQL_MAINTAINER_MODE=$enableval],
- [USE_MYSQL_MAINTAINER_MODE=no])
- AC_MSG_RESULT([$USE_MYSQL_MAINTAINER_MODE])
-])
-
-# Set warning options required under maintainer mode.
-AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
- # Setup GCC warning options.
- AS_IF([test "$GCC" = "yes"], [
- C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
- CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
- ])
-
- # Test whether the warning options work.
- # Test C options
- AS_IF([test -n "$C_WARNINGS"], [
- save_CFLAGS="$CFLAGS"
- AC_MSG_CHECKING([whether to use C warning options ${C_WARNINGS}])
- AC_LANG_PUSH(C)
- CFLAGS="$CFLAGS ${C_WARNINGS}"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_c_warning_flags=yes],
- [myac_c_warning_flags=no])
- AC_LANG_POP()
- AC_MSG_RESULT([$myac_c_warning_flags])
- CFLAGS="$save_CFLAGS"
- ])
-
- # Test C++ options
- AS_IF([test -n "$CXX_WARNINGS"], [
- save_CXXFLAGS="$CXXFLAGS"
- AC_MSG_CHECKING([whether to use C++ warning options ${CXX_WARNINGS}])
- AC_LANG_PUSH(C++)
- CXXFLAGS="$CXXFLAGS ${CXX_WARNINGS}"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_cxx_warning_flags=yes],
- [myac_cxx_warning_flags=no])
- AC_LANG_POP()
- AC_MSG_RESULT([$myac_cxx_warning_flags])
- CXXFLAGS="$save_CXXFLAGS"
- ])
-
- # Set compile flag variables.
- AS_IF([test "$myac_c_warning_flags" = "yes"], [
- AM_CFLAGS="${AM_CFLAGS} ${C_WARNINGS}"
- AC_SUBST([AM_CFLAGS])])
- AS_IF([test "$myac_cxx_warning_flags" = "yes"], [
- AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS}"
- AC_SUBST([AM_CXXFLAGS])])
-])
-
-
-# Set compiler flags required under maintainer mode.
-AC_DEFUN([MY_MAINTAINER_MODE_SETUP], [
- AS_IF([test "$USE_MYSQL_MAINTAINER_MODE" = "yes"],
- [MY_MAINTAINER_MODE_WARNINGS])
-])
diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4
deleted file mode 100644
index 89de1e5f8fa..00000000000
--- a/config/ac-macros/misc.m4
+++ /dev/null
@@ -1,688 +0,0 @@
-# Local macros for automake & autoconf
-
-#---START: Used in for client configure
-AC_DEFUN([MYSQL_TYPE_ACCEPT],
-[ac_save_CXXFLAGS="$CXXFLAGS"
-AC_CACHE_CHECK([base type of last arg to accept], mysql_cv_btype_last_arg_accept,
-AC_LANG_PUSH(C++)
-if test "$ac_cv_prog_gxx" = "yes"
-then
- # Add -Werror, remove -fbranch-probabilities (Bug #268)
- CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
-fi
-mysql_cv_btype_last_arg_accept=none
-[AC_TRY_COMPILE([#if defined(inline)
-#undef inline
-#endif
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-],
-[int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0); return (a != 0);],
-mysql_cv_btype_last_arg_accept=socklen_t)]
-if test "$mysql_cv_btype_last_arg_accept" = "none"; then
-[AC_TRY_COMPILE([#if defined(inline)
-#undef inline
-#endif
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-],
-[int a = accept(1, (struct sockaddr *) 0, (size_t *) 0); return (a != 0);],
-mysql_cv_btype_last_arg_accept=size_t)]
-fi
-if test "$mysql_cv_btype_last_arg_accept" = "none"; then
-mysql_cv_btype_last_arg_accept=int
-fi)
-AC_LANG_POP(C++)
-AC_DEFINE_UNQUOTED([SOCKET_SIZE_TYPE], [$mysql_cv_btype_last_arg_accept],
- [The base type of the last arg to accept])
-CXXFLAGS="$ac_save_CXXFLAGS"
-])
-#---END:
-
-dnl Find type of qsort
-AC_DEFUN([MYSQL_TYPE_QSORT],
-[AC_CACHE_CHECK([return type of qsort], mysql_cv_type_qsort,
-[AC_TRY_COMPILE([#include <stdlib.h>
-#ifdef __cplusplus
-extern "C"
-#endif
-void qsort(void *base, size_t nel, size_t width,
- int (*compar) (const void *, const void *));
-],
-[int i;], mysql_cv_type_qsort=void, mysql_cv_type_qsort=int)])
-AC_DEFINE_UNQUOTED([RETQSORTTYPE], [$mysql_cv_type_qsort],
- [The return type of qsort (int or void).])
-if test "$mysql_cv_type_qsort" = "void"
-then
- AC_DEFINE_UNQUOTED([QSORT_TYPE_IS_VOID], [1], [qsort returns void])
-fi
-])
-
-#---START: Figure out whether to use 'struct rlimit' or 'struct rlimit64'
-AC_DEFUN([MYSQL_TYPE_STRUCT_RLIMIT],
-[ac_save_CXXFLAGS="$CXXFLAGS"
-AC_CACHE_CHECK([struct type to use with setrlimit], mysql_cv_btype_struct_rlimit,
-AC_LANG_PUSH(C++)
-if test "$ac_cv_prog_gxx" = "yes"
-then
- # Add -Werror, remove -fbranch-probabilities (Bug #268)
- CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
-fi
-mysql_cv_btype_struct_rlimit=none
-[AC_TRY_COMPILE([#if defined(inline)
-#undef inline
-#endif
-#include <stdlib.h>
-#include <sys/resource.h>
-],
-[struct rlimit64 rl; setrlimit(RLIMIT_CORE, &rl);],
-mysql_cv_btype_struct_rlimit="struct rlimit64")]
-if test "$mysql_cv_btype_struct_rlimit" = "none"; then
-mysql_cv_btype_struct_rlimit="struct rlimit"
-fi)
-AC_LANG_POP(C++)
-AC_DEFINE_UNQUOTED([STRUCT_RLIMIT], [$mysql_cv_btype_struct_rlimit],
- [The struct rlimit type to use with setrlimit])
-CXXFLAGS="$ac_save_CXXFLAGS"
-])
-#---END:
-
-AC_DEFUN([MYSQL_TIMESPEC_TS],
-[AC_CACHE_CHECK([if struct timespec has a ts_sec member], mysql_cv_timespec_ts,
-[AC_TRY_COMPILE([#include <pthread.h>
-#ifdef __cplusplus
-extern "C"
-#endif
-],
-[struct timespec abstime;
-
-abstime.ts_sec = time(NULL)+1;
-abstime.ts_nsec = 0;
-], mysql_cv_timespec_ts=yes, mysql_cv_timespec_ts=no)])
-if test "$mysql_cv_timespec_ts" = "yes"
-then
- AC_DEFINE([HAVE_TIMESPEC_TS_SEC], [1],
- [Timespec has a ts_sec instead of tv_sev])
-fi
-])
-
-AC_DEFUN([MYSQL_TZNAME],
-[AC_CACHE_CHECK([if we have tzname variable], mysql_cv_tzname,
-[AC_TRY_COMPILE([#include <time.h>
-#ifdef __cplusplus
-extern "C"
-#endif
-],
-[ tzset();
- return tzname[0] != 0;
-], mysql_cv_tzname=yes, mysql_cv_tzname=no)])
-if test "$mysql_cv_tzname" = "yes"
-then
- AC_DEFINE([HAVE_TZNAME], [1], [Have the tzname variable])
-fi
-])
-
-
-AC_DEFUN([MYSQL_PTHREAD_YIELD],
-[AC_CACHE_CHECK([if pthread_yield takes zero arguments], ac_cv_pthread_yield_zero_arg,
-[AC_TRY_LINK([#define _GNU_SOURCE
-#include <pthread.h>
-#ifdef __cplusplus
-extern "C"
-#endif
-],
-[
- pthread_yield();
-], ac_cv_pthread_yield_zero_arg=yes, ac_cv_pthread_yield_zero_arg=yeso)])
-if test "$ac_cv_pthread_yield_zero_arg" = "yes"
-then
- AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1],
- [pthread_yield that doesn't take any arguments])
-fi
-]
-[AC_CACHE_CHECK([if pthread_yield takes 1 argument], ac_cv_pthread_yield_one_arg,
-[AC_TRY_LINK([#define _GNU_SOURCE
-#include <pthread.h>
-#ifdef __cplusplus
-extern "C"
-#endif
-],
-[
- pthread_yield(0);
-], ac_cv_pthread_yield_one_arg=yes, ac_cv_pthread_yield_one_arg=no)])
-if test "$ac_cv_pthread_yield_one_arg" = "yes"
-then
- AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1],
- [pthread_yield function with one argument])
-fi
-]
-)
-
-
-
-#---END:
-
-# From fileutils-3.14/aclocal.m4
-
-# @defmac AC_PROG_CC_STDC
-# @maindex PROG_CC_STDC
-# @ovindex CC
-# If the C compiler in not in ANSI C mode by default, try to add an option
-# to output variable @code{CC} to make it so. This macro tries various
-# options that select ANSI C on some system or another. It considers the
-# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
-# handles function prototypes correctly.
-#
-# Patched by monty to only check if __STDC__ is defined. With the original
-# check it's impossible to get things to work with the Sunpro compiler from
-# Workshop 4.2
-#
-# If you use this macro, you should check after calling it whether the C
-# compiler has been set to accept ANSI C; if not, the shell variable
-# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
-# program @code{ansi2knr}, which comes with Ghostscript.
-# @end defmac
-
-AC_DEFUN([AM_PROG_CC_STDC],
-[AC_REQUIRE([AC_PROG_CC])
-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
-AC_CACHE_VAL(am_cv_prog_cc_stdc,
-[am_cv_prog_cc_stdc=no
-ac_save_CC="$CC"
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-# removed "-Xc -D__EXTENSIONS__" beacause sun c++ does not like it.
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
-do
- CC="$ac_save_CC $ac_arg"
- AC_TRY_COMPILE(
-[#if !defined(__STDC__)
-choke me
-#endif
-/* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/stat.h>
-#endif
-], [
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};],
-[am_cv_prog_cc_stdc="$ac_arg"; break])
-done
-CC="$ac_save_CC"
-])
-AC_MSG_RESULT($am_cv_prog_cc_stdc)
-case "x$am_cv_prog_cc_stdc" in
- x|xno) ;;
- *) CC="$CC $am_cv_prog_cc_stdc" ;;
-esac
-])
-
-# Orginal from bash-2.0 aclocal.m4, Changed to use termcap last by monty.
-
-AC_DEFUN([MYSQL_CHECK_LIB_TERMCAP],
-[
-AC_CACHE_VAL(mysql_cv_termcap_lib,
- [AC_CHECK_LIB(ncursesw, tgetent, mysql_cv_termcap_lib=libncursesw,
- [AC_CHECK_LIB(ncurses, tgetent, mysql_cv_termcap_lib=libncurses,
- [AC_CHECK_LIB(curses, tgetent, mysql_cv_termcap_lib=libcurses,
- [AC_CHECK_LIB(termcap, tgetent, mysql_cv_termcap_lib=libtermcap,
- [AC_CHECK_LIB(tinfo, tgetent, mysql_cv_termcap_lib=libtinfo,
- mysql_cv_termcap_lib=NOT_FOUND)])])])])])
-AC_MSG_CHECKING(for termcap functions library)
-if test "$mysql_cv_termcap_lib" = "NOT_FOUND"; then
-AC_MSG_ERROR([No curses/termcap library found])
-elif test "$mysql_cv_termcap_lib" = "libtermcap"; then
-TERMCAP_LIB=-ltermcap
-elif test "$mysql_cv_termcap_lib" = "libncursesw"; then
-TERMCAP_LIB=-lncursesw
-elif test "$mysql_cv_termcap_lib" = "libncurses"; then
-TERMCAP_LIB=-lncurses
-elif test "$mysql_cv_termcap_lib" = "libtinfo"; then
-TERMCAP_LIB=-ltinfo
-else
-TERMCAP_LIB=-lcurses
-fi
-AC_MSG_RESULT($TERMCAP_LIB)
-])
-
-dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
-AC_DEFUN([MYSQL_SIGNAL_CHECK],
-[AC_REQUIRE([AC_TYPE_SIGNAL])
-AC_MSG_CHECKING(for type of signal functions)
-AC_CACHE_VAL(mysql_cv_signal_vintage,
-[
- AC_TRY_LINK([#include <signal.h>],[
- sigset_t ss;
- struct sigaction sa;
- sigemptyset(&ss); sigsuspend(&ss);
- sigaction(SIGINT, &sa, (struct sigaction *) 0);
- sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
- ], mysql_cv_signal_vintage=posix,
- [
- AC_TRY_LINK([#include <signal.h>], [
- int mask = sigmask(SIGINT);
- sigsetmask(mask); sigblock(mask); sigpause(mask);
- ], mysql_cv_signal_vintage=4.2bsd,
- [
- AC_TRY_LINK([
- #include <signal.h>
- RETSIGTYPE foo() { }], [
- int mask = sigmask(SIGINT);
- sigset(SIGINT, foo); sigrelse(SIGINT);
- sighold(SIGINT); sigpause(SIGINT);
- ], mysql_cv_signal_vintage=svr3, mysql_cv_signal_vintage=v7
- )]
- )]
-)
-])
-AC_MSG_RESULT($mysql_cv_signal_vintage)
-if test "$mysql_cv_signal_vintage" = posix; then
-AC_DEFINE(HAVE_POSIX_SIGNALS, [1],
- [Signal handling is POSIX (sigset/sighold, etc)])
-elif test "$mysql_cv_signal_vintage" = "4.2bsd"; then
-AC_DEFINE([HAVE_BSD_SIGNALS], [1], [BSD style signals])
-elif test "$mysql_cv_signal_vintage" = svr3; then
-AC_DEFINE(HAVE_USG_SIGHOLD, [1], [sighold() is present and usable])
-fi
-])
-
-AC_DEFUN([MYSQL_CHECK_GETPW_FUNCS],
-[AC_MSG_CHECKING(whether programs are able to redeclare getpw functions)
-AC_CACHE_VAL(mysql_cv_can_redecl_getpw,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <pwd.h>
-extern struct passwd *getpwent();], [struct passwd *z; z = getpwent();],
- mysql_cv_can_redecl_getpw=yes,mysql_cv_can_redecl_getpw=no)])
-AC_MSG_RESULT($mysql_cv_can_redecl_getpw)
-if test "$mysql_cv_can_redecl_getpw" = "no"; then
-AC_DEFINE(HAVE_GETPW_DECLS, [1], [getpwent() declaration present])
-fi
-])
-
-AC_DEFUN([MYSQL_HAVE_TIOCGWINSZ],
-[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
-AC_CACHE_VAL(mysql_cv_tiocgwinsz_in_ioctl,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
- mysql_cv_tiocgwinsz_in_ioctl=yes,mysql_cv_tiocgwinsz_in_ioctl=no)])
-AC_MSG_RESULT($mysql_cv_tiocgwinsz_in_ioctl)
-if test "$mysql_cv_tiocgwinsz_in_ioctl" = "yes"; then
-AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1],
- [READLINE: your system defines TIOCGWINSZ in sys/ioctl.h.])
-fi
-])
-
-AC_DEFUN([MYSQL_HAVE_FIONREAD],
-[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
-AC_CACHE_VAL(mysql_cv_fionread_in_ioctl,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ioctl.h>], [int x = FIONREAD;],
- mysql_cv_fionread_in_ioctl=yes,mysql_cv_fionread_in_ioctl=no)])
-AC_MSG_RESULT($mysql_cv_fionread_in_ioctl)
-if test "$mysql_cv_fionread_in_ioctl" = "yes"; then
-AC_DEFINE([FIONREAD_IN_SYS_IOCTL], [1], [Do we have FIONREAD])
-fi
-])
-
-AC_DEFUN([MYSQL_HAVE_TIOCSTAT],
-[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
-AC_CACHE_VAL(mysql_cv_tiocstat_in_ioctl,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ioctl.h>], [int x = TIOCSTAT;],
- mysql_cv_tiocstat_in_ioctl=yes,mysql_cv_tiocstat_in_ioctl=no)])
-AC_MSG_RESULT($mysql_cv_tiocstat_in_ioctl)
-if test "$mysql_cv_tiocstat_in_ioctl" = "yes"; then
-AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL, [1],
- [declaration of TIOCSTAT in sys/ioctl.h])
-fi
-])
-
-AC_DEFUN([MYSQL_STRUCT_DIRENT_D_INO],
-[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(if struct dirent has a d_ino member)
-AC_CACHE_VAL(mysql_cv_dirent_has_dino,
-[AC_TRY_COMPILE([
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#if defined(HAVE_DIRENT_H)
-# include <dirent.h>
-#else
-# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* SYSNDIR */
-# ifdef HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* SYSDIR */
-# ifdef HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif /* HAVE_DIRENT_H */
-],[
-struct dirent d; int z; z = d.d_ino;
-], mysql_cv_dirent_has_dino=yes, mysql_cv_dirent_has_dino=no)])
-AC_MSG_RESULT($mysql_cv_dirent_has_dino)
-if test "$mysql_cv_dirent_has_dino" = "yes"; then
-AC_DEFINE(STRUCT_DIRENT_HAS_D_INO, [1],
- [d_ino member present in struct dirent])
-fi
-])
-
-AC_DEFUN([MYSQL_STRUCT_DIRENT_D_NAMLEN],
-[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(if struct dirent has a d_namlen member)
-AC_CACHE_VAL(mysql_cv_dirent_has_dnamlen,
-[AC_TRY_COMPILE([
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#if defined(HAVE_DIRENT_H)
-# include <dirent.h>
-#else
-# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* SYSNDIR */
-# ifdef HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* SYSDIR */
-# ifdef HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif /* HAVE_DIRENT_H */
-],[
-struct dirent d; int z; z = (int)d.d_namlen;
-], mysql_cv_dirent_has_dnamlen=yes, mysql_cv_dirent_has_dnamlen=no)])
-AC_MSG_RESULT($mysql_cv_dirent_has_dnamlen)
-if test "$mysql_cv_dirent_has_dnamlen" = "yes"; then
-AC_DEFINE(STRUCT_DIRENT_HAS_D_NAMLEN, [1],
- [d_namlen member present in struct dirent])
-fi
-])
-
-
-AC_DEFUN([MYSQL_TYPE_SIGHANDLER],
-[AC_MSG_CHECKING([whether signal handlers are of type void])
-AC_CACHE_VAL(mysql_cv_void_sighandler,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C"
-#endif
-void (*signal ()) ();],
-[int i;], mysql_cv_void_sighandler=yes, mysql_cv_void_sighandler=no)])dnl
-AC_MSG_RESULT($mysql_cv_void_sighandler)
-if test "$mysql_cv_void_sighandler" = "yes"; then
-AC_DEFINE(VOID_SIGHANDLER, [1], [sighandler type is void (*signal ()) ();])
-fi
-])
-
-AC_DEFUN([MYSQL_CXX_BOOL],
-[
-AC_REQUIRE([AC_PROG_CXX])
-AC_MSG_CHECKING(if ${CXX} supports bool types)
-AC_CACHE_VAL(mysql_cv_have_bool,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-AC_TRY_COMPILE(,[bool b = true;],
-mysql_cv_have_bool=yes,
-mysql_cv_have_bool=no)
-AC_LANG_RESTORE
-])
-AC_MSG_RESULT($mysql_cv_have_bool)
-if test "$mysql_cv_have_bool" = yes; then
-AC_DEFINE([HAVE_BOOL], [1], [bool is not defined by all C++ compilators])
-fi
-])dnl
-
-AC_DEFUN([MYSQL_STACK_DIRECTION],
- [AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
- [AC_TRY_RUN([#include <stdlib.h>
- /* Prevent compiler optimization by HP's compiler, see bug#42213 */
-#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
-#pragma noinline
-#endif
- int find_stack_direction ()
- {
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
- }
- int main ()
- {
- exit (find_stack_direction() < 0);
- }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
- ac_cv_c_stack_direction=)])
- AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
-])dnl
-
-AC_DEFUN([MYSQL_CHECK_LONGLONG_TO_FLOAT],
-[
-AC_MSG_CHECKING(if conversion of longlong to float works)
-AC_CACHE_VAL(ac_cv_conv_longlong_to_float,
-[AC_TRY_RUN([#include <stdio.h>
-typedef long long longlong;
-int main()
-{
- longlong ll=1;
- float f;
- FILE *file=fopen("conftestval", "w");
- f = (float) ll;
- fprintf(file,"%g\n",f);
- fclose(file);
- return (0);
-}], ac_cv_conv_longlong_to_float=`cat conftestval`,
- ac_cv_conv_longlong_to_float=0,
- ac_cv_conv_longlong_to_float="yes")])dnl # Cross compiling, assume can convert
-if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes"
-then
- ac_cv_conv_longlong_to_float=yes
-else
- ac_cv_conv_longlong_to_float=no
-fi
-AC_MSG_RESULT($ac_cv_conv_longlong_to_float)
-])
-
-AC_DEFUN([MYSQL_CHECK_VIO], [
-dnl
-dnl we always use vio: no need for special defines
-dnl
- AC_DEFINE([HAVE_VIO_READ_BUFF], [1],
- [Define to enable buffered read. This works only if syscalls
- read/recv return as soon as there is some data in the kernel
- buffer, no matter how big the given buffer is.])
-])
-
-# Local version of _AC_PROG_CXX_EXIT_DECLARATION that does not
-# include #stdlib.h as default as this breaks things on Solaris
-# (Conflicts with pthreads and big file handling)
-
-m4_define([_AC_PROG_CXX_EXIT_DECLARATION],
-[for ac_declaration in \
- ''\
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);' \
- '#include <stdlib.h>'
-do
- _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration
-@%:@include <stdlib.h>],
- [exit (42);])],
- [],
- [continue])
- _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration],
- [exit (42);])],
- [break])
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-])# _AC_PROG_CXX_EXIT_DECLARATION
-
-dnl ---------------------------------------------------------------------------
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_BIG_TABLES
-dnl Sets BIG_TABLES if --with-big-tables is used
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_BIG_TABLES], [
- AC_ARG_WITH([big-tables],
- AS_HELP_STRING([--with-big-tables],
- [Support tables with more than 4 G rows even on 32 bit platforms]),
- [bigtables="$withval"],
- [bigtables=no])
- AC_MSG_CHECKING([for big tables support])
-
- case "$bigtables" in
- yes )
- AC_DEFINE([BIG_TABLES], [1], [Support big tables])
- AC_MSG_RESULT([yes])
- ;;
- * )
- AC_MSG_RESULT([no])
- ;;
- esac
-
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_BIG_TABLES SECTION
-dnl ---------------------------------------------------------------------------
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_MAX_INDEXES
-dnl Sets MAX_INDEXES
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_MAX_INDEXES], [
- AC_ARG_WITH([max-indexes],
- AS_HELP_STRING([--with-max-indexes=N],
- [Sets the maximum number of indexes per table, default 64]),
- [max_indexes="$withval"],
- [max_indexes=64])
- AC_MSG_CHECKING([max indexes per table])
- AC_DEFINE_UNQUOTED([MAX_INDEXES], [$max_indexes],
- [Maximum number of indexes per table])
- AC_MSG_RESULT([$max_indexes])
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_MAX_INDEXES SECTION
-dnl ---------------------------------------------------------------------------
-
-
-dnl MYSQL_NEEDS_MYSYS_NEW
-AC_DEFUN([MYSQL_NEEDS_MYSYS_NEW],
-[AC_CACHE_CHECK([needs mysys_new helpers], mysql_cv_use_mysys_new,
-[
-AC_LANG_PUSH(C++)
-AC_TRY_LINK([], [
-class A { public: int b; }; A *a=new A; a->b=10; delete a;
-], mysql_cv_use_mysys_new=no, mysql_cv_use_mysys_new=yes)
-AC_LANG_POP(C++)
-])
-if test "$mysql_cv_use_mysys_new" = "yes"
-then
- AC_DEFINE([USE_MYSYS_NEW], [1], [Needs to use mysys_new helpers])
-fi
-])
-
-
-AC_DEFUN([MYSQL_CHECK_CXX_VERSION], [
-CXX_VERSION=`$CXX --version | sed 1q`
-if test $? -ne "0" -o -z "$CXX_VERSION"
-then
- CXX_VERSION=`$CXX -V 2>&1|sed 1q` # trying harder for Sun and SGI
-fi
-if test $? -ne "0" -o -z "$CXX_VERSION"
-then
- CXX_VERSION=`$CXX -v 2>&1|sed 1q` # even harder for Alpha
-fi
-if test $? -ne "0" -o -z "$CXX_VERSION"
-then
- CXX_VERSION=""
-fi
-if test "$CXX_VERSION"
-then
- AC_MSG_CHECKING("C++ compiler version")
- AC_MSG_RESULT("$CXX $CXX_VERSION")
-fi
-AC_SUBST(CXX_VERSION)
-])
-
-AC_DEFUN([MYSQL_PROG_AR], [
-case $CXX_VERSION in
- MIPSpro*)
- AR=$CXX
- ARFLAGS="-ar -o"
- ;;
- *Forte*)
- AR=$CXX
- ARFLAGS="-xar -o"
- ;;
- *)
- AC_CHECK_PROG([AR], [ar], [ar])
- if test -z "$AR" || test "$AR" = "false"
- then
- AC_MSG_ERROR([You need ar to build the library])
- fi
- if test -z "$ARFLAGS"
- then
- ARFLAGS="cru"
- fi
-esac
-AC_SUBST(AR)
-AC_SUBST(ARFLAGS)
-])
-
-dnl
-dnl Macro to check time_t range: according to C standard
-dnl array index must be greater than 0 => if time_t is signed,
-dnl the code in the macros below won't compile.
-dnl
-
-AC_DEFUN([MYSQL_CHECK_TIME_T],[
- AC_MSG_CHECKING(if time_t is unsigned)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[
-#include <time.h>
- ]],
- [[
- int array[(((time_t)-1) > 0) ? 1 : -1];
- ]] )
- ], [
- AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
- AC_MSG_RESULT(yes)
- ],
- [AC_MSG_RESULT(no)]
- )
-])
-
diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4
deleted file mode 100644
index c191c2e0b15..00000000000
--- a/config/ac-macros/plugins.m4
+++ /dev/null
@@ -1,902 +0,0 @@
-dnl ===========================================================================
-dnl Support for mysql server plugins
-dnl ===========================================================================
-dnl
-dnl WorkLog#3201
-dnl
-dnl Framework for pluggable static and dynamic plugins for mysql
-dnl
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN([name],[Plugin name],
-dnl [Plugin description],
-dnl [group,group...])
-dnl
-dnl DESCRIPTION
-dnl First declaration for a plugin (mandatory).
-dnl Adds plugin as member to configuration groups (if specified)
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN],[
- _MYSQL_PLUGIN(
- [$1],
- [__MYSQL_PLUGIN_]AS_TR_CPP([$1])[__],
- m4_default([$2], [$1 plugin]),
- m4_default([$3], [plugin for $1]),
- m4_default([[$4]], []),
- )
-])
-
-AC_DEFUN([_MYSQL_PLUGIN],[
- m4_ifdef([$2], [
- AC_FATAL([Duplicate MYSQL_PLUGIN declaration for $3])
- ],[
- m4_define([$2], [$1])
- _MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
- m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
- m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
- m4_ifdef([_AC_ENABLE_IF], [_AC_ENABLE_IF([with],[plugin-$1])])
- _MYSQL_PLUGAPPEND_META([$1], $5)
- ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
- MYSQL_PLUGIN_DIRECTORY([$1],
- m4_bregexp(__mysql_include__,[^\(.*\)/plug\.in$],[\1]))
- ])
- ])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_STORAGE_ENGINE
-dnl
-dnl SYNOPSIS
-dnl MYSQL_STORAGE_ENGINE([name],[legacy-option],[Storage engine name],
-dnl [Storage engine description],[group,group...])
-dnl
-dnl DESCRIPTION
-dnl Short cut for storage engine declarations
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_STORAGE_ENGINE],[
- MYSQL_PLUGIN([$1], [$3], [$4], [$5])
- MYSQL_PLUGIN_DEFINE([$1], [WITH_]AS_TR_CPP([$1])[_STORAGE_ENGINE])
- ifelse([$2],[no],[],[
- _MYSQL_LEGACY_STORAGE_ENGINE(
- m4_bpatsubst([$1], -, _),
- m4_bpatsubst(m4_default([$2], [$1-storage-engine]), -, _))
- ])
-])
-
-AC_DEFUN([_MYSQL_LEGACY_STORAGE_ENGINE],[
-if test "[${with_]$2[+set}]" = set; then
- [with_plugin_]$1="[$with_]$2"
-fi
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_DEFINE
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_DEFINE([name],[MYSQL_CPP_DEFINE])
-dnl
-dnl DESCRIPTION
-dnl When a plugin is to be statically linked, define the C macro
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_DEFINE],[
- MYSQL_REQUIRE_PLUGIN([$1])
- m4_define([MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]), [$2])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_DIRECTORY
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_DIRECTORY([name],[plugin/dir])
-dnl
-dnl DESCRIPTION
-dnl Adds a directory to the build process
-dnl if it contains 'configure' it will be picked up automatically
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_DIRECTORY],[
- MYSQL_REQUIRE_PLUGIN([$1])
- m4_define([MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]), [$2])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_STATIC
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_STATIC([name],[libmyplugin.a])
-dnl
-dnl DESCRIPTION
-dnl Declare the name for the static library
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_STATIC],[
- MYSQL_REQUIRE_PLUGIN([$1])
- m4_define([MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]), [$2])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_DYNAMIC
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_DYNAMIC([name],[myplugin.la])
-dnl
-dnl DESCRIPTION
-dnl Declare the name for the shared library
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_DYNAMIC],[
- MYSQL_REQUIRE_PLUGIN([$1])
- m4_define([MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]), [$2])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_MANDATORY
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_MANDATORY([name])
-dnl
-dnl DESCRIPTION
-dnl Marks the specified plugin as a mandatory plugin
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_MANDATORY],[
- MYSQL_REQUIRE_PLUGIN([$1])
- _MYSQL_PLUGIN_MANDATORY([$1],
- [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1])
- )
-])
-
-AC_DEFUN([_MYSQL_PLUGIN_MANDATORY],[
- m4_define([$2], [yes])
- m4_ifdef([$3], [
- AC_FATAL([mandatory plugin $1 has been disabled])
- m4_undefine([$2])
- ])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_DISABLED
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_DISABLED([name])
-dnl
-dnl DESCRIPTION
-dnl Marks the specified plugin as a disabled plugin
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_DISABLED],[
- MYSQL_REQUIRE_PLUGIN([$1])
- _MYSQL_PLUGIN_DISABLED([$1],
- [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1])
- )
-])
-
-AC_DEFUN([_MYSQL_PLUGIN_DISABLED],[
- m4_define([$2], [yes])
- m4_ifdef([$3], [
- AC_FATAL([attempt to disable mandatory plugin $1])
- m4_undefine([$2])
- ])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_WITHOUT
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_WITHOUT([name])
-dnl
-dnl DESCRIPTION
-dnl Exclude the plugin from being built, as if --without-plugin-name
-dnl was specified.
-dnl If the plugin was selected manually by --with-plugin-name,
-dnl excluding it here will abort the configure script with an error,
-dnl otherwise plugin will be silently disabled.
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_WITHOUT],[
- MYSQL_REQUIRE_PLUGIN([$1])
- if test "X[$with_plugin_]$1" = Xyes; then
- AC_MSG_ERROR([Plugin $1 cannot be built])
- else
- [with_plugin_]$1=no
- fi
-])
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_DEPENDS
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_DEPENDS([name],[prereq,prereq...])
-dnl
-dnl DESCRIPTION
-dnl Enables other plugins neccessary for the named plugin
-dnl Dependency checking is not recursive so if any
-dnl required plugin requires further plugins, list them
-dnl here too!
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_DEPENDS],[
- MYSQL_REQUIRE_PLUGIN([$1])
- ifelse($#, 2, [
- _MYSQL_PLUGIN_DEPEND([$1], $2)
- ], [
- AC_FATAL([bad number of arguments])
- ])
-])
-
-AC_DEFUN([_MYSQL_PLUGIN_DEPEND],[
- ifelse($#, 1, [], [$#:$2], [2:], [], [
- MYSQL_REQUIRE_PLUGIN([$2])
- _MYSQL_PLUGAPPEND([__mysql_plugdepends_$1__],[$2])
- _MYSQL_PLUGIN_DEPEND([$1], m4_shift(m4_shift($@)))
- ])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_ACTIONS
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_ACTIONS([name],[PLUGIN_CONFIGURE_STUFF])
-dnl
-dnl DESCRIPTION
-dnl Declares additional autoconf actions required to configure the plugin
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_ACTIONS],[
- MYSQL_REQUIRE_PLUGIN([$1])
- m4_ifdef([$2],[
- m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),m4_defn([$2]))
- ],[
- m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [$2])
- ])
-])
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS
-dnl
-dnl SYNOPSIS
-dnl MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS([name],[file name])
-dnl
-dnl DESCRIPTION
-dnl Some modules in plugins keep dependance on structures
-dnl declared in sql/ (THD class usually)
-dnl That has to be fixed in the future, but until then
-dnl we have to recompile these modules when we want to
-dnl to compile server parts with the different #defines
-dnl Normally it happens when we compile the embedded server
-dnl Thus one should mark such files in his handler using this macro
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS],[
- MYSQL_REQUIRE_PLUGIN([$1])
- m4_define([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]), [$2])
-])
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CONFIGURE_PLUGINS
-dnl
-dnl SYNOPSIS
-dnl MYSQL_CONFIGURE_PLUGINS([name,name...])
-dnl
-dnl DESCRIPTION
-dnl Used last, emits all required shell code to configure the plugins
-dnl Argument is a list of default plugins or meta-plugin
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_CONFIGURE_PLUGINS],[
- m4_ifdef([__mysql_plugin_configured__],[
- AC_FATAL([cannot use [MYSQL_CONFIGURE_PLUGINS] multiple times])
- ],[
- m4_define([__mysql_plugin_configured__],[done])
- _MYSQL_INCLUDE_LIST(
- m4_bpatsubst(m4_esyscmd([ls plugin/*/plug.in storage/*/plug.in 2>/dev/null]),
-[[
-]],[,]))
- m4_ifdef([__mysql_plugin_list__],[
- _MYSQL_CHECK_PLUGIN_ARGS([$1])
- _MYSQL_CONFIGURE_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
- _MYSQL_EMIT_PLUGIN_ACTIONS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
- AC_SUBST([mysql_se_dirs])
- AC_SUBST([mysql_se_distdirs])
- AC_SUBST([mysql_pg_dirs])
- AC_SUBST([mysql_pg_distdirs])
- AC_SUBST([mysql_se_unittest_dirs])
- AC_SUBST([mysql_pg_unittest_dirs])
- AC_SUBST([condition_dependent_plugin_modules])
- AC_SUBST([condition_dependent_plugin_objects])
- AC_SUBST([condition_dependent_plugin_links])
- AC_SUBST([condition_dependent_plugin_includes])
- ])
- ])
-])
-
-AC_DEFUN([_MYSQL_CONFIGURE_PLUGINS],[
- ifelse($#, 0, [], $#, 1, [
- _MYSQL_EMIT_CHECK_PLUGIN([$1])
- ],[
- _MYSQL_EMIT_CHECK_PLUGIN([$1])
- _MYSQL_CONFIGURE_PLUGINS(m4_shift($@))
- ])
-])
-
-AC_DEFUN([_MYSQL_EMIT_CHECK_PLUGIN],[
- __MYSQL_EMIT_CHECK_PLUGIN(
- [$1],
- m4_bpatsubst([$1], -, _),
- [MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
- )
-])
-
-AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
- m4_ifdef([$5],[
- AH_TEMPLATE($5, [Include ]$3[ into mysqld])
- ])
- AC_MSG_CHECKING([whether to use ]$3)
- mysql_use_plugin_dir=""
- m4_ifdef([$10],[
- if test "X[$mysql_plugin_]$2" = Xyes -a \
- "X[$with_plugin_]$2" != Xno -o \
- "X[$with_plugin_]$2" = Xyes; then
- __MYSQL_EMIT_CHECK_RESULT($3,[error])
- AC_MSG_ERROR([disabled])
- fi
- __MYSQL_EMIT_CHECK_RESULT($3,[no])
- ],[
-
- # Plugin is not disabled, determine if it should be built,
- # or only distributed
-
- m4_ifdef([$6], [
- if test ! -d "$srcdir/$6"; then
- # Plugin directory was removed after autoconf was run; treat
- # this as a disabled plugin
- if test "X[$with_plugin_]$2" = Xyes; then
- __MYSQL_EMIT_CHECK_RESULT($3,[error])
- AC_MSG_ERROR([disabled])
- fi
-
- # The result message will be printed below
- [with_plugin_]$2=no
- fi
- ])
-
- m4_ifdef([$9],[
- if test "X[$with_plugin_]$2" = Xno; then
- __MYSQL_EMIT_CHECK_RESULT($3,[error])
- AC_MSG_ERROR([cannot disable mandatory plugin])
- fi
- [mysql_plugin_]$2=yes
- ],[
- case "$with_mysqld_ldflags " in
- *"-all-static "*)
- # No need to build shared plugins when mysqld is linked with
- # -all-static as it won't be able to load them.
- if test "X[$mysql_plugin_]$2" != Xyes -a \
- "X[$with_plugin_]$2" != Xyes; then
- [with_plugin_]$2=no
- fi
- ;;
- esac
- # Similarly, disable shared plugins when configured with --disable-shared
- # as libtool will not be able to produce them
- if test "X[$enable_shared]" = Xno; then
- if test "X[$mysql_plugin_]$2" != Xyes -a \
- "X[$with_plugin_]$2" != Xyes; then
- [with_plugin_]$2=no
- fi
- fi
- ])
-
-
- if test "X[$with_plugin_]$2" = Xno; then
- __MYSQL_EMIT_CHECK_RESULT($3,[no])
- else
- m4_ifdef([$8],m4_ifdef([$7],[],[[with_plugin_]$2='']))
- if test "X[$mysql_plugin_]$2" != Xyes -a \
- "X[$with_plugin_]$2" != Xyes; then
- m4_ifdef([$8],[
- m4_ifdef([$6],[
- if test -d "$srcdir/$6" ; then
- mysql_use_plugin_dir="$6"
- ])
- AC_SUBST([plugin_]$2[_shared_target], "$8")
- AC_SUBST([plugin_]$2[_static_target], [""])
- [with_plugin_]$2=yes
- __MYSQL_EMIT_CHECK_RESULT($3,[plugin])
- m4_ifdef([$6],[
- else
- [mysql_plugin_]$2=no
- __MYSQL_EMIT_CHECK_RESULT($3,[no])
- fi
- ])
- ],[
- [with_plugin_]$2=no
- __MYSQL_EMIT_CHECK_RESULT($3,[no])
- ])
- else
- m4_ifdef([$7],[
- ifelse(m4_bregexp($7, [^lib[^.]+\.a$]), -2, [
-dnl change above "-2" to "0" to enable this section
-dnl Although this is "pretty", it breaks libmysqld build
- m4_ifdef([$6],[
- mysql_use_plugin_dir="$6"
- mysql_plugin_libs="$mysql_plugin_libs -L[\$(top_builddir)]/$6"
- ])
- mysql_plugin_libs="$mysql_plugin_libs dnl
-[-l]m4_bregexp($7, [^lib\([^.]+\)], [\1])"
- ], m4_bregexp($7, [^\\\$]), 0, [
- m4_ifdef([$6],[
- mysql_use_plugin_dir="$6"
- ])
- mysql_plugin_libs="$mysql_plugin_libs $7"
- ], [
- m4_ifdef([$6],[
- mysql_use_plugin_dir="$6"
- mysql_plugin_libs="$mysql_plugin_libs \$(top_builddir)/$6/$7"
- ],[
- mysql_plugin_libs="$mysql_plugin_libs $7"
- ])
- ])
- m4_ifdef([$5],[
- AC_DEFINE($5)
- ])
- AC_SUBST([plugin_]$2[_static_target], "$7")
- AC_SUBST([plugin_]$2[_shared_target], [""])
- ],[
- m4_ifdef([$6],[
- __MYSQL_EMIT_CHECK_RESULT($3,[error])
- AC_MSG_ERROR([Plugin $1 does not support static linking])
- ],[
- m4_ifdef([$5],[
- AC_DEFINE($5)
- AC_SUBST([plugin_]$2[_static_target], ["yes"])
- AC_SUBST([plugin_]$2[_shared_target], [""])
- ])
- ])
- ])
- m4_ifdef([$9],[
- mysql_mandatory_plugins="$mysql_mandatory_plugins [builtin_maria_]$2[_plugin],"
- ],[
- mysql_optional_plugins="$mysql_optional_plugins [builtin_maria_]$2[_plugin],"
- ])
- [with_plugin_]$2=yes
- __MYSQL_EMIT_CHECK_RESULT($3,[yes])
- m4_ifdef([$11], [
- m4_foreach([plugin], [$11], [
- condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp(plugin, [[^/]+$], [\&])"
- condition_dependent_plugin_objects="$condition_dependent_plugin_objects m4_bregexp(plugin, [[^/]+\.], [\&o])"
- condition_dependent_plugin_links="$condition_dependent_plugin_links $6/plugin"
- condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp(plugin, [^.+[/$]], [\&])"
- ])
- ])
- fi
- fi
-
- m4_ifdef([$6], [
- if test -d "$srcdir/$6"; then
- # Even if we don't build a plugin, we bundle its source into the dist
- # file. So its Makefile (and Makefiles for any subdirs) must be
- # generated for 'make dist' to work.
- m4_syscmd([test -f "]$6[/configure"])
- ifelse(m4_sysval, 0,
- [AC_CONFIG_SUBDIRS($6)],
- [
- # autoconf doesn't provide an automatic way to configure DIST_SUBDIRS of
- # a subdir; for our purposes, it's enough to just check for existing
- # Makefile.am files and add them in here
-dnl
-dnl Warning, don't try to quote the m4_esyscmd() macro, it doesn't
-dnl work. Quoting here is tricky.
-dnl
-dnl The $FIND or $SED variable can be set by the user when calling autoconf itself
-dnl to if they need to pass a specific path. This is *NOT* used when calling
-dnl running configure!
-dnl
- AC_CONFIG_FILES(m4_esyscmd([${FIND-find} "]$6[" -name Makefile.am -print | ${SED-sed} 's,\.am$,,']))
- ]
- )
-
- ifelse(
- m4_substr($6, 0, 8), [storage/], [
- mysql_se_distdirs="$mysql_se_distdirs m4_substr($6, 8)"
- if test -n "$mysql_use_plugin_dir" ; then
- mysql_se_dirs="$mysql_se_dirs m4_substr($6, 8)"
- mysql_se_unittest_dirs="$mysql_se_unittest_dirs ../$6"
- fi],
-
- m4_substr($6, 0, 7), [plugin/], [
- mysql_pg_distdirs="$mysql_pg_distdirs m4_substr($6, 7)"
- if test -n "$mysql_use_plugin_dir" ; then
- mysql_pg_dirs="$mysql_pg_dirs m4_substr($6, 7)"
- mysql_pg_unittest_dirs="$mysql_pg_unittest_dirs ../$6"
- fi],
- [AC_FATAL([don't know how to handle plugin dir ]$6)])
- fi
- ])
- ])
-])
-
-AC_DEFUN([__MYSQL_EMIT_CHECK_RESULT],[
- AC_MSG_RESULT($2)
- plugin_report="[$plugin_report]
-m4_format([ * %-32s $2],$1:)"
-])
-
-AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTIONS],[
- ifelse($#, 0, [], $#, 1, [
- _MYSQL_EMIT_PLUGIN_ACTION([$1])
- ],[
- _MYSQL_EMIT_PLUGIN_ACTION([$1])
- _MYSQL_EMIT_PLUGIN_ACTIONS(m4_shift($@))
- ])
-])
-
-AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTION],[
- __MYSQL_EMIT_PLUGIN_ACTION(
- [$1],
- m4_bpatsubst([$1], -, _),
- [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
- )
-])
-
-
-AC_DEFUN([__MYSQL_EMIT_PLUGIN_ACTION],[
- m4_ifdef([$3], [], [
- if test "X[$with_plugin_]$2" = Xyes; then
- if test "X[$plugin_]$2[_static_target]" = X -a \
- "X[$plugin_]$2[_shared_target]" = X; then
- AC_MSG_ERROR([that's strange, $1 failed sanity check])
- fi
- $4
- fi
- ])
-])
-
-
-
-dnl ===========================================================================
-dnl Private helper macros
-dnl ===========================================================================
-
-
-dnl SYNOPSIS
-dnl MYSQL_REQUIRE_PLUGIN([name])
-dnl
-dnl DESCRIPTION
-dnl Checks that the specified plugin does exist
-
-AC_DEFUN([MYSQL_REQUIRE_PLUGIN],[
- _MYSQL_REQUIRE_PLUGIN([$1], [__MYSQL_PLUGIN_]AS_TR_CPP([$1])[__])
-])
-
-define([_MYSQL_REQUIRE_PLUGIN],[
- ifdef([$2],[
- ifelse($2, [$1], [], [
- AC_FATAL([Misspelt MYSQL_PLUGIN declaration for $1])
- ])
- ],[
- AC_FATAL([Missing MYSQL_PLUGIN declaration for $1])
- ])
-])
-
-
-dnl ---------------------------------------------------------------------------
-
-
-dnl SYNOPSIS
-dnl _MYSQL_EMIT_METAPLUGINS([name,name...])
-dnl
-dnl DESCRIPTION
-dnl Emits shell code for metaplugins
-
-AC_DEFUN([_MYSQL_EMIT_METAPLUGINS], [ifelse($#, 0, [], $#, 1,
-[_MYSQL_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
-],
-[_MYSQL_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
-_MYSQL_EMIT_METAPLUGINS(m4_shift($@))])
-])
-
-AC_DEFUN([_MYSQL_EMIT_METAPLUGIN], [
- [$1] )
-m4_ifdef([$2], [
- mysql_plugins='m4_bpatsubst($2, :, [ ])'
-],[
- mysql_plugins=''
-])
- ;;
-])
-
-
-dnl ---------------------------------------------------------------------------
-
-
-dnl SYNOPSIS
-dnl _MYSQL_PLUGAPPEND([name],[to-append])
-dnl
-dnl DESCRIPTION
-dnl Helper macro for appending to colon-delimited lists
-dnl Optinal 3rd argument is for actions only required when defining
-dnl macro named for the first time.
-
-AC_DEFUN([_MYSQL_PLUGAPPEND],[
- m4_ifdef([$1],[
- m4_define([__plugin_append_tmp__], m4_defn([$1]))
- m4_undefine([$1])
- m4_define([$1], __plugin_append_tmp__[:$2])
- m4_undefine([__plugin_append_tmp__])
- ],[
- m4_define([$1], [$2])
- $3
- ])
-])
-
-
-dnl SYNOPSIS
-dnl _MYSQL_PLUGAPPEND_META([name],[meta,meta...])
-dnl
-dnl DESCRIPTION
-dnl Helper macro for adding plugins to meta plugins
-
-AC_DEFUN([_MYSQL_PLUGAPPEND_META],[
- ifelse($#, 1, [], [$#:$2], [2:], [], [$2], [all], [
- AC_FATAL([protected plugin group: all])
- ], [$2], [none], [
- AC_FATAL([protected plugin group: none])
- ],[
- _MYSQL_PLUGAPPEND([__mysql_$1_configs__],[$2])
- _MYSQL_PLUGAPPEND([__mysql_]m4_bpatsubst($2, -, _)[_plugins__],[$1], [
- _MYSQL_PLUGAPPEND([__mysql_metaplugin_list__],[$2])
- ])
- _MYSQL_PLUGAPPEND_META([$1], m4_shift(m4_shift($@)))
- ])
-])
-
-
-dnl ---------------------------------------------------------------------------
-
-
-dnl SYNOPSIS
-dnl MYSQL_LIST_PLUGINS
-dnl
-dnl DESCRIPTION
-dnl Emits formatted list of declared plugins
-
-AC_DEFUN([MYSQL_LIST_PLUGINS],[dnl
- m4_ifdef([__mysql_plugin_list__],[dnl
- _MYSQL_LIST_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))dnl
- ])dnl
-])
-
-AC_DEFUN([_MYSQL_LIST_PLUGINS],[dnl
- ifelse($#, 0, [], $#, 1, [dnl
- MYSQL_SHOW_PLUGIN([$1])dnl
- ],[dnl
- MYSQL_SHOW_PLUGIN([$1])dnl
- _MYSQL_LIST_PLUGINS(m4_shift($@))dnl
- ])dnl
-])
-
-AC_DEFUN([MYSQL_SHOW_PLUGIN],[
- _MYSQL_SHOW_PLUGIN(
- [$1],
- [$1-plugin],
- [MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),
- __mysql_[$1]_configs__,
- )
-])
-
-AC_DEFUN([_MYSQL_SHOW_PLUGIN],[dnl
- === $3 ===
- Plugin Name: [$1]
- Description: $4
- Supports build: _PLUGIN_BUILD_TYPE([$7],[$8])[]dnl
-m4_ifdef([$12],[
- Configurations: m4_bpatsubst($12, :, [, ])])[]dnl
-m4_ifdef([$10],[
- Status: disabled])[]dnl
-m4_ifdef([$9],[
- Status: mandatory])[]dnl
-])
-
-AC_DEFUN([_PLUGIN_BUILD_TYPE],
-[m4_ifdef([$1],[static ]m4_ifdef([$2],[and dnl
-]))[]m4_ifdef([$2],[dynamic],[m4_ifdef([$1],[],[static])])])
-
-
-dnl ---------------------------------------------------------------------------
-
-
-AC_DEFUN([_MYSQL_EMIT_PLUGINS],[
- ifelse($#, 0, [], [$#:$1], [1:], [], [
- m4_ifdef([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [], [
- m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),[ ])
- ])
- [$1] )
- m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
- AC_MSG_ERROR([plugin $1 is disabled])
- ],[
- _MYSQL_EMIT_PLUGIN_ENABLE([$1], m4_bpatsubst([$1], -, _),
- [MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
- [MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]))
- ])
- ;;
- _MYSQL_EMIT_PLUGINS(m4_shift($@))
- ])
-])
-
-AC_DEFUN([_MYSQL_EMIT_PLUGIN_ENABLE],[
- m4_ifdef([$5],m4_ifdef([$4],[
- [mysql_plugin_]$2=yes
- ],[
- AC_MSG_WARN([$3 can only be built as a plugin])
- ]),[
- [mysql_plugin_]$2=yes
- ])
-])
-
-AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDS], [
- ifelse($#, 0, [], [$#:$1], [1:], [], [
- _MYSQL_EMIT_CHECK_DEPENDS(m4_bpatsubst([$1], -, _),
- [__mysql_plugdepends_$1__])
- _MYSQL_EMIT_PLUGIN_DEPENDS(m4_shift($@))
- ])
-])
-
-AC_DEFUN([_MYSQL_EMIT_CHECK_DEPENDS], [
- m4_ifdef([$2], [
- if test "X[$mysql_plugin_]$1" = Xyes -a \
- "X[$with_plugin_]$1" != Xno -o \
- "X[$with_plugin_]$1" = Xyes; then
- _MYSQL_EMIT_PLUGIN_DEPENDENCIES(m4_bpatsubst($2, :, [,]))
- fi
- ])
-])
-
-AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDENCIES], [
- ifelse([$1], [], [], [
- m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
- AC_MSG_ERROR([depends upon disabled plugin $1])
- ],[
- [mysql_plugin_]m4_bpatsubst([$1], -, _)=yes
- if test "X[$with_plugin_]m4_bpatsubst([$1], -, _)" = Xno; then
- AC_MSG_ERROR([depends upon disabled plugin $1])
- fi
- ])
- _MYSQL_EMIT_PLUGIN_DEPENDENCIES(m4_shift($@))
- ])
-])
-
-dnl SYNOPSIS
-dnl _MYSQL_CHECK_PLUGIN_ARGS([plugin],[plugin]...)
-dnl
-dnl DESCRIPTION
-dnl Emits shell script for checking configure arguments
-dnl Arguments to this macro is default value for selected plugins
-
-AC_DEFUN([_MYSQL_CHECK_PLUGIN_ARGS],[
- __MYSQL_CHECK_PLUGIN_ARGS(m4_default([$1], [default]))
-])
-
-AC_DEFUN([__MYSQL_CHECK_PLUGIN_ARGS],[
- AC_ARG_WITH([plugins],
-AS_HELP_STRING([--with-plugins=PLUGIN[[[[[,PLUGIN..]]]]]],
- [Plugins to include in mysqld. Must be a
- configuration name or a comma separated list of plugins.])
-AS_HELP_STRING([],
- [Available configurations are:] dnl
-m4_bpatsubst([none:]m4_ifdef([__mysql_metaplugin_list__],
- __mysql_metaplugin_list__:)[all], :, [ ])[.])
-AS_HELP_STRING([],
- [Available plugins are:] dnl
-m4_bpatsubst(__mysql_plugin_list__, :, [ ])[.])
-AS_HELP_STRING([--without-plugin-PLUGIN],
- [Disable the named plugin from being built. Otherwise, for
- plugins which are not selected for inclusion in mysqld will be
- built dynamically (if supported)])
-AS_HELP_STRING([--with-plugin-PLUGIN],
- [Forces the named plugin to be linked into mysqld statically.]),
- [mysql_plugins="`echo $withval | tr ',.:;*[]' ' '`"],
- [mysql_plugins=['$1']])
-
-m4_divert_once([HELP_VAR_END],[
-Description of plugins:
-MYSQL_LIST_PLUGINS])
-
- case "$mysql_plugins" in
- all )
- mysql_plugins='m4_bpatsubst(__mysql_plugin_list__, :, [ ])'
- ;;
- none )
- mysql_plugins=''
- ;;
-m4_ifdef([__mysql_metaplugin_list__],[
-_MYSQL_EMIT_METAPLUGINS(m4_bpatsubst(__mysql_metaplugin_list__, :, [,]))
-])
- esac
-
- for plugin in $mysql_plugins; do
- case "$plugin" in
- all | none )
- AC_MSG_ERROR([bad plugin name: $plugin])
- ;;
-_MYSQL_EMIT_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
- * )
- AC_MSG_ERROR([unknown plugin: $plugin])
- ;;
- esac
- done
-
- _MYSQL_EMIT_PLUGIN_DEPENDS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
-])
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: _MYSQL_INCLUDE_LIST
-dnl
-dnl SYNOPSIS
-dnl _MYSQL_INCLUDE_LIST([filename,filename...])
-dnl
-dnl DESCRIPTION
-dnl includes all files from the list
-dnl
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([_MYSQL_INCLUDE_LIST],[
- ifelse([$1], [], [], [
- m4_define([__mysql_include__],[$1])
- dnl We have to use builtin(), because sinclude would generate an error
- dnl "file $1 does not exists" in aclocal-1.8 - which is a bug, clearly
- dnl violating m4 specs, and which is fixed in aclocal-1.9
- builtin([include],$1)
- m4_undefine([__mysql_include__])
- _MYSQL_INCLUDE_LIST(m4_shift($@))
- ])
-])
-
-dnl ===========================================================================
diff --git a/config/ac-macros/readline.m4 b/config/ac-macros/readline.m4
deleted file mode 100644
index e1ed8420bfb..00000000000
--- a/config/ac-macros/readline.m4
+++ /dev/null
@@ -1,143 +0,0 @@
-AC_DEFUN([MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY], [
- AC_CACHE_CHECK([HIST_ENTRY is declared in readline/readline.h], mysql_cv_hist_entry_declared,
- AC_TRY_COMPILE(
- [
- #include "stdio.h"
- #include "readline/readline.h"
- ],
- [
- HIST_ENTRY entry;
- ],
- [
- mysql_cv_hist_entry_declared=yes
- AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, [1],
- [HIST_ENTRY is defined in the outer libeditreadline])
- ],
- [mysql_cv_libedit_interface=no]
- )
- )
-])
-
-AC_DEFUN([MYSQL_CHECK_LIBEDIT_INTERFACE], [
- AC_CACHE_CHECK([libedit variant of rl_completion_entry_function], mysql_cv_libedit_interface,
- AC_TRY_COMPILE(
- [
- #include "stdio.h"
- #include "readline/readline.h"
- ],
- [
- char res= *(*rl_completion_entry_function)(0,0);
- completion_matches(0,0);
- ],
- [
- mysql_cv_libedit_interface=yes
- AC_DEFINE_UNQUOTED([USE_LIBEDIT_INTERFACE], [1],
- [used libedit interface (can we dereference result of rl_completion_entry_function)])
- ],
- [mysql_cv_libedit_interface=no]
- )
- )
-])
-
-AC_DEFUN([MYSQL_CHECK_NEW_RL_INTERFACE], [
- AC_CACHE_CHECK([defined rl_compentry_func_t and rl_completion_func_t], mysql_cv_new_rl_interface,
- AC_TRY_COMPILE(
- [
- #include "stdio.h"
- #include "readline/readline.h"
- ],
- [
- rl_completion_func_t *func1= (rl_completion_func_t*)0;
- rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
- ],
- [
- mysql_cv_new_rl_interface=yes
- AC_DEFINE_UNQUOTED([USE_NEW_READLINE_INTERFACE], [1],
- [used new readline interface (are rl_completion_func_t and rl_compentry_func_t defined)])
- ],
- [mysql_cv_new_rl_interface=no]
- )
- )
-])
-
-dnl
-dnl check for availability of multibyte characters and functions
-dnl (Based on BASH_CHECK_MULTIBYTE in aclocal.m4 of readline-5.0)
-dnl
-AC_DEFUN([MYSQL_CHECK_MULTIBYTE],
-[
-AC_CHECK_HEADERS(wctype.h)
-AC_CHECK_HEADERS(wchar.h)
-AC_CHECK_HEADERS(langinfo.h)
-
-AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN,[],[Define if you have mbrlen]))
-AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP,[],[Define if you have mbscmp]))
-AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS,[],[Define if you have mbsrtowcs]))
-
-AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB,[],[Define if you have wcrtomb]))
-AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC,[],[Define if you have mbrtowc]))
-AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL,[],[Define if you have wcscoll]))
-AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP,[],[Define if you have wcsdup]))
-AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH,[],[Define if you have wcwidth]))
-AC_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE,[],[Define if you have wctype]))
-
-AC_CACHE_CHECK([for mbstate_t], mysql_cv_have_mbstate_t,
-[AC_TRY_COMPILE([
-#include <wchar.h>], [
- mbstate_t ps;
- mbstate_t *psp;
- psp = (mbstate_t *)0;
-], mysql_cv_have_mbstate_t=yes, mysql_cv_have_mbstate_t=no)])
-if test $mysql_cv_have_mbstate_t = yes; then
- AC_DEFINE([HAVE_MBSTATE_T],[],[Define if mysql_cv_have_mbstate_t=yes])
-fi
-
-AC_CHECK_FUNCS(iswlower iswupper towlower towupper iswctype)
-
-AC_CACHE_CHECK([for nl_langinfo and CODESET], mysql_cv_langinfo_codeset,
-[AC_TRY_LINK(
-[#include <langinfo.h>],
-[char* cs = nl_langinfo(CODESET);],
-mysql_cv_langinfo_codeset=yes, mysql_cv_langinfo_codeset=no)])
-if test $mysql_cv_langinfo_codeset = yes; then
- AC_DEFINE([HAVE_LANGINFO_CODESET],[],[Define if mysql_cv_langinfo_codeset=yes])
-fi
-
-dnl check for wchar_t in <wchar.h>
-AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t,
-[AC_TRY_COMPILE(
-[#include <wchar.h>
-],
-[
- wchar_t foo;
- foo = 0;
-], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)])
-if test $bash_cv_type_wchar_t = yes; then
- AC_DEFINE(HAVE_WCHAR_T, 1, [systems should define this type here])
-fi
-
-dnl check for wctype_t in <wctype.h>
-AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t,
-[AC_TRY_COMPILE(
-[#include <wctype.h>],
-[
- wctype_t foo;
- foo = 0;
-], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)])
-if test $bash_cv_type_wctype_t = yes; then
- AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here])
-fi
-
-dnl check for wint_t in <wctype.h>
-AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t,
-[AC_TRY_COMPILE(
-[#include <wctype.h>],
-[
- wint_t foo;
- foo = 0;
-], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)])
-if test $bash_cv_type_wint_t = yes; then
- AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
-fi
-
-])
diff --git a/config/ac-macros/ssl.m4 b/config/ac-macros/ssl.m4
deleted file mode 100644
index fc55f93d8d6..00000000000
--- a/config/ac-macros/ssl.m4
+++ /dev/null
@@ -1,219 +0,0 @@
-dnl ===========================================================================
-dnl Support for SSL
-dnl ===========================================================================
-dnl
-dnl
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_USE_BUNDLED_YASSL
-dnl
-dnl SYNOPSIS
-dnl MYSQL_USE_BUNDLED_YASSL()
-dnl
-dnl DESCRIPTION
-dnl Add defines so yassl is built and linked with
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_USE_BUNDLED_YASSL], [
-
- with_bundled_yassl="yes"
-
- yassl_dir="yassl"
- AC_SUBST([yassl_dir])
-
- yassl_libs="\$(top_builddir)/extra/yassl/src/libyassl.la \
- \$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la"
- AC_SUBST(yassl_libs)
-
- AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for SSL.])
- AC_DEFINE([HAVE_YASSL], [1], [Defined by configure. Using yaSSL for SSL.])
-
- # System specific checks
- yassl_integer_extra_cxxflags=""
- case $host_cpu--$CXX_VERSION in
- sparc*--*Sun*C++*5.6*)
- # Disable inlining when compiling taocrypt/src/
- yassl_taocrypt_extra_cxxflags="+d"
- AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/])
- ;;
- esac
- AC_SUBST([yassl_taocrypt_extra_cxxflags])
-
- # Thread safe check
- yassl_thread_cxxflags=""
- yassl_thread_safe=""
- if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"; then
- yassl_thread_cxxflags="-DYASSL_THREAD_SAFE"
- yassl_thread_safe="(thread-safe)"
- fi
- AC_SUBST([yassl_thread_cxxflags])
-
- # Link extra/yassl/include/openssl subdir to include/
- yassl_h_ln_cmd="\$(LN) -s \$(top_srcdir)/extra/yassl/include/openssl openssl"
- AC_SUBST(yassl_h_ln_cmd)
-
- AC_MSG_RESULT([using bundled yaSSL $yassl_thread_safe])
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_SSL_DIR
-dnl
-dnl SYNOPSIS
-dnl MYSQL_CHECK_SSL_DIR(includes, libs)
-dnl
-dnl DESCRIPTION
-dnl Auxiliary macro to check for ssl at given path
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_CHECK_SSL_DIR], [
-ssl_incs="$1"
-ssl_libs="$2"
-save_CPPFLAGS="$CPPFLAGS"
-save_LIBS="$LIBS"
-CPPFLAGS="$ssl_incs $CPPFLAGS"
-LIBS="$LIBS $ssl_libs"
-AC_TRY_LINK([#include <openssl/ssl.h>],
- [return SSL_library_init();],
- [mysql_ssl_found="yes"],
- [mysql_ssl_found="no"])
-CPPFLAGS="$save_CPPFLAGS"
-LIBS="$save_LIBS"
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_FIND_OPENSSL
-dnl
-dnl SYNOPSIS
-dnl MYSQL_FIND_OPENSSL(location)
-dnl
-dnl DESCRIPTION
-dnl Search the location for OpenSSL support
-dnl
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_FIND_OPENSSL], [
- location="$1"
-
- #
- # Set include paths
- #
- openssl_include="$location/include"
- openssl_includes=""
-
- # Don't set ssl_includes to /usr/include as this gives us a lot of
- # compiler warnings when using gcc 3.x
- if test "$openssl_include" != "/usr/include"
- then
- openssl_includes="-I$openssl_include"
- fi
-
- #
- # Try to link with openSSL libs in <location>
- #
- openssl_libs="-L$location/lib/ -lssl -lcrypto"
- MYSQL_CHECK_SSL_DIR([$openssl_includes], [$openssl_libs])
-
- if test "$mysql_ssl_found" == "no"
- then
- #
- # BUG 764: Compile failure with OpenSSL on Red Hat Linux (krb5.h missing)
- # Try to link with include paths to kerberos set
- #
- openssl_includes="$openssl_includes -I/usr/kerberos/include"
- MYSQL_CHECK_SSL_DIR([$openssl_includes], [$openssl_libs])
- fi
-
- if test "$mysql_ssl_found" == "no"
- then
- AC_MSG_ERROR([Could not link with SSL libs at $location])
- fi
-
- # openssl-devel-0.9.6 requires dlopen() and we can't link staticly
- # on many platforms (We should actually test this here, but it's quite
- # hard to do as we are doing libtool for linking.)
- case "$CLIENT_EXTRA_LDFLAGS $MYSQLD_EXTRA_LDFLAGS" in
- *-all-static*)
- AC_MSG_ERROR([You can't use the --all-static link option when using openssl.])
- ;;
- esac
-
- AC_SUBST(openssl_includes)
- AC_SUBST(openssl_libs)
-
- NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS $openssl_libs"
-
- AC_DEFINE([HAVE_OPENSSL], [1], [OpenSSL])
- AC_MSG_RESULT([using openSSL from $location])
-])
-
-
-
-dnl ------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_SSL
-dnl
-dnl SYNOPSIS
-dnl MYSQL_CHECK_SSL
-dnl
-dnl Provides the following configure options:
-dnl --with-ssl=DIR
-dnl Possible DIR values are:
-dnl - no - the macro will disable use of ssl
-dnl - bundled, empty or not specified - means use ssl lib
-dnl bundled along with MySQL sources
-dnl - ssl location prefix - given location prefix, the macro expects
-dnl to find the header files in $prefix/include/, and libraries in
-dnl $prefix/lib. If headers or libraries weren't found at $prefix, the
-dnl macro bails out with error.
-dnl
-dnl ------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_SSL], [
-
- AC_CONFIG_FILES(extra/yassl/Makefile dnl
- extra/yassl/taocrypt/Makefile dnl
- extra/yassl/taocrypt/benchmark/Makefile dnl
- extra/yassl/taocrypt/src/Makefile dnl
- extra/yassl/taocrypt/test/Makefile dnl
- extra/yassl/src/Makefile dnl
- extra/yassl/testsuite/Makefile)
-
-AC_MSG_CHECKING(for SSL)
- AC_ARG_WITH([ssl],
- [ --with-ssl[=DIR] Include SSL support],
- [mysql_ssl_dir="$withval"],
- [mysql_ssl_dir=no])
-
- if test "$with_yassl"
- then
- AC_MSG_ERROR([The flag --with-yassl is deprecated, use --with-ssl])
- fi
-
- if test "$with_openssl"
- then
- AC_MSG_ERROR([The flag --with-openssl is deprecated, use --with-ssl])
- fi
-
- case "$mysql_ssl_dir" in
- "no")
- #
- # Don't include SSL support
- #
- AC_MSG_RESULT([disabled])
- ;;
-
- "bundled"|"yes")
- #
- # Use the bundled SSL implementation (yaSSL)
- #
- MYSQL_USE_BUNDLED_YASSL
- ;;
-
- *)
- #
- # A location where to search for OpenSSL was specified
- #
- MYSQL_FIND_OPENSSL([$mysql_ssl_dir])
- ;;
- esac
- AM_CONDITIONAL([HAVE_YASSL], [ test "$with_bundled_yassl" = "yes" ])
-])
diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4
deleted file mode 100644
index f62bb056249..00000000000
--- a/config/ac-macros/zlib.m4
+++ /dev/null
@@ -1,132 +0,0 @@
-dnl Define zlib paths to point at bundled zlib
-
-AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [
-ZLIB_INCLUDES="-I\$(top_srcdir)/zlib"
-ZLIB_LIBS="\$(top_builddir)/zlib/libzlt.la"
-dnl Omit -L$pkglibdir as it's always in the list of mysql_config deps.
-ZLIB_DEPS="-lz"
-zlib_dir="zlib"
-AC_SUBST([zlib_dir])
-mysql_cv_compress="yes"
-])
-
-dnl Auxiliary macro to check for zlib at given path.
-dnl We are strict with the server, as "archive" engine
-dnl needs zlibCompileFlags(), but for client only we
-dnl are less strict, and take the zlib we find.
-
-AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
-save_CPPFLAGS="$CPPFLAGS"
-save_LIBS="$LIBS"
-CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS"
-LIBS="$LIBS $ZLIB_LIBS"
-if test X"$with_server" = Xno
-then
- zlibsym=zlibVersion
-else
- zlibsym=zlibCompileFlags
-fi
-AC_CACHE_VAL([mysql_cv_compress],
- [AC_TRY_LINK([#include <zlib.h>],
- [return $zlibsym();],
- [mysql_cv_compress="yes"
- AC_MSG_RESULT([ok])],
- [mysql_cv_compress="no"])
- ])
-CPPFLAGS="$save_CPPFLAGS"
-LIBS="$save_LIBS"
-])
-
-dnl MYSQL_CHECK_ZLIB_WITH_COMPRESS
-dnl ------------------------------------------------------------------------
-dnl @synopsis MYSQL_CHECK_ZLIB_WITH_COMPRESS
-dnl
-dnl Provides the following configure options:
-dnl --with-zlib-dir=DIR
-dnl Possible DIR values are:
-dnl - "no" - the macro will disable use of compression functions
-dnl - "bundled" - means use zlib bundled along with MySQL sources
-dnl - empty, or not specified - the macro will try default system
-dnl library (if present), and in case of error will fall back to
-dnl bundled zlib
-dnl - zlib location prefix - given location prefix, the macro expects
-dnl to find the library headers in $prefix/include, and binaries in
-dnl $prefix/lib. If zlib headers or binaries weren't found at $prefix, the
-dnl macro bails out with error.
-dnl
-dnl If the library was found, this function #defines HAVE_COMPRESS
-dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include),
-dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz) and ZLIB_DEPS which is
-dnl used in mysql_config and is always the same as ZLIB_LIBS except to
-dnl when we use the bundled zlib. In the latter case ZLIB_LIBS points to the
-dnl build dir ($top_builddir/zlib), while mysql_config must point to the
-dnl installation dir ($pkglibdir), so ZLIB_DEPS is set to point to
-dnl $pkglibdir.
-
-AC_DEFUN([MYSQL_CHECK_ZLIB_WITH_COMPRESS], [
-
-AC_CONFIG_FILES(zlib/Makefile)
-
-AC_MSG_CHECKING([for zlib compression library])
-case $SYSTEM_TYPE in
-*netware* | *modesto*)
- AC_MSG_RESULT(ok)
- AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
- ;;
- *)
- AC_ARG_WITH([zlib-dir],
- AC_HELP_STRING([--with-zlib-dir=no|bundled|DIR],
- [Provide MySQL with a custom location of
- compression library. Given DIR, zlib binary is
- assumed to be in $DIR/lib and header files
- in $DIR/include.]),
- [mysql_zlib_dir=${withval}],
- [mysql_zlib_dir=""])
- case "$mysql_zlib_dir" in
- "no")
- mysql_cv_compress="no"
- AC_MSG_RESULT([disabled])
- ;;
- "bundled")
- MYSQL_USE_BUNDLED_ZLIB
- AC_MSG_RESULT([using bundled zlib])
- ;;
- "")
- ZLIB_INCLUDES=""
- ZLIB_LIBS="-lz"
- MYSQL_CHECK_ZLIB_DIR
- if test "$mysql_cv_compress" = "no"; then
- MYSQL_USE_BUNDLED_ZLIB
- AC_MSG_RESULT([system-wide zlib not found, using one bundled with MySQL])
- fi
- ;;
- *)
- # Test for libz using all known library file endings
- if test \( -f "$mysql_zlib_dir/lib/libz.a" -o \
- -f "$mysql_zlib_dir/lib/libz.so" -o \
- -f "$mysql_zlib_dir/lib/libz.sl" -o \
- -f "$mysql_zlib_dir/lib/libz.dylib" \) \
- -a -f "$mysql_zlib_dir/include/zlib.h"; then
- ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
- ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
- MYSQL_CHECK_ZLIB_DIR
- fi
- if test "x$mysql_cv_compress" != "xyes"; then
- AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,lib}])
- fi
- ;;
- esac
- if test "$mysql_cv_compress" = "yes"; then
- if test "x$ZLIB_DEPS" = "x"; then
- ZLIB_DEPS="$ZLIB_LIBS"
- fi
- AC_SUBST([ZLIB_LIBS])
- AC_SUBST([ZLIB_DEPS])
- AC_SUBST([ZLIB_INCLUDES])
- AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
- fi
- ;;
-esac
-])
-
-dnl ------------------------------------------------------------------------