Problem with netCDF on HPUX 10.20 and cc

Hi,

This is a problem I have with netCDF 3.3.1 on HPUX 10.20:
I managed to compile the whole stuff with gcc and g++, but ran into
problems when using cc and CC later in my own project
(linker complains about unresolved symbols).

So I tried to recompile netCDF with cc and CC and got some strange results.

configure runs through - no problem.

Here is my configuration (tcsh):

setenv CPPFLAGS -v
setenv CC /bin/cc
setenv CFLAGS "+DA1.1 -D_INCLUDE_POSIX_SOURCE -Aa"
setenv FC /opt/fortran/bin/f77
setenv FFLAGS "-w +DAportable"
setenv CXX /bin/CC
setenv CXXFLAGS "-Aa -D_INCLUDE_POSIX_SOURCE"

[markus@landau] ...netcdf-3.3.1/src > configure
loading cache ./config.cache
checking for m4... (cached) m4

[...]

[markus@landau] ...netcdf-3.3.1/src > make

Making `all' in directory /home/markus/SOFTWARE/netCDF/netcdf-3.3.1/src/libsrc

        /bin/cc -c +DA1.1 -D_INCLUDE_POSIX_SOURCE -Aa -I.  -v attr.c
cc: CCOPTS is not set.
/opt/langtools/lbin/cpp.ansi attr.c /var/tmp/ctmAAAa28902 -D__hp9000s700
-D__hp9000s800 -D__hppa -D__hpux -D__unix -D_INCLUDE_POSIX_SOURCE -I.
-D_PA_RISC1_1
cc: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa28902 attr.o -DA1.1
-Oq00,al,ag,cn,Lm,sz,Ic,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,dp,fs,bp,wp!
-Aa
cc: "/usr/include/stddef.h", line 26: error 1642: Duplicate type specifier
"int": ignored.
cc: "/usr/include/stddef.h", line 26: warning 554: Declarator is missing.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
[markus@landau] ...netcdf-3.3.1/src >

---------------------------------------------------

Anyone there with an idea?
See my attachments especially /usr/include/stddef.h
for which I found an explanation, but could not figure out how
to fix this (is int already redefined by typedef?):
[switching off -D_INCLUDE_POSIX_SOURCE makes things even worse]

>From HPUX C-Manual:
-------------------
Typedefs

The HP C compiler does not allow combining type specifiers with typedef
names.  For example:

          typedef long t;
          unsigned t var;

Compilers derived from pcc accept this code, but HP C does not.  Change
the typedef to include the type specifier:

          typedef unsigned long t;
          t var;

or use a define:

          #define t long
          unsigned t var;

===============================================================================

Thanks,


Markus
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host landau:
#
# configure 
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
for ac_option
do
  case "$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running ${CONFIG_SHELL-/bin/sh} configure  --no-create --no-recursion"
    exec ${CONFIG_SHELL-/bin/sh} configure  --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "./config.status generated by autoconf version 2.9"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "$ac_cs_usage"; exit 0 ;;
  *) echo "$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=.

trap 'rm -fr macros.make libsrc/ncconfig.h conftest*; exit 1' 1 2 15

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
/^[     ]*VPATH[        ]*=[^:]*$/d

s%@CFLAGS@%+DA1.1 -D_INCLUDE_POSIX_SOURCE -Aa%g
s%@CPPFLAGS@%-v%g
s%@CXXFLAGS@%-Aa -D_INCLUDE_POSIX_SOURCE%g
s%@DEFS@%-DHAVE_CONFIG_H%g
s%@LDFLAGS@%%g
s%@LIBS@%%g
s%@exec_prefix@%${prefix}%g
s%@prefix@%/home/markus/SOFTWARE/netCDF/netcdf-3.3.1%g
s%@program_transform_name@%s,x,x,%g
s%@bindir@%${exec_prefix}/bin%g
s%@sbindir@%${exec_prefix}/sbin%g
s%@libexecdir@%${exec_prefix}/libexec%g
s%@datadir@%${prefix}/share%g
s%@sysconfdir@%${prefix}/etc%g
s%@sharedstatedir@%${prefix}/com%g
s%@localstatedir@%${prefix}/var%g
s%@libdir@%${exec_prefix}/lib%g
s%@includedir@%${prefix}/include%g
s%@oldincludedir@%/usr/include%g
s%@infodir@%${prefix}/info%g
s%@mandir@%${prefix}/man%g
s%@M4@%m4%g
s%@CC@%/bin/cc%g
s%@CC_MAKEDEPEND@%false%g
s%@CXX@%/bin/CC%g
s%@FC@%/opt/fortran/bin/f77%g
s%@FFLAGS@%-w +DAportable%g
s%@FLIBS@% -lU77%g
s%@CPP@%/lib/cpp%g
s%@FPP@%%g
s%@COMPILE_F@%$(COMPILE.f) $(FPPFLAGS)%g
s%@FPPFLAGS@%%g
s%@MATHLIB@%-lm%g
s%@AR@%ar%g
s%@RANLIB@%ranlib%g
s%@prog@%%g
s%@WHATIS@%whatis%g
s%@MAKEWHATIS_CMD@%%g
s%@FTPBINDIR@%/home/ftp/pub/binary/dummy_system%g

CEOF

CONFIG_FILES=${CONFIG_FILES-"macros.make"}
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust relative srcdir, etc. for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 
's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
fi; done
rm -f conftest.subs

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
ac_uB='\([      ]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

UDCONFIG_HEADERS=${UDCONFIG_HEADERS-"fortran/nfconfig.inc:fortran/nfconfig.in
"}
for ac_file in .. $UDCONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo udcreating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  cp $ac_given_srcdir/$ac_file_in conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}NF_INT1_T${ac_dB}NF_INT1_T${ac_dC}byte${ac_dD}
${ac_uA}NF_INT1_T${ac_uB}NF_INT1_T${ac_uC}byte${ac_uD}
${ac_eA}NF_INT1_T${ac_eB}NF_INT1_T${ac_eC}byte${ac_eD}
${ac_dA}NF_INT2_T${ac_dB}NF_INT2_T${ac_dC}integer*2${ac_dD}
${ac_uA}NF_INT2_T${ac_uB}NF_INT2_T${ac_uC}integer*2${ac_uD}
${ac_eA}NF_INT2_T${ac_eB}NF_INT2_T${ac_eC}integer*2${ac_eD}
${ac_dA}NF_INT1_IS_C_SIGNED_CHAR${ac_dB}NF_INT1_IS_C_SIGNED_CHAR${ac_dC}1${ac_dD}
${ac_uA}NF_INT1_IS_C_SIGNED_CHAR${ac_uB}NF_INT1_IS_C_SIGNED_CHAR${ac_uC}1${ac_uD}
${ac_eA}NF_INT1_IS_C_SIGNED_CHAR${ac_eB}NF_INT1_IS_C_SIGNED_CHAR${ac_eC}1${ac_eD}
${ac_dA}NF_INT2_IS_C_SHORT${ac_dB}NF_INT2_IS_C_SHORT${ac_dC}1${ac_dD}
${ac_uA}NF_INT2_IS_C_SHORT${ac_uB}NF_INT2_IS_C_SHORT${ac_uC}1${ac_uD}
${ac_eA}NF_INT2_IS_C_SHORT${ac_eB}NF_INT2_IS_C_SHORT${ac_eC}1${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}NF_INT_IS_C_INT${ac_dB}NF_INT_IS_C_INT${ac_dC}1${ac_dD}
${ac_uA}NF_INT_IS_C_INT${ac_uB}NF_INT_IS_C_INT${ac_uC}1${ac_uD}
${ac_eA}NF_INT_IS_C_INT${ac_eB}NF_INT_IS_C_INT${ac_eC}1${ac_eD}
${ac_dA}NF_REAL_IS_C_FLOAT${ac_dB}NF_REAL_IS_C_FLOAT${ac_dC}1${ac_dD}
${ac_uA}NF_REAL_IS_C_FLOAT${ac_uB}NF_REAL_IS_C_FLOAT${ac_uC}1${ac_uD}
${ac_eA}NF_REAL_IS_C_FLOAT${ac_eB}NF_REAL_IS_C_FLOAT${ac_eC}1${ac_eD}
${ac_dA}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_dB}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_dC}1${ac_dD}
${ac_uA}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_uB}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_uC}1${ac_uD}
${ac_eA}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_eB}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_eC}1${ac_eD}
${ac_dA}NCBYTE_T${ac_dB}NCBYTE_T${ac_dC}byte${ac_dD}
${ac_uA}NCBYTE_T${ac_uB}NCBYTE_T${ac_uC}byte${ac_uD}
${ac_eA}NCBYTE_T${ac_eB}NCBYTE_T${ac_eC}byte${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}NCSHORT_T${ac_dB}NCSHORT_T${ac_dC}integer*2${ac_dD}
${ac_uA}NCSHORT_T${ac_uB}NCSHORT_T${ac_uC}integer*2${ac_uD}
${ac_eA}NCSHORT_T${ac_eB}NCSHORT_T${ac_eC}integer*2${ac_eD}
${ac_dA}NO_STDLIB_H${ac_dB}NO_STDLIB_H${ac_dC}1${ac_dD}
${ac_uA}NO_STDLIB_H${ac_uB}NO_STDLIB_H${ac_uC}1${ac_uD}
${ac_eA}NO_STDLIB_H${ac_eB}NO_STDLIB_H${ac_eC}1${ac_eD}
${ac_dA}NO_SYS_TYPES_H${ac_dB}NO_SYS_TYPES_H${ac_dC}1${ac_dD}
${ac_uA}NO_SYS_TYPES_H${ac_uB}NO_SYS_TYPES_H${ac_uC}1${ac_uD}
${ac_eA}NO_SYS_TYPES_H${ac_eB}NO_SYS_TYPES_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_FTRUNCATE${ac_dB}HAVE_FTRUNCATE${ac_dC}1${ac_dD}
${ac_uA}HAVE_FTRUNCATE${ac_uB}HAVE_FTRUNCATE${ac_uC}1${ac_uD}
${ac_eA}HAVE_FTRUNCATE${ac_eB}HAVE_FTRUNCATE${ac_eC}1${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}ptrdiff_t${ac_dB}ptrdiff_t${ac_dC}int${ac_dD}
${ac_uA}ptrdiff_t${ac_uB}ptrdiff_t${ac_uC}int${ac_uD}
${ac_eA}ptrdiff_t${ac_eB}ptrdiff_t${ac_eC}int${ac_eD}
${ac_dA}uchar${ac_dB}uchar${ac_dC}unsigned char${ac_dD}
${ac_uA}uchar${ac_uB}uchar${ac_uC}unsigned char${ac_uD}
${ac_eA}uchar${ac_eB}uchar${ac_eC}unsigned char${ac_eD}
${ac_dA}WORDS_BIGENDIAN${ac_dB}WORDS_BIGENDIAN${ac_dC}1${ac_dD}
${ac_uA}WORDS_BIGENDIAN${ac_uB}WORDS_BIGENDIAN${ac_uC}1${ac_uD}
${ac_eA}WORDS_BIGENDIAN${ac_eB}WORDS_BIGENDIAN${ac_eC}1${ac_eD}
${ac_dA}SIZEOF_SHORT${ac_dB}SIZEOF_SHORT${ac_dC}2${ac_dD}
${ac_uA}SIZEOF_SHORT${ac_uB}SIZEOF_SHORT${ac_uC}2${ac_uD}
${ac_eA}SIZEOF_SHORT${ac_eB}SIZEOF_SHORT${ac_eC}2${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}SIZEOF_INT${ac_dB}SIZEOF_INT${ac_dC}4${ac_dD}
${ac_uA}SIZEOF_INT${ac_uB}SIZEOF_INT${ac_uC}4${ac_uD}
${ac_eA}SIZEOF_INT${ac_eB}SIZEOF_INT${ac_eC}4${ac_eD}
${ac_dA}SIZEOF_LONG${ac_dB}SIZEOF_LONG${ac_dC}4${ac_dD}
${ac_uA}SIZEOF_LONG${ac_uB}SIZEOF_LONG${ac_uC}4${ac_uD}
${ac_eA}SIZEOF_LONG${ac_eB}SIZEOF_LONG${ac_eC}4${ac_eD}
${ac_dA}SIZEOF_FLOAT${ac_dB}SIZEOF_FLOAT${ac_dC}4${ac_dD}
${ac_uA}SIZEOF_FLOAT${ac_uB}SIZEOF_FLOAT${ac_uC}4${ac_uD}
${ac_eA}SIZEOF_FLOAT${ac_eB}SIZEOF_FLOAT${ac_eC}4${ac_eD}
${ac_dA}SIZEOF_DOUBLE${ac_dB}SIZEOF_DOUBLE${ac_dC}8${ac_dD}
${ac_uA}SIZEOF_DOUBLE${ac_uB}SIZEOF_DOUBLE${ac_uC}8${ac_uD}
${ac_eA}SIZEOF_DOUBLE${ac_eB}SIZEOF_DOUBLE${ac_eC}8${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}SIZEOF_OFF_T${ac_dB}SIZEOF_OFF_T${ac_dC}0${ac_dD}
${ac_uA}SIZEOF_OFF_T${ac_uB}SIZEOF_OFF_T${ac_uC}0${ac_uD}
${ac_eA}SIZEOF_OFF_T${ac_eB}SIZEOF_OFF_T${ac_eC}0${ac_eD}
${ac_dA}SIZEOF_SIZE_T${ac_dB}SIZEOF_SIZE_T${ac_dC}4${ac_dD}
${ac_uA}SIZEOF_SIZE_T${ac_uB}SIZEOF_SIZE_T${ac_uC}4${ac_uD}
${ac_eA}SIZEOF_SIZE_T${ac_eB}SIZEOF_SIZE_T${ac_eC}4${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  rm -f conftest.frag conftest.h
  case "$ac_file" in
  *.h|*.hh|*.H)
      echo "/* $ac_file.  Generated automatically by configure.  */" \
          > conftest.h
      ;;
  esac
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
ac_uB='\([      ]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

CONFIG_HEADERS=${CONFIG_HEADERS-"libsrc/ncconfig.h:libsrc/ncconfig.in
"}
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  cp $ac_given_srcdir/$ac_file_in conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}NF_INT1_T${ac_dB}NF_INT1_T${ac_dC}byte${ac_dD}
${ac_uA}NF_INT1_T${ac_uB}NF_INT1_T${ac_uC}byte${ac_uD}
${ac_eA}NF_INT1_T${ac_eB}NF_INT1_T${ac_eC}byte${ac_eD}
${ac_dA}NF_INT2_T${ac_dB}NF_INT2_T${ac_dC}integer*2${ac_dD}
${ac_uA}NF_INT2_T${ac_uB}NF_INT2_T${ac_uC}integer*2${ac_uD}
${ac_eA}NF_INT2_T${ac_eB}NF_INT2_T${ac_eC}integer*2${ac_eD}
${ac_dA}NF_INT1_IS_C_SIGNED_CHAR${ac_dB}NF_INT1_IS_C_SIGNED_CHAR${ac_dC}1${ac_dD}
${ac_uA}NF_INT1_IS_C_SIGNED_CHAR${ac_uB}NF_INT1_IS_C_SIGNED_CHAR${ac_uC}1${ac_uD}
${ac_eA}NF_INT1_IS_C_SIGNED_CHAR${ac_eB}NF_INT1_IS_C_SIGNED_CHAR${ac_eC}1${ac_eD}
${ac_dA}NF_INT2_IS_C_SHORT${ac_dB}NF_INT2_IS_C_SHORT${ac_dC}1${ac_dD}
${ac_uA}NF_INT2_IS_C_SHORT${ac_uB}NF_INT2_IS_C_SHORT${ac_uC}1${ac_uD}
${ac_eA}NF_INT2_IS_C_SHORT${ac_eB}NF_INT2_IS_C_SHORT${ac_eC}1${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}NF_INT_IS_C_INT${ac_dB}NF_INT_IS_C_INT${ac_dC}1${ac_dD}
${ac_uA}NF_INT_IS_C_INT${ac_uB}NF_INT_IS_C_INT${ac_uC}1${ac_uD}
${ac_eA}NF_INT_IS_C_INT${ac_eB}NF_INT_IS_C_INT${ac_eC}1${ac_eD}
${ac_dA}NF_REAL_IS_C_FLOAT${ac_dB}NF_REAL_IS_C_FLOAT${ac_dC}1${ac_dD}
${ac_uA}NF_REAL_IS_C_FLOAT${ac_uB}NF_REAL_IS_C_FLOAT${ac_uC}1${ac_uD}
${ac_eA}NF_REAL_IS_C_FLOAT${ac_eB}NF_REAL_IS_C_FLOAT${ac_eC}1${ac_eD}
${ac_dA}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_dB}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_dC}1${ac_dD}
${ac_uA}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_uB}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_uC}1${ac_uD}
${ac_eA}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_eB}NF_DOUBLEPRECISION_IS_C_DOUBLE${ac_eC}1${ac_eD}
${ac_dA}NCBYTE_T${ac_dB}NCBYTE_T${ac_dC}byte${ac_dD}
${ac_uA}NCBYTE_T${ac_uB}NCBYTE_T${ac_uC}byte${ac_uD}
${ac_eA}NCBYTE_T${ac_eB}NCBYTE_T${ac_eC}byte${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}NCSHORT_T${ac_dB}NCSHORT_T${ac_dC}integer*2${ac_dD}
${ac_uA}NCSHORT_T${ac_uB}NCSHORT_T${ac_uC}integer*2${ac_uD}
${ac_eA}NCSHORT_T${ac_eB}NCSHORT_T${ac_eC}integer*2${ac_eD}
${ac_dA}NO_STDLIB_H${ac_dB}NO_STDLIB_H${ac_dC}1${ac_dD}
${ac_uA}NO_STDLIB_H${ac_uB}NO_STDLIB_H${ac_uC}1${ac_uD}
${ac_eA}NO_STDLIB_H${ac_eB}NO_STDLIB_H${ac_eC}1${ac_eD}
${ac_dA}NO_SYS_TYPES_H${ac_dB}NO_SYS_TYPES_H${ac_dC}1${ac_dD}
${ac_uA}NO_SYS_TYPES_H${ac_uB}NO_SYS_TYPES_H${ac_uC}1${ac_uD}
${ac_eA}NO_SYS_TYPES_H${ac_eB}NO_SYS_TYPES_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_FTRUNCATE${ac_dB}HAVE_FTRUNCATE${ac_dC}1${ac_dD}
${ac_uA}HAVE_FTRUNCATE${ac_uB}HAVE_FTRUNCATE${ac_uC}1${ac_uD}
${ac_eA}HAVE_FTRUNCATE${ac_eB}HAVE_FTRUNCATE${ac_eC}1${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}ptrdiff_t${ac_dB}ptrdiff_t${ac_dC}int${ac_dD}
${ac_uA}ptrdiff_t${ac_uB}ptrdiff_t${ac_uC}int${ac_uD}
${ac_eA}ptrdiff_t${ac_eB}ptrdiff_t${ac_eC}int${ac_eD}
${ac_dA}uchar${ac_dB}uchar${ac_dC}unsigned char${ac_dD}
${ac_uA}uchar${ac_uB}uchar${ac_uC}unsigned char${ac_uD}
${ac_eA}uchar${ac_eB}uchar${ac_eC}unsigned char${ac_eD}
${ac_dA}WORDS_BIGENDIAN${ac_dB}WORDS_BIGENDIAN${ac_dC}1${ac_dD}
${ac_uA}WORDS_BIGENDIAN${ac_uB}WORDS_BIGENDIAN${ac_uC}1${ac_uD}
${ac_eA}WORDS_BIGENDIAN${ac_eB}WORDS_BIGENDIAN${ac_eC}1${ac_eD}
${ac_dA}SIZEOF_SHORT${ac_dB}SIZEOF_SHORT${ac_dC}2${ac_dD}
${ac_uA}SIZEOF_SHORT${ac_uB}SIZEOF_SHORT${ac_uC}2${ac_uD}
${ac_eA}SIZEOF_SHORT${ac_eB}SIZEOF_SHORT${ac_eC}2${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}SIZEOF_INT${ac_dB}SIZEOF_INT${ac_dC}4${ac_dD}
${ac_uA}SIZEOF_INT${ac_uB}SIZEOF_INT${ac_uC}4${ac_uD}
${ac_eA}SIZEOF_INT${ac_eB}SIZEOF_INT${ac_eC}4${ac_eD}
${ac_dA}SIZEOF_LONG${ac_dB}SIZEOF_LONG${ac_dC}4${ac_dD}
${ac_uA}SIZEOF_LONG${ac_uB}SIZEOF_LONG${ac_uC}4${ac_uD}
${ac_eA}SIZEOF_LONG${ac_eB}SIZEOF_LONG${ac_eC}4${ac_eD}
${ac_dA}SIZEOF_FLOAT${ac_dB}SIZEOF_FLOAT${ac_dC}4${ac_dD}
${ac_uA}SIZEOF_FLOAT${ac_uB}SIZEOF_FLOAT${ac_uC}4${ac_uD}
${ac_eA}SIZEOF_FLOAT${ac_eB}SIZEOF_FLOAT${ac_eC}4${ac_eD}
${ac_dA}SIZEOF_DOUBLE${ac_dB}SIZEOF_DOUBLE${ac_dC}8${ac_dD}
${ac_uA}SIZEOF_DOUBLE${ac_uB}SIZEOF_DOUBLE${ac_uC}8${ac_uD}
${ac_eA}SIZEOF_DOUBLE${ac_eB}SIZEOF_DOUBLE${ac_eC}8${ac_eD}
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  cat > conftest.frag <<CEOF
${ac_dA}SIZEOF_OFF_T${ac_dB}SIZEOF_OFF_T${ac_dC}0${ac_dD}
${ac_uA}SIZEOF_OFF_T${ac_uB}SIZEOF_OFF_T${ac_uC}0${ac_uD}
${ac_eA}SIZEOF_OFF_T${ac_eB}SIZEOF_OFF_T${ac_eC}0${ac_eD}
${ac_dA}SIZEOF_SIZE_T${ac_dB}SIZEOF_SIZE_T${ac_dC}4${ac_dD}
${ac_uA}SIZEOF_SIZE_T${ac_uB}SIZEOF_SIZE_T${ac_uC}4${ac_uD}
${ac_eA}SIZEOF_SIZE_T${ac_eB}SIZEOF_SIZE_T${ac_eC}4${ac_eD}
s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in

  rm -f conftest.frag conftest.h
  case "$ac_file" in
  *.h|*.hh|*.H)
      echo "/* $ac_file.  Generated automatically by configure.  */" \
          > conftest.h
      ;;
  esac
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done



exit 0
# $Id: macros.make.in,v 1.23 1997/06/12 22:23:44 steve Exp $

# The purpose of this file is to contain common make(1) macros.
# It should be processed by every execution of that utility.


# POSIX shell.  Shouldn't be necessary -- but is under IRIX 5.3.
SHELL           = /bin/sh


# Installation Directories:
prefix          = /home/markus/SOFTWARE/netCDF/netcdf-3.3.1
exec_prefix     = $(prefix)
INCDIR          = $(exec_prefix)/include
LIBDIR          = $(exec_prefix)/lib
BINDIR          = $(exec_prefix)/bin
MANDIR          = $(prefix)/man


# Preprocessing:
M4              = m4
M4FLAGS         = -B10000
CPP             = /lib/cpp
CPPFLAGS        = $(INCLUDES) $(DEFINES) -v
FPP             = 
FPPFLAGS        = 
CXXCPPFLAGS     = $(CPPFLAGS)


# Compilation:
CC              = /bin/cc
CXX             = /bin/CC
FC              = /opt/fortran/bin/f77
CFLAGS          = +DA1.1 -D_INCLUDE_POSIX_SOURCE -Aa
CXXFLAGS        = $(CFLAGS) -Aa -D_INCLUDE_POSIX_SOURCE
FFLAGS          = -w +DAportable
CC_MAKEDEPEND   = false
COMPILE.c       = $(CC) -c $(CFLAGS) $(CPPFLAGS)
COMPILE.cxx     = $(CXX) -c $(CXXFLAGS) $(CXXCPPFLAGS)
COMPILE.f       = $(FC) -c $(FFLAGS)
# The following command isn't available on some systems; therefore, the
# `.F.o' rule is relatively complicated.
COMPILE.F       = $(COMPILE.f) $(FPPFLAGS)


