Added static_assert from Loki
[ustl.git] / bsconf.h
blobb65220f69fa652602392259c7162439571a4ec88
1 /* This file is part of bsconf - a configure replacement.
3 * This is the configuration file used by bsconf.c to specify information
4 * specific to your project that it needs to substitute into files listed
5 * in g_Files. Being a configuration file, this file can be used or
6 * modified entirely without restriction. You should change all values
7 * appropriately to the name of your project and its requirements. The
8 * bsconf license does not apply to this file. It can and should be
9 * treated as a template for the creation of your own configuration file.
11 * All substituted variable names are given without enclosing @@. For
12 * example: "CC" will match "@CC@" in config.h.in and replace it with
13 * "gcc" in config.h.
16 #define BSCONF_VERSION 0x03
18 #define PACKAGE_NAME "ustl"
19 #define LIB_MAJOR "1"
20 #define LIB_MINOR "1"
21 #define LIB_BUILD "0"
23 #define PACKAGE_VERSION LIB_MAJOR "." LIB_MINOR
24 #define PACKAGE_TARNAME PACKAGE_NAME
25 #define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION
26 #define PACKAGE_BUGREPORT "Mike Sharov <msharov@users.sourceforge.net>"
28 static cpchar_t g_Files [] = {
29 "Config.mk",
30 "config.h"
33 /* Values substitute @VARNAME@ */
34 static cpchar_t g_EnvVars [] = {
35 "CC",
36 "LD",
37 "CXX",
38 "CPP",
39 "HOME",
40 "CXXFLAGS",
41 "LDFLAGS",
42 "CPPFLAGS",
43 "LDFLAGS",
44 "CFLAGS"
47 /* VARIABLE PROGRAM HOW TO CALL IF NOT FOUND */
48 static cpchar_t g_ProgVars [] = {
49 "CC", "gcc", "gcc", "@CC@",
50 "CC", "cc", "cc", "gcc",
51 "CXX", "g++", "g++", "@CXX@",
52 "CXX", "c++", "c++", "g++",
53 "LD", "ld", "ld", "ld",
54 "AR", "ar", "ar", "echo",
55 "RANLIB", "ranlib", "ranlib", "touch",
56 "DOXYGEN", "doxygen", "doxygen", "echo",
57 "INSTALL", "install", "install -c", "cp"
60 /* NAME IF NOT FOUND IF FOUND */
61 static cpchar_t g_Headers [] = {
62 "assert.h", "#undef HAVE_ASSERT_H", "#define HAVE_ASSERT_H 1",
63 "ctype.h", "#undef HAVE_CTYPE_H", "#define HAVE_CTYPE_H 1",
64 "errno.h", "#undef HAVE_ERRNO_H", "#define HAVE_ERRNO_H 1",
65 "fcntl.h", "#undef HAVE_FCNTL_H", "#define HAVE_FCNTL_H 1",
66 "float.h", "#undef HAVE_FLOAT_H", "#define HAVE_FLOAT_H 1",
67 "inttypes.h", "#undef HAVE_INTTYPES_H", "#define HAVE_INTTYPES_H 1",
68 "limits.h", "#undef HAVE_LIMITS_H", "#define HAVE_LIMITS_H 1",
69 "locale.h", "#undef HAVE_LOCALE_H", "#define HAVE_LOCALE_H 1",
70 "malloc.h", "#undef HAVE_MALLOC_H", "#define HAVE_MALLOC_H 1",
71 "alloca.h", "#undef HAVE_ALLOCA_H", "#define HAVE_ALLOCA_H 1",
72 "memory.h", "#undef HAVE_MEMORY_H", "#define HAVE_MEMORY_H 1",
73 "signal.h", "#undef HAVE_SIGNAL_H", "#define HAVE_SIGNAL_H 1",
74 "stdarg.h", "#undef HAVE_STDARG_H", "#define HAVE_STDARG_H 1",
75 "stddef.h", "#undef HAVE_STDDEF_H", "#define HAVE_STDDEF_H 1",
76 "stdint.h", "#undef HAVE_STDINT_H", "#define HAVE_STDINT_H 1",
77 "stdio.h", "#undef HAVE_STDIO_H", "#define HAVE_STDIO_H 1",
78 "stdlib.h", "#undef HAVE_STDLIB_H", "#define HAVE_STDLIB_H 1",
79 "string.h", "#undef HAVE_STRING_H", "#define HAVE_STRING_H 1",
80 "strings.h", "#undef HAVE_STRINGS_H", "#define HAVE_STRINGS_H 1",
81 "sys/stat.h", "#undef HAVE_SYS_STAT_H", "#define HAVE_SYS_STAT_H 1",
82 "sys/types.h", "#undef HAVE_SYS_TYPES_H", "#define HAVE_SYS_TYPES_H 1",
83 "sys/wait.h", "#undef HAVE_SYS_WAIT_H", "#define HAVE_SYS_WAIT_H 1",
84 "time.h", "#undef HAVE_TIME_H", "#define HAVE_TIME_H 1",
85 "unistd.h", "#undef HAVE_UNISTD_H", "#define HAVE_UNISTD_H 1",
86 "math.h", "#undef HAVE_MATH_H", "#define HAVE_MATH_H 1",
87 "stdlib.h", "#undef HAVE_STDLIB_H", "#define HAVE_STDLIB_H 1"
90 /* NAME IF NOT FOUND IF FOUND */
91 static cpchar_t g_Libs [] = {
92 "supc++", "", "-lsupc++",
93 #if __GNUC__ == 3
94 "gcc_eh", "-lgcc_s", "-lgcc_eh",
95 #else
96 "gcc_eh", "", "",
97 #endif
98 "SystemStubs", "", "-lSystemStubs" /* For MacOS 10.4+ */
101 /* NAME IF NOT FOUND IF FOUND */
102 static cpchar_t g_Functions [] = {
103 "atexit", "#undef HAVE_ATEXIT", "#define HAVE_ATEXIT 1",
104 "malloc", "#undef HAVE_MALLOC\n", "#define HAVE_MALLOC 1\n",
105 "memchr", "#undef HAVE_MEMCHR", "#define HAVE_MEMCHR 1",
106 "memmove", "#undef HAVE_MEMMOVE", "#define HAVE_MEMMOVE 1",
107 "memset", "#undef HAVE_MEMSET", "#define HAVE_MEMSET 1",
108 "ptrdiff_t", "#undef HAVE_PTRDIFF_T", "#define HAVE_PTRDIFF_T 1",
109 "strerror", "#undef HAVE_STRERROR", "#define HAVE_STRERROR 1",
110 "strsignal", "#undef HAVE_STRSIGNAL", "#define HAVE_STRSIGNAL 1",
111 "strtol", "#undef HAVE_STRTOL", "#define HAVE_STRTOL 1",
112 #if __GNUC__ >= 3
113 "round", "#undef HAVE_ROUND", "#define HAVE_ROUND 1",
114 #endif
115 "strrchr", "#undef HAVE_STRRCHR", "#define HAVE_STRRCHR 1",
116 "__va_copy", "#undef HAVE_VA_COPY", "#define HAVE_VA_COPY 1"
119 /* NAME WITHOUT TEXT WITH TEXT */
120 static cpchar_t g_Components [] = {
121 "shared", "#BUILD_SHARED\t= 1", "BUILD_SHARED\t= 1 ",
122 "static", "#BUILD_STATIC\t= 1", "BUILD_STATIC\t= 1 ",
123 "debug", "#DEBUG\t\t= 1", "DEBUG\t\t= 1 ",
124 "bounds", "#undef WANT_STREAM_BOUNDS_CHECKING", "#define WANT_STREAM_BOUNDS_CHECKING 1 ",
125 "fastcopy", "#undef WANT_UNROLLED_COPY", "#define WANT_UNROLLED_COPY 1 ",
126 #if __GNUC__ >= 3 && (__i386__ || __x86_64__) && !sun
127 "mmx", "#undef WANT_MMX", "#define WANT_MMX 1 ",
128 #endif
129 "libstdc++", "#define WITHOUT_LIBSTDCPP 1", "#undef WITHOUT_LIBSTDCPP",
130 "libstdc++", "NOLIBSTDCPP\t=", "#NOLIBSTDCPP\t="
133 /* Parallel to g_Components */
134 static SComponentInfo g_ComponentInfos [VectorSize(g_Components) / 3] = {
135 { 1, "Builds the shared library (if supported by the OS)" },
136 { 0, "Builds the static library" },
137 { 0, "Compiles the library with debugging information" },
138 { 1, "Disable runtime bounds checking on stream reads/writes" },
139 { 1, "Disable specializations for copy/fill" },
140 #if __GNUC__ >= 3 && (__i386__ || __x86_64__) && !sun
141 { 1, "Disable use of MMX/SSE/3dNow! instructions" },
142 #endif
143 #if __GNUC__ >= 3
144 { 0, "Link with libstdc++" },
145 { 0, "" }
146 #else
147 { 1, "" },
148 { 1, "" }
149 #endif
152 /* Substitutes names like @PACKAGE_NAME@ with the second field */
153 static cpchar_t g_CustomVars [] = {
154 "PACKAGE_NAME", PACKAGE_NAME,
155 "PACKAGE_VERSION", PACKAGE_VERSION,
156 "PACKAGE_TARNAME", PACKAGE_TARNAME,
157 "PACKAGE_STRING", PACKAGE_STRING,
158 "PACKAGE_BUGREPORT", PACKAGE_BUGREPORT,
159 "LIBNAME", PACKAGE_NAME,
160 "LIB_MAJOR", LIB_MAJOR,
161 "LIB_MINOR", LIB_MINOR,
162 "LIB_BUILD", LIB_BUILD