Changeset be0a79f
- Timestamp:
- Jun 21, 2003, 1:54:20 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 0c502e9
- Parents:
- 5639bf2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r884c272 rbe0a79f 1380 1380 else 1381 1381 echo "$ac_t""no" 1>&6 1382 { echo "configure: error: No zephyr library found." 1>&2; exit 1; }1383 1382 fi 1384 1383 1385 1384 echo $ac_n "checking for ZInitLocationInfo in -lzephyr""... $ac_c" 1>&6 1386 echo "configure:138 7: checking for ZInitLocationInfo in -lzephyr" >&51385 echo "configure:1386: checking for ZInitLocationInfo in -lzephyr" >&5 1387 1386 ac_lib_var=`echo zephyr'_'ZInitLocationInfo | sed 'y%./+-%__p_%'` 1388 1387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1392 1391 LIBS="-lzephyr $LIBS" 1393 1392 cat > conftest.$ac_ext <<EOF 1394 #line 139 5"configure"1393 #line 1394 "configure" 1395 1394 #include "confdefs.h" 1396 1395 /* Override any gcc2 internal prototype to avoid an error. */ … … 1403 1402 ; return 0; } 1404 1403 EOF 1405 if { (eval echo configure:140 6: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1404 if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1406 1405 rm -rf conftest* 1407 1406 eval "ac_cv_lib_$ac_lib_var=yes" … … 1430 1429 do 1431 1430 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1432 echo "configure:143 3: checking for $ac_func" >&51431 echo "configure:1432: checking for $ac_func" >&5 1433 1432 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1434 1433 echo $ac_n "(cached) $ac_c" 1>&6 1435 1434 else 1436 1435 cat > conftest.$ac_ext <<EOF 1437 #line 143 8"configure"1436 #line 1437 "configure" 1438 1437 #include "confdefs.h" 1439 1438 /* System header to define __stub macros and hopefully few prototypes, … … 1458 1457 ; return 0; } 1459 1458 EOF 1460 if { (eval echo configure:146 1: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1459 if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1461 1460 rm -rf conftest* 1462 1461 eval "ac_cv_func_$ac_func=yes" … … 1484 1483 1485 1484 echo $ac_n "checking for des_ecb_encrypt prototype""... $ac_c" 1>&6 1486 echo "configure:148 7: checking for des_ecb_encrypt prototype" >&51485 echo "configure:1486: checking for des_ecb_encrypt prototype" >&5 1487 1486 cat > conftest.$ac_ext <<EOF 1488 #line 148 9"configure"1487 #line 1488 "configure" 1489 1488 #include "confdefs.h" 1490 1489 #include <des.h> … … 1494 1493 ; return 0; } 1495 1494 EOF 1496 if { (eval echo configure:149 7: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1495 if { (eval echo configure:1496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1497 1496 rm -rf conftest* 1498 1497 ac_cv_des_ecb_encrypt_proto=no … … 1514 1513 1515 1514 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 1516 echo "configure:151 7: checking how to run the C preprocessor" >&51515 echo "configure:1516: checking how to run the C preprocessor" >&5 1517 1516 # On Suns, sometimes $CPP names a directory. 1518 1517 if test -n "$CPP" && test -d "$CPP"; then … … 1529 1528 # not just through cpp. 1530 1529 cat > conftest.$ac_ext <<EOF 1531 #line 153 2"configure"1530 #line 1531 "configure" 1532 1531 #include "confdefs.h" 1533 1532 #include <assert.h> … … 1535 1534 EOF 1536 1535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1537 { (eval echo configure:153 8: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1536 { (eval echo configure:1537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1538 1537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1539 1538 if test -z "$ac_err"; then … … 1546 1545 CPP="${CC-cc} -E -traditional-cpp" 1547 1546 cat > conftest.$ac_ext <<EOF 1548 #line 154 9"configure"1547 #line 1548 "configure" 1549 1548 #include "confdefs.h" 1550 1549 #include <assert.h> … … 1552 1551 EOF 1553 1552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1554 { (eval echo configure:155 5: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1553 { (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1555 1554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1556 1555 if test -z "$ac_err"; then … … 1563 1562 CPP="${CC-cc} -nologo -E" 1564 1563 cat > conftest.$ac_ext <<EOF 1565 #line 156 6"configure"1564 #line 1565 "configure" 1566 1565 #include "confdefs.h" 1567 1566 #include <assert.h> … … 1569 1568 EOF 1570 1569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1571 { (eval echo configure:157 2: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1570 { (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1572 1571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1573 1572 if test -z "$ac_err"; then … … 1594 1593 1595 1594 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 1596 echo "configure:159 7: checking for ANSI C header files" >&51595 echo "configure:1596: checking for ANSI C header files" >&5 1597 1596 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 1598 1597 echo $ac_n "(cached) $ac_c" 1>&6 1599 1598 else 1600 1599 cat > conftest.$ac_ext <<EOF 1601 #line 160 2"configure"1600 #line 1601 "configure" 1602 1601 #include "confdefs.h" 1603 1602 #include <stdlib.h> … … 1607 1606 EOF 1608 1607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1609 { (eval echo configure:16 10: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1608 { (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1610 1609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1611 1610 if test -z "$ac_err"; then … … 1624 1623 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 1625 1624 cat > conftest.$ac_ext <<EOF 1626 #line 162 7"configure"1625 #line 1626 "configure" 1627 1626 #include "confdefs.h" 1628 1627 #include <string.h> … … 1642 1641 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 1643 1642 cat > conftest.$ac_ext <<EOF 1644 #line 164 5"configure"1643 #line 1644 "configure" 1645 1644 #include "confdefs.h" 1646 1645 #include <stdlib.h> … … 1663 1662 else 1664 1663 cat > conftest.$ac_ext <<EOF 1665 #line 166 6"configure"1664 #line 1665 "configure" 1666 1665 #include "confdefs.h" 1667 1666 #include <ctype.h> … … 1674 1673 1675 1674 EOF 1676 if { (eval echo configure:167 7: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1675 if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1677 1676 then 1678 1677 : … … 1698 1697 1699 1698 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 1700 echo "configure:170 1: checking for sys/wait.h that is POSIX.1 compatible" >&51699 echo "configure:1700: checking for sys/wait.h that is POSIX.1 compatible" >&5 1701 1700 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then 1702 1701 echo $ac_n "(cached) $ac_c" 1>&6 1703 1702 else 1704 1703 cat > conftest.$ac_ext <<EOF 1705 #line 170 6"configure"1704 #line 1705 "configure" 1706 1705 #include "confdefs.h" 1707 1706 #include <sys/types.h> … … 1719 1718 ; return 0; } 1720 1719 EOF 1721 if { (eval echo configure:172 2: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1720 if { (eval echo configure:1721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1722 1721 rm -rf conftest* 1723 1722 ac_cv_header_sys_wait_h=yes … … 1743 1742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1744 1743 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1745 echo "configure:174 6: checking for $ac_hdr" >&51744 echo "configure:1745: checking for $ac_hdr" >&5 1746 1745 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1747 1746 echo $ac_n "(cached) $ac_c" 1>&6 1748 1747 else 1749 1748 cat > conftest.$ac_ext <<EOF 1750 #line 175 1"configure"1749 #line 1750 "configure" 1751 1750 #include "confdefs.h" 1752 1751 #include <$ac_hdr> 1753 1752 EOF 1754 1753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1755 { (eval echo configure:175 6: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1754 { (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1756 1755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1757 1756 if test -z "$ac_err"; then … … 1785 1784 1786 1785 echo $ac_n "checking for the perl xsubpp precompiler""... $ac_c" 1>&6 1787 echo "configure:178 8: checking for the perl xsubpp precompiler" >&51786 echo "configure:1787: checking for the perl xsubpp precompiler" >&5 1788 1787 XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`" 1789 1788 if test -n "${XSUBPPDIR}"; then … … 1800 1799 ac_safe=`echo "/usr/share/terminfo" | sed 'y%./+-%__p_%'` 1801 1800 echo $ac_n "checking for /usr/share/terminfo""... $ac_c" 1>&6 1802 echo "configure:180 3: checking for /usr/share/terminfo" >&51801 echo "configure:1802: checking for /usr/share/terminfo" >&5 1803 1802 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then 1804 1803 echo $ac_n "(cached) $ac_c" 1>&6 … … 1825 1824 ac_safe=`echo "/usr/share/lib/terminfo" | sed 'y%./+-%__p_%'` 1826 1825 echo $ac_n "checking for /usr/share/lib/terminfo""... $ac_c" 1>&6 1827 echo "configure:182 8: checking for /usr/share/lib/terminfo" >&51826 echo "configure:1827: checking for /usr/share/lib/terminfo" >&5 1828 1827 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then 1829 1828 echo $ac_n "(cached) $ac_c" 1>&6 … … 1886 1885 # ./install, which can be erroneously created by make from ./install.sh. 1887 1886 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 1888 echo "configure:188 9: checking for a BSD compatible install" >&51887 echo "configure:1888: checking for a BSD compatible install" >&5 1889 1888 if test -z "$INSTALL"; then 1890 1889 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then -
configure.in
r884c272 rbe0a79f 41 41 AC_CHECK_LIB(krb4, krb_sendauth,, 42 42 AC_CHECK_LIB(krb, krb_sendauth)) 43 AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) 43 dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) 44 AC_CHECK_LIB(zephyr, ZGetSender) 44 45 AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),) 45 46 -
message.c
rf14a7ee rbe0a79f 425 425 } 426 426 427 #ifdef HAVE_LIBZEPHYR 427 428 ZNotice_t *owl_message_get_notice(owl_message *m) 428 429 { 429 430 return(&(m->notice)); 430 431 } 432 #endif 431 433 432 434 char *owl_message_get_hostname(owl_message *m) -
owl.c
rc3ab155 rbe0a79f 41 41 struct tm *today; 42 42 char *dir; 43 ZNotice_t notice; 43 44 44 45 argcsave=argc; … … 89 90 } 90 91 92 #ifdef HAVE_LIBZEPHYR 91 93 /* zephyr init */ 92 if ((ret = ZInitialize()) != ZERR_NONE) {93 com_err("owl",ret,"while initializing");94 ret=owl_zephyr_initialize(); 95 if (ret) { 94 96 exit(1); 95 97 } 96 if ((ret = ZOpenPort(NULL)) != ZERR_NONE) { 97 com_err("owl",ret,"while opening port"); 98 exit(1); 99 } 100 98 #endif 99 101 100 /* signal handler */ 102 101 sigact.sa_handler=sig_handler; … … 336 335 newmsgs=0; 337 336 zpendcount=0; 338 while(ZPending() || owl_global_messagequeue_pending(&g)) { 339 ZNotice_t notice; 337 while(owl_zephyr_zpending() || owl_global_messagequeue_pending(&g)) { 340 338 struct sockaddr_in from; 341 339 owl_message *m; … … 343 341 344 342 /* grab the new message, stick it in 'm' */ 345 if ( ZPending()) {343 if (owl_zephyr_zpending()) { 346 344 /* grab a zephyr notice, but if we've done 20 without stopping, 347 345 take a break to process keystrokes etc. */ -
owl.h
rc3ab155 rbe0a79f 2 2 #define INC_OWL_H 3 3 4 #include <zephyr/zephyr.h>5 4 #include <curses.h> 6 5 #include <sys/param.h> … … 11 10 #include <libfaim/aim.h> 12 11 #include "config.h" 12 #ifdef HAVE_LIBZEPHYR 13 #include <zephyr/zephyr.h> 14 #endif 15 13 16 14 17 static const char owl_h_fileIdent[] = "$Id$"; … … 247 250 int type; 248 251 int direction; 252 #ifdef HAVE_LIBZEPHYR 249 253 ZNotice_t notice; 254 #endif 250 255 owl_fmtext fmtext; /* this is now only a CACHED copy */ 251 256 int invalid_format; /* indicates whether fmtext needs to be regenerated */ … … 441 446 442 447 /* these are missing from the zephyr includes for some reason */ 448 #ifdef HAVE_LIBZEPHYR 443 449 int ZGetSubscriptions(ZSubscription_t *, int *); 444 450 int ZGetLocations(ZLocations_t *,int *); 451 #endif 445 452 446 453 #endif /* INC_OWL_H */ -
zephyr.c
r65ad073 rbe0a79f 12 12 Code_t ZResetAuthentication(); 13 13 14 int 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 29 int owl_zephyr_zpending() 30 { 31 #ifdef HAVE_LIBZEPHYR 32 return(ZPending()); 33 #else 34 return(0); 35 #endif 36 } 37 14 38 int owl_zephyr_loadsubs(char *filename) 15 39 { 40 #ifdef HAVE_LIBZEPHYR 16 41 /* return 0 on success 17 42 * -1 on file error … … 83 108 84 109 return(ret); 110 #else 111 return(0); 112 #endif 85 113 } 86 114 87 115 int owl_zephyr_loadloginsubs(char *filename) 88 116 { 117 #ifdef HAVE_LIBZEPHYR 89 118 FILE *file; 90 119 ZSubscription_t subs[3001]; … … 139 168 140 169 return(ret); 170 #else 171 return(0); 172 #endif 141 173 } 142 174 143 175 void unsuball() 144 176 { 177 #if HAVE_LIBZEPHYR 145 178 int ret; 146 179 … … 150 183 com_err("owl",ret,"while unsubscribing"); 151 184 } 185 #endif 152 186 } 153 187 154 188 int owl_zephyr_sub(char *class, char *inst, char *recip) 155 189 { 190 #ifdef HAVE_LIBZEPHYR 156 191 ZSubscription_t subs[5]; 157 192 int ret; … … 167 202 } 168 203 return(0); 204 #else 205 return(0); 206 #endif 169 207 } 170 208 … … 172 210 int owl_zephyr_unsub(char *class, char *inst, char *recip) 173 211 { 212 #ifdef HAVE_LIBZEPHYR 174 213 ZSubscription_t subs[5]; 175 214 int ret; … … 185 224 } 186 225 return(0); 187 } 188 189 226 #else 227 return(0); 228 #endif 229 } 230 231 #ifdef HAVE_LIBZEPHYR 190 232 char *owl_zephyr_get_field(ZNotice_t *n, int j, int *k) 191 233 { … … 216 258 return(""); 217 259 } 218 219 260 #endif 261 262 #ifdef HAVE_LIBZEPHYR 220 263 int owl_zephyr_get_num_fields(ZNotice_t *n) 221 264 { … … 229 272 return(fields); 230 273 } 231 232 274 #endif 275 276 #ifdef HAVE_LIBZEPHYR 233 277 char *owl_zephyr_get_message(ZNotice_t *n, int *k) 234 278 { … … 241 285 return(owl_zephyr_get_field(n, 2, k)); 242 286 } 243 244 287 #endif 288 289 #ifdef HAVE_LIBZEPHYR 245 290 char *owl_zephyr_get_zsig(ZNotice_t *n, int *k) 246 291 { … … 254 299 return(n->z_message); 255 300 } 256 301 #endif 257 302 258 303 int send_zephyr(char *opcode, char *zsig, char *class, char *instance, char *recipient, char *message) 259 304 { 305 #ifdef HAVE_LIBZEPHYR 260 306 int ret; 261 307 ZNotice_t notice; … … 293 339 return(ret); 294 340 } 295 296 return(0); 297 } 298 341 return(0); 342 #else 343 return(0); 344 #endif 345 } 346 347 #ifdef HAVE_LIBZEPHYR 299 348 Code_t send_zephyr_helper(ZNotice_t *notice, char *buf, int len, int wait) 300 349 { 301 350 return(ZSendPacket(buf, len, 0)); 302 351 } 352 #endif 303 353 304 354 void send_ping(char *to) 305 355 { 356 #ifdef HAVE_LIBZEPHYR 306 357 send_zephyr("PING", "", "MESSAGE", "PERSONAL", to, ""); 307 } 308 358 #endif 359 } 360 361 #ifdef HAVE_LIBZEPHYR 309 362 void owl_zephyr_handle_ack(ZNotice_t *retnotice) 310 363 { … … 343 396 } 344 397 } 345 398 #endif 399 400 #ifdef HAVE_LIBZEPHYR 346 401 int owl_zephyr_notice_is_ack(ZNotice_t *n) 347 402 { … … 352 407 return(0); 353 408 } 409 #endif 354 410 355 411 void owl_zephyr_zaway(owl_message *m) 356 412 { 413 #ifdef HAVE_LIBZEPHYR 357 414 char *tmpbuff, *myuser, *to; 358 415 … … 392 449 owl_function_make_outgoing_zephyr(owl_global_get_zaway_msg(&g), tmpbuff, "Automated reply:"); 393 450 owl_free(tmpbuff); 394 } 395 396 451 #endif 452 } 453 454 #ifdef HAVE_LIBZEPHYR 397 455 void owl_zephyr_hackaway_cr(ZNotice_t *n) 398 456 { … … 406 464 } 407 465 } 466 #endif 408 467 409 468 void owl_zephyr_zlocate(char *user, char *out, int auth) 410 469 { 470 #ifdef HAVE_LIBZEPHYR 411 471 int ret, numlocs; 412 472 int one = 1; … … 434 494 owl_free(myuser); 435 495 } 496 #endif 436 497 } 437 498 438 499 void owl_zephyr_addsub(char *filename, char *class, char *inst, char *recip) 439 500 { 501 #ifdef HAVE_LIBZEPHYR 440 502 char *line, subsfile[LINE], buff[LINE]; 441 503 FILE *file; … … 477 539 478 540 owl_free(line); 541 #endif 479 542 } 480 543 481 544 void owl_zephyr_delsub(char *filename, char *class, char *inst, char *recip) 482 545 { 546 #ifdef HAVE_LIBZEPHYR 483 547 char *line, subsfile[LINE], buff[LINE], *text; 484 548 char backupfilename[LINE]; … … 544 608 545 609 owl_function_makemsg("Subscription removed"); 610 #endif 546 611 } 547 612 … … 559 624 void owl_zephyr_zlog_in(void) 560 625 { 626 #ifdef HAVE_LIBZEPHYR 561 627 char *exposure, *eset; 562 628 int ret; … … 590 656 */ 591 657 } 658 #endif 592 659 } 593 660 594 661 void owl_zephyr_zlog_out(void) 595 662 { 663 #ifdef HAVE_LIBZEPHYR 596 664 int ret; 597 665 … … 605 673 */ 606 674 } 675 #endif 607 676 } 608 677
Note: See TracChangeset
for help on using the changeset viewer.