7 # Adds required extras to config.h
11 # Copyright (C) 2014 Andrew Hutchings
12 # Based on bottom.m4 from libdrizzle
14 # All rights reserved.
16 # Redistribution and use in source and binary forms, with or without
17 # modification, are permitted provided that the following conditions are
20 # * Redistributions of source code must retain the above copyright
21 # notice, this list of conditions and the following disclaimer.
23 # * Redistributions in binary form must reproduce the above
24 # copyright notice, this list of conditions and the following disclaimer
25 # in the documentation and/or other materials provided with the
28 # * The names of its contributors may not be used to endorse or
29 # promote products derived from this software without specific prior
32 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
35 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
37 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
38 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
39 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
40 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
42 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 AC_DEFUN([CONFIG_EXTRA], [
51 /* _SYS_FEATURE_TESTS_H is Solaris, _FEATURES_H is GCC */
52 #if defined( _SYS_FEATURE_TESTS_H) || defined(_FEATURES_H)
53 # error "You should include config.h as your first include file"
60 #ifndef __STDC_FORMAT_MACROS
61 # define __STDC_FORMAT_MACROS
64 #if defined(__cplusplus)
67 # include <inttypes.h>
70 #if !defined(HAVE_ULONG) && !defined(__USE_MISC)
72 typedef unsigned long int ulong;