********> bugfix.21 Author: D.A. Case Date: March, 1998 Description: Potential update to Machine.g77 to allow smoother compilation. Fix: Link the following file to AMBER5/src/MACHINE if you are using g77. Since g77 configurations vary, minor revisions may be required, but this should get you most of the way. ***** Note: For some older g77's, delete -fno-globals ***** Further note from Thomas Huber: If errors occur with the routine second(): call second(wtim0) ^ Reference to intrinsic `SECOND' at (^) invalid -- one or more arguments have incorrect type The problem with the latest release of GNU g77 (0.5.21) is, that SECOND is actually an intrinsic function. A clean workaround is to define in the MACHINE file: setenv CPP "/lib/cpp -traditional -DSECOND=secondx -Dsecond=secondx" With this option all occurrences of second in the sander source code are replaced by a new name secondx! ***** Further note from Bill Ross: If these errors are encountered in compiling Machine/f2c/etime.c: etime.c:30: `CLOCKS_PER_SEC' undeclared (first use this function) etime.c:38: `time_t' undeclared (first use this function) add: #inlude at the beginning of etime.c ------------------------------------------ Machine.g77: #! /bin/csh -f ######################################################################## # # # Copyright (c) 1986, 1991, 1995 # # Regents of the University of California # # # # All Rights Reserved # # # # Machine Dependency Handling System # # # # Bill Ross ross@cgl.ucsf.edu # # An extension of work of George Seibel # # # # Dependencies written by various authors. # # # # Permission to use, copy, modify, and distribute this software and # # its documentation for any purpose and without fee is hereby # # granted, provided that the above copyright notice appear in all # # copies and that both that copyright notice and this permission # # notice appear in supporting documentation, and that the name of # # the University of California not be used in advertising or # # publicity pertaining to distribution of the software without # # specific, written prior permission. # # # # THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL # # WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED # # WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE # # UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR # # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM # # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # # # ######################################################################## # # Machine dependencies adapted from f2c version of Thomas Huber. # # When using g77 it is important to resize the COMMON blocks # if you are using ld version less than 2.6! The other option # is to download binutils-2.6 from GNU and the default sizes # works fine. I have done both and there is no problem. # # Dr. R.R. Joshi, Bioinformatics Centre, University of Poona, India # # Copy this file to .../src/MACHINE to install. # # These aliases let us use the same command files for compilation # on Unix systems with different names and/or flags for the fortran # compiler. Environment variables set here specify the location # of system-specific source and control the use of Integer*2. # See install.doc: "Setting Up the Configuration File" # # setenv MACHINE "linux/FreeBSD PC" setenv MACH F2C setenv MACHINEFLAGS "-DISTAR2 -DREGNML -DEWALD -DHAS_FTN_ERFC " # CPP is the cpp for this machine setenv CPP "/lib/cpp -traditional " # SYSDIR is the name of the system-specific source directory relative to src/*/ setenv SYSDIR Machine/f2c # COMPILER ALIASES: # LOADER/LINKER: setenv LOAD "g77 -O6" setenv LOADLIB "-lm" setenv G77_COMPAT "-fno-globals -ff90 -funix-intrinsics-hide" # little or no optimization: setenv L0 "g77 -c -g" # modest optimization (local scalar): setenv L1 "g77 -c -O -m486 -malign-double -ffast-math -fomit-frame-pointer $G77_COMPAT" # high scalar optimization (but not vectorization): setenv L2 "g77 -c -O3 -m486 -malign-double -ffast-math -fomit-frame-pointer $G77_COMPAT" # high optimization (may be vectorization, not parallelization): setenv L3 "g77 -c -O3 -m486 -malign-double -ffast-math -fomit-frame-pointer $G77_COMPAT" # ranlib, if it exists setenv RANLIB ranlib # spasms configuration #SPASMS MACHINE.f2c_spasms_config #SPASMS unix #SPASMS n390 #SPASMS large