summaryrefslogtreecommitdiff
path: root/lib/make/cctk_Config.h.in
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-07-19 11:02:36 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-07-19 11:02:36 +0000
commitd75b206f1cf044a2755661bfda6e1c2176194d27 (patch)
tree872f1a5b931616845d9c8c0719fbc6ee2f240708 /lib/make/cctk_Config.h.in
parent5e8a6d12850955880b0aba398e4c3b6386c32e41 (diff)
Cactus' autodetection of Fortran's real*16 does currently not work; it
always detects it as "not present", even if the message printed to the screen during configuration says "present". The enclosed patch corrects this: Rename the detecting autoconf macro from CCTK_PROG_FORTRAN_REAL16 to CCTK_FORTRAN_REAL16. This follows the usual autoconf naming conventions; see e.g. CCTK_CXX_BOOL. Also rename the return value (a global variable) from fortran_does_real16 to cctk_cv_have_fortran_real16. In this macro, use the function AC_TRY_COMPILE instead of AC_TRY_COMPILER. The difference is that this then only compiles, it does not try to link and execute. Executing would require handling cross-compiling in a special way. Replace the autoconf macro AC_TRY_COMPILE by CCTK_TRY_COMPILE, correcting an error in handling Fortran programmes. AC_TRY_COMPILE does not work for Fortran in autoconf 2.13. Move setting the compiler debug and warning flags further up in configure.in, so that the Fortran 77 compiler flags, which may be copied from the Fortran 90 compiler flags, are correct when the Fortran types are detected. Otherwise the wrong Fortran 77 compiler may be used for this test. Add autodetection for all the Fortran types real*4, real*8, real*16, complex*8, complex*16, and complex*32. Make this result available to thorns as HAVE_CCTK_FORTRAN_xxx. Define the CCTK_REALxxx and HAVE_CCTK_REALxxx macros only if the corresponding real and complex types are available in both C and Fortran. Remove some leftover debugging statements. Tested on Darwin-x86 with gcc and Linux-x86 with Intel. Touche force-reconfigure. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4351 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/cctk_Config.h.in')
-rw-r--r--lib/make/cctk_Config.h.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in
index 2012fcca..d44a13da 100644
--- a/lib/make/cctk_Config.h.in
+++ b/lib/make/cctk_Config.h.in
@@ -216,6 +216,14 @@ typedef enum {false, true} bool;
#ifdef FCODE
+#undef HAVE_CCTK_FORTRAN_REAL4
+#undef HAVE_CCTK_FORTRAN_REAL8
+#undef HAVE_CCTK_FORTRAN_REAL16
+
+#undef HAVE_CCTK_FORTRAN_COMPLEX8
+#undef HAVE_CCTK_FORTRAN_COMPLEX16
+#undef HAVE_CCTK_FORTRAN_COMPLEX32
+
#endif /* FCODE */
/* Now include the code to pick an appropriate precison for reals and ints */