diff options
-rw-r--r-- | INSTALL | 27 | ||||
-rw-r--r-- | Makefile.nt | 3 | ||||
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | README.win32 | 13 | ||||
-rwxr-xr-x | configure | 51 |
5 files changed, 72 insertions, 27 deletions
@@ -1,10 +1,13 @@ + Installing Objective Caml on a Unix machine + ------------------------------------------- + PREREQUISITES * The GNU C compiler gcc is recommended, as the bytecode interpreter takes advantage of gcc-specific features to enhance performance. Versions 2.5.8, 2.6.3, 2.7.0, 2.7.2 and 2.7.2.2 have all been tested at some point and appear to work. - 2.7.2.1 has known problems, at least under Linux; use some other version. + 2.7.2.1 for Intel under Linux has known problems; use some other version. * Under HP/UX, gcc, the GNU binutils, and GNU make are all required. The native cc, as, and make have major problems. @@ -30,7 +33,7 @@ The "configure" script accepts the following options: -mandir <dir> (default: /usr/local/man/man1) Directory where the manual pages will be installed --cc <C compiler and options> (default: gcc or cc, depending on availability) +-cc <C compiler and options> (default: gcc if available, cc otherwise) C compiler to use for building the system -libs <extra libraries> (default: none) @@ -48,6 +51,18 @@ The "configure" script accepts the following options: Location of the X11 include directory (e.g. /usr/X11R6/include) and the X11 library directory (e.g. /usr/X11R6/lib). +-with-pthread + Use POSIX threads for the OCaml thread library instead of + the default bytecode-level threading. POSIX threads + support threading with native-code programs (ocamlopt) + as well as bytecode (ocamlc), and also allow more flexibility + in interfacing with C. However, you need a strictly + conformant POSIX 1003.1c implementation on your system. + As a rule of thumb, this option works under Solaris 2.5 and later, + Digital Unix 4.0, and Linux with the LinuxThreads library. + It will *not* work under Digital Unix 3.2 or earlier, HPUX, + AIX, nor Linux without LinuxThreads. + Examples: ./configure -bindir /usr/bin -libdir /usr/lib/ocaml -mandir /usr/man/manl ./configure -cc "acc -fast" -libs "-lucb" @@ -112,7 +127,7 @@ following commands (in the binary directory selected during autoconfiguration): ocamlmktop a tool to make toplevel systems that integrate user-defined C primitives and Caml code ocamldebug the source-level replay debugger - ocamldep output "make" dependencies for Caml sources + ocamldep generator of "make" dependencies for Caml sources ocamlprof execution count profiler ocamlcp the bytecode compiler in profiling mode @@ -171,10 +186,10 @@ all versions of make. Use GNU make if this is a problem. won't work if /bin/csh is called instead. You may have to unset the SHELL environment variable, or set it to /bin/sh. -* gcc 2.7.2.1 generates incorrect code for the runtime system in -O mode, -at least on some Intel x86 platforms (e.g. Linux RedHat 4.1). +* gcc 2.7.2.1 generates incorrect code for the runtime system in -O mode +on some Intel x86 platforms (e.g. Linux RedHat 4.1 and 4.2). If this causes a problem, the solution is to downgrade to 2.7.2, or -upgrade to 2.7.2.2; both work all right. +upgrade to 2.7.2.2 or above; both work all right. * gcc 2.6.0 has been reported to generate incorrect code for the runtime system in -O mode. Upgrade to a newer version. diff --git a/Makefile.nt b/Makefile.nt index 84f50aacf..e64cf6e48 100644 --- a/Makefile.nt +++ b/Makefile.nt @@ -196,7 +196,8 @@ installbyt: cd tools & $(MAKEREC) install for %i in ($(OTHERLIBRARIES)) do (cd otherlibs\%i & $(MAKEREC) install & cd ..\..) cd wingui & $(MAKE) -nologo install - copy /a README.win32 $(DISTRIB)\Readme.txt + copy /a README $(DISTRIB)\Readme.gen + copy /a README.win32 $(DISTRIB)\Readme.win copy /a LICENSE $(DISTRIB)\License.txt copy /a Changes $(DISTRIB)\Changes.txt @@ -20,10 +20,9 @@ Standard ML of New Jersey 1.08 on our tests), while retaining the moderate memory requirements of the bytecode compiler. The native-code compiler currently runs on the following platforms: - Alpha processors: AlphaStation and DecStation 3000 under Digital Unix + Alpha processors: all Digital Alpha machines under Digital Unix or Linux Sparc processors: Sun Sparcstation under SunOS 4.1, Solaris 2, NetBSD - Intel 486 and Pentium processors: PCs under Linux, NextStep, - FreeBSD, Solaris 2 + Intel Pentium processors: PCs under Linux, NextStep, FreeBSD, Solaris 2 Mips processors: SGI workstations and mainframes under IRIX 6, DecStation 3100 and 5000 under Ultrix 4 HP PA-RISC processors: HP 9000/700 under HPUX 9 and NextStep diff --git a/README.win32 b/README.win32 index c01fee440..80f2bd5bb 100644 --- a/README.win32 +++ b/README.win32 @@ -16,6 +16,9 @@ Microsoft Visual C++ compiler. The native-code compiler (ocamlopt) requires Visual C++ and the Microsoft assembler MASM version 6. +The CamlTk GUI requires Tcl 7.6 and Tk 4.2. Windows binaries are +available from ftp://ftp.sunlabs.com/pub/tcl/win76p2.exe. + INSTALLATION: @@ -36,10 +39,9 @@ directories and files: Installing the toplevel application: - Copy the file ocaml\ocamlwin.ini to the Windows system directory - (e.g. C:\windows). This file assumes that the Caml distribution - resides in C:\ocaml. If this is not the case, edit the file ocamlwin.ini - and change the line that says + The file ocaml\ocamlwin.ini assumes that the Caml distribution + resides in C:\ocaml. If this is not the case, edit the file + ocaml\ocamlwin.ini and change the line that says CmdLine=ocamlrun c:\ocaml\bin\ocaml.exe -I c:\ocaml\lib to @@ -89,9 +91,8 @@ Win32 is sufficiently complete, robust and stable to compile Objective Caml. * Libraries available under Win32: "num", "str", "threads", "graph", -and large parts of "unix". +"camltk41", and large parts of "unix". "graph" works only under the toplevel application. -"camltk4" still requires some work to run under Win32. CREDITS: @@ -22,27 +22,53 @@ cc='' cclibs='' x11_include_dir='' x11_lib_dir='' +posix_threads=no # Parse command-line arguments while : ; do case "$1" in "") break;; - -bindir|--bindir) bindir=$2;; - -libdir|--libdir) libdir=$2;; - -mandir|--mandir) mandir=$2 - manext=`echo $mandir | sed -e 's/^.*\(.\)$/\1/'`;; - -host*|--host*) host_type=$2;; - -cc*) cc="$2";; - -lib*) cclibs="$2 ";; - -x11include*|--x11include*) x11_include_dir=$2;; - -x11lib*|--x11lib*) x11_lib_dir=$2;; + -bindir|--bindir) + bindir=$2; shift;; + -libdir|--libdir) + libdir=$2; shift;; + -mandir|--mandir) + mandir=$2 + manext=`echo $mandir | sed -e 's/^.*\(.\)$/\1/'` + shift;; + -host*|--host*) + host_type=$2; shift;; + -cc*) + cc="$2"; shift;; + -lib*) + cclibs="$2 "; shift;; + -x11include*|--x11include*) + x11_include_dir=$2; shift;; + -x11lib*|--x11lib*) + x11_lib_dir=$2; shift;; + -with-pthread|--with-pthread) + posix_threads=yes;; *) echo "Unknown option \"$1\"." 1>&2; exit 2;; esac shift - shift done +# Sanity checks + +case "$bindir" in + /*) ;; + *) echo "The -bindir directory must be absolute." 1>&2; exit 2;; +esac +case "$libdir" in + /*) ;; + *) echo "The -libdir directory must be absolute." 1>&2; exit 2;; +esac +case "$mandir" in + /*) ;; + *) echo "The -mandir directory must be absolute." 1>&2; exit 2;; +esac + # Generate the files cd config/auto-aux @@ -574,7 +600,10 @@ echo "BIGNUM_ARCH=$bignum_arch" >> Makefile # Determine if the threads library is supported -if test "$has_select" = "yes" \ +if test "$posix_threads" = "yes"; then + echo "Threads library supported (using POSIX system threads)." + otherlibraries="$otherlibraries systhreads" +elif test "$has_select" = "yes" \ && test "$has_setitimer" = "yes" \ && test "$has_gettimeofday" = "yes" \ && test "$has_wait" = "yes"; then |