Russ, and anyone using AT&T SYSVR# systems on Intel boxes,
The following are changes made to compile netCDF on
an AT&T UNIX 3.2 platform:
1) added #include <ctype.h> to ncgen/load.c
2) added u_char, u_int, u_short, and u_long to sys/types.h.
3) added the LD_NETCDF line (below) to nctest, ncgen, and ncdump Makefiles.
LD_NETCDF = ../libsrc/lib$(LIBNAME).a -lm -lnet -lrpc -lrpcsvc -lnsl_s
4) the third and fourth patches had carriage-returns (control-Ms)
shown as ^M at the end of the lines. These must be removed first
before the patch will work.
5) remember to compile version 2.1 of patch.
6) if you do not have a /usr/include/netinet/in.h file then remember to
change xdr/xdrstdio.c to include #include <sys/in.h>.
7) Commented out sys/types.h from the libsrc/xdrposix.c
8) Define __STDC__ for gnu compiler but not att compiler.
9) Define NO_STDLIB before #include stdlib.h for att compiler.
10) Define NO_STDC_REMOVE for libsrc/file.c.
11) Add #ifdef STDC_INCLUDES before #include stdlib.h for libsrc/local_nc.h.
Here are some of the environmental assignments/commands:
OS=unix
FC="f77"
CC="gcc -Wall -D__STDC__ -DNO_STDC_REMOVE -Dunix"
CPP=/lib/cpp
LD_NETCDF="../libsrc/libnetcdf.a -lm -lnet -lrpc -lrpcsvc -lnsl_s"
export FC OS CC CPP LD_NETCDF
./configure --prefix=/usr/local
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --
John Huddleston
Computer Engineer
USDA Natural Resources Conservation Service
(formerly Soil Conservation Service)
2625 Redwing Rd., Suite 110
Fort Collins, Colorado 80526
jhuddleston@xxxxxxxxxxxxxxx
(303) 282-2477
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --