diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-03-13 19:26:16 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-03-13 19:26:16 +0000 |
commit | 841cbf6f63668e286a580ede386af719a05ae50b (patch) | |
tree | fc97293791db99e5073ef5cf027c33ff852815c1 /lib/make/configure.in | |
parent | 5a4c7464ba9c1de348dbf3bebd8c6f74d6b29026 (diff) |
Some changes prompted by PR/1320:
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
Diffstat (limited to 'lib/make/configure.in')
-rw-r--r-- | lib/make/configure.in | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/lib/make/configure.in b/lib/make/configure.in index 6a43d376..7d90f055 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -260,7 +260,6 @@ fi AC_CHECK_SIZEOF(char *, $SIZEOF_POINTER) - # See if there's a null device, and what it's called if test "x$cross_compiling" = "xyes"; then @@ -454,8 +453,8 @@ if test "x$CXX" != "xnone" ; then AC_LANG_CPLUSPLUS CCTK_CHECK_HEADERS(vector vector.h) - AC_TRY_COMPILE(, bool foo;, -AC_DEFINE(HAVE_BOOL)) +dnl AC_TRY_COMPILE(, bool foo;, +dnl AC_DEFINE(HAVE_BOOL)) AC_LANG_RESTORE fi @@ -486,25 +485,11 @@ fi AC_C_CONST AC_C_INLINE +CCTK_CHECK_C_RESTRICT +CCTK_CHECK_CXX_RESTRICT -dnl Do nothing if the compiler accepts the restrict keyword. -dnl Otherwise define restrict to __restrict__ or __restrict if one of -dnl those work, otherwise define restrict to be empty. -AC_DEFUN(AC_C_RESTRICT, -[AC_CACHE_CHECK([for restrict], ac_cv_c_restrict, -[ac_cv_c_restrict=no -for ac_kw in restrict __restrict__ __restrict; do - AC_TRY_COMPILE(, [double * $ac_kw foo;], [ac_cv_c_restrict=$ac_kw; break]) -done -]) -case "$ac_cv_c_restrict" in - restrict | yes) ;; - no) AC_DEFINE(restrict, ) ;; - *) AC_DEFINE_UNQUOTED(restrict, $ac_cv_c_restrict) ;; -esac -]) - -AC_C_RESTRICT +CCTK_C_BOOL +CCTK_CXX_BOOL dnl Do we have crypt(3) |