1
dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
3
dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
4
dnl existence of an include file <stdint.h> that defines a set of
5
dnl typedefs, especially uint8_t,int32_t,uintptr_t. Many older
6
dnl installations will not provide this file, but some will have the
7
dnl very same definitions in <inttypes.h>. In other enviroments we can
8
dnl use the inet-types in <sys/types.h> which would define the typedefs
9
dnl int8_t and u_int8_t respectivly.
11
dnl This macros will create a local "_stdint.h" or the headerfile given
12
dnl as an argument. In many cases that file will just "#include
13
dnl <stdint.h>" or "#include <inttypes.h>", while in other environments
14
dnl it will provide the set of basic 'stdint's definitions/typedefs:
16
dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
17
dnl int_least32_t.. int_fast32_t.. intmax_t
19
dnl which may or may not rely on the definitions of other files, or
20
dnl using the AC_CHECK_SIZEOF macro to determine the actual sizeof each
23
dnl if your header files require the stdint-types you will want to
24
dnl create an installable file mylib-int.h that all your other
25
dnl installable header may include. So if you have a library package
26
dnl named "mylib", just use
28
dnl AX_CREATE_STDINT_H(mylib-int.h)
30
dnl in configure.ac and go to install that very header file in
31
dnl Makefile.am along with the other headers (mylib.h) - and the
32
dnl mylib-specific headers can simply use "#include <mylib-int.h>" to
33
dnl obtain the stdint-types.
35
dnl Remember, if the system already had a valid <stdint.h>, the
36
dnl generated file will include it directly. No need for fuzzy
37
dnl HAVE_STDINT_H things...
40
dnl @author Guido Draheim <guidod@gmx.de>
41
dnl @version 2003-12-07
42
dnl @license GPLWithACException
1
##### http://autoconf-archive.cryp.to/ax_create_stdint_h.html
5
# AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
9
# the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
10
# existence of an include file <stdint.h> that defines a set of
11
# typedefs, especially uint8_t,int32_t,uintptr_t. Many older
12
# installations will not provide this file, but some will have the
13
# very same definitions in <inttypes.h>. In other enviroments we can
14
# use the inet-types in <sys/types.h> which would define the typedefs
15
# int8_t and u_int8_t respectivly.
17
# This macros will create a local "_stdint.h" or the headerfile given
18
# as an argument. In many cases that file will just "#include
19
# <stdint.h>" or "#include <inttypes.h>", while in other environments
20
# it will provide the set of basic 'stdint's definitions/typedefs:
22
# int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
23
# int_least32_t.. int_fast32_t.. intmax_t
25
# which may or may not rely on the definitions of other files, or
26
# using the AC_CHECK_SIZEOF macro to determine the actual sizeof each
29
# if your header files require the stdint-types you will want to
30
# create an installable file mylib-int.h that all your other
31
# installable header may include. So if you have a library package
32
# named "mylib", just use
34
# AX_CREATE_STDINT_H(mylib-int.h)
36
# in configure.ac and go to install that very header file in
37
# Makefile.am along with the other headers (mylib.h) - and the
38
# mylib-specific headers can simply use "#include <mylib-int.h>" to
39
# obtain the stdint-types.
41
# Remember, if the system already had a valid <stdint.h>, the
42
# generated file will include it directly. No need for fuzzy
43
# HAVE_STDINT_H things... (oops, GCC 4.2.x has deliberatly disabled
44
# its stdint.h for non-c99 compilation and the c99-mode is not the
45
# default. Therefore this macro will not use the compiler's stdint.h
46
# - please complain to the GCC developers).
54
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
56
# This program is free software; you can redistribute it and/or
57
# modify it under the terms of the GNU General Public License as
58
# published by the Free Software Foundation; either version 2 of the
59
# License, or (at your option) any later version.
61
# This program is distributed in the hope that it will be useful, but
62
# WITHOUT ANY WARRANTY; without even the implied warranty of
63
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
64
# General Public License for more details.
66
# You should have received a copy of the GNU General Public License
67
# along with this program; if not, write to the Free Software
68
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
71
# As a special exception, the respective Autoconf Macro's copyright
72
# owner gives unlimited permission to copy, distribute and modify the
73
# configure scripts that are the output of Autoconf when processing
74
# the Macro. You need not follow the terms of the GNU General Public
75
# License when using or distributing such scripts, even though
76
# portions of the text of the Macro appear in them. The GNU General
77
# Public License (GPL) does govern all other use of the material that
78
# constitutes the Autoconf Macro.
80
# This special exception to the GPL applies to versions of the
81
# Autoconf Macro released by the Autoconf Macro Archive. When you
82
# make and distribute a modified version of the Autoconf Macro, you
83
# may extend this special exception to the GPL to apply to your
84
# modified version as well.
44
86
AC_DEFUN([AX_CHECK_DATA_MODEL],[
45
87
AC_CHECK_SIZEOF(char)