~drizzle-trunk/drizzle/development

319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1
AC_DEFUN([DRIZZLE_CHECK_READLINE_DECLARES_HIST_ENTRY], [
779.2.4 by Monty Taylor
Updated some more build stuff.
2
  AC_CACHE_CHECK([HIST_ENTRY is declared in readline/readline.h],
3
                 mysql_cv_hist_entry_declared,
4
    AC_TRY_COMPILE(
5
      [
6
#include <stdio.h>
7
#include <readline/readline.h>
8
      ],
9
      [ 
10
HIST_ENTRY entry;
11
      ],
12
      [
13
        mysql_cv_hist_entry_declared=yes
14
        AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, [1],
15
                           [HIST_ENTRY is defined in the outer libeditreadline])
16
      ],
17
      [mysql_cv_libedit_interface=no]
1 by brian
clean slate
18
    )
779.2.4 by Monty Taylor
Updated some more build stuff.
19
  )
1 by brian
clean slate
20
])
21
1149.2.1 by Monty Taylor
Workaround for half-present new-interface on Snow Leopard, combined
22
AC_DEFUN([DRIZZLE_CHECK_RL_COMPENTRY], [
23
  AC_CACHE_CHECK([defined rl_compentry_func_t], [drizzle_cv_rl_compentry],[
24
    AC_COMPILE_IFELSE([
25
      AC_LANG_PROGRAM([[
26
#include "stdio.h"
27
#include "readline/readline.h"
28
      ]],[[
29
rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
30
      ]])
31
    ],[
32
      drizzle_cv_rl_compentry=yes
33
    ],[
34
      drizzle_cv_rl_compentry=no
35
    ])
36
  ])
37
  AS_IF([test "$drizzle_cv_rl_compentry" = "yes"],[
38
    AC_DEFINE([HAVE_RL_COMPENTRY], [1],
39
              [Does system provide rl_compentry_func_t])
40
  ])
41
42
  AC_LANG_PUSH(C++)
43
  save_CXXFLAGS="${CXXFLAGS}"
44
  CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
45
  AC_CACHE_CHECK([rl_compentry_func_t works], [drizzle_cv_rl_compentry_works],[
46
    AC_COMPILE_IFELSE([
47
      AC_LANG_PROGRAM([[
48
#include "stdio.h"
49
#include "readline/readline.h"
50
      ]],[[
51
rl_completion_entry_function= (rl_compentry_func_t*)NULL;
52
      ]])
53
    ],[
54
      drizzle_cv_rl_compentry_works=yes
55
    ],[
56
      drizzle_cv_rl_compentry_works=no
57
    ])
58
  ])
59
  AS_IF([test "$drizzle_cv_rl_compentry_works" = "yes"],[
60
    AC_DEFINE([HAVE_WORKING_RL_COMPENTRY], [1],
61
              [Does system provide an rl_compentry_func_t that is usable])
62
  ])
63
  CXXFLAGS="${save_CXXFLAGS}"
64
  AC_LANG_POP()
65
])
66
67
68
AC_DEFUN([DRIZZLE_CHECK_RL_COMPLETION_FUNC], [
69
  AC_CACHE_CHECK([defined rl_completion_func_t], [drizzle_cv_rl_completion],[
70
    AC_COMPILE_IFELSE([
71
      AC_LANG_PROGRAM([[
72
#include "stdio.h"
73
#include "readline/readline.h"
74
      ]],[[
75
rl_completion_func_t *func1= (rl_completion_func_t*)0;
76
      ]])
77
    ],[
78
      drizzle_cv_rl_completion=yes
79
    ],[
80
      drizzle_cv_rl_completion=no
81
    ])
82
  ])
83
  AS_IF([test "$drizzle_cv_rl_completion" = "yes"],[
84
    AC_DEFINE([HAVE_RL_COMPLETION], [1],
85
              [Does system provide rl_completion_func_t])
86
  ])
87
])
88
89
AC_DEFUN([DRIZZLE_CHECK_NEW_RL_INTERFACE],[
90
  DRIZZLE_CHECK_RL_COMPENTRY  
91
  DRIZZLE_CHECK_RL_COMPLETION_FUNC
92
])