pure-lang-svn Mailing List for Pure (Page 28)
Status: Beta
Brought to you by:
agraef
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
(141) |
Jun
(184) |
Jul
(97) |
Aug
(232) |
Sep
(196) |
Oct
|
Nov
|
Dec
|
---|
From: <ag...@us...> - 2008-06-07 06:36:30
|
Revision: 191 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=191&view=rev Author: agraef Date: 2008-06-06 23:36:38 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Update examples. Modified Paths: -------------- pure/trunk/examples/myutils.pure Modified: pure/trunk/examples/myutils.pure =================================================================== --- pure/trunk/examples/myutils.pure 2008-06-06 21:08:17 UTC (rev 190) +++ pure/trunk/examples/myutils.pure 2008-06-07 06:36:38 UTC (rev 191) @@ -1,13 +1,13 @@ // Dr Libor Spacek, 21th May 2008 -//General mathematical iterators over one and two indices and examples of their use +//General mathematical iterators over one and two indices MathIter1 op i1 i2 f = foldl1 op (map f (i1..i2)); -MathIter2 op i1 i2 j1 j2 f = foldl1 op (map (uncurry f) [x,y; x = i1..i2; y = j1..j2]); - +MathIter2 op i1 i2 j1 j2 f = + foldl1 op (map (uncurry f) [x,y; x = i1..i2; y = j1..j2]); +//Examples on how to use the mathematical iterators Sigma i1 i2 f = MathIter1 (+) i1 i2 f; Pi i1 i2 f = MathIter1 (*) i1 i2 f; Factorial n = Pi 1L n id; - //Binomial using (k, n-k) symmetry and bignum division Binomial n k = (Pi (k+1L) n id) div (Pi 2L (n-k) id) if n-k < k; = (Pi (n-k+1L) n id) div (Pi 2L k id); @@ -26,27 +26,28 @@ // rotate n items, generalisation of "rotate the bits instruction" // example: head (nrotate (-33) (0..23)); -// what time is 33 hrs before midnight? 15 hrs. The clock was moved -9 = -33 mod 24 +// what time is 33 hrs before midnight? 15 hrs. +// The clock was moved -33 mod 24 = -9 hours from midnight (0) nrotate n::int l = protate nm l when ll = #l; nm = ll + (n mod ll) end if n<0; - = protate nm l when nm = n mod #l end; + = protate nm l when nm = n mod #l end; // interpret any nonzero result as true: prevents errors in conditions nonzero 0 = 0; nonzero x = 1; // The Queens problem: -// the solution is only the rows permutation, without the ordered columns (1..n). +// the solution is only the rows permutation, without the ordered columns (1..n) // full 2D board coordinates can be produced with: zip (1..n) (queens n); safe _ _ [] = 1; -safe id::int j::int (j2::int:l) = if (j==j2) || (id==j2-j) || (id==j-j2) then 0 - else safe (id+1) j l; +safe id::int j::int (j2::int:l) = + if (j==j2) || (id==j2-j) || (id==j-j2) then 0 else safe (id+1) j l; queens n::int = list (search n n n []) with - search _ 0 _ _ = (); // last i, solved + search _ 0 _ p = (); // last i, solved search _ _ 0 _ = 0; // fail, run out of alternative js search n::int i::int j::int p = - if nonzero solution then j,solution // new i led to a solution + if nonzero solution then j,solution // new i led to a solution else search n i (j-1) p // or it failed, try another j when solution = search n (i-1) n (j:p); end if safe 1 j p; = search n i (j-1) p // also try another j when unsafe @@ -55,34 +56,38 @@ // this concise backtracking tailqueens throw a single solution tailqueens n::int = catch id (srch n n n []) with srch _ 0 _ p = throw p; srch _ _ 0 _ = 0; - srch n::int i::int j::int p = () if safe 1 j p && nonzero (srch n (i-1) n (j:p)); - = srch n i (j-1) p end; + srch n::int i::int j::int p = if safe 1 j p then + ( if nonzero (srch n (i-1) n (j:p)) then 1 else srch n i (j-1) p ) + else srch n i (j-1) p + end; // thequeens encodes my no search solution which is my original discovery, // to my knowledge the simplest known algorithm for this kind of a problem. // there always exists one fundamental centre-symmetrical solution of this form, // representing an orbit of just four solutions, instead of the usual eight. // these few lines of code are self-contained (not calling any square checking). +// has been tested exhaustively from 0 to 5000 and individually for 50000. thequeens 1 = [0]; thequeens n::int = no solution if n<4; -thequeens n::int = map (\x-> newsquare n x) (0..(n-1)) +thequeens n::int = map (newsquare n) (0..(n-1)) with newsquare n::int x::int = (start+2*x) mod n if x < halfn; = (start2+2*(x-halfn)) mod n end //reflections when halfn = n div 2; start = if (n mod 3) then (halfn-1) else 1; // (n mod 3) == 0 is special - start2 = n-((start + 2*(halfn-1)) mod n)-1 end if (n mod 2)==0; // all even boards - = 0:(map (\x->1+x)(thequeens (n-1))); // corner start solves odd size boards + start2 = n-((start + 2*(halfn-1)) mod n)-1 end if (n mod 2)==0; // even + = 0:(map (\x->1+x)(thequeens (n-1))); // corner start solves odd size boards! // row numbering in thequeens was changed to the "C style" e.g. 0..7. // full board coordinates, e.g. (1..8) x (1..8) can be reconstructed with: fullboard simple = zip (1..(#simple)) (map (\x->1+x) simple); // checks one queens solution either in 0..7 encoding or in 1..8 encoding. -// returns 1 for a valid solution, 0 otherwise +// returns 1 for a correct result, including "no solution" for sizes 2 and 3. +// returns 0 if a queen attack exists anywhere in the presented solution checkqs [] = 1; checkqs (s::int:l) = if safe 1 s l then checkqs l else 0; +checkqs (no solution) = 1; -// conducts an exhaustive test of boards of all sizes from min to max, e.g. >queenstest (4..1000); -// test _ min::int max::int = second argument must be greater than the first if min>=max; +// conducts an exhaustive test of boards of all listed sizes. +// examples of use: >queenstest (1..1000); >queenstest (5000,4999..4990); queenstest [] = 1; queenstest (h:l) = if checkqs (thequeens h) then queenstest l else 0; - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 21:08:12
|
Revision: 190 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=190&view=rev Author: agraef Date: 2008-06-06 14:08:17 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Fix glitch in output format (double 'extern'). Modified Paths: -------------- pure/trunk/lexer.ll Modified: pure/trunk/lexer.ll =================================================================== --- pure/trunk/lexer.ll 2008-06-06 20:04:23 UTC (rev 189) +++ pure/trunk/lexer.ll 2008-06-06 21:08:17 UTC (rev 190) @@ -375,7 +375,7 @@ if (jt == interp.globenv.end()) { assert(xt != interp.externals.end()); const ExternInfo& info = xt->second; - sout << "extern " << info << ";"; + sout << info << ";"; if ((!sflag||lflag) && dflag) { if (!sflag) sout << endl; info.f->print(sout); @@ -396,7 +396,7 @@ } else { if (xt != interp.externals.end()) { const ExternInfo& info = xt->second; - sout << "extern " << info << ";"; + sout << info << ";"; if ((!sflag||lflag) && dflag) { if (!sflag) sout << endl; info.f->print(sout); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 20:04:19
|
Revision: 189 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=189&view=rev Author: agraef Date: 2008-06-06 13:04:23 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Added Libor Spacek's examples. Added Paths: ----------- pure/trunk/examples/myutils.pure Added: pure/trunk/examples/myutils.pure =================================================================== --- pure/trunk/examples/myutils.pure (rev 0) +++ pure/trunk/examples/myutils.pure 2008-06-06 20:04:23 UTC (rev 189) @@ -0,0 +1,88 @@ +// Dr Libor Spacek, 21th May 2008 + +//General mathematical iterators over one and two indices and examples of their use +MathIter1 op i1 i2 f = foldl1 op (map f (i1..i2)); +MathIter2 op i1 i2 j1 j2 f = foldl1 op (map (uncurry f) [x,y; x = i1..i2; y = j1..j2]); + +Sigma i1 i2 f = MathIter1 (+) i1 i2 f; +Pi i1 i2 f = MathIter1 (*) i1 i2 f; +Factorial n = Pi 1L n id; + +//Binomial using (k, n-k) symmetry and bignum division +Binomial n k = (Pi (k+1L) n id) div (Pi 2L (n-k) id) if n-k < k; + = (Pi (n-k+1L) n id) div (Pi 2L k id); + +// Euclid's recursive greatest common factor algorithm for ints and bignums +Gcf x 0 = x; +Gcf x 0L = x; +Gcf x y = Gcf y (x mod y); + +// take the head of a list and put it at the end +rotate (h:t) = reverse (h:(reverse t)); + +// protate = rotate n items from the front: use when n is positive: 0<=n<=#n +protate 0 l = l; +protate n::int l = cat [(drop n l),(take n l)]; + +// rotate n items, generalisation of "rotate the bits instruction" +// example: head (nrotate (-33) (0..23)); +// what time is 33 hrs before midnight? 15 hrs. The clock was moved -9 = -33 mod 24 +nrotate n::int l = protate nm l when ll = #l; nm = ll + (n mod ll) end if n<0; + = protate nm l when nm = n mod #l end; + +// interpret any nonzero result as true: prevents errors in conditions +nonzero 0 = 0; +nonzero x = 1; + +// The Queens problem: +// the solution is only the rows permutation, without the ordered columns (1..n). +// full 2D board coordinates can be produced with: zip (1..n) (queens n); +safe _ _ [] = 1; +safe id::int j::int (j2::int:l) = if (j==j2) || (id==j2-j) || (id==j-j2) then 0 + else safe (id+1) j l; + +queens n::int = list (search n n n []) + with + search _ 0 _ _ = (); // last i, solved + search _ _ 0 _ = 0; // fail, run out of alternative js + search n::int i::int j::int p = + if nonzero solution then j,solution // new i led to a solution + else search n i (j-1) p // or it failed, try another j + when solution = search n (i-1) n (j:p); end if safe 1 j p; + = search n i (j-1) p // also try another j when unsafe + end; + +// this concise backtracking tailqueens throw a single solution +tailqueens n::int = catch id (srch n n n []) + with srch _ 0 _ p = throw p; srch _ _ 0 _ = 0; + srch n::int i::int j::int p = () if safe 1 j p && nonzero (srch n (i-1) n (j:p)); + = srch n i (j-1) p end; + +// thequeens encodes my no search solution which is my original discovery, +// to my knowledge the simplest known algorithm for this kind of a problem. +// there always exists one fundamental centre-symmetrical solution of this form, +// representing an orbit of just four solutions, instead of the usual eight. +// these few lines of code are self-contained (not calling any square checking). +thequeens 1 = [0]; thequeens n::int = no solution if n<4; +thequeens n::int = map (\x-> newsquare n x) (0..(n-1)) + with newsquare n::int x::int = (start+2*x) mod n if x < halfn; + = (start2+2*(x-halfn)) mod n end //reflections + when halfn = n div 2; + start = if (n mod 3) then (halfn-1) else 1; // (n mod 3) == 0 is special + start2 = n-((start + 2*(halfn-1)) mod n)-1 end if (n mod 2)==0; // all even boards + = 0:(map (\x->1+x)(thequeens (n-1))); // corner start solves odd size boards + +// row numbering in thequeens was changed to the "C style" e.g. 0..7. +// full board coordinates, e.g. (1..8) x (1..8) can be reconstructed with: +fullboard simple = zip (1..(#simple)) (map (\x->1+x) simple); + +// checks one queens solution either in 0..7 encoding or in 1..8 encoding. +// returns 1 for a valid solution, 0 otherwise +checkqs [] = 1; +checkqs (s::int:l) = if safe 1 s l then checkqs l else 0; + +// conducts an exhaustive test of boards of all sizes from min to max, e.g. >queenstest (4..1000); +// test _ min::int max::int = second argument must be greater than the first if min>=max; +queenstest [] = 1; +queenstest (h:l) = if checkqs (thequeens h) then queenstest l else 0; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 19:43:15
|
Revision: 188 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=188&view=rev Author: agraef Date: 2008-06-06 12:43:21 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Update NEWS. Modified Paths: -------------- pure/trunk/NEWS Modified: pure/trunk/NEWS =================================================================== --- pure/trunk/NEWS 2008-06-06 19:35:34 UTC (rev 187) +++ pure/trunk/NEWS 2008-06-06 19:43:21 UTC (rev 188) @@ -2,14 +2,15 @@ ** Pure 0.3 2008-06-06 This release sports a lot of improvements as well as bug and portability -fixes, see the ChangeLog for details. The build system has gone through a -major overhaul, adding autoconf support. 64 bit support has been improved, and -Pure now also works on MS Windows. Moreover, many library functions have been -rewritten to make them tail-recursive, and some new functions have been added. -Last but not least, the runtime support is now implemented as a separate -shared library which makes it possible to link external modules against the -runtime, and reduces the memory footprint when multiple instances of the -interpreter are run as different processes. +fixes, see the ChangeLog for details. Many memory leaks have been plugged, and +tail call elimination has been improved a lot. The build system has gone +through a major overhaul, adding autoconf support. 64 bit support has been +improved as well, and Pure now builds and runs fine on MS Windows. Many +library functions have been rewritten to make them tail-recursive, and some +new functions have been added. Last but not least, the runtime support is now +implemented as a separate shared library which makes it possible to link +external modules against the runtime, and reduces the memory footprint when +multiple instances of the interpreter are run as different processes. Special thanks to Tim Haynes, John Lunney, Eddie Rucker, Ryan Schmidt, Libor Spacek and Jiri Spitz for contributions, suggestions and bug reports. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 19:35:25
|
Revision: 187 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=187&view=rev Author: agraef Date: 2008-06-06 12:35:34 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Update NEWS. Modified Paths: -------------- pure/trunk/NEWS Modified: pure/trunk/NEWS =================================================================== --- pure/trunk/NEWS 2008-06-06 19:34:04 UTC (rev 186) +++ pure/trunk/NEWS 2008-06-06 19:35:34 UTC (rev 187) @@ -11,8 +11,8 @@ runtime, and reduces the memory footprint when multiple instances of the interpreter are run as different processes. -Special thanks are due to Tim Haynes, John Lunney, Eddie Rucker, Libor Spacek -and Jiri Spitz for contributions, suggestions and bug reports. +Special thanks to Tim Haynes, John Lunney, Eddie Rucker, Ryan Schmidt, Libor +Spacek and Jiri Spitz for contributions, suggestions and bug reports. ** Pure 0.2 2008-05-04 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 19:33:57
|
Revision: 186 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=186&view=rev Author: agraef Date: 2008-06-06 12:34:04 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Update NEWS. Modified Paths: -------------- pure/trunk/NEWS Modified: pure/trunk/NEWS =================================================================== --- pure/trunk/NEWS 2008-06-06 19:33:39 UTC (rev 185) +++ pure/trunk/NEWS 2008-06-06 19:34:04 UTC (rev 186) @@ -1,4 +1,19 @@ +** Pure 0.3 2008-06-06 + +This release sports a lot of improvements as well as bug and portability +fixes, see the ChangeLog for details. The build system has gone through a +major overhaul, adding autoconf support. 64 bit support has been improved, and +Pure now also works on MS Windows. Moreover, many library functions have been +rewritten to make them tail-recursive, and some new functions have been added. +Last but not least, the runtime support is now implemented as a separate +shared library which makes it possible to link external modules against the +runtime, and reduces the memory footprint when multiple instances of the +interpreter are run as different processes. + +Special thanks are due to Tim Haynes, John Lunney, Eddie Rucker, Libor Spacek +and Jiri Spitz for contributions, suggestions and bug reports. + ** Pure 0.2 2008-05-04 On the heels of Pure 0.1 comes the first bugfix release which addresses a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 19:33:34
|
Revision: 185 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=185&view=rev Author: agraef Date: 2008-06-06 12:33:39 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Fix typo. Modified Paths: -------------- pure/trunk/ChangeLog Modified: pure/trunk/ChangeLog =================================================================== --- pure/trunk/ChangeLog 2008-06-06 19:10:31 UTC (rev 184) +++ pure/trunk/ChangeLog 2008-06-06 19:33:39 UTC (rev 185) @@ -15,7 +15,7 @@ 2008-05-28 Albert Graef <Dr....@t-...> - * interpreter.cc, runtime.cc: Optimization pure_freenew calls. + * interpreter.cc, runtime.cc: Optimization of pure_freenew calls. * lib/strings.pure: Make 'cycle' work on strings. Reported by Eddie Rucker. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 19:10:24
|
Revision: 184 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=184&view=rev Author: agraef Date: 2008-06-06 12:10:31 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Update installation instructions. Modified Paths: -------------- pure/trunk/INSTALL Modified: pure/trunk/INSTALL =================================================================== --- pure/trunk/INSTALL 2008-06-06 18:04:15 UTC (rev 183) +++ pure/trunk/INSTALL 2008-06-06 19:10:31 UTC (rev 184) @@ -4,18 +4,18 @@ These instructions (mostly by courtesy of Eddie Rucker, thanks Eddie!) explain how to compile and install LLVM (which is the compiler backend required by -Pure) and the Pure interpreter itself. The instructions are for Linux and -similar, Unix-like systems; the SYSTEM NOTES section at the end of this file -details the tweaks necessary to make Pure compile and run on various other -platforms. More information about installing LLVM and the required LLVM source -packages can be found at http://llvm.org. +Pure) and the Pure interpreter itself. The instructions are somewhat biased +towards Linux and other Unix-like systems; the SYSTEM NOTES section at the end +of this file details the tweaks necessary to make Pure compile and run on +various other platforms. More information about installing LLVM and the +required LLVM source packages can be found at http://llvm.org. -Pure is known to work on Linux and Mac OSX, and should compile (with the usual -amount of tweaking) on all UNIX/POSIX-based platforms. We recommend using -version 4.x of the GNU C++ compiler; it should be available almost everywhere -(in fact, since you'll need LLVM anyway, you can also use the gcc frontend -available for LLVM). You'll also need a Bourne-compatible shell and GNU make, -which are also readily available on most platforms. +Pure is known to work on Linux, Mac OSX and MS Windows, and should compile +(with the usual amount of tweaking) on all recent UNIX/POSIX-based platforms. +We recommend using version 4.x of the GNU C++ compiler; it should be available +almost everywhere (in fact, since you'll need LLVM anyway, you can also use +the gcc frontend available for LLVM). You'll also need a Bourne-compatible +shell and GNU make, which are also readily available on most platforms. BASIC INSTALLATION @@ -325,9 +325,10 @@ ====== ===== Pure is known to work on recent Linux and Mac OSX versions under x86, x86-64 -and ppc, but there are a few system-specific quirks which are discussed below. -(Please also see the CAVEATS AND NOTES section of the manual page for -information on other known limitations of the current implementation.) +and ppc, as well as on MS Windows XP, but there are a few system-specific +quirks which are discussed below. (Please also see the CAVEATS AND NOTES +section of the manual page for information on other known limitations of the +current implementation.) ALL PLATFORMS --- --------- @@ -375,8 +376,8 @@ MAC OSX --- --- -Pure has been reported to work on OSX just fine. A port by Ryan Schmidt exists -in the MacPorts collection, see http://www.macports.org/. +Pure has been reported to work on OSX, and a port by Ryan Schmidt exists in +the MacPorts collection, see http://www.macports.org/. Note that with at least some current versions of the Apple gcc compiler (4.0.1 and similar), with all warnings turned on you'll get the (bogus) warning @@ -389,12 +390,14 @@ MS WINDOWS -- ------- -Jiri Spitz is currently working on a Windows port using Mingw. Once this is -finished, we'll provide Windows installation instructions here. For the time -being, you can try it yourself; porting should be rather straightforward with -either Cygwin (http://www.cygwin.com/) or Mingw (http://www.mingw.org/), once -you have all the necessary dependencies and a suitable version of LLVM -installed. +Thanks to Jiri Spitz' perseverance, tireless testing and bug reports, the +latest sources compile and run fine on Windows, using the Mingw port of the +GNU C++ compiler and the MSys environment from http://www.mingw.org/. (Cygwin +from http://www.cygwin.com/ probably works as well, but this has not been +tested.) Just do the usual './configure && make && make install'. You'll need +LLVM, of course (which builds with Mingw just fine), and a few additional +libraries for which headers and precompiled binaries are available from the +Pure website (http://pure-lang.sf.net/). June 2008 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 18:04:08
|
Revision: 183 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=183&view=rev Author: agraef Date: 2008-06-06 11:04:15 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Updated ChangeLog. Modified Paths: -------------- pure/trunk/ChangeLog Modified: pure/trunk/ChangeLog =================================================================== --- pure/trunk/ChangeLog 2008-06-06 17:58:53 UTC (rev 182) +++ pure/trunk/ChangeLog 2008-06-06 18:04:15 UTC (rev 183) @@ -1,3 +1,9 @@ +2008-06-06 Albert Graef <Dr....@t-...> + + * configure.ac, etc.: Added autoconf support. Various fixes for 64 + bit and Windows compatibility. See the INSTALL file for updated + installation instructions. + 2008-06-01 Albert Graef <Dr....@t-...> * Makefile, interpreter.cc: Put the runtime and interpreter into a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 17:58:46
|
Revision: 182 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=182&view=rev Author: agraef Date: 2008-06-06 10:58:53 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Windows compatibility fixes. Modified Paths: -------------- pure/trunk/Makefile.in pure/trunk/config.h.in pure/trunk/configure pure/trunk/configure.ac pure/trunk/interpreter.cc pure/trunk/runtime.cc pure/trunk/runtime.h Modified: pure/trunk/Makefile.in =================================================================== --- pure/trunk/Makefile.in 2008-06-06 17:12:35 UTC (rev 181) +++ pure/trunk/Makefile.in 2008-06-06 17:58:53 UTC (rev 182) @@ -54,7 +54,7 @@ LLVM_LIBS = `llvm-config --ldflags --libs core jit native` CPPFLAGS = @CPPFLAGS@ $(LLVM_FLAGS) -CXXFLAGS = @CXXFLAGS@ -Wall +CXXFLAGS = @CXXFLAGS@ # Pure library name. Currently we use a simple versioning scheme, which # requires that the library version matches that of the interpreter. With some @@ -75,6 +75,16 @@ SHARED = @SHARED@ +# Auxiliary libraries to be loaded at runtime. Usually this is just libpure +# (when built), but on some systems we have to load additional dlls to resolve +# some library functions. + +ifeq ($(SHARED), yes) +AUXLIBS = -DLIBPURE='"$(libpure)"' @AUXLIBS@ +else +AUXLIBS = @AUXLIBS@ +endif + # No need to edit below this line. Unless you really have to. :) ############ SOURCE = expr.cc expr.hh funcall.h interpreter.cc interpreter.hh lexer.ll \ @@ -111,6 +121,9 @@ pure.o: pure.cc $(CXX) $(CXXFLAGS) $(CPPFLAGS) -DPURELIB='"$(libdir)/pure"' -c -o $@ $< +interpreter.o: interpreter.cc + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(AUXLIBS) -c -o $@ $< + lexer.cc: lexer.ll flex -o lexer.cc $< Modified: pure/trunk/config.h.in =================================================================== --- pure/trunk/config.h.in 2008-06-06 17:12:35 UTC (rev 181) +++ pure/trunk/config.h.in 2008-06-06 17:58:53 UTC (rev 182) @@ -3,6 +3,9 @@ /* Define if you have the iconv() function. */ #undef HAVE_ICONV +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET @@ -21,6 +24,30 @@ /* Define to 1 if you have the `regex' library (-lregex). */ #undef HAVE_LIBREGEX +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + /* Define to the name of the host system. */ #undef HOST @@ -41,3 +68,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION + +/* The size of `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS Modified: pure/trunk/configure =================================================================== --- pure/trunk/configure 2008-06-06 17:12:35 UTC (rev 181) +++ pure/trunk/configure 2008-06-06 17:58:53 UTC (rev 182) @@ -576,6 +576,42 @@ PACKAGE_STRING='pure 0.3' PACKAGE_BUGREPORT='' +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif" + ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME @@ -623,6 +659,7 @@ host_os RDYNAMIC DLLEXT +AUXLIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA @@ -633,10 +670,13 @@ ac_ct_CXX EXEEXT OBJEXT -SHARED CC CFLAGS ac_ct_CC +CPP +GREP +EGREP +SHARED LIBICONV LIBOBJS LTLIBOBJS' @@ -651,7 +691,8 @@ CPPFLAGS CCC CC -CFLAGS' +CFLAGS +CPP' # Initialize some variables set by options. @@ -1230,6 +1271,7 @@ --enable-debug enable the debug build --enable-debug2 enable the maintenance build --disable-shared link the interpreter statically + --enable-warnings enable compiler warnings (-Wall) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1246,6 +1288,7 @@ you have headers in a nonstandard directory <include dir> CC C compiler command CFLAGS C compiler flags + CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1804,9 +1847,12 @@ RDYNAMIC= DLLEXT=".so" +AUX_LIBS= case "$host" in - *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS="$LIBS -limagehlp -lpsapi"; - LDFLAGS="-Wl,--enable-auto-import"; DLLEXT=".dll";; + *-*-mingw*) RDYNAMIC="-rdynamic"; DLLEXT=".dll"; + AUXLIBS="-DLIBGLOB='\"libglob.dll\"' -DLIBREGEX='\"libgnurx-0.dll\"'"; + LIBS="$LIBS -limagehlp -lpsapi"; + LDFLAGS="-Wl,--enable-auto-import";; *-*-linux*) RDYNAMIC="-rdynamic";; *-*-freebsd*) RDYNAMIC="-rdynamic";; *-*-darwin*) DLLEXT=".dylib";; @@ -1814,6 +1860,7 @@ esac + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -2501,36 +2548,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Check whether --enable-release was given. -if test "${enable_release+set}" = set; then - enableval=$enable_release; case "${enableval}" in - yes) CPPFLAGS="-DNDEBUG -DDEBUG=0"; CXXFLAGS="-O3" ;; - esac -fi - -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then - enableval=$enable_debug; case "${enableval}" in - yes) CXXFLAGS="-g" ;; - esac -fi - -# Check whether --enable-debug2 was given. -if test "${enable_debug2+set}" = set; then - enableval=$enable_debug2; case "${enableval}" in - yes) CPPFLAGS="-DDEBUG=2"; CXXFLAGS="-g" ;; - esac -fi - -SHARED=yes -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; case "${enableval}" in - no) LDFLAGS="$LDFLAGS $RDYNAMIC"; SHARED=no ;; - esac -fi - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3208,45 +3225,611 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ echo "$as_me:$LINENO: checking for __gmpz_init in -lgmp" >&5 -echo $ECHO_N "checking for __gmpz_init in -lgmp... $ECHO_C" >&6; } -if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmp $LIBS" -cat >conftest.$ac_ext <<_ACEOF + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __gmpz_init (); int main () { -return __gmpz_init (); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 @@ -3254,69 +3837,158 @@ (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_gmp___gmpz_init=yes + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_gmp___gmpz_init=no + eval "$as_ac_Header=no" fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5 -echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_init" >&6; } -if test $ac_cv_lib_gmp___gmpz_init = yes; then +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGMP 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - LIBS="-lgmp $LIBS" +fi +done + + +{ echo "$as_me:$LINENO: checking for void *" >&5 +echo $ECHO_N "checking for void *... $ECHO_C" >&6; } +if test "${ac_cv_type_void_p+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef void * ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_void_p=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_void_p=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 +echo "${ECHO_T}$ac_cv_type_void_p" >&6; } -{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 -echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; } -if test "${ac_cv_lib_readline_readline+set}" = set; then +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of void *" >&5 +echo $ECHO_N "checking size of void *... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBS" + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default + typedef void * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char readline (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef void * ac__type_sizeof_; int main () { -return readline (); +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3325,39 +3997,320 @@ (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_readline_readline=yes + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_readline_readline=no + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef void * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef void * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; } -if test $ac_cv_lib_readline_readline = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBREADLINE 1 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef void * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 - LIBS="-lreadline $LIBS" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') if test "$ac_cv_type_void_p" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef void * ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ -{ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 -echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6; } -if test "${ac_cv_lib_iconv_iconv+set}" = set; then + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_void_p=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_void_p" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_void_p=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF + + +# Check whether --enable-release was given. +if test "${enable_release+set}" = set; then + enableval=$enable_release; case "${enableval}" in + yes) CPPFLAGS="-DNDEBUG -DDEBUG=0"; CXXFLAGS="-O3" ;; + esac +fi + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; case "${enableval}" in + yes) CXXFLAGS="-g" ;; + esac +fi + +# Check whether --enable-debug2 was given. +if test "${enable_debug2+set}" = set; then + enableval=$enable_debug2; case "${enableval}" in + yes) CPPFLAGS="-DDEBUG=2"; CXXFLAGS="-g" ;; + esac +fi + +SHARED=yes +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; case "${enableval}" in + no) LDFLAGS="$LDFLAGS $RDYNAMIC"; SHARED=no ;; + esac +fi + + +# Check whether --enable-warnings was given. +if test "${enable_warnings+set}" = set; then + enableval=$enable_warnings; case "${enableval}" in + yes) CXXFLAGS="$CXXFLAGS -Wall" ;; + esac +fi + + +{ echo "$as_me:$LINENO: checking for __gmpz_init in -lgmp" >&5 +echo $ECHO_N "checking for __gmpz_init in -lgmp... $ECHO_C" >&6; } +if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-liconv $LIBS" +LIBS="-lgmp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3371,11 +4324,11 @@ #ifdef __cplusplus extern "C" #endif -char iconv (); +char __gmpz_init (); int main () { -return iconv (); +return __gmpz_init (); ; return 0; } @@ -3398,38 +4351,37 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_iconv_iconv=yes + ac_cv_lib_gmp___gmpz_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_iconv_iconv=no + ac_cv_lib_gmp___gmpz_init=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5 -echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6; } -if test $ac_cv_lib_iconv_iconv = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5 +echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_init" >&6; } +if test $ac_cv_lib_gmp___gmpz_init = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBICONV 1 +#define HAVE_LIBGMP 1 _ACEOF - LIBS="-liconv $LIBS" + LIBS="-lgmp $LIBS" fi -if test $ac_cv_lib_iconv_iconv = no; then -{ echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5 -echo $ECHO_N "checking for libiconv in -liconv... $ECHO_C" >&6; } -if test "${ac_cv_lib_iconv_libiconv+set}" = set; then +{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 +echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; } +if test "${ac_cv_lib_readline_readline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-liconv $LIBS" +LIBS="-lreadline $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3443,11 +4395,11 @@ #ifdef __cplusplus extern "C" #endif -char libiconv (); +char readline (); int main () { -return libiconv (); +return readline (); ; return 0; } @@ -3470,38 +4422,37 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_iconv_libiconv=yes + ac_cv_lib_readline_readline=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_iconv_libiconv=no + ac_cv_lib_readline_readline=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv" >&5 -echo "${ECHO_T}$ac_cv_lib_iconv_libiconv" >&6; } -if test $ac_cv_lib_iconv_libiconv = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; } +if test $ac_cv_lib_readline_readline = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBICONV 1 +#define HAVE_LIBREADLINE 1 _ACEOF - LIBS="-liconv $LIBS" + LIBS="-lreadline $LIBS" fi -fi -{ echo "$as_me:$LINENO: checking for glob in -lglob" >&5 -echo $ECHO_N "checking for glob in -lglob... $ECHO_C" >&6; } -if test "${ac_cv_lib_glob_glob+set}" = set; then +{ echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5 +echo $ECHO_N "checking for libiconv in -liconv... $ECHO_C" >&6; } +if test "${ac_cv_lib_iconv_libiconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lglob $LIBS" +LIBS="-liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3515,11 +4466,11 @@ #ifdef __cplusplus extern "C" #endif -char glob (); +char libiconv (); int main () { -return glob (); +return libiconv (); ; return 0; } @@ -3542,38 +4493,38 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_glob_glob=yes + ac_cv_lib_iconv_libiconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_glob_glob=no + ac_cv_lib_iconv_libiconv=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_glob_glob" >&5 -echo "${ECHO_T}$ac_cv_lib_glob_glob" >&6; } -if test $ac_cv_lib_glob_glob = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv" >&5 +echo "${ECHO_T}$ac_cv_lib_iconv_libiconv" >&6; } +if test $ac_cv_lib_iconv_libiconv = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGLOB 1 +#define HAVE_LIBICONV 1 _ACEOF - LIBS="-lglob $LIBS" + LIBS="-liconv $LIBS" fi -if test $ac_cv_lib_glob_glob = no; then +if test $ac_cv_lib_iconv_libiconv = no; then -{ echo "$as_me:$LINENO: checking for xxglob in -lglob" >&5 -echo $ECHO_N "checking for xxglob in -lglob... $ECHO_C" >&6; } -if test "${ac_cv_lib_glob_xxglob+set}" = set; then +{ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 +echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6; } +if test "${ac_cv_lib_iconv_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lglob $LIBS" +LIBS="-liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3587,11 +4538,11 @@ #ifdef __cplusplus extern "C" #endif -char xxglob (); +char iconv (); int main () { -return xxglob (); +return iconv (); ; return 0; } @@ -3614,38 +4565,38 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_glob_xxglob=yes + ac_cv_lib_iconv_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_glob_xxglob=no + ac_cv_lib_iconv_iconv=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_glob_xxglob" >&5 -echo "${ECHO_T}$ac_cv_lib_glob_xxglob" >&6; } -if test $ac_cv_lib_glob_xxglob = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5 +echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6; } +if test $ac_cv_lib_iconv_iconv = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGLOB 1 +#define HAVE_LIBICONV 1 _ACEOF - LIBS="-lglob $LIBS" + LIBS="-liconv $LIBS" fi fi -{ echo "$as_me:$LINENO: checking for regcomp in -lregex" >&5 -echo $ECHO_N "checking for regcomp in -lregex... $ECHO_C" >&6; } -if test "${ac_cv_lib_regex_regcomp+set}" = set; then +{ echo "$as_me:$LINENO: checking for glob in -lglob" >&5 +echo $ECHO_N "checking for glob in -lglob... $ECHO_C" >&6; } +if test "${ac_cv_lib_glob_glob+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lregex $LIBS" +LIBS="-lglob $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3659,11 +4610,11 @@ #ifdef __cplusplus extern "C" #endif -char regcomp (); +char glob (); int main () { -return regcomp (); +return glob (); ; return 0; } @@ -3686,34 +4637,33 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_regex_regcomp=yes + ac_cv_lib_glob_glob=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_regex_regcomp=no + ac_cv_lib_glob_glob=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_regex_regcomp" >&5 -echo "${ECHO_T}$ac_cv_lib_regex_regcomp" >&6; } -if test $ac_cv_lib_regex_regcomp = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_glob_glob" >&5 +echo "${ECHO_T}$ac_cv_lib_glob_glob" >&6; } +if test $ac_cv_lib_glob_glob = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBREGEX 1 +#define HAVE_LIBGLOB 1 _ACEOF - LIBS="-lregex $LIBS" + LIBS="-lglob $LIBS" fi -if test $ac_cv_lib_regex_regcomp = no; then -{ echo "$as_me:$LINENO: checking for xxregcomp in -lregex" >&5 -echo $ECHO_N "checking for xxregcomp in -lregex... $ECHO_C" >&6; } -if test "${ac_cv_lib_regex_xxregcomp+set}" = set; then +{ echo "$as_me:$LINENO: checking for regcomp in -lregex" >&5 +echo $ECHO_N "checking for regcomp in -lregex... $ECHO_C" >&6; } +if test "${ac_cv_lib_regex_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3731,11 +4681,11 @@ #ifdef __cplusplus extern "C" #endif -char xxregcomp (); +char regcomp (); int main () { -return xxregcomp (); +return regcomp (); ; return 0; } @@ -3758,21 +4708,21 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_regex_xxregcomp=yes + ac_cv_lib_regex_regcomp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_regex_xxregcomp=no + ac_cv_lib_regex_regcomp=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_regex_xxregcomp" >&5 -echo "${ECHO_T}$ac_cv_lib_regex_xxregcomp" >&6; } -if test $ac_cv_lib_regex_xxregcomp = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_regex_regcomp" >&5 +echo "${ECHO_T}$ac_cv_lib_regex_regcomp" >&6; } +if test $ac_cv_lib_regex_regcomp = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBREGEX 1 _ACEOF @@ -3781,7 +4731,6 @@ fi -fi am_cv_lib_iconv_ldpath= @@ -4718,6 +5667,7 @@ host_os!$host_os$ac_delim RDYNAMIC!$RDYNAMIC$ac_delim DLLEXT!$DLLEXT$ac_delim +AUXLIBS!$AUXLIBS$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim @@ -4728,16 +5678,19 @@ ac_ct_CXX!$ac_ct_CXX$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim -SHARED!$SHARED$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +SHARED!$SHARED$ac_delim LIBICONV!$LIBICONV$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Modified: pure/trunk/configure.ac =================================================================== --- pure/trunk/configure.ac 2008-06-06 17:12:35 UTC (rev 181) +++ pure/trunk/configure.ac 2008-06-06 17:58:53 UTC (rev 182) @@ -11,9 +11,12 @@ dnl Figure out extra build flags and filename extensions for various systems. RDYNAMIC= DLLEXT=".so" +AUX_LIBS= case "$host" in - *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS="$LIBS -limagehlp -lpsapi"; - LDFLAGS="-Wl,--enable-auto-import"; DLLEXT=".dll";; + *-*-mingw*) RDYNAMIC="-rdynamic"; DLLEXT=".dll"; + AUXLIBS="-DLIBGLOB='\"libglob.dll\"' -DLIBREGEX='\"libgnurx-0.dll\"'"; + LIBS="$LIBS -limagehlp -lpsapi"; + LDFLAGS="-Wl,--enable-auto-import";; *-*-linux*) RDYNAMIC="-rdynamic";; *-*-freebsd*) RDYNAMIC="-rdynamic";; *-*-darwin*) DLLEXT=".dylib";; @@ -21,9 +24,12 @@ esac AC_SUBST(RDYNAMIC) AC_SUBST(DLLEXT) +AC_SUBST(AUXLIBS) dnl Check for programs. AC_PROG_INSTALL AC_PROG_CXX +dnl Determine pointer sizes. This will be 8 on 64 bit systems. +AC_CHECK_SIZEOF(void *) dnl Parse --enable options. AC_ARG_ENABLE(release, [ --enable-release enable the release build], @@ -47,22 +53,24 @@ no) LDFLAGS="$LDFLAGS $RDYNAMIC"; SHARED=no ;; esac]) AC_SUBST(SHARED) +AC_ARG_ENABLE(warnings, + [ --enable-warnings enable compiler warnings (-Wall)], + [case "${enableval}" in + yes) CXXFLAGS="$CXXFLAGS -Wall" ;; + esac]) dnl Check for libraries. AC_CHECK_LIB(gmp, __gmpz_init) AC_CHECK_LIB(readline, readline) -dnl On some systems these are in separate libraries, and may have other names. -AC_CHECK_LIB(iconv, iconv) -if test $ac_cv_lib_iconv_iconv = no; then - AC_CHECK_LIB(iconv, libiconv) +dnl On some systems iconv is in a separate library, and may actually be named +dnl libiconv. +AC_CHECK_LIB(iconv, libiconv) +if test $ac_cv_lib_iconv_libiconv = no; then + AC_CHECK_LIB(iconv, iconv) fi +dnl On non-POSIX systems like Windows, we have to get the glob and regex +dnl functions from separate libraries, too. AC_CHECK_LIB(glob, glob) -if test $ac_cv_lib_glob_glob = no; then - AC_CHECK_LIB(glob, xxglob) -fi AC_CHECK_LIB(regex, regcomp) -if test $ac_cv_lib_regex_regcomp = no; then - AC_CHECK_LIB(regex, xxregcomp) -fi dnl iconv and nl_langinfo need special treatment (macros by Bruno Haible). AM_ICONV AM_LANGINFO_CODESET Modified: pure/trunk/interpreter.cc =================================================================== --- pure/trunk/interpreter.cc 2008-06-06 17:12:35 UTC (rev 181) +++ pure/trunk/interpreter.cc 2008-06-06 17:58:53 UTC (rev 182) @@ -11,6 +11,8 @@ #include <llvm/System/DynamicLibrary.h> #include <llvm/Transforms/Utils/BasicBlockUtils.h> +#include "config.h" + uint8_t interpreter::g_verbose = 0; bool interpreter::g_interactive = false; interpreter* interpreter::g_interp = 0; @@ -61,7 +63,17 @@ if (!g_interp) { g_interp = this; stackdir = c_stack_dir(); - llvm::sys::DynamicLibrary::LoadLibraryPermanently("libpure", 0); + // Preload some auxiliary dlls. First load the Pure library if we built it. +#ifdef LIBPURE + llvm::sys::DynamicLibrary::LoadLibraryPermanently(LIBPURE, 0); +#endif + // Additional stuff to be loaded on some systems (e.g., Windows). +#ifdef LIBGLOB + llvm::sys::DynamicLibrary::LoadLibraryPermanently(LIBGLOB, 0); +#endif +#ifdef LIBREGEX + llvm::sys::DynamicLibrary::LoadLibraryPermanently(LIBREGEX, 0); +#endif } sstk_sz = 0; sstk_cap = 0x10000; // 64K Modified: pure/trunk/runtime.cc =================================================================== --- pure/trunk/runtime.cc 2008-06-06 17:12:35 UTC (rev 181) +++ pure/trunk/runtime.cc 2008-06-06 17:58:53 UTC (rev 182) @@ -10,6 +10,7 @@ #include <iostream> #include <sstream> +#include "config.h" #include "funcall.h" // Hook to report stack overflows and other kinds of hard errors. @@ -1068,9 +1069,13 @@ case EXPR::INT: return x; case EXPR::BIGINT: return pure_int(mpz_get_ui(x->data.z)); case EXPR::DBL: return pure_int((int32_t)x->data.d); +#if SIZEOF_VOID_P==8 // Must cast to 64 bit here first, since on 64 bit systems g++ gives an // error when directly casting a 64 bit pointer to a 32 bit integer. case EXPR::PTR: return pure_int((uint32_t)(uint64_t)x->data.p); +#else + case EXPR::PTR: return pure_int((uint32_t)x->data.p); +#endif default: return 0; } } @@ -1097,13 +1102,19 @@ case EXPR::INT: return pure_pointer((void*)x->data.i); case EXPR::BIGINT: if (sizeof(mp_limb_t) == 8) +#if SIZEOF_VOID_P==8 return pure_pointer((void*)mpz_getlimbn(x->data.z, 0)); - else if (sizeof(void*) == 4) - return pure_pointer((void*)mpz_get_ui(x->data.z)); +#else + return pure_pointer((void*)(uint32_t)mpz_getlimbn(x->data.z, 0)); +#endif else { +#if SIZEOF_VOID_P==8 uint64_t u = mpz_getlimbn(x->data.z, 0) + (((uint64_t)mpz_getlimbn(x->data.z, 1))<<32); return pure_pointer((void*)u); +#else + return pure_pointer((void*)mpz_get_ui(x->data.z)); +#endif } default: return 0; } @@ -1113,21 +1124,24 @@ { if (sizeof(mp_limb_t) == 8) { // In this case the pointer value ought to fit into a single limb. +#if SIZEOF_VOID_P==8 limb_t u[1] = { (uint64_t)p }; +#else + limb_t u[1] = { (uint64_t)(uint32_t)p }; +#endif return pure_bigint(1, u); } // 4 byte limbs. - if (sizeof(void*) == 4) { - // 4 byte pointers. Note that we still cast to 64 bit first, since - // otherwise the code will give an error on 64 bit systems. - limb_t u[1] = { (uint32_t)(uint64_t)p }; - return pure_bigint(1, u); - } else { - // 8 byte pointers, put least significant word in the first limb. - assert(sizeof(void*) == 8); - limb_t u[2] = { (uint32_t)(uint64_t)p, (uint32_t)(((uint64_t)p)>>32) }; - return pure_bigint(2, u); - } +#if SIZEOF_VOID_P==8 + // 8 byte pointers, put least significant word in the first limb. + assert(sizeof(void*) == 8); + limb_t u[2] = { (uint32_t)(uint64_t)p, (uint32_t)(((uint64_t)p)>>32) }; + return pure_bigint(2, u); +#else + // 4 byte pointers. + limb_t u[1] = { (uint32_t)p }; + return pure_bigint(1, u); +#endif } extern "C" @@ -1604,7 +1618,21 @@ errno = value; } +#ifdef __MINGW32__ extern "C" +FILE *popen(const char *command, const char *type) +{ + return _popen(command, type); +} + +extern "C" +int pclose(FILE *stream) +{ + return _pclose(stream); +} +#endif + +extern "C" int pure_fprintf(FILE *fp, const char *format) { return fprintf(fp, format); Modified: pure/trunk/runtime.h =================================================================== --- pure/trunk/runtime.h 2008-06-06 17:12:35 UTC (rev 181) +++ pure/trunk/runtime.h 2008-06-06 17:58:53 UTC (rev 182) @@ -324,6 +324,13 @@ int pure_errno(void); void pure_set_errno(int value); +#ifdef __MINGW32__ +/* Windows compatibility. */ + +FILE *popen(const char *command, const char *type); +int pclose(FILE *stream); +#endif + /* printf/scanf support. Since we don't support calling C vararg functions from Pure right now, these little wrappers are provided to process at most one value at a time. It is the responsibility of the caller that the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 17:12:31
|
Revision: 181 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=181&view=rev Author: agraef Date: 2008-06-06 10:12:35 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Update installation instructions. Modified Paths: -------------- pure/trunk/INSTALL Modified: pure/trunk/INSTALL =================================================================== --- pure/trunk/INSTALL 2008-06-06 17:08:37 UTC (rev 180) +++ pure/trunk/INSTALL 2008-06-06 17:12:35 UTC (rev 181) @@ -259,6 +259,15 @@ is faster but the compiled interpreter is *much* slower (a factor of about 2 on my Linux box). Hence this build is only recommended for debugging purposes. +You can combine all build types with the following option to enable compiler +warnings (-Wall): + +$ ./configure --enable-warnings + +This option is useful to check the interpreter sources for questionable +constructs which might actually be bugs. However, for some older gcc versions +it spits out lots of bogus warnings, so it is not enabled by default. + In addition, there is an option to build a "monolithic" interpreter which is linked statically against the LLVM libraries, instead of producing a separate runtime library: @@ -323,9 +332,10 @@ ALL PLATFORMS --- --------- -Compiling the default and release versions using gcc will give you the warning -"dereferencing type-punned pointer will break strict-aliasing rules" at some -point in util.cc. This is harmless and can be ignored. +Compiling the default and release versions using gcc with all warnings turned +on (-Wall) will give you the warning "dereferencing type-punned pointer will +break strict-aliasing rules" at some point in util.cc. This is harmless and +can be ignored. If your Pure program runs out of stack space, the interpreter will segfault. This is *not* a bug, it happens because runtime stack checks are disabled by @@ -369,11 +379,12 @@ in the MacPorts collection, see http://www.macports.org/. Note that with at least some current versions of the Apple gcc compiler (4.0.1 -and similar) you'll get the (bogus) warning "control reaches end of non-void -function" a couple of times in interpreter.cc. These are due to a bug in older -gcc versions (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16558), but they -are harmless and can be ignored. These warnings should also go away once Apple -upgrades its SDK to a newer gcc version. +and similar), with all warnings turned on you'll get the (bogus) warning +"control reaches end of non-void function" a couple of times in +interpreter.cc. These are due to a bug in older gcc versions (see +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16558), but they are harmless and +can be ignored. These warnings should also go away once Apple upgrades its SDK +to a newer gcc version. MS WINDOWS -- ------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-06 17:08:31
|
Revision: 180 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=180&view=rev Author: agraef Date: 2008-06-06 10:08:37 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Add missing pclose function. Modified Paths: -------------- pure/trunk/lib/system.pure Modified: pure/trunk/lib/system.pure =================================================================== --- pure/trunk/lib/system.pure 2008-06-05 01:09:34 UTC (rev 179) +++ pure/trunk/lib/system.pure 2008-06-06 17:08:37 UTC (rev 180) @@ -69,7 +69,7 @@ extern FILE* fopen(char* name, char* mode); extern FILE* popen(char* cmd, char* mode); -extern int fclose(FILE* fp); +extern int fclose(FILE* fp), int pclose(FILE* fp); extern char* fgets(void* buf, int size, FILE* fp) = c_fgets; extern char* gets(void* buf) = c_gets; extern int fputs(char* s, FILE* fp), int puts(char* s); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-05 01:09:26
|
Revision: 179 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=179&view=rev Author: agraef Date: 2008-06-04 18:09:34 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Windows compatibility fixes. Modified Paths: -------------- pure/trunk/config.h.in pure/trunk/configure pure/trunk/configure.ac Modified: pure/trunk/config.h.in =================================================================== --- pure/trunk/config.h.in 2008-06-05 00:21:39 UTC (rev 178) +++ pure/trunk/config.h.in 2008-06-05 01:09:34 UTC (rev 179) @@ -12,6 +12,9 @@ /* Define to 1 if you have the `gmp' library (-lgmp). */ #undef HAVE_LIBGMP +/* Define to 1 if you have the `iconv' library (-liconv). */ +#undef HAVE_LIBICONV + /* Define to 1 if you have the `readline' library (-lreadline). */ #undef HAVE_LIBREADLINE Modified: pure/trunk/configure =================================================================== --- pure/trunk/configure 2008-06-05 00:21:39 UTC (rev 178) +++ pure/trunk/configure 2008-06-05 01:09:34 UTC (rev 179) @@ -1805,8 +1805,8 @@ RDYNAMIC= DLLEXT=".so" case "$host" in - *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS= "-limagehlp -lpsapi"; - DLLEXT=".dll";; + *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS="$LIBS -limagehlp -lpsapi"; + LDFLAGS="-Wl,--enable-auto-import"; DLLEXT=".dll";; *-*-linux*) RDYNAMIC="-rdynamic";; *-*-freebsd*) RDYNAMIC="-rdynamic";; *-*-darwin*) DLLEXT=".dylib";; @@ -3351,6 +3351,150 @@ fi +{ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 +echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6; } +if test "${ac_cv_lib_iconv_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char iconv (); +int +main () +{ +return iconv (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_iconv_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_iconv_iconv=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5 +echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6; } +if test $ac_cv_lib_iconv_iconv = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBICONV 1 +_ACEOF + + LIBS="-liconv $LIBS" + +fi + +if test $ac_cv_lib_iconv_iconv = no; then + +{ echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5 +echo $ECHO_N "checking for libiconv in -liconv... $ECHO_C" >&6; } +if test "${ac_cv_lib_iconv_libiconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char libiconv (); +int +main () +{ +return libiconv (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_iconv_libiconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_iconv_libiconv=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv" >&5 +echo "${ECHO_T}$ac_cv_lib_iconv_libiconv" >&6; } +if test $ac_cv_lib_iconv_libiconv = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBICONV 1 +_ACEOF + + LIBS="-liconv $LIBS" + +fi + +fi + { echo "$as_me:$LINENO: checking for glob in -lglob" >&5 echo $ECHO_N "checking for glob in -lglob... $ECHO_C" >&6; } if test "${ac_cv_lib_glob_glob+set}" = set; then @@ -3421,7 +3565,80 @@ fi +if test $ac_cv_lib_glob_glob = no; then +{ echo "$as_me:$LINENO: checking for xxglob in -lglob" >&5 +echo $ECHO_N "checking for xxglob in -lglob... $ECHO_C" >&6; } +if test "${ac_cv_lib_glob_xxglob+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lglob $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xxglob (); +int +main () +{ +return xxglob (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_glob_xxglob=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_glob_xxglob=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_glob_xxglob" >&5 +echo "${ECHO_T}$ac_cv_lib_glob_xxglob" >&6; } +if test $ac_cv_lib_glob_xxglob = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGLOB 1 +_ACEOF + + LIBS="-lglob $LIBS" + +fi + +fi + { echo "$as_me:$LINENO: checking for regcomp in -lregex" >&5 echo $ECHO_N "checking for regcomp in -lregex... $ECHO_C" >&6; } if test "${ac_cv_lib_regex_regcomp+set}" = set; then @@ -3492,8 +3709,81 @@ fi +if test $ac_cv_lib_regex_regcomp = no; then +{ echo "$as_me:$LINENO: checking for xxregcomp in -lregex" >&5 +echo $ECHO_N "checking for xxregcomp in -lregex... $ECHO_C" >&6; } +if test "${ac_cv_lib_regex_xxregcomp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lregex $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xxregcomp (); +int +main () +{ +return xxregcomp (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_regex_xxregcomp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_regex_xxregcomp=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_regex_xxregcomp" >&5 +echo "${ECHO_T}$ac_cv_lib_regex_xxregcomp" >&6; } +if test $ac_cv_lib_regex_xxregcomp = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBREGEX 1 +_ACEOF + + LIBS="-lregex $LIBS" + +fi + +fi + + am_cv_lib_iconv_ldpath= # Check whether --with-libiconv-prefix was given. Modified: pure/trunk/configure.ac =================================================================== --- pure/trunk/configure.ac 2008-06-05 00:21:39 UTC (rev 178) +++ pure/trunk/configure.ac 2008-06-05 01:09:34 UTC (rev 179) @@ -12,8 +12,8 @@ RDYNAMIC= DLLEXT=".so" case "$host" in - *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS= "-limagehlp -lpsapi"; - DLLEXT=".dll";; + *-*-mingw*) RDYNAMIC="-rdynamic"; LIBS="$LIBS -limagehlp -lpsapi"; + LDFLAGS="-Wl,--enable-auto-import"; DLLEXT=".dll";; *-*-linux*) RDYNAMIC="-rdynamic";; *-*-freebsd*) RDYNAMIC="-rdynamic";; *-*-darwin*) DLLEXT=".dylib";; @@ -50,9 +50,19 @@ dnl Check for libraries. AC_CHECK_LIB(gmp, __gmpz_init) AC_CHECK_LIB(readline, readline) -dnl On some systems these are in separate libraries. +dnl On some systems these are in separate libraries, and may have other names. +AC_CHECK_LIB(iconv, iconv) +if test $ac_cv_lib_iconv_iconv = no; then + AC_CHECK_LIB(iconv, libiconv) +fi AC_CHECK_LIB(glob, glob) +if test $ac_cv_lib_glob_glob = no; then + AC_CHECK_LIB(glob, xxglob) +fi AC_CHECK_LIB(regex, regcomp) +if test $ac_cv_lib_regex_regcomp = no; then + AC_CHECK_LIB(regex, xxregcomp) +fi dnl iconv and nl_langinfo need special treatment (macros by Bruno Haible). AM_ICONV AM_LANGINFO_CODESET This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-05 00:21:31
|
Revision: 178 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=178&view=rev Author: agraef Date: 2008-06-04 17:21:39 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Add missing files to distribution tarball. Modified Paths: -------------- pure/trunk/Makefile.in Modified: pure/trunk/Makefile.in =================================================================== --- pure/trunk/Makefile.in 2008-06-04 23:58:56 UTC (rev 177) +++ pure/trunk/Makefile.in 2008-06-05 00:21:39 UTC (rev 178) @@ -85,6 +85,7 @@ DISTFILES = COPYING ChangeLog INSTALL NEWS README TODO \ Makefile.in aclocal.m4 configure.ac configure config.h.in \ +config.guess config.sub install-sh \ $(SOURCE) $(EXTRA_SOURCE) w3centities.c pure.cc pure.1 pure.xml pure.vim \ examples/*.pure lib/*.pure test/*.pure test/*.log This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 23:58:48
|
Revision: 177 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=177&view=rev Author: agraef Date: 2008-06-04 16:58:56 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Provide host system information in the interpreter. Modified Paths: -------------- pure/trunk/interpreter.cc pure/trunk/interpreter.hh pure/trunk/pure.1 pure/trunk/pure.cc Modified: pure/trunk/interpreter.cc =================================================================== --- pure/trunk/interpreter.cc 2008-06-04 23:35:22 UTC (rev 176) +++ pure/trunk/interpreter.cc 2008-06-04 23:58:56 UTC (rev 177) @@ -297,9 +297,10 @@ } void interpreter::init_sys_vars(const string& version, + const string& host, const list<string>& argv) { - // command line arguments and version information + // command line arguments, system and version information pure_expr *args = pure_const(symtab.nil_sym().f); for (list<string>::const_reverse_iterator it = argv.rbegin(); it != argv.rend(); it++) { @@ -311,6 +312,7 @@ defn("argc", pure_int(argv.size())); defn("argv", args); defn("version", pure_cstring_dup(version.c_str())); + defn("sysinfo", pure_cstring_dup(host.c_str())); } // Errors and warnings. Modified: pure/trunk/interpreter.hh =================================================================== --- pure/trunk/interpreter.hh 2008-06-04 23:35:22 UTC (rev 176) +++ pure/trunk/interpreter.hh 2008-06-04 23:58:56 UTC (rev 177) @@ -245,6 +245,7 @@ virtual ~interpreter(); // Populate the global environment with some useful variables. void init_sys_vars(const string& version = "", + const string& host = "", const list<string>& argv = list<string>()); // Option data. You can modify these according to your needs. Modified: pure/trunk/pure.1 =================================================================== --- pure/trunk/pure.1 2008-06-04 23:35:22 UTC (rev 176) +++ pure/trunk/pure.1 2008-06-04 23:58:56 UTC (rev 177) @@ -67,7 +67,9 @@ .B argv variables. Moreover, the .B version -variable is set to the Pure interpreter version. +variable is set to the Pure interpreter version, and the +.B sysinfo +variable provides information about the host system. .PP If available, the prelude script .B prelude.pure @@ -902,8 +904,9 @@ > \fBlist\fP -lv argc var argc = 0; argv var argv = []; +sysinfo var sysinfo = "i686-pc-linux-gnu"; version var version = "0.1"; -3 variables +4 variables .fi .PP If you're like me then you'll frequently have to look up how some operations Modified: pure/trunk/pure.cc =================================================================== --- pure/trunk/pure.cc 2008-06-04 23:35:22 UTC (rev 176) +++ pure/trunk/pure.cc 2008-06-04 23:58:56 UTC (rev 177) @@ -18,6 +18,9 @@ using namespace std; +#ifndef HOST +#define HOST "unknown" +#endif #ifndef PACKAGE_VERSION #define PACKAGE_VERSION "0.0" #endif @@ -190,7 +193,8 @@ list<string> myargs; for (char **args = ++argv; *args; ++args) if (*args == string("-h")) { - cout << "Pure " << PACKAGE_VERSION << " " << COPYRIGHT << endl << USAGE; + cout << "Pure " << PACKAGE_VERSION << " (" << HOST << ") " + << COPYRIGHT << endl << USAGE; return 0; } else if (*args == string("-i")) force_interactive = true; @@ -212,7 +216,7 @@ interp.error(prog + ": invalid option " + *args); return 1; } - interp.init_sys_vars(PACKAGE_VERSION, myargs); + interp.init_sys_vars(PACKAGE_VERSION, HOST, myargs); if (want_prelude) { // load the prelude if we can find it FILE *fp = fopen("prelude.pure", "r"); @@ -252,7 +256,8 @@ interp.interactive = true; if (isatty(fileno(stdin))) { // connected to a terminal, print sign-on and initialize readline - cout << "Pure " << PACKAGE_VERSION << " " << COPYRIGHT << endl << LICENSE; + cout << "Pure " << PACKAGE_VERSION << " (" << HOST << ") " + << COPYRIGHT << endl << LICENSE; if (have_prelude) cout << "Loaded prelude from " << prelude << ".\n\n"; rl_readline_name = "Pure"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 23:35:17
|
Revision: 176 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=176&view=rev Author: agraef Date: 2008-06-04 16:35:22 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Some minor fixes in configury and build system, provide feedback about configure results. Modified Paths: -------------- pure/trunk/Makefile.in pure/trunk/config.h.in pure/trunk/configure pure/trunk/configure.ac Modified: pure/trunk/Makefile.in =================================================================== --- pure/trunk/Makefile.in 2008-06-04 22:49:01 UTC (rev 175) +++ pure/trunk/Makefile.in 2008-06-04 23:35:22 UTC (rev 176) @@ -37,6 +37,11 @@ EXE=@EXEEXT@ DLL=@DLLEXT@ +# Programs. + +CXX = @CXX@ +INSTALL = @INSTALL@ + # Linker flags and required libraries. These are determined automatically by # configure, but if necessary you can also change these on the command line. @@ -151,14 +156,14 @@ # installation install: pure$(EXE) - install -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)/pure $(DESTDIR)$(man1dir) - install pure$(EXE) $(DESTDIR)$(bindir)/pure$(EXE) + for x in $(addprefix $(DESTDIR), $(bindir) $(libdir)/pure $(man1dir)); do $(INSTALL) -d $$x; done + $(INSTALL) pure$(EXE) $(DESTDIR)$(bindir)/pure$(EXE) ifeq ($(SHARED), yes) - install $(libpure) $(DESTDIR)$(libdir)/$(libpure) + $(INSTALL) $(libpure) $(DESTDIR)$(libdir)/$(libpure) ln -sf $(libdir)/$(libpure) $(DESTDIR)$(libdir)/$(libpurelnk) endif - install -m 644 $(srcdir)/lib/*.pure $(DESTDIR)$(libdir)/pure - install -m 644 pure.1 $(DESTDIR)$(man1dir)/pure.1 + for x in $(srcdir)/lib/*.pure; do $(INSTALL) -m 644 $$x $(DESTDIR)$(libdir)/pure; done + $(INSTALL) -m 644 pure.1 $(DESTDIR)$(man1dir)/pure.1 uninstall: rm -rf $(DESTDIR)$(bindir)/pure$(EXE) $(DESTDIR)$(libdir)/$(libpure) $(DESTDIR)$(libdir)/$(libpurelnk) $(DESTDIR)$(libdir)/pure $(DESTDIR)$(man1dir)/pure.1 Modified: pure/trunk/config.h.in =================================================================== --- pure/trunk/config.h.in 2008-06-04 22:49:01 UTC (rev 175) +++ pure/trunk/config.h.in 2008-06-04 23:35:22 UTC (rev 176) @@ -18,7 +18,7 @@ /* Define to 1 if you have the `regex' library (-lregex). */ #undef HAVE_LIBREGEX -/* Define to the canonical host system name. */ +/* Define to the name of the host system. */ #undef HOST /* Define as const if the declaration of iconv() needs const. */ Modified: pure/trunk/configure =================================================================== --- pure/trunk/configure 2008-06-04 22:49:01 UTC (rev 175) +++ pure/trunk/configure 2008-06-04 23:35:22 UTC (rev 176) @@ -623,6 +623,9 @@ host_os RDYNAMIC DLLEXT +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA CXX CXXFLAGS LDFLAGS @@ -1811,6 +1814,86 @@ esac +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4137,6 +4220,7 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' +INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -4344,6 +4428,9 @@ host_os!$host_os$ac_delim RDYNAMIC!$RDYNAMIC$ac_delim DLLEXT!$DLLEXT$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim @@ -4360,7 +4447,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 61; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -4583,6 +4670,10 @@ # CONFIG_FILE # + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -4635,6 +4726,7 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out @@ -4784,3 +4876,30 @@ $ac_cs_success || { (exit 1); exit 1; } fi + +{ echo "$as_me:$LINENO: result: +Pure is now configured for ${host}. + + Source directory: ${srcdir} + Installation prefix: ${prefix} + Compiler: $CXX $CXXFLAGS $CPPFLAGS + Linker: $CXX $LDFLAGS $LIBS + Build libpure: $SHARED + +Now run 'make' to build everything, and 'make install' to install this +software on your system. To remove the installed software at a later +time use the 'make uninstall' command. +" >&5 +echo "${ECHO_T} +Pure is now configured for ${host}. + + Source directory: ${srcdir} + Installation prefix: ${prefix} + Compiler: $CXX $CXXFLAGS $CPPFLAGS + Linker: $CXX $LDFLAGS $LIBS + Build libpure: $SHARED + +Now run 'make' to build everything, and 'make install' to install this +software on your system. To remove the installed software at a later +time use the 'make uninstall' command. +" >&6; } Modified: pure/trunk/configure.ac =================================================================== --- pure/trunk/configure.ac 2008-06-04 22:49:01 UTC (rev 175) +++ pure/trunk/configure.ac 2008-06-04 23:35:22 UTC (rev 176) @@ -1,11 +1,12 @@ AC_INIT(pure, 0.3) AC_CONFIG_HEADERS(config.h) +dnl Determine host information. AC_CANONICAL_HOST if test -z "${host}"; then host=unknown fi -AC_DEFINE_UNQUOTED(HOST, "${host}", [Define to the canonical host system name.]) +AC_DEFINE_UNQUOTED(HOST, "${host}", [Define to the name of the host system.]) AC_SUBST(host) dnl Figure out extra build flags and filename extensions for various systems. RDYNAMIC= @@ -20,7 +21,10 @@ esac AC_SUBST(RDYNAMIC) AC_SUBST(DLLEXT) +dnl Check for programs. +AC_PROG_INSTALL AC_PROG_CXX +dnl Parse --enable options. AC_ARG_ENABLE(release, [ --enable-release enable the release build], [case "${enableval}" in @@ -43,13 +47,28 @@ no) LDFLAGS="$LDFLAGS $RDYNAMIC"; SHARED=no ;; esac]) AC_SUBST(SHARED) +dnl Check for libraries. AC_CHECK_LIB(gmp, __gmpz_init) AC_CHECK_LIB(readline, readline) dnl On some systems these are in separate libraries. AC_CHECK_LIB(glob, glob) AC_CHECK_LIB(regex, regcomp) -dnl iconv needs special treatment (macro pilfered from automake). +dnl iconv and nl_langinfo need special treatment (macros by Bruno Haible). AM_ICONV AM_LANGINFO_CODESET AC_CONFIG_FILES([Makefile]) AC_OUTPUT + +AC_MSG_RESULT([ +Pure is now configured for ${host}. + + Source directory: ${srcdir} + Installation prefix: ${prefix} + Compiler: $CXX $CXXFLAGS $CPPFLAGS + Linker: $CXX $LDFLAGS $LIBS + Build libpure: $SHARED + +Now run 'make' to build everything, and 'make install' to install this +software on your system. To remove the installed software at a later +time use the 'make uninstall' command. +]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 22:48:54
|
Revision: 175 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=175&view=rev Author: agraef Date: 2008-06-04 15:49:01 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Add host type information, so that configure can handle some host-specific kludges. Modified Paths: -------------- pure/trunk/Makefile.in pure/trunk/config.h.in pure/trunk/configure pure/trunk/configure.ac Added Paths: ----------- pure/trunk/config.guess pure/trunk/config.sub pure/trunk/install-sh Modified: pure/trunk/Makefile.in =================================================================== --- pure/trunk/Makefile.in 2008-06-04 22:47:13 UTC (rev 174) +++ pure/trunk/Makefile.in 2008-06-04 22:49:01 UTC (rev 175) @@ -3,12 +3,14 @@ SHELL = /bin/sh -# Package information. +# Package and host information. name = @PACKAGE_NAME@ version = @PACKAGE_VERSION@ dist = $(name)-$(version) +host = @host@ + # Source and installation paths. srcdir = @srcdir@ @@ -29,30 +31,18 @@ DESTDIR= -# OS-specific file suffixes. Windows (EXE=.exe, DLL=.dll) is handled -# automatically by configure, for other systems with unusual conventions set -# these as needed. +# OS-specific special filename extensions. configure tries to guess this, but +# if it guesses wrong, you can set these as needed. EXE=@EXEEXT@ -ifeq ($(EXE),.exe) -DLL=.dll -else -DLL=.so -endif +DLL=@DLLEXT@ # Linker flags and required libraries. These are determined automatically by -# configure. Use EXTRA_LIBS to add any additional platform-specific libraries -# that might be required. +# configure, but if necessary you can also change these on the command line. LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ $(EXTRA_LIBS) +LIBS = @LIBS@ -ifeq ($(EXE),.exe) -EXTRA_LIBS = -limagehlp -lpsapi -else -EXTRA_LIBS = -endif - # Compilation flags. LLVM_FLAGS = `llvm-config --cppflags` @@ -74,8 +64,9 @@ LIBPURE = -l$(libpure_vers) # Whether to build the Pure library. If this is set to anything but "yes", the -# interpreter will be linked statically. This is necessary on some systems -# where LLVM cannot be linked in dynamically. +# interpreter is linked statically and no separate runtime library is +# produced. This is necessary on some systems where LLVM cannot be linked in +# dynamically. SHARED = @SHARED@ Added: pure/trunk/config.guess =================================================================== --- pure/trunk/config.guess (rev 0) +++ pure/trunk/config.guess 2008-06-04 22:49:01 UTC (rev 175) @@ -0,0 +1,1513 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-01-15' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner <pe...@bo...>. +# Please send patches to <con...@gn...>. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <con...@gn...>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (gh...@no... 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # ak...@wp... (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Ric...@cc...> + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <he...@op...>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From se...@sw.... + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Pau...@st.... + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Pau...@st.... + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include <sys/param.h> +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 <<EOF +$0: unable to guess system type + +This script, last modified $timestamp, has failed to recognize +the operating system you are using. It is advised that you +download the most up to date version of the config scripts from + + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + +If the version you run ($0) is already up to date, please +send the following data and any information you think might be +pertinent to <con...@gn...> in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Property changes on: pure/trunk/config.guess ___________________________________________________________________ Name: svn:executable + * Modified: pure/trunk/config.h.in =================================================================== --- pure/trunk/config.h.in 2008-06-04 22:47:13 UTC (rev 174) +++ pure/trunk/config.h.in 2008-06-04 22:49:01 UTC (rev 175) @@ -18,6 +18,9 @@ /* Define to 1 if you have the `regex' library (-lregex). */ #undef HAVE_LIBREGEX +/* Define to the canonical host system name. */ +#undef HOST + /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST Added: pure/trunk/config.sub =================================================================== --- pure/trunk/config.sub (rev 0) +++ pure/trunk/config.sub 2008-06-04 22:49:01 UTC (rev 175) @@ -0,0 +1,1622 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-01-18' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to <con...@gn...>. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <con...@gn...>." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-... [truncated message content] |
From: <ag...@us...> - 2008-06-04 22:47:06
|
Revision: 174 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=174&view=rev Author: agraef Date: 2008-06-04 15:47:13 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Update installation instructions. Modified Paths: -------------- pure/trunk/INSTALL Modified: pure/trunk/INSTALL =================================================================== --- pure/trunk/INSTALL 2008-06-04 20:39:54 UTC (rev 173) +++ pure/trunk/INSTALL 2008-06-04 22:47:13 UTC (rev 174) @@ -219,7 +219,7 @@ compilation options to '-g' and adds '/opt/include' and '/opt/lib' to the include and library search paths, respectively: -$ CPPFLAGS=-I/opt/include CXXFLAGS=-g LDFLAGS=-L/opt/lib ./configure +$ ./configure CPPFLAGS=-I/opt/include CXXFLAGS=-g LDFLAGS=-L/opt/lib More details on the build and installation process and other available targets and options can be found in the Makefile. @@ -342,10 +342,9 @@ is that you get strange relocation errors when linking the runtime library during the build. In this case you have to build the interpreter as a monolithic executable which statically includes all required LLVM and the Pure -runtime modules. This can be done by configuring with './configure ---disable-shared'. This has several disadvantages, but seems to be the only -way to get Pure to work on x86-64 right now. Hopefully, these issues will be -fixed with the next LLVM release. +runtime modules, by configuring with --disable-shared. This has several +disadvantages, but seems to be the only way to get Pure to work on x86-64 +right now. Hopefully, these issues will be fixed with the next LLVM release. Also, for unknown reasons the debug build currently does *not* work on (some?) 64 bit systems using gcc. This has been seen on various different 64 bit Linux This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 20:39:48
|
Revision: 173 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=173&view=rev Author: agraef Date: 2008-06-04 13:39:54 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Update installation instructions. Modified Paths: -------------- pure/trunk/INSTALL Modified: pure/trunk/INSTALL =================================================================== --- pure/trunk/INSTALL 2008-06-04 09:22:34 UTC (rev 172) +++ pure/trunk/INSTALL 2008-06-04 20:39:54 UTC (rev 173) @@ -259,16 +259,20 @@ is faster but the compiled interpreter is *much* slower (a factor of about 2 on my Linux box). Hence this build is only recommended for debugging purposes. -In addition, there is an option --disable-shared to build an interpreter which -is linked statically against all required libraries, instead of producing a -separate runtime library. This works with all build types and is provided as a -temporary workaround for systems like 64 bit Linux where LLVM refuses to be -linked into shared libraries (see the notes on 64 bit systems in the NOTES -section below). This isn't recommended if you don't need it, since it -drastically increases the size of the executable and thereby the memory -footprint of the interpreter if several interpreter processes are running -simultaneously. +In addition, there is an option to build a "monolithic" interpreter which is +linked statically against the LLVM libraries, instead of producing a separate +runtime library: +$ ./configure --disable-shared + +This works with all build types and is provided as a temporary workaround for +systems like 64 bit Linux where LLVM refuses to be linked into shared +libraries (see the notes on 64 bit systems in the NOTES section below). Please +note, however, that it is *not* recommended to do this if you don't need it, +since it drastically increases the size of the executable and thereby the +memory footprint of the interpreter if several interpreter processes are +running simultaneously. + RUNNING PURE FROM THE SOURCE DIRECTORY ------- ---- ---- --- ------ --------- @@ -298,7 +302,7 @@ the latter if you know what you are doing, since it will remove files which require special tools to be regenerated.) -There are also a number of targets like 'html' and 'pdf' which generate the +There also are a number of targets like 'html' and 'pdf' which generate the documentation in a variety of formats (this requires groff); see the Makefile for details. @@ -337,8 +341,8 @@ doesn't like to be linked into shared libraries on x86-64 systems. The symptom is that you get strange relocation errors when linking the runtime library during the build. In this case you have to build the interpreter as a -monolithic executable which statically includes all required LLVM and Pure -interpreter modules. This can be done by configuring with './configure +monolithic executable which statically includes all required LLVM and the Pure +runtime modules. This can be done by configuring with './configure --disable-shared'. This has several disadvantages, but seems to be the only way to get Pure to work on x86-64 right now. Hopefully, these issues will be fixed with the next LLVM release. @@ -356,13 +360,14 @@ ----- Linux is the primary development platform for this software, and the sources -should build out of the box on all recent Linux distributions. +should build out of the box on all recent Linux distributions. (But note the +issues on x86-64 Linux systems described above.) MAC OSX --- --- -Pure works on OSX just fine. A port by Ryan Schmidt exists in the MacPorts -collection, see http://www.macports.org/. +Pure has been reported to work on OSX just fine. A port by Ryan Schmidt exists +in the MacPorts collection, see http://www.macports.org/. Note that with at least some current versions of the Apple gcc compiler (4.0.1 and similar) you'll get the (bogus) warning "control reaches end of non-void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 09:22:29
|
Revision: 172 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=172&view=rev Author: agraef Date: 2008-06-04 02:22:34 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Update installation instructions. Modified Paths: -------------- pure/trunk/INSTALL Modified: pure/trunk/INSTALL =================================================================== --- pure/trunk/INSTALL 2008-06-04 09:05:30 UTC (rev 171) +++ pure/trunk/INSTALL 2008-06-04 09:22:34 UTC (rev 172) @@ -259,6 +259,16 @@ is faster but the compiled interpreter is *much* slower (a factor of about 2 on my Linux box). Hence this build is only recommended for debugging purposes. +In addition, there is an option --disable-shared to build an interpreter which +is linked statically against all required libraries, instead of producing a +separate runtime library. This works with all build types and is provided as a +temporary workaround for systems like 64 bit Linux where LLVM refuses to be +linked into shared libraries (see the notes on 64 bit systems in the NOTES +section below). This isn't recommended if you don't need it, since it +drastically increases the size of the executable and thereby the memory +footprint of the interpreter if several interpreter processes are running +simultaneously. + RUNNING PURE FROM THE SOURCE DIRECTORY ------- ---- ---- --- ------ --------- @@ -323,16 +333,25 @@ 64 BIT SYSTEMS -- --- ------- -64 bit systems are fully supported by Pure. Alas, for unknown reasons the -debug build currently does *not* work on (some?) 64 bit systems using gcc. -This has been seen on various different 64 bit Linux versions, YMMV. You can -tell that you're bitten by this bug if, after running 'make debug' (or using -similar, custom compilation flags), 'make check' fails on most tests. -Fortunately, it seems that you can easily work around this by making sure that -you have at least -O enabled when compiling runtime.cc. Also please note that -the default and release builds should work fine. 32 bit builds also seem to be -unaffected. +64 bit systems are fully supported by Pure. However, LLVM 2.2 apparently +doesn't like to be linked into shared libraries on x86-64 systems. The symptom +is that you get strange relocation errors when linking the runtime library +during the build. In this case you have to build the interpreter as a +monolithic executable which statically includes all required LLVM and Pure +interpreter modules. This can be done by configuring with './configure +--disable-shared'. This has several disadvantages, but seems to be the only +way to get Pure to work on x86-64 right now. Hopefully, these issues will be +fixed with the next LLVM release. +Also, for unknown reasons the debug build currently does *not* work on (some?) +64 bit systems using gcc. This has been seen on various different 64 bit Linux +versions, YMMV. You can tell that you're bitten by this bug if a normal build +works, but 'make check' fails on most tests with the debug build (or if you +manually disable optimization). Fortunately, it seems that you can easily work +around this by making sure that you have at least -O enabled when compiling +runtime.cc. Also please note that the default and release builds should work +fine. 32 bit builds also seem to be unaffected. + LINUX ----- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 09:05:22
|
Revision: 171 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=171&view=rev Author: agraef Date: 2008-06-04 02:05:30 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Add option to link interpreter statically. Modified Paths: -------------- pure/trunk/Makefile.in pure/trunk/configure pure/trunk/configure.ac Modified: pure/trunk/Makefile.in =================================================================== --- pure/trunk/Makefile.in 2008-06-04 08:10:24 UTC (rev 170) +++ pure/trunk/Makefile.in 2008-06-04 09:05:30 UTC (rev 171) @@ -73,6 +73,12 @@ libpurelnk = lib$(libpure_base)$(DLL) LIBPURE = -l$(libpure_vers) +# Whether to build the Pure library. If this is set to anything but "yes", the +# interpreter will be linked statically. This is necessary on some systems +# where LLVM cannot be linked in dynamically. + +SHARED = @SHARED@ + # No need to edit below this line. Unless you really have to. :) ############ SOURCE = expr.cc expr.hh funcall.h interpreter.cc interpreter.hh lexer.ll \ @@ -93,8 +99,13 @@ all: pure$(EXE) +ifeq ($(SHARED), yes) pure$(EXE): pure.o $(libpure) $(CXX) -o $@ $(LDFLAGS) pure.o -L. $(LIBPURE) $(LIBS) +else +pure$(EXE): pure.o $(OBJECT) + $(CXX) -o $@ $(LDFLAGS) pure.o $(OBJECT) $(LLVM_LIBS) $(LIBS) +endif $(libpure): $(OBJECT) $(CXX) -shared -o $@ $(LDFLAGS) $(OBJECT) $(LLVM_LIBS) $(LIBS) @@ -151,8 +162,10 @@ install: pure$(EXE) install -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)/pure $(DESTDIR)$(man1dir) install pure$(EXE) $(DESTDIR)$(bindir)/pure$(EXE) +ifeq ($(SHARED), yes) install $(libpure) $(DESTDIR)$(libdir)/$(libpure) ln -sf $(libdir)/$(libpure) $(DESTDIR)$(libdir)/$(libpurelnk) +endif install -m 644 $(srcdir)/lib/*.pure $(DESTDIR)$(libdir)/pure install -m 644 pure.1 $(DESTDIR)$(man1dir)/pure.1 Modified: pure/trunk/configure =================================================================== --- pure/trunk/configure 2008-06-04 08:10:24 UTC (rev 170) +++ pure/trunk/configure 2008-06-04 09:05:30 UTC (rev 171) @@ -620,6 +620,7 @@ ac_ct_CXX EXEEXT OBJEXT +SHARED CC CFLAGS ac_ct_CC @@ -1211,6 +1212,7 @@ --enable-release enable the release build --enable-debug enable the debug build --enable-debug2 enable the maintenance build + --disable-shared link the interpreter statically Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -2288,6 +2290,15 @@ esac fi +SHARED=yes +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; case "${enableval}" in + no) LDFLAGS=-rdynamic; SHARED=no ;; + esac +fi + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4181,6 +4192,7 @@ ac_ct_CXX!$ac_ct_CXX$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim +SHARED!$SHARED$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim @@ -4189,7 +4201,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 50; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 51; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Modified: pure/trunk/configure.ac =================================================================== --- pure/trunk/configure.ac 2008-06-04 08:10:24 UTC (rev 170) +++ pure/trunk/configure.ac 2008-06-04 09:05:30 UTC (rev 171) @@ -17,6 +17,13 @@ [case "${enableval}" in yes) CPPFLAGS="-DDEBUG=2"; CXXFLAGS="-g" ;; esac]) +SHARED=yes +AC_ARG_ENABLE(shared, + [ --disable-shared link the interpreter statically], + [case "${enableval}" in + no) LDFLAGS=-rdynamic; SHARED=no ;; + esac]) +AC_SUBST(SHARED) AC_CHECK_LIB(gmp, __gmpz_init) AC_CHECK_LIB(readline, readline) dnl On some systems these are in separate libraries. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 08:10:16
|
Revision: 170 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=170&view=rev Author: agraef Date: 2008-06-04 01:10:24 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Move -D options for build types to CPPFLAGS. Modified Paths: -------------- pure/trunk/configure pure/trunk/configure.ac Modified: pure/trunk/configure =================================================================== --- pure/trunk/configure 2008-06-04 08:09:18 UTC (rev 169) +++ pure/trunk/configure 2008-06-04 08:10:24 UTC (rev 170) @@ -2270,7 +2270,7 @@ # Check whether --enable-release was given. if test "${enable_release+set}" = set; then enableval=$enable_release; case "${enableval}" in - yes) CXXFLAGS="-O3 -DNDEBUG -DDEBUG=0" ;; + yes) CPPFLAGS="-DNDEBUG -DDEBUG=0"; CXXFLAGS="-O3" ;; esac fi @@ -2284,7 +2284,7 @@ # Check whether --enable-debug2 was given. if test "${enable_debug2+set}" = set; then enableval=$enable_debug2; case "${enableval}" in - yes) CXXFLAGS="-g -DDEBUG=2" ;; + yes) CPPFLAGS="-DDEBUG=2"; CXXFLAGS="-g" ;; esac fi Modified: pure/trunk/configure.ac =================================================================== --- pure/trunk/configure.ac 2008-06-04 08:09:18 UTC (rev 169) +++ pure/trunk/configure.ac 2008-06-04 08:10:24 UTC (rev 170) @@ -5,7 +5,7 @@ AC_ARG_ENABLE(release, [ --enable-release enable the release build], [case "${enableval}" in - yes) CXXFLAGS="-O3 -DNDEBUG -DDEBUG=0" ;; + yes) CPPFLAGS="-DNDEBUG -DDEBUG=0"; CXXFLAGS="-O3" ;; esac]) AC_ARG_ENABLE(debug, [ --enable-debug enable the debug build], @@ -15,7 +15,7 @@ AC_ARG_ENABLE(debug2, [ --enable-debug2 enable the maintenance build], [case "${enableval}" in - yes) CXXFLAGS="-g -DDEBUG=2" ;; + yes) CPPFLAGS="-DDEBUG=2"; CXXFLAGS="-g" ;; esac]) AC_CHECK_LIB(gmp, __gmpz_init) AC_CHECK_LIB(readline, readline) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 08:09:10
|
Revision: 169 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=169&view=rev Author: agraef Date: 2008-06-04 01:09:18 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Update installation instructions. Modified Paths: -------------- pure/trunk/INSTALL pure/trunk/README Modified: pure/trunk/INSTALL =================================================================== --- pure/trunk/INSTALL 2008-06-04 07:56:24 UTC (rev 168) +++ pure/trunk/INSTALL 2008-06-04 08:09:18 UTC (rev 169) @@ -363,6 +363,6 @@ installed. -May 2008 +June 2008 Albert Graef <Dr.Graef at t-online.de> Eddie Rucker <erucker at bmc.edu> Modified: pure/trunk/README =================================================================== --- pure/trunk/README 2008-06-04 07:56:24 UTC (rev 168) +++ pure/trunk/README 2008-06-04 08:09:18 UTC (rev 169) @@ -27,13 +27,11 @@ INSTALLATION Please see the INSTALL file for detailed instructions. On most Unix-like -systems, the usual 'make && sudo make install' should do the trick. (No -'configure' step necessary.) This requires GNU make and g++. For other setups, -you'll probably have to fiddle with the Makefile and the sources. The sources -should be pretty portable, but the Makefile really needs GNU make right now. -You'll also need LLVM for the compiler backend (version 2.2 has been tested). -For your convenience, instructions for installing LLVM are also included in -the INSTALL file. +systems, the usual './configure && make && sudo make install' should do the +trick. This requires GNU make and g++. For other setups, you'll probably have +to fiddle with the Makefile and the sources. You'll also need LLVM for the +compiler backend (version 2.2 has been tested). For your convenience, +instructions for installing LLVM are also included in the INSTALL file. USING PURE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 07:56:15
|
Revision: 168 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=168&view=rev Author: agraef Date: 2008-06-04 00:56:24 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Add options for various build types. Modified Paths: -------------- pure/trunk/configure pure/trunk/configure.ac Modified: pure/trunk/configure =================================================================== --- pure/trunk/configure 2008-06-04 07:55:18 UTC (rev 167) +++ pure/trunk/configure 2008-06-04 07:56:24 UTC (rev 168) @@ -1205,6 +1205,13 @@ esac cat <<\_ACEOF +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-release enable the release build + --enable-debug enable the debug build + --enable-debug2 enable the maintenance build + Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) @@ -2260,6 +2267,27 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +# Check whether --enable-release was given. +if test "${enable_release+set}" = set; then + enableval=$enable_release; case "${enableval}" in + yes) CXXFLAGS="-O3 -DNDEBUG -DDEBUG=0" ;; + esac +fi + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; case "${enableval}" in + yes) CXXFLAGS="-g" ;; + esac +fi + +# Check whether --enable-debug2 was given. +if test "${enable_debug2+set}" = set; then + enableval=$enable_debug2; case "${enableval}" in + yes) CXXFLAGS="-g -DDEBUG=2" ;; + esac +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' Modified: pure/trunk/configure.ac =================================================================== --- pure/trunk/configure.ac 2008-06-04 07:55:18 UTC (rev 167) +++ pure/trunk/configure.ac 2008-06-04 07:56:24 UTC (rev 168) @@ -2,6 +2,21 @@ AC_INIT(pure, 0.3) AC_CONFIG_HEADERS(config.h) AC_PROG_CXX +AC_ARG_ENABLE(release, + [ --enable-release enable the release build], + [case "${enableval}" in + yes) CXXFLAGS="-O3 -DNDEBUG -DDEBUG=0" ;; + esac]) +AC_ARG_ENABLE(debug, + [ --enable-debug enable the debug build], + [case "${enableval}" in + yes) CXXFLAGS="-g" ;; + esac]) +AC_ARG_ENABLE(debug2, + [ --enable-debug2 enable the maintenance build], + [case "${enableval}" in + yes) CXXFLAGS="-g -DDEBUG=2" ;; + esac]) AC_CHECK_LIB(gmp, __gmpz_init) AC_CHECK_LIB(readline, readline) dnl On some systems these are in separate libraries. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-04 07:55:11
|
Revision: 167 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=167&view=rev Author: agraef Date: 2008-06-04 00:55:18 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Update installation instructions. Modified Paths: -------------- pure/trunk/INSTALL Modified: pure/trunk/INSTALL =================================================================== --- pure/trunk/INSTALL 2008-06-04 06:59:28 UTC (rev 166) +++ pure/trunk/INSTALL 2008-06-04 07:55:18 UTC (rev 167) @@ -5,20 +5,17 @@ These instructions (mostly by courtesy of Eddie Rucker, thanks Eddie!) explain how to compile and install LLVM (which is the compiler backend required by Pure) and the Pure interpreter itself. The instructions are for Linux and -similar Unix-like systems; the SYSTEM NOTES section at the end of this file +similar, Unix-like systems; the SYSTEM NOTES section at the end of this file details the tweaks necessary to make Pure compile and run on various other platforms. More information about installing LLVM and the required LLVM source packages can be found at http://llvm.org. -Pure is known to work on Linux and Mac OSX, but should compile (with the usual +Pure is known to work on Linux and Mac OSX, and should compile (with the usual amount of tweaking) on all UNIX/POSIX-based platforms. We recommend using version 4.x of the GNU C++ compiler; it should be available almost everywhere (in fact, since you'll need LLVM anyway, you can also use the gcc frontend -available for LLVM). Other ANSI/ISO compatible C/C++ compilers will probably -work as well (after some fiddling with the compilation options and the sources -maybe), but this has not been tested. Also note that the Makefile pretty much -requires GNU make right now, so you should make sure that you have that -installed before trying to compile Pure. +available for LLVM). You'll also need a Bourne-compatible shell and GNU make, +which are also readily available on most platforms. BASIC INSTALLATION @@ -58,14 +55,16 @@ $ cd llvm-2.2 $ ./configure --enable-optimized --disable-assertions --disable-expensive-checks --enable-targets=host-only -$ make ENABLE_OPTIMIZED=1 +$ make $ sudo make install Note the configure flags; these are for an optimized (non-debug) build and -disable all compilation targets except the one for your system. To do a debug -build of LLVM, simply leave away all the extra configure parameters (except -possibly --enable-targets=host-only). Note, however, that this will -considerably slow down the Pure compiler. +disable all compilation targets but the one for your system. (You might wish +to omit the --enable-targets=host-only if you want to use other LLVM +applications and offering cross-compilation capabilities.) To do a debug build +of LLVM, simply leave away all the extra configure parameters (except possibly +--enable-targets=host-only). Note, however, that this will have an impact on +the speed of the Pure compiler. STEP 4. Get and unpack the Pure sources at: http://pure-lang.sf.net/ @@ -73,24 +72,28 @@ page. See "Downloads" on the Pure website for a quick link to the download section. -STEP 5. Build and install Pure as follows (x.y denotes the current Pure -version number, 0.3 at the time of this writing): +STEP 5. Configure, build and install Pure as follows (x.y denotes the current +Pure version number, 0.3 at the time of this writing): $ cd pure-x.y +$ ./configure $ make $ sudo make install + +On some systems you may have to tell the dynamic linker to update its cache so +that it finds the Pure runtime library, libpure.so. E.g., on Linux this can be +done as follows: + $ sudo /sbin/ldconfig -(The latter step is required on Linux systems to tell the dynamic linker to -update its cache so that it finds the Pure runtime library, libpure.so. On -other systems it may be sufficient to install the library in a location which -is searched by the dynamic linker.) +After the build is complete, you can also run a few tests to check that Pure +is working correctly on your computer: -After the build is complete, you can check that Pure is working correctly on -your computer, as follows: - $ make check +If all is well, all tests should pass. If not, email the author or the Pure +mailing list for help. + STEP 6. The Pure interpreter should be ready to go now. Run Pure interactively as: @@ -134,42 +137,138 @@ STEP 4': Fetch the SVN sources. +$ svn co http://pure-lang.svn.sourceforge.net/svnroot/pure-lang/pure/trunk pure + +This will only fetch the latest development sources (the "trunk") from svn and +put it into the 'pure' subdirectory in the current directory. To check out the +entire tree, including past releases and other branches, into a subdirectory +named 'pure-lang', use the following command instead: + $ svn co http://pure-lang.svn.sourceforge.net/svnroot/pure-lang pure-lang This step needs to be done only once; once you've checked out your working copy, you can update it to the latest revision by running 'svn up'. -STEP 5': Build and install Pure: +STEP 5': Configure, build and install Pure: -$ cd pure-lang/pure/trunk +$ cd pure (or 'cd pure-lang/pure/trunk', if you checked out the entire tree) +$ ./configure $ make $ sudo make install -$ sudo /sbin/ldconfig OTHER COMPILATION OPTIONS ===== =========== ======= -By default, the pure program goes to /usr/local/bin, the libpure.so library to -/usr/local/lib, and the Pure library scripts to /usr/local/lib/pure. The -installation directory can be changed by editing the definition of the -'prefix' variable in the Makefile, or by specifying the desired value on the -'make' command line, e.g.: +The Pure configure script takes a few options which enable you to change the +installation path and control a number of other build options. Moreover, there +are some environment variables which also affect compilation and installation. -$ make all install prefix=/usr +Use './configure --help' to print a summary of the provided options. -Note that you should specify this option *both* at compile and installation -time since certain default paths are hardcoded into the interpreter (but can -be changed at runtime by setting corresponding environment variables, see the -manpage for details). Also note that if you install Pure into a non-standard -location, you may have to set the LD_LIBRARY_PATH variable so that the dynamic -linker finds the Pure runtime library, libpure.so. +INSTALLATION PATH +------------ ---- +By default, the pure program, runtime library and library scripts are +installed in /usr/local/bin, /usr/local/lib and /usr/local/lib/pure, +respectively. This can be changed by specifying the desired installation +prefix with the --prefix option, e.g.: + +$ ./configure --prefix=/usr + +(Note that if you install Pure into a non-standard location, you may have to +set LD_LIBRARY_PATH or a similar variable so that the dynamic linker finds the +Pure runtime library, libpure.so.) + +In addition, the DESTDIR variable enables package maintainers to install Pure +into a special "staging" directory, so that installed files can be packaged +more easily. If set at installation time, DESTDIR will be used as an +additional prefix to all installation paths. For instance, the following +command will put all installed files into the tmp-root subdirectory of the +current directory: + +$ make install DESTDIR=tmp-root + +SEPARATE BUILD DIRECTORY +-------- ----- --------- + +It is possible to build Pure in a separate directory, in order to keep your +source tree tidy and clean, or to build multiple versions of the interpreter +with different compilation flags from the same source tree. + +To these ends, just cd to the build directory and run configure and make +there, e.g. (this assumes that you start from the source directory): + +$ mkdir BUILD +$ cd BUILD +$ ../configure +$ make + +COMPILER AND LINKER OPTIONS +-------- --- ------ ------- + +There are a number of environment variables you can set on the 'configure' +command line if you need special compiler or linker options: + +- CPPFLAGS: preprocessor options (-I, -D, etc.) +- CXXFLAGS: compilation options (-g, -O, etc.) +- LDFLAGS: linker flags (-s, -L, etc.) +- LIBS: additional objects and libraries (-lfoo, bar.o, etc.) + +For instance, the following 'configure' command changes the default +compilation options to '-g' and adds '/opt/include' and '/opt/lib' to the +include and library search paths, respectively: + +$ CPPFLAGS=-I/opt/include CXXFLAGS=-g LDFLAGS=-L/opt/lib ./configure + +More details on the build and installation process and other available targets +and options can be found in the Makefile. + +PREDEFINED BUILD TYPES +---------- ----- ----- + +For convenience, 'configure' provides some options to set up CPPFLAGS and +CXXFLAGS for various build types. + +Note that, as of Pure 0.3, the default build already includes most +optimizations (-O2). This build should be ok for most purposes, and has the +advantage that it does additional runtime checks which provide diagnostics +useful for maintainers if anything is wrong with the interpreter. However, you +can also build a "release" version of the interpreter by running configure as +follows: + +$ ./configure --enable-release + +This disables all runtime checks and debugging information in the interpreter, +and uses a higher optimization level (-O3). The release build will usually +give you faster execution times, but the differences to the default build +aren't really that big anymore (less than 5% compared to the default flags on +my Linux system running gcc 4.1, YMMV), so you are encouraged to use the +default build unless performance is really critical. + +To get smaller executables with either the default or the release build, add +'LDFLAGS=-s' to the 'configure' command (gcc only, other compilers may provide +a similar flag or a separate command to strip compiled executables and +libraries). + +You can also do a "debug" build as follows: + +$ ./configure --enable-debug + +This is like the default build, but disables all optimizations, so compilation +is faster but the compiled interpreter is *much* slower (a factor of about 2 +on my Linux box). Hence this build is only recommended for debugging purposes. + +RUNNING PURE FROM THE SOURCE DIRECTORY +------- ---- ---- --- ------ --------- + After your build is done, you can (and should) also run 'make check' to verify that your Pure interpreter works correctly. This can be done without installing the software. In fact, there's no need to install the interpreter -if you just want to take it for a test drive, you can simply run it from the -source directory, if you set up the following environment variables: +at all if you just want to take it for a test drive, you can simply run it +from the source directory, if you set up the following environment variables +(this assumes that you built Pure in the source directory; when using a +separate build directory, you'll have to change the paths accordingly): - LD_LIBRARY_PATH=. This is required on Linux systems so that libpure.so is found. Other systems may require an analogous setting, or none at all. @@ -180,46 +279,25 @@ After that you should be able to run the Pure interpreter from the source directory, by typing './pure'. -There are a number of other variables you can set on the 'make' command line -if you need special compiler (CXXFLAGS) or linker flags (LDFLAGS), or if you -have to add platform-specific libraries (LIBS). The DLL variable allows you to -change the shared library suffix as appropriate for your system. Please see -the Makefile for additional information on these. +OTHER TARGETS +----- ------- -As of Pure 0.3, the 'default' build now also includes basic optimizations -(-O). This build should be ok for most purposes, and has the advantage that it -does additional runtime checks which provide diagnostics useful for -maintainers if anything is wrong with the interpreter. +The Makefile supports the usual 'clean' and 'distclean' targets, and +'realclean' will remove all files created by the maintainer, including test +logs and C++ source files generated from Flex and Bison grammars. (Only use +the latter if you know what you are doing, since it will remove files which +require special tools to be regenerated.) -However, you can also build a "release" version of the interpreter as follows: +There are also a number of targets like 'html' and 'pdf' which generate the +documentation in a variety of formats (this requires groff); see the Makefile +for details. -$ make build=release +Last but not least, maintainers can roll distribution tarballs with 'make +dist' and 'make distcheck' (the latter is like 'make dist', but also does a +test build and installation to verify that your tarball contains all needed +bits and pieces). -This disables all runtime checks and debugging information in the interpreter -and also uses a higher level of optimization. The 'release' build will usually -give you faster execution times, but the differences aren't really that big -anymore (less than 5% compared to the default flags on my Linux system running -gcc 4.1, YMMV), so you are encouraged to use the 'default' build unless -performance is really critical. -To get smaller executables with either the default or the release build, add -'LDFLAGS=-s' to the 'make' command (gcc only, other compilers may provide a -similar flag or a separate command to strip compiled executables and -libraries). - -You can also do a 'debug' build as follows: - -$ make build=debug - -This is like the standard build, but disables all optimizations, so -compilation is faster but the compiled interpreter is *much* slower (a factor -of about 2 on my Linux box). Hence this build is only recommended for -debugging purposes. - -More details on the build and installation process and other available targets -and options can be found in the Makefile. - - SYSTEM NOTES ====== ===== @@ -231,10 +309,9 @@ ALL PLATFORMS --- --------- -Compiling the release version (make build=release) using gcc with all warnings -turned on (which is the default) will give you the warning "dereferencing -type-punned pointer will break strict-aliasing rules" at some point in -util.cc. This is harmless and can be ignored. +Compiling the default and release versions using gcc will give you the warning +"dereferencing type-punned pointer will break strict-aliasing rules" at some +point in util.cc. This is harmless and can be ignored. If your Pure program runs out of stack space, the interpreter will segfault. This is *not* a bug, it happens because runtime stack checks are disabled by @@ -247,14 +324,14 @@ -- --- ------- 64 bit systems are fully supported by Pure. Alas, for unknown reasons the -'debug' build currently does *not* work on (some?) 64 bit systems using -gcc. This has been seen on various different 64 bit Linux versions, YMMV. You -can tell that you're bitten by this bug if, after running 'make debug' (or -using similar, custom compilation flags), 'make check' fails on most tests. +debug build currently does *not* work on (some?) 64 bit systems using gcc. +This has been seen on various different 64 bit Linux versions, YMMV. You can +tell that you're bitten by this bug if, after running 'make debug' (or using +similar, custom compilation flags), 'make check' fails on most tests. Fortunately, it seems that you can easily work around this by making sure that you have at least -O enabled when compiling runtime.cc. Also please note that -the 'default' and 'release' builds should work fine. 32 bit builds also seem -to be unaffected. +the default and release builds should work fine. 32 bit builds also seem to be +unaffected. LINUX ----- @@ -265,27 +342,22 @@ MAC OSX --- --- -A port by Ryan Schmidt exists in the MacPorts collection at -http://www.macports.org/. If you compile Pure from the original sources -yourself, you should add the -liconv flag to the link line. To these ends, -build Pure with the following make command (add the build=release option for -the release build): +Pure works on OSX just fine. A port by Ryan Schmidt exists in the MacPorts +collection, see http://www.macports.org/. -$ make LIBS="-liconv" +Note that with at least some current versions of the Apple gcc compiler (4.0.1 +and similar) you'll get the (bogus) warning "control reaches end of non-void +function" a couple of times in interpreter.cc. These are due to a bug in older +gcc versions (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16558), but they +are harmless and can be ignored. These warnings should also go away once Apple +upgrades its SDK to a newer gcc version. -Also note that with at least some current versions of the Apple gcc compiler -(4.0.1 and similar) you'll get the (bogus) warning "control reaches end of -non-void function" a couple of times in interpreter.cc. These are due to a bug -in older gcc versions (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16558), -but they are harmless and can be ignored. These warnings should also go away -once Apple upgrades its SDK to a newer gcc version. - MS WINDOWS -- ------- Jiri Spitz is currently working on a Windows port using Mingw. Once this is finished, we'll provide Windows installation instructions here. For the time -being, you can try for yourself; porting should be rather straightforward with +being, you can try it yourself; porting should be rather straightforward with either Cygwin (http://www.cygwin.com/) or Mingw (http://www.mingw.org/), once you have all the necessary dependencies and a suitable version of LLVM installed. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |