home *** CD-ROM | disk | FTP | other *** search
- Compiling Elm 2.4PL21 on NeXT Computers
- =======================================
- Jess Anderson (anderson@macc.wisc.edu)
- Feb 27, 1993
- =======================================
-
- Elm can be configured many different ways. This file tells
- you about just some of the ways. If you do it a different
- way and run into problems on a NeXT machine, please tell me
- about how you solved them so I can update these
- instructions.
-
- Change two source files
- -----------------------
- Changes introduced at PL 21 depend on a header file called
- unistd.h, which does not exist on NeXT. This requires a
- manual intervention in two files, <elm>/hdrs/defs.h and
- <elm>/hdrs/filter.h, to comment out the references. Save
- the originals, since you may need to back out when another
- patch comes along. I anticipate that patch 22 will fix this
- particular problem.
-
- These diffs explain the changes:
-
- $ diff hdrs/defs.h hdrs/defs.h.orig
- 498,499c498
- < #ifndef NeXT
- < # ifndef ANSI_C /* ANSI puts these in string.h */
- ---
- > #ifndef ANSI_C /* ANSI puts these in string.h */
- 505,508c504,506
- < # else
- < # include <unistd.h> /* ansi C puts sleep, lseek and fseek in unistd.h */
- < # endif
- < #endif /* NeXT */
- ---
- > #else
- > # include <unistd.h> /* ansi C puts sleep, lseek and fseek in unistd.h */
- > #endif
-
- $ diff hdrs/filter.h hdrs/filter.h.orig
- 217,219c217
- < # ifndef NeXT
- < # include <unistd.h> /* NeXT doesn't have this header file */
- < # endif /* !NeXT */
- ---
- > #include <unistd.h>
-
-
- Running Configure
- -----------------
- When I run Configure (I'm on NS3.0), I take the default
- responses for all questions except those noted here.
-
- Give the name of the program used to process manual pages on your
- system: [/usr/bin/troff] /usr/bin/ptroff
-
- What options should Elm use with /usr/bin/ptroff: [] -t
-
- What optimizer/debugger flag should be used? [-O] -O -pipe
-
- Note: -pipe speeds up the compilation, but it's not
- required, so you could take this default. Also, one
- person told me they used -O2 with gcc as their compiler.
-
- Any additional cc flags? [none] -bsd
-
- Note: This used to be -bsd -fwritable-strings. That no
- longer seems necessary. In fact, Elm will compile and
- run if you take the default here. Using -bsd, however,
- greatly reduces the number of compiler warnings you get.
- One person told me he could *not* use -bsd; he's running
- NS 2.2 (actually, I think he had a different problem, but
- I never got that ironed out.
-
- Any additional ld flags (NOT including libraries)? [none]
-
- Note: Using -object here (would give you smaller
- binaries) will cause a hang right near the end, while
- linking filter.
-
- What is the full path name of the include file
- directory? [] /usr/include/bsd
-
- You need this with NS3.0.
-
- Am I going to be running as a setgid program? [y] n
-
- Note: it will work if you say yes, but it's better
- security, they tell me, not to.
-
- In addition to these answers, I also set my domain and
- turned MIME on. You may want to take other nondefault
- options, but I can't vouch for what will happen.
-
-
- Configure options for NeXTstep NS1.0, NS2.x
- -------------------------------------------
- Note: these have been provided by others; I'm just passing
- them on here.
-
- libs='-lsys_s'
- includepath='/usr/include'
- ccflags='-bsd' [but apparently not for 2.2?]
- ldflags='-object' [optional, for smaller binaries]
-
- Note: there no longer is a tag named d_voidsig= in
- config.sh. Configure also finds the compiler library,
- /lib/libsys_s.a, so the question about that has gone away.
-
-
- At the shell escape prompt or just before
- -----------------------------------------
- Beginning with Elm 2.4, there is a mechanism for changing
- config.sh at the end of the Configure process. If a file
- named config.over exists, Configure asks if you want to
- apply it. If you say yes, it does, then pauses at the
- famous shell escape prompt.
-
- I have this in my config.over:
-
- d_memcpy='undef'
- sigtype='int'
- d_tzname='undef'
- d_bsd='define'
- passcat='nidump passwd /'
- nametype='bsd'
-
- Note: You must have the first four of these. There is
- some disagreement about the other two. The passcat
- line doesn't actually get used, it seems. One person has
- nametype='other' and d_password='define', says it works
- for him.
-
- When Configure gives you the option to use a shell escape to
- edit config.sh before proceeding, do so unless you used the
- config.over file and make the changes listed above.
-
-
- Reconfigure script
- ------------------
-
- I've tried so many different things by editing config.sh
- manually at the shell escape prompt that I finally wrote a
- simple script to run it over all the SH files before
- compiling. To use it, put it in your top elm directory, do a
- chmod +x to make it executabl, then run it; basically, it's
- the tail end of Configure following the shell escape.
-
- Compilation
- -----------
- Then run a make. Some warnings appear during compilation
- (takes about 10 minutes); they don't seem to make a
- difference. You have to be root to run make install at the
- end of the compilation.
-
-
- Credits
- -------
-
- Several people contributed to this effort. They include Syd
- Weinstein (syd@dsinc.dsi.com), Jeff Nicholson-Owens
- (jeffo@uiuc.edu), Eric P. Scott (eps@toaster.sfsu.edu), Guy
- Thomas (gthomas@native-ed.bc.ca), and Heiko Rupp
- (hwr@pilhuhn.ka.sub.org). Many thanks to all. But I'll take
- the blame if there are errors here.
-