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
Hide whitespace changes
Inline
Side-by-side
acinclude.m4
View file @
1bb6e43a
...
...
@@ -7,27 +7,27 @@ AC_DEFUN([CHECK_SUN_COMPILER_OPTIMIZATION],[
AC_CACHE_CHECK([for correct optimization with SUN compilers],
r_cv_sun_opt5_$1,[
if test -z "${R_HOME}" ; then
R_HOME=`R RHOME`
R_HOME=`R RHOME`
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_FFLAGS=`"${R_HOME}/bin/R" CMD config FFLAGS`
<<<<<<< acinclude.m4
case "${host_cpu}-${host_os}" in
x86*-solaris*)
=======
case "${host}" in
x*-sun-solaris*)
>>>>>>> 1.2
dnl use a hard coded call to src/tripack.f through R
dnl to determine wether it returns all NA.
dnl then retry with -xO5
dnl
cat >conftest.R <<EOT
dnl
dnl skip gcc:
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)
...
...
@@ -53,26 +53,26 @@ check <- function(){
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
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)
...
...
@@ -98,55 +98,57 @@ check <- function(){
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"
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"
dnl strip out all -xO[1234] flags, add one -xO5 flag instead
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}
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
fi
;;
;;
*)
echo -n "not running on x*-solaris*"
echo -n "not running on x86*-solaris*"
;;
esac
]) # AC_CACHE_CHECK
]) # AC_CACHE_CHECK
]) # AC_DEFUN
configure
View file @
1bb6e43a
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64.
# Generated by GNU Autoconf 2.64
for akima 0.5-5
.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
...
...
@@ -252,6 +252,24 @@ as_fn_unset ()
}
as_unset
=
as_fn_unset
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status
()
{
return
$1
}
# as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit
()
{
set
+e
as_fn_set_status
$1
exit
$1
}
# as_fn_exit
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
...
...
@@ -351,12 +369,83 @@ as_fn_error ()
as_fn_exit
$as_status
}
# as_fn_error
if
expr
a :
'\(a\)'
>
/dev/null 2>&1
&&
test
"X
`
expr
00001 :
'.*\(...\)'
`
"
=
X001
;
then
as_expr
=
expr
else
as_expr
=
false
fi
if
(
basename
--
/
)
>
/dev/null 2>&1
&&
test
"X
`
basename
--
/ 2>&1
`
"
=
"X/"
;
then
as_basename
=
basename
else
as_basename
=
false
fi
if
(
as_dir
=
`
dirname
--
/
`
&&
test
"X
$as_dir
"
=
X/
)
>
/dev/null 2>&1
;
then
as_dirname
=
dirname
else
as_dirname
=
false
fi
as_me
=
`
$as_basename
--
"
$0
"
||
$as_expr
X/
"
$0
"
:
'.*/\([^/][^/]*\)/*$'
\|
\
X
"
$0
"
:
'X\(//\)$'
\|
\
X
"
$0
"
:
'X\(/\)'
\|
.
2>/dev/null
||
$as_echo
X/
"
$0
"
|
sed
'/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
# Avoid depending upon Character Ranges.
as_cr_letters
=
'abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters
=
$as_cr_letters$as_cr_LETTERS
as_cr_digits
=
'0123456789'
as_cr_alnum
=
$as_cr_Letters$as_cr_digits
as_lineno_1
=
$LINENO
as_lineno_1a
=
$LINENO
as_lineno_2
=
$LINENO
as_lineno_2a
=
$LINENO
eval
'test "x$as_lineno_1'
$as_run
'" != "x$as_lineno_2'
$as_run
'" &&
test "x`expr $as_lineno_1'
$as_run
' + 1`" = "x$as_lineno_2'
$as_run
'"'
||
{
# Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed
-n
'
p
/[$]LINENO/=
'
<
$as_myself
|
sed
'
s/[$]LINENO.*/&-/
t lineno
b
:lineno
N
:loop
s/[$]LINENO\([^'
$as_cr_alnum
'_].*\n\)\(.*\)/\2\1\2/
t loop
s/-\n.*//
'
>
$as_me
.lineno
&&
chmod
+x
"
$as_me
.lineno"
||
{
$as_echo
"
$as_me
: error: cannot create
$as_me
.lineno; rerun with a POSIX shell"
>
&2
;
as_fn_exit 1
;
}
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
.
"./
$as_me
.lineno"
# Exit status is that of the last command.
exit
}
ECHO_C
=
ECHO_N
=
ECHO_T
=
case
`
echo
-n
x
`
in
#(((((
-n
*
)
...
...
@@ -404,6 +493,29 @@ else
as_mkdir_p
=
false
fi
if
test
-x
/
>
/dev/null 2>&1
;
then
as_test_x
=
'test -x'
else
if
ls
-dL
/
>
/dev/null 2>&1
;
then
as_ls_L_option
=
L
else
as_ls_L_option
=
fi
as_test_x
=
'
eval sh -c '
\'
'
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'
$as_ls_L_option
' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'
\'
' sh
'
fi
as_executable_p
=
$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp
=
"eval sed 'y%*
$as_cr_letters
%P
$as_cr_LETTERS
%;s%[^_
$as_cr_alnum
]%_%g'"
...
...
@@ -431,32 +543,21 @@ MFLAGS=
MAKEFLAGS
=
# Identity of this package.
PACKAGE_NAME
=
PACKAGE_TARNAME
=
PACKAGE_VERSION
=
PACKAGE_STRING
=
PACKAGE_BUGREPORT
=
PACKAGE_URL
=
PACKAGE_NAME
=
'akima'
PACKAGE_TARNAME
=
'akima'
PACKAGE_VERSION
=
'0.5-5'
PACKAGE_STRING
=
'akima 0.5-5'
PACKAGE_BUGREPORT
=
''
PACKAGE_URL
=
''
ac_unique_file
=
"src/tripack.f"
ac_subst_vars
=
'am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
ac_subst_vars
=
'LTLIBOBJS
LIBOBJS
PKG_FFLAGS
PKG_CFLAGS
ac_ct_F77
FFLAGS
F77
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
am__quote
am__include
DEPDIR
OBJEXT
EXEEXT
ac_ct_CC
...
...
@@ -501,34 +602,10 @@ PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL
am__untar
am__tar
AMTAR
am__leading_dot
SET_MAKE
AWK
mkdir_p
MKDIR_P
INSTALL_STRIP_PROGRAM
STRIP
install_sh
MAKEINFO
AUTOHEADER
AUTOMAKE
AUTOCONF
ACLOCAL
VERSION
PACKAGE
CYGPATH_W
am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM'
SHELL'
ac_subst_files
=
''
ac_user_opts
=
'
enable_option_checking
enable_dependency_tracking
'
ac_precious_vars
=
'build_alias
host_alias
...
...
@@ -580,7 +657,7 @@ sharedstatedir='${prefix}/com'
localstatedir
=
'${prefix}/var'
includedir
=
'${prefix}/include'
oldincludedir
=
'/usr/include'
docdir
=
'${datarootdir}/doc/${PACKAGE}'
docdir
=
'${datarootdir}/doc/${PACKAGE
_TARNAME
}'
infodir
=
'${datarootdir}/info'
htmldir
=
'${docdir}'
dvidir
=
'${docdir}'
...
...
@@ -1074,11 +1151,6 @@ for ac_var in $ac_precious_vars; do
eval
ac_cv_env_
${
ac_var
}
_value
=
\$
${
ac_var
}
done
Program names:
--program-prefix
=
PREFIX prepend PREFIX to installed program names
--program-suffix
=
SUFFIX append SUFFIX to installed program names
--program-transform-name
=
PROGRAM run
sed
PROGRAM on installed program names
#
# Report the --help message.
#
...
...
@@ -1086,7 +1158,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat
<<
_ACEOF
\`
configure' configures
this package
to adapt to many kinds of systems.
\`
configure' configures
akima 0.5-5
to adapt to many kinds of systems.
Usage:
$0
[OPTION]... [VAR=VALUE]...
...
...
@@ -1134,7 +1206,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/
PACKAGE
]
--docdir=DIR documentation root [DATAROOTDIR/doc/
akima
]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
...
...
@@ -1146,16 +1218,11 @@ _ACEOF
fi
if
test
-n
"
$ac_init_help
"
;
then
case
$ac_init_help
in
short
|
recursive
)
echo
"Configuration of akima 0.5-5:"
;;
esac
cat
<<
\
_ACEOF
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
...
...
@@ -1233,7 +1300,7 @@ fi
test
-n
"
$ac_init_help
"
&&
exit
$ac_status
if
$ac_init_version
;
then
cat
<<
\
_ACEOF
configure
akima
configure
0.5-5
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
...
...
@@ -1326,7 +1393,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by
$as_me
, which was
It was created by
akima
$as_me
0.5-5
, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0
$@
...
...
@@ -1673,6 +1740,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu
=
$ac_cv_c_compiler_gnu
#if you want to use more macros
#AC_CONFIG_MACRO_DIR([m4])
...
...
@@ -2454,195 +2522,6 @@ 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
DEPDIR
=
"
${
am__leading_dot
}
deps"
ac_config_commands
=
"
$ac_config_commands
depfiles"
am_make
=
${
MAKE
-make
}
cat
>
confinc
<<
'
END
'
am__doit:
@echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for style of include used by
$am_make
"
>
&5
$as_echo_n
"checking for style of include used by
$am_make
... "
>
&6
;
}
am__include
=
"#"
am__quote
=
_am_result
=
none
# First try GNU make style include.
echo
"include confinc"
>
confmf
# Ignore all kinds of additional output from `make'.
case
`
$am_make
-s
-f
confmf 2> /dev/null
`
in
#(
*
the
\
am__doit
\
target
*
)
am__include
=
include
am__quote
=
_am_result
=
GNU
;;
esac
# Now try BSD make style include.
if
test
"
$am__include
"
=
"#"
;
then
echo
'.include "confinc"'
>
confmf
case
`
$am_make
-s
-f
confmf 2> /dev/null
`
in
#(
*
the
\
am__doit
\
target
*
)
am__include
=
.include
am__quote
=
"
\"
"
_am_result
=
BSD
;;
esac
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$_am_result
"
>
&5
$as_echo
"
$_am_result
"
>
&6
;
}
rm
-f
confinc confmf
# Check whether --enable-dependency-tracking was given.
if
test
"
${
enable_dependency_tracking
+set
}
"
=
set
;
then
:
enableval
=
$enable_dependency_tracking
;
fi
if
test
"x
$enable_dependency_tracking
"
!=
xno
;
then
am_depcomp
=
"
$ac_aux_dir
/depcomp"
AMDEPBACKSLASH
=
'\'
fi
if
test
"x
$enable_dependency_tracking
"
!=
xno
;
then
AMDEP_TRUE
=
AMDEP_FALSE
=
'#'
else
AMDEP_TRUE
=
'#'
AMDEP_FALSE
=
fi
depcc
=
"
$CC
"
am_compiler_list
=
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking dependency style of
$depcc
"
>
&5
$as_echo_n
"checking dependency style of
$depcc
... "
>
&6
;
}
if
test
"
${
am_cv_CC_dependencies_compiler_type
+set
}
"
=
set
;
then
:
$as_echo_n
"(cached) "
>
&6
else
if
test
-z
"
$AMDEP_TRUE
"
&&
test
-f
"
$am_depcomp
"
;
then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir
conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp
"
$am_depcomp
"
conftest.dir
cd
conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir
sub
am_cv_CC_dependencies_compiler_type
=
none
if
test
"
$am_compiler_list
"
=
""
;
then
am_compiler_list
=
`
sed
-n
's/^#*\([a-zA-Z0-9]*\))$/\1/p'
< ./depcomp
`
fi
am__universal
=
false
case
"
$depcc
"
in
#(
*
\
-arch
\
*
\
-arch
\
*
)
am__universal
=
true
;;
esac
for
depmode
in
$am_compiler_list
;
do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
:
>
sub/conftest.c
for
i
in
1 2 3 4 5 6
;
do
echo
'#include "conftst'
$i
'.h"'
>>
sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch
sub/conftst
$i
.h
done
echo
"
${
am__include
}
${
am__quote
}
sub/conftest.Po
${
am__quote
}
"
>
confmf
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj
=
sub/conftest.
${
OBJEXT
-o
}
am__minus_obj
=
"-o
$am__obj
"
case
$depmode
in
gcc
)
# This depmode causes a compiler race in universal mode.
test
"
$am__universal
"
=
false
||
continue
;;
nosideeffect
)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if
test
"x
$enable_dependency_tracking
"
=
xyes
;
then
continue
else
break
fi
;;
msvisualcpp
|
msvcmsys
)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj
=
conftest.
${
OBJEXT
-o
}
am__minus_obj
=
;;
none
)
break
;;
esac
if
depmode
=
$depmode
\
source
=
sub/conftest.c
object
=
$am__obj
\
depfile
=
sub/conftest.Po
tmpdepfile
=
sub/conftest.TPo
\
$SHELL
./depcomp
$depcc
-c
$am__minus_obj
sub/conftest.c
\
>
/dev/null 2>conftest.err
&&
grep
sub/conftst1.h sub/conftest.Po
>
/dev/null 2>&1
&&
grep
sub/conftst6.h sub/conftest.Po
>
/dev/null 2>&1
&&
grep
$am__obj
sub/conftest.Po
>
/dev/null 2>&1
&&
${
MAKE
-make
}
-s
-f
confmf
>
/dev/null 2>&1
;
then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if
(
grep
'ignoring option'
conftest.err
||
grep
'not supported'
conftest.err
)
>
/dev/null 2>&1
;
then
:
;
else
am_cv_CC_dependencies_compiler_type
=
$depmode