Commit 2824a133 authored by agebhard's avatar agebhard
Browse files

cleanup files

parent 8b92fd73
orig
config.log
config.status
autom4te.cache
...@@ -1755,7 +1755,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ...@@ -1755,7 +1755,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
#if you want to use more macros #if you want to use more macros
#AC_CONFIG_MACRO_DIR([m4]) # AC_DEFUN
if test -z "${R_HOME}" ; then if test -z "${R_HOME}" ; then
R_HOME=`R RHOME` R_HOME=`R RHOME`
...@@ -2772,7 +2773,151 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ...@@ -2772,7 +2773,151 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
CHECK_SUN_COMPILER_OPTIMIZATION
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct optimization with SUN compilers" >&5
$as_echo_n "checking for correct optimization with SUN compilers... " >&6; }
if ${r_cv_sun_opt5_+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "${R_HOME}" ; then
R_HOME=`R RHOME`
fi
PKG_CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
PKG_FFLAGS=`"${R_HOME}/bin/R" CMD config FFLAGS`
case "${host}" in
x*-sun-solaris*)
if test "${ac_cv_fc_compiler_gnu}" != yes; then
cat >conftest.R <<EOT
check <- function(){
dyn.load("src/tripack.so")
x1 <- c(-1.17182301840432, -0.738152338408028, 0.0724389527039489, 0.605106093471307, -2.16072259908434)
x2 <- c(0.76066459689394, 0.419761334644176, 1.04733588786577, 0.327582569290709, -3.35453228783072)
n <- length(x1)
ret <- .Fortran("trmesh",
as.integer(n),
x=as.double(x1),
y=as.double(x2),
tlist=integer(6*n-12),
tlptr=integer(6*n-12),
tlend=integer(n),
tlnew=as.integer(0),
tnear=integer(n),
tnext=integer(n),
tdist=double(n),
ier=as.integer(0))
if(length(ret$tdist[is.na(ret\$tdist)])==5)
cat("export ALL_NAS=yes\n", file="conftest.out")
else
cat("export ALL_NAS=no\n", file="conftest.out")
}
check()
EOT
rm -f src/tripack.o
rm -f src/tripack.so
$R_HOME/bin/R CMD SHLIB src/tripack.f
echo "source(\"conftest.R\")" | $R_HOME/bin/R --vanilla >/dev/null
rm -f conftest.R
rm -f src/tripack.o
rm -f src/tripack.so
eval "`cat ./conftest.out`"
rm -f ./conftest.out
if test -z "${ALL_NAS}" ; then
echo "Failed to check for NAs in return values."
exit 1;
else
if test "${ALL_NAS}" = "yes"; then
echo "NAs produced, default compiler optimization too high, trying to relax to -xO5"
cat >conftest.R <<EOT
check <- function(){
dyn.load("src/tripack.so")
x1 <- c(-1.17182301840432, -0.738152338408028, 0.0724389527039489, 0.605106093471307, -2.16072259908434)
x2 <- c(0.76066459689394, 0.419761334644176, 1.04733588786577, 0.327582569290709, -3.35453228783072)
n <- length(x1)
ret <- .Fortran("trmesh",
as.integer(n),
x=as.double(x1),
y=as.double(x2),
tlist=integer(6*n-12),
tlptr=integer(6*n-12),
tlend=integer(n),
tlnew=as.integer(0),
tnear=integer(n),
tnext=integer(n),
tdist=double(n),
ier=as.integer(0))
if(length(ret$tdist[is.na(ret\$tdist)])==5)
cat("export ALL_NAS=yes\n", file="conftest.out")
else
cat("export ALL_NAS=no\n", file="conftest.out")
}
check()
EOT
rm -f src/tripack.o
rm -f src/tripack.so
MAKEFLAGS='CFLAGS=-xO5 FFLAGS=-O0' $R_HOME/bin/R CMD SHLIB src/tripack.f
echo "source(\"conftest.R\")" | $R_HOME/bin/R --vanilla >/dev/null
rm -f conftest.R
rm -f src/tripack.o
rm -f src/tripack.so
eval "`cat ./conftest.out`"
rm -f ./conftest.out
if test "${ALL_NAS}" = "yes"; then
echo "still NAs produced, giving up"
exit 1
else
echo -n "will use -xO5 to avoid problems with NAs"
NEW_PKG_CFLAGS="-xO5 "
for f in ${PKG_CFLAGS}; do
case $f in
-xO[1234])
break
;;
*)
NEW_PKG_CFLAGS="${NEW_PKG_CFLAGS} $f"
;;
esac
done
NEW_PKG_FFLAGS="-O0 "
for f in ${PKG_FFLAGS}; do
case $f in
-xO[1234])
break
;;
*)
NEW_PKG_FFLAGS="${NEW_PKG_FFLAGS} $f"
;;
esac
done
PKG_CFLAGS=${NEW_PKG_CFLAGS}
PKG_FFLAGS=${NEW_PKG_FFLAGS}
fi
fi
fi
fi
;;
*)
echo -n "not running on x86*-solaris*"
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_sun_opt5_" >&5
$as_echo "$r_cv_sun_opt5_" >&6; } # AC_CACHE_CHECK
......
...@@ -3,7 +3,7 @@ AC_PREREQ(2.50) ...@@ -3,7 +3,7 @@ AC_PREREQ(2.50)
AC_INIT([akima],[0.5-10]) AC_INIT([akima],[0.5-10])
AC_CONFIG_SRCDIR(src/tripack.f) AC_CONFIG_SRCDIR(src/tripack.f)
#if you want to use more macros #if you want to use more macros
#AC_CONFIG_MACRO_DIR([m4]) m4_include([tools/acinclude.m4])
if test -z "${R_HOME}" ; then if test -z "${R_HOME}" ; then
R_HOME=`R RHOME` R_HOME=`R RHOME`
......
...@@ -14,13 +14,8 @@ PKG_CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` ...@@ -14,13 +14,8 @@ PKG_CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
PKG_FFLAGS=`"${R_HOME}/bin/R" CMD config FFLAGS` PKG_FFLAGS=`"${R_HOME}/bin/R" CMD config FFLAGS`
<<<<<<< acinclude.m4
case "${host_cpu}-${host_os}" in
x86*-solaris*)
=======
case "${host}" in case "${host}" in
x*-sun-solaris*) x*-sun-solaris*)
>>>>>>> 1.2
dnl use a hard coded call to src/tripack.f through R dnl use a hard coded call to src/tripack.f through R
dnl to determine wether it returns all NA. dnl to determine wether it returns all NA.
dnl then retry with -xO5 dnl then retry with -xO5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment