summaryrefslogtreecommitdiff
path: root/mcon/U/fpu.U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U/fpu.U')
-rw-r--r--mcon/U/fpu.U73
1 files changed, 73 insertions, 0 deletions
diff --git a/mcon/U/fpu.U b/mcon/U/fpu.U
new file mode 100644
index 0000000..7c5f2c8
--- /dev/null
+++ b/mcon/U/fpu.U
@@ -0,0 +1,73 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: fpu.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:10 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:fpu: test cat cc Myread
+?MAKE: -pick add $@ %<
+?S:fpu (fpunit):
+?S: Set to be the compile flag for the local floating point unit.
+?S:.
+?C:FPU (FPUNIT):
+?C: String containing the flags for the local floating point unit.
+?C:.
+?H:#define FPU "$fpu" /**/
+?H:.
+: see what floating point compile flags should be used.
+fpu=''
+if $test -r /dev/fpa; then
+ $cat>fpa.c << GOOP
+ main(){return(1);}
+GOOP
+ $cc -ffpa -o fpa fpa.c
+ fpa > fpa.out 2>&1
+ if $test ! -s fpa.out; then
+ dflt='y'
+ $cat <<'EOM'
+
+You seem to have a sun fpa... I can compile the code to use the fpa but it will
+mean that the code can ONLY run on a machine with a fpa...
+
+EOM
+ rp="Should I compile for fpa?"
+ . ./myread
+ if $test $ans = "n"; then
+ fpu=''
+ else
+ fpu='-ffpa'
+ fi
+ else
+ $cat <<'EOM'
+
+You have the fpa device but I can't seem to use it. Maybe you should talk to
+your sysadmin about this. For now, I am not going to compile it in.
+
+EOM
+ fi
+fi
+if $test "$fpu" = ''; then
+ if $test -r /usr/etc/mc68881version; then
+ dflt='y'
+ $cat <<'EOM'
+
+There also seems to be the pieces for a 68881. If I compile this in, it will
+work on almost all Sun 3's except for a few Sun-3/50s without a 68881...
+
+EOM
+ rp="Should I compile for a 68881?"
+ . ./myread
+ if $test $ans = "y"; then
+ fpu='-f68881'
+ fi
+ fi
+fi
+