add more direct/unpack code
[deliverable/binutils-gdb.git] / gas / config-gas.com
index 2bfc57685333a8b7f8a7ccc5e378c39802023c82..0533d12e49c187dac6bde886089b178a235d34d9 100644 (file)
@@ -3,15 +3,23 @@ $! This file sets things up to build gas on a VMS system to generate object
 $! files for a VMS system.  We do not use the configure script, since we
 $! do not have /bin/sh to execute it.
 $!
-$! If you are running this file, then obviously the host is vax-dec-vms.
-$! [That's no longer obvious, but there's not much we can do about alpha yet.]
 $!
 $gas_host="vms"
 $!
+$arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1)      ! vax==1, alpha==2
+$arch = f$element(arch_indx,"|","|VAX|Alpha|")
+$if arch .eqs. "VAX"
+$then
 $cpu_type="vax"
-$emulation="generic"
 $obj_format="vms"
 $atof="vax"
+$else
+$ cpu_type="alpha"
+$ obj_format="evax"
+$ atof="ieee"
+$endif
+$
+$emulation="generic"
 $!
 $      DELETE  = "delete/noConfirm"
 $      ECHO    = "write sys$output"
@@ -32,16 +40,15 @@ $!
 $! Create the file version.opt, which helps identify the executable.
 $!
 $if f$trnlnm("IFILE$").nes."" then  close/noLog ifile$
-$search Makefile.in "VERSION="/Exact/Output=config-gas-tmp.tmp
+$search CONFIGURE.IN "AM_INIT_AUTOMAKE"/Exact/Output=config-gas-tmp.tmp
 $open ifile$ config-gas-tmp.tmp
 $read ifile$ line
 $close ifile$
 $DELETE config-gas-tmp.tmp;*
-$! Discard "VERSION=" and "\n" parts.
-$ijk=f$locate("=",line)+1
+$! Discard "AM_INIT_AUTOMAKE(gas, " and ")" parts.
+$ijk=f$locate(",",line)+2
 $line=f$extract(ijk,f$length(line)-ijk,line)
-$! [what "\n" part??  this seems to be useless, but is benign]
-$ijk=f$locate("\n",line)
+$ijk=f$locate(")",line)
 $line=f$extract(0,ijk,line)
 $!
 $ if f$search("version.opt").nes."" then DELETE version.opt;*
@@ -56,11 +63,16 @@ $ if f$search("config.h").nes."" then DELETE config.h;*
 $copy _NL: config.h
 $open/Append ifile$ config.h
 $write ifile$ "/* config.h.  Generated by config-gas.com. */
-$write ifile$ "#ifndef GAS_VERSION"
-$write ifile$ "#define GAS_VERSION      """,line,""""
+$write ifile$ "#ifndef VERSION"
+$write ifile$ "#define VERSION      """,line,""""
 $write ifile$ "#endif"
 $write ifile$ "/*--*/"
+$if arch .eqs. "VAX"
+$then
 $append [.config]vms-conf.h ifile$:
+$else
+$ append [.config]vms-a-conf.h ifile$:
+$endif
 $close ifile$
 $ECHO "Created config.h."
 $!
@@ -90,7 +102,12 @@ $ if .not.$status
 $ then type sys$input:
 
 ? could not compile <stdio.h>.
-  Since gcc is not set up correctly, gas configuration cannot proceed.
+
+  If you're compiling with DEC C or VAX C, create config.status as an
+  empty file and start gnu make again.
+
+  If you're compiling with GNU C, there is some setup problem and
+  gas configuration cannot proceed.
 
 $      DELETE tmp-chk-h.c;*
 $      exit %x002C
@@ -155,9 +172,10 @@ $!
 $! Done
 $!
 $ if f$search("config.status") .nes. "" then DELETE config.status;*
-$ create config.status
-Links are now set up for use with a vax running VMS.
-$ type config.status
+$ open/write cfile []config.status
+$ write cfile "Links are now set up for use with a "+arch+" running VMS."
+$ close cfile
+$ type []config.status
 $exit
 $!
 $!
This page took 0.023826 seconds and 4 git commands to generate.