home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / pcomm-2.0.2 / part02 / Configure.sh < prev    next >
Encoding:
Text File  |  1993-04-13  |  3.7 KB  |  121 lines

  1. :
  2. : what version of UUCP do you have?
  3. if [ -f /usr/lib/uucp/Systems -o -f /etc/uucp/Systems ] ;then
  4.     echo "You've got the HoneyDanBer (HDB) version of UUCP"
  5.     echo "Therefore you need:    #define ASCII_PID"
  6. else
  7.     if [ -f /usr/lib/uucp/L.sys ] ;then
  8.         echo "You've got the older version of UUCP (not HDB)"
  9.         echo "Therefore you need:    #undef ASCII_PID"
  10.     else
  11.         echo "Can't determine the UUCP version"
  12.     fi
  13. fi
  14. :
  15. : check the location of the UUCP lock files
  16. if [ -d /usr/spool/locks ] ;then
  17.     echo "Your UUCP lock files go in /usr/spool/locks"
  18.     echo "Therefore you need:    #define LOCK_DIR \"/usr/spool/locks\""
  19. else
  20.     if [ -d /usr/spool/uucp/LCK ]; then
  21.         echo "Your UUCP lock files go in /usr/spool/uucp/LCK"
  22.         echo "Therefore you need:    #define LOCK_DIR \"/usr/spool/uucp/LCK\""
  23.     else
  24.         echo "Your UUCP lock files go in /usr/spool/uucp"
  25.         echo "Therefore you need:    #define LOCK_DIR \"/usr/spool/uucp\""
  26.     fi
  27. fi
  28. :
  29. : check the version of curses
  30. GOT_IT=0
  31. if [ -f /usr/5include/curses.h ] ;then
  32.     GOT_IT=/usr/5include/curses.h
  33.     echo "You've got a System 5 compatibility library... use it!"
  34.     echo "Edit the Makefile:    CC=/usr/5bin/cc and LD=/usr/5bin/cc"
  35. else
  36.     if [ -f /usr/include/curses.h ] ;then
  37.         GOT_IT=/usr/include/curses.h
  38.     else
  39.         echo "Can't determine your version of curses"
  40.     fi
  41. fi
  42. if [ "$GOT_IT" -eq 0 ] ;then
  43.     if [ `grep -c ACS_HLINE $GOT_IT` -gt 0 ] ;then
  44.         echo "You've got the newer version of curses"
  45.         echo "Therefore you need:    #undef OLDCURSES"
  46.     else
  47.         echo "You've got and old version of curses"
  48.         echo "Therefore you need:    #define OLDCURSES"
  49.     fi
  50. fi
  51. :
  52. : check the libraries
  53. echo checking your C library....
  54. if [ -f /usr/5lib/libc.a ] ;then
  55.     ar t /usr/5lib/libc.a > /tmp/config.$$
  56. else
  57.     if [ -f /usr/lib/libc.a ] ;then
  58.         ar t /usr/lib/libc.a > /tmp/config.$$
  59.     else
  60.         if [ -f /lib/libc.a ] ;then
  61.             ar t /lib/libc.a > /tmp/config.$$
  62.         else
  63.             if [ -f /usr/ccs/lib/libc.a ] ;then
  64.                 ar t /usr/ccs/lib/libc.a > /tmp/config.$$
  65.             fi
  66.         fi
  67.     fi
  68. fi
  69. if [ -f /tmp/config.$$ ] ;then
  70.     if [ `grep -c "^poll.o" /tmp/config.$$` -eq 1 ] ;then
  71.         echo "You've got the poll() function"
  72.         echo "Edit the Makefile:    IPC.O=ipc_att.o and IPC.C=ipc_att.c"
  73.     else
  74.         if [ `grep -c "^select.o" /tmp/config.$$` -eq 1 ] ;then
  75.             echo "You've got the select() function"
  76.             echo "Edit the Makefile:    IPC.O=ipc_ucb.o and IPC.C=ipc_ucb.c"
  77.         else
  78.             echo "You don't seem to have either poll() or select()"
  79.             echo "Perhaps they are in another library?"
  80.         fi
  81.     fi
  82.     if [ `grep -c "^usleep.o" /tmp/config.$$` -eq 1 ] ;then
  83.         echo "You've got the usleep() function"
  84.         echo "Therefore you need:    #define HAVE_USLEEP"
  85.     else
  86.         echo "You don't have the usleep() function"
  87.         echo "Therefore you need:    #undef HAVE_USLEEP"
  88.     fi
  89.     if [ `grep -c "^strstr.o" /tmp/config.$$` -eq 1 ] ;then
  90.         echo "You've got the strstr() function"
  91.         echo "Therefore you need:    #define HAVE_STRSTR"
  92.     else
  93.         echo "You don't have the strstr() function"
  94.         echo "Therefore you need:    #undef HAVE_STRSTR"
  95.     fi
  96.     if [ `grep -c "^memmove.o" /tmp/config.$$` -eq 1 ] ;then
  97.         echo "You've got the memmove() function"
  98.         echo "Therefore you need:    #define MEMMOVE(a,b,c) memmove(a,b,c)"
  99.     else
  100.         if [ `grep -c "^memcpy.o" /tmp/config.$$` -eq 1 ] ;then
  101.             echo "You've got the memcpy() function"
  102.             echo "Therefore you need:    #define MEMMOVE(a,b,c) memcpy(a,b,c)"
  103.         else
  104.             if [ `grep -c "^bcopy.o" /tmp/config.$$` -eq 1 ] ;then
  105.                 echo "You've got the bcopy() function"
  106.                 echo "Therefore you need:    #define MEMMOVE(a,b,c) bcopy(b,a,c)"
  107.             fi
  108.         fi
  109.     fi
  110.     if [ `grep -c "^truncate.o" /tmp/config.$$` -eq 1 ] ;then
  111.         echo "You've got the truncate() function"
  112.         echo "Therefore you need:    #define HAVE_TRUNCATE"
  113.     else
  114.         echo "You don't have the truncate() function"
  115.         echo "Therefore you need:    #undef HAVE_TRUNCATE"
  116.     fi
  117.     rm /tmp/config.$$
  118. else
  119.     echo "Can't determine your C functions"
  120. fi
  121.