Information concerning source files for release 1 of MacAnova 4.13 Contents of the source distribution. The MacAnova source distribution consists of the files: macanova4.13.1.tar.gz Source files (required) auxfiles4.13.1.tar.gz Auxiliary files (required) docs4.13.tar.gz Manual and other documentation install.sh Install script (required) readline-2.0.tar.gz GNU readline version 2.0 wxwin168.tar.gz WxWin version 1.68 The latest version of these may be obtained from the MacAnova download page, http://www.stat.umn.edu/macanova/download.html. All source files except those in wxwin168.tar.gz and readline-2.0.tar.gz are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 by Gary W. Oehlert and Christopher Bingham unless otherwise indicated. They may be freely used provided the terms in file COPYING are adhered to. These should be sufficient for you to build and install the regular Unix and the Motif versions of MacAnova on supported systems. You will need tar and GNU gunzip to expand the *.gz files. * * * * Caution * * * * We have been unable to build macanovawx (Motif version) with g++ 3.2 with the C++ standard library. The old WxWin 1.68 version we are still using makes use of streambuf in a way that appears to be incompatible with the current standard. Short of rewriting that code, we see no way to proceed. The current version has been made under g++ 2.95.3. A completely new windowing framework for MacAnova using WxWin 2.2 is in the works, but its ETA is unknown. install.sh: This is a Unix shell script that automates much of the installation. Substantial changes were made in release 2 of Version 4.11. docs4.13.tar.gz: This is an archive of MacAnova documentation, including a comprehensive Users' Guide, a Reference Manual, and an Introduction (for beginners) mainly in PDF format. macanova4.13.1.tar.gz: This contains source files for MacAnova, for all versions, including Unix, Macintosh, and DOS/Windows. An outline of its contents is as follows: ./mac Macintosh specific files ./wx Windows and Motif specific files ./dos DOS specific files ./dos/bcpp DOS limited memory version files ./dos/djgpp DOS extended memory version files ./dos/djgpp/djgpp1 Files for version 1 of DJGPP ./dos/djgpp/djgpp2 Files for version 2 of DJGPP ./dos/djgpp/readline Readline related files for DOS ./dos/wx Files for Windows version ./wxwin/wxwin168 Modified versions of WxWin 1.68 files ./readline2 Files related to readline 2.0 ./userfun Files related to user functions (separately compiled dynamically loaded routines) ./ Remaining non-version specific files, including most of source files, plus scripts used in making components of MacAnova ./platfrms Include files specific to different platforms ./Makefile.dir Make files for porting (Makefile.distrib) and developing (Makefile.develop) and environment files included by make for specific operating systems and computers ./Makefile.dir/OLD Obsolete make files ./testfiles4.13 Input test files and their output. The test input files in testfiles were created by extracting all MacAnova commands in the version 4.07 User's Guide. With a few exceptions they don't test more recent features. There are two copies of macanova4.13.1.tar.gz in the directory, one split into two approximately equal parts, macanova4.13.1.tar.gz.1 and macanova4.13.1.tar.gz.2, each of which should easily fit on a 1.4M floppy. On a Unix or Linux computer, you can reconstitute macanova4.13.1.tar.gz by cat macanova4.13.1.tar.gz.1 macanova4.13.1.tar.gz.2 > macanova4.13.1.tar.gz auxfiles4.13.1.tar.gz: This contains additional files required for a complete installation. They are the same as the files in pub/macanova/aux_files, namely: arima.mac File of time domain time series analysis macros; includes help for macros COPYING Copyright and warranty information for MacAnova copying.dj Copyright and warranty information relative to djgpp libraries. design.mac Library of macros useful in experimental design design.hlp Help file to go with design.mac graphics.mac Macros related to plotting; includes help for macros macanova.dat Sample data file readable by matread() macanova.hlp Standard Macanova Help file macanova.ini Sample customizable startup file macanova.mac Macro file containing many pre-defined macros plus some others macanova.nws News items through 31 Dec 1998 that were in macanova.hlp along with some obsolete help entries math.mac Mathematics-related macros including optimization; includes help for macros mulvar.mac Macros for multivariate analysis; includes help for macros regress.mac Regression related macros; includes help for macros tser.mac File of time series analysis related macros tser.hlp Help file to go with tser.mac userfun.hlp Help file for compiling and using user functions readline-2.0.tar.gz: This is a source archive of version 2.0 of the GNU Readline library. This is needed for command line editing and history in non-windowed versions of MacAnova. wxwin168.tar.gz: This is a source archive of Julian Smart's wxWindows crossplatform C++ GUI library version 1.68. It is needed for compilation of the windowed versions of MacAnova on Unix (Motif) and Windows 95 or Windows 3.1 with Win32s. Some changes were made to WxWin for making the MacAnova for Windows in order to get control of right button clicks. These changes have not yet been incorporated in wxwin168.tar. You cannot make the WxWin library unless the Motif libraries are installed. Compiling for Unix (including Linux) It's supposed to work like this. 1. Put all the *.tar.gz files and install.sh into one directory. 2. Run the install.sh script at the unix prompt by % sh install.sh The script is setup to use /usr/local/bin/gunzip to unzip the *.tar.gz files. If this is not appropriate, before running install.sh, you should define an environmental variable UNZIPPER to be the complete pathname of a program, say /usr/bin/myunzipper, that can do the job. If your shell is csh, tcsh and derivatives you can do this by setenv UNZIPPER /usr/bin/myunzipper If your shell is sh, ksh, bash or similar, you can do this by export UNZIPPER=/usr/bin/myunzipper You may already have UNZIPPER defined. Provided you are running on one of the supported systems, it should all be automatic from there :-). Well, actually you are asked a few questions and given some choices, but it's mostly automatic. The Unix installer currently supports HP with gcc and cc, IRIX with cc, and LINUX with gcc; these are the only systems to which we have access and for which we can verify that the installer works. You may compile either a windowed version (Motif) or a non-windowed version. To compile the windowed version, you need the WxWin library and Motif. We tried LessTif instead of Motif on LINUX but decided that there are enough unimplemented features in LessTif to make further effort unreasonable at the present time. The installer copies Makefile.dir/Makefile.distrib to the source file directory and renames it Makefile. This is the same as the make file (Makefile.dir/Makefile.develop) we use in developing MacAnova except targets having to do with command and linear model parsing have been commented out. Porting tips on Unix We have tried to isolate the system dependent pieces in just a few files. If you want to port MacAnova to a new system, you will probably need to change some or all of them, or create new versions. They are install.sh, platform.h (in the main MacAnova source directory), a file in subdirectory platfrms (hpgcc.h, hpgccwx.h, sgi.h, ...), and a file in subdirectory Makefile.dir (hpgcc.env, hpgccwx.env, sgi.env, ... ). The basic approach is that there should be a file called make.env in the source directory. This file is normally a copy of hpgcc.env or some other file in Makefile.dir and is included by make -f Makefile. It contains compiler flags, library locations, and make macros that establish the platform and version being used. One of the things done by install.sh is to copy the correct file from Makefile.dir into make.env. The file platform.h is included by virtually all MacAnova source files. Depending on what macros are defined in make.env, platform.h will include one of platfrms/sgi.h, platfrms/hpgcc.h, ... . For example, when SGI and WXWINMOTIF are defined, platform.h will include platfrms/sgiwx.h. The include files in platfrms specify platform specific defines. For example, macro NOLGAMMA will be defined on a platform where lgamma() is not in the math library. Comments in platform.h describes these macros and their uses. When you port to a new system, you should do the following. For definiteness, suppose you are porting to a SUN. 1. Create a file sun.env or sunwx.env (or both) in Makefile.dir, depending on whether you are compiling the non-windowed or windowed version. Almost certainly you should do this by modifying a copy of one of the other *.env files. This file should specify compiler and library flags and the like. In particular, sun.env and sunwx.env should define a macro such as -DSUN to identify the target system and sunwx.env should define macro -DWXWINMOTIF. In addition sunwx.env should itself include the corresponding make.env from wxwindows. In fact, most of the defines are done there. One choice (new August 2001) you can make in the file is whether you want to use the BLAS routines distributed with MacAnova (define make macros BLASOBJ to have value blas.o and BLASLIB to be empty) or your system's BLAS routine (define BLASOBJ to be empty and BLASLIB to have value -lblas, for example). If you use the distributed BLAS routines, you can specify an optimization flag by BLASOPT=-O3, for example. 2. Create a file sun.h or sunwx.h (or both) in directory platfrms, again depending on whether you are porting to the non-windowed or windowed version. This file should set macros appropriate to the platform to include features of interest. Again, you should work from one of the existing files in platfrms as a model after reading the descriptions of the macros in platform.h 3. Modify platform.h so that sun.h (or sunwx.h) will be included when -DSUN is defined. For example, you might add lines like these #elif defined(SUN) && !defined(WXWINMOTIF) #include "platfrms/sun.h" #elif defined(SUN) && defined(WXWINMOTIF) #include "platfrms/sunwx.h" somewhere near line 349 of platform.h 4. Modify install.sh so that it recognizes the new platform. You will need to increment PLATFORMCOUNT from 8 to 9 (or more if you do more than 1 new platform), and add three lines to give some platform specific strings. For example, somewhere near line 115 of install.sh you might add PLATFORM9="SUN SOLARIS cc" PLATFORMFILE9="sun" NAMEFORBINARIES9="SOLARIS_cc" The first of these is just a label that gets printed. The second must match the file name you use for your .h and .env files. Note that the "wx" is *not* included; that will be appended as needed by the installer. The third is a string that will be written to a special file to make sure that you don't mix binaries from different versions. A "_wxWin" will be appended automatically for windowed versions. There is a NAMEFORBINARIES macro in your sun.env (or sunwx.env) file. It must match the string in install.sh (and should include "_wxWin" if needed). Among the source files in macanova4.13.1.tar are mainpars.y and mreader.y. These yacc files specify the syntax for MacAnova and for GLM models, respectively. The files produced by yacc files from them has been post-processed by sed scripts and a C program to produce mainpars.c and mreader.c. As we now use Berkeley byacc to maintain MacAnova, the scripts have been tailored to the particular form of byacc output. We recommend that you don't attempt to use your local yacc and sed to create new versions of mainpars.c and mreader.c. If you do, you will probably want to rename these files back to mainpars.y and mreader.y, modify the *.env file and change the files specified by make macros MAINPARSSED, MREADERSED and FIXMAINPARSC. The installed Makefile, copied during installation from Makefile.dir/Makefile.distrib, will not attempt to make mainpars.c and mreader.c. As a precaution, install.sh changes the names of mainpars.y and mreader.y to mainpars.yy and mreader.yy so that make does not attempt to re-create mainpars.c and mreader.c using automatic dependency rules. In addition, macro YACC in the distributed *.env files has value DontRunYacc instead of byacc as a further protection against modifying mainpars.c and mreader.c. We have included two tcsh scripts, whichbinaries and swapbinaries which we find helpful in working with multiple sets of binaries. These assume that any set of binaries you are not working with are in directory binaries.xxxx, where xxxx is the value of the NAMEFORBINARIES macro (for example, binaries.Linux_x86_gcc_wxWin). In addition, swapbinaries assumes you have a copy of the appropriate *.env file in each directory of binaries. For example, linux86.env must be in binaries.Linux_x86_gcc and linux86wx.env must be in binaries.Linux_x86_gcc_wxWin. If you want to use them, these shell scripts will almost certainly need to be modified for your system. The distribution also includes some old Makefiles for specific platforms (e.g., Makefile.hp.gcc); however, we recommend that you use the new setup as these are not up-to-date and are not being maintained. Christopher Bingham University of Minnesota School of Statistics 313 Ford Hall 224 Church Street, S.E. Minneapolis, MN 55455-0493 kb@stat.umn.edu 612-625-1024 January 17, 2003