Changeset be0a79f


Ignore:
Timestamp:
Jun 21, 2003, 1:54:20 PM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0c502e9
Parents:
5639bf2
Message:
Started work making owl build without zephyr.  Long way left to go though.
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • configure

    r884c272 rbe0a79f  
    13801380else
    13811381  echo "$ac_t""no" 1>&6
    1382 { echo "configure: error: No zephyr library found." 1>&2; exit 1; }
    13831382fi
    13841383
    13851384echo $ac_n "checking for ZInitLocationInfo in -lzephyr""... $ac_c" 1>&6
    1386 echo "configure:1387: checking for ZInitLocationInfo in -lzephyr" >&5
     1385echo "configure:1386: checking for ZInitLocationInfo in -lzephyr" >&5
    13871386ac_lib_var=`echo zephyr'_'ZInitLocationInfo | sed 'y%./+-%__p_%'`
    13881387if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    13921391LIBS="-lzephyr  $LIBS"
    13931392cat > conftest.$ac_ext <<EOF
    1394 #line 1395 "configure"
     1393#line 1394 "configure"
    13951394#include "confdefs.h"
    13961395/* Override any gcc2 internal prototype to avoid an error.  */
     
    14031402; return 0; }
    14041403EOF
    1405 if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1404if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    14061405  rm -rf conftest*
    14071406  eval "ac_cv_lib_$ac_lib_var=yes"
     
    14301429do
    14311430echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    1432 echo "configure:1433: checking for $ac_func" >&5
     1431echo "configure:1432: checking for $ac_func" >&5
    14331432if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    14341433  echo $ac_n "(cached) $ac_c" 1>&6
    14351434else
    14361435  cat > conftest.$ac_ext <<EOF
    1437 #line 1438 "configure"
     1436#line 1437 "configure"
    14381437#include "confdefs.h"
    14391438/* System header to define __stub macros and hopefully few prototypes,
     
    14581457; return 0; }
    14591458EOF
    1460 if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1459if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    14611460  rm -rf conftest*
    14621461  eval "ac_cv_func_$ac_func=yes"
     
    14841483
    14851484echo $ac_n "checking for des_ecb_encrypt prototype""... $ac_c" 1>&6
    1486 echo "configure:1487: checking for des_ecb_encrypt prototype" >&5
     1485echo "configure:1486: checking for des_ecb_encrypt prototype" >&5
    14871486cat > conftest.$ac_ext <<EOF
    1488 #line 1489 "configure"
     1487#line 1488 "configure"
    14891488#include "confdefs.h"
    14901489#include <des.h>
     
    14941493; return 0; }
    14951494EOF
    1496 if { (eval echo configure:1497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1495if { (eval echo configure:1496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    14971496  rm -rf conftest*
    14981497  ac_cv_des_ecb_encrypt_proto=no
     
    15141513
    15151514echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
    1516 echo "configure:1517: checking how to run the C preprocessor" >&5
     1515echo "configure:1516: checking how to run the C preprocessor" >&5
    15171516# On Suns, sometimes $CPP names a directory.
    15181517if test -n "$CPP" && test -d "$CPP"; then
     
    15291528  # not just through cpp.
    15301529  cat > conftest.$ac_ext <<EOF
    1531 #line 1532 "configure"
     1530#line 1531 "configure"
    15321531#include "confdefs.h"
    15331532#include <assert.h>
     
    15351534EOF
    15361535ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1537 { (eval echo configure:1538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1536{ (eval echo configure:1537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    15381537ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    15391538if test -z "$ac_err"; then
     
    15461545  CPP="${CC-cc} -E -traditional-cpp"
    15471546  cat > conftest.$ac_ext <<EOF
    1548 #line 1549 "configure"
     1547#line 1548 "configure"
    15491548#include "confdefs.h"
    15501549#include <assert.h>
     
    15521551EOF
    15531552ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1554 { (eval echo configure:1555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1553{ (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    15551554ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    15561555if test -z "$ac_err"; then
     
    15631562  CPP="${CC-cc} -nologo -E"
    15641563  cat > conftest.$ac_ext <<EOF
    1565 #line 1566 "configure"
     1564#line 1565 "configure"
    15661565#include "confdefs.h"
    15671566#include <assert.h>
     
    15691568EOF
    15701569ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1571 { (eval echo configure:1572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1570{ (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    15721571ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    15731572if test -z "$ac_err"; then
     
    15941593
    15951594echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    1596 echo "configure:1597: checking for ANSI C header files" >&5
     1595echo "configure:1596: checking for ANSI C header files" >&5
    15971596if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    15981597  echo $ac_n "(cached) $ac_c" 1>&6
    15991598else
    16001599  cat > conftest.$ac_ext <<EOF
    1601 #line 1602 "configure"
     1600#line 1601 "configure"
    16021601#include "confdefs.h"
    16031602#include <stdlib.h>
     
    16071606EOF
    16081607ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1609 { (eval echo configure:1610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1608{ (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    16101609ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    16111610if test -z "$ac_err"; then
     
    16241623  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    16251624cat > conftest.$ac_ext <<EOF
    1626 #line 1627 "configure"
     1625#line 1626 "configure"
    16271626#include "confdefs.h"
    16281627#include <string.h>
     
    16421641  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    16431642cat > conftest.$ac_ext <<EOF
    1644 #line 1645 "configure"
     1643#line 1644 "configure"
    16451644#include "confdefs.h"
    16461645#include <stdlib.h>
     
    16631662else
    16641663  cat > conftest.$ac_ext <<EOF
    1665 #line 1666 "configure"
     1664#line 1665 "configure"
    16661665#include "confdefs.h"
    16671666#include <ctype.h>
     
    16741673
    16751674EOF
    1676 if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     1675if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    16771676then
    16781677  :
     
    16981697
    16991698echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
    1700 echo "configure:1701: checking for sys/wait.h that is POSIX.1 compatible" >&5
     1699echo "configure:1700: checking for sys/wait.h that is POSIX.1 compatible" >&5
    17011700if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
    17021701  echo $ac_n "(cached) $ac_c" 1>&6
    17031702else
    17041703  cat > conftest.$ac_ext <<EOF
    1705 #line 1706 "configure"
     1704#line 1705 "configure"
    17061705#include "confdefs.h"
    17071706#include <sys/types.h>
     
    17191718; return 0; }
    17201719EOF
    1721 if { (eval echo configure:1722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1720if { (eval echo configure:1721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    17221721  rm -rf conftest*
    17231722  ac_cv_header_sys_wait_h=yes
     
    17431742ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    17441743echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1745 echo "configure:1746: checking for $ac_hdr" >&5
     1744echo "configure:1745: checking for $ac_hdr" >&5
    17461745if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    17471746  echo $ac_n "(cached) $ac_c" 1>&6
    17481747else
    17491748  cat > conftest.$ac_ext <<EOF
    1750 #line 1751 "configure"
     1749#line 1750 "configure"
    17511750#include "confdefs.h"
    17521751#include <$ac_hdr>
    17531752EOF
    17541753ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1755 { (eval echo configure:1756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1754{ (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    17561755ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    17571756if test -z "$ac_err"; then
     
    17851784
    17861785echo $ac_n "checking for the perl xsubpp precompiler""... $ac_c" 1>&6
    1787 echo "configure:1788: checking for the perl xsubpp precompiler" >&5
     1786echo "configure:1787: checking for the perl xsubpp precompiler" >&5
    17881787XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
    17891788if test -n "${XSUBPPDIR}"; then
     
    18001799ac_safe=`echo "/usr/share/terminfo" | sed 'y%./+-%__p_%'`
    18011800echo $ac_n "checking for /usr/share/terminfo""... $ac_c" 1>&6
    1802 echo "configure:1803: checking for /usr/share/terminfo" >&5
     1801echo "configure:1802: checking for /usr/share/terminfo" >&5
    18031802if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
    18041803  echo $ac_n "(cached) $ac_c" 1>&6
     
    18251824ac_safe=`echo "/usr/share/lib/terminfo" | sed 'y%./+-%__p_%'`
    18261825echo $ac_n "checking for /usr/share/lib/terminfo""... $ac_c" 1>&6
    1827 echo "configure:1828: checking for /usr/share/lib/terminfo" >&5
     1826echo "configure:1827: checking for /usr/share/lib/terminfo" >&5
    18281827if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
    18291828  echo $ac_n "(cached) $ac_c" 1>&6
     
    18861885# ./install, which can be erroneously created by make from ./install.sh.
    18871886echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    1888 echo "configure:1889: checking for a BSD compatible install" >&5
     1887echo "configure:1888: checking for a BSD compatible install" >&5
    18891888if test -z "$INSTALL"; then
    18901889if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  • configure.in

    r884c272 rbe0a79f  
    4141AC_CHECK_LIB(krb4, krb_sendauth,,
    4242   AC_CHECK_LIB(krb, krb_sendauth))
    43 AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
     43dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
     44AC_CHECK_LIB(zephyr, ZGetSender)
    4445AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
    4546
  • message.c

    rf14a7ee rbe0a79f  
    425425}
    426426
     427#ifdef HAVE_LIBZEPHYR
    427428ZNotice_t *owl_message_get_notice(owl_message *m)
    428429{
    429430  return(&(m->notice));
    430431}
     432#endif
    431433
    432434char *owl_message_get_hostname(owl_message *m)
  • owl.c

    rc3ab155 rbe0a79f  
    4141  struct tm *today;
    4242  char *dir;
     43  ZNotice_t notice;
    4344
    4445  argcsave=argc;
     
    8990  }
    9091
     92#ifdef HAVE_LIBZEPHYR
    9193  /* zephyr init */
    92   if ((ret = ZInitialize()) != ZERR_NONE) {
    93     com_err("owl",ret,"while initializing");
     94  ret=owl_zephyr_initialize();
     95  if (ret) {
    9496    exit(1);
    9597  }
    96   if ((ret = ZOpenPort(NULL)) != ZERR_NONE) {
    97     com_err("owl",ret,"while opening port");
    98     exit(1);
    99   }
    100 
     98#endif
     99 
    101100  /* signal handler */
    102101  sigact.sa_handler=sig_handler;
     
    336335    newmsgs=0;
    337336    zpendcount=0;
    338     while(ZPending() || owl_global_messagequeue_pending(&g)) {
    339       ZNotice_t notice;
     337    while(owl_zephyr_zpending() || owl_global_messagequeue_pending(&g)) {
    340338      struct sockaddr_in from;
    341339      owl_message *m;
     
    343341     
    344342      /* grab the new message, stick it in 'm' */
    345       if (ZPending()) {
     343      if (owl_zephyr_zpending()) {
    346344        /* grab a zephyr notice, but if we've done 20 without stopping,
    347345           take a break to process keystrokes etc. */
  • owl.h

    rc3ab155 rbe0a79f  
    22#define INC_OWL_H
    33
    4 #include <zephyr/zephyr.h>
    54#include <curses.h>
    65#include <sys/param.h>
     
    1110#include <libfaim/aim.h>
    1211#include "config.h"
     12#ifdef HAVE_LIBZEPHYR
     13#include <zephyr/zephyr.h>
     14#endif
     15
    1316
    1417static const char owl_h_fileIdent[] = "$Id$";
     
    247250  int type;
    248251  int direction;
     252#ifdef HAVE_LIBZEPHYR
    249253  ZNotice_t notice;
     254#endif
    250255  owl_fmtext fmtext;              /* this is now only a CACHED copy */
    251256  int invalid_format;             /* indicates whether fmtext needs to be regenerated */
     
    441446
    442447/* these are missing from the zephyr includes for some reason */
     448#ifdef HAVE_LIBZEPHYR
    443449int ZGetSubscriptions(ZSubscription_t *, int *);
    444450int ZGetLocations(ZLocations_t *,int *);
     451#endif
    445452
    446453#endif /* INC_OWL_H */
  • zephyr.c

    r65ad073 rbe0a79f  
    1212Code_t ZResetAuthentication();
    1313
     14int owl_zephyr_initialize()
     15{
     16  int ret;
     17 
     18  if ((ret = ZInitialize()) != ZERR_NONE) {
     19    com_err("owl",ret,"while initializing");
     20    return(1);
     21  }
     22  if ((ret = ZOpenPort(NULL)) != ZERR_NONE) {
     23    com_err("owl",ret,"while opening port");
     24    return(1);
     25  }
     26  return(0);
     27}
     28
     29int owl_zephyr_zpending()
     30{
     31#ifdef HAVE_LIBZEPHYR
     32  return(ZPending());
     33#else
     34  return(0);
     35#endif
     36}
     37
    1438int owl_zephyr_loadsubs(char *filename)
    1539{
     40#ifdef HAVE_LIBZEPHYR
    1641  /* return 0  on success
    1742   *        -1 on file error
     
    83108
    84109  return(ret);
     110#else
     111  return(0);
     112#endif
    85113}
    86114
    87115int owl_zephyr_loadloginsubs(char *filename)
    88116{
     117#ifdef HAVE_LIBZEPHYR
    89118  FILE *file;
    90119  ZSubscription_t subs[3001];
     
    139168
    140169  return(ret);
     170#else
     171  return(0);
     172#endif
    141173}
    142174
    143175void unsuball()
    144176{
     177#if HAVE_LIBZEPHYR
    145178  int ret;
    146179
     
    150183    com_err("owl",ret,"while unsubscribing");
    151184  }
     185#endif
    152186}
    153187
    154188int owl_zephyr_sub(char *class, char *inst, char *recip)
    155189{
     190#ifdef HAVE_LIBZEPHYR
    156191  ZSubscription_t subs[5];
    157192  int ret;
     
    167202  }
    168203  return(0);
     204#else
     205  return(0);
     206#endif
    169207}
    170208
     
    172210int owl_zephyr_unsub(char *class, char *inst, char *recip)
    173211{
     212#ifdef HAVE_LIBZEPHYR
    174213  ZSubscription_t subs[5];
    175214  int ret;
     
    185224  }
    186225  return(0);
    187 }
    188 
    189 
     226#else
     227  return(0);
     228#endif
     229}
     230
     231#ifdef HAVE_LIBZEPHYR
    190232char *owl_zephyr_get_field(ZNotice_t *n, int j, int *k)
    191233{
     
    216258  return("");
    217259}
    218 
    219 
     260#endif
     261
     262#ifdef HAVE_LIBZEPHYR
    220263int owl_zephyr_get_num_fields(ZNotice_t *n)
    221264{
     
    229272  return(fields);
    230273}
    231 
    232 
     274#endif
     275
     276#ifdef HAVE_LIBZEPHYR
    233277char *owl_zephyr_get_message(ZNotice_t *n, int *k)
    234278{
     
    241285  return(owl_zephyr_get_field(n, 2, k));
    242286}
    243 
    244 
     287#endif
     288
     289#ifdef HAVE_LIBZEPHYR
    245290char *owl_zephyr_get_zsig(ZNotice_t *n, int *k)
    246291{
     
    254299  return(n->z_message);
    255300}
    256 
     301#endif
    257302
    258303int send_zephyr(char *opcode, char *zsig, char *class, char *instance, char *recipient, char *message)
    259304{
     305#ifdef HAVE_LIBZEPHYR
    260306  int ret;
    261307  ZNotice_t notice;
     
    293339    return(ret);
    294340  }
    295 
    296   return(0);
    297 }
    298 
     341  return(0);
     342#else
     343  return(0);
     344#endif
     345}
     346
     347#ifdef HAVE_LIBZEPHYR
    299348Code_t send_zephyr_helper(ZNotice_t *notice, char *buf, int len, int wait)
    300349{
    301350  return(ZSendPacket(buf, len, 0));
    302351}
     352#endif
    303353
    304354void send_ping(char *to)
    305355{
     356#ifdef HAVE_LIBZEPHYR
    306357  send_zephyr("PING", "", "MESSAGE", "PERSONAL", to, "");
    307 }
    308 
     358#endif
     359}
     360
     361#ifdef HAVE_LIBZEPHYR
    309362void owl_zephyr_handle_ack(ZNotice_t *retnotice)
    310363{
     
    343396  }
    344397}
    345 
     398#endif
     399
     400#ifdef HAVE_LIBZEPHYR
    346401int owl_zephyr_notice_is_ack(ZNotice_t *n)
    347402{
     
    352407  return(0);
    353408}
     409#endif
    354410 
    355411void owl_zephyr_zaway(owl_message *m)
    356412{
     413#ifdef HAVE_LIBZEPHYR
    357414  char *tmpbuff, *myuser, *to;
    358415 
     
    392449  owl_function_make_outgoing_zephyr(owl_global_get_zaway_msg(&g), tmpbuff, "Automated reply:");
    393450  owl_free(tmpbuff);
    394 }
    395 
    396 
     451#endif
     452}
     453
     454#ifdef HAVE_LIBZEPHYR
    397455void owl_zephyr_hackaway_cr(ZNotice_t *n)
    398456{
     
    406464  }
    407465}
     466#endif
    408467
    409468void owl_zephyr_zlocate(char *user, char *out, int auth)
    410469{
     470#ifdef HAVE_LIBZEPHYR
    411471  int ret, numlocs;
    412472  int one = 1;
     
    434494    owl_free(myuser);
    435495  }
     496#endif
    436497}
    437498
    438499void owl_zephyr_addsub(char *filename, char *class, char *inst, char *recip)
    439500{
     501#ifdef HAVE_LIBZEPHYR
    440502  char *line, subsfile[LINE], buff[LINE];
    441503  FILE *file;
     
    477539 
    478540  owl_free(line);
     541#endif
    479542}
    480543
    481544void owl_zephyr_delsub(char *filename, char *class, char *inst, char *recip)
    482545{
     546#ifdef HAVE_LIBZEPHYR
    483547  char *line, subsfile[LINE], buff[LINE], *text;
    484548  char backupfilename[LINE];
     
    544608
    545609  owl_function_makemsg("Subscription removed");
     610#endif
    546611}
    547612
     
    559624void owl_zephyr_zlog_in(void)
    560625{
     626#ifdef HAVE_LIBZEPHYR
    561627  char *exposure, *eset;
    562628  int ret;
     
    590656    */
    591657  }
     658#endif
    592659}
    593660
    594661void owl_zephyr_zlog_out(void)
    595662{
     663#ifdef HAVE_LIBZEPHYR
    596664  int ret;
    597665
     
    605673    */
    606674  }
     675#endif
    607676}
    608677
Note: See TracChangeset for help on using the changeset viewer.