Port to MacOS X

José R. Valverde jr at foxtrot.cnb.uam.es
Tue Apr 9 05:10:27 EST 2002


    This is just a port notice: I have succeeded in compiling
(with minor changes) CNS to MacOS X and thought you might like to 
know.

I have used CNS_SOLVE version 1.0, on a Macintosh laptop running MacOS X
with G77.

The development with g77 v 2.95.2-2 was installed using the FINK tools
(http://fink.sourceforge.net/).

Changes made were:

	To bin/getarch

13c13
< MACHINE=`(uname -m) 2>/dev/null` || MACHINE=unknown
---
> MACHINE=`(uname -m) 2>/dev/null | tr [:blank:] _` || MACHINE=unknown
23a24,26
>     *:Darwin:*:*)
>       echo `arch`-${MACHINE}-${SYSTEM}
>         exit 0 ;;


	And to instlib/machine/unsupported/g77-unix/Makefile.header

12c12,13
< F77OPT = -O3 -malign-double -funroll-loops -ffast-math
---
> #F77OPT = -O3 -malign-double -funroll-loops -ffast-math
> F77OPT = 


What these two patches do is fix two quirks in the MacOS X: the first
one substitutes spaces by underscores in the MACHINE string (the
Mac reports "Power Macintosh" with an space in between which breaks
the script) and add a case for Darwin, the underlying OS name. The 
second patch removes all x86 specific options from the compiler, as 
well as optimization (the latest is needed only by a couple of files,
and you might want to try compiling with -O3 first, then recompiling
those few files without optimization).

I haven't run all tests yet, but this may be enough to get someone
else started in turn.

				j

-- 
	These opinions are mine and only mine. Hey man, I saw them first!

			    José R. Valverde

	De nada sirve la Inteligencia Artificial cuando falta la Natural




More information about the X-plor mailing list