Changeset 1696

Show
Ignore:
Timestamp:
02/09/05 20:01:38 (4 years ago)
Author:
morris
Message:

Support building on Solaris

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wire/trunk/config.h.in

    r1665 r1696  
    44#undef HAVE_CORESERVICES_CORESERVICES_H 
    55 
    6 /* Define to 1 if you have the declaration of `optreset', and to 0 if you 
    7    don't. */ 
    8 #undef HAVE_DECL_OPTRESET 
     6/* Define to 1 if you have the declaration of 
     7   `rl_completion_display_matches_hook', and to 0 if you don't. */ 
     8#undef HAVE_DECL_RL_COMPLETION_DISPLAY_MATCHES_HOOK 
    99 
    1010/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 
  • wire/trunk/configure

    r1680 r1696  
    32723272 
    32733273 
    3274 # Check for the OpenSSL crypto library 
     3274# Check for the OpenSSL ssl library 
    32753275echo "$as_me:$LINENO: checking for egrep" >&5 
    32763276echo $ECHO_N "checking for egrep... $ECHO_C" >&6 
     
    35123512 
    35133513 
    3514 for ac_header in openssl/sha.h 
     3514for ac_header in openssl/ssl.h 
    35153515do 
    35163516as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 
     
    36493649_ACEOF 
    36503650 
    3651         echo "$as_me:$LINENO: checking for main in -lcrypto" >&5 
    3652 echo $ECHO_N "checking for main in -lcrypto... $ECHO_C" >&6 
    3653 if test "${ac_cv_lib_crypto_main+set}" = set; then 
     3651        echo "$as_me:$LINENO: checking for main in -lssl" >&5 
     3652echo $ECHO_N "checking for main in -lssl... $ECHO_C" >&6 
     3653if test "${ac_cv_lib_ssl_main+set}" = set; then 
    36543654  echo $ECHO_N "(cached) $ECHO_C" >&6 
    36553655else 
    36563656  ac_check_lib_save_LIBS=$LIBS 
    3657 LIBS="-lcrypto  $LIBS" 
     3657LIBS="-lssl  $LIBS" 
    36583658cat >conftest.$ac_ext <<_ACEOF 
    36593659#line $LINENO "configure" 
     
    36853685  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    36863686  (exit $ac_status); }; }; then 
    3687   ac_cv_lib_crypto_main=yes 
     3687  ac_cv_lib_ssl_main=yes 
    36883688else 
    36893689  echo "$as_me: failed program was:" >&5 
    36903690sed 's/^/| /' conftest.$ac_ext >&5 
    36913691 
    3692 ac_cv_lib_crypto_main=no 
     3692ac_cv_lib_ssl_main=no 
    36933693fi 
    36943694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    36953695LIBS=$ac_check_lib_save_LIBS 
    36963696fi 
    3697 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_main" >&5 
    3698 echo "${ECHO_T}$ac_cv_lib_crypto_main" >&6 
    3699 if test $ac_cv_lib_crypto_main = yes; then 
    3700  
    3701                 LIBS="$LIBS -lcrypto
     3697echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_main" >&5 
     3698echo "${ECHO_T}$ac_cv_lib_ssl_main" >&6 
     3699if test $ac_cv_lib_ssl_main = yes; then 
     3700 
     3701                LIBS="$LIBS -lssl
    37023702 
    37033703else 
     
    37423742 
    37433743 
    3744 # Check for the OpenSSL ssl library 
    3745  
    3746 for ac_header in openssl/ssl.h 
     3744# Check for the OpenSSL crypto library 
     3745 
     3746for ac_header in openssl/sha.h 
    37473747do 
    37483748as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 
     
    38813881_ACEOF 
    38823882 
    3883         echo "$as_me:$LINENO: checking for main in -lssl" >&5 
    3884 echo $ECHO_N "checking for main in -lssl... $ECHO_C" >&6 
    3885 if test "${ac_cv_lib_ssl_main+set}" = set; then 
     3883        echo "$as_me:$LINENO: checking for main in -lcrypto" >&5 
     3884echo $ECHO_N "checking for main in -lcrypto... $ECHO_C" >&6 
     3885if test "${ac_cv_lib_crypto_main+set}" = set; then 
    38863886  echo $ECHO_N "(cached) $ECHO_C" >&6 
    38873887else 
    38883888  ac_check_lib_save_LIBS=$LIBS 
    3889 LIBS="-lssl  $LIBS" 
     3889LIBS="-lcrypto  $LIBS" 
    38903890cat >conftest.$ac_ext <<_ACEOF 
    38913891#line $LINENO "configure" 
     
    39173917  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    39183918  (exit $ac_status); }; }; then 
    3919   ac_cv_lib_ssl_main=yes 
     3919  ac_cv_lib_crypto_main=yes 
    39203920else 
    39213921  echo "$as_me: failed program was:" >&5 
    39223922sed 's/^/| /' conftest.$ac_ext >&5 
    39233923 
    3924 ac_cv_lib_ssl_main=no 
     3924ac_cv_lib_crypto_main=no 
    39253925fi 
    39263926rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    39273927LIBS=$ac_check_lib_save_LIBS 
    39283928fi 
    3929 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_main" >&5 
    3930 echo "${ECHO_T}$ac_cv_lib_ssl_main" >&6 
    3931 if test $ac_cv_lib_ssl_main = yes; then 
    3932  
    3933                 LIBS="$LIBS -lssl
     3929echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_main" >&5 
     3930echo "${ECHO_T}$ac_cv_lib_crypto_main" >&6 
     3931if test $ac_cv_lib_crypto_main = yes; then 
     3932 
     3933                LIBS="$LIBS -lcrypto
    39343934 
    39353935else 
     
    56715671# Checks for typedefs, structures, and compiler characteristics 
    56725672 
    5673 echo "$as_me:$LINENO: checking whether optreset is declared" >&5 
    5674 echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6 
    5675 if test "${ac_cv_have_decl_optreset+set}" = set; then 
     5673echo "$as_me:$LINENO: checking whether rl_completion_display_matches_hook is declared" >&5 
     5674echo $ECHO_N "checking whether rl_completion_display_matches_hook is declared... $ECHO_C" >&6 
     5675if test "${ac_cv_have_decl_rl_completion_display_matches_hook+set}" = set; then 
    56765676  echo $ECHO_N "(cached) $ECHO_C" >&6 
    56775677else 
     
    56835683cat >>conftest.$ac_ext <<_ACEOF 
    56845684/* end confdefs.h.  */ 
    5685 $ac_includes_default 
     5685 
     5686        #include <readline/readline.h> 
     5687 
     5688 
    56865689int 
    56875690main () 
    56885691{ 
    5689 #ifndef optreset 
    5690   char *p = (char *) optreset
     5692#ifndef rl_completion_display_matches_hook 
     5693  char *p = (char *) rl_completion_display_matches_hook
    56915694#endif 
    56925695 
     
    57075710  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    57085711  (exit $ac_status); }; }; then 
    5709   ac_cv_have_decl_optreset=yes 
     5712  ac_cv_have_decl_rl_completion_display_matches_hook=yes 
    57105713else 
    57115714  echo "$as_me: failed program was:" >&5 
    57125715sed 's/^/| /' conftest.$ac_ext >&5 
    57135716 
    5714 ac_cv_have_decl_optreset=no 
     5717ac_cv_have_decl_rl_completion_display_matches_hook=no 
    57155718fi 
    57165719rm -f conftest.$ac_objext conftest.$ac_ext 
    57175720fi 
    5718 echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5 
    5719 echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6 
    5720 if test $ac_cv_have_decl_optreset = yes; then 
     5721echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_completion_display_matches_hook" >&5 
     5722echo "${ECHO_T}$ac_cv_have_decl_rl_completion_display_matches_hook" >&6 
     5723if test $ac_cv_have_decl_rl_completion_display_matches_hook = yes; then 
    57215724 
    57225725cat >>confdefs.h <<_ACEOF 
    5723 #define HAVE_DECL_OPTRESET
     5726#define HAVE_DECL_RL_COMPLETION_DISPLAY_MATCHES_HOOK
    57245727_ACEOF 
    57255728 
     
    57275730else 
    57285731  cat >>confdefs.h <<_ACEOF 
    5729 #define HAVE_DECL_OPTRESET 0 
    5730 _ACEOF 
    5731  
    5732  
    5733 fi 
     5732#define HAVE_DECL_RL_COMPLETION_DISPLAY_MATCHES_HOOK 0 
     5733_ACEOF 
     5734 
     5735 
     5736fi 
     5737 
    57345738 
    57355739 
  • wire/trunk/configure.in

    r1680 r1696  
    125125 
    126126 
     127# Check for the OpenSSL ssl library 
     128AC_CHECK_HEADERS([openssl/ssl.h], [ 
     129        AC_CHECK_LIB([ssl], [main], [ 
     130                LIBS="$LIBS -lssl" 
     131        ], [ 
     132                WR_MSG_LIB_ERROR([OpenSSL]) 
     133        ]) 
     134], [ 
     135        WR_MSG_LIB_ERROR([OpenSSL]) 
     136]) 
     137 
     138 
    127139# Check for the OpenSSL crypto library 
    128140AC_CHECK_HEADERS([openssl/sha.h], [ 
    129141        AC_CHECK_LIB([crypto], [main], [ 
    130142                LIBS="$LIBS -lcrypto" 
    131         ], [ 
    132                 WR_MSG_LIB_ERROR([OpenSSL]) 
    133         ]) 
    134 ], [ 
    135         WR_MSG_LIB_ERROR([OpenSSL]) 
    136 ]) 
    137  
    138  
    139 # Check for the OpenSSL ssl library 
    140 AC_CHECK_HEADERS([openssl/ssl.h], [ 
    141         AC_CHECK_LIB([ssl], [main], [ 
    142                 LIBS="$LIBS -lssl" 
    143143        ], [ 
    144144                WR_MSG_LIB_ERROR([OpenSSL]) 
     
    260260# Checks for typedefs, structures, and compiler characteristics 
    261261 
    262 AC_CHECK_DECLS([optreset]) 
     262AC_CHECK_DECLS([rl_completion_display_matches_hook], [], [], [ 
     263        #include <readline/readline.h> 
     264]) 
     265 
    263266AC_SYS_LARGEFILE 
    264267 
  • wire/trunk/wire/term.c

    r1675 r1696  
    3838#include <errno.h> 
    3939 
     40#ifdef HAVE_TERM_H 
     41#include <term.h> 
     42#endif 
     43 
    4044#ifdef HAVE_TERMCAP_H 
    4145#include <termcap.h> 
     
    426430 
    427431        rl_attempted_completion_function = wr_rl_completion_function; 
     432#if HAVE_DECL_RL_COMPLETION_DISPLAY_MATCHES_HOOK 
    428433        rl_completion_display_matches_hook = wr_rl_completion_display_matches; 
     434#endif 
    429435        rl_filename_quoting_function = wr_rl_filename_quoting_function; 
    430436        rl_filename_dequoting_function = wr_rl_filename_dequoting_function;