--- gforth/Attic/configure 1994/11/11 16:10:11 1.1 +++ gforth/Attic/configure 1994/11/29 16:22:34 1.5 @@ -2,7 +2,9 @@ # Configuration script for GNU FORTH # Copyright (C) 1994 Free Software Foundation, Inc. -#This file is part of GNU CC. +#This file is part of GNU FORTH. + +VERSION=0.1alpha #GNU FORTH is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by @@ -31,7 +33,7 @@ # using to compile GCC. # --prefix=DIR specifies directory to install in. # --exec-prefix=DIR specifies directory to install executables in. -# --direct-threade specifies direct threading +# --direct-threaded specifies direct threading # # If configure succeeds, it leaves its status in config.status. # If configure fails after disturbing the status quo, @@ -84,6 +86,7 @@ host= build= name1= name2= +debugging=-g for arg in $*; do @@ -171,7 +174,11 @@ do | --direct-thre | --direct-thr | --direct-th | --direct-t | --direct- \ | --direct | --direc | --dire | --dir | --di | --d) threading=-DDIRECT_THREADED - ;; + ;; + -without-debug | --without-debu | --without-deb | --without-de \ + | --without-d) + debugging= + ;; -with-* | --with-*) ;; #ignored -without-* | --without-*) ;; #ignored -enable-* | --enable-*) ;; #ignored @@ -325,6 +332,7 @@ cpu= bigendian= extra_lib= extra_obs= +Makefile=Makefile.in case $target in # Support site-specific machine types. @@ -347,6 +355,24 @@ case $target in flags="-fforce-mem -fforce-addr -fomit-frame-pointer -fno-defer-pop -fcaller-saves" defines="-DUSE_TOS -DUSE_FTOS -D_POSIX_VERSION -DUSE_GETOPT $threading" ;; + i[345]86-*-*dos*) + cpu=386.h + bigendian=0 + extra_obs="getopt1.o getopt.o ecvt.o" + flags="-fforce-mem -fforce-addr -fomit-frame-pointer -fno-defer-pop -fcaller-saves" + defines="-DUSE_GETOPT $threading" + extra_lib="-lpc" + sed -e "s/if \[ ! -x gforth \]; then $(MAKE) first; fi/IF NOT EXIST gforth.exe $(MAKE) first/"\ + -e "s/CP[ ]*=[ ]*cp/CP = copy/"\ + -e "s/RM[ ]*=[ ]*rm/RM = xdel/"\ + -e "s/MAKE[ ]*=[ ]*gmake/MAKE = make/"\ + -e "s/@MAKE-EXECUTE@/coff2exe gforth/"\ + -e "s/\(OBJECTS[ ]*=.*\)io.o \(.*\)/\1\2/"\ + -e "s/@LINK-KERNL32L@/$(CP) kernl32l.fi gforth.fi/"\ + -e "s|'\`pwd\`'|/forth/gforth-$VERSION|"\ + <$Makefile >Makefile.xx + Makefile=Makefile.xx + ;; i[345]86*) cpu=386.h bigendian=0 @@ -357,6 +383,7 @@ case $target in mips-dec-ultrix*) cpu=decstation.h bigendian=0 + extra_obs="getopt1.o getopt.o" flags="-fforce-mem -fforce-addr -fomit-frame-pointer -fno-defer-pop -fcaller-saves" defines="-DUSE_TOS -DUSE_FTOS -D_POSIX_VERSION -DUSE_GETOPT $threading" ;; @@ -387,10 +414,34 @@ else ln -s kernl32l.fi gforth.fi fi -sed -e "s|^XCFLAGS[ ]*=*\(.*\)$|XCFLAGS = \1 $flags|" \ - -e "s|^XDEFINES[ ]*=*\(.*\)$|XDEFINES = \1 $defines|" \ - -e "s|^OBJECTS[ ]*=*\(.*\)$|OBJECTS = \1 $extra_obs|" \ - Makefile.in > Makefile +if [ x$bigendian = x1 ] +then + sed -e "s|^XCFLAGS[ ]*=*\(.*\)$|XCFLAGS = \1 $flags|" \ + -e "s|^XDEFINES[ ]*=*\(.*\)$|XDEFINES = \1 $defines|" \ + -e "s|^VERSION[ ]*=*\(.*\)$|VERSION = $VERSION\1|" \ + -e "s|^OBJECTS[ ]*=*\(.*\)$|OBJECTS = \1 $extra_obs|" \ + -e "s|^CFLAGS[ ]*=*\(.*\)$|CFLAGS = $debugging\1|" \ + -e "s|^LDFLAGS[ ]*=*\(.*\)$|LDFLAGS = $debugging\1|" \ + -e "s|^LDLIBS[ ]*=*\(.*\)$|LDLIBS = \1 $extra_lib|" \ + -e "s/^.*@.*@//"\ + -e "s|kernl32l.fi kernl32b.fi|kernl32b.fi kernl32l.fi|" \ + $Makefile > Makefile +else + sed -e "s|^XCFLAGS[ ]*=*\(.*\)$|XCFLAGS = \1 $flags|" \ + -e "s|^XDEFINES[ ]*=*\(.*\)$|XDEFINES = \1 $defines|" \ + -e "s|^VERSION[ ]*=*\(.*\)$|VERSION = $VERSION\1|" \ + -e "s|^OBJECTS[ ]*=*\(.*\)$|OBJECTS = \1 $extra_obs|" \ + -e "s|^CFLAGS[ ]*=*\(.*\)$|CFLAGS = $debugging\1|" \ + -e "s|^LDFLAGS[ ]*=*\(.*\)$|LDFLAGS = $debugging\1|" \ + -e "s|^LDLIBS[ ]*=*\(.*\)$|LDLIBS = \1 $extra_lib|" \ + -e "s/^.*@.*@//"\ + $Makefile > Makefile +fi + +if [ $Makefile != Makefile.in ] +then + rm $Makefile +fi exit 0