aboutsummaryrefslogtreecommitdiff
path: root/unix/hlib/fc.csh
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /unix/hlib/fc.csh
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
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