# Linking:
MATHLIB         = -lm
FLIBS           =  -lU77
LIBS            = 
LINK.c          = $(CC) -o $@ $(CFLAGS) $(LDFLAGS)
LINK.cxx        = $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS)
LINK.F          = $(FC) -o $@ $(FFLAGS) $(LDFLAGS)
LINK.f          = $(FC) -o $@ $(FFLAGS) $(LDFLAGS)


# NetCDF files:
NCDUMP          = ncdump
NCGEN           = ncgen


# Manual pages:
WHATIS          = whatis
# The following macro should be empty on systems that don't
# allow users to create their own manual-page indexes.
MAKEWHATIS_CMD  = 


# Misc. Utilities:
AR              = ar
ARFLAGS         = cru   # NB: SunOS 4 doesn't like `-' option prefix
RANLIB          = ranlib
TARFLAGS        = -chf


# Dummy macros: used only as placeholders to silence GNU make.  They are
# redefined, as necessary, in subdirectory makefiles.
HEADER          = dummy_header
HEADER1         = dummy_header1
HEADER2         = dummy_header2
LIBRARY         = dummy_library.a
MANUAL          = dummy_manual
PROGRAM         = dummy_program


# Distribution macros:
FTPDIR          = /home/ftp/pub/$(PACKAGE)
FTPBINDIR       = /home/ftp/pub/binary/dummy_system
VERSION         = dummy_version
#if 0
    $Id: nfconfig.in,v 1.10 1997/06/11 16:57:53 steve Exp $ 
