Newer
Older
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
;
return 0;
}
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
xno)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "z$GCC" = zyes; then
R_IS_GCC=1
fi
fi
R_IS_CLANG=0
if echo "$R_CC_ARG1" | grep -q "clang"; then
R_IS_CLANG=1
fi
#-------------------------------------------------------------
# We don't bother emitting the warning if the two compilers in
# use are clang and gcc -- supposedly they are compatible
#-------------------------------------------------------------
if test $NETCDF_IS_CLANG -eq 1 -a $R_IS_GCC -eq 1; then
emit_warning=0
fi
if test $NETCDF_IS_GCC -eq 1 -a $R_IS_CLANG -eq 1; then
emit_warning=0
fi
#-----------------------------------------------------
# Both same, but different exact names of compilers...
# not sure if this actually guarantees success??
#-----------------------------------------------------
if test $NETCDF_IS_CLANG -eq 1 -a $R_IS_CLANG -eq 1; then
emit_warning=0
fi
if test $NETCDF_IS_GCC -eq 1 -a $R_IS_GCC -eq 1; then
emit_warning=0
fi
echo "netcdf cc arg1: $NETCDF_CC_ARG1 R cc arg1: $R_CC_ARG1 R_IS_GCC: $R_IS_GCC R_IS_CLANG: $R_IS_CLANG NETCDF_IS_GCC: $NETCDF_IS_GCC NETCDF_IS_CLANG: $NETCDF_IS_CLANG emit_warning: $emit_warning"
if test $emit_warning -eq 1 -o $TEST_EMIT_WARNING -eq 1; then
echo " "
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo "Dear ncdf4 user: The software configuration tool thinks that perhaps different compilers are being"
echo "used for R and the netcdf library. However, we all know that software configuration tools are"
echo "not that smart. If ncdf4 compiles fine for you, then please ignore this message. However, if"
echo "installation fails, it might be that you are using different compilers for R and the netcdf library."
echo "If so, then you must create a new version of the netcdf library that was compiled with the same"
echo "compiler that was used to install R (see information above). Then, try installing the ncdf4"
echo "package again using that new netcdf library. If necessary, you can specify the location of"
echo "the new nc-config (the one that uses the same compiler used by R) like this:"
echo " "
echo "R CMD INSTALL --configure-args=\"--with-nc-config=/home/joe/bin/nc-config\""
echo " "
echo "(obviously, put in the correct path to YOUR nc-config, don't just use my example location!)"
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
echo " "
fi
fi