File:  [gforth] / gforth / configure.in
Revision 1.6: download - view: text, annotated - select for diffs
Thu Jan 19 17:47:58 1995 UTC (29 years, 2 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
float.fs: Added f~ (f-proximate)
wordsets.fs: Added missing float words
Added 16 bit and 64 bit support in cross.fs
Fixed some bugs which asume sizeof(int)=sizeof(Cell)

    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: 		LIBOBJS="cache.o"
   30: 		LDFLAGS="-Xlinker -N"
   31: 		LIBS="-L/lib/pa1.1/"
   32: 		;;
   33: 	sparc*)
   34: 		mach_h=sparc
   35: 		;;
   36: 	i386|i486|i586)
   37: 		mach_h=386
   38: 		#!! direct/indirect threading switch
   39: 		#!! -m486 flag
   40: 		;;
   41: 	m68*)
   42: 		mach_h=m68k
   43: 		;;
   44: 	mips*)
   45: 		mach_h=mips
   46: 		LDFLAGS="-Xlinker -N"
   47: 		#!! link text and data segment into the same 256M region!
   48: 		#!! does cacheflush work on OSs other than Ultrix?
   49: 		;;
   50: 	*)
   51: 		echo "No direct threading support for $host_cpu, using indirect threading."
   52: 		echo "Using a generic 32-bit machine description. It will only work if char * AND"
   53: 		echo "long values have 32 bits."
   54: 		echo "I'll assume that C floats and doubles are represented by IEEE single and"
   55: 		echo "double numbers. If this is not so, SF@ etc. will not work correctly."
   56: 		mach_h=32bit
   57: esac
   58: 
   59: dnl Now a little support for DOS/DJGCC
   60: AC_SUBST(MAKE_EXE)
   61: MAKE_EXE=""
   62: 
   63: dnl copy commands for systems that don't have links
   64: AC_SUBST(LINK_KERNL16L)
   65: LINK_KERNL16L=""
   66: AC_SUBST(LINK_KERNL16B)
   67: LINK_KERNL16B=""
   68: AC_SUBST(LINK_KERNL32L)
   69: LINK_KERNL32L=""
   70: AC_SUBST(LINK_KERNL32B)
   71: LINK_KERNL32B=""
   72: AC_SUBST(LINK_KERNL64L)
   73: LINK_KERNL64L=""
   74: AC_SUBST(LINK_KERNL64B)
   75: LINK_KERNL64B=""
   76: 
   77: #if test $host_os=dos
   78: #then
   79: #  echo Configuring for DOS!!!
   80: #  MAKE_EXE="coff2exe gforth"
   81: #  LINK_KERNL32L='$(CP) kernl32l.fi gforth.fi'
   82: #fi
   83: 
   84: dnl the following macro produces a warning with autoconf-2.1
   85: AC_C_BIGENDIAN
   86: AC_SUBST(KERNAL)
   87: dnl ac_cv_c_bigendian is an undocumented variable of autoconf-2.1
   88: if test $ac_cv_c_bigendian = yes; then
   89:   bytesex=b
   90:   KERNAL="kernl16b.fi kernl16l.fi kernl32b.fi kernl32l.fi kernl64b.fi kernl64l.fi"
   91: else
   92:   bytesex=l
   93:   KERNAL="kernl16l.fi kernl16b.fi kernl32l.fi kernl32b.fi kernl64l.fi kernl64b.fi"
   94: fi
   95: 
   96: dnl Checks for programs.
   97: AC_PROG_LN_S
   98: AC_PROG_INSTALL
   99: 
  100: dnl Checks for library functions
  101: dnl This check is just for making later checks link with libm.
  102: dnl using sin here is no good idea since it is built-into gcc and typechecked
  103: AC_CHECK_LIB(m,asin)
  104: AC_FUNC_MEMCMP
  105: AC_REPLACE_FUNCS(memmove strtoul)
  106: AC_CHECK_FUNC(getopt_long,getop_long="",getopt_long="getopt.o getopt1.o")
  107: AC_SUBST(getopt_long)
  108: AC_CHECK_FUNCS(rint expm1 log1p pow10)
  109: AC_REPLACE_FUNCS(ecvt)
  110: dnl No check for select, because our replacement is no good under
  111: dnl anything but DOS
  112: 
  113: dnl autoconf requires (implicitly) that AC_LINK_FILES is used only once
  114: AC_LINK_FILES(${mach_h}.h kernl32${bytesex}.fi,machine.h gforth.fi)
  115: AC_OUTPUT(Makefile)
  116: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>