Subject: Compiling 3.91 under Solaris 2.4

From: [email-masked] (Paul DuBois)
Date: 3 Jul 1995 02:46:06 -0500

There've been a couple of request about how to compile pine 3.91 under
Solaris 2.4.  I just tried it, since I'm upgrading a SPARC II from
SunOS 4.1.1B (yes, you read that right).

I didn't use gcc, I used Sun's compiler.  Given that, only minor changes
are necessary to make the distribution compile:

In the pine directory, add -DANSI to CFLAGS in makefile.sol:

*** makefile.sol.orig	Wed Oct  5 01:14:50 1994
--- makefile.sol	Mon Jul  3 02:17:06 1995
***************
*** 70,74 ****
  
  # Use these for the Solaris C compiler
! CFLAGS= -DSV4 $(OPTIMIZE) $(PROFILE) $(DEBUG) -DSYSTYPE=\"SOL\"
  # LDCC= /usr/bin/cc
  # If you don't have /usr/bin/cc (our Solaris 2.2 doesn't seem to have it,
--- 70,74 ----
  
  # Use these for the Solaris C compiler
! CFLAGS= -DSV4 $(OPTIMIZE) $(PROFILE) $(DEBUG) -DSYSTYPE=\"SOL\" -DANSI
  # LDCC= /usr/bin/cc
  # If you don't have /usr/bin/cc (our Solaris 2.2 doesn't seem to have it,

In pine/osdep, diddle a couple #defines in os-sv4.h:

*** os-sv4.h.orig	Mon Oct 10 17:30:01 1994
--- os-sv4.h	Mon Jul  3 02:22:18 1995
***************
*** 186,192 ****
  
  /*----------------- Are we ANSI? ---------------------------------------*/
! /* #define ANSI          /* this is an ANSI compiler */
  
! #define	const		/* compiler doesn't support const */
  
  /*------ If our compiler doesn't understand type void ------------------*/
--- 186,192 ----
  
  /*----------------- Are we ANSI? ---------------------------------------*/
! #define ANSI          /* this is an ANSI compiler */
  
! /* #define	const		/* compiler doesn't support const */
  
  /*------ If our compiler doesn't understand type void ------------------*/

I still got a zillion compiler warnings, but "build sol" at least generated
runnable executables, and they seem to work.  (pico and pine, at least,
I didn't try anything else.)

Hope this helps someone.
-- 
Paul DuBois
[email-masked]
http://www.primate.wisc.edu/homepage/dubois