File: config.h.in

package info (click to toggle)
pcb-rnd 2.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 30,972 kB
  • sloc: ansic: 206,520; sh: 6,026; yacc: 5,565; makefile: 2,603; awk: 1,770; lex: 1,069; python: 519; lisp: 169; tcl: 67; xml: 40; perl: 34; ruby: 5
file content (284 lines) | stat: -rw-r--r-- 11,276 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
print [@ /***** Generated by scconfig - DO NOT EDIT *****/

/* Source: config.h.in; to regenerate run ./configure */

#ifndef PCB_CONFIG_H
#define PCB_CONFIG_H

/****************************************************************************/
/* Static defines to enable extra features on some systems; once we get
   testers on those systems, we can remove them and see if scconfig figured
   everything. */

/* Enable extensions on AIX 3, Interix.  */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable threading extensions on Solaris.  */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop.  */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris.  */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif

/****************************************************************************/
/* Package properties */

/* Name of package */
#define PCB_PACKAGE "pcb-rnd"

/****************************************************************************/
/* These ones are already autodetected by scconfig */
@]

print {\n\n/* Macro to add a funciton attribute to suppress "function unused" for static inline functions declared in .h files */\n}
print_ternary ?cc/func_attr/unused/presents {#define PCB_FUNC_UNUSED __attribute__((unused))} {#define PCB_FUNC_UNUSED}

print {\n\n/* inline, as detected ("inline" or empty) */\n}
print_ternary ?cc/inline {#define PCB_INLINE_DETECTED inline} {#define PCB_INLINE_DETECTED /* no inline */}

print {\n\n/* final, combined keywords and attributes for an inline function */\n}
print {#define PCB_INLINE static PCB_INLINE_DETECTED PCB_FUNC_UNUSED\n\n}

print {\n\n/* Wether setenv() works */\n}
print_ternary ?libs/env/setenv/presents {#define PCB_HAVE_SETENV 1} {/* #undef PCB_HAVE_SETENV */}

print {\n\n/* Wether putenv() works */\n}
print_ternary ?libs/env/putenv/presents {#define PCB_HAVE_PUTENV 1} {/* #undef PCB_HAVE_PUTENV */}

print {\n\n/* Wether usleep() works */\n}
print_ternary ?libs/time/usleep/presents {#define PCB_HAVE_USLEEP 1} {/* #undef PCB_HAVE_USLEEP */}

print {\n\n/* Wether win32 Sleep() works */\n}
print_ternary ?libs/time/Sleep/presents {#define PCB_HAVE_WSLEEP 1} {/* #undef PCB_HAVE_WSLEEP */}

print {\n\n/* Wether select() works */\n}
print_ternary ?libs/socket/select/presents {#define PCB_HAVE_SELECT 1} {/* #undef PCB_HAVE_SELECT */}

print {\n\n/* Define to 1 if you have the `snprintf' function. */\n}
print_ternary ?libs/snprintf {#define HAVE_SNPRINTF 1} {/* #undef HAVE_SNPRINTF */}

print {\n\n/* Define to 1 if you have the `vsnprintf' function. */\n}
print_ternary ?libs/vsnprintf {#define HAVE_VSNPRINTF 1} {/* #undef HAVE_VSNPRINTF */}

print {\n\n/* Define to 1 if you have the `getcwd' function. */\n}
print_ternary ?libs/fs/getcwd/presents {#define HAVE_GETCWD 1} {/* #undef HAVE_GETCWD */}

print {\n\n/* Define to 1 if you have the `_getcwd' function. */\n}
print_ternary ?libs/fs/_getcwd/presents {#define HAVE__GETCWD 1} {/* #undef HAVE__GETCWD */}

print {\n\n/* Define to 1 if you have the `getwd' function. */\n}
print_ternary ?libs/fs/_getwd/presents {#define HAVE_GETWD 1} {/* #undef HAVE_GETWD */}

print {\n\n/* Define to 1 if you have the <gd.h> header file. */\n}
print_ternary ?libs/gui/gd/presents {#define HAVE_GD_H 1} {/* #undef HAVE_GD_H */}

print {\n\n/* Define to 1 if you have the `gdImageGif' function. */\n}
print_ternary ?libs/gui/gd/gdImageGif/presents {#define HAVE_GDIMAGEGIF 1} {/* #undef HAVE_GDIMAGEGIF */}

print {\n\n/* Define to 1 if you have the `gdImageJpeg' function. */\n}
print_ternary ?libs/gui/gd/gdImageJpeg/presents {#define HAVE_GDIMAGEJPEG 1} {/* #undef HAVE_GDIMAGEJPEG */}

print {\n\n/* Define to 1 if you have the `gdImagePng' function. */\n}
print_ternary ?libs/gui/gd/gdImagePng/presents {#define HAVE_GDIMAGEPNG 1} {/* #undef HAVE_GDIMAGEPNG */}

print {\n\n/* Define to 1 if you have the `gdImageSetResolution' function. */\n}
print_ternary ?libs/gui/gd/gdImageSetResolution/presents {#define HAVE_GD_RESOLUTION 1} {/* #undef HAVE_GD_RESOLUTION */}

print {\n\n/* Define to 1 if you have the `getpwuid' function. */\n}
print_ternary ?libs/userpass/getpwuid/presents {#define HAVE_GETPWUID 1} {/* #undef HAVE_GETPWUID */}

print {\n\n/* Define to 1 if you have the `rint' function. */\n}
print_ternary ?libs/math/rint/presents {#define HAVE_RINT 1} {/* #undef HAVE_RINT */}

print {\n\n/* Define to 1 if you have the `round' function. */\n}
print_ternary ?libs/math/round/presents {#define HAVE_ROUND 1} {/* #undef HAVE_ROUND */}

print {\n\n/* Wrapper for S_ISLNK(x); always return 0 if S_ISLNK doesn't exist */\n}
switch ?/target/libs/fs/stat/macros/S_ISLNK
	case {^$} print {#define WRAP_S_ISLNK(x) 0}; end;
	default print [@#define WRAP_S_ISLNK(x) @/target/libs/fs/stat/macros/S_ISLNK@(x)@]; end;
end;

print {\n\n/* Define to 1 if Xinerama is available */\n}
print_ternary ?libs/gui/xinerama/presents {#define HAVE_XINERAMA 1} {/*#undef HAVE_XINERAMA */}

print {\n\n/* Define to 1 if Xrender is available */\n}
print_ternary ?libs/gui/xrender/presents {#define HAVE_XRENDER 1} {/*#undef HAVE_XRENDER */}

print {\n\n/* Define to 1 if we should use windows api for dynamic linking. */\n}
print_ternary ?libs/LoadLibrary/presents {#define USE_LOADLIBRARY 1} {/* #undef USE_LOADLIBRARY */}

print {\n\n/* Define to 1 if we should use mkdtemp for creating temp files. */\n}
print_ternary ?libs/fs/mkdtemp/presents {#define HAVE_MKDTEMP 1} {/* #undef HAVE_MKDTEMP */}

print {\n\n/* Define to 1 if you have the `realpath' function. */\n}
print_ternary ?libs/fs/realpath/presents {#define HAVE_REALPATH 1} {/* #undef HAVE_REALPATH */}

print {\n\n/* Select which mechanism to use for running child processes. */\n}
print_ternary ?/target/libs/proc/wait/presents     {#define USE_FORK_WAIT 1} {/* #undef USE_FORK_WAIT */}
print {\n}
print_ternary ?/target/libs/proc/_spawnvp/presents {#define USE_SPAWNVP 1}   {/* #undef USE_SPAWNVP */}

print {\n\n/* Select which mechanism to use for creating a directory. */\n}
print_ternary ?/target/libs/fs/mkdir/presents     {#define USE_MKDIR 1} {/* #undef USE_MKDIR */}
print {\n}
print_ternary ?/target/libs/fs/_mkdir/presents    {#define USE__MKDIR 1} {/* #undef USE__MKDIR */}
print [@
#define MKDIR_NUM_ARGS 0@?/target/libs/fs/_mkdir/num_args@@?/target/libs/fs/mkdir/num_args@
@]

print {\n\n/* Define whether we have specific signals. */\n}
print_ternary ?signal/names/SIGPIPE/presents    {#define PCB_HAVE_SIGPIPE 1} {/* #undef PCB_HAVE_SIGPIPE */}
print {\n}
print_ternary ?signal/names/SIGSEGV/presents    {#define PCB_HAVE_SIGSEGV 1} {/* #undef PCB_HAVE_SIGSEGV */}
print {\n}
print_ternary ?signal/names/SIGABRT/presents    {#define PCB_HAVE_SIGABRT 1} {/* #undef PCB_HAVE_SIGABRT */}
print {\n}
print_ternary ?signal/names/SIGINT/presents     {#define PCB_HAVE_SIGINT 1}  {/* #undef PCB_HAVE_SIGINT */}
print {\n}
print_ternary ?signal/names/SIGHUP/presents     {#define PCB_HAVE_SIGHUP 1}  {/* #undef PCB_HAVE_SIGHUP */}
print {\n}
print_ternary ?signal/names/SIGTERM/presents    {#define PCB_HAVE_SIGTERM 1} {/* #undef PCB_HAVE_SIGTERM */}
print {\n}
print_ternary ?signal/names/SIGQUIT/presents    {#define PCB_HAVE_SIGQUIT 1} {/* #undef PCB_HAVE_SIGQUIT */}
print {\n}

print {\n/* Code warnings for TODO, portable (unlike #warning) */}
if ?cc/pragma_message
then
print [@
#define DO_PRAGMA(arg) _Pragma(#arg)
#define TODO(x) DO_PRAGMA(message("TODO: " #x))
@]
else
print {\n/* Not available */\n#define TODO(x)\n}
end

print [@

/* The host "triplet" - it's really a pair now: machine-os */
#define HOST "@sys/sysid@"

/* Directory separator char */
#define PCB_DIR_SEPARATOR_C '@sys/path_sep@'

/* Directory separator string */
#define PCB_DIR_SEPARATOR_S "@sys/path_sep@"

/* Search path separator string */
#define PCB_PATH_DELIMETER ":"

/****************************************************************************/
/* These are static; they are kept "just in case", for further porting */

/* C89 has atexit() */
#define HAS_ATEXIT 1

/* C89 has this */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the `canonicalize_file_name' function.
   It's a GNU extension, assume we don't have it and fall back to
   realpath() */
/* #define HAVE_CANONICALIZE_FILE_NAME 1 */
/* Define if canonicalize_file_name is not declared in system header files. */
/* #undef NEED_DECLARATION_CANONICALIZE_FILE_NAME */

/****************************************************************************/
/* Paths */

#define PCB_PREFIX "@/local/prefix@"
#define PCBSHAREDIR PCB_PREFIX "/share/pcb-rnd"
#define PCBLIBDIR PCB_PREFIX "/lib/pcb-rnd"

#define BINDIR PCB_PREFIX "/bin"

/* Relative path from bindir to exec_prefix */
#define BINDIR_TO_EXECPREFIX ".."

/* Version number of package */
#define PCB_VERSION "@/local/version@"
#define PCB_REVISION "@/local/revision@"

/* Format: abccrrrrr where a, b and c are pcb-rnd version numbers and r is
   the svn revision number (optional) */
#define PCB_API_VER @/local/apiver@


/* Define to 1 if you have the `dmalloc' library (-ldmalloc);
   (memory debugging without valgrind) */
@]

print_ternary libs/sul/dmalloc/presents {#define HAVE_LIBDMALLOC 1} {/*#undef HAVE_LIBDMALLOC */}

print [@
/*
The documentation says it's not necessary to include dmalloc.h.
Pros: getting source line info
Cons: can't include from here, needs to be included from the bottom of the #include list from each file
#ifdef HAVE_LIBDMALLOC
#include <dmalloc.h>
#endif
*/

@?/local/pcb/include_stdint@

/* Coordinate type and properties, as detected by scconfig */
typedef @/local/pcb/coord_type@ pcb_coord_t;
#define COORD_MAX @/local/pcb/coord_max@
#define coord_abs pcb_coord_abs

/* Other autodetected types */
typedef @/local/pcb/long64@    pcb_long64_t;

/* the dot-dir: where to save user config under ther user's home; it's used
   as ~/DOT_PCB_RND/ */
#define DOT_PCB_RND "@/local/pcb/dot_pcb_rnd@"

/* ./configure --workaround requests: */
@?/local/pcb/workaround_defs@

/* Make sure to catch usage of non-portable functions in debug mode
   This is in here only because config.h should be included from every source
   file. */
#ifndef NDEBUG
#	undef strdup
#	undef strndup
#	undef snprintf
#	undef round
#	undef strcasecmp
#	define strdup      never_use_strdup__use_pcb_strdup
#	define strndup     never_use_strndup__use_pcb_strndup
#	define snprintf    never_use_snprintf__use_pcb_snprintf
#	define round       never_use_round__use_pcb_round
#	define strcasecmp  never_use_strcasecmp__use_pcb_strcasecmp
#	ifndef PCB_SAFE_FS
#		undef fopen
#		undef popen
#		undef system
#		undef remove
#		undef rename
#		define fopen       never_use_fopen__use_pcb_fopen
#		define popen       never_use_popen__use_pcb_popen
#		define system      never_use_system__use_pcb_system
#		define remove      never_use_remove__use_pcb_remove
#		define rename      never_use_rename__use_pcb_rename
#		define mkdir       never_use_mkdir__use_pcb_mkdir
#		define unlink      never_use_unlink__use_pcb_unlink
#		define opendir     never_use_opendir__use_pcb_opendir
#		define readdir     never_use_readdir__use_pcb_readdir
#		define closedir    never_use_closedir__use_pcb_closedir
#		define access      never_use_access__use_pcb_file_readable
#	endif

#endif

#endif
@]