aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-08-24 14:42:22 +0000
committerdos-reis <gdr@axiomatics.org>2010-08-24 14:42:22 +0000
commitea2ea538c6a308bfc1ca17142ad3e272f5758e80 (patch)
tree563025e52e033c281d5c12d0079babeef9019dd0 /config
parentd0832d123c8ddd89ba7f14a338dd7fdc0e8af311 (diff)
downloadopen-axiom-ea2ea538c6a308bfc1ca17142ad3e272f5758e80.tar.gz
Implement an s-expression C++ library.
* utils/hash-table.H: New. * utils/sexpr.H: Likewise. * utils/sexpr.cc: Likewise. * utils/string-pool.H: Likewise. * utils/string-pool.cc: Likewise. * utils/storage.H: Include openaxiom-c-macros.h (Memory::Storage): New. (Memory::Arena): Likewise. * utils/storage.cc: Implement member functions of new class. * utils/Makefile.in (libOpenAxiom_HEADERS): Include hash-table.H, string-pool.H, and sexpr.H (libOpenAxiom_SOURCES): Include string-pool.cc and sexpr.cc
Diffstat (limited to 'config')
-rw-r--r--config/open-axiom.m420
-rw-r--r--config/openaxiom-c-macros.h.in3
2 files changed, 23 insertions, 0 deletions
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index a2e26e8b..d7de600a 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -1010,10 +1010,30 @@ if test x"$ac_cv_header_sys_mman_h" = xyes; then
fi
])
+dnl ----------------------------------
+dnl -- OPENAXIOM_ALIGNMENT_OPERATOR --
+dnl ----------------------------------
+dnl Check that the C/C++ compiler understand
+dnl alignment operator, i.e. either `alignof',
+dnl or vendor lock-ins such as `__alignof'.
+AC_DEFUN([OPENAXIOM_ALIGNMENT_OPERATOR],[
+AC_MSG_CHECKING([name of alignment query operator])
+oa_alignment=
+AC_COMPILE_IFELSE([int a = __alignof(int);],
+ [oa_alignment="__alignof"],
+ [AC_COMPILE_IFELSE([int a = alignof(int);],
+ [oa_alignment="alignof"],
+ [AC_MSG_ERROR([C/C++ compiler does not support alignment query operator])])])
+AC_DEFINE_UNQUOTED([openaxiom_alignment],[$oa_alignment],
+ [Alignment query operator])
+AC_MSG_RESULT([$oa_alignment])
+])
+
dnl --------------------------
dnl -- OPENAXIOM_CHECK_MISC --
dnl --------------------------
AC_DEFUN([OPENAXIOM_CHECK_MISC],[
+OPENAXIOM_ALIGNMENT_OPERATOR
case $GCC in
yes)
CFLAGS="$CFLAGS -O2 -Wall"
diff --git a/config/openaxiom-c-macros.h.in b/config/openaxiom-c-macros.h.in
index c92cc8ac..41b47835 100644
--- a/config/openaxiom-c-macros.h.in
+++ b/config/openaxiom-c-macros.h.in
@@ -207,6 +207,9 @@
if such a type exists, and if the system does not define it. */
#undef intptr_t
+/* Alignment query operator */
+#undef openaxiom_alignment
+
/* Define to the type of an unsigned integer type of width exactly 16 bits if
such a type exists and the standard includes do not define it. */
#undef uint16_t