AMBER Archive (2002)

Subject: Running amber7 and nab on FreeBSD

From: bdodson_at_scms.utmb.EDU
Date: Wed Jun 05 2002 - 15:31:24 CDT


Please find enclosed a patch needed to get amber7 (leap) running on
FreeBSD 4.x. All the rest of amber7 works fine with only the normal
setup (using g77, aka f77 on FreeBSD 4.x, and gcc). Compiling amber7
on Linux (Redhat 7.2), linking the programs statically, and using the
brandelf command to identify the programs as Linux executables also
results in binaries which work fine on FreeBSD 4.x. If past experience
is a guide, these Linux binaries should run just as fast on FreeBSD as
they do when running native on Linux.

For those people who also use nab on FreeBSD, the present nab
port/package skeleton (for nab 4.3.2, IIRC) also needs similar patches
in the two database.c files. I will file a problem report this
afternoon with the FreeBSD ports people to that effect.

8<---------------------------------------------------- Cut here

*** src/leap/src/leap/database.c.orig Mon Jun 7 21:52:19 1999
--- src/leap/src/leap/database.c Sat Jun 1 23:09:47 2002
***************
*** 95,100 ****
--- 95,107 ----
   * can be contained in the STRING object.
   */
  
+ #if (defined(__unix__) || defined(unix)) && !defined(USG)
+ #include <sys/param.h>
+ #endif
+
+ #if defined(BSD)
+ #include <math.h>
+ #endif
  
  
  
***************
*** 563,569 ****
  
      sRemoveLeadingSpaces( sLine );
      sRemoveFirstString( sLine, sHead );
! #ifdef linux
      sscanf( sHead, "%lg", dPDbl );
  #else
      sscanf( sHead, "%lG", dPDbl );
--- 570,576 ----
  
      sRemoveLeadingSpaces( sLine );
      sRemoveFirstString( sLine, sHead );
! #if defined(linux) || defined(BSD)
      sscanf( sHead, "%lg", dPDbl );
  #else
      sscanf( sHead, "%lG", dPDbl );

8<---------------------------------------------------- And here

-- 
M. L. Dodson                                bdodson_at_scms.utmb.edu
409-772-2178                                FAX: 409-772-1790