summaryrefslogtreecommitdiff
path: root/lib/make/aclocal.m4
Commit message (Collapse)AuthorAge
* Implement CCTK_Error and friendseschnett2013-02-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4962 17b73243-c579-4c4c-a9d2-2d5706c11dac
* correctly quote regular expressions in aclocal.m4rhaas2013-02-08
| | | | | | | | | | | | | | | m4 uses square brackets as quotation characters and removes one set of them per argument call. This affects regular expressions that contain character ranges. This in turn affect some HAVE_XXX macros where XXX contains invalid characters eg. XXX=math.h . The attached patch adds an extra level of [] around where the result is passed to a function. Also it seems as if the system provided AC_CHECK_FUNCS does not properly quote its third argument when passing it to AC_CHECK_FUNC. Hence I add an extra round of [] whenever it is used. This is a mess. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4953 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make CCTK_REAL16 more flexibleeschnett2013-01-15
| | | | | | | | | 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
* Autoconf attribute always_inlineeschnett2013-01-15
| | | | | | | | Add autoconf test for __attribute__((__always_inline__)). Improve autoconf test for _Pragma syntax. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4934 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add autoconf check whether C99 is supportedeschnett2012-10-23
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4883 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Check availability of isnan in C++eschnett2012-10-22
| | | | | | | | | | Check availability of isnan in C++. Introduce autoconf macros specifying how to call a good version of isnan in any language. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4881 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Detect backtrace-related functions during configurationhinder2011-09-22
| | | | | | | | See https://trac.einsteintoolkit.org/ticket/443 Patch by Roland Haas git-svn-id: http://svn.cactuscode.org/flesh/trunk@4726 17b73243-c579-4c4c-a9d2-2d5706c11dac
* #define HAVE_CCTK_C_INLINE when inlining is supported, even when theeschnett2011-08-14
| | | | | | | "inline" keyword works as is. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4715 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Improve auto-detection of "restrict" keywordeschnett2011-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | Update and improve the auto-detection of the "restrict" keyword; add more test cases to detect more possible failures. Disable testing the array syntax void foo (double A[restrict]); where the "restrict" keyword is given within the square brackets; instead, one can use the pointer syntax void foo (double *restrict const A); which is tested. Add support for the gcc built-in function "builtin_expect", which tells the compiler the value that an expression is most likely to have. Re-enable the (currently commented out) definitions for attribute(hot) and attribute(cold). git-svn-id: http://svn.cactuscode.org/flesh/trunk@4702 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add CCTK_ATTRIBUTE_ALIGNED, which is auto-configured and expands toeschnett2011-01-04
| | | | | | | | gcc' __attribute__(__aligned__(...)) if present. This is necessary for vectorisation. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4662 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Autoconf CCTK_ATTRIBUTE_NOINLINE, which expands toeschnett2010-12-23
| | | | | | | __attribute__((noinline)) if that is supported by the compiler. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4658 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Detect whether the compiler supports the attributesschnetter2009-11-11
| | | | | | | | | | | | | | | | | | | | | | const pure unused cold hot These attributes can be used to annotate declarations of variables, functions, and member functions to avoid warnings or enable additional optimisations. Detect whether the _Pragma directive is recognised. _Pragma can be used instead of #pragma, but works also inside macros. Update the detection of the static, inline, and restrict qualifiers to catch certain compiler errors, and avoids using these attributes with these compilers. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4578 17b73243-c579-4c4c-a9d2-2d5706c11dac
* If the C/C++ compiler didn't produce a runnable executable the configurationtradke2008-12-05
| | | | | | | | | process is now aborted with an error message. To create a cross compiled configuration the new configure option CROSS_COMPILE must be set to "yes". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4512 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Introduce a new autoconf macro CCTK_CHECK_C_INLINE, which checks forschnetter2007-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | the inline keyword very similarly to AC_C_INLINE. CCTK_CHECK_C_INLINE works in the following way: Do nothing if the compiler accepts the inline keyword. Otherwise define inline to __inline__ or __inline if one of those work, otherwise define inline to be empty. The setting '__inline__ __attribute__((__gnu_inline__))' is for gcc 4.3 and later. By default this version of gcc follows the new ANSI standard for "static inline" and "extern inline", which is incompatible with many libraries (e.g. GSL), leading to linker errors about duplicate symbols. This is because "static inline" now generates an externally visible symbol. The setting above makes gcc fall back to the old meaning, which does not generate an externally visible symbol for "static inline". Use CCTK_CHECK_C_INLINE instead of AC_C_INLINE in configure.in. Re-generate configure. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4429 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Cactus' autodetection of Fortran's real*16 does currently not work; itschnetter2006-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Application of patchswhite2006-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fortran REAL*16 detection http://www.cactuscode.org/old/pipermail/patches/2006-April/000164.html ... a patch that makes Cactus directly detect Fortran support for a REAL*16 type. The problem has been that Cactus based CCTK_REAL16 on support for the C type 'long double'. This would cause it to create Fortran code for REAL*16, a type which was sometimes not supported. In particular, on a 64-bit Athlon machine with Gnu 4.1.0, gfortran defines REAL*8 but not REAL*16, while gcc defines 'long double'. This caused thorn AEIThorns/Fortran to fail to compile. This patch causes the configuration to directly compile Fortran code that features REAL*16, and define CCTK_REAL16 only if that compiles *and* C's 'long double' is supported. When you make config, you will see a new line about Fortran REAL*16. I have tested the enclosed patch on my laptop with Gnu 4.10 and Intel 9.0 compilers 64-bit AMD Athlon with same compilers POWER4 with IBM XL compilers BUT NOTE: I have severe doubts about using REAL*16 on any of these architectures. That 16-byte (128-bit) type is not natively supported on the Xeon, Athlon, or POWER machines. While some compilers support such types, calculation is done in software, not on the FPU. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4314 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Check for the "restrict" qualifier more thoroughly. Certain compilersschnetter2006-04-04
| | | | | | | | (old versions of g++) don't support restrict in arrays which are structure members. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4282 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add another test when checking for the "restrict" qualifiers. Someschnetter2006-04-02
| | | | | | | | | buggy compilers (e.g. old versions of gcc) do not support "restrict" on arrays which are function arguments. On these compilers, we now disable "restrict". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4280 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Explicitly remove all previous "conftest*" files before trying toschnetter2006-04-02
| | | | | | | | | | | | | compile something. It seems as if AC_PROG_*_GNU does not clean up after itself. On case-insensitive file systems, having a file "conftest.c" around while using cat to write to a file "conftest.C" means that the resulting file is still "conftest.c", so that it is compiled as C and not as C++ programme. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4279 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undo changes that prevent more unwanted warnings about unused variables.schnetter2005-09-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Introduce macros CCTK_DECLARE and CCTK_DECLARE_INIT which declare orschnetter2005-09-26
| | | | | | | | | | | | | | declare and initialise local variables. They also add the necessary magic to prevent compiler warnings about unused variables. If the compiler supports __attribute__((unused)), then use this. Otherwise, use the existing fallback of taking the variable's address. In Fortran, use the variable's kind as fallback. Use these macros in autogenerated code and in "cctk.h". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4146 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed detection of gettimeofday(2) which was broken for Intel C/C++ 8.1.tradke2005-01-14
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3959 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Rename datatype availability macros from CCTK_HAVE_<datatype> intotradke2004-06-26
| | | | | | | HAVE_CCTK_<datatype> to be consistent with other configure macros. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3794 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Some changes prompted by PR/1320:goodale2003-03-13
| | | | | | | | | | | | | | | | | | | | | | | Added #define of SIZEOF_LONG_LONG to cctk_Config.h.in Added macros which detect the presence of bool in C and restrict in C++. Currently these define CCTK_... macros but don't #define bool in C or restrict in C++ as these would be non-standard features which might conflict with user-written macros or code. Moved AC_C_RESTRICT macro to aclocal.m4 and renamed it to CCTK_C_RESTRICT to conform with autoconf naming conventions. Created macro for detecting presence of bool in CXX and changed to use the macro. A little bit of tidying up of cctk_Config.h.in to make the file a bit easier to read. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@3173 17b73243-c579-4c4c-a9d2-2d5706c11dac
* New functions to help checking for functions and libraries.goodale2000-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In CCTK_Functions.sh: CCTK_AddPrefix(prefix, list) CCTK_AddSuffix(suffix, list) CCTK_Wrap(prefix, suffix, list) which manipulate the list in the obvious way. In aclocal.m4: CCTK_CHECK_FUNCS CCTK_CHECK_LIB with same functionality as the equivalent AC ones, except they use LIBS and LIBDIRS as used in the rest of the cactus make system. CCTK_CHECK_LIB_FUNC which checks for a function in a particular library, and defined both HAVE_LIB[LIB] and HAVE_FUNC. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1881 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added new second argument to CCTK_CHECK_HEADERS. This is code which shouldgoodale2000-09-15
| | | | | | | | | | be placed before #include <...> in the test program. E.g. to make sure something else is included first. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1818 17b73243-c579-4c4c-a9d2-2d5706c11dac
* bug fix for the misconfiguration, saving LIB in a different variable and ↵lanfer2000-08-31
| | | | | | restoring value later git-svn-id: http://svn.cactuscode.org/flesh/trunk@1803 17b73243-c579-4c4c-a9d2-2d5706c11dac
* autoconf test marco: check if the system knows about socklen_t (t3e does ↵lanfer2000-08-25
| | | | | | not, eg.). Set CCTK_SOCKLEN_T to socklen_t or int otherwise git-svn-id: http://svn.cactuscode.org/flesh/trunk@1799 17b73243-c579-4c4c-a9d2-2d5706c11dac
* A few more checks for things. Now looks for regex.h and getopt.h andgoodale2000-05-14
| | | | | | | | | | if they don't exist it sets the make variables BUILD_REGEX and BUILD_GETOPT to no, otherwise they are yes. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1659 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Preliminary support for cross-compilation.goodale2000-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting BUILD=, or HOST=, or TARGET= will pass --build=, ... to the configure process. If cross compiling you need to set ENDIAN - either big or little SIZEOF_LONG_INT SIZEOF_INT SIZEOF_SHORT_INT SIZEOF_LONG_DOUBLE SIZEOF_DOUBLE SIZEOF_SHORT SIZEOF_POINTER otherwise you'll get an error. You may also set NULL_DEVICE to tell it the location of the null device. If you don't set this you'll just get a warning, and it will default to /dev/null. This is weakly tested, as I am limited in what I can cross compile for. Fixed semantics for DEBUG to be as in previous commit, except DEBUG=DEFINES define CCTK_DEBUG and not DEBUG in the header files. Partially dealt with PR 340 -- -g -O2 no longer automatically appear as the compilation flags. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1652 17b73243-c579-4c4c-a9d2-2d5706c11dac
* More configuration stuff. Should now properly detect a lot ofgoodale1999-10-21
| | | | | | | | | the standard timing stuff. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1077 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Some more configuration stuff. Have started splitting nasty stuff offgoodale1999-10-21
into an aclocal.m4 file. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1075 17b73243-c579-4c4c-a9d2-2d5706c11dac