Line 0
Link Here
|
|
|
1 |
diff -bru acconfig.h acconfig.h |
2 |
--- acconfig.h Thu Aug 16 12:35:43 2001 |
3 |
+++ acconfig.h Sat Nov 23 15:52:20 2002 |
4 |
@@ -6,3 +6,6 @@ |
5 |
#undef HAVE_LIB_XP |
6 |
|
7 |
#undef HAVE_MOTIF |
8 |
+ |
9 |
+/* Build a production version of the library */ |
10 |
+#undef XBAE_PRODUCTION |
11 |
diff -bru configure configure |
12 |
--- configure Wed Oct 16 13:56:36 2002 |
13 |
+++ configure Sat Nov 23 15:52:48 2002 |
14 |
@@ -1002,6 +1002,7 @@ |
15 |
--disable-libtool-lock avoid locking (might break parallel builds) |
16 |
--enable-maintainer-mode enable make rules and dependencies not useful |
17 |
(and sometimes confusing) to the casual installer |
18 |
+ --enable-production build a production version |
19 |
|
20 |
Optional Packages: |
21 |
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
22 |
@@ -4694,7 +4695,7 @@ |
23 |
case $host in |
24 |
*-*-irix6*) |
25 |
# Find out which ABI we are using. |
26 |
- echo '#line 4697 "configure"' > conftest.$ac_ext |
27 |
+ echo '#line 4698 "configure"' > conftest.$ac_ext |
28 |
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
29 |
(eval $ac_compile) 2>&5 |
30 |
ac_status=$? |
31 |
@@ -5230,7 +5231,7 @@ |
32 |
save_CFLAGS="$CFLAGS" |
33 |
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" |
34 |
compiler_c_o=no |
35 |
-if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
36 |
+if { (eval echo configure:5234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
37 |
# The compiler can only warn and ignore the option if not recognized |
38 |
# So say no if there are warnings |
39 |
if test -s out/conftest.err; then |
40 |
@@ -7023,7 +7024,7 @@ |
41 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
42 |
lt_status=$lt_dlunknown |
43 |
cat > conftest.$ac_ext <<EOF |
44 |
-#line 7026 "configure" |
45 |
+#line 7027 "configure" |
46 |
#include "confdefs.h" |
47 |
|
48 |
#if HAVE_DLFCN_H |
49 |
@@ -7121,7 +7122,7 @@ |
50 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
51 |
lt_status=$lt_dlunknown |
52 |
cat > conftest.$ac_ext <<EOF |
53 |
-#line 7124 "configure" |
54 |
+#line 7125 "configure" |
55 |
#include "confdefs.h" |
56 |
|
57 |
#if HAVE_DLFCN_H |
58 |
@@ -9611,6 +9612,19 @@ |
59 |
echo "$as_me:$LINENO: result: libraries $motif_libraries_result, headers $motif_includes_result" >&5 |
60 |
echo "${ECHO_T}libraries $motif_libraries_result, headers $motif_includes_result" >&6 |
61 |
|
62 |
+ |
63 |
+# Check whether --enable-production or --disable-production was given. |
64 |
+if test "${enable_production+set}" = set; then |
65 |
+ enableval="$enable_production" |
66 |
+ |
67 |
+fi; |
68 |
+ |
69 |
+if test "x$enable_production" = "xyes" ; then |
70 |
+ cat >>confdefs.h <<\_ACEOF |
71 |
+#define XBAE_PRODUCTION 1 |
72 |
+_ACEOF |
73 |
+ |
74 |
+fi |
75 |
|
76 |
if (aclocal --print-ac-dir) </dev/null >/dev/null 2>&1 && test -w `aclocal --print-ac-dir`; then |
77 |
ACLOCALDIR=`aclocal --print-ac-dir` |
78 |
diff -bru configure.in configure.in |
79 |
--- configure.in Wed Oct 16 13:44:30 2002 |
80 |
+++ configure.in Sat Nov 23 15:52:20 2002 |
81 |
@@ -98,6 +98,20 @@ |
82 |
dnl |
83 |
AC_FIND_MOTIF |
84 |
|
85 |
+dnl |
86 |
+dnl Build a production version of the library |
87 |
+dnl This will compile out XdbDebug statements |
88 |
+dnl (the libraries itself remain binary compatible, you can |
89 |
+dnl link against a debug version, run with a production version |
90 |
+dnl and vice versa!) |
91 |
+dnl |
92 |
+AC_ARG_ENABLE(production, |
93 |
+[ --enable-production build a production version]) |
94 |
+ |
95 |
+if test "x$enable_production" = "xyes" ; then |
96 |
+ AC_DEFINE(XBAE_PRODUCTION) |
97 |
+fi |
98 |
+ |
99 |
dnl Run test in a subshell; some versions of sh will print an error if |
100 |
dnl an executable is not found, even if stderr is redirected. |
101 |
dnl Redirect stdin to placate older versions of autoconf. Sigh. |
102 |
diff -bru include/XbaeDebug.h include/XbaeDebug.h |
103 |
--- include/XbaeDebug.h Sat Apr 6 10:01:19 2002 |
104 |
+++ include/XbaeDebug.h Sat Nov 23 15:52:20 2002 |
105 |
@@ -136,7 +136,7 @@ |
106 |
void _XbaeDebugAction(const char *fn, Widget w, const String action, |
107 |
const String *params, const Cardinal *num_params); |
108 |
|
109 |
-#ifdef LESSTIF_PRODUCTION |
110 |
+#ifdef XBAE_PRODUCTION |
111 |
#define _XbaeDebugInDebug(x, y) False |
112 |
#define DEBUGOUT(x) |
113 |
|
114 |
@@ -146,7 +146,7 @@ |
115 |
#else |
116 |
Boolean _XbaeDebugInDebug(const char *fn, Widget w); |
117 |
#define DEBUGOUT(x) x |
118 |
-#endif /* LESSTIF_PRODUCTION */ |
119 |
+#endif /* XBAE_PRODUCTION */ |
120 |
|
121 |
/* |
122 |
* Some stuff to produce sensible tracing with dmalloc. |
123 |
diff -bru src/DebugUtil.c src/DebugUtil.c |
124 |
--- src/DebugUtil.c Thu Jul 25 16:37:10 2002 |
125 |
+++ src/DebugUtil.c Sat Nov 23 15:52:20 2002 |
126 |
@@ -77,7 +77,7 @@ |
127 |
Boolean _XbaeDebugInDebug(const char *fn, Widget w); |
128 |
|
129 |
|
130 |
-#ifndef LESSTIF_PRODUCTION |
131 |
+#ifndef XBAE_PRODUCTION |
132 |
/* All external interfaces need to be in place for both, |
133 |
debug and production build. We may just reduce them |
134 |
to empty stubs ... */ |
135 |
@@ -130,16 +130,16 @@ |
136 |
* enabled or disabled upon program start. Valid Values are on/off. |
137 |
* e.g. XBAE_DEBUG_TOGGLE=off |
138 |
* |
139 |
- * If the C macro LESSTIF_PRODUCTION is defined, then _XbaeDebug etc. don't |
140 |
+ * If the C macro XBAE_PRODUCTION is defined, then _XbaeDebug etc. don't |
141 |
* work. Note: this is a compile time option. |
142 |
* To have maximum performance, sequences of _XbaeDebug statements should be |
143 |
* surrounded by an if (_XbaeDebugInDebug(__FILE__, w)) statement. |
144 |
- * _XbaeDebugInDebug is False when LESSTIF_PRODUCTION is defined. |
145 |
+ * _XbaeDebugInDebug is False when XBAE_PRODUCTION is defined. |
146 |
*/ |
147 |
|
148 |
|
149 |
|
150 |
-#ifndef LESSTIF_PRODUCTION |
151 |
+#ifndef XBAE_PRODUCTION |
152 |
static Boolean _XbaeDebugFlag = True; |
153 |
static FILE *_XbaeDebugFile = NULL; |
154 |
typedef void (*sighandler_t)(int); |
155 |
@@ -638,7 +638,7 @@ |
156 |
|
157 |
|
158 |
|
159 |
-#ifndef LESSTIF_PRODUCTION |
160 |
+#ifndef XBAE_PRODUCTION |
161 |
/* catches the signal defined by XBAE_DEBUG_SIGNAL and toggles the |
162 |
global debugging flag. |
163 |
Avoid calling C-runtime functions from within here if possible |
164 |
@@ -719,7 +719,7 @@ |
165 |
return True; |
166 |
} /* signo != NOSIG */ |
167 |
} /* siginstall() */ |
168 |
-#endif /* LESSTIF_PRODUCTION */ |
169 |
+#endif /* XBAE_PRODUCTION */ |
170 |
|
171 |
|
172 |
/* some initialization. |
173 |
@@ -727,7 +727,7 @@ |
174 |
is en- or disabled currently */ |
175 |
extern Boolean |
176 |
_XbaeDebugInit(void) { |
177 |
-#ifdef LESSTIF_PRODUCTION |
178 |
+#ifdef XBAE_PRODUCTION |
179 |
return False; |
180 |
#else |
181 |
static Boolean init=False; |
182 |
@@ -751,7 +751,7 @@ |
183 |
#endif |
184 |
} |
185 |
|
186 |
-#ifndef LESSTIF_PRODUCTION |
187 |
+#ifndef XBAE_PRODUCTION |
188 |
static void |
189 |
_XbaeDebugOpenFile(void) |
190 |
{ |
191 |
@@ -1009,13 +1009,13 @@ |
192 |
} |
193 |
} /* ValidateSource() */ |
194 |
|
195 |
-#endif /* !LESSTIF_PRODUCTION */ |
196 |
+#endif /* !XBAE_PRODUCTION */ |
197 |
|
198 |
|
199 |
extern void |
200 |
_XbaeDebug(const char *fn, Widget w, const char *fmt, ...) |
201 |
{ |
202 |
-#ifndef LESSTIF_PRODUCTION |
203 |
+#ifndef XBAE_PRODUCTION |
204 |
va_list ap; |
205 |
|
206 |
#ifdef DEBUGVALIDATE |
207 |
@@ -1049,14 +1049,14 @@ |
208 |
|
209 |
fflush(_XbaeDebugFile); |
210 |
} |
211 |
-#endif /* !LESSTIF_PRODUCTION */ |
212 |
+#endif /* !XBAE_PRODUCTION */ |
213 |
} |
214 |
|
215 |
|
216 |
extern void |
217 |
_XbaeDebug2(const char *fn, Widget w, Widget c, const char *fmt, ...) |
218 |
{ |
219 |
-#ifndef LESSTIF_PRODUCTION |
220 |
+#ifndef XBAE_PRODUCTION |
221 |
va_list ap; |
222 |
|
223 |
if (_XbaeDebugInit() && ValidateSource(fn)) |
224 |
@@ -1100,14 +1100,14 @@ |
225 |
vfprintf(_XbaeDebugFile, fmt, ap); |
226 |
va_end(ap); |
227 |
} |
228 |
-#endif /* !LESSTIF_PRODUCTION */ |
229 |
+#endif /* !XBAE_PRODUCTION */ |
230 |
} |
231 |
|
232 |
|
233 |
extern void |
234 |
_XbaeDebug0(const char *fn, Widget w, const char *fmt, ...) |
235 |
{ |
236 |
-#ifndef LESSTIF_PRODUCTION |
237 |
+#ifndef XBAE_PRODUCTION |
238 |
va_list ap; |
239 |
|
240 |
if (_XbaeDebugInit() && ValidateSource(fn)) |
241 |
@@ -1116,7 +1116,7 @@ |
242 |
vfprintf(_XbaeDebugFile, fmt, ap); |
243 |
va_end(ap); |
244 |
} |
245 |
-#endif /* !LESSTIF_PRODUCTION */ |
246 |
+#endif /* !XBAE_PRODUCTION */ |
247 |
} |
248 |
|
249 |
|
250 |
@@ -1125,7 +1125,7 @@ |
251 |
extern Boolean |
252 |
_XbaeDebugInDebug(const char *fn, Widget w) |
253 |
{ |
254 |
-#ifdef LESSTIF_PRODUCTION |
255 |
+#ifdef XBAE_PRODUCTION |
256 |
return False; |
257 |
#else |
258 |
return ValidateSource(fn); |
259 |
@@ -1165,7 +1165,7 @@ |
260 |
extern void |
261 |
_XbaeDebugSet(Boolean flag) |
262 |
{ |
263 |
-#ifndef LESSTIF_PRODUCTION |
264 |
+#ifndef XBAE_PRODUCTION |
265 |
if (flag) |
266 |
_XbaeDebugFlag = True; |
267 |
else |
268 |
@@ -1180,7 +1180,7 @@ |
269 |
extern void |
270 |
_XbaeDebugToggle(void) |
271 |
{ |
272 |
-#ifndef LESSTIF_PRODUCTION |
273 |
+#ifndef XBAE_PRODUCTION |
274 |
_XbaeDebugFlag = !_XbaeDebugFlag; |
275 |
#endif |
276 |
} |
277 |
@@ -1190,7 +1190,7 @@ |
278 |
extern Boolean |
279 |
_XbaeDebugQueryState(void) |
280 |
{ |
281 |
-#ifndef LESSTIF_PRODUCTION |
282 |
+#ifndef XBAE_PRODUCTION |
283 |
return _XbaeDebugFlag; |
284 |
#else |
285 |
return False; |
286 |
@@ -1198,7 +1198,7 @@ |
287 |
} |
288 |
|
289 |
|
290 |
-#ifndef LESSTIF_PRODUCTION |
291 |
+#ifndef XBAE_PRODUCTION |
292 |
static Boolean |
293 |
__XbaeDebugPrintWidgetID(void) |
294 |
{ |
295 |
@@ -1263,7 +1263,7 @@ |
296 |
extern void |
297 |
_XbaeDebugPrintTree(Widget w) |
298 |
{ |
299 |
-#ifndef LESSTIF_PRODUCTION |
300 |
+#ifndef XBAE_PRODUCTION |
301 |
__XbaeDebugPrintTree(w, 0); |
302 |
#endif |
303 |
} |
304 |
@@ -1272,7 +1272,7 @@ |
305 |
extern void |
306 |
_XbaeDebugPrintCompleteTree(Widget w) |
307 |
{ |
308 |
-#ifndef LESSTIF_PRODUCTION |
309 |
+#ifndef XBAE_PRODUCTION |
310 |
Widget ww = w; |
311 |
|
312 |
while (ww) |
313 |
@@ -1303,7 +1303,7 @@ |
314 |
extern void |
315 |
_XbaeDebugPrintArgList(const char *fn, Widget w, ArgList al, int n, Boolean Get) |
316 |
{ |
317 |
-#ifndef LESSTIF_PRODUCTION |
318 |
+#ifndef XBAE_PRODUCTION |
319 |
int i; |
320 |
unsigned num; |
321 |
|
322 |
@@ -1483,7 +1483,7 @@ |
323 |
} |
324 |
} |
325 |
} |
326 |
-#endif/* !LESSTIF_PRODUCTION */ |
327 |
+#endif/* !XBAE_PRODUCTION */ |
328 |
} |
329 |
|
330 |
|
331 |
@@ -1493,7 +1493,7 @@ |
332 |
extern void |
333 |
_XbaeDebugPrintString(const char *s) |
334 |
{ |
335 |
-#ifndef LESSTIF_PRODUCTION |
336 |
+#ifndef XBAE_PRODUCTION |
337 |
_XbaeDebugOpenFile(); |
338 |
fprintf(_XbaeDebugFile, "%s", s); |
339 |
#endif |
340 |
@@ -2382,7 +2382,7 @@ |
341 |
_XbaeDebugAction(const char *fn, Widget w, const String action, |
342 |
const String *params, const Cardinal *num_params) |
343 |
{ |
344 |
-#ifndef LESSTIF_PRODUCTION |
345 |
+#ifndef XBAE_PRODUCTION |
346 |
|
347 |
if (_XbaeDebugInit() && ValidateSource(fn)) { |
348 |
int i; |
349 |
@@ -2411,7 +2411,7 @@ |
350 |
|
351 |
fflush(_XbaeDebugFile); |
352 |
} |
353 |
-#endif /* !LESSTIF_PRODUCTION */ |
354 |
+#endif /* !XBAE_PRODUCTION */ |
355 |
} |
356 |
|
357 |
/* |