~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/readline.m4

  • Committer: Brian Aker
  • Date: 2009-02-21 00:18:15 UTC
  • Revision ID: brian@tangent.org-20090221001815-x20e8h71e984lvs1
Completion (?) of uint conversion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_DEFUN([DRIZZLE_CHECK_READLINE_DECLARES_HIST_ENTRY], [
 
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]
 
18
    )
 
19
  )
 
20
])
 
21
 
 
22
AC_DEFUN([DRIZZLE_CHECK_NEW_RL_INTERFACE], [
 
23
    AC_CACHE_CHECK([defined rl_compentry_func_t and rl_completion_func_t], mysql_cv_new_rl_interface,
 
24
        AC_TRY_COMPILE(
 
25
            [
 
26
                #include "stdio.h"
 
27
                #include "readline/readline.h"
 
28
            ],
 
29
            [ 
 
30
                rl_completion_func_t *func1= (rl_completion_func_t*)0;
 
31
                rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
 
32
            ],
 
33
            [
 
34
                mysql_cv_new_rl_interface=yes
 
35
            ],
 
36
            [mysql_cv_new_rl_interface=no]
 
37
        )
 
38
    )
 
39
    if test "$mysql_cv_new_rl_interface" = "yes"; then
 
40
                AC_DEFINE_UNQUOTED([USE_NEW_READLINE_INTERFACE], [1],
 
41
                [used new readline interface (are rl_completion_func_t and rl_compentry_func_t defined)])
 
42
    fi
 
43
])
 
44