Changeset 1720

Show
Ignore:
Timestamp:
02/13/05 13:50:58 (4 years ago)
Author:
morris
Message:

Make rl_completion_display_matches_hook test pass.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wire/trunk/configure

    r1707 r1720  
    49624962                        #include <stdio.h> 
    49634963                        #include <readline/readline.h> 
     4964                        char * generator(const char *, int); 
    49644965                        char * generator(const char *text, int state) { 
    49654966                                return NULL; 
    49664967                        } 
    49674968                        int main(void) { 
    4968                                 char **matches = rl_completion_matches("", generator); 
     4969                                (void) rl_completion_matches("", generator); 
    49694970 
    49704971                                return 0; 
     
    50065007rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 
    50075008fi 
     5009 
     5010                echo "$as_me:$LINENO: checking whether rl_completion_display_matches_hook is declared" >&5 
     5011echo $ECHO_N "checking whether rl_completion_display_matches_hook is declared... $ECHO_C" >&6 
     5012if test "${ac_cv_have_decl_rl_completion_display_matches_hook+set}" = set; then 
     5013  echo $ECHO_N "(cached) $ECHO_C" >&6 
     5014else 
     5015  cat >conftest.$ac_ext <<_ACEOF 
     5016#line $LINENO "configure" 
     5017/* confdefs.h.  */ 
     5018_ACEOF 
     5019cat confdefs.h >>conftest.$ac_ext 
     5020cat >>conftest.$ac_ext <<_ACEOF 
     5021/* end confdefs.h.  */ 
     5022 
     5023                        #include <stdio.h> 
     5024                        #include <readline/readline.h> 
     5025 
     5026 
     5027int 
     5028main () 
     5029{ 
     5030#ifndef rl_completion_display_matches_hook 
     5031  char *p = (char *) rl_completion_display_matches_hook; 
     5032#endif 
     5033 
     5034  ; 
     5035  return 0; 
     5036} 
     5037_ACEOF 
     5038rm -f conftest.$ac_objext 
     5039if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     5040  (eval $ac_compile) 2>&5 
     5041  ac_status=$? 
     5042  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5043  (exit $ac_status); } && 
     5044         { ac_try='test -s conftest.$ac_objext' 
     5045  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     5046  (eval $ac_try) 2>&5 
     5047  ac_status=$? 
     5048  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5049  (exit $ac_status); }; }; then 
     5050  ac_cv_have_decl_rl_completion_display_matches_hook=yes 
     5051else 
     5052  echo "$as_me: failed program was:" >&5 
     5053sed 's/^/| /' conftest.$ac_ext >&5 
     5054 
     5055ac_cv_have_decl_rl_completion_display_matches_hook=no 
     5056fi 
     5057rm -f conftest.$ac_objext conftest.$ac_ext 
     5058fi 
     5059echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_completion_display_matches_hook" >&5 
     5060echo "${ECHO_T}$ac_cv_have_decl_rl_completion_display_matches_hook" >&6 
     5061if test $ac_cv_have_decl_rl_completion_display_matches_hook = yes; then 
     5062 
     5063cat >>confdefs.h <<_ACEOF 
     5064#define HAVE_DECL_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1 
     5065_ACEOF 
     5066 
     5067 
     5068else 
     5069  cat >>confdefs.h <<_ACEOF 
     5070#define HAVE_DECL_RL_COMPLETION_DISPLAY_MATCHES_HOOK 0 
     5071_ACEOF 
     5072 
     5073 
     5074fi 
     5075 
     5076 
    50085077 
    50095078else 
     
    56705739####################################################################### 
    56715740# Checks for typedefs, structures, and compiler characteristics 
    5672  
    5673 echo "$as_me:$LINENO: checking whether rl_completion_display_matches_hook is declared" >&5 
    5674 echo $ECHO_N "checking whether rl_completion_display_matches_hook is declared... $ECHO_C" >&6 
    5675 if test "${ac_cv_have_decl_rl_completion_display_matches_hook+set}" = set; then 
    5676   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5677 else 
    5678   cat >conftest.$ac_ext <<_ACEOF 
    5679 #line $LINENO "configure" 
    5680 /* confdefs.h.  */ 
    5681 _ACEOF 
    5682 cat confdefs.h >>conftest.$ac_ext 
    5683 cat >>conftest.$ac_ext <<_ACEOF 
    5684 /* end confdefs.h.  */ 
    5685  
    5686         #include <readline/readline.h> 
    5687  
    5688  
    5689 int 
    5690 main () 
    5691 { 
    5692 #ifndef rl_completion_display_matches_hook 
    5693   char *p = (char *) rl_completion_display_matches_hook; 
    5694 #endif 
    5695  
    5696   ; 
    5697   return 0; 
    5698 } 
    5699 _ACEOF 
    5700 rm -f conftest.$ac_objext 
    5701 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5702   (eval $ac_compile) 2>&5 
    5703   ac_status=$? 
    5704   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5705   (exit $ac_status); } && 
    5706          { ac_try='test -s conftest.$ac_objext' 
    5707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5708   (eval $ac_try) 2>&5 
    5709   ac_status=$? 
    5710   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5711   (exit $ac_status); }; }; then 
    5712   ac_cv_have_decl_rl_completion_display_matches_hook=yes 
    5713 else 
    5714   echo "$as_me: failed program was:" >&5 
    5715 sed 's/^/| /' conftest.$ac_ext >&5 
    5716  
    5717 ac_cv_have_decl_rl_completion_display_matches_hook=no 
    5718 fi 
    5719 rm -f conftest.$ac_objext conftest.$ac_ext 
    5720 fi 
    5721 echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_completion_display_matches_hook" >&5 
    5722 echo "${ECHO_T}$ac_cv_have_decl_rl_completion_display_matches_hook" >&6 
    5723 if test $ac_cv_have_decl_rl_completion_display_matches_hook = yes; then 
    5724  
    5725 cat >>confdefs.h <<_ACEOF 
    5726 #define HAVE_DECL_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1 
    5727 _ACEOF 
    5728  
    5729  
    5730 else 
    5731   cat >>confdefs.h <<_ACEOF 
    5732 #define HAVE_DECL_RL_COMPLETION_DISPLAY_MATCHES_HOOK 0 
    5733 _ACEOF 
    5734  
    5735  
    5736 fi 
    5737  
    5738  
    57395741 
    57405742# Check whether --enable-largefile or --disable-largefile was given. 
  • wire/trunk/configure.in

    r1707 r1720  
    205205                        #include <stdio.h> 
    206206                        #include <readline/readline.h> 
     207                        char * generator(const char *, int); 
    207208                        char * generator(const char *text, int state) { 
    208209                                return NULL; 
    209210                        } 
    210211                        int main(void) { 
    211                                 char **matches = rl_completion_matches("", generator); 
     212                                (void) rl_completion_matches("", generator); 
    212213 
    213214                                return 0; 
     
    219220                ], [ 
    220221                        AC_MSG_RESULT([no]) 
     222                ]) 
     223 
     224                AC_CHECK_DECLS([rl_completion_display_matches_hook], [], [], [ 
     225                        #include <stdio.h> 
     226                        #include <readline/readline.h> 
    221227                ]) 
    222228        ], [ 
     
    259265####################################################################### 
    260266# Checks for typedefs, structures, and compiler characteristics 
    261  
    262 AC_CHECK_DECLS([rl_completion_display_matches_hook], [], [], [ 
    263         #include <readline/readline.h> 
    264 ]) 
    265267 
    266268AC_SYS_LARGEFILE