File:
[gforth] /
gforth /
configure.in
Revision
1.9:
download - view:
text,
annotated -
select for diffs
Thu Feb 2 18:13:01 1995 UTC (28 years, 2 months ago) by
pazsan
Branches:
MAIN
CVS tags:
HEAD
added very preliminary support for Alpha/osf1
Moved flush-tos before stores to improve scheduling
merged io-dos.h and io.h
Created new Makefile for DOS
removed ToDo topcics that are already done
1: dnl Process this file with autoconf to produce a configure script.
2: AC_INIT(engine.c)
3:
4: AC_ARG_ENABLE(force-reg,
5: [ --enable-force-reg Use explicit register declarations if they appear in
6: the machine.h file. This can cause a good speedup,
7: but also incorrect code with some gcc versions on
8: some processors (default disabled).],
9:
10: AC_DEFINE(FORCE_REG))
11: dnl this is not quite according to the autoconf manual, it causes a replacement
12: AC_ARG_ENABLE(direct-threaded,
13: [ --enable-direct-threaded Force direct threading. This may not work on
14: some machines and may cause slowdown on others.
15: (default processor-dependent)],
16: AC_DEFINE(DIRECT_THREADED))
17: AC_ARG_ENABLE(indirect-threaded,
18: [ --enable-indirect-threaded Force indirect threading. This can cause a
19: slowdown on some machines.
20: (default processor-dependent)],
21: AC_DEFINE(INDIRECT_THREADED))
22:
23: AC_ARG_WITH(debug,
24: [ --with-debug specifys option -g to compile with debug info (default)
25: --without-debug omits the -g switch and creates smaller images on
26: machines where "strip" has problems with gcc style
27: debugging informations.],
28: if test "$withval" = "yes"; then DEBUGFLAG=-g; fi)
29:
30:
31: AC_SUBST(GCCLDFLAGS)
32: AC_SUBST(DEBUGFLAG)
33:
34: wordsize=32
35:
36: #terminology is a bit unusual here: The host is the system on which
37: #gforth will run; the system on which configure will run is the `build'
38: AC_CANONICAL_HOST
39: case "$host_cpu" in
40: hppa*)
41: mach_h=hppa
42: LIBOBJS="cache.o"
43: LDFLAGS="-Xlinker -N"
44: LIBS="-L/lib/pa1.1/"
45: ;;
46: sparc*)
47: mach_h=sparc
48: ;;
49: i386|i486|i586)
50: mach_h=386
51: CFLAGS="-fforce-mem -fforce-addr -fomit-frame-pointer"
52: #!! direct/indirect threading switch
53: #!! -m486 flag
54: ;;
55: m68*)
56: mach_h=m68k
57: ;;
58: mips*)
59: mach_h=mips
60: #link text and data segment into the same 256M region!
61: GCCLDFLAGS="-Xlinker -T -Xlinker 10000000 -Xlinker -D -Xlinker 10400000"
62: #this works on Ultrix, but not on Irix
63: #for now use indirect threading under Irix
64: ;;
65: alpha*)
66: mach_h=alpha
67: wordsize=64
68: echo Very Preliminary Support for Alpha!!!
69: ;;
70: *)
71: echo "No direct threading support for $host_cpu, using indirect threading."
72: echo "Using a generic 32-bit machine description. It will only work if char * AND"
73: echo "long values have 32 bits."
74: echo "I'll assume that C floats and doubles are represented by IEEE single and"
75: echo "double numbers. If this is not so, SF@ etc. will not work correctly."
76: mach_h=32bit
77: esac
78:
79: dnl Now a little support for DOS/DJGCC
80: AC_SUBST(MAKE_EXE)
81: MAKE_EXE=""
82:
83: dnl copy commands for systems that don't have links
84: AC_SUBST(LINK_KERNL16L)
85: LINK_KERNL16L=""
86: AC_SUBST(LINK_KERNL16B)
87: LINK_KERNL16B=""
88: AC_SUBST(LINK_KERNL32L)
89: LINK_KERNL32L=""
90: AC_SUBST(LINK_KERNL32B)
91: LINK_KERNL32B=""
92: AC_SUBST(LINK_KERNL64L)
93: LINK_KERNL64L=""
94: AC_SUBST(LINK_KERNL64B)
95: LINK_KERNL64B=""
96:
97: #if test $host_os=dos
98: #then
99: # echo Configuring for DOS!!!
100: # MAKE_EXE="coff2exe gforth"
101: # LINK_KERNL32L='$(CP) kernl32l.fi gforth.fi'
102: #fi
103:
104: dnl the following macro produces a warning with autoconf-2.1
105: AC_C_BIGENDIAN
106: AC_SUBST(KERNAL)
107: dnl ac_cv_c_bigendian is an undocumented variable of autoconf-2.1
108: if test $ac_cv_c_bigendian = yes; then
109: bytesex=b
110: KERNAL="kernl16b.fi kernl16l.fi kernl32b.fi kernl32l.fi kernl64b.fi kernl64l.fi"
111: else
112: bytesex=l
113: KERNAL="kernl16l.fi kernl16b.fi kernl32l.fi kernl32b.fi kernl64l.fi kernl64b.fi"
114: fi
115:
116: dnl Checks for programs.
117: AC_PROG_LN_S
118: AC_PROG_INSTALL
119:
120: dnl Checks for library functions
121: dnl This check is just for making later checks link with libm.
122: dnl using sin here is no good idea since it is built-into gcc and typechecked
123: AC_CHECK_LIB(m,asin)
124: AC_FUNC_MEMCMP
125: AC_REPLACE_FUNCS(memmove strtoul)
126: AC_CHECK_FUNC(getopt_long,getopt_long="",getopt_long="getopt.o getopt1.o")
127: AC_SUBST(getopt_long)
128: AC_CHECK_FUNCS(rint expm1 log1p pow10)
129: AC_REPLACE_FUNCS(ecvt)
130: dnl No check for select, because our replacement is no good under
131: dnl anything but DOS
132:
133: gforth_fi=kernl${wordsize}${bytesex}.fi
134: AC_SUBST(gforth_fi)
135:
136: AC_LINK_FILES(${mach_h}.h $gforth_fi,machine.h gforth.fi)
137: AC_OUTPUT(Makefile)
138:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>