File:
[gforth] /
gforth /
configure.in
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Mon Dec 12 17:10:33 1994 UTC (29 years, 4 months ago) by
anton
Branches:
MAIN
CVS tags:
HEAD
Reorganized configuration: configure is now created by autoconf from
configure.in; I still left it in the CVS repository because not
everyone has autoconf. decstation.h renamed to mips.h and apollo68k to
m68k. Added general 32bit.h description, which the other machine
descriptions use. Created/copied replacement files install-sh memcmp.c
memmove.c select.c (carved out from ecvt.c) strtol.c
strtoul.c. Bytesex is now handled by configure.
Deciding the threading method is now done in machine.h, this should
also be done for USE_TOS and USE_FTOS.
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: #terminology is a bit unusual here: The host is the system on which
24: #gforth will run; the system on which configure will run is the `build'
25: AC_CANONICAL_HOST
26: case "$host_cpu" in
27: hppa*)
28: mach_h=hppa
29: ;;
30: sparc*)
31: mach_h=sparc
32: ;;
33: i386|i486|i586)
34: mach_h=386
35: #!! direct/indirect threading switch
36: #!! -m486 flag
37: ;;
38: m68*)
39: mach_h=m68k
40: ;;
41: mips*)
42: mach_h=mips
43: #!! link text and data segment into the same 256M region!
44: #!! does cacheflush work on OSs other than Ultrix?
45: ;;
46: *)
47: echo "No direct threading support for $host_cpu, using indirect threading."
48: echo "Using a generic 32-bit machine description. It will only work if char * AND"
49: echo "long values have 32 bits."
50: echo "I'll assume that C floats and doubles are represented by IEEE single and"
51: echo "double numbers. If this is not so, SF@ etc. will not work correctly."
52: mach_h=32bit
53: esac
54:
55: dnl Now a little support for DOS/DJGCC
56: AC_SUBST(MAKE_EXE)
57: MAKE_EXE=""
58:
59: dnl copy commands for systems that don't have links
60: AC_SUBST(LINK_KERNL32L)
61: LINK_KERNL32L=""
62: AC_SUBST(LINK_KERNL32B)
63: LINK_KERNL32B=""
64:
65: #if test $host_os=dos
66: #then
67: # echo Configuring for DOS!!!
68: # MAKE_EXE="coff2exe gforth"
69: # LINK_KERNL32L='$(CP) kernl32l.fi gforth.fi'
70: #fi
71:
72: dnl the following macro produces a warning with autoconf-2.1
73: AC_C_BIGENDIAN
74: dnl ac_cv_c_bigendian is an undocumented variable of autoconf-2.1
75: if test $ac_cv_c_bigendian = yes; then
76: bytesex=b
77: else
78: bytesex=l
79: fi
80:
81: dnl Checks for programs.
82: AC_PROG_LN_S
83: AC_PROG_INSTALL
84:
85: dnl Checks for library functions
86: AC_FUNC_MEMCMP
87: AC_REPLACE_FUNCS(memmove strtoul)
88: AC_CHECK_FUNC(getopt_long,getop_long="",getopt_long="getopt.o getopt1.o")
89: AC_SUBST(getopt_long)
90: dnl This check is just for making later checks link with libm.
91: AC_CHECK_LIB(m,sin)
92: AC_CHECK_FUNCS(rint)
93: AC_REPLACE_FUNCS(ecvt)
94: dnl No check for select, because our replacement is no good under
95: dnl anything but DOS
96:
97: dnl autoconf requires (implicitly) that AC_LINK_FILES is used only once
98: AC_LINK_FILES(${mach_h}.h kernl32${bytesex}.fi,machine.h gforth.fi)
99: AC_OUTPUT(Makefile)
100:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>