Looking for the latest version? Download fth-1.3.7.tar.bz2 (694.7 kB)
Home / fth
Name Modified Size Downloads / Week Status
Parent folder
Totals: 3 Items  
1.3.7 2014-12-28 11 weekly downloads
1.3.6 2013-08-25 11 weekly downloads
1.3.5 2012-11-28 11 weekly downloads
NAME README -- installation information for the Fth package INTRODUCTION Fth is a software package which includes the interpreter fth and the extension library libfth. You can write Forth scripts and interpret them by the interpreter fth or you can link libfth into an application to use it as extension language. Fth's core language is Ficl, a Forth dialect written by John Sadler. The Ficl source is included in the Fth source tree and is slightly changed to fit with Fth. Ficl is more or less ANS compatible. The Fth library contains object type extensions like arrays, hashs, strings, regexp etc. A GC tries to handle memory management of object types. Fth is known to build with clang(1) as well as with gcc(1). WHERE IS FTH LOCATED? You can get the latest archive from http://www.sf.net/projects/fth/. If you prefer svn, you can get the source code from svn.code.sf.net/p/fth/code/. Check out the source tree with % svn checkout svn://svn.code.sf.net/p/fth/code/trunk fth and update it later with % svn update in the new fth directory. REQUIREMENTS The interactive Fth interpreter supports tcsh-like command-line editing with the tecla(7) library. You can find a copy at http://www.astro.caltech.edu/~mcs/tecla/libtecla-1.6.3.tar.gz. If you won't use tecla(7), you can configure Fth without it, see CONFIGURE FTH. Bignumbers are supported by bn(3) from openssl. 64-Bit-NetBSD and Tecla The libtecla package on NetBSD provides a static library libtecla.a. On 64-bit machines this package should be compiled with: cd /usr/pkgsrc/devel/libtecla env CFLAGS=-fPIC make install clean CONFIGURE FTH There are a few additional configure options which may be of interest. --disable-shared Disable shared library support. --enable-warnings Enable C compiler warning flags. --enable-maintainer-mode `make maintainer-clean' removes files which need special developer utilities. Use this option with caution. --program-prefix --program-suffix --program-transform-name More than one version of fth may be installed at the same time. You can manipulate the name to achieve this, for example: % ./configure --program-suffix=-1.3 % make test install installs the interpreter as fth-1.3, the library as libfth-1.3.so, creates a library path /usr/local/lib/fth-1.3 for local dynamic libs and installs the header files in /usr/local/include/fth-1.3: /usr/local/bin/fth-1.3 /usr/local/lib/libfth-1.3.so /usr/local/lib/fth-1.3/ /usr/local/include/fth-1.3/ --with-tecla-prefix[=DIR] If the tecla(7) command-line editing library is installed in other places than $prefix/{include,lib} or /usr/{include,lib}, take this configure option. configure will add -IDIR/include to $(CFLAGS) and -LDIR/lib to $(LDFLAGS). --without-tecla Don't use the tecla(7) command-line editing library. Makefile knows the following targets: all clean distclean fth-shared fth-static install install-shared install-static install-strip maintainer-clean test uninstall INSTALL FTH The usual way to configure and install Fth is: % ./configure CFLAGS="-g -O2 -Wall" % make % make test # optional % make install Or with options mentioned above and a single make command line: % ./configure --with-tecla-prefix=/my/tecla/prefix CFLAGS="-g -O2" % make test install While testing (make test) two environment variables are checked: FTH_TEST_IO FTH_TEST_FILE If set, the IO and File test will be executed. These two tests may bear problems so they are disabled by default. AUTOCONF MACRO FTH_CHECK_LIB An application using the Fth package as extension language can detect program and library using the autoconf macro FTH_CHECK_LIB which is located in fth.m4. This macro tests if the interpreter fth can be found in $PATH. If so, it tests if libfth contains complex and rational numbers. Eventually it substitutes six variables for configure.ac. After including FTH_CHECK_LIB in configure.ac call aclocal && autoconf to update aclocal.m4. FTH Set to full path of the interpreter or "no", e.g. "/usr/local/bin/fth". FTH_VERSION Set to version number of the Fth package or "no", e.g. "1.3.1". FTH_CFLAGS Set to include path or "no", e.g. "-I/usr/local/include/fth". FTH_LIBS Set to library path or "no", e.g. "-L/usr/local/lib -lfth". FTH_HAVE_COMPLEX Set to "yes" or "no". FTH_HAVE_RATIO Set to "yes" or "no". Short configure.ac Example AC_ARG_WITH([forth], [AS_HELP_STRING([--with-forth], [use Forth as the extension language])], [if test "$withval" = yes ; then FTH_CHECK_LIB([AC_DEFINE([HAVE_FORTH])]) fi]) Long configure.as Example AC_ARG_WITH([forth], [AS_HELP_STRING([--with-forth], [use Forth as the extension language])], [if test "$withval" = yes ; then FTH_CHECK_LIB([AC_DEFINE([HAVE_FORTH]) AC_DEFINE([HAVE_EXTENSION_LANGUAGE]) if test "$FTH_HAVE_COMPLEX" = yes ; then AC_DEFINE([HAVE_COMPLEX_TRIG]) AC_DEFINE([HAVE_MAKE_COMPLEX]) AC_DEFINE([HAVE_MAKE_RECTANGULAR]) fi if test "$FTH_HAVE_RATIO" = yes ; then AC_DEFINE([HAVE_MAKE_RATIO]) fi AC_SUBST(XEN_CFLAGS, $FTH_CFLAGS) AC_SUBST(XEN_LIBS, $FTH_LIBS) LOCAL_LANGUAGE="Forth" ac_snd_have_extension_language=yes]) fi]) RUNNING FTH Fth builds and runs on these systems: Current builds FTH 1.3.7 (2014/12/28) [amd64-pkgsrc-netbsd7.99] FTH 1.3.7 (2014/12/28) [amd64-portbld-freebsd8.4] FTH 1.3.7 (2013/10/05) [i386-mnet-freebsd9.0] (arbornet.org) FTH 1.3.7 (2013/10/05) [i386-intel-openbsd5.0] (grex.org) FTH 1.3.7 (2013/10/05) [amd64-sdf-netbsd6.1] (sdf.org) FTH 1.3.7 (2013/10/05) [x86_64-debian-linux-gnu3.2.0] (freeshell.de) VirtualBox FTH 1.3.7 (2013/10/05) [amd64-vbox-freebsd11.0] FTH 1.3.7 (2013/10/05) [amd64-vbox-netbsd6.99.24] FTH 1.3.7 (2013/10/05) [amd64-vbox-openbsd5.4] FTH 1.3.7 (2013/10/05) [x86_64-vboxdebian-linux-gnu3.10]
Source: README, updated 2014-12-28