home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / pcomm-2.0.2 / part05 / Unixpc.shar / Setup.sh < prev   
Encoding:
Text File  |  1993-04-13  |  1.8 KB  |  83 lines

  1. echo This shell script will create a new link directive file, extract
  2. echo a few missing objects from the C libraries, and create a new
  3. echo sys/time.h header file.
  4.  
  5. echo
  6. echo cd /lib
  7. cd /lib
  8.  
  9. echo cp shlib.ifile shlib_c.ifile
  10. cp shlib.ifile shlib_c.ifile
  11.  
  12. echo editing shlib_c.ifile
  13. ex - shlib_c.ifile << "EOF"
  14. 1,$s/^PC/xPC/
  15. 1,$s/^BC/xBC/
  16. 1,$s/^UP/xUP/
  17. 1,$s/^ospeed/xospeed/
  18. 1,$s/^LINES/xLINES/
  19. 1,$s/^COLS/xCOLS/
  20. 1,$s/^tgetflag/xtgetflag/
  21. 1,$s/^tgetent/xtgetent/
  22. 1,$s/^tgetstr/xtgetstr/
  23. 1,$s/^tgetnum/xtgetnum/
  24. 1,$s/^tgoto/xtgoto/
  25. 1,$s/^tputs/xtputs/
  26. 1,$s/^wrefresh/xwrefresh/
  27. 1,$s/^initscr/xinitscr/
  28. 1,$s/^cbreak/xcbreak/
  29. 1,$s/^nl/xnl/
  30. 1,$s/^flushinp/xflushinp/
  31. 1,$s/^noecho/xnoecho/
  32. 1,$s/^savetty/xsavetty/
  33. 1,$s/^resetty/xresetty/
  34. 1,$s/^echo/xecho/
  35. 1,$s/^nocbreak/xnocbreak/
  36. 1,$s/^nonl/xnonl/
  37. 1,$s/^keypad/xkeypad/
  38. 1,$s/^endwin/xendwin/
  39. 1,$s/^printw/xprintw/
  40. 1,$s/^fixterm/xfixterm/
  41. 1,$s/^resetterm/xresetterm/
  42. 1,$s/^setterm/xsetterm/
  43. 1,$s/^baudrate/xbaudrate/
  44. w
  45. q
  46. EOF
  47.  
  48. echo ar x libc.a doprnt.o setvbuf.o
  49. ar x libc.a doprnt.o setvbuf.o
  50.  
  51. echo creating /usr/include/sys/time.h
  52. cat > /usr/include/sys/time.h << "EOF"
  53. /*
  54.  * The sys/time.h stuff extracted from select.h in the UIPC code.
  55.  */
  56.  
  57. #ifndef sys_time_h
  58. #define sys_time_h
  59.  
  60. struct timeval {
  61.     long    tv_sec;        /* seconds */
  62.     long    tv_usec;    /* and microseconds */
  63. };
  64.  
  65. /*
  66.  * Operations on timevals.
  67.  *
  68.  * NB: timercmp does not work for >= or <=.
  69.  */
  70. #define    timerisset(tvp)        ((tvp)->tv_sec || (tvp)->tv_usec)
  71. #define    timercmp(tvp, uvp, cmp)    \
  72.     ((tvp)->tv_sec cmp (uvp)->tv_sec || \
  73.      (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
  74. #define    timerclear(tvp)        (tvp)->tv_sec = (tvp)->tv_usec = 0
  75.  
  76. #endif
  77. EOF
  78.  
  79. if [ ! -f /lib/libuipc.a -a ! -f /usr/lib/libuipc.a ] ;then
  80.     echo "Can't find the uipc library..."
  81.     echo "Pcomm v2.0 *REQUIRES* this public domain socket emulation library"
  82. fi
  83.