Annotation of gforth/configure.in, revision 1.8

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

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