home *** CD-ROM | disk | FTP | other *** search
/ ftp.ncftp.com / ftp.ncftp.com.zip / ftp.ncftp.com / ncftp / ncftp-1.9.5.tar.gz / ncftp-1.9.5.tar / ncftp-1.9.5 / README < prev    next >
Text File  |  1995-10-29  |  13KB  |  297 lines

  1. Note:  This version is no longer being enhanced.  As of this writing, version
  2. 2.x is the officially supported version.  Only bug fixes and portability
  3. tweaks will be applied to the 1.9 series.
  4.  
  5. If you are a novice user, and don't know how to compile things, try
  6. contacting your local guru first (get them to do it for you :-).  Please
  7. understand that I don't have time to walk newbies through the whole
  8. installation procedure.
  9.  
  10. 1. READ this entire file.  Part A, below, tells what to do if you want to
  11.    use NcFTP with a command-line editor.  Part B tells you how to configure
  12.    the Makefile to compile the program for your system.  Part C tells you
  13.    how to configure NcFTP's optional features.  Part D tells you how to
  14.    contact me if you want to report a bug or submit new code to the
  15.    program.
  16.  
  17. 2. EDIT the Makefile, making any necessary changes described in parts
  18.    A, B, or C.  Don't forget to read the directions in the Makefile,
  19.    so you don't forget any needed libraries, etcetera.
  20.  
  21. 3. You can also change the program's default behavior by editing defaults.h.
  22.    99% of the time you don't need to do this, so you can skip this step.
  23.  
  24. If you have problems, you can mail me, but please try your best to install
  25. it without my help.  I'm quite tired of responding to lazy SunOS users
  26. because they didn't bother reading the directions so that they would have
  27. known that they needed to use GCC.  
  28.  
  29. I _do_ want to hear from you if you have comments or bug reports/fixes.  I
  30. would also like to hear from you if you had a system that wasn't covered
  31. in sys.h, so I can add an entry for other users of your system.
  32.  
  33. The latest version of ncftp is available in the directory:
  34.     ftp.cs.unl.edu:/pub/ncftp
  35.  
  36.  
  37. Part A.  Installing with a command line editor:
  38. ----------------------------------------------
  39.  
  40. As of this release, GNU Readline and Chris Thewalt's Getline command-line
  41. editing and history facilities are supported.  Neither are included with the
  42. ncftp sources.  You can find Getline at:
  43.   ce.berkeley.edu:/pub/thewalt/getline.tar.Z  (note: use 'ls', not 'dir!')
  44. and Readline is in the directory:
  45.   prep.ai.mit.edu:/pub/gnu
  46.  
  47. To install Readline, you will need to know where libreadline.a and the
  48. header <readline/readline.h> are.  You will need to link libreadline.a and
  49. libcurses.a (or libtermcap.a) with ncftp (see the Makefile).  Good luck on
  50. trying to compile it.  It is not an easy thing to do!  In the Makefile, you
  51. will need to add -DREADLINE to PDEFS, add -lreadline -lcurses to LIBS, and
  52. edit the HDRDIRS and LIBDIRS lines.  This stuff is already in the Makefile,
  53. so you can just uncomment it.
  54.  
  55. To install Getline, you need to know where libgetline.a and it's header
  56. (getline.h) are.  In the Makefile, you'll need to add -lgetline to LIBS and
  57. edit the HDRDIRS and LIBDIRS lines.  This stuff is already in the Makefile,
  58. so you can just uncomment it.
  59.  
  60. DO NOT bug me if you can't figure out how to compile Getline or Readline.
  61. Contact their respective authors instead.  It is not essential that you use
  62. them.
  63.  
  64.  
  65. Part B.  System Dependencies:
  66. ----------------------------
  67.  
  68. NcFTP may need work-arounds for some things due to the differences
  69. in implementations of unix.  The following systems are taken care
  70. of automatically.  For these systems, you should just be able to type
  71. 'make' (but proceed to part C):
  72.  
  73.    Silicon Graphics IRIX
  74.    IBM's AIX
  75.    SINIX
  76.    DEC's Ultrix (well, might need to use -lcursesX instead of -lcurses)
  77.    NeXT
  78.    Pyramid OSx
  79.    Berkley Software Design, Inc.'s BSDi
  80.  
  81. Otherwise you will have to configure ncftp manually.
  82.  
  83. Important for "Yellow Pages" users:  Don't forget to link the library
  84. that includes the YP/NIS version of getpwuid(), etc.  Otherwise the program
  85. won't be able to expand ~username/path/name type pathnames, and maybe even
  86. ~/path/name types of pathnames.  If you're wondering why the program isn't
  87. opening your rc file, this could be the cause.
  88.  
  89. You will need to add these things to the SDEFS line in the Makefile
  90. as applicable.  As an example, if I say 'add -DFoobar to SDEFS,' find
  91. the line in the Makefile that reads 'SDEFS=' (or 'SDEFS=-DFoo2') and
  92. change it to 'SDEFS=-DFoobar' (or 'SDEFS=-DFoo2 -DFoobar).  If your
  93. system is listed below, follow the directions and then you ready to
  94. go to part C, below.
  95.  
  96.     Sun Microsystems' SunOS/Solaris:  Use an ANSI compiler such as
  97.       gcc (set CC=gcc in the Makefile), or acc (set CC=acc).
  98.       The regular 'cc' is not an ANSI compiler.  You could also run
  99.       something like 'ansi2knr' on the sources and hope it works.
  100.       You will probably need to link both the curses and termcap
  101.       libraries if you use -DCURSES (see below).  If you're running
  102.       Solaris (SunOS 5.x or greater) add -DSolaris to SDEFS.
  103.       I also needed to add -lnsl -lsocket to LIBS.
  104.  
  105.     Hewlett-Packard HP-UX:  If you have 7.0, you'll need to find
  106.       a copy of <ftp.h> from somewhere (8.0 has it though). Then
  107.       set CFLAGS= -Aa.  You may also need to use gcc if your
  108.       compiler is non-ANSI.  Note that for HP-UX, the default
  109.       terminal escape codes are for HP terminals, so you should
  110.       probably link termcap/curses in so it will get the ANSI
  111.       sequences if you're on a vt100, etc., terminal connected
  112.       to your HP-UX machine.
  113.  
  114.     Linux:  For 'term' support, from what I can tell just add
  115.       the path of 'client.a' to LIBS, and add -DTERM_FTP to SDEFS,
  116.       to turn on the term specific ftp code.  May need to link
  117.       -lcurses and -ltermcap.
  118.       
  119.     SCO Unix:  Add -DSCO324 or -DSCO322 (as appropriate) to SDEFS,
  120.       and -lsocket to LIBS.
  121.  
  122.     SCO Xenix 2.3.4: Add -DSCOXNX to SDEFS;
  123.         Try adding -DLINGER if puts don't work.
  124.         Add "-lsocket -ldir" to LIBS.
  125.  
  126.     Bull DPX/2: Add -DBULL to SDEFS, add -linet to LIBS, and
  127.       use gcc.
  128.  
  129.     Sequent's DYNIX: Use gcc and add -DDYNIX (if necessary) to SDEFS.
  130.       You may also be short several string functions which you will
  131.       have to get elsewhere, and perhaps mktime and strftime.
  132.       You can get all that stuff from the BSD sources (like ftp.uu.net).
  133.       Please bug Sequent to update their libc library!
  134.  
  135.     Sequent's Dynix/PTX:  Add -DDYNIXPTX to SDEFS.
  136.       Add -lsocket -linet -lnsl -lseq to LIBS.
  137.  
  138.     DEC OSF1/1.3:  Use gcc, Add -DGETCWDSIZET to SDEFS.  cc might work,
  139.      though.  Try cc if gcc chokes.
  140.  
  141. If your system doesn't fit any of those, things will be trickier.  Answer
  142. all these questions and add to the SDEFS line.  You may want to try
  143. each option one at a time until everything works.
  144.  
  145. *  Is your system closer to System V or BSD?  Your SDEFS line should have
  146. either -DBSD or -DSYSV.  If you don't know, try leaving it blank first;
  147. some compilers automatically define it for you.
  148.  
  149. *  Add -DNO_CONST if your compiler chokes on the const directive.  You
  150. will know if you need to add this if the compiler spits out errors saying
  151. it doesn't know what 'const' is.
  152.  
  153. *  As I said above, you will need to link special libraries if your system
  154. is running Yellow Pages.
  155.  
  156. *  Add -DSYSSELECTH if you need <sys/select.h> included for definitions
  157. of fd_set, etc.
  158.  
  159. *  Add -DNO_UNISTDH if you don't have <unistd.h>.  If the compiler complains
  160. about not being able to open <unistd.h> add this.
  161.  
  162. *  Add -DNO_STDLIBH if you don't have <stdlib.h>.  If the compiler complains
  163. about not being able to open <stdlib.h> add this.
  164.  
  165. *  Add -DNO_UTIMEH if you don't have <utime.h>.  If the compiler complains
  166. about not being able to open <utime.h> add this.
  167.  
  168. *  Add -DNO_MKTIME if you don't have the mktime() system call, and don't
  169. feel like getting the source for it and compiling it in with the program.
  170. If you define this, the program will not set the file modification times
  171. to match the ones on the remote host (no big deal).
  172.  
  173. *  Add -DGETPASS if you would rather use the standard getpass() system
  174. call, instead of our version, Getpass(), which takes more than 8
  175. characters.  You may want to define this if you are having problems
  176. compiling getpass.c.
  177.  
  178. If you haven't given up on our Getpass(), you can try adding -DSGTTYB
  179. if you want to use a struct sgttyb instead of a struct termio.  By default,
  180. BSD systems define SGTTYB automatically.  You can also try adding -DTERMIOS
  181. to use a POSIX compliant struct termios instead.  Don't pull your hair out
  182. trying to get the Getpass code to compile;  if it gives you problems just
  183. define -DGETPASS and hope your system's getpass can handle passwords
  184. longer than 8 characters.
  185.  
  186. *  Add -DBAD_INETADDR if your inet_addr() function returns a struct in_addr
  187. instead of a u_long, as it should (in DG/UX 5.4.1).
  188.  
  189. *  Add -DBROKEN_MEMCPY if ncftp mysteriously dumps core when trying to open
  190. a remote host.  I'm told that this happens because of some problem in System
  191. V's sockets don't like fprintf (and memcpy).
  192.  
  193. *  Add -DPTRTYPE=char if your pre-ANSI compiler complains about the
  194. way malloc() or free() are used, and in general does not like (void *)
  195. as a generic pointer type.
  196.  
  197. *  Add -DNO_STRFTIME if your system does not have strftime().  If you do,
  198. we won't try to use it.  This means, however, you cannot use ``%'' values
  199. in your prompt.
  200.  
  201. *  Add -DNO_RENAME if your system does not have rename() (or the one it
  202. has is broken).  If you do, we will use our own.
  203.  
  204. *  Add -DNO_STRSTR if your system does not have strstr().  If you do, we
  205. will use our own.
  206.  
  207. *  Add -DLINGER if puts to the remote system are incomplete.
  208.  
  209. *  Add -DNET_ERRNO_H if you need to include <net/errno.h> for definitions
  210.    of ECONNREFUSED, etcetera.
  211.  
  212. *  (Optional) Add -DGETCWDSIZET if your system's getcwd() takes a size_t
  213. as the second parameter instead of an int.
  214.  
  215. *  (Optional) Add -DHERROR if you know you have the herror() system
  216. call.
  217.  
  218. *  (Optional) Add -DU_WAIT if you know your wait system call takes
  219. a pointer to a 'union wait.'  Defined automatically if you define
  220. BSD.
  221.  
  222. *  (Optional) Add -DHOSTNAME=\"machine.domain.nam\" if your system
  223. doesn't generate it's own hostname.  To check this, compile ncftp
  224. then run it and type 'set.'  Look at the variable anon-password.
  225. If the hostname is wrong, or if it is in the form of 'yourlogin' or
  226. 'yourlogin@machine' instead of 'yourlogin@machine.xxx.yyy,'
  227. re-compile it with HOSTNAME set to your machine's address, in the
  228. form of 'machine.xxx.yyy.'
  229.  
  230. *  (Optional) Add -DHAS_DOMAINNAME if you have the getdomainname()
  231.    function.
  232.  
  233. *  (Optional) If you're having problems with your hostname not being
  234. full (i.e you have 'yourlogin@machine') all is not lost.  First of all,
  235. define HAS_DOMAINNAME if you can.  But sometimes getdomainname() doesn't
  236. work -- instead of giving you the domain name, it returns an empty
  237. string.  So you can hardcode the domain name by defining DOMAIN_NAME to
  238. be the domain (i.e. add -DDOMAIN_NAME=\"domain.nam\").  That way, if
  239. getdomainname doesn't work, the program will have something to fall back
  240. on.  This problem is common on SunOS/Solaris.
  241.  
  242. *  (Optional) Add -DSTRICT_PROTOS if your compiler wants function prototypes
  243. for all functions, not just non-int-returning ones.  This is really just
  244. handy for debugging during development, so this is not recommended.
  245.  
  246.  
  247. Part C.  Program Options:
  248. ------------------------
  249.  
  250. Add these as applicable to the PDEFS line in the Makefile.
  251.  
  252. * -DGZCAT=\"path\": If you have the GNU gzip package installed on your system,
  253.     the program can try paging remote files compressed with gzip _and_ 
  254.     compress (instead of just compress).  Add -DGZCAT=\"/full/path/to/zcat\"
  255.     with GZCAT set to the path name of GNU's zcat/gzcat.
  256.  
  257. *   -DCURSES:  Uses curses library to display boldface, underline, etc.
  258.     By default ncftp uses hard-coded ANSI escapes (^[[1m etc.) to
  259.     save the 100k or so the curses library adds.  You will also need
  260.     to edit the LIBS line in the Makefile to add -lcurses.  You may
  261.     need to add -ltermcap instead, or both -lcurses and -ltermcap.
  262.     If you choose to use the termcap library, you may want to also add
  263.     -DNO_CURSES_H so it does not try to include <curses.h>.
  264.  
  265. *   -DSYSLOG:  Define this to have ncftp log connections and transfers
  266.     to the syslog.
  267.  
  268. *   -DNO_TIPS:  Define if you want to cut a little fat at the expense of
  269.      novice users.
  270.  
  271. *   -DGETLINE: If you want to use Chris Thewalt's getline input line editor
  272.     and history facility, add this (and see below).
  273.  
  274. *   -DREADLINE:  If you want to use GNU's readline input line editor and
  275.     history facility, add this (and see the Makefile). If you do this, you
  276.     also need to add -DCURSES (see above).
  277.  
  278. *    -DSOCKS: NcFTP is now compatible with the Socks library by David Koblas,
  279.     at koblas@sgi.com.  This lets you use NcFTP with a "firewall" gateway
  280.     for enhanced site security.  You can get the latest version from...
  281.         ftp://ftp.netcom.com/pub/ko/koblas/
  282.  
  283.     After you have compiled it, compile NcFTP
  284.     with -DSOCKS added to PDEFS, and the pathname of the Rconnect.o file
  285.     added to LIBS.
  286.     
  287. *    -DTRY_ABOR:  Define if you want to try the 'ABOR' command from ncftp;
  288.     The aborting code has had some problems, so by default the program
  289.     'aborts' by continuing to read input but not echoing output.
  290.  
  291. *   -DDB_ERRS:  Define this if you want my Perror() function to be more
  292.     verbose.  You may want to do this if you are a programmer examining this
  293.     code, and want to know where in the source the Perror's are coming
  294.     from.
  295.  
  296. --mg (mgleason@cse.unl.edu)
  297.