diff options
author | Michael Widenius <monty@askmonty.org> | 2009-10-14 15:58:53 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2009-10-14 15:58:53 +0300 |
commit | daccf1748344e011267ad3f0f093c49c6530d050 (patch) | |
tree | ce464eb370e989b1ba3c6edc2dfc96444791fc13 /config/ac-macros | |
parent | 115f4b275a640fc46dd295cc8654e995a91a3885 (diff) | |
parent | 75a949fb414f8b3ed851a466d84788085c9dbe42 (diff) | |
download | mariadb-git-daccf1748344e011267ad3f0f093c49c6530d050.tar.gz |
Merge with 5.1
Diffstat (limited to 'config/ac-macros')
-rw-r--r-- | config/ac-macros/libevent.m4 | 2 | ||||
-rw-r--r-- | config/ac-macros/misc.m4 | 23 | ||||
-rw-r--r-- | config/ac-macros/readline.m4 | 55 |
3 files changed, 65 insertions, 15 deletions
diff --git a/config/ac-macros/libevent.m4 b/config/ac-macros/libevent.m4 index fde47b6aea1..58ba2d6ebde 100644 --- a/config/ac-macros/libevent.m4 +++ b/config/ac-macros/libevent.m4 @@ -13,7 +13,7 @@ AC_DEFUN([MYSQL_USE_BUNDLED_LIBEVENT], [ AC_SUBST([libevent_dir]) libevent_libs="\$(top_builddir)/extra/libevent/libevent.a" - libevent_includes="-I\$(top_builddir)/extra/libevent" + libevent_includes="-I\$(top_srcdir)/extra/libevent" libevent_test_option="--mysqld=--thread-handling=pool-of-threads" AC_SUBST(libevent_libs) AC_SUBST(libevent_includes) diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 index 2fbb30383bd..996ac62e025 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -231,16 +231,19 @@ esac AC_DEFUN([MYSQL_CHECK_LIB_TERMCAP], [ AC_CACHE_VAL(mysql_cv_termcap_lib, -[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_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 @@ -453,6 +456,10 @@ fi 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; @@ -594,15 +601,15 @@ dnl --------------------------------------------------------------------------- dnl MYSQL_NEEDS_MYSYS_NEW AC_DEFUN([MYSQL_NEEDS_MYSYS_NEW], -[AC_CACHE_CHECK([needs mysys_new helpers], mysql_use_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_use_mysys_new=no, mysql_use_mysys_new=yes) +], mysql_cv_use_mysys_new=no, mysql_cv_use_mysys_new=yes) AC_LANG_POP(C++) ]) -if test "$mysql_use_mysys_new" = "yes" +if test "$mysql_cv_use_mysys_new" = "yes" then AC_DEFINE([USE_MYSYS_NEW], [1], [Needs to use mysys_new helpers]) fi diff --git a/config/ac-macros/readline.m4 b/config/ac-macros/readline.m4 index e47d0a44483..e1ed8420bfb 100644 --- a/config/ac-macros/readline.m4 +++ b/config/ac-macros/readline.m4 @@ -70,12 +70,16 @@ AC_CHECK_HEADERS(wctype.h) AC_CHECK_HEADERS(wchar.h) AC_CHECK_HEADERS(langinfo.h) -AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE([HAVE_MBSRTOWCS],[],[Define if you have mbsrtowcs])) -AC_CHECK_FUNC(mbrtowc, AC_DEFINE([HAVE_MBRTOWC],[],[Define if you have mbrtowc])) -AC_CHECK_FUNC(mbrlen, AC_DEFINE([HAVE_MBRLEN],[],[Define if you have mbrlen])) -AC_CHECK_FUNC(wctomb, AC_DEFINE([HAVE_WCTOMB],[],[Define if you have wctomb])) -AC_CHECK_FUNC(wcwidth, AC_DEFINE([HAVE_WCWIDTH],[],[Define if you have wcwidth])) -AC_CHECK_FUNC(wcsdup, AC_DEFINE([HAVE_WCSDUP],[],[Define if you check wcsdup])) +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([ @@ -88,6 +92,8 @@ 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>], @@ -97,4 +103,41 @@ 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 + ]) |