[MITgcm-devel] test on SunOS

Ed Hill ed at eh3.com
Sun Mar 9 23:45:30 EDT 2008


On Sun, 9 Mar 2008 21:36:39 +0100 Martin Losch wrote:

> > checking for getopt... yes
> > updating cache ./config.cache
> > creating ./config.status
> > creating Makefile
> >         gcc -DPACKAGE=\"mpack\" -DVERSION=\"1.6\" - 
> > DHAVE_DN_EXPAND=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1 - 
> > DHAVE_GETOPT=1  -I. -I.      -g -O2 -c unixpk.c
> > unixpk.c:29:20: getopt.h: No such file or directory
> > make: The error code from the last command is 1.
> >
> >
> > Stop.
> 
> 
> I don't seem to have getopt.h on the system:
> > edvir1.awi-bremerhaven.de::mpack-1.6> locate getopt.h
> > locate: /opt/freeware/var/locatedb: No such file or directory
> 
> 
> I have no idea, what's that supposed to mean.


Hi Martin,

The getopt() call is part of the POSIX standard and on Slowlaris and
other old Unices it is supposed to be supplied by the headers:

  #include <unistd.h>
  #include <stdlib.h>
  #include <stdio.h>

so there is (again, supposedly) no need for the getopt.h header.  So,
please try commenting out the two lines matching:

  #include <getopt.h>

in the files:

  unixpk.c
  unixunpk.c

and see if it helps.  If it does, then we can probably add a few lines
to the "configure" script that will fix it for your machines.

Ed

-- 
Edward H. Hill III, PhD  |  ed at eh3.com  |  http://eh3.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20080309/340d0124/attachment.sig>


More information about the MITgcm-devel mailing list