#endif


#ifndef UD_NETCDF_CPP_INC
#define UD_NETCDF_CPP_INC


#if 0
    Do not have C-style comments in here because this file is processed
    by both the FORTRAN compiler (for the nf_test/ stuff) and the C
    compiler (for the FORTRAN-callable interface routines) and some 
    FORTRAN preprocessors do not understand the /*...*/ syntax.
#endif


#if 0
    The following macros define the supplementary FORTRAN arithmetic
    datatypes beyond the standard INTEGER, REAL, and DOUBLEPRECISION --
    ostensibly corresponding to 8-bit and 16-bit integers, respectively.
    For example:

        #define NF_INT1_T        byte
        #define NF_INT2_T        integer*2

    These are the types of the relevant arguments in the NF_*_INT1() and
    NF_*_INT2() netCDF FORTRAN function calls.  The word "ostensibly"
    is used advisedly: on some systems an "integer*2" datatype,
    nevertheless, occupies 64 bits (we are not making this up).

    If your FORTRAN system does not have the respective supplementary
    datatype, then do not define the corresponding macro.
#endif
#define NF_INT1_T byte
#define NF_INT2_T integer*2


#if 0
   Define the following NF_*_IS_C_* macros appropriatly for your system.
   The "INT1", "INT2" and "INT" after the "NF_" refer to the NF_INT1_T
   FORTRAN datatype, the NF_INT2_T FORTRAN datatype, and the INTEGER
   FORTRAN datatype, respectively.  If the respective FORTRAN datatype
   does not exist, then do not define the corresponding macro.
