From c2282be5c7dc1d1191641b55a04c27bb6da8d6e9 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 10 Sep 2003 15:10:11 +0000 Subject: [PATCH] * configure.ac: + Prefer the C99 inttypes.h rather than stdint.h. + Use AC_FUNC_ALLOCA instead of AC_CHECK_FUNCS(alloca). * include/object.h: + Removed a legacy #include . git-svn-id: svn://svn.zoy.org/elk/trunk@139 55e467fa-43c5-0310-a8a2-de718669efc6 --- configure.ac | 27 ++++++++++++++------------- include/object.h | 1 - include/site.h.in | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index ba57733..c86a926 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ AC_PREREQ(2.50) AC_CONFIG_AUX_DIR(autotools) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(elk, 3.99.1) +AM_INIT_AUTOMAKE(elk, 3.99.2-cvs) AM_CONFIG_HEADER(config.h) AC_PROG_CC @@ -19,22 +19,22 @@ AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T -AC_CHECK_HEADERS(stdint.h inttypes.h sys/_inttypes.h) -if test "${ac_cv_header_stdint_h}" = "yes"; then - STDINT_HEADER="stdint.h" -elif test "${ac_cv_header_inttypes_h}" = "yes"; then - STDINT_HEADER="inttypes.h" -elif test "${ac_cv_header_sys__inttypes_h}" = "yes"; then - STDINT_HEADER="sys/_inttypes.h" -else - AC_MSG_ERROR([cannot find C99 integer headers]) -fi +AC_CHECK_HEADERS(inttypes.h, + [STDINT_HEADER=""], + [AC_CHECK_HEADERS(sys/inttypes.h, + [STDINT_HEADER=""], + [AC_CHECK_HEADERS(sys/_inttypes.h, + [STDINT_HEADER=""], + [AC_CHECK_HEADERS(stdint.h, + [STDINT_HEADER=""], + [AC_MSG_ERROR([cannot find C99 integer headers])])])])]) +AC_DEFINE_UNQUOTED(STDINT_HEADER, [${STDINT_HEADER}], [Define the C99 integer types header]) AC_SUBST(STDINT_HEADER) # $system should contain the name of this file. It may be used by some # of the build scripts to do things that are specific to one single # type of system. -AC_DEFINE(SYSTEMTYPE, "${target_os}", Our operating system) +AC_DEFINE_UNQUOTED(SYSTEMTYPE, ["${target_os}"], [Our operating system]) # Does the system support the vprintf library function? If not, # availability of the (non-portable) _doprnt function is assumed. @@ -336,7 +336,8 @@ fi # function actually extend the stack? If in doubt, extract alloca.o # from the C library and check if it contains the symbols malloc and free. # If this is the case, forget it. -AC_CHECK_FUNCS(alloca) +AC_FUNC_ALLOCA +dnl AC_CHECK_FUNCS(alloca) # Must be included to use alloca? Is "#pragma alloca" required? AC_CHECK_HEADERS(alloca.h) diff --git a/include/object.h b/include/object.h index 755f214..800e505 100644 --- a/include/object.h +++ b/include/object.h @@ -30,7 +30,6 @@ */ #include -#include #include typedef struct { diff --git a/include/site.h.in b/include/site.h.in index 8f33379..480b0e0 100644 --- a/include/site.h.in +++ b/include/site.h.in @@ -1,4 +1,4 @@ -/* site.h.in: Site-local settings. +/* site.h.in: Site-local features. * * $Id$ * @@ -28,8 +28,8 @@ * THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ -/* The C99 integers header */ -#include <@STDINT_HEADER@> +/* The C99 integer types header */ +#include @STDINT_HEADER@ /* C Compiler features */ #ifndef __GNUC__