Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gebhardt, Albrecht
akima
Commits
1bb6e43a
Commit
1bb6e43a
authored
Jun 21, 2011
by
agebhard
Browse files
..
parent
467b9900
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
acinclude.m4
View file @
1bb6e43a
...
@@ -7,27 +7,27 @@ AC_DEFUN([CHECK_SUN_COMPILER_OPTIMIZATION],[
...
@@ -7,27 +7,27 @@ AC_DEFUN([CHECK_SUN_COMPILER_OPTIMIZATION],[
AC_CACHE_CHECK([for correct optimization with SUN compilers],
AC_CACHE_CHECK([for correct optimization with SUN compilers],
r_cv_sun_opt5_$1,[
r_cv_sun_opt5_$1,[
if test -z "${R_HOME}" ; then
if test -z "${R_HOME}" ; then
R_HOME=`R RHOME`
R_HOME=`R RHOME`
fi
fi
if test -z "${R_HOME}" ; then
echo "Cannot find the R distribution!"
exit 1
fi
CC=`"${R_HOME}/bin/R" CMD config CC`
F77=`"${R_HOME}/bin/R" CMD config F77`
PKG_CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
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
dnl
dnl
cat >conftest.R <<EOT
dnl skip gcc:
if test "${ac_cv_fc_compiler_gnu}" != yes; then
cat >conftest.R <<EOT
check <- function(){
check <- function(){
dyn.load("src/tripack.so")
dyn.load("src/tripack.so")
x1 <- c(-1.17182301840432, -0.738152338408028, 0.0724389527039489, 0.605106093471307, -2.16072259908434)
x1 <- c(-1.17182301840432, -0.738152338408028, 0.0724389527039489, 0.605106093471307, -2.16072259908434)
...
@@ -53,26 +53,26 @@ check <- function(){
...
@@ -53,26 +53,26 @@ check <- function(){
check()
check()
EOT
EOT
rm -f src/tripack.o
rm -f src/tripack.o
rm -f src/tripack.so
rm -f src/tripack.so
$R_HOME/bin/R CMD SHLIB src/tripack.f
$R_HOME/bin/R CMD SHLIB src/tripack.f
echo "source(\"conftest.R\")" | $R_HOME/bin/R --vanilla >/dev/null
echo "source(\"conftest.R\")" | $R_HOME/bin/R --vanilla >/dev/null
rm -f conftest.R
rm -f conftest.R
rm -f src/tripack.o
rm -f src/tripack.o
rm -f src/tripack.so
rm -f src/tripack.so
eval "`cat ./conftest.out`"
eval "`cat ./conftest.out`"
rm -f ./conftest.out
rm -f ./conftest.out
if test -z "${ALL_NAS}" ; then
if test -z "${ALL_NAS}" ; then
echo "Failed to check for NAs in return values."
echo "Failed to check for NAs in return values."
exit 1;
exit 1;
else
else
if test "${ALL_NAS}" = "yes"; then
if test "${ALL_NAS}" = "yes"; then
echo "NAs produced, default compiler optimization too high, trying to relax to -xO5"
echo "NAs produced, default compiler optimization too high, trying to relax to -xO5"
cat >conftest.R <<EOT
cat >conftest.R <<EOT
check <- function(){
check <- function(){
dyn.load("src/tripack.so")
dyn.load("src/tripack.so")
x1 <- c(-1.17182301840432, -0.738152338408028, 0.0724389527039489, 0.605106093471307, -2.16072259908434)
x1 <- c(-1.17182301840432, -0.738152338408028, 0.0724389527039489, 0.605106093471307, -2.16072259908434)
...
@@ -98,55 +98,57 @@ check <- function(){
...
@@ -98,55 +98,57 @@ check <- function(){
check()
check()
EOT
EOT
rm -f src/tripack.o
rm -f src/tripack.o
rm -f src/tripack.so
rm -f src/tripack.so
MAKEFLAGS='CFLAGS=-xO5 FFLAGS=-O0' $R_HOME/bin/R CMD SHLIB src/tripack.f
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
echo "source(\"conftest.R\")" | $R_HOME/bin/R --vanilla >/dev/null
rm -f conftest.R
rm -f conftest.R
rm -f src/tripack.o
rm -f src/tripack.o
rm -f src/tripack.so
rm -f src/tripack.so
eval "`cat ./conftest.out`"
eval "`cat ./conftest.out`"
rm -f ./conftest.out
rm -f ./conftest.out
if test "${ALL_NAS}" = "yes"; then
if test "${ALL_NAS}" = "yes"; then
echo "still NAs produced, giving up"
echo "still NAs produced, giving up"
exit 1
exit 1
else
else
echo -n "will use -xO5 to avoid problems with NAs"
echo -n "will use -xO5 to avoid problems with NAs"
dnl strip out all -xO[1234] flags, add one -xO5 flag instead
dnl strip out all -xO[1234] flags, add one -xO5 flag instead
NEW_PKG_CFLAGS="-xO5 "
NEW_PKG_CFLAGS="-xO5 "
for f in ${PKG_CFLAGS}; do
for f in ${PKG_CFLAGS}; do
case $f in
case $f in
-xO[[1234]])
-xO[[1234]])
break
break
;;
;;
*)
*)
NEW_PKG_CFLAGS="${NEW_PKG_CFLAGS} $f"
NEW_PKG_CFLAGS="${NEW_PKG_CFLAGS} $f"
;;
;;
esac
esac
done
done
NEW_PKG_FFLAGS="-O0 "
NEW_PKG_FFLAGS="-O0 "
for f in ${PKG_FFLAGS}; do
for f in ${PKG_FFLAGS}; do
case $f in
case $f in
-xO[[1234]])
-xO[[1234]])
break
break
;;
;;
*)
*)
NEW_PKG_FFLAGS="${NEW_PKG_FFLAGS} $f"
NEW_PKG_FFLAGS="${NEW_PKG_FFLAGS} $f"
;;
;;
esac
esac
done
done
PKG_CFLAGS=${NEW_PKG_CFLAGS}
PKG_CFLAGS=${NEW_PKG_CFLAGS}
PKG_FFLAGS=${NEW_PKG_FFLAGS}
PKG_FFLAGS=${NEW_PKG_FFLAGS}
fi
fi
fi
fi
fi
fi
fi
;;
;;
*)
*)
echo -n "not running on x*-solaris*"
echo -n "not running on x86*-solaris*"
;;
esac
esac
]) # AC_CACHE_CHECK
]) # AC_CACHE_CHECK
]) # AC_DEFUN
]) # AC_DEFUN
configure
View file @
1bb6e43a
This diff is collapsed.
Click to expand it.
configure.ac
View file @
1bb6e43a
# package/configure.in
# package/configure.in
AC_PREREQ(2.50)
AC_PREREQ(2.50)
A
M
_INIT
_AUTOMAKE("
akima
",
0.5-5)
A
C
_INIT
([
akima
],[
0.5-5
]
)
AC_
INIT
(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])
#AC_CONFIG_MACRO_DIR([m4])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment