#!/bin/csh if ($1 != "")goto $1 echo " " echo Hello! This is an automated script for installing Split on your echo system. There are a number of stages, some requiring action on your echo "part. Should the script be interrupted (and you wish to start it up" echo "again), you may restart it with 'INSTALL-beta woof', where 'woof' is the" echo "name of the stage you wish to start at. You'll know where this is" echo "because I will periodically issue messages of the form 'stage = woof'." echo " " echo "I am hoping that this script is portable. If not (or there are any other" echo "problems), please let me know\!" echo " " ; echo "David Jaffe (e-mail: jaffe@cpthree.unl.edu)" echo " "; echo -n "Press return to proceed (or x, followed by return to exit)...."; set input = $<; if ($input == "x")exit; echo " "; acknowledge: ; echo stage = acknowledge; echo " " echo Software acknowledgments: Split makes use of the following free software echo which was not written by the author: echo "--- various GNU (Free Software Foundation) products, including g++ and" echo " libg++" echo "--- Brendan McKay's graph isomorphism package **nauty**" echo "--- Keith Briggs double-double precision floating point package " echo " **doubledouble**." echo "--- Victor Shoup's NTL - A Library for doing Number Theory" echo "--- Bruno Haible's cln - Class Library for Numbers" echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; hardware_check: ; echo stage = hardware_check; echo " " echo "This program should run on any reasonably modern Unix machine. " echo " " echo This program requires at least 32 megabytes of RAM to install and use. echo If you have less than 32 megabytes of RAM, go buy some echo more before proceeding. If you have between 32 and 64 megabytes, you echo are probably OK, but the compilation may be slow, as there is likely echo to be a lot of swapping to disk. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; cplex_check: ; echo stage = cplex_check; echo " " echo Split functions best if the commercial linear programming solver CPLEX echo is installed. For academic users, a echo "'Linear Optimizer Single CPU License' costs about 500 dollars; you can " echo send e-mail to info@cplex.com if you want to get it. Otherwise, echo Split will work without CPLEX, but it will be slower. Split has been echo tested with versions 2.1 and 4.04 of CPLEX. Hopefully other versions echo will work as well. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; cln_check: ; echo stage = cln_check; echo " " echo To install the current version of Split, you must have already installed echo "Bruno Haible's Class Library for Numbers (cln). The source code I used" echo "was at ftp://ftp.santafe.edu/pub/gnu/cln-980507.tar.gz. The homepage" echo "for cln is http://clisp.cons.org/~haible/packages-cln.html. Split uses" echo "the high precision floating point arithmetic which cln supports." echo " " echo "You must have a directory CLN, with a subdirectory cln, which is the" echo "cln source directory. When I compile Split, I will attempt to access" echo "the directory CLN/cln/include, which must exist and contain the" echo "cln include files." echo " " echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; gnu_check: ; echo stage = gnu_check; echo " " echo "Now I'm going to ask if you have various programs installed on your" echo computer, all available for free, and mostly produced by the Free Software echo "Foundation (GNU). All are essential, except as noted, and you will need" echo "the indicated version. For more recent version (released since this was" echo "written), some adjustments may be necessary." echo "g++ (version 2.7.2)" echo " (Testing for g++ version...)" g++ --version echo " (If that's not 2.7.2, you should upgrade before proceeding.)" echo " (As of 10/29/97, the latest version is 2.7.2.3, which should " echo " work too, but I haven't tested it.)" echo "libg++ (version 2.7.1)" echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; echo -n "testing for uname... " uname >& /dev/null if ($status != 0 ) then echo " " echo I did not find uname. This either means that it is not installed on echo your computer, or else PATH is not set correctly. If you are using echo NeXTStep, you may have to create a shell script "uname" which does echo nothing except print out "OPENSTEP". In any case, please fix the uname echo problem, and then continue with the installation. exit else echo OK echo -n "testing for gzip... " echo woof | gzip >& /dev/null if ($status != 0 ) then echo " " echo I did not find gzip. This either means that it is not installed on echo your computer, or else PATH is not set correctly. Please fix this, and echo then continue with the installation. exit else echo OK echo -n "testing for sort... " sort --version >& /dev/null if ($status != 0 ) then echo " " echo I found a version other than than the GNU version. This either means echo that the GNU version is not installed on your computer, or else PATH echo is not set correctly. Please fix this, and then continue with the echo installation. exit else echo OK echo -n "testing for fold... " echo woof | fold --spaces >& /dev/null if ($status != 0 ) then echo " " echo I found a version other than than the GNU version. This either means echo that the GNU version is not installed on your computer, or else PATH echo is not set correctly. Please fix this, and then continue with the echo installation. exit else echo OK echo -n "testing for m4... " if (`echo "xbc" | m4` != "xbc") then echo " " echo I found a version other than than the GNU version. This either means echo that the GNU version is not installed on your computer, or else PATH echo is not set correctly. Please fix this, and then continue with the echo installation. exit else echo OK echo -n "testing for c++filt... " c++filt --version >& /dev/null if ($status != 0 ) then echo " " echo I did not find c++filt. This either means that it is not installed on echo your computer, or else PATH is not set correctly. echo Please fix this, and then continue with the installation. exit else echo OK echo "" echo "xdvi (version 20 or later -- only used by 'help' command)" echo "gs (ghostscript) -- only used by 'help' command)" echo echo Otherwise, go install the programs you do not have, and come back and echo try again. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; download: ; echo stage = download; echo " " echo You should now be in the directory where you want to install Split. echo This could be an empty directory or it could be a directory where you echo "previously installed Split. I won't delete anything, but I might" echo accidentally overwrite a file you care about. If your computer shares echo a file system with other computers, it may be advisable to put the echo directory in a place where it can be directly accessed from the executing echo computer, so as to avoid overburdening the network. On some machines echo this will be in /tmp, but of course there is some risk that such a echo directory will be destroyed. echo "" echo I will now download files into this directory by anonymous ftp. echo In total, about 1500 kilobytes will be transferred. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; echo user ftp `whoami`@`hostname` > ftp_in echo cd pub >> ftp_in echo cd coding-beta >> ftp_in echo binary >> ftp_in foreach i (REF MACROS CODE DATA_F2_1 NOT_MINE t.dvi NTL.tar) echo get $i.gz >> ftp_in end echo get disect.cc >> ftp_in echo get t.idxb >> ftp_in echo bye >> ftp_in ftp -n -v cpthree.unl.edu < ftp_in rm ftp_in echo " "; unpack: ; echo stage = unpack; echo " " echo "File transfer complete. Now I'll make subdirectories, unzip some files," echo "and put some files in them. Please wait..." foreach i (cc doc functions inc obj tex calculations hints web log) if(!(-d $i)) mkdir $i foreach i (CODE DATA_F2_1 REF MACROS NOT_MINE t.dvi NTL.tar) gunzip -f $i.gz end cp REF tex mv t.dvi tex mv t.idxb tex cat NTL.tar | tar xf - /bin/rm NTL.tar echo " "; echo -n Done. Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; ntl: ; echo stage = ntl; echo " " echo "Now I will compile Victor Shoup's library for doing number theory." echo "You may need to adjust the makefile (in directory NTL). In particular," echo I added -mv8 to CFLAGS, which may not be appropriate for your hardware. echo Also, for NeXTStep, you need to go through and replace all the includes echo of malloc.h by includes of stdlib.h. modify: ; echo stage = modify; echo " " echo " "; echo -n Press return to proceed with compilation....; cd NTL make /bin/mv ntl.a ../obj make clean /bin/mv mach_desc.h ../inc /bin/rm Test XXX ZZXFacTest GetTime.c cd .. echo " "; echo -n Done. Press return to proceed....; echo Now you may need to modify CODE to suit your system, by editing the echo "#define lines, as indicated below. In the case where something should " echo "not be defined, put // in front of #define to comment out the line. In " echo the case where something should be defined, remove the // if present. echo " " echo --- CPLEX should be set to the name of your CPLEX executable file echo " (probably cplex or cplexmip)" echo --- CPLEX_VERSION should be set to the version number of your copy of CPLEX echo --- ABSOLUTE_PATH_FOR_CPLEX will need to be set if CPLEX refuses to echo " recognize relative file names" echo " " echo If you do not have CPLEX, there is no need to change any of these lines. echo " " echo -n Make any needed changes to CODE and then press return to proceed.... set input = $<; if ($input == "x")exit; echo " "; disect: ; echo stage = disect; echo " " echo Now I am ready to unpack the file CODE. First I will compile the program echo disect, and then execute it on CODE. This stage takes about 30 seconds on echo my machine, but disect is rather badly written, and could take forever if echo "files are being shuffled across a network. (I'll also unpack some other" echo "files.)" echo " "; echo -n Press return to proceed with the disection....; set input = $<; if ($input == "x")exit; echo " "; if ('SunOS' == "OPENSTEP") then g++ disect.cc -w -lg++ -o disect -x else g++ disect.cc -s -o disect endif foreach i (CODE DATA_F2_1 NOT_MINE) disect $i end chmod 755 prep echo " "; echo -n Done. Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; compile: ; echo stage = compile echo "And now it's time to compile Split\! This takes 32 minutes on my machine." echo "If it is incredibly slow on your machine, try reading the file 'prep'" echo " "; echo -n Press return to proceed with the compilation....; set input = $<; if ($input == "x")exit; echo " "; prep all echo " " echo Assuming that no error messages appeared above, Split has now been echo "successfully installed\!" echo " " echo If you do not wish to modify and thence recompile the program, only echo the following files/directories are absolutely essential: echo Split, code.data, code.data1, calculations, tex, tex/t.dvi, tex/t.idxb, echo and hints. echo "You could (if you wished) copy these to another place on your computer" echo for someone else to use. echo " "; echo You may wish to look at the file doc/backward-compatibility, which echo contains a record of incompatibilities with earlier versions that have echo been introduced. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; echo "Now look at the section of the report (tex/t.dvi) entitled" echo "'Execution of the proofs in this report'", where you will find a echo battery of tests to carry out. echo Since this is a beta-release, I do not guarantee that these tests will echo run correctly. echo " "; echo Have fun!