aboutsummaryrefslogtreecommitdiff
path: root/unix/hlib/fc.csh
diff options
context:
space:
mode:
Diffstat (limited to 'unix/hlib/fc.csh')
-rwxr-xr-xunix/hlib/fc.csh37
1 files changed, 37 insertions, 0 deletions
diff --git a/unix/hlib/fc.csh b/unix/hlib/fc.csh
new file mode 100755
index 00000000..ab631b39
--- /dev/null
+++ b/unix/hlib/fc.csh
@@ -0,0 +1,37 @@
+#!/bin/csh -f
+#
+# FC.CSH -- Link an IMFORT or host fortran program from IRAF. A front end
+# to XC, the purpose of this script is to determine the IRAF architecture
+# and add the appropriate host compiler file to XC.
+
+# set echo
+
+# Scan the argument list and concatenate all arguments.
+set args = ""
+while ("$1" != "")
+ set args = "$args $1"
+ shift
+end
+
+# Determine the desired architecture.
+setenv IRAFARCH `$iraf/unix/hlib/irafarch.csh`
+setenv MACH $IRAFARCH
+
+# Get float option switch.
+switch ($IRAFARCH)
+case macosx:
+ set float = "-/arch -//i386"
+ breaksw
+case macint:
+ set float = "-/arch -//x86_64"
+ breaksw
+case linux64:
+ set float = "-/m64" # FIXME
+ breaksw
+default:
+ set float = ""
+ breaksw
+endsw
+
+# Call XC with the appropriate float option.
+xc $float $args