summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-01-15 19:35:10 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-01-15 19:35:10 +0000
commit22f6814985f3c559a437541e701b14a22e1ed0dc (patch)
tree83b241f8224a4de9d1d0197de45a9b3c36795c5b /lib
parentfda08b3a2eeb39f24757d2549f790f105f1dd3b8 (diff)
Make CCTK_REAL16 more flexible
Instead of assuming that CCTK_REAL16 is real*16 in Fortran, allow any real*N for user-specified values of N. This enables using CCTK_REAL16 e.g. with gcc versions that call it real*10. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4935 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/make/aclocal.m44
-rw-r--r--lib/make/cctk_Config.h.in3
-rwxr-xr-xlib/make/configure197
-rw-r--r--lib/make/configure.in7
-rw-r--r--lib/make/force-reconfigure1
5 files changed, 118 insertions, 94 deletions
diff --git a/lib/make/aclocal.m4 b/lib/make/aclocal.m4
index f1da34da..4fc8db54 100644
--- a/lib/make/aclocal.m4
+++ b/lib/make/aclocal.m4
@@ -710,7 +710,7 @@ AC_DEFUN(CCTK_FORTRAN_REAL16,
[cctk_cv_have_fortran_real16=no
AC_LANG_SAVE
AC_LANG_FORTRAN77
-CCTK_TRY_COMPILE(,[ REAL*16 a], cctk_cv_have_fortran_real16=yes, cctk_cv_have_fortran_real16=no)
+CCTK_TRY_COMPILE(,[ REAL*$REAL16_KIND a], cctk_cv_have_fortran_real16=yes, cctk_cv_have_fortran_real16=no)
AC_LANG_RESTORE
])
if test "$cctk_cv_have_fortran_real16" = "yes" ; then
@@ -749,7 +749,7 @@ AC_DEFUN(CCTK_FORTRAN_COMPLEX32,
[cctk_cv_have_fortran_complex32=no
AC_LANG_SAVE
AC_LANG_FORTRAN77
-CCTK_TRY_COMPILE(,[ COMPLEX*32 a], cctk_cv_have_fortran_complex32=yes, cctk_cv_have_fortran_complex32=no)
+CCTK_TRY_COMPILE(,[ COMPLEX*$COMPLEX32_KIND a], cctk_cv_have_fortran_complex32=yes, cctk_cv_have_fortran_complex32=no)
AC_LANG_RESTORE
])
if test "$cctk_cv_have_fortran_complex32" = "yes" ; then
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in
index 3325828f..a2219e20 100644
--- a/lib/make/cctk_Config.h.in
+++ b/lib/make/cctk_Config.h.in
@@ -568,6 +568,9 @@ typedef enum {false, true} bool;
#undef HAVE_CCTK_FORTRAN_COMPLEX16
#undef HAVE_CCTK_FORTRAN_COMPLEX32
+#undef CCTK_REAL16_KIND
+#undef CCTK_COMPLEX32_KIND
+
/* OpenMP collapse clause */
#if defined __INTEL_COMPILER && __INTEL_COMPILER_BUILD_DATE < 20100801
/* see http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/ */
diff --git a/lib/make/configure b/lib/make/configure
index e95fb1da..e2d39e92 100755
--- a/lib/make/configure
+++ b/lib/make/configure
@@ -6476,8 +6476,13 @@ EOF
fi
+if test "x$REAL16_KIND" = 'x'; then
+ REAL16_KIND=16
+fi
+COMPLEX32_KIND=$(( $REAL16_KIND * 2 ))
+
echo $ac_n "checking for Fortran REAL*4""... $ac_c" 1>&6
-echo "configure:6481: checking for Fortran REAL*4" >&5
+echo "configure:6486: checking for Fortran REAL*4" >&5
if eval "test \"`echo '$''{'cctk_cv_have_fortran_real4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6494,7 +6499,7 @@ cat > conftest.$ac_ext <<EOF
REAL*4 a
end
EOF
-if { (eval echo configure:6498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_have_fortran_real4=yes
else
@@ -6523,7 +6528,7 @@ EOF
fi
echo $ac_n "checking for Fortran REAL*8""... $ac_c" 1>&6
-echo "configure:6527: checking for Fortran REAL*8" >&5
+echo "configure:6532: checking for Fortran REAL*8" >&5
if eval "test \"`echo '$''{'cctk_cv_have_fortran_real8'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6540,7 +6545,7 @@ cat > conftest.$ac_ext <<EOF
REAL*8 a
end
EOF
-if { (eval echo configure:6544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_have_fortran_real8=yes
else
@@ -6569,7 +6574,7 @@ EOF
fi
echo $ac_n "checking for Fortran REAL*16""... $ac_c" 1>&6
-echo "configure:6573: checking for Fortran REAL*16" >&5
+echo "configure:6578: checking for Fortran REAL*16" >&5
if eval "test \"`echo '$''{'cctk_cv_have_fortran_real16'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6583,10 +6588,10 @@ cross_compiling=$ac_cv_prog_f77_cross
cat > conftest.$ac_ext <<EOF
program main
- REAL*16 a
+ REAL*$REAL16_KIND a
end
EOF
-if { (eval echo configure:6590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_have_fortran_real16=yes
else
@@ -6616,7 +6621,7 @@ fi
echo $ac_n "checking for Fortran COMPLEX*8""... $ac_c" 1>&6
-echo "configure:6620: checking for Fortran COMPLEX*8" >&5
+echo "configure:6625: checking for Fortran COMPLEX*8" >&5
if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex8'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6633,7 +6638,7 @@ cat > conftest.$ac_ext <<EOF
COMPLEX*8 a
end
EOF
-if { (eval echo configure:6637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_have_fortran_complex8=yes
else
@@ -6662,7 +6667,7 @@ EOF
fi
echo $ac_n "checking for Fortran COMPLEX*16""... $ac_c" 1>&6
-echo "configure:6666: checking for Fortran COMPLEX*16" >&5
+echo "configure:6671: checking for Fortran COMPLEX*16" >&5
if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex16'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6679,7 +6684,7 @@ cat > conftest.$ac_ext <<EOF
COMPLEX*16 a
end
EOF
-if { (eval echo configure:6683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_have_fortran_complex16=yes
else
@@ -6708,7 +6713,7 @@ EOF
fi
echo $ac_n "checking for Fortran COMPLEX*32""... $ac_c" 1>&6
-echo "configure:6712: checking for Fortran COMPLEX*32" >&5
+echo "configure:6717: checking for Fortran COMPLEX*32" >&5
if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6722,10 +6727,10 @@ cross_compiling=$ac_cv_prog_f77_cross
cat > conftest.$ac_ext <<EOF
program main
- COMPLEX*32 a
+ COMPLEX*$COMPLEX32_KIND a
end
EOF
-if { (eval echo configure:6729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_have_fortran_complex32=yes
else
@@ -6772,12 +6777,12 @@ for cctk_hdr in cxxabi.h
do
cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6
-echo "configure:6776: checking for $cctk_hdr" >&5
+echo "configure:6781: checking for $cctk_hdr" >&5
if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6781 "configure"
+#line 6786 "configure"
#include "confdefs.h"
#include <$cctk_hdr>
@@ -6785,7 +6790,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "cctk_cv_header_$cctk_safe=yes"
else
@@ -6809,19 +6814,19 @@ fi
done
echo $ac_n "checking for __cxa_demangle""... $ac_c" 1>&6
-echo "configure:6813: checking for __cxa_demangle" >&5
+echo "configure:6818: checking for __cxa_demangle" >&5
if eval "test \"`echo '$''{'cctk_cv_have___cxa_demangle'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6818 "configure"
+#line 6823 "configure"
#include "confdefs.h"
#include <cxxabi.h>
int main() {
abi::__cxa_demangle(0,0,0,0)
; return 0; }
EOF
-if { (eval echo configure:6825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "cctk_cv_have___cxa_demangle=yes"
else
@@ -6853,12 +6858,12 @@ cross_compiling=$ac_cv_prog_cc_cross
ac_member_var=`echo Dl_info'_'dli_sname | sed 'y% %_%'`
echo $ac_n "checking for Dl_info.dli_sname""... $ac_c" 1>&6
-echo "configure:6857: checking for Dl_info.dli_sname" >&5
+echo "configure:6862: checking for Dl_info.dli_sname" >&5
if eval "test \"`echo '$''{'ac_cv_member_$ac_member_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6862 "configure"
+#line 6867 "configure"
#include "confdefs.h"
#define _GNU_SOURCE 1
#include <dlfcn.h>
@@ -6868,7 +6873,7 @@ if (ac_aggr.dli_sname)
return 0;
; return 0; }
EOF
-if { (eval echo configure:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_member_$ac_member_var=yes"
else
@@ -6880,7 +6885,7 @@ fi
rm -f conftest*
if eval "test \"`echo '$''{'ac_cv_member_$ac_member_var'}'`\" = no"; then
cat > conftest.$ac_ext <<EOF
-#line 6884 "configure"
+#line 6889 "configure"
#include "confdefs.h"
#define _GNU_SOURCE 1
#include <dlfcn.h>
@@ -6890,7 +6895,7 @@ if (sizeof ac_aggr.dli_sname)
return 0;
; return 0; }
EOF
-if { (eval echo configure:6894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_member_$ac_member_var=yes"
else
@@ -6908,12 +6913,12 @@ if eval "test \"`echo '$ac_cv_member_'$ac_member_var`\" = yes"; then
for ac_func in dladdr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6912: checking for $ac_func" >&5
+echo "configure:6917: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6917 "configure"
+#line 6922 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6936,7 +6941,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6958,7 +6963,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dladdr in library dl""... $ac_c" 1>&6
-echo "configure:6962: checking for dladdr in library dl" >&5
+echo "configure:6967: checking for dladdr in library dl" >&5
ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6967,7 +6972,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="dl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6971 "configure"
+#line 6976 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6978,7 +6983,7 @@ int main() {
dladdr()
; return 0; }
EOF
-if { (eval echo configure:6982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7025,12 +7030,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_
for ac_func in backtrace
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7029: checking for $ac_func" >&5
+echo "configure:7034: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7034 "configure"
+#line 7039 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7053,7 +7058,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7083,12 +7088,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_
for ac_func in backtrace_symbols
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7087: checking for $ac_func" >&5
+echo "configure:7092: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7092 "configure"
+#line 7097 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7111,7 +7116,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7141,12 +7146,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_
for ac_func in crypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7145: checking for $ac_func" >&5
+echo "configure:7150: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7150 "configure"
+#line 7155 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7169,7 +7174,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7191,7 +7196,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for crypt in library crypt""... $ac_c" 1>&6
-echo "configure:7195: checking for crypt in library crypt" >&5
+echo "configure:7200: checking for crypt in library crypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7200,7 +7205,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="crypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7204 "configure"
+#line 7209 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7211,7 +7216,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:7215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7250,7 +7255,7 @@ done
echo $ac_n "checking for finite in header math.h and library m""... $ac_c" 1>&6
-echo "configure:7254: checking for finite in header math.h and library m" >&5
+echo "configure:7259: checking for finite in header math.h and library m" >&5
ac_lib_var=`echo math.h'_'m'_'finite | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7259,7 +7264,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7263 "configure"
+#line 7268 "configure"
#include "confdefs.h"
#include <math.h>
@@ -7267,7 +7272,7 @@ int main() {
finite (1.0)
; return 0; }
EOF
-if { (eval echo configure:7271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7308,7 +7313,7 @@ fi
echo $ac_n "checking for copysign in header math.h and library m""... $ac_c" 1>&6
-echo "configure:7312: checking for copysign in header math.h and library m" >&5
+echo "configure:7317: checking for copysign in header math.h and library m" >&5
ac_lib_var=`echo math.h'_'m'_'copysign | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7317,7 +7322,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7321 "configure"
+#line 7326 "configure"
#include "confdefs.h"
#include <math.h>
@@ -7325,7 +7330,7 @@ int main() {
copysign (1.0, 1.0)
; return 0; }
EOF
-if { (eval echo configure:7329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7366,7 +7371,7 @@ fi
echo $ac_n "checking for fpclassify in header math.h and library m""... $ac_c" 1>&6
-echo "configure:7370: checking for fpclassify in header math.h and library m" >&5
+echo "configure:7375: checking for fpclassify in header math.h and library m" >&5
ac_lib_var=`echo math.h'_'m'_'fpclassify | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7375,7 +7380,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7379 "configure"
+#line 7384 "configure"
#include "confdefs.h"
#include <math.h>
@@ -7383,7 +7388,7 @@ int main() {
fpclassify (1.0)
; return 0; }
EOF
-if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7424,7 +7429,7 @@ fi
echo $ac_n "checking for isfinite in header math.h and library m""... $ac_c" 1>&6
-echo "configure:7428: checking for isfinite in header math.h and library m" >&5
+echo "configure:7433: checking for isfinite in header math.h and library m" >&5
ac_lib_var=`echo math.h'_'m'_'isfinite | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7433,7 +7438,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7437 "configure"
+#line 7442 "configure"
#include "confdefs.h"
#include <math.h>
@@ -7441,7 +7446,7 @@ int main() {
isfinite (1.0)
; return 0; }
EOF
-if { (eval echo configure:7445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7482,7 +7487,7 @@ fi
echo $ac_n "checking for isinf in header math.h and library m""... $ac_c" 1>&6
-echo "configure:7486: checking for isinf in header math.h and library m" >&5
+echo "configure:7491: checking for isinf in header math.h and library m" >&5
ac_lib_var=`echo math.h'_'m'_'isinf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7491,7 +7496,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7495 "configure"
+#line 7500 "configure"
#include "confdefs.h"
#include <math.h>
@@ -7499,7 +7504,7 @@ int main() {
isinf (1.0)
; return 0; }
EOF
-if { (eval echo configure:7503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7540,7 +7545,7 @@ fi
echo $ac_n "checking for isnan in header math.h and library m""... $ac_c" 1>&6
-echo "configure:7544: checking for isnan in header math.h and library m" >&5
+echo "configure:7549: checking for isnan in header math.h and library m" >&5
ac_lib_var=`echo math.h'_'m'_'isnan | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7549,7 +7554,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7553 "configure"
+#line 7558 "configure"
#include "confdefs.h"
#include <math.h>
@@ -7557,7 +7562,7 @@ int main() {
isnan (1.0)
; return 0; }
EOF
-if { (eval echo configure:7561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7598,7 +7603,7 @@ fi
echo $ac_n "checking for isnormal in header math.h and library m""... $ac_c" 1>&6
-echo "configure:7602: checking for isnormal in header math.h and library m" >&5
+echo "configure:7607: checking for isnormal in header math.h and library m" >&5
ac_lib_var=`echo math.h'_'m'_'isnormal | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7607,7 +7612,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7611 "configure"
+#line 7616 "configure"
#include "confdefs.h"
#include <math.h>
@@ -7615,7 +7620,7 @@ int main() {
isnormal (1.0)
; return 0; }
EOF
-if { (eval echo configure:7619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7656,7 +7661,7 @@ fi
echo $ac_n "checking for signbit in header math.h and library m""... $ac_c" 1>&6
-echo "configure:7660: checking for signbit in header math.h and library m" >&5
+echo "configure:7665: checking for signbit in header math.h and library m" >&5
ac_lib_var=`echo math.h'_'m'_'signbit | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7665,7 +7670,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7669 "configure"
+#line 7674 "configure"
#include "confdefs.h"
#include <math.h>
@@ -7673,7 +7678,7 @@ int main() {
signbit (1.0)
; return 0; }
EOF
-if { (eval echo configure:7677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7718,12 +7723,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_
for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7722: checking for $ac_func" >&5
+echo "configure:7727: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7727 "configure"
+#line 7732 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7746,7 +7751,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7768,7 +7773,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for mkstemp in library c""... $ac_c" 1>&6
-echo "configure:7772: checking for mkstemp in library c" >&5
+echo "configure:7777: checking for mkstemp in library c" >&5
ac_lib_var=`echo c'_'mkstemp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7777,18 +7782,18 @@ else
ac_save_LIBS="$LIBS"
LIBS="c $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7781 "configure"
+#line 7786 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char gd5B2z;
+char b0nwcg;
int main() {
-yajDzo
+FZBy16
; return 0; }
EOF
-if { (eval echo configure:7792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7827,19 +7832,19 @@ done
echo $ac_n "checking for va_copy""... $ac_c" 1>&6
-echo "configure:7831: checking for va_copy" >&5
+echo "configure:7836: checking for va_copy" >&5
if eval "test \"`echo '$''{'cctk_cv_have_va_copy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7836 "configure"
+#line 7841 "configure"
#include "confdefs.h"
#include <stdarg.h>
int main() {
va_list src, dest; va_copy(dest, src); return 0
; return 0; }
EOF
-if { (eval echo configure:7843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "cctk_cv_have_va_copy=yes"
else
@@ -7878,7 +7883,7 @@ if test "$PTHREADS_MODE" = 'yes'; then
if test -z "$PTHREAD_LIBS"; then
PTHREAD_LIBS=
echo $ac_n "checking for main in library c_r""... $ac_c" 1>&6
-echo "configure:7882: checking for main in library c_r" >&5
+echo "configure:7887: checking for main in library c_r" >&5
ac_lib_var=`echo c_r'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7887,14 +7892,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="c_r $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7891 "configure"
+#line 7896 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:7898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7915,7 +7920,7 @@ else
fi
echo $ac_n "checking for main in library pthread""... $ac_c" 1>&6
-echo "configure:7919: checking for main in library pthread" >&5
+echo "configure:7924: checking for main in library pthread" >&5
ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7924,14 +7929,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="pthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7928 "configure"
+#line 7933 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:7935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7950,7 +7955,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for main in library pthreads""... $ac_c" 1>&6
-echo "configure:7954: checking for main in library pthreads" >&5
+echo "configure:7959: checking for main in library pthreads" >&5
ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7959,14 +7964,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="pthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7963 "configure"
+#line 7968 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:7970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -8132,6 +8137,14 @@ EOF
#define HAVE_CCTK_REAL16 1
EOF
+ cat >> confdefs.h <<EOF
+#define CCTK_REAL16_KIND $REAL16_KIND
+EOF
+
+ cat >> confdefs.h <<EOF
+#define CCTK_COMPLEX32_KIND $COMPLEX32_KIND
+EOF
+
fi
if test -n "$CCTK_REAL8" -a \( "x$F77" = 'xnone' -o \( "x$cctk_cv_have_fortran_real8" -a "x$cctk_cv_have_fortran_complex16" = 'xyes' \) \); then
@@ -8468,7 +8481,7 @@ if test "x$CCTK_NEED_X" = 'xyes' ; then
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:8472: checking for X" >&5
+echo "configure:8485: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -8530,12 +8543,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 8534 "configure"
+#line 8547 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -8604,14 +8617,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8608 "configure"
+#line 8621 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:8615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
diff --git a/lib/make/configure.in b/lib/make/configure.in
index 06c9fc22..c8351ee4 100644
--- a/lib/make/configure.in
+++ b/lib/make/configure.in
@@ -912,6 +912,11 @@ CCTK_CXX_ATTRIBUTE_HOT
CCTK_C_BUILTIN_EXPECT
CCTK_CXX_BUILTIN_EXPECT
+if test "x$REAL16_KIND" = 'x'; then
+ REAL16_KIND=16
+fi
+COMPLEX32_KIND=$(( $REAL16_KIND * 2 ))
+
CCTK_FORTRAN_REAL4
CCTK_FORTRAN_REAL8
CCTK_FORTRAN_REAL16
@@ -1127,6 +1132,8 @@ fi
if test -n "$CCTK_REAL16" -a \( "x$F77" = 'xnone' -o \( "x$cctk_cv_have_fortran_real16" = 'xyes' -a "x$cctk_cv_have_fortran_complex32" = 'xyes' \) \) -a "x$DISABLE_REAL16" != 'xyes' ; then
AC_DEFINE_UNQUOTED(CCTK_REAL16, $CCTK_REAL16)
AC_DEFINE(HAVE_CCTK_REAL16)
+ AC_DEFINE_UNQUOTED(CCTK_REAL16_KIND, $REAL16_KIND)
+ AC_DEFINE_UNQUOTED(CCTK_COMPLEX32_KIND, $COMPLEX32_KIND)
fi
if test -n "$CCTK_REAL8" -a \( "x$F77" = 'xnone' -o \( "x$cctk_cv_have_fortran_real8" -a "x$cctk_cv_have_fortran_complex16" = 'xyes' \) \); then
diff --git a/lib/make/force-reconfigure b/lib/make/force-reconfigure
index ca87a9b6..7d356d98 100644
--- a/lib/make/force-reconfigure
+++ b/lib/make/force-reconfigure
@@ -35,3 +35,4 @@
09 Aug 2012: Take CFLAGS/CXXFLAGS into account when determining dependencies
22 Oct 2012: Check availability of isnan etc. in C++
15 Jan 2013: Add CCTK_ATTRIBUTE_ALWAYS_INLINE
+15 Nov 2013: Introduce CCTK_REAL16_KIND