#endif
#define NF_INT1_IS_C_SIGNED_CHAR 1
#undef NF_INT1_IS_C_SHORT
#undef NF_INT1_IS_C_INT
#define NF_INT2_IS_C_SHORT 1
#undef NF_INT2_IS_C_INT
#define NF_INT_IS_C_INT 1
#undef NF_INT_IS_C_LONG
#define NF_REAL_IS_C_FLOAT 1
#undef NF_REAL_IS_C_DOUBLE
#define NF_DOUBLEPRECISION_IS_C_DOUBLE 1
#undef NF_DOUBLEPRECISION_IS_C_FLOAT


#if 0
   Whether the system uses something besides the IEEE floating-point
   format to represent floating-point values.
#endif
#undef NO_IEEE_FLOAT


#if 0
   END OF CUSTOMIZATION
#endif


#if 0
    FORTRAN data types corresponding to netCDF version 2 "byte" and "short"
    data types (e.g. INTEGER*1, INTEGER*2).  See file "ftest.F" for usage.
#endif
#if !defined(NO_NETCDF_2)
#   define NCBYTE_T byte
#   define NCSHORT_T integer*2
#endif


#endif
/* libsrc/ncconfig.h.  Generated automatically by configure.  */
/* libsrc/ncconfig.in.  Generated automatically from configure.in by 
autoheader.  */
/* $Id: ncconfig.in,v 1.21 1996/10/29 21:24:14 steve Exp $ */
#ifndef _NCCONFIG_H_
#define _NCCONFIG_H_

/* Define if you're on an HP-UX system. */
/* #undef _INCLUDE_POSIX_SOURCE */

/* Define if type char is unsigned and you are not using gcc.  */
#ifndef __CHAR_UNSIGNED__
/* #undef __CHAR_UNSIGNED__ */
#endif

/* Define if your struct stat has st_blksize.  */
/* #undef HAVE_ST_BLKSIZE */

/* Define to `long' if <sys/types.h> doesn't define.  */
/* #undef off_t */

/* Define to `unsigned' if <sys/types.h> doesn't define.  */
/* #undef size_t */

/* Define if you have the ANSI C header files.  */
/* #undef STDC_HEADERS */

/* Define if your processor stores words with the most significant
   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
#define WORDS_BIGENDIAN 1

/* Define if you don't have the <stdlib.h>.  */
#define NO_STDLIB_H 1

/* Define if you don't have the <sys/types.h>.  */
#define NO_SYS_TYPES_H 1

/* Define if you have the ftruncate function  */
#define HAVE_FTRUNCATE 1

/* Define if you don't have the strerror function  */
/* #undef NO_STRERROR */

/* The number of bytes in a size_t */
#define SIZEOF_SIZE_T 4

/* The number of bytes in a off_t */
#define SIZEOF_OFF_T 0

/* Define to `int' if system doesn't define.  */
/* #undef ssize_t */

/* Define to `int' if system doesn't define.  */
#define ptrdiff_t int

/* Define to `unsigned char' if system doesn't define.  */
#define uchar unsigned char

/* Define if the system does not use IEEE floating point representation */
/* #undef NO_IEEE_FLOAT */

/* The number of bytes in a double.  */
#define SIZEOF_DOUBLE 8

/* The number of bytes in a float.  */
#define SIZEOF_FLOAT 4

/* The number of bytes in a int.  */
#define SIZEOF_INT 4

/* The number of bytes in a long.  */
#define SIZEOF_LONG 4

/* The number of bytes in a short.  */
#define SIZEOF_SHORT 2

#endif /* !_NCCONFIG_H_ */
/* @(#) $Revision: 66.2 $ */
#ifndef _STDDEF_INCLUDED
#define _STDDEF_INCLUDED

#ifndef _SYS_STDSYMS_INCLUDED
#  include <sys/stdsyms.h>
#endif /* _SYS_STDSYMS_INCLUDED */

#ifdef _INCLUDE__STDC__
#  ifndef NULL
#    define     NULL    0
#  endif

#  define offsetof(__s_name, __m_name)  ((size_t)&(((__s_name*)0)->__m_name))

#  ifndef _SIZE_T
#    define _SIZE_T
     typedef unsigned int size_t;
#  endif

#  ifndef _WCHAR_T
#    define _WCHAR_T
     typedef unsigned int wchar_t;
#  endif

   typedef int ptrdiff_t;

#endif /* _INCLUDE__STDC__ */
#endif /* _STDDEF_INCLUDED */
  • 1998